/** * BPMN Designer v1.1 * @date Feb 2th, 2011 * @author Erik A. O. */ var toolbarPanel; var actorsPanel; var northPanelItems; var eastPanelTree; var ActiveProperty; var comboCategory; var comboCalendar; var comboPMVariables; var propertiesGrid; var propertyStore; var usersTaskStore; var usersTaskGrid; var onDynaformsContextMenu; var usersTaskGridContextMenu; var usersTaskAdHocStore; var usersTaskAdHocGrid; var onUsersTaskAdHocGridContextMenu; var usersTaskAdHocGridContextMenu; var mainMenu; var tbar1; var divScroll; var usersPanelStart = 0; var usersPanelLimit = 1000; var usersStore; var usersGrid; var groupsStore; var groupsGrid; var usersActorsWin; var groupsActorsWin; var adhocUsersActorsWin; var adHocGroupsActorsWin; var _onDropActors; var _targetTask; var o; Ext.onReady(function(){ divScroll = document.body; toolbarPanel = { title: ' ', border: true, xtype:'buttongroup', defaultType: 'button', cls: 'btn-panel-pmtoolbar', columns: 1, defaults: { scale: 'small' }, items : [{ iconCls: 'button_small_ext ss_sprite ss_bpmn_task-18x18', id:"x-shapes-task", text: ' ', width: 22 },{ iconCls: 'button_small_ext ss_sprite ss_bpmn_startevent-18x18', id:"x-shapes-startEvent", text: ' ', width: 22 },{ iconCls: 'button_small_ext ss_sprite ss_bpmn_interevent-18x18', id:"x-shapes-interEvent", text: ' ', width: 22 },{ iconCls: 'button_small_ext ss_sprite ss_bpmn_endevent-18x18', id:"x-shapes-endEvent", text: ' ', width: 22 },{ iconCls: 'ss_sprite ss_bpmn_gateway-18x18', id:"x-shapes-gateways", text: ' ', width: 22 },{ iconCls: 'ss_sprite ss_bpmn_annotation-18x18', id:"x-shapes-annotation", text: ' ', width: 22 } ] }; actorsPanel = { title: ' ',//_('ID_ACTORS'), border: true, xtype:'buttongroup', defaultType: 'button', cls: 'btn-panel-pmtoolbar', columns: 1, defaults: { scale: 'small' }, items : [ { iconCls: 'ICON_USERS', id:"x-pm-users", text: ' ', width: 22, handler: function(){ usersActorsWin.show(); } },{ iconCls: 'ICON_GROUPS', id:"x-pm-groups", text: ' ', width: 22, handler: function(){ groupsActorsWin.show(); } },{ iconCls: 'icon-users-adhoc', id:"x-pm-users-adhoc", text: ' ', width: 22, handler: function(){ } },{ iconCls: 'icon-groups-adhoc', id:"x-pm-groups-adhoc", text: ' ', width: 22, handler: function(){ } } ] }; northPanelItems = [ /* { text: 'Save', cls: 'x-btn-text-icon', iconCls: 'button_menu_ext ss_sprite ss_disk', handler: function() { saveProcess(); } }, { text:'Save as', iconCls: 'button_menu_ext ss_sprite ss_disk_multiple' }, { xtype: 'tbseparator' }, */{ //xtype: 'tbsplit', text:'Edit', //iconCls: '', menu: new Ext.menu.Menu({ items: [ { text: _('ID_SWITCH_EDITOR'), iconCls: 'ss_sprite ss_arrow_switch', handler: function() { if(typeof pro_uid !== 'undefined') { location.href = 'processes/processes_Map?PRO_UID=' +pro_uid+ '&rand=' +Math.random() } } }, { text: _('ID_SNAP_GEOMETRY'), checked: false, // when checked has a boolean value, it is assumed to be a CheckItem checkHandler: function(item, checked){ workflow.setSnapToGeometry(checked); } } ] }) }, { //xtype: 'tbsplit', //iconCls: 'button_menu_ext ss_sprite ss_application', text: 'Process', menu: new Ext.menu.Menu({ items: [{ text : 'Dynaform', iconCls: 'button_menu_ext ss_sprite ss_application_form', handler : function() { processObj.addDynaform(); } }, { text: 'Input Document', iconCls: 'button_menu_ext ss_sprite ss_page_white_put', handler : function() { processObj.addInputDoc(); } }, { text: 'Output Document', iconCls: 'button_menu_ext ss_sprite ss_page_white_get', handler : function() { processObj.addOutputDoc(); } }, { text: 'Trigger', iconCls: 'button_menu_ext ss_sprite ss_cog', handler : function() { processObj.addTriggers(); } }, { text: 'Report Table', iconCls: 'button_menu_ext ss_sprite ss_table', handler : function() { processObj.addReportTable(); } }, { text: 'Database Connection', iconCls: 'button_menu_ext ss_sprite ss_database_connect', handler : function() { processObj.dbConnection(); } } ] }) }, '-', { text:'Undo', iconCls: 'button_menu_ext ss_sprite ss_arrow_undo', handler: function() { workflow.getCommandStack().undo(); } }, { text:'Redo', iconCls: 'button_menu_ext ss_sprite ss_arrow_redo', handler: function() { workflow.getCommandStack().redo(); } },{ //xtype: 'tbsplit', text:'Zoom', iconCls: 'button_menu_ext ss_sprite ss_zoom', menu: new Ext.menu.Menu({ items: [{ text : '25%', handler: function() { Ext.getCmp('designerTab')._setDesignerTitle(pro_title + ' (25%)'); workflow.zoom('25'); } },{ text : '50%', handler: function() { Ext.getCmp('designerTab')._setDesignerTitle(pro_title + ' (50%)'); workflow.zoom('50'); } },{ text : '75%', handler: function() { Ext.getCmp('designerTab')._setDesignerTitle(pro_title + ' (75%)'); workflow.zoom('75'); } },{ text : '100%', handler: function() { Ext.getCmp('designerTab')._setDesignerTitle(pro_title + ' (100%)'); workflow.zoom('100'); } },{ text : '125%', handler: function() { Ext.getCmp('designerTab')._setDesignerTitle(pro_title + ' (125%)'); workflow.zoom('125'); } },{ text : '150%', handler: function() { Ext.getCmp('designerTab')._setDesignerTitle(pro_title + ' (150%)'); workflow.zoom('150'); } },{ text : '200%', handler: function() { Ext.getCmp('designerTab')._setDesignerTitle(pro_title + ' (200%)'); workflow.zoom('200'); } } ] }) } /*,{ xtype: 'tbseparator' }, { text: _('ID_ACTORS'), iconCls: 'ICON_USERS', handler: function(){ usersPanel.show() } }, { xtype: 'tbfill' }, { text: _('ID_SWITCH_EDITOR'), iconCls: 'button_menu_ext ss_sprite ss_pencil', handler: function() { if(typeof pro_uid !== 'undefined') { location.href = 'processes/processes_Map?PRO_UID=' +pro_uid+ '&rand=' +Math.random() } } }*/ ] eastPanelTree = new Ext.tree.TreePanel({ id: 'eastPanelTree', useArrows: false, autoScroll: true, animate: true, rootVisible : false, border: true, height: PMExt.getBrowser().screen.height * 0.3, region: 'north', split : true, collapseMode:'mini', loader : new Ext.tree.TreeLoader({ preloadChildren : true, dataUrl : 'processProxy/getProcessDetail', baseParams : { PRO_UID: pro_uid } }), root: { nodeType : 'async', draggable : false, id : 'root', expanded : true } }); // tree east panel selection change eastPanelTree.getSelectionModel().on('selectionchange', function(tree, node){ if( node.attributes.type == 'task') { _TAS_UID = node.attributes.id; Ext.getCmp('usersPanelTabs').getTabEl('usersTaskGrid').style.display = ''; Ext.getCmp('usersPanelTabs').getTabEl('usersTaskAdHocGrid').style.display = ''; Ext.getCmp('usersTaskGrid').store.reload({params: {tas_uid: _TAS_UID, tu_type: 1}}); Ext.getCmp('usersTaskAdHocGrid').store.reload({params: {tas_uid: _TAS_UID, tu_type: 2}}); } else { Ext.getCmp('usersPanelTabs').setActiveTab(0); Ext.getCmp('usersPanelTabs').getTabEl('usersTaskGrid').style.display = 'none'; Ext.getCmp('usersPanelTabs').getTabEl('usersTaskAdHocGrid').style.display = 'none'; } propertyStore.reload({params: { action : 'getProperties', UID : node.attributes.id, type : node.attributes.type }}); Ext.getCmp('eastPanelCenter').setTitle(node.attributes.typeLabel+': '+node.attributes.text); //propertiesGrid.store.sort('name','DESC'); propertiesGrid.setSource(propertyStore.reader.jsonData.prop); }) ActiveProperty = new Ext.form.Checkbox({ name : 'active', fieldLabel : 'Active', checked : true, inputValue : '1' }); comboCategory = new Ext.form.ComboBox({ fieldLabel : 'Category', name : 'category', allowBlank : true, store : new Ext.data.Store( { //autoLoad: true, //autoload the data proxy : new Ext.data.HttpProxy( { url : 'processProxy/getCategoriesList', method : 'POST' }), baseParams : { action : 'getCategoriesList' }, reader : new Ext.data.JsonReader( { //root : 'rows', fields : [ {name : 'CATEGORY_UID'}, {name : 'CATEGORY_NAME'} ] }) }), valueField : 'CATEGORY_NAME', displayField : 'CATEGORY_NAME', typeAhead : true, //mode : 'local', triggerAction : 'all', editable: true, forceSelection: true, selectOnFocus : true }); comboCalendar = new Ext.form.ComboBox({ fieldLabel : 'Calendar', name : 'calendar', allowBlank : true, store : new Ext.data.Store( { //autoLoad: true, //autoload the data proxy : new Ext.data.HttpProxy({ url: 'processProxy/getCaledarList'}), //baseParams : {action: 'getCaledarList'}, reader : new Ext.data.JsonReader( { root : 'rows', fields : [ {name : 'CALENDAR_UID'}, {name : 'CALENDAR_NAME'} ] }) }), valueField : 'CALENDAR_NAME', displayField : 'CALENDAR_NAME', typeAhead : true, //mode : 'local', triggerAction : 'all', editable: true, forceSelection: true }); var comboPMVariables = new Ext.form.ComboBox({ fieldLabel : 'Calendar', name : 'calendar', allowBlank : true, store : new Ext.data.Store( { //autoLoad: false, //autoload the data proxy : new Ext.data.HttpProxy({ url: 'processProxy/getPMVariables'}), baseParams : {PRO_UID: pro_uid}, reader : new Ext.data.JsonReader( { root : 'rows', fields : [ {name : 'sName'}, {name : 'sName'} ] }) }), valueField : 'sName', displayField : 'sName', typeAhead : true, //mode : 'local', triggerAction: 'all', editable: true, forceSelection: true }); propertiesGrid = new Ext.grid.PropertyGrid({ id: 'propGrid', title: 'Properties', loadMask : {msg:"Loading..."}, autoHeight: true, viewConfig : { forceFit: true, scrollOffset: 2 // the grid will never have scrollbars }, customEditors: { //'Debug' : new Ext.grid.GridEditor(ActiveProperty), 'Category' : new Ext.grid.GridEditor(comboCategory), 'Calendar' : new Ext.grid.GridEditor(comboCalendar), 'Variable for case priority' : new Ext.grid.GridEditor(comboPMVariables) } }); propertiesGrid.on('afteredit', function afterEdit(r) { var node = Ext.getCmp('eastPanelTree').getSelectionModel().getSelectedNode(); var UID; var type; if( node ) { UID = node.attributes.id; type = node.attributes.type; } else { UID = pro_uid; type = 'process'; } Ext.Ajax.request({ url: 'processProxy/saveProperties', params: { UID: UID, type: type, property: r.record.data.name, value: r.value }, success: function(response) { if( type == 'process' && r.record.data.name == 'Title') { pro_title = r.value; Ext.getCmp('designerTab')._setDesignerTitle(pro_title); Ext.getCmp('eastPanelTree').getNodeById(UID).setText(pro_title); } else if( type == 'task' && r.record.data.name == 'Title') { Ext.getCmp('eastPanelTree').getNodeById(UID).setText(r.value); //here we need to find and update the task title into task figure on designer } }, failure: function(){ //Ext.Msg.alert ('Failure'); } }); //r.record.commit(); }, this ); propertyStore = new Ext.data.JsonStore({ id: 'propertyStore', autoLoad: true, //autoload the data url: 'processProxy/getProperties', root: 'prop', fields: ['title', 'description'], store: new Ext.grid.PropertyStore({ sortable: false, defaultSortable: false }), listeners: { load: { fn: function(store, records, options){ //propertiesGrid.store.sort('name','DESC'); propertiesGrid.setSource(store.reader.jsonData.prop); } } }, baseParams: { UID : pro_uid, type : 'process' } }); usersTaskStore = new Ext.data.GroupingStore( { autoLoad: false, url: 'processProxy/getActorsTask', reader : new Ext.data.JsonReader({ totalProperty: 'totalCount', root: 'data', fields : [ {name : 'USR_UID'}, {name : 'USR_USERNAME'}, {name : 'USR_FIRSTNAME'}, {name : 'USR_LASTNAME'}, {name : 'NAME'}, {name : 'TU_RELATION'} ] }), baseParams: {tas_uid: '', tu_type: ''}, groupField: 'TU_RELATION' }); usersTaskGrid = new Ext.grid.GridPanel({ id : 'usersTaskGrid', title : _('ID_ACTORS'), height : 180, stateful : true, stateId : 'usersTaskGrid', sortable:false, view: new Ext.grid.GroupingView({ forceFit:true, groupTextTpl: '{[values.rs.length]} {[values.rs[0].data["TU_RELATION"] == 1 ? "Users" : "Groups"]}' }), cm : new Ext.grid.ColumnModel({ defaults: { width: 300, sortable: true }, columns : [ {id:'USR_UID', dataIndex: 'USR_UID', hidden:true, hideable:false}, {header: 'Assigned', id:'TU_RELATION', dataIndex: 'TU_RELATION', hidden:true, hideable:false}, {header: 'User', dataIndex: 'USER', width: 249, renderer:function(v,p,r){ if( r.data.TU_RELATION == '1' ) return _FNF(r.data.USR_USERNAME, r.data.USR_FIRSTNAME, r.data.USR_LASTNAME); else return r.data.NAME; }} ] }), store: usersTaskStore, listeners: { render: function(){ this.loadMask = new Ext.LoadMask(this.body, {msg:_('ID_LOADING')}); } }/*, tbar:[ '->', { text: _('ID_REMOVE'), iconCls: 'button_menu_ext ss_sprite ss_delete', handler: removeUsersTask } ]*/, bbar: [new Ext.PagingToolbar({ pageSize : 10, store : usersTaskStore, displayInfo: true, displayMsg : '{2} Users', emptyMsg : '' })] }); //connecting context menu to grid usersTaskGrid.addListener('rowcontextmenu', function(grid, rowIndex, e){ e.stopEvent(); var coords = e.getXY(); usersTaskGridContextMenu.showAt([coords[0], coords[1]]); }); //by default the right click is not selecting the grid row over the mouse //we need to set this four lines usersTaskGrid.on('rowcontextmenu', function (grid, rowIndex, evt) { var sm = grid.getSelectionModel(); sm.selectRow(rowIndex, sm.isSelected(rowIndex)); }); //prevent default usersTaskGrid.on('contextmenu', function (evt) { evt.preventDefault(); }); usersTaskGridContextMenu = new Ext.menu.Menu({ id: 'messageContextMenu', items: [{ text: _('ID_REMOVE'), iconCls: 'button_menu_ext ss_sprite ss_delete', handler: removeUsersTask } ] }); //AD HOC usersTaskAdHocStore = new Ext.data.GroupingStore( { autoLoad: false, url: 'processProxy/getActorsTask', reader : new Ext.data.JsonReader({ totalProperty: 'totalCount', root: 'data', fields : [ {name : 'USR_UID'}, {name : 'USR_USERNAME'}, {name : 'USR_FIRSTNAME'}, {name : 'USR_LASTNAME'}, {name : 'NAME'}, {name : 'TU_RELATION'} ] }), baseParams: {tas_uid: '', tu_type: ''}, groupField: 'TU_RELATION' }); usersTaskAdHocGrid = new Ext.grid.GridPanel({ id : 'usersTaskAdHocGrid', title : _('ID_AD_HOC_ACTORS'), height : 180, stateful : true, stateId : 'usersTaskAdHocGrid', sortable:false, view: new Ext.grid.GroupingView({ forceFit:true, groupTextTpl: '{[values.rs.length]} {[values.rs[0].data["TU_RELATION"] == 1 ? "Users" : "Groups"]}' }), cm : new Ext.grid.ColumnModel({ defaults: { width: 300, sortable: true }, columns : [ {id:'USR_UID', dataIndex: 'USR_UID', hidden:true, hideable:false}, {header: 'Assigned', id:'TU_RELATION', dataIndex: 'TU_RELATION', hidden:true, hideable:false}, {header: 'User', dataIndex: 'USER', width: 249, renderer:function(v,p,r){ if( r.data.TU_RELATION == '1' ) return _FNF(r.data.USR_USERNAME, r.data.USR_FIRSTNAME, r.data.USR_LASTNAME); else return r.data.NAME; }} ] }), store: usersTaskAdHocStore, listeners: { render: function(){ this.loadMask = new Ext.LoadMask(this.body, {msg:_('ID_LOADING')}); } }/*, tbar:[ '->', { text: _('ID_REMOVE'), iconCls: 'button_menu_ext ss_sprite ss_delete', handler: removeUsersTask } ]*/, bbar: [new Ext.PagingToolbar({ pageSize : 10, store : usersTaskStore, displayInfo: true, displayMsg : '{2} Users', emptyMsg : '' })] }); //connecting context menu to grid usersTaskAdHocGrid.addListener('rowcontextmenu', onUsersTaskAdHocGridContextMenu,this); //by default the right click is not selecting the grid row over the mouse //we need to set this four lines usersTaskAdHocGrid.on('rowcontextmenu', function (grid, rowIndex, evt) { var sm = grid.getSelectionModel(); sm.selectRow(rowIndex, sm.isSelected(rowIndex)); }, this); //prevent default usersTaskGrid.on('contextmenu', function (evt) { evt.preventDefault(); }, this); onUsersTaskAdHocGridContextMenu = function(grid, rowIndex, e) { e.stopEvent(); var coords = e.getXY(); usersTaskAdHocGridContextMenu.showAt([coords[0], coords[1]]); } usersTaskAdHocGridContextMenu = new Ext.menu.Menu({ id: 'messagAdHocGrideContextMenu', items: [{ text: _('ID_REMOVE'), iconCls: 'button_menu_ext ss_sprite ss_delete', handler: removeUsersAdHocTask } ] }); /*** for actors ***/ var usersStore = new Ext.data.Store({ autoLoad: true, proxy : new Ext.data.HttpProxy({ url: 'processProxy/getUsers?start='+usersPanelStart+'&limit='+usersPanelLimit }), reader : new Ext.data.JsonReader( { totalProperty: 'totalCount', root: 'data', fields : [ {name : 'USR_UID'}, {name : 'USER'}, {name : 'USR_USERNAME'}, {name : 'USR_FIRSTNAME'}, {name : 'USR_LASTNAME'} ] }) }); usersGrid = new Ext.grid.GridPanel({ id : 'usersGrid', height : 180, stateful : true, stateId : 'usersGrid', ddGroup : 'task-assignment', enableDragDrop : true, width: 150, viewConfig : { //forceFit : false }, cm : new Ext.grid.ColumnModel({ defaults: { width: 200, sortable: true }, columns : [ {header: 'USR_UID', id:'USR_UID', dataIndex: 'USR_UID', hidden:true, hideable:false}, {header: 'User', dataIndex: 'USER', width: 249, renderer:function(v,p,r){ return _FNF(r.data.USR_USERNAME, r.data.USR_FIRSTNAME, r.data.USR_LASTNAME); }} ] }), store: usersStore, listeners: { render: function(){ this.loadMask = new Ext.LoadMask(this.body, {msg:_('ID_LOADING')}); } }, tbar : [ new Ext.form.TextField ({ id : 'usersSearchTxt', ctCls :'pm_search_text_field', allowBlank : true, width : 170, emptyText : _('ID_ENTER_SEARCH_TERM'), listeners : { specialkey: function(f,e){ if (e.getKey() == e.ENTER) usersSearch(); } } }), { text :'X', ctCls :'pm_search_x_button', handler : function(){ usersStore.setBaseParam( 'search', ''); usersStore.load({params:{start : 0 , limit : usersPanelLimit}}); Ext.getCmp('usersSearchTxt').setValue(''); } }, { text :TRANSLATIONS.ID_SEARCH, handler : usersSearch } ] /*, bbar: [new Ext.PagingToolbar({ pageSize : usersPanelLimit, store : usersStore, displayInfo: true, displayMsg : '{2} Users', emptyMsg : '' })]*/ }); groupsStore = new Ext.data.Store( { autoLoad: true, proxy : new Ext.data.HttpProxy({ url: 'processProxy/getGroups?start='+usersPanelStart+'&limit='+usersPanelLimit }), reader : new Ext.data.JsonReader( { totalProperty: 'totalCount', root: 'data', fields : [ {name : 'GRP_UID'}, {name : 'CON_VALUE'} ] }) }); groupsGrid = new Ext.grid.GridPanel({ id : 'groupsGrid', stateful : true, stateId : 'groupsGrid', ddGroup : 'task-assignment', height : 180, width: 150, enableDragDrop : true, viewConfig : { forceFit :false }, cm : new Ext.grid.ColumnModel({ defaults : { width : 250, sortable : true }, columns: [ {id:'GRP_UID', dataIndex: 'GRP_UID', hidden:true, hideable:false}, {header: 'Group', dataIndex: 'CON_VALUE', width: 249} ] }), store : groupsStore, listeners : { render : function(){ this.loadMask = new Ext.LoadMask(this.body, {msg:_('ID_LOADING')}); } }, tbar : [ new Ext.form.TextField ({ id : 'groupsSearchTxt', ctCls :'pm_search_text_field', allowBlank : true, width : 170, emptyText : _('ID_ENTER_SEARCH_TERM'), listeners : { specialkey: function(f,e){ if (e.getKey() == e.ENTER) groupsSearch(); } } }), { text :'X', ctCls :'pm_search_x_button', handler : function(){ groupsStore.setBaseParam( 'search', ''); groupsStore.load({params:{start : 0 , limit : usersPanelLimit}}); Ext.getCmp('groupsSearchTxt').setValue(''); } }, { text :TRANSLATIONS.ID_SEARCH, handler : groupsSearch } ]/*, bbar: [new Ext.PagingToolbar({ pageSize : usersPanelLimit, store : groupsStore, displayInfo: true, displayMsg : '{2} Groups', emptyMsg : 'No records found' })]*/ }); _onDropActors = function(ddSource, e, data) { var records = ddSource.dragData.selections; var uids = Array(); _TAS_UID = _targetTask.id; _TU_TYPE = 1; Ext.each(records, function(gridRow){ if( data.grid.id == 'usersGrid' ) {//some users grid items were dropped _RELATION = 1; uids.push(gridRow.data.USR_UID); } else { //some groups grid items were dropped _RELATION = 2; uids.push(gridRow.data.GRP_UID); } }); uids = uids.join(','); Ext.getCmp('eastPanelCenter').setTitle(_('ID_TASK')+': '+_targetTask.name); Ext.Ajax.request({ url: 'processProxy/assignActorsTask', success: function(response){ var result = Ext.util.JSON.decode(response.responseText); if( result.success ) { PMExt.notify(_('ID_RESPONSABILITIES_ASSIGNMENT'), result.msg); Ext.getCmp('eastPanel').show(); Ext.getCmp('usersPanelTabs').getTabEl('usersTaskGrid').style.display = ''; Ext.getCmp('usersPanelTabs').getTabEl('usersTaskAdHocGrid').style.display = ''; Ext.getCmp('eastPanelTree').getNodeById(_TAS_UID).select(); if( _TU_TYPE == 1 ) { Ext.getCmp('usersPanelTabs').setActiveTab(1); Ext.getCmp('usersTaskGrid').store.reload({params:{tas_uid: _TAS_UID, tu_type: 1}}); } else { Ext.getCmp('usersPanelTabs').setActiveTab(2); Ext.getCmp('usersTaskAdHocGrid').store.reload({params:{tas_uid: _TAS_UID, tu_type: 2}}); } } else { PMExt.error(_('ID_ERROR'), result.msg); } }, failure: function(){}, params: { TAS_UID : _TAS_UID, TU_TYPE : _TU_TYPE, TU_RELATION : _RELATION, UIDS : uids } }); } //last usersActorsWin = new Ext.Window({ title: 'ACTORS - Users', layout:'fit', width:260, x:45, y:55, height:PMExt.getBrowser().screen.height/2 - 20, closeAction:'hide', plain: true, plugins: [ new Ext.ux.WindowCascade() ], offset: 50, items: [usersGrid] }); groupsActorsWin = new Ext.Window({ title: 'ACTORS - Groups', layout:'fit', width:260, height:PMExt.getBrowser().screen.height/2 - 20, closeAction:'hide', plain: true, plugins: [ new Ext.ux.WindowCascade() ], offset: 50, items: [groupsGrid] }); }) //var groupsActorsWin; //var adhocUsersActorsWin; //var adHocGroupsActorsWin; //end onReady() function removeUsersTask(){ var usr_uid = Array(); var tu_relation = Array(); var rowsSelected = Ext.getCmp('usersTaskGrid').getSelectionModel().getSelections(); if( rowsSelected.length == 0 ) { PMExt.error('', _('ID_NO_SELECTION_WARNING')); return false; } for(i=0; i