Completing UI integration for new Export methods and fixing some details
This commit is contained in:
@@ -695,37 +695,24 @@ function exportProcess() {
|
||||
var record = processesGrid.getSelectionModel().getSelections();
|
||||
|
||||
if(record.length == 1) {
|
||||
window.location = "../processes/processes_Export?pro_uid=" + record[0].get("PRO_UID");
|
||||
return;
|
||||
|
||||
|
||||
var myMask = new Ext.LoadMask(Ext.getBody(), {msg: _("ID_LOADING")});
|
||||
var proUid = record[0].get("PRO_UID");
|
||||
|
||||
myMask.show();
|
||||
|
||||
///////
|
||||
var proUid = record[0].get("PRO_UID");
|
||||
var proTitle = record[0].get("PRO_TITLE");
|
||||
var titleLength = 60;
|
||||
|
||||
title = (titleLength - proTitle.length >= 0)? proTitle : proTitle.substring(0, (titleLength - 1) + 1) + "...";
|
||||
|
||||
///////
|
||||
Ext.Ajax.request({
|
||||
url: "../processes/processes_Ajax",
|
||||
method: "POST",
|
||||
params: {
|
||||
"action": "process_Export",
|
||||
"data": "{\"pro_uid\": \"" + proUid + "\"}",
|
||||
"processMap": 0
|
||||
},
|
||||
|
||||
success: function (response, opts) {
|
||||
url: "../processes/processes_Export",
|
||||
method: "GET",
|
||||
params: {"pro_uid": proUid},
|
||||
success: function (response) {
|
||||
var result = JSON.parse(response.responseText);
|
||||
myMask.hide();
|
||||
|
||||
var dataResponse = eval("(" + response.responseText + ")"); //json
|
||||
var url = window.location.href;
|
||||
|
||||
window.location = url.substring(0, url.lastIndexOf("/") + 1) + dataResponse.FILENAME_LINK;
|
||||
if (result.success) {
|
||||
window.location = "../processes/processes_DownloadFile?file_hash=" + result.file_hash;
|
||||
} else {
|
||||
Ext.Msg.show({title: "", msg: result.message, icon: Ext.MessageBox.ERROR, buttons: Ext.MessageBox.OK});
|
||||
}
|
||||
},
|
||||
|
||||
failure: function (response, opts) {
|
||||
|
||||
Reference in New Issue
Block a user