summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/model/graph.js6
-rw-r--r--src/client/rz_api_backend.js33
2 files changed, 22 insertions, 17 deletions
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
@@ -132,22 +132,6 @@ define(['model/core'], function(model_core) {
}
/**
- * 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
*
* @param on_complete_cb
@@ -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();