PM-1531 "ProcessMaker 3.0 && 2.9 Enterprise and Community..." SOLVED
Issue:
ProcessMaker 3.0 && 2.9 Enterprise and Community editions release generation
Cause:
Ninguna
Solution:
- Si la version es >= 3 solo se muestra la opcion "New BPMN Project"
- Si la version es < 3 solo se muestra la opcion "New Project"
This commit is contained in:
@@ -35,10 +35,12 @@ if (preg_match("/^([\d\.]+).*$/", System::getVersion(), $arrayMatch)) {
|
|||||||
$pmVersion = ""; //Branch master
|
$pmVersion = ""; //Branch master
|
||||||
}
|
}
|
||||||
|
|
||||||
$arrayPmFileExtension = array("pm", "pmx", "bpmn");
|
$arrayImportFileExtension = array("pm", "pmx", "bpmn");
|
||||||
|
$arrayMenuNewOption = array("pm" => true, "bpmn" => true);
|
||||||
|
|
||||||
if ($pmVersion != "") {
|
if ($pmVersion != "") {
|
||||||
$arrayPmFileExtension = (version_compare($pmVersion . "", "3", ">="))? $arrayPmFileExtension : array("pm");
|
$arrayImportFileExtension = (version_compare($pmVersion . "", "3", ">="))? $arrayImportFileExtension : array("pm");
|
||||||
|
$arrayMenuNewOption = (version_compare($pmVersion . "", "3", ">="))? array("bpmn" => true) : array("pm" => true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$oHeadPublisher->addExtJsScript( 'processes/main', true ); //adding a javascript file .js
|
$oHeadPublisher->addExtJsScript( 'processes/main', true ); //adding a javascript file .js
|
||||||
@@ -47,6 +49,7 @@ $oHeadPublisher->addContent( 'processes/main' ); //adding a html file .html.
|
|||||||
$partnerFlag = (defined('PARTNER_FLAG')) ? PARTNER_FLAG : false;
|
$partnerFlag = (defined('PARTNER_FLAG')) ? PARTNER_FLAG : false;
|
||||||
$oHeadPublisher->assign( 'PARTNER_FLAG', $partnerFlag );
|
$oHeadPublisher->assign( 'PARTNER_FLAG', $partnerFlag );
|
||||||
$oHeadPublisher->assign( 'pageSize', $conf->getEnvSetting( 'casesListRowNumber' ) );
|
$oHeadPublisher->assign( 'pageSize', $conf->getEnvSetting( 'casesListRowNumber' ) );
|
||||||
$oHeadPublisher->assign("arrayPmFileExtension", $arrayPmFileExtension);
|
$oHeadPublisher->assign("arrayImportFileExtension", $arrayImportFileExtension);
|
||||||
|
$oHeadPublisher->assign("arrayMenuNewOption", $arrayMenuNewOption);
|
||||||
|
|
||||||
G::RenderPage( 'publish', 'extJs' );
|
G::RenderPage( 'publish', 'extJs' );
|
||||||
|
|||||||
@@ -175,6 +175,37 @@ Ext.onReady(function(){
|
|||||||
emptyMsg: "",
|
emptyMsg: "",
|
||||||
items:[_('ID_PAGE_SIZE')+':',comboPageSize]
|
items:[_('ID_PAGE_SIZE')+':',comboPageSize]
|
||||||
}) */
|
}) */
|
||||||
|
|
||||||
|
var mnuNewBpmnProject = {
|
||||||
|
text: "New BPMN Project",
|
||||||
|
iconCls: "silk-add",
|
||||||
|
icon: "",
|
||||||
|
handler: function ()
|
||||||
|
{
|
||||||
|
newProcess({type:"bpmnProject"});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var mnuNewProject = {
|
||||||
|
text: "New Project",
|
||||||
|
iconCls: "silk-add",
|
||||||
|
icon: "",
|
||||||
|
handler: function ()
|
||||||
|
{
|
||||||
|
newProcess({type: "classicProject"});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var arrayMenuNew = [];
|
||||||
|
|
||||||
|
if (typeof(arrayMenuNewOption["bpmn"]) != "undefined") {
|
||||||
|
arrayMenuNew.push(mnuNewBpmnProject);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof(arrayMenuNewOption["pm"]) != "undefined") {
|
||||||
|
arrayMenuNew.push(mnuNewProject);
|
||||||
|
}
|
||||||
|
|
||||||
processesGrid = new Ext.grid.GridPanel( {
|
processesGrid = new Ext.grid.GridPanel( {
|
||||||
region: 'center',
|
region: 'center',
|
||||||
layout: 'fit',
|
layout: 'fit',
|
||||||
@@ -245,24 +276,7 @@ Ext.onReady(function(){
|
|||||||
xtype: 'tbsplit',
|
xtype: 'tbsplit',
|
||||||
text: _('ID_NEW'),
|
text: _('ID_NEW'),
|
||||||
iconCls: 'button_menu_ext ss_sprite ss_add',
|
iconCls: 'button_menu_ext ss_sprite ss_add',
|
||||||
menu: [
|
menu: arrayMenuNew,
|
||||||
{
|
|
||||||
text: "New BPMN Project",
|
|
||||||
iconCls: 'silk-add',
|
|
||||||
icon: '',
|
|
||||||
handler: function () {
|
|
||||||
newProcess({type:"bpmnProject"});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: "New Project",
|
|
||||||
iconCls: 'silk-add',
|
|
||||||
icon: '',
|
|
||||||
handler: function () {
|
|
||||||
newProcess({type:"classicProject"});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
listeners: {
|
listeners: {
|
||||||
"click": function (obj, e) {
|
"click": function (obj, e) {
|
||||||
obj.showMenu();
|
obj.showMenu();
|
||||||
|
|||||||
Reference in New Issue
Block a user