Repository: incubator-zeppelin
Updated Branches:
  refs/heads/master 01f4884a3 -> 0e3698222


ZEPPELIN-447: removing of redundant "$" in jshintrc

Allow only jQuery, so that its always more readable.

Author: Prabhjyot Singh <[email protected]>

Closes #449 from prabhjyotsingh/ZEPPELIN-447 and squashes the following commits:

a50ee6b [Prabhjyot Singh] replace jQuery with angular.element
f15e176 [Prabhjyot Singh] Allow only jQuery, so that its always more readable.


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

Branch: refs/heads/master
Commit: 0e3698222704d9e42f7588e6ba0f6d14807a4e11
Parents: 01f4884
Author: Prabhjyot Singh <[email protected]>
Authored: Thu Nov 19 15:07:13 2015 +0530
Committer: Lee moon soo <[email protected]>
Committed: Sun Nov 22 10:49:19 2015 +0900

----------------------------------------------------------------------
 zeppelin-web/.jshintrc                          |  1 -
 .../src/app/notebook/notebook.controller.js     |  2 +-
 .../notebook/paragraph/paragraph.controller.js  | 30 +++++++++++---------
 .../src/components/navbar/navbar.controller.js  |  6 ++--
 4 files changed, 21 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/0e369822/zeppelin-web/.jshintrc
----------------------------------------------------------------------
diff --git a/zeppelin-web/.jshintrc b/zeppelin-web/.jshintrc
index 06f72cc..623ffed 100644
--- a/zeppelin-web/.jshintrc
+++ b/zeppelin-web/.jshintrc
@@ -29,7 +29,6 @@
     "confirm": false,
     "alert": false,
     "nv": false,
-    "$": false,
     "ace": false,
     "d3": false
   }

http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/0e369822/zeppelin-web/src/app/notebook/notebook.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/notebook/notebook.controller.js 
b/zeppelin-web/src/app/notebook/notebook.controller.js
index 74bc4f4..74bb87a 100644
--- a/zeppelin-web/src/app/notebook/notebook.controller.js
+++ b/zeppelin-web/src/app/notebook/notebook.controller.js
@@ -412,7 +412,7 @@ angular.module('zeppelinWebApp').controller('NotebookCtrl', 
function($scope, $ro
     $http.get(baseUrlSrv.getRestApiBase()+ '/notebook/interpreter/bind/' 
+$scope.note.id).
     success(function(data, status, headers, config) {
       $scope.interpreterBindings = data.body;
-      $scope.interpreterBindingsOrig = jQuery.extend(true, [], 
$scope.interpreterBindings); // to check dirty
+      $scope.interpreterBindingsOrig = 
angular.copy($scope.interpreterBindings); // to check dirty
       if (callback) {
         callback();
       }

http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/0e369822/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 d323757..41039c0 100644
--- a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
+++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
@@ -54,12 +54,14 @@ angular.module('zeppelinWebApp')
 
   $scope.renderHtml = function() {
     var retryRenderer = function() {
-      if ($('#p'+$scope.paragraph.id+'_html').length) {
+      if (angular.element('#p' + $scope.paragraph.id + '_html').length) {
         try {
-          
$('#p'+$scope.paragraph.id+'_html').html($scope.paragraph.result.msg);
+          angular.element('#p' + $scope.paragraph.id + 
'_html').html($scope.paragraph.result.msg);
 
-          $('#p'+$scope.paragraph.id+'_html').find('pre 
code').each(function(i, e) { hljs.highlightBlock(e); });
-        } catch(err) {
+          angular.element('#p' + $scope.paragraph.id + '_html').find('pre 
code').each(function(i, e) {
+            hljs.highlightBlock(e);
+          });
+        } catch (err) {
           console.log('HTML rendering error %o', err);
         }
       } else {
@@ -131,7 +133,7 @@ angular.module('zeppelinWebApp')
   $scope.getIframeDimensions = function () {
     if ($scope.asIframe) {
       var paragraphid = '#' + $routeParams.paragraphId + '_container';
-      var height = $(paragraphid).height();
+      var height = angular.element(paragraphid).height();
       return height;
     }
     return 0;
@@ -471,7 +473,7 @@ angular.module('zeppelinWebApp')
       $scope.editor.focus();
 
       autoAdjustEditorHeight(_editor.container.id);
-      $(window).resize(function(){
+      angular.element(window).resize(function() {
         autoAdjustEditorHeight(_editor.container.id);
       });
 
@@ -636,7 +638,7 @@ angular.module('zeppelinWebApp')
     var editor = $scope.editor;
     var height = editor.getSession().getScreenLength() * 
editor.renderer.lineHeight + editor.renderer.scrollBar.getWidth();
 
-    $('#' + id).height(height.toString() + 'px');
+    angular.element('#' + id).height(height.toString() + 'px');
     editor.resize();
   };
 
@@ -847,7 +849,7 @@ angular.module('zeppelinWebApp')
       clearUnknownColsFromGraphOption();
       // set graph height
       var height = $scope.paragraph.config.graph.height;
-      $('#p'+$scope.paragraph.id+'_graph').height(height);
+      angular.element('#p' + $scope.paragraph.id + '_graph').height(height);
 
       if (!type || type === 'table') {
         setTable($scope.paragraph.result, refresh);
@@ -933,16 +935,16 @@ angular.module('zeppelinWebApp')
 
       html += '</table>';
 
-      $('#p' + $scope.paragraph.id + '_table').html(html);
-      $('#p' + $scope.paragraph.id + '_table').perfectScrollbar();
+      angular.element('#p' + $scope.paragraph.id + '_table').html(html);
+      angular.element('#p' + $scope.paragraph.id + 
'_table').perfectScrollbar();
 
       // set table height
       var height = $scope.paragraph.config.graph.height;
-      $('#p'+$scope.paragraph.id+'_table').height(height);
+      angular.element('#p' + $scope.paragraph.id + '_table').height(height);
     };
 
     var retryRenderer = function() {
-      if ($('#p'+$scope.paragraph.id+'_table').length) {
+      if (angular.element('#p' + $scope.paragraph.id + '_table').length) {
         try {
           renderTable();
         } catch(err) {
@@ -1076,7 +1078,7 @@ angular.module('zeppelinWebApp')
     };
 
     var retryRenderer = function() {
-      if ($('#p'+$scope.paragraph.id+'_'+type+' svg').length !== 0) {
+      if (angular.element('#p' + $scope.paragraph.id + '_' + type + ' 
svg').length !== 0) {
         try {
           renderChart();
         } catch(err) {
@@ -1751,7 +1753,7 @@ angular.module('zeppelinWebApp')
   };
 
   $scope.setGraphHeight = function() {
-    var height = $('#p'+$scope.paragraph.id+'_graph').height();
+    var height = angular.element('#p' + $scope.paragraph.id + 
'_graph').height();
 
     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/0e369822/zeppelin-web/src/components/navbar/navbar.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/components/navbar/navbar.controller.js 
b/zeppelin-web/src/components/navbar/navbar.controller.js
index 3294164..81b28de 100644
--- a/zeppelin-web/src/components/navbar/navbar.controller.js
+++ b/zeppelin-web/src/components/navbar/navbar.controller.js
@@ -14,7 +14,9 @@
 
 'use strict';
 
-angular.module('zeppelinWebApp').controller('NavCtrl', function($scope, 
$rootScope, $routeParams, notebookListDataFactory, websocketMsgSrv, 
arrayOrderingSrv) {
+angular.module('zeppelinWebApp').controller('NavCtrl', function($scope, 
$rootScope, $routeParams,
+                                                                
notebookListDataFactory, websocketMsgSrv,
+                                                                
arrayOrderingSrv) {
   /** Current list of notes (ids) */
 
   var vm = this;
@@ -23,7 +25,7 @@ angular.module('zeppelinWebApp').controller('NavCtrl', 
function($scope, $rootSco
   vm.websocketMsgSrv = websocketMsgSrv;
   vm.arrayOrderingSrv = arrayOrderingSrv;
 
-  $('#notebook-list').perfectScrollbar({suppressScrollX: true});
+  angular.element('#notebook-list').perfectScrollbar({suppressScrollX: true});
 
   $scope.$on('setNoteMenu', function(event, notes) {
     notebookListDataFactory.setNotes(notes);

Reply via email to