Merged in victorsl/processmaker/PM-1635 (pull request #1753)
PM-1531 "ProcessMaker 3.0 && 2.9 Enterprise and Community..." SOLVED
This commit is contained in:
@@ -35,10 +35,12 @@ if (preg_match("/^([\d\.]+).*$/", System::getVersion(), $arrayMatch)) {
|
||||
$pmVersion = ""; //Branch master
|
||||
}
|
||||
|
||||
$arrayPmFileExtension = array("pm", "pmx", "bpmn");
|
||||
$arrayImportFileExtension = array("pm", "pmx", "bpmn");
|
||||
$arrayMenuNewOption = array("pm" => true, "bpmn" => true);
|
||||
|
||||
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
|
||||
@@ -47,6 +49,7 @@ $oHeadPublisher->addContent( 'processes/main' ); //adding a html file .html.
|
||||
$partnerFlag = (defined('PARTNER_FLAG')) ? PARTNER_FLAG : false;
|
||||
$oHeadPublisher->assign( 'PARTNER_FLAG', $partnerFlag );
|
||||
$oHeadPublisher->assign( 'pageSize', $conf->getEnvSetting( 'casesListRowNumber' ) );
|
||||
$oHeadPublisher->assign("arrayPmFileExtension", $arrayPmFileExtension);
|
||||
$oHeadPublisher->assign("arrayImportFileExtension", $arrayImportFileExtension);
|
||||
$oHeadPublisher->assign("arrayMenuNewOption", $arrayMenuNewOption);
|
||||
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
|
||||
@@ -175,6 +175,37 @@ Ext.onReady(function(){
|
||||
emptyMsg: "",
|
||||
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( {
|
||||
region: 'center',
|
||||
layout: 'fit',
|
||||
@@ -245,24 +276,7 @@ Ext.onReady(function(){
|
||||
xtype: 'tbsplit',
|
||||
text: _('ID_NEW'),
|
||||
iconCls: 'button_menu_ext ss_sprite ss_add',
|
||||
menu: [
|
||||
{
|
||||
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"});
|
||||
}
|
||||
}
|
||||
],
|
||||
menu: arrayMenuNew,
|
||||
listeners: {
|
||||
"click": function (obj, e) {
|
||||
obj.showMenu();
|
||||
|
||||
Reference in New Issue
Block a user