You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by an...@apache.org on 2015/10/22 12:57:56 UTC

ignite git commit: IGNITE-1686 Added scrolling to the newly created query.

Repository: ignite
Updated Branches:
  refs/heads/ignite-843-rc1 1f1c7d4c0 -> ff8de6aed


IGNITE-1686 Added scrolling to the newly created query.


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

Branch: refs/heads/ignite-843-rc1
Commit: ff8de6aedb640465292ac7b999b5d23912697682
Parents: 1f1c7d4
Author: Andrey <an...@gridgain.com>
Authored: Thu Oct 22 17:57:49 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Thu Oct 22 17:57:49 2015 +0700

----------------------------------------------------------------------
 .../src/main/js/controllers/sql-controller.js               | 9 ++++++++-
 modules/control-center-web/src/main/js/views/sql/sql.jade   | 2 +-
 2 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/ff8de6ae/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 80eb696..3edf051 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
@@ -18,7 +18,8 @@
 // Controller for SQL notebook screen.
 consoleModule.controller('sqlController',
     ['$scope', '$window','$controller', '$http', '$timeout', '$common', '$confirm', '$interval', '$popover', '$loading',
-    function ($scope, $window, $controller, $http, $timeout, $common, $confirm, $interval, $popover, $loading) {
+        '$location', function ($scope, $window, $controller, $http, $timeout, $common, $confirm,
+        $interval, $popover, $loading, $location) {
     // Initialize the super class and extend it.
     angular.extend(this, $controller('agent-download', {$scope: $scope}));
 
@@ -320,6 +321,12 @@ consoleModule.controller('sqlController',
         $scope.notebook.expandedParagraphs.push($scope.notebook.paragraphs.length);
 
         $scope.notebook.paragraphs.push(paragraph);
+
+        $location.hash('paragraph-' + paragraph.id);
+
+        setTimeout(function () {
+            paragraph.ace.focus();
+        });
     };
 
     $scope.setResult = function (paragraph, new_result) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff8de6ae/modules/control-center-web/src/main/js/views/sql/sql.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/sql/sql.jade b/modules/control-center-web/src/main/js/views/sql/sql.jade
index daddeb4..55f9904 100644
--- a/modules/control-center-web/src/main/js/views/sql/sql.jade
+++ b/modules/control-center-web/src/main/js/views/sql/sql.jade
@@ -88,7 +88,7 @@ block container
                     hr
                     .docs-body.paragraphs
                         .panel-group(bs-collapse ng-model='notebook.expandedParagraphs' data-allow-multiple='true' data-start-collapsed='false')
-                            .panel.panel-default(ng-repeat='paragraph in notebook.paragraphs')
+                            .panel.panel-default(id='paragraph-{{paragraph.id}}' ng-repeat='paragraph in notebook.paragraphs')
                                 .panel-heading(bs-collapse-toggle)
                                     div(ng-hide='paragraph.edit')
                                         i.tipLabel.fa(ng-class='paragraphExpanded(paragraph) ? "fa-chevron-circle-up" : "fa-chevron-circle-down"')