Changeset 18 for pro-bachkim-filespace/sourcecode/assets/js/vstree.js
- Timestamp:
- Jul 7, 2014 3:08:09 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-bachkim-filespace/sourcecode/assets/js/vstree.js
r17 r18 87 87 var disabledItemsList = null; 88 88 if (d.name == o.homeDirNameDisplay) 89 disabledItemsList = [' cut','delete'];89 disabledItemsList = ['rename','copy','cut','delete']; 90 90 91 91 if (d.currentNode != null) { … … 130 130 o.grid.showModal(currentObj, action); 131 131 break; 132 case 'delete': 133 break; 132 134 default: 133 135 break; … … 302 304 303 305 this.deleteDir = function (c) { 306 if (isHome(c)) return; 304 307 var childExisted = (countNodeChild(c) > 0) ? true:false; 305 var confirmDel = false;306 var confirmChild = true;307 308 var cid = $(c).parent().attr('id');309 var pid = cid.substring(o.dirIDprefix.length, cid.length);310 311 if (isHome(c)) return;312 313 confirmDel = confirm('Are you sure you want to delete this Directory?');314 315 if (childExisted > 0 && confirmDel)316 confirmChild = confirm('This node has childs, you still want to delete it?');317 318 if (confirmDel && confirmChild) {319 var postdata = {id:pid,delallchild:true}320 sendCommand({321 script:'ajax/privatecontent/deletedir',322 postdata:postdata,323 callbackSuccess: function (parsedData) {deleteNode(parsedData)}324 });325 } 308 309 $.confirm ({ 310 text: 'Bạn có muá»n xóa thư mục <span style="font-weight:bold">' + currentObj.name + "</span> khÃŽng?", 311 title: "Xác nháºn xóa!", 312 confirm: function(button) { 313 var cid = $(c).parent().attr('id'); 314 var pid = cid.substring(o.dirIDprefix.length, cid.length); 315 var postdata = {id:pid,delallchild:true} 316 sendCommand({ 317 script:'ajax/privatecontent/deletedir', 318 postdata:postdata, 319 callbackSuccess: function (parsedData) {deleteNode(parsedData)} 320 }); 321 }, 322 cancel: function(button) { 323 // do something 324 }, 325 confirmButton: "Äá»ng Ü xóa", 326 cancelButton: "KhÃŽng", 327 post: false 328 }); 326 329 } 327 330
Note: See TracChangeset
for help on using the changeset viewer.