diff options
| author | Alon Levy <alon@pobox.com> | 2015-07-23 18:40:12 +0300 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2015-07-23 18:40:12 +0300 |
| commit | 0f1699a38fe2a83de923acb32057ece14112672b (patch) | |
| tree | 9b6443bf957473ab380607f1b8d6b5bf9be5548a /src | |
| parent | 55df18d00a6201798fa76ef3b479e430de312cb1 (diff) | |
client/rz_api_backend: use rz_core.rzdoc__current__get_name (fix FIXME)
Diffstat (limited to 'src')
| -rw-r--r-- | src/client/rz_api_backend.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/client/rz_api_backend.js b/src/client/rz_api_backend.js index dd6a35e8..bc8cd7b2 100644 --- a/src/client/rz_api_backend.js +++ b/src/client/rz_api_backend.js @@ -23,12 +23,21 @@ */ define(['util', 'model/core'], function(util, model_core) { + var rz_core; + + function get_rz_core() { + if (rz_core === undefined) { + rz_core =require('rz_core'); + } + return rz_core; + } + function RZ_API_Backend() { var rz_server_url = document.location.origin; var common_req_ctx = function() { - var common_ctx = { rzdoc_name: rz_config.rzdoc_cur__name }; // FIXME: call rz_core.rzdoc_get_current + avoid requirejs circular dep + var common_ctx = { rzdoc_name: get_rz_core().rzdoc__current__get_name() }; return common_ctx; }; |
