BUG 0000 "Elimination of the option export xpdl" SOLVED
- It eliminated the option export xpdl - It was improved the export process option in the list of processes
This commit is contained in:
@@ -34,14 +34,9 @@ try {
|
||||
|
||||
/* Includes */
|
||||
G::LoadClass('processes');
|
||||
G::LoadClass('xpdl');
|
||||
$oProcess = new Processes();
|
||||
$oXpdl = new Xpdl();
|
||||
$proFields = $oProcess->serializeProcess( $sProUid );
|
||||
$Fields = $oProcess->saveSerializedProcess ( $proFields );
|
||||
$xpdlFields = $oXpdl->xmdlProcess($sProUid);
|
||||
$Fields['FILENAMEXPDL'] = $xpdlFields['FILENAMEXPDL'];
|
||||
$Fields['FILENAME_LINKXPDL'] = $xpdlFields['FILENAME_LINKXPDL'];
|
||||
|
||||
if (G::is_https ())
|
||||
$http = 'https://';
|
||||
@@ -49,7 +44,6 @@ $Fields['FILENAME_LINKXPDL'] = $xpdlFields['FILENAME_LINKXPDL'];
|
||||
$http = 'http://';
|
||||
|
||||
$Fields['FILENAME_LINK'] = $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/processes/' . $Fields['FILENAME_LINK'];
|
||||
$Fields['FILENAME_LINKXPDL'] = $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/processes/' . $Fields['FILENAME_LINKXPDL'];
|
||||
|
||||
$result = G::json_encode( $Fields );
|
||||
$result = str_replace("\\/","/",'{success:true,data:'.$result.'}'); // unescape the slashes
|
||||
|
||||
@@ -56,14 +56,9 @@ try {
|
||||
|
||||
/* Includes */
|
||||
G::LoadClass('processes');
|
||||
G::LoadClass('xpdl');
|
||||
$oProcess = new Processes();
|
||||
$oXpdl = new Xpdl();
|
||||
$proFields = $oProcess->serializeProcess( $sProUid );
|
||||
$Fields = $oProcess->saveSerializedProcess ( $proFields );
|
||||
$xpdlFields = $oXpdl->xmdlProcess($sProUid);
|
||||
$Fields['FILENAMEXPDL'] = $xpdlFields['FILENAMEXPDL'];
|
||||
$Fields['FILENAME_LINKXPDL'] = $xpdlFields['FILENAME_LINKXPDL'];
|
||||
$pathLength = strlen(PATH_DATA ."sites".PATH_SEP.SYS_SYS.PATH_SEP."files".PATH_SEP."output".PATH_SEP);
|
||||
$length = strlen($Fields['PRO_TITLE']) + $pathLength;
|
||||
|
||||
@@ -75,9 +70,6 @@ try {
|
||||
if ($key == 'FILENAME') {
|
||||
$Fields[$key] = myTruncate($value, 60, '_', '...pm');
|
||||
}
|
||||
if ($key == 'FILENAMEXPDL') {
|
||||
$Fields[$key] = myTruncate($value, 60, '_', '...xpdl');
|
||||
}
|
||||
if (($length) >= 250) {
|
||||
if ($key == 'FILENAME_LINK') {
|
||||
list($file,$rest) = explode ('p=',$value);
|
||||
@@ -85,12 +77,6 @@ try {
|
||||
$Fields[$key] = myTruncate($filenameLink, 250 - $pathLength, '_', '');
|
||||
$Fields[$key] = $file."p=".$Fields[$key].'&'.$rest;
|
||||
}
|
||||
if ($key == 'FILENAME_LINKXPDL') {
|
||||
list($file,$rest) = explode ('p=',$value);
|
||||
list($filenameLinkXpdl,$rest) = explode ('&',$rest);
|
||||
$Fields[$key] = myTruncate($filenameLinkXpdl, 250 - $pathLength , '_', '');
|
||||
$Fields[$key] = $file."p=".$Fields[$key].'&'.$rest;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,13 +96,11 @@ try {
|
||||
"proTitle" => $xmlFrm->fields["PRO_TITLE"]->label,
|
||||
"proDescription" => $xmlFrm->fields["PRO_DESCRIPTION"]->label,
|
||||
"size" => $xmlFrm->fields["SIZE"]->label,
|
||||
"fileName" => $xmlFrm->fields["FILENAME_LABEL"]->label,
|
||||
"fileNameXPDL" => $xmlFrm->fields["FILENAME_LABEL1"]->label,
|
||||
"fileName" => $xmlFrm->fields["FILENAME_LABEL"]->label
|
||||
);
|
||||
|
||||
echo G::json_encode($Fields);
|
||||
}
|
||||
|
||||
}
|
||||
catch ( Exception $e ){
|
||||
$G_PUBLISH = new Publisher;
|
||||
|
||||
@@ -263,19 +263,6 @@ Ext.onReady(function(){
|
||||
importProcess();
|
||||
}
|
||||
},{
|
||||
text: _('ID_XPDL_IMPORT'),
|
||||
iconCls: 'silk-add',
|
||||
icon: '/images/import.gif',
|
||||
// handler:importXPDLProcess
|
||||
handler:function(){
|
||||
importProcessGlobal.processFileType="xpdl";
|
||||
importProcess();
|
||||
}
|
||||
},/*{
|
||||
text:'Export',
|
||||
iconCls: 'silk-add',
|
||||
icon: '/images/export.png',
|
||||
},*/{
|
||||
text: _('ID_BROWSE_LIBRARY'),
|
||||
iconCls: 'button_menu_ext ss_sprite ss_world',
|
||||
//icon: '/images/icon-pmwebservices.png',
|
||||
@@ -658,38 +645,6 @@ deleteProcess = function(){
|
||||
}
|
||||
}
|
||||
|
||||
var winExportProcess = new Ext.Window({
|
||||
//layout: "fit",
|
||||
width: 625,
|
||||
height: 240,
|
||||
modal: true,
|
||||
closeAction: "hide",
|
||||
resizable: false,
|
||||
autoScroll: true,
|
||||
bodyStyle: "padding: 15px 15px 15px 15px;",
|
||||
|
||||
title: "",
|
||||
|
||||
items: [
|
||||
new Ext.FormPanel({
|
||||
id: "frmExportProcess",
|
||||
|
||||
width: 560,
|
||||
autoHeight: true,
|
||||
labelWidth: 1,
|
||||
|
||||
//title: "_",
|
||||
|
||||
items: [
|
||||
{
|
||||
xtype: "displayfield",
|
||||
fieldLabel: ""
|
||||
}
|
||||
]
|
||||
})
|
||||
]
|
||||
});
|
||||
|
||||
function exportProcess() {
|
||||
var record = processesGrid.getSelectionModel().getSelections();
|
||||
|
||||
@@ -719,26 +674,9 @@ function exportProcess() {
|
||||
|
||||
///////
|
||||
var dataResponse = eval("(" + response.responseText + ")"); //json
|
||||
|
||||
var frm = Ext.ComponentMgr.get("frmExportProcess");
|
||||
var frmItems = frm.form.items;
|
||||
var tdAttribute = " align=\"right\" valign=\"top\" nowrap=\"nowrap\" style=\"color: #515151; font-weight: bold;\"";
|
||||
var aStyle = "color: #2078A8; text-decoration: none;";
|
||||
|
||||
var str = "<table cellspacing=\"5px\" cellpadding=\"0px\" style=\"width: 45em; font-size: 0.95em;\">";
|
||||
str = str + "<tr><td" + tdAttribute + ">" + dataResponse.xmlFrmFieldLabel.proTitle + "</td><td>" + dataResponse.PRO_TITLE + "</td><tr>";
|
||||
str = str + "<tr><td" + tdAttribute + ">" + dataResponse.xmlFrmFieldLabel.proDescription + "</td><td>" + dataResponse.PRO_DESCRIPTION + "</td><tr>";
|
||||
str = str + "<tr><td" + tdAttribute + ">" + dataResponse.xmlFrmFieldLabel.size + "</td><td>" + dataResponse.SIZE + "</td><tr>";
|
||||
str = str + "<tr><td" + tdAttribute + ">" + dataResponse.xmlFrmFieldLabel.fileName + "</td><td><a href=\"" + dataResponse.FILENAME_LINK + "\" onclick=\"window.open(this.href, '_blank'); return (false);\" style=\"" + aStyle + "\" onmouseout=\"this.style.color='#2078A8';\" onmouseover=\"this.style.color='orange';\">" + dataResponse.FILENAME + "</a></td><tr>";
|
||||
str = str + "<tr><td" + tdAttribute + ">" + dataResponse.xmlFrmFieldLabel.fileNameXPDL + "</td><td><a href=\"" + dataResponse.FILENAME_LINKXPDL + "\" onclick=\"window.open(this.href, '_blank'); return (false);\" style=\"" + aStyle + "\" onmouseout=\"this.style.color='#2078A8';\" onmouseover=\"this.style.color='orange';\">" + dataResponse.FILENAMEXPDL + "</a></td><tr>";
|
||||
str = str + "</table>";
|
||||
|
||||
//frm.setTitle(dataResponse.xmlFrmFieldLabel.title);
|
||||
frmItems.items[0].setValue(str);
|
||||
|
||||
///////
|
||||
winExportProcess.setTitle(_("ID_EXPORT_PROCESS") + ": " + title);
|
||||
winExportProcess.show();
|
||||
var url = window.location.href;
|
||||
|
||||
window.open(url.substring(0, url.lastIndexOf("/") + 1) + dataResponse.FILENAME_LINK, "_blank");
|
||||
},
|
||||
|
||||
failure: function (response, opts) {
|
||||
@@ -1153,10 +1091,6 @@ importProcess = function()
|
||||
w.show();
|
||||
}
|
||||
|
||||
importXPDLProcess = function(){
|
||||
window.location = 'processes_ImportXpdl';
|
||||
}
|
||||
|
||||
browseLibrary = function(){
|
||||
window.location = 'processes_Library';
|
||||
}
|
||||
|
||||
@@ -22,18 +22,12 @@
|
||||
</SIZE>
|
||||
|
||||
<FILENAME type="phpVariable"/>
|
||||
<FILENAMEXPDL type="phpVariable"/>
|
||||
<FILENAME_LINK type="phpVariable"/>
|
||||
<FILENAME_LINKXPDL type="phpVariable"/>
|
||||
|
||||
<FILENAME_LABEL type="link" value="@#FILENAME" link="@#FILENAME_LINK" target="_blank">
|
||||
<en>File</en>
|
||||
</FILENAME_LABEL>
|
||||
|
||||
<FILENAME_LABEL1 type="link" value="@#FILENAMEXPDL" link="@#FILENAME_LINKXPDL" target="_blank">
|
||||
<en>File xpdl</en>
|
||||
</FILENAME_LABEL1>
|
||||
|
||||
<JS type="javascript"><![CDATA[
|
||||
var nextStep = function(oForm)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user