Changeset 915 for pro-violet-viettel


Ignore:
Timestamp:
May 7, 2015 4:15:05 PM (10 years ago)
Author:
dungnv
Message:
 
Location:
pro-violet-viettel/www/deploy/20150304/assets/js
Files:
2 edited

Legend:

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

    r892 r915  
    2424                                var thumb = null;
    2525                                var filehosting = o.manager.getFileHosting();
    26                                 var filedomain = o.manager.getFileDomain();
    27                                    
    28 
    29                                 if (node.item.thumbnail != '')
    30                                 { 
    31                                     thumb = $('<img>', {src:node.item.thumbnail,align:'middle'});
    32                                    
    33                                 }
    34                                 var div = $('<div></div>',{'class':icon});
    35                                  $(div).append(thumb);
    36 
    37                                
    38                                
    39                                
     26                var filedomain = o.manager.getFileDomain();
     27
     28                thumb = node.item.thumbnail != '' ? $('<img>', {src:node.item.thumbnail,align:'middle'}): null;
     29
     30                var div = $('<div></div>',{'class':icon});
     31                $(div).append(thumb);
    4032
    4133                                var typeid = type == 'directory' ? 'directory':'file';
  • pro-violet-viettel/www/deploy/20150304/assets/js/manager.js

    r910 r915  
    601601                                    };
    602602
     603
    603604                                    return bootbox.dialog(promptOptions);
    604605                                }
     
    770771                                                                for (var i = 0; i < $(newFileData.FILES).length; i++) {
    771772                                                                    var file = newFileData.FILES[i];
    772 
    773773                                                                    var node = {
    774                                                                         thumbnail: o.filedomain+"/"+file.thumbnail,
     774                                                                        thumbnail: file.thumbnail == '' ? null : o.filedomain+"/"+ file.thumbnail,
    775775                                                                        id: file.id,
    776776                                                                        name: file.name,
     
    900900                                    var aryDupplicated = [];
    901901                                    var messageText = '';
    902 
    903902                                    var destination = self.getTreeCurrentNode();
    904                                     /*if (oClipBoard.act != 'copy') {
    905                                         $(oClipBoard.items).each(
    906                                                 function (index) {
    907                                                     var node = new Object;
    908                                                     if (this.type == 'directory')
    909                                                         buildTreeFromParent(this.id, node);
    910 
    911                                                     else {
    912                                                         node.id = this.id;
    913                                                         node.type = 'file';
    914                                                     }
    915 
    916                                                     items[index] = node;
    917                                                 });
    918 
    919                                     } else {*/
    920                                         var destinationChildDirs = searchItemsByParent(destination, 'directory');
    921                                         var destinationChildFiles = searchItemsByParent(destination, 'file');
    922 
    923                                         items = oClipBoard.items;
    924 
    925                                         for (var i = 0; i < items.length; i++) {
    926                                                 if (items[i].type == 'directory' ) {
    927                                                         for (var d = 0; d < destinationChildDirs.length; d++) {
    928                                                                 if (destinationChildDirs[d].name == items[i].name) {
    929                                                                         aryDupplicated.push(items[i]);
    930                                                                 }
    931                                                         }
    932                                                 }
    933 
    934                                                 if (items[i].type == 'file' ) {
    935                                                         for (var f = 0; f < destinationChildFiles.length; f++) {
    936                                                                 if (destinationChildFiles[f].name == items[i].name) {
    937                                                                         aryDupplicated.push(items[i]);
    938                                                                 }
    939                                                         }
    940                                                 }
    941                                         }
    942                                     //}
     903
     904                                        var destinationChildDirs = searchItemsByParent(destination, 'directory');
     905                                        var destinationChildFiles = searchItemsByParent(destination, 'file');
     906
     907                                    items = oClipBoard.items;
     908
     909                                    for (var i = 0; i < items.length; i++) {
     910                                        if (items[i].type == 'directory' ) {
     911                                                for (var d = 0; d < destinationChildDirs.length; d++) {
     912                                                        if (destinationChildDirs[d].name == items[i].name) {
     913                                                                aryDupplicated.push(items[i]);
     914                                                        }
     915                                                }
     916                                        }
     917
     918                                        if (items[i].type == 'file' ) {
     919                                                for (var f = 0; f < destinationChildFiles.length; f++) {
     920                                                        if (destinationChildFiles[f].name == items[i].name) {
     921                                                                aryDupplicated.push(items[i]);
     922                                                        }
     923                                                }
     924                                        }
     925                                    }
    943926
    944927                                    for (var i = 0; i < items.length; i++) {
     
    982965                                        bootbox.confirm(confirmOptions);
    983966                                    }
     967
     968                                    console.log(items);
    984969                                }
    985970
Note: See TracChangeset for help on using the changeset viewer.