diff options
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/buttons.js | 2 | ||||
| -rw-r--r-- | src/client/rz_core.js | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/client/buttons.js b/src/client/buttons.js index 699688c4..f175080b 100644 --- a/src/client/buttons.js +++ b/src/client/buttons.js @@ -208,7 +208,7 @@ $('#btn_rzdoc__open').click(function() { return; } - document.location.href = '/rz/' + rzdoc_name // redirect to rzdoc URL + rz_core.rzdoc__open(rzdoc_name); }); } var on_error = function() { diff --git a/src/client/rz_core.js b/src/client/rz_core.js index e0ec1356..4b5099c9 100644 --- a/src/client/rz_core.js +++ b/src/client/rz_core.js @@ -255,6 +255,12 @@ function load_from_json(result) { update_view__graph(true); } +function set_title(rzdoc_name) +{ + // [!] needs to be synced with server provided title (index.html). double the code, half the latency. + document.title = rzdoc_name + ' -- Rhizi Prototype'; +} + /** * open rzdoc: * - set rz_config.rzdoc_cur__name @@ -266,6 +272,7 @@ function rzdoc__open(rzdoc_name) { main_graph.clear(); edit_graph.clear(); main_graph.load_from_backend(); + set_title(rzdoc_name); var rzdoc_bar = $('#rzdoc-bar_doc-label'); var rzdoc_bar__doc_lable = $('#rzdoc-bar_doc-label'); |
