diff --git a/workflow/engine/classes/class.dashletProcessMakerCommunity.php b/workflow/engine/classes/class.dashletProcessMakerCommunity.php index 4741ff873..50be0c057 100644 --- a/workflow/engine/classes/class.dashletProcessMakerCommunity.php +++ b/workflow/engine/classes/class.dashletProcessMakerCommunity.php @@ -114,7 +114,7 @@ class dashletProcessMakerCommunity implements DashletInterface { } public function setup($config) { - $this->redFrom = isset($config['DAS_RED_FROM']) ? (int) $config['DAS_RED_FROM'] : 0; + /*$this->redFrom = isset($config['DAS_RED_FROM']) ? (int) $config['DAS_RED_FROM'] : 0; $this->redTo = isset($config['DAS_RED_TO']) ? (int) $config['DAS_RED_TO'] : 30; $this->yellowFrom = isset($config['DAS_YELLOW_FROM']) ? (int) $config['DAS_YELLOW_FROM'] : 30; $this->yellowTo = isset($config['DAS_YELLOW_TO']) ? (int) $config['DAS_YELLOW_TO'] : 50; @@ -195,12 +195,12 @@ class dashletProcessMakerCommunity implements DashletInterface { case 'THIS_YEAR' : $this->centerLabel = 'This year'; break; case 'PREVIOUS_YEAR' : $this->centerLabel = 'Previous year'; break; default : $this->centerLabel = '';break; - } + }*/ return true; } public function render ($width = 300) { - G::LoadClass('pmGauge'); + /*G::LoadClass('pmGauge'); $g = new pmGauge(); $g->w = $width; $g->value = $this->value; @@ -215,7 +215,7 @@ class dashletProcessMakerCommunity implements DashletInterface { $g->centerLabel = $this->centerLabel; $g->open = $this->open; $g->completed = $this->completed; - $g->render(); + $g->render();*/ } } \ No newline at end of file diff --git a/workflow/engine/templates/dashboard/dashletInstanceForm.js b/workflow/engine/templates/dashboard/dashletInstanceForm.js index dc15fb2db..9a4746da5 100644 --- a/workflow/engine/templates/dashboard/dashletInstanceForm.js +++ b/workflow/engine/templates/dashboard/dashletInstanceForm.js @@ -43,6 +43,14 @@ Ext.onReady(function() { cboDasInsOwnerUID.setValue(store.getAt(0).get(cboDasInsOwnerUID.valueField)); } } + if (cboDasInsOwnerType.getValue() == 'EVERYBODY') { + cboDasInsOwnerUID.hide(); + cboDasInsOwnerUID.container.up('div.x-form-item').setStyle('display', 'none'); + } + else { + cboDasInsOwnerUID.show(); + cboDasInsOwnerUID.container.up('div.x-form-item').setStyle('display', 'block'); + } } } }); @@ -124,7 +132,7 @@ Ext.onReady(function() { store: storeDasInsOwnerUID, triggerAction: 'all', mode: 'local', - allowBlank: false, + allowBlank: true, valueField: 'OWNER_UID', displayField: 'OWNER_NAME' }); @@ -134,13 +142,16 @@ Ext.onReady(function() { id: 'general', title: 'General', items: [hiddenDasInsUID, cboDasUID, cboDasInsOwnerType, cboDasInsOwnerUID] - }), - new Ext.form.FieldSet({ + }) + ]; + + if (additionaFields.length > 0) { + formFields.concat(new Ext.form.FieldSet({ id: 'additional', title: 'Other', items: additionaFields - }) - ]; + })); + } // Form dashletInstanceFrm = new Ext.form.FormPanel({ diff --git a/workflow/engine/templates/dashboard/dashletsList.js b/workflow/engine/templates/dashboard/dashletsList.js index 463da74ca..22b03a8db 100644 --- a/workflow/engine/templates/dashboard/dashletsList.js +++ b/workflow/engine/templates/dashboard/dashletsList.js @@ -169,7 +169,6 @@ Ext.onReady(function(){ {id:'DAS_INS_UID', dataIndex: 'DAS_INS_UID', hidden:true, hideable:false}, {header: _('ID_NAME'), dataIndex: 'DAS_TITLE', width: 200, hidden:false, align:'left'}, {header: _('ID_VERSION'), dataIndex: 'DAS_VERSION', width: 60, hidden: false, align: 'center'}, - {header: _('ID_TYPE'), dataIndex: 'DAS_INS_TYPE', width: 100, hidden: false, align: 'center'}, {header: 'Assigned To', dataIndex: 'DAS_INS_OWNER_TITLE', width: 200, hidden: false, align: 'center'}, {header: _('ID_UPDATE_DATE'), dataIndex: 'DAS_INS_UPDATE_DATE', width: 80, hidden: false, align: 'center'}, {header: _('ID_STATUS'), dataIndex: 'DAS_INS_STATUS_LABEL', width: 60, hidden: false, align: 'center'}