Changeset 848 for pro-violet-viettel/www/deploy/20150304/assets/js/grid.js
- Timestamp:
- Mar 27, 2015 4:36:40 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/www/deploy/20150304/assets/js/grid.js
r837 r848 69 69 var message = ''; 70 70 if (event.ctrlKey) { 71 if (!isHigh tLight(node))72 high tlightNode(node);71 if (!isHighLight(node)) 72 highlightNode(node); 73 73 else 74 clearHigh tLightNode(node);74 clearHighLightNode(node); 75 75 } 76 76 else if (event.shiftKey) { … … 79 79 var start = aryNode.index(firstItem); 80 80 var finish = aryNode.index(node); 81 aryNode.slice(Math.min(start, finish), Math.max(start, finish) + 1).each( function (i,o){high tlightNode(o);});81 aryNode.slice(Math.min(start, finish), Math.max(start, finish) + 1).each( function (i,o){highlightNode(o);}); 82 82 } 83 83 else { 84 clearAllHigh tLightNode(node);85 high tlightNode(node);84 clearAllHighLightNode(node); 85 highlightNode(node); 86 86 } 87 87 … … 101 101 } 102 102 103 var high tlightNode = function (node) {103 var highlightNode = function (node) { 104 104 $(node).addClass('selected'); 105 105 } 106 106 107 var isHigh tLight = function (node) {107 var isHighLight = function (node) { 108 108 return $(node).hasClass('selected'); 109 109 } 110 110 111 var clearAllHigh tLightNode = function () {111 var clearAllHighLightNode = function () { 112 112 $(oContainer).find('> UL > LI').removeClass('selected'); 113 113 } 114 114 115 var clearHigh tLightNode = function (node) {115 var clearHighLightNode = function (node) { 116 116 $(node).removeClass('selected'); 117 117 } 118 118 119 var high tLightAllNode = function () {120 clearAllHigh tLightNode();119 var highLightAllNode = function () { 120 clearAllHighLightNode(); 121 121 $(oContainer).find('> UL > LI').addClass('selected'); 122 122 } 123 123 124 var getAllHigh tLightNode = function () {124 var getAllHighLightNode = function () { 125 125 return $(oContainer).find('> UL > LI.selected'); 126 126 } … … 136 136 'user-select':'none' 137 137 }).bind('selectstart', function(){ return false; 138 }).bind('click', function(e){clearAllHigh tLightNode(); return false; });138 }).bind('click', function(e){clearAllHighLightNode(); return false; }); 139 139 140 140 var ul = $('<ul></ul>',{'class':'vsgrid'}); … … 239 239 240 240 this.rename = function (key) { 241 var high tlightedNodes = self.getHightLightItem();242 if ($(high tlightedNodes).length == 0 || $(hightlightedNodes).length > 1) return false;243 244 var nodeID = $(high tlightedNodes).get(0).id;245 var nodeType = $(high tlightedNodes).get(0).type;241 var highlightedNodes = self.getHighLightItem(); 242 if ($(highlightedNodes).length == 0 || $(highlightedNodes).length > 1) return false; 243 244 var nodeID = $(highlightedNodes).get(0).id; 245 var nodeType = $(highlightedNodes).get(0).type; 246 246 247 247 var selectedNode = $(oContainer).find('LI#' + nodeType + nodeID + '.vscell > DIV.file-name > A#' + nodeID); … … 256 256 } 257 257 258 this.getHigh tLightItem = function () {258 this.getHighLightItem = function () { 259 259 var nodeSelected = $(oContainer).find('LI.vscell.selected'); 260 260 var items = []; … … 273 273 274 274 this.selectAllNode = function () { 275 high tLightAllNode();275 highLightAllNode(); 276 276 } 277 277
Note: See TracChangeset
for help on using the changeset viewer.