some changes in projects opening methods in User Interface.
- An menu option "open with classic editor" was added to open new bpmn projects into classic editor
This commit is contained in:
@@ -23,7 +23,7 @@ class Designer extends Controller
|
|||||||
*/
|
*/
|
||||||
public function index($httpData)
|
public function index($httpData)
|
||||||
{
|
{
|
||||||
$proUid = isset($httpData->pro_uid) ? $httpData->pro_uid : '';
|
$proUid = isset($httpData->prj_uid) ? $httpData->prj_uid : '';
|
||||||
$client = $this->getClientCredentials();
|
$client = $this->getClientCredentials();
|
||||||
$authCode = $this->getAuthorizationCode($client);
|
$authCode = $this->getAuthorizationCode($client);
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
<?php
|
|
||||||
if (! array_key_exists('pro_uid', $_REQUEST)) {
|
|
||||||
die('Bad Request: The param "pro_uid" is required!');
|
|
||||||
}
|
|
||||||
|
|
||||||
$proUid = $_GET['pro_uid'];
|
|
||||||
$bpmnProject = BpmnProjectPeer::retrieveByPK($proUid);
|
|
||||||
|
|
||||||
|
|
||||||
if (is_object($bpmnProject)) {
|
|
||||||
$url = '../designer?pro_uid=' . $proUid;
|
|
||||||
} else {
|
|
||||||
$url = 'processes_Map?PRO_UID=' . $proUid;
|
|
||||||
}
|
|
||||||
|
|
||||||
G::header("location: $url");
|
|
||||||
@@ -393,6 +393,13 @@ Ext.onReady(function(){
|
|||||||
debug.setIconClass('icon-debug');
|
debug.setIconClass('icon-debug');
|
||||||
debug.setText(_('ID_ENABLE_DEBUG'));
|
debug.setText(_('ID_ENABLE_DEBUG'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (rowSelected.data.PROJECT_TYPE == "bpmn"){
|
||||||
|
Ext.getCmp('edit_with_classic_editor').setDisabled(false);
|
||||||
|
} else {
|
||||||
|
Ext.getCmp('edit_with_classic_editor').setDisabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
}, this);
|
}, this);
|
||||||
processesGrid.on('contextmenu', function (evt) {
|
processesGrid.on('contextmenu', function (evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
@@ -411,9 +418,12 @@ Ext.onReady(function(){
|
|||||||
iconCls: 'button_menu_ext ss_sprite ss_pencil',
|
iconCls: 'button_menu_ext ss_sprite ss_pencil',
|
||||||
handler: editProcess
|
handler: editProcess
|
||||||
},{
|
},{
|
||||||
text: 'Edit (New Editor)',
|
id: 'edit_with_classic_editor',
|
||||||
icon: '/images/pencil_beta.png',
|
text: 'Edit with classic editor',
|
||||||
handler: editNewProcess
|
iconCls: 'button_menu_ext ss_sprite ss_pencil',
|
||||||
|
handler: function() {
|
||||||
|
editProcess("classic");
|
||||||
|
}
|
||||||
}, {
|
}, {
|
||||||
id: 'activator2',
|
id: 'activator2',
|
||||||
text: '',
|
text: '',
|
||||||
@@ -572,22 +582,23 @@ function doSearch(){
|
|||||||
store.load({params:{processName: filter, start: 0 , limit: 25}});
|
store.load({params:{processName: filter, start: 0 , limit: 25}});
|
||||||
}
|
}
|
||||||
|
|
||||||
editProcess = function(){
|
editProcess = function(typeParam)
|
||||||
|
{
|
||||||
var rowSelected = processesGrid.getSelectionModel().getSelected();
|
var rowSelected = processesGrid.getSelectionModel().getSelected();
|
||||||
if( rowSelected ) {
|
var url, pro_uid = rowSelected.data.PRO_UID;
|
||||||
//location.href = 'processes_Map?PRO_UID='+rowSelected.data.PRO_UID+'&rand='+Math.random()
|
var type = rowSelected.data.PROJECT_TYPE;
|
||||||
location.href = 'openDesigner?pro_uid='+rowSelected.data.PRO_UID+'&rand='+Math.random()
|
|
||||||
} else {
|
if (typeParam == "bpmn" || typeParam == "classic") {
|
||||||
Ext.Msg.show({
|
type = typeParam;
|
||||||
title:'',
|
|
||||||
msg: _('ID_NO_SELECTION_WARNING'),
|
|
||||||
buttons: Ext.Msg.INFO,
|
|
||||||
fn: function(){},
|
|
||||||
animEl: 'elId',
|
|
||||||
icon: Ext.MessageBox.INFO,
|
|
||||||
buttons: Ext.MessageBox.OK
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (type == "bpmn") {
|
||||||
|
url = '../designer?prj_uid=' + pro_uid;
|
||||||
|
} else {
|
||||||
|
url = 'processes_Map?PRO_UID=' + pro_uid;
|
||||||
|
}
|
||||||
|
|
||||||
|
location.href = url;
|
||||||
}
|
}
|
||||||
|
|
||||||
editNewProcess = function(){
|
editNewProcess = function(){
|
||||||
|
|||||||
Reference in New Issue
Block a user