Changeset 848


Ignore:
Timestamp:
Mar 27, 2015 4:36:40 PM (10 years ago)
Author:
dungnv
Message:
 
Location:
pro-violet-viettel/www/deploy/20150304/assets/js
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • pro-violet-viettel/www/deploy/20150304/assets/js/grid.js

    r837 r848  
    6969                                var message = '';
    7070                                if (event.ctrlKey) {
    71                                         if (!isHightLight(node))
    72                                                 hightlightNode(node);
     71                                        if (!isHighLight(node))
     72                                                highlightNode(node);
    7373                                        else
    74                                                 clearHightLightNode(node);
     74                                                clearHighLightNode(node);
    7575                                }
    7676                                else if (event.shiftKey) {
     
    7979                                        var start = aryNode.index(firstItem);
    8080                                        var finish = aryNode.index(node);
    81                                         aryNode.slice(Math.min(start, finish), Math.max(start, finish) + 1).each( function (i,o){hightlightNode(o);});
     81                                        aryNode.slice(Math.min(start, finish), Math.max(start, finish) + 1).each( function (i,o){highlightNode(o);});
    8282                                }
    8383                                else {
    84                                         clearAllHightLightNode(node);
    85                                         hightlightNode(node);                                   
     84                                        clearAllHighLightNode(node);
     85                                        highlightNode(node);                                   
    8686                                }
    8787                               
     
    101101                        }
    102102                       
    103                         var hightlightNode = function (node) {
     103                        var highlightNode = function (node) {
    104104                                $(node).addClass('selected');
    105105                        }
    106106                       
    107                         var isHightLight = function (node) {
     107                        var isHighLight = function (node) {
    108108                                return $(node).hasClass('selected');
    109109                        }
    110110                       
    111                         var clearAllHightLightNode = function () {
     111                        var clearAllHighLightNode = function () {
    112112                                $(oContainer).find('> UL > LI').removeClass('selected');
    113113                        }
    114114                       
    115                         var clearHightLightNode = function (node) {
     115                        var clearHighLightNode = function (node) {
    116116                                $(node).removeClass('selected');
    117117                        }
    118118                       
    119                         var hightLightAllNode = function () {
    120                                 clearAllHightLightNode();
     119                        var highLightAllNode = function () {
     120                                clearAllHighLightNode();
    121121                                $(oContainer).find('> UL > LI').addClass('selected');
    122122                        }
    123123                       
    124                         var getAllHightLightNode = function () {
     124                        var getAllHighLightNode = function () {
    125125                                return $(oContainer).find('> UL > LI.selected');
    126126                        }
     
    136136                                           'user-select':'none'
    137137                                     }).bind('selectstart', function(){ return false;
    138                                      }).bind('click', function(e){clearAllHightLightNode(); return false; });
     138                                     }).bind('click', function(e){clearAllHighLightNode(); return false; });
    139139
    140140                                var ul = $('<ul></ul>',{'class':'vsgrid'});
     
    239239
    240240                        this.rename = function (key) {
    241                                 var hightlightedNodes = self.getHightLightItem();
    242                                 if ($(hightlightedNodes).length == 0 || $(hightlightedNodes).length > 1) return false;
    243 
    244                                 var nodeID = $(hightlightedNodes).get(0).id;
    245                                 var nodeType = $(hightlightedNodes).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;
    246246
    247247                                var selectedNode = $(oContainer).find('LI#' + nodeType + nodeID + '.vscell > DIV.file-name > A#' + nodeID);
     
    256256                        }                       
    257257                       
    258                         this.getHightLightItem = function () {
     258                        this.getHighLightItem = function () {
    259259                                var nodeSelected = $(oContainer).find('LI.vscell.selected');                           
    260260                                var items = [];
     
    273273
    274274                        this.selectAllNode = function () {
    275                                 hightLightAllNode();
     275                                highLightAllNode();
    276276                        }
    277277                       
  • pro-violet-viettel/www/deploy/20150304/assets/js/manager.js

    r847 r848  
    409409                                                                }
    410410                                                                var btnDownloadClick = function() {
    411                                                                         var items = o.oGrid.getHightLightItem();
     411                                                                        var items = o.oGrid.getHighLightItem();
    412412                                                                        var fileid = new Array();
    413413                                                                        var folder = new Array();
     
    430430
    431431                                                                var btnDelClick = function() {
    432                                                                         var items = o.oGrid.getHightLightItem();
     432                                                                        var items = o.oGrid.getHighLightItem();
    433433                                                                        if ($(items).length == 0) {
    434434                                                                                var dirID = $(o.oTree.getSelectedNode())
     
    505505                                                                                                                case 27:
    506506                                                                                                                        var gridSelectedItems = o.oGrid
    507                                                                                                                                         .getHightLightItem();
     507                                                                                                                                        .getHighLightItem();
    508508                                                                                                                        if ($(gridSelectedItems).length > 0) {
    509509                                                                                                                                o.oGrid
     
    591591                                                                }
    592592                                                                var btnPreviewClick = function() {
    593                                                                         var items = o.oGrid.getHightLightItem();
     593                                                                        var items = o.oGrid.getHighLightItem();
    594594                                                                        if ($(items).length == 0) {
    595595                                                                                var dirID = $(o.oTree.getSelectedNode())
     
    920920                                                                        // detect selected items
    921921                                                                        // push to clipboard
    922                                                                         var items = o.oGrid.getHightLightItem();
     922                                                                        var items = o.oGrid.getHighLightItem();
    923923
    924924                                                                        if ($(items).length == 0) {
     
    12831283                                                                                        + '</strong></span>';
    12841284
    1285                                                                         var items = o.oGrid.getHightLightItem();
     1285                                                                        var items = o.oGrid.getHighLightItem();
    12861286                                                                        if (items.length == 1) {
    12871287                                                                                if ((typeof items[0].minetype !== 'undefined')) {
  • pro-violet-viettel/www/deploy/20150304/assets/js/tree.js

    r813 r848  
    9393                        var nodeClick = function (node) {
    9494                                var folderID = $(node).attr('id');
    95                                 selectedNode = hightlightNode(node);
     95                                selectedNode = highlightNode(node);
    9696                                o.manager.setTreeCurrentNode(folderID);
    9797                               
     
    109109                        };
    110110                       
    111                         var hightlightNode = function (node) {
     111                        var highlightNode = function (node) {
    112112                                $(oContainer).find('.currentDir').removeClass('currentDir');
    113113                                $(node).addClass('currentDir');
     
    252252                        this.activeNode = function (node) {
    253253                                var dirID = $(node).attr('id');
    254                                 selectedNode = hightlightNode(node);
     254                                selectedNode = highlightNode(node);
    255255                                o.manager.setTreeCurrentNode(dirID);
    256256                                expandNode(node);
Note: See TracChangeset for help on using the changeset viewer.