You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by co...@apache.org on 2015/12/09 03:10:35 UTC

incubator-zeppelin git commit: ZEPPELIN-486 Paragraph menu does not disappear on selecting width

Repository: incubator-zeppelin
Updated Branches:
  refs/heads/master c760351b8 -> 6c23c909e


ZEPPELIN-486 Paragraph menu does not disappear on selecting width

Paragraph menu does not disappear on selecting/altering width, and disappears on click of width icon/span.

Author: Prabhjyot Singh <pr...@gmail.com>

Closes #515 from prabhjyotsingh/ZEPPELIN-486 and squashes the following commits:

160a2f7 [Prabhjyot Singh] resize graph bug
a9016a2 [Prabhjyot Singh] Paragraph menu does not disappear on selecting width


Project: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/commit/6c23c909
Tree: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/tree/6c23c909
Diff: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/diff/6c23c909

Branch: refs/heads/master
Commit: 6c23c909ef729414dbcd20f7f406a658b391cb4c
Parents: c760351
Author: Prabhjyot Singh <pr...@gmail.com>
Authored: Fri Dec 4 23:53:50 2015 +0530
Committer: Damien CORNEAU <co...@gmail.com>
Committed: Wed Dec 9 11:10:04 2015 +0900

----------------------------------------------------------------------
 .../notebook/paragraph/paragraph.controller.js  |  2 +-
 .../src/app/notebook/paragraph/paragraph.css    |  4 ++
 .../src/app/notebook/paragraph/paragraph.html   |  2 +-
 .../components/resizable/resizable.directive.js | 51 +++++++++++---------
 4 files changed, 34 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/6c23c909/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
index f73db75..4edb1a3 100644
--- a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
+++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
@@ -406,7 +406,7 @@ angular.module('zeppelinWebApp')
   };
 
   $scope.changeColWidth = function() {
-
+    angular.element('.navbar-right.open').removeClass('open');
     var newParams = angular.copy($scope.paragraph.settings.params);
     var newConfig = angular.copy($scope.paragraph.config);
 

http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/6c23c909/zeppelin-web/src/app/notebook/paragraph/paragraph.css
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/notebook/paragraph/paragraph.css b/zeppelin-web/src/app/notebook/paragraph/paragraph.css
index 6588736..ab08131 100644
--- a/zeppelin-web/src/app/notebook/paragraph/paragraph.css
+++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.css
@@ -404,3 +404,7 @@
 .lightBold {
   font-weight: 500;
 }
+
+.dropdown-menu > li:first-child > a:hover {
+  background-color: transparent;
+}

http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/6c23c909/zeppelin-web/src/app/notebook/paragraph/paragraph.html
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/notebook/paragraph/paragraph.html b/zeppelin-web/src/app/notebook/paragraph/paragraph.html
index 02c9a38..7e3dbfc 100644
--- a/zeppelin-web/src/app/notebook/paragraph/paragraph.html
+++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.html
@@ -426,7 +426,7 @@ limitations under the License.
       </span>
       <ul class="dropdown-menu" role="menu" style="width:200px;">
         <li>
-          <a class="dropdown"><span class="fa fa-arrows-h"></span> Width
+          <a ng-click="$event.stopPropagation()" class="dropdown"><span class="fa fa-arrows-h"></span> Width
             <form style="display:inline; margin-left:5px;">
               <select ng-model="paragraph.config.colWidth"
                       class="selectpicker"

http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/6c23c909/zeppelin-web/src/components/resizable/resizable.directive.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/components/resizable/resizable.directive.js b/zeppelin-web/src/components/resizable/resizable.directive.js
index fe46a24..8f76017 100644
--- a/zeppelin-web/src/components/resizable/resizable.directive.js
+++ b/zeppelin-web/src/components/resizable/resizable.directive.js
@@ -13,29 +13,34 @@
  */
 'use strict';
 
-angular.module('zeppelinWebApp').directive('resizable', function () {
-    var resizableConfig = {
-        autoHide: true,
-        handles: 'se',
-        helper: 'resizable-helper',
-        minHeight:100,
-        grid: [10000, 10]  // allow only vertical
-    };
+angular.module('zeppelinWebApp').directive('resizable', function() {
+  var resizableConfig = {
+    autoHide: true,
+    handles: 'se',
+    helper: 'resizable-helper',
+    minHeight: 100,
+    grid: [10000, 10],  // allow only vertical
+    stop: function() {
+      angular.element(this).css({'width': '100%', 'height': '100%'});
+    }
+  };
 
-    return {
-        restrict: 'A',
-        scope: {
-            callback: '&onResize'
-        },
-        link: function postLink(scope, elem, attrs) {
-            attrs.$observe('allowresize', function(isAllowed) {
-                if (isAllowed === 'true') {
-                    elem.resizable(resizableConfig);
-                    elem.on('resizestop', function () {
-                        if (scope.callback) { scope.callback(); }
-                    });
-                }
-            });
+  return {
+    restrict: 'A',
+    scope: {
+      callback: '&onResize'
+    },
+    link: function postLink(scope, elem, attrs) {
+      attrs.$observe('allowresize', function(isAllowed) {
+        if (isAllowed === 'true') {
+          elem.resizable(resizableConfig);
+          elem.on('resizestop', function() {
+            if (scope.callback) {
+              scope.callback();
+            }
+          });
         }
-    };
+      });
+    }
+  };
 });