Ignore:
Timestamp:
Dec 29, 2014 2:13:57 PM (10 years ago)
Author:
quyenla
Message:

tpro-violet-viettel/sourcecode/api.violet.vn/www/apps/platform/modules/space/actions/actions.class.php

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pro-violet-viettel/sourcecode/assets/js/manager.js

    r289 r682  
    424424                                label: "Tải lên",
    425425                                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                                    }
    428472                                }
    429473                            },
     
    444488                    });
    445489                    $('#upload').fileupload({
    446                          dropZone: $('#drop'),
     490                        dropZone: $('#drop'),
    447491                        add: function (e, data) {
    448492
     
    761805                    else {
    762806                        //execute or preview file
     807                          alert(JSON.stringify(node, null, 4));
    763808                    }
    764809                };
Note: See TracChangeset for help on using the changeset viewer.