Changeset 682 for pro-violet-viettel/sourcecode/assets/js/manager.js
- Timestamp:
- Dec 29, 2014 2:13:57 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/assets/js/manager.js
r289 r682 424 424 label: "Tải lên", 425 425 className: "btn btn-primary", 426 callback: function () { 427 426 callback: function (result) { 427 428 if (result) { 429 var delobj = JSON.stringify(item); 430 var postdata = {delobj: delobj}; 431 var script = 'delete'; 432 sendCommand({ 433 postdata: postdata, 434 script: script, 435 callbackSuccess: function (parseData) { 436 if ($(parseData.DIRECTORIES).length > 0) { 437 $(parseData.DIRECTORIES).each(function (index) { 438 o.oTree.deletion(this); 439 o.oGrid.deletion(this, 'directory'); 440 }); 441 } 442 443 if ($(parseData.FILES).length > 0) { 444 $(parseData.FILES).each(function (index) { 445 var file = o.data.FILES[searchItemByID(this, 'file')]; 446 o.oGrid.deletion(this, file.minetype); 447 }); 448 } 449 }, 450 callbackDone: function (obj) { 451 if ($(parseData.DIRECTORIES).length > 0) { 452 $(parseData.DIRECTORIES).each(function (index) { 453 delete o.data.DIRECTORIES[searchItemByID(this, 'directory')]; 454 }); 455 } 456 457 if ($(parseData.FILES).length > 0) { 458 $(parseData.FILES).each(function (index) { 459 delete o.data.FILES[searchItemByID(this, 'file')]; 460 }); 461 } 462 463 o.oTree.setData(o.data.DIRECTORIES); 464 o.oGrid.setData(o.data); 465 self.setTreeCurrentNode(parentID); 466 o.oGrid.reloadGrid(); 467 }, 468 callbackFail: function () { 469 } 470 }); 471 } 428 472 } 429 473 }, … … 444 488 }); 445 489 $('#upload').fileupload({ 446 490 dropZone: $('#drop'), 447 491 add: function (e, data) { 448 492 … … 761 805 else { 762 806 //execute or preview file 807 alert(JSON.stringify(node, null, 4)); 763 808 } 764 809 };
Note: See TracChangeset
for help on using the changeset viewer.