Changeset 11 for pro-bachkim-filespace/sourcecode/assets
- Timestamp:
- Jun 4, 2014 5:53:33 PM (11 years ago)
- 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 52 52 53 53 var privateTree = $('#treeview-container').violetTree({ 54 script:'http://localhost/ajax/privatecontent/getcontent',55 54 expandEasing: 'easeOutBounce', 56 55 collapseEasing: 'easeOutBounce', -
pro-bachkim-filespace/sourcecode/assets/js/vsfilemanager.js
r9 r11 6 6 if( o.user == undefined ) o.user = null; 7 7 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'; 9 10 if( o.container == undefined ) o.container = $(this); 10 11 if( o.dirIDprefix == undefined ) o.dirIDprefix = 'vsdir_'; … … 21 22 var sendCommand = function (p) { 22 23 if( p.postdata == undefined ) p.postdata = null; 24 if( p.script == undefined ) p.script = o.script; 23 25 if( p.callbackSuccess == undefined ) p.callbackSuccess = null; 24 26 if( p.callbackDone == undefined ) p.callbackDone = null; … … 26 28 if( p.callbackAlways == undefined ) p.callbackAlways = null; 27 29 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){ 30 32 if (data) { 31 33 parseData = $.parseJSON(data); … … 181 183 182 184 var dirName = prompt("Please enter new directory name", ""); 183 185 var script = 'ajax/privatecontent/createdir'; 184 186 sendCommand({ 185 postdata:{action:"create_dir",parentID:pid,name:dirName}, 187 script: script, 188 postdata:{parentID:pid,name:dirName}, 186 189 callbackSuccess: function (parsedData) {createNode({ 187 190 id: parsedData.id, … … 210 213 211 214 if (confirmDel && confirmChild) { 212 var postdata = { action:"delete_dir",id:pid}215 var postdata = {id:pid,delallchild:true} 213 216 sendCommand({ 217 script:'ajax/privatecontent/deletedir', 214 218 postdata:postdata, 215 219 callbackSuccess: function (parsedData) {deleteNode(parsedData)} 216 220 }); 217 } 221 } 218 222 } 219 223
Note: See TracChangeset
for help on using the changeset viewer.