Ignore:
Timestamp:
Jun 4, 2014 5:53:33 PM (11 years ago)
Author:
dungnv
Message:
 
Location:
pro-bachkim-filespace/sourcecode/assets/js
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pro-bachkim-filespace/sourcecode/assets/js/filemanager/filemanager.js

    r10 r11  
    5252
    5353                var privateTree =  $('#treeview-container').violetTree({
    54                         script:'http://localhost/ajax/privatecontent/getcontent',
    5554                        expandEasing: 'easeOutBounce',
    5655                        collapseEasing: 'easeOutBounce',
  • pro-bachkim-filespace/sourcecode/assets/js/vsfilemanager.js

    r9 r11  
    66                        if( o.user == undefined ) o.user = null;
    77                        if( o.homeDirNameDisplay == undefined ) o.homeDirNameDisplay = 'Home';
    8                         if( o.script == undefined ) o.script = null;
     8                        if( o.host == undefined ) o.host = 'http://localhost/';
     9                        if( o.script == undefined ) o.script = 'ajax/privatecontent/getcontent';
    910                        if( o.container == undefined ) o.container = $(this);
    1011                        if( o.dirIDprefix == undefined ) o.dirIDprefix = 'vsdir_';
     
    2122                        var sendCommand = function (p) {
    2223                                if( p.postdata == undefined ) p.postdata = null;
     24                                if( p.script == undefined ) p.script = o.script;
    2325                                if( p.callbackSuccess == undefined ) p.callbackSuccess = null;
    2426                                if( p.callbackDone == undefined ) p.callbackDone = null;
     
    2628                                if( p.callbackAlways == undefined ) p.callbackAlways = null;
    2729
    28                                 if (o.script != null) {
    29                                         $.post(o.script, p.postdata, function (data){
     30                                if (p.script != null) {
     31                                        $.post(o.host + p.script, p.postdata, function (data){
    3032                                                if (data) {
    3133                                                        parseData = $.parseJSON(data);
     
    181183
    182184                                var dirName = prompt("Please enter new directory name", "");
    183 
     185                                var script = 'ajax/privatecontent/createdir';
    184186                                sendCommand({
    185                                         postdata:{action:"create_dir",parentID:pid,name:dirName},
     187                                        script: script,
     188                                        postdata:{parentID:pid,name:dirName},
    186189                                        callbackSuccess: function (parsedData) {createNode({
    187190                                                                                id: parsedData.id,
     
    210213
    211214                                if (confirmDel && confirmChild) {
    212                                         var postdata = {action:"delete_dir",id:pid}
     215                                        var postdata = {id:pid,delallchild:true}
    213216                                        sendCommand({
     217                                                script:'ajax/privatecontent/deletedir',
    214218                                                postdata:postdata,
    215219                                                callbackSuccess: function (parsedData) {deleteNode(parsedData)}
    216220                                        });
    217                                 }       
     221                                }
    218222                        }
    219223
Note: See TracChangeset for help on using the changeset viewer.