task properties is saving from grid properties in bpmn designer
This commit is contained in:
@@ -108,12 +108,14 @@ Ext.msgBoxSlider = function(){
|
|||||||
if( ! msgCt ) {
|
if( ! msgCt ) {
|
||||||
msgCt = Ext.DomHelper.insertFirst(document.body, {id:'msg-div', style:'position:absolute'}, true);
|
msgCt = Ext.DomHelper.insertFirst(document.body, {id:'msg-div', style:'position:absolute'}, true);
|
||||||
}
|
}
|
||||||
msgCt.alignTo(document, 't-t');
|
//msgCt.alignTo(document, 'br-br');
|
||||||
|
msgCt.alignTo(document, "br-br", [ -20, -20]);
|
||||||
|
|
||||||
var s = String.format.apply(String, Array.prototype.slice.call(arguments, 1));
|
var s = String.format.apply(String, Array.prototype.slice.call(arguments, 1));
|
||||||
var m = Ext.DomHelper.append(msgCt, {html:createBox(title, s)}, true);
|
var m = Ext.DomHelper.append(msgCt, {html:createBox(title, s)}, true);
|
||||||
m.setWidth(400 );
|
m.setWidth(400 );
|
||||||
m.position(null, 5000 );
|
m.position(null, 5000 );
|
||||||
m.alignTo(document, 't-t');
|
m.alignTo(document, 'br-br');
|
||||||
//Ext.get('x-box-mc-inner' ).setStyle('background-image', 'url("<?php echo _EXT_URL ?>/images/_accept.png")');
|
//Ext.get('x-box-mc-inner' ).setStyle('background-image', 'url("<?php echo _EXT_URL ?>/images/_accept.png")');
|
||||||
Ext.get('x-box-mc-inner' ).setStyle('background-position', '5px 10px');
|
Ext.get('x-box-mc-inner' ).setStyle('background-position', '5px 10px');
|
||||||
Ext.get('x-box-mc-inner' ).setStyle('background-repeat', 'no-repeat');
|
Ext.get('x-box-mc-inner' ).setStyle('background-repeat', 'no-repeat');
|
||||||
@@ -123,6 +125,30 @@ Ext.msgBoxSlider = function(){
|
|||||||
};
|
};
|
||||||
}();
|
}();
|
||||||
|
|
||||||
|
/*Ext.msgBoxSlider = function() {
|
||||||
|
var msgCt;
|
||||||
|
|
||||||
|
function createBox(t, s){
|
||||||
|
return ['<div class="msg">',
|
||||||
|
'<div class="x-box-tl"><div class="x-box-tr"><div class="x-box-tc"></div></div></div>',
|
||||||
|
'<div class="x-box-ml"><div class="x-box-mr"><div class="x-box-mc"><h3>', t,
|
||||||
|
'</h3>', s, '</div></div></div>',
|
||||||
|
'<div class="x-box-bl"><div class="x-box-br"><div class="x-box-bc"></div></div></div>',
|
||||||
|
'</div>'].join('');
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
msg : function(title, format){
|
||||||
|
if(!msgCt){
|
||||||
|
msgCt = Ext.DomHelper.insertFirst(document.body, {id:'msg-div', style:'position:absolute'}, true);
|
||||||
|
}
|
||||||
|
msgCt.alignTo(document, 'bl-bl', [10, -90]);
|
||||||
|
var s = String.format.apply(String, Array.prototype.slice.call(arguments, 1));
|
||||||
|
var m = Ext.DomHelper.append(msgCt, {html:createBox(title, s)}, true);
|
||||||
|
m.slideIn('b').pause(1).ghost("b", {remove:true});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}();*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translator function for internationalization
|
* Translator function for internationalization
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -3242,3 +3242,8 @@ function eprintln($s="", $c=null){
|
|||||||
print "$s\n";
|
print "$s\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function __($msgID , $lang = SYS_LANG, $data = null)
|
||||||
|
{
|
||||||
|
return G::LoadTranslation($msgID, $lang, $data);
|
||||||
|
}
|
||||||
|
|||||||
@@ -180,7 +180,8 @@ class Ajax
|
|||||||
function assignUsersTask($param)
|
function assignUsersTask($param)
|
||||||
{
|
{
|
||||||
try{
|
try{
|
||||||
require_once 'classes/model/TaskUser.php';
|
require_once 'classes/model/TaskUser.php';
|
||||||
|
require_once 'classes/model/Task.php';
|
||||||
$oTaskUser = new TaskUser();
|
$oTaskUser = new TaskUser();
|
||||||
$UIDS = explode(',', $param['UIDS']);
|
$UIDS = explode(',', $param['UIDS']);
|
||||||
$TU_TYPE = 1;
|
$TU_TYPE = 1;
|
||||||
@@ -191,9 +192,13 @@ class Ajax
|
|||||||
else
|
else
|
||||||
$oTaskUser->create(array('TAS_UID' => $param['TAS_UID'], 'USR_UID' => $UID, 'TU_TYPE' => $TU_TYPE, 'TU_RELATION' => 2));
|
$oTaskUser->create(array('TAS_UID' => $param['TAS_UID'], 'USR_UID' => $UID, 'TU_TYPE' => $TU_TYPE, 'TU_RELATION' => 2));
|
||||||
}
|
}
|
||||||
|
$task = TaskPeer::retrieveByPk($param['TAS_UID']);
|
||||||
|
|
||||||
$result->success = true;
|
$result->success = true;
|
||||||
$result->msg = '';
|
if( count($UIDS) > 1 )
|
||||||
|
$result->msg = __('ID_ACTORS_ASSIGNED_SUCESSFULLY', SYS_LANG, Array(count($UIDS), $task->getTasTitle()));
|
||||||
|
else
|
||||||
|
$result->msg = __('ID_ACTOR_ASSIGNED_SUCESSFULLY', SYS_LANG, Array('tas_title'=>$task->getTasTitle()));
|
||||||
} catch(Exception $e){
|
} catch(Exception $e){
|
||||||
$result->success = false;
|
$result->success = false;
|
||||||
$result->msg = $e->getMessage();
|
$result->msg = $e->getMessage();
|
||||||
@@ -225,7 +230,7 @@ class Ajax
|
|||||||
$result->msg = '';
|
$result->msg = '';
|
||||||
} catch(Exception $e){
|
} catch(Exception $e){
|
||||||
$result->success = false;
|
$result->success = false;
|
||||||
$result->msg = "{$TU_RELATIONS[$i]} - {$param['TAS_UID']}, {$USR_UIDS[$i]}, $TU_TYPE, 1 --> " . $e->getMessage();
|
$result->msg = $e->getMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
print G::json_encode($result);
|
print G::json_encode($result);
|
||||||
|
|||||||
@@ -513,7 +513,11 @@ Ext.onReady ( function() {
|
|||||||
success: function(response){
|
success: function(response){
|
||||||
var result = Ext.util.JSON.decode(response.responseText);
|
var result = Ext.util.JSON.decode(response.responseText);
|
||||||
if( result.success ) {
|
if( result.success ) {
|
||||||
PMExt.notify('', 'Users & Groups assigned successfully!');
|
if( typeof parent != 'undefined' )
|
||||||
|
parent.PMExt.notify(_('ID_RESPONSABILITIES_ASSIGNMENT'), result.msg);
|
||||||
|
else
|
||||||
|
PMExt.notify(_('ID_RESPONSABILITIES_ASSIGNMENT'), result.msg);
|
||||||
|
|
||||||
if( typeof parent != 'undefined' ) {
|
if( typeof parent != 'undefined' ) {
|
||||||
parent.Ext.getCmp('eastPanel').show();
|
parent.Ext.getCmp('eastPanel').show();
|
||||||
parent.Ext.getCmp('usersPanelTabs').setActiveTab(1);
|
parent.Ext.getCmp('usersPanelTabs').setActiveTab(1);
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ Ext.onReady ( function() {
|
|||||||
|
|
||||||
var usersTaskGrid = new Ext.grid.GridPanel({
|
var usersTaskGrid = new Ext.grid.GridPanel({
|
||||||
id : 'usersTaskGrid',
|
id : 'usersTaskGrid',
|
||||||
title : 'Users & Groups',
|
title : _('ID_ACTORS'),
|
||||||
height : 180,
|
height : 180,
|
||||||
stateful : true,
|
stateful : true,
|
||||||
stateId : 'usersTaskGrid',
|
stateId : 'usersTaskGrid',
|
||||||
@@ -594,7 +594,7 @@ Ext.onReady ( function() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
}, {
|
}, {
|
||||||
text: 'Actors',
|
text: _('ID_ACTORS'),
|
||||||
iconCls: 'ICON_USERS',
|
iconCls: 'ICON_USERS',
|
||||||
handler: function(){
|
handler: function(){
|
||||||
document.getElementById('designerFrame').contentWindow.usersPanel.show()
|
document.getElementById('designerFrame').contentWindow.usersPanel.show()
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
var win;
|
||||||
|
|
||||||
Ext.onReady(function(){
|
Ext.onReady(function(){
|
||||||
Ext.QuickTips.init();
|
Ext.QuickTips.init();
|
||||||
|
|
||||||
@@ -18,6 +20,26 @@ Ext.onReady(function(){
|
|||||||
]
|
]
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var comboCategory = new Ext.form.ComboBox({
|
||||||
|
fieldLabel : 'Category',
|
||||||
|
name : 'category',
|
||||||
|
allowBlank : true,
|
||||||
|
store : new Ext.data.ArrayStore({
|
||||||
|
fields: ['CATEGORY_UID', 'CATEGORY_NAME'],
|
||||||
|
data : []
|
||||||
|
}),
|
||||||
|
|
||||||
|
valueField : 'CATEGORY_NAME',
|
||||||
|
displayField : 'CATEGORY_NAME',
|
||||||
|
typeAhead : true,
|
||||||
|
//mode : 'local',
|
||||||
|
triggerAction : 'all',
|
||||||
|
editable: true,
|
||||||
|
forceSelection: true,
|
||||||
|
selectOnFocus : true
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
var grid = new Ext.grid.GridPanel( {
|
var grid = new Ext.grid.GridPanel( {
|
||||||
id: 'grid',
|
id: 'grid',
|
||||||
@@ -36,6 +58,7 @@ Ext.onReady(function(){
|
|||||||
viewConfig: {
|
viewConfig: {
|
||||||
forceFit:true
|
forceFit:true
|
||||||
},
|
},
|
||||||
|
clicksToEdit: 1,
|
||||||
|
|
||||||
cm: new Ext.grid.ColumnModel({
|
cm: new Ext.grid.ColumnModel({
|
||||||
defaults: {
|
defaults: {
|
||||||
@@ -43,7 +66,9 @@ Ext.onReady(function(){
|
|||||||
sortable: true
|
sortable: true
|
||||||
},
|
},
|
||||||
columns: [
|
columns: [
|
||||||
{header: 'ID', id:'TRN_ID', dataIndex: 'TRN_ID', hidden:false, hideable:true, width: 350},
|
{header: 'ID', id:'TRN_ID', dataIndex: 'TRN_ID', hidden:false, hideable:true, width: 350,
|
||||||
|
editor: new Ext.form.TextField({allowBlank: true, readOnly:true})
|
||||||
|
} ,
|
||||||
{header: 'Value', dataIndex: 'TRN_VALUE', width: 300, renderer:function(v,p,r){
|
{header: 'Value', dataIndex: 'TRN_VALUE', width: 300, renderer:function(v,p,r){
|
||||||
var label = v.length > 20 ? v.substring(0, 20) + '...' : v;
|
var label = v.length > 20 ? v.substring(0, 20) + '...' : v;
|
||||||
return String.format("<font color='green'>{0}</font>", label);
|
return String.format("<font color='green'>{0}</font>", label);
|
||||||
@@ -95,7 +120,7 @@ Ext.onReady(function(){
|
|||||||
]
|
]
|
||||||
}),
|
}),
|
||||||
listeners: {
|
listeners: {
|
||||||
rowdblclick: edit,
|
rowdblclick: function(){},
|
||||||
render: function(){
|
render: function(){
|
||||||
this.loadMask = new Ext.LoadMask(this.body, {msg:_('ID_LOADING')});
|
this.loadMask = new Ext.LoadMask(this.body, {msg:_('ID_LOADING')});
|
||||||
this.ownerCt.doLayout();
|
this.ownerCt.doLayout();
|
||||||
@@ -106,6 +131,7 @@ Ext.onReady(function(){
|
|||||||
grid.getSelectionModel().on('rowselect', function(){
|
grid.getSelectionModel().on('rowselect', function(){
|
||||||
var rowSelected = grid.getSelectionModel().getSelected();
|
var rowSelected = grid.getSelectionModel().getSelected();
|
||||||
Ext.getCmp('editValue').setValue(rowSelected.data.TRN_VALUE);
|
Ext.getCmp('editValue').setValue(rowSelected.data.TRN_VALUE);
|
||||||
|
Ext.getCmp('label1').setValue(rowSelected.data.TRN_ID);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -133,7 +159,7 @@ Ext.onReady(function(){
|
|||||||
region: 'south',
|
region: 'south',
|
||||||
layout: 'fit',
|
layout: 'fit',
|
||||||
//width: 200,
|
//width: 200,
|
||||||
height: 100,
|
height: 120,
|
||||||
minSize: 100,
|
minSize: 100,
|
||||||
maxSize: 400,
|
maxSize: 400,
|
||||||
split: true,
|
split: true,
|
||||||
@@ -145,9 +171,15 @@ Ext.onReady(function(){
|
|||||||
xtype:'textarea'
|
xtype:'textarea'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
tbar:[ new Ext.form.TextField ({
|
||||||
|
id: 'label1',
|
||||||
|
allowBlank: true,
|
||||||
|
width: 600,
|
||||||
|
readOnly: true
|
||||||
|
})],
|
||||||
bbar: [{
|
bbar: [{
|
||||||
text: 'Save',
|
text: 'Save',
|
||||||
icon: '',
|
iconCls: 'ss_sprite ss_disk',
|
||||||
handler: saveEdit
|
handler: saveEdit
|
||||||
}],
|
}],
|
||||||
});
|
});
|
||||||
@@ -189,13 +221,13 @@ function newLabel()
|
|||||||
id: 'id',
|
id: 'id',
|
||||||
fieldLabel: 'ID',
|
fieldLabel: 'ID',
|
||||||
xtype:'textfield',
|
xtype:'textfield',
|
||||||
width: 300
|
width: 350
|
||||||
}, {
|
}, {
|
||||||
id: 'label',
|
id: 'label',
|
||||||
fieldLabel: 'Label',
|
fieldLabel: 'Label',
|
||||||
xtype:'textarea',
|
xtype:'textarea',
|
||||||
width: 300,
|
width: 350,
|
||||||
height: 100
|
height: 50
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
buttons : [{
|
buttons : [{
|
||||||
@@ -209,11 +241,11 @@ function newLabel()
|
|||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
|
|
||||||
var win = new Ext.Window({
|
win = new Ext.Window({
|
||||||
id: 'winNew',
|
//id: 'winNew',
|
||||||
title: _('ID_NEW'),
|
title: _('ID_NEW'),
|
||||||
width: 450,
|
width: 490,
|
||||||
height: 200,
|
height: 150,
|
||||||
layout:'fit',
|
layout:'fit',
|
||||||
autoScroll:true,
|
autoScroll:true,
|
||||||
modal: true,
|
modal: true,
|
||||||
@@ -243,7 +275,7 @@ function saveNew()
|
|||||||
success : function(obj, resp) {
|
success : function(obj, resp) {
|
||||||
Ext.getCmp('grid').store.reload();
|
Ext.getCmp('grid').store.reload();
|
||||||
PMExt.notify('SAVE', resp.result.msg);
|
PMExt.notify('SAVE', resp.result.msg);
|
||||||
Ext.getCmp('winNew').hide();
|
win.hide();
|
||||||
},
|
},
|
||||||
failure: function(obj, resp) {
|
failure: function(obj, resp) {
|
||||||
Ext.Msg.alert( _('ID_ERROR'), resp.result.msg);
|
Ext.Msg.alert( _('ID_ERROR'), resp.result.msg);
|
||||||
@@ -325,13 +357,14 @@ function rebuild()
|
|||||||
Ext.MessageBox.hide();
|
Ext.MessageBox.hide();
|
||||||
result = Ext.util.JSON.decode(response.responseText);
|
result = Ext.util.JSON.decode(response.responseText);
|
||||||
if(result.success){
|
if(result.success){
|
||||||
PMExt.notify('REBUILD SUCCESS', '');
|
|
||||||
var text = 'Cache file: ' + result.cacheFile + '<br/>';
|
var text = 'Cache file: ' + result.cacheFile + '<br/>';
|
||||||
//text += 'JS Cache file: ' + result.cacheFileJS + '<br/>';
|
//text += 'JS Cache file: ' + result.cacheFileJS + '<br/>';
|
||||||
text += 'Rows: ' + result.rows + '<br/>';
|
text += 'Rows: ' + result.rows + '<br/>';
|
||||||
//text += 'JS ROws: ' + result.rowsJS + '<br/>';
|
//text += 'JS ROws: ' + result.rowsJS + '<br/>';
|
||||||
|
|
||||||
PMExt.info('Result', text);
|
//PMExt.info('Result', text);
|
||||||
|
PMExt.notify('REBUILD SUCCESS', text);
|
||||||
} else
|
} else
|
||||||
PMExt.error('Error', result.msg);
|
PMExt.error('Error', result.msg);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user