2010-12-02 23:34:41 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
<dynaForm type="xmlmenu">
|
|
|
|
|
|
|
|
|
|
<JS type="javascript">
|
|
|
|
|
<![CDATA[
|
|
|
|
|
var goToHome = function(PRO_UID) {
|
|
|
|
|
Pm.tmp.processFilesManagerPanel.clearContent();
|
|
|
|
|
Pm.tmp.processFilesManagerPanel.loader.show();
|
|
|
|
|
var oRPC = new leimnud.module.rpc.xmlhttp({
|
|
|
|
|
url : 'processes_Ajax',
|
|
|
|
|
args: 'action=processFilesManager&data=' + {pro_uid:PRO_UID}.toJSONString()
|
|
|
|
|
});
|
|
|
|
|
oRPC.callback = function(rpc){
|
|
|
|
|
Pm.tmp.processFilesManagerPanel.loader.hide();
|
|
|
|
|
var scs = rpc.xmlhttp.responseText.extractScript();
|
|
|
|
|
Pm.tmp.processFilesManagerPanel.addContent(rpc.xmlhttp.responseText);
|
|
|
|
|
scs.evalScript();
|
|
|
|
|
}.extend(this);
|
|
|
|
|
oRPC.make();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var goToDirectory = function(PRO_UID, sMainDirectory, sDirectory) {
|
|
|
|
|
Pm.tmp.processFilesManagerPanel.clearContent();
|
|
|
|
|
Pm.tmp.processFilesManagerPanel.loader.show();
|
|
|
|
|
var oRPC = new leimnud.module.rpc.xmlhttp({
|
|
|
|
|
url : 'processes_Ajax',
|
|
|
|
|
args: 'action=exploreDirectory&data=' + {pro_uid:PRO_UID,main_directory:sMainDirectory,directory:sDirectory}.toJSONString()
|
|
|
|
|
});
|
|
|
|
|
oRPC.callback = function(rpc){
|
|
|
|
|
Pm.tmp.processFilesManagerPanel.loader.hide();
|
|
|
|
|
var scs = rpc.xmlhttp.responseText.extractScript();
|
|
|
|
|
Pm.tmp.processFilesManagerPanel.addContent(rpc.xmlhttp.responseText);
|
|
|
|
|
scs.evalScript();
|
|
|
|
|
|
|
|
|
|
}.extend(this);
|
|
|
|
|
oRPC.make();
|
|
|
|
|
};
|
|
|
|
|
|
2011-03-22 12:01:31 -04:00
|
|
|
var goToDirectoryforie = function(PRO_UID, sMainDirectory, sDirectory) {
|
|
|
|
|
Pm.tmp.processFilesManagerPanel.clearContent();
|
|
|
|
|
Pm.tmp.processFilesManagerPanel.loader.show();
|
|
|
|
|
var oRPC = new leimnud.module.rpc.xmlhttp({
|
|
|
|
|
url : 'processes_Ajax',
|
|
|
|
|
args: 'action=exploreDirectory&data=' + {pro_uid:PRO_UID,main_directory:sMainDirectory,directory:sDirectory}.toJSONString()
|
|
|
|
|
});
|
|
|
|
|
oRPC.callback = function(rpc){
|
|
|
|
|
Pm.tmp.processFilesManagerPanel.loader.hide();
|
|
|
|
|
var scs = rpc.xmlhttp.responseText.extractScript();
|
|
|
|
|
Pm.tmp.processFilesManagerPanel.addContent(rpc.xmlhttp.responseText);
|
|
|
|
|
scs.evalScript();
|
|
|
|
|
if (typeof(oUploadFilesPanel) !== 'undefined') {
|
|
|
|
|
oUploadFilesPanel.remove();
|
|
|
|
|
}
|
|
|
|
|
}.extend(this);
|
|
|
|
|
oRPC.make();
|
|
|
|
|
};
|
|
|
|
|
|
2010-12-02 23:34:41 +00:00
|
|
|
var downloadFile = function(PRO_UID, sMainDirectory, sDirectory, sFile) {
|
2011-03-30 10:38:49 -04:00
|
|
|
//fixed: added a file extension and name of file when is a javascript file by krlos
|
|
|
|
|
sFilename = sFile;
|
|
|
|
|
sFilextension = '';
|
|
|
|
|
if((sFile.search(".js"))>1){
|
|
|
|
|
sFilextension='javascript';
|
|
|
|
|
sFilename = sFile.substr(0, (sFile.length -3) )
|
|
|
|
|
}
|
|
|
|
|
//end add
|
2010-12-02 23:34:41 +00:00
|
|
|
/*var oRPC = new leimnud.module.rpc.xmlhttp({
|
|
|
|
|
url : 'processes_Ajax',
|
|
|
|
|
args: 'action=downloadFile&data=' + {pro_uid:PRO_UID,main_directory:sMainDirectory,directory:sDirectory,file:sFile}.toJSONString()
|
|
|
|
|
});
|
|
|
|
|
oRPC.make();*/
|
2011-03-30 10:38:49 -04:00
|
|
|
window.open('processes_GetFile?PRO_UID=' + PRO_UID + '&MAIN_DIRECTORY=' + sMainDirectory + '&CURRENT_DIRECTORY=' + sDirectory + '&FILE=' + sFilename + '&sFilextension=' + sFilextension, 'processFile', '');//'width=0,height=0,left=0,top=0'
|
2010-12-02 23:34:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var deleteFile = function(PRO_UID, sMainDirectory, sDirectory, sFile) {
|
|
|
|
|
new leimnud.module.app.confirm().make({
|
|
|
|
|
label:G_STRINGS.ID_MSG_CONFIRM_DELETE_FILE,
|
|
|
|
|
action:function() {
|
|
|
|
|
Pm.tmp.processFilesManagerPanel.clearContent();
|
|
|
|
|
Pm.tmp.processFilesManagerPanel.loader.show();
|
|
|
|
|
var oRPC = new leimnud.module.rpc.xmlhttp({
|
|
|
|
|
url : 'processes_Ajax',
|
|
|
|
|
args: 'action=deleteFile&data=' + {pro_uid:PRO_UID,main_directory:sMainDirectory,directory:sDirectory,file:sFile}.toJSONString()
|
|
|
|
|
});
|
|
|
|
|
oRPC.callback = function(rpc){
|
|
|
|
|
goToDirectory(PRO_UID, sMainDirectory, sDirectory);
|
|
|
|
|
}.extend(this);
|
|
|
|
|
oRPC.make();
|
|
|
|
|
}.extend(this)
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var deleteDirectory = function(PRO_UID, sMainDirectory, sDirectory, sDirToDelete) {
|
|
|
|
|
new leimnud.module.app.confirm().make({
|
|
|
|
|
label:G_STRINGS.ID_MSG_CONFIRM_DELETE_DIRECTORY,
|
|
|
|
|
action:function() {
|
|
|
|
|
Pm.tmp.processFilesManagerPanel.clearContent();
|
|
|
|
|
Pm.tmp.processFilesManagerPanel.loader.show();
|
|
|
|
|
var oRPC = new leimnud.module.rpc.xmlhttp({
|
|
|
|
|
url : 'processes_Ajax',
|
|
|
|
|
args: 'action=deleteDirectory&data=' + {pro_uid:PRO_UID,main_directory:sMainDirectory,directory:sDirectory,dir_to_delete:sDirToDelete}.toJSONString()
|
|
|
|
|
});
|
|
|
|
|
oRPC.callback = function(rpc){
|
|
|
|
|
goToDirectory(PRO_UID, sMainDirectory, sDirectory);
|
|
|
|
|
}.extend(this);
|
|
|
|
|
oRPC.make();
|
|
|
|
|
}.extend(this)
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
]]>
|
|
|
|
|
</JS>
|
|
|
|
|
|
2011-03-22 12:01:31 -04:00
|
|
|
</dynaForm>
|