From f2f0f2879a87a6bec5f6892c468b0dccfa9ac7bc Mon Sep 17 00:00:00 2001 From: LV-426 Date: Mon, 30 Mar 2015 20:43:49 +0300 Subject: rz_api_backend: rz_clone -> rzdoc_clone --- src/client/model/graph.js | 6 +++++- src/client/rz_api_backend.js | 33 +++++++++++++++++---------------- 2 files changed, 22 insertions(+), 17 deletions(-) (limited to 'src/client') diff --git a/src/client/model/graph.js b/src/client/model/graph.js index 3a6306ef..6af804a8 100644 --- a/src/client/model/graph.js +++ b/src/client/model/graph.js @@ -974,7 +974,11 @@ function Graph(spec) { undefined != on_success && on_success(); } - rz_api_backend.clone(0, on_success__ajax); + function on_error__ajax(clone) { + // FIXME: update status line with 'rzdoc not found' status + } + + rz_api_backend.rzdoc_clone(on_success__ajax, on_error__ajax); } this.load_from_backend = load_from_backend; diff --git a/src/client/rz_api_backend.js b/src/client/rz_api_backend.js index 79b8ab89..1d23633e 100644 --- a/src/client/rz_api_backend.js +++ b/src/client/rz_api_backend.js @@ -131,22 +131,6 @@ define(['model/core'], function(model_core) { on_error); } - /** - * clone rhizi repo - */ - this.clone = function(depth, on_success, on_error) { - - var req_data = common_req_ctx(); - - // prep request - var req_opts = { - type : 'POST', - data : JSON.stringify(req_data) - }; - - ajax_rs('/graph/clone', req_opts, on_success, on_error); - } - /** * load node-set by id attribute * @@ -239,6 +223,23 @@ define(['model/core'], function(model_core) { var attr_diff = null; return this.attr_diff_commit(null); } + + /** + * clone rhizi repo + */ + this.rzdoc_clone = function(on_success, on_error) { + + var req_data = common_req_ctx(); + + // prep request + var req_opts = { + type : 'POST', + data : JSON.stringify(req_data) + }; + + ajax_rs('/graph/clone', req_opts, on_success, on_error); + } + } return new RZ_API_Backend(); -- cgit v1.3.1