ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject [1/2] ignite git commit: # GG-843 Fixed cache metadata insert.
Date Fri, 18 Sep 2015 10:01:36 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843 a28fc4ab4 -> 738948664


# GG-843 Fixed cache metadata insert.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b595867c
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b595867c
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b595867c

Branch: refs/heads/ignite-843
Commit: b595867c3ec5acdd5ffd37435475a58306d3c15c
Parents: ee0fd43
Author: Andrey <anovikov@gridgain.com>
Authored: Fri Sep 18 17:01:06 2015 +0700
Committer: Andrey <anovikov@gridgain.com>
Committed: Fri Sep 18 17:01:06 2015 +0700

----------------------------------------------------------------------
 .../src/main/js/controllers/sql-controller.js               | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/b595867c/modules/control-center-web/src/main/js/controllers/sql-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/sql-controller.js b/modules/control-center-web/src/main/js/controllers/sql-controller.js
index 3b057dc..7d3be69 100644
--- a/modules/control-center-web/src/main/js/controllers/sql-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/sql-controller.js
@@ -91,7 +91,7 @@ controlCenterModule.controller('sqlController', ['$scope', '$window','$controlle
 
             editor.setTheme('ace/theme/chrome');
 
-            paragraph.ace = editor;
+            Object.defineProperty(paragraph, 'ace', { value: editor });
         }
     };
 
@@ -710,6 +710,13 @@ controlCenterModule.controller('sqlController', ['$scope', '$window','$controlle
 
     $scope.dblclickMetadata = function (paragraph, node) {
         paragraph.ace.insert(node.name);
+        var position = paragraph.ace.selection.getCursor();
+
+        paragraph.query = paragraph.ace.getValue();
+
+        setTimeout(function () {
+            paragraph.ace.selection.moveCursorToPosition(position);
+        }, 1);
     };
 
     $scope.tryLoadMetadata = function (cache) {


Mime
View raw message