From 1fa14e297f60db4c1a87a4e893c932176293b236 Mon Sep 17 00:00:00 2001 From: Julio Cesar Laura Date: Mon, 31 Oct 2011 23:26:42 -0400 Subject: [PATCH] Progress 19 for the dashboards --- .../skinEngine/base/css/pmos-xtheme-gray.css | 38 +++-- .../dashboard/dashletInstanceForm.js | 147 +++++++++--------- .../templates/dashboard/dashletsList.js | 3 +- .../public_html/images/icon-dashboard.png | Bin 0 -> 1103 bytes 4 files changed, 96 insertions(+), 92 deletions(-) create mode 100644 workflow/public_html/images/icon-dashboard.png diff --git a/workflow/engine/skinEngine/base/css/pmos-xtheme-gray.css b/workflow/engine/skinEngine/base/css/pmos-xtheme-gray.css index a037855e0..fa786e822 100755 --- a/workflow/engine/skinEngine/base/css/pmos-xtheme-gray.css +++ b/workflow/engine/skinEngine/base/css/pmos-xtheme-gray.css @@ -64,8 +64,8 @@ .x-locationbar .x-btn-menu-active .x-btn-menu-arrow-wrap .x-btn-center button { background-position: 0pt -97px; } -.x-locationbar .x-btn-click .x-btn-center, -.x-locationbar .x-btn-pressed .x-btn-center, +.x-locationbar .x-btn-click .x-btn-center, +.x-locationbar .x-btn-pressed .x-btn-center, .x-locationbar .x-btn-menu-active .x-btn-center { background:transparent url(/images/ext/gray/locationbar/tb-btn-sprite.gif) repeat-x scroll 0pt -105px; } @@ -286,7 +286,7 @@ button.x-btn-text:focus,.x-combo-selected{ background-image:url(/images/edit.gif) !important; } - + /** * style for case list grid @@ -298,7 +298,7 @@ button.x-btn-text:focus,.x-combo-selected{ } .x-grid3-col-openLink a { - color: black; + color: black; border-color:#ff0; } @@ -611,14 +611,14 @@ antes funcionaba. .toolbar-item{ display: table-cell; - background-color:#fff; + background-color:#fff; width : 50px !important; height: 25px !important; - + border: 1px; border-style: solid; border-color: #ccc; - + font-size: 12px; padding: 1px 1px 1px 1px; @@ -772,6 +772,12 @@ antes funcionaba. background-position:0 -8929px !important; } +.ICON_DASHBOARD{ + background-image: url(/images/icon-dashboard.png) !important; + width:15px !important; + height:15px !important; +} + /* Language Support module styles*/ .upload-icon { @@ -823,13 +829,13 @@ antes funcionaba. background-position:0 -8929px !important; } .x-grid-empty{ - text-align: center; - position: absolute; - top: 40%; - left: 40%; - font-size: 15px; - color:black filter:progid:DXImageTransform.Microsoft.Alpha(opacity=80); - opacity: .55; + text-align: center; + position: absolute; + top: 40%; + left: 40%; + font-size: 15px; + color:black filter:progid:DXImageTransform.Microsoft.Alpha(opacity=80); + opacity: .55; -moz-opacity: .55; } @@ -838,7 +844,7 @@ antes funcionaba. * --Row Editor UX Lib CSS-- */ .ext-ie .x-row-editor .x-form-text { - margin:0 !important; + margin:0 !important; } .x-row-editor-header { height:2px; @@ -1062,7 +1068,7 @@ antes funcionaba. .x-toolbar1 .x-btn-tr { background-position: -3px 0; } .x-toolbar1 .x-btn-tc { background-position: 0 -6px; } .x-toolbar1 .x-btn-ml { background-position: 0 -24px; } -.x-toolbar1 .x-btn-mr { background-position: -3px -24px; } +.x-toolbar1 .x-btn-mr { background-position: -3px -24px; } .x-toolbar1 .x-btn-mc { background-position: 0 -1096px; } .x-toolbar1 .x-btn-bl { background-position: 0 -3px; } .x-toolbar1 .x-btn-br { background-position: -3px -3px; } diff --git a/workflow/engine/templates/dashboard/dashletInstanceForm.js b/workflow/engine/templates/dashboard/dashletInstanceForm.js index 631ceab5f..c95eb0b21 100644 --- a/workflow/engine/templates/dashboard/dashletInstanceForm.js +++ b/workflow/engine/templates/dashboard/dashletInstanceForm.js @@ -3,13 +3,11 @@ Ext.namespace("dashletInstance"); dashletInstance.form = { init: function () { var URL_DASHLET_INSTANCE = "dashletInstance"; - + dashletInstanceSaveProcessAjax = function () { var myMask = new Ext.LoadMask(Ext.getBody(), {msg: "Saving. Please wait..."}); myMask.show(); - - Ext.MessageBox.alert("", hiddenDasInsUID.getValue()+"------"); - + Ext.Ajax.request({ url: "saveDashletInstance", method: "POST", @@ -25,12 +23,12 @@ dashletInstance.form = { //"DAS_INS_PROCESSES": cboProcess.getValue(), //"DAS_INS_TASKS": cboTask.getValue() }, - + success:function (result, request) { myMask.hide(); - + var dataResponse = Ext.util.JSON.decode(result.responseText) - + switch (dataResponse.status) { case "OK": //Ext.MessageBox.alert("Message", "Dashboard Instance registered correctly"); window.location.href = "dashletsList"; @@ -45,7 +43,7 @@ dashletInstance.form = { } }); } - + dashletInstanceFrmLoad = function () { if (dashletInstance.DAS_INS_UID) { hiddenDasInsUID.setValue(dashletInstance.DAS_INS_UID) @@ -53,20 +51,20 @@ dashletInstance.form = { cboDasInsType.setValue(dashletInstance.DAS_INS_TYPE); cboDasInsContextTime.setValue(dashletInstance.DAS_INS_CONTEXT_TIME); cboDasInsOwnerType.setValue(dashletInstance.DAS_INS_OWNER_TYPE); - + //cboDasInsOwnerUID.setValue(dashletInstance.DAS_INS_OWNER_UID); } } - + //------------------------------------------------------------------------------------------------------------------ var storeDasUID = new Ext.data.Store({ proxy: new Ext.data.HttpProxy({ url: URL_DASHLET_INSTANCE, method: "POST" }), - + baseParams: {"option": "DASHLST"}, - + reader: new Ext.data.JsonReader({ totalProperty: "resultTotal", root: "resultRoot", @@ -74,28 +72,27 @@ dashletInstance.form = { {name: "DAS_TITLE", type: "string"} ] }), - + autoLoad: true, //First call - + listeners: { load: function (store, record, option) { cboDasUID.setValue(store.getAt(0).get(cboDasUID.valueField)); } } }); - + var storeDasInsType = new Ext.data.ArrayStore({ idIndex: 0, //definimos la posicion del ID de cada registro fields: ["id", "value"], data: [["OPEN_CASES", "Open Cases"] ] }); - + var storeDasInsContextTime = new Ext.data.ArrayStore({ idIndex: 0, fields: ["id", "value"], data: [//["RANGE", "Date Ranges"], - ["MONTH", "Month"], ["TODAY", "Today"], ["YESTERDAY", "Yesterday"], ["THIS_WEEK", "This Week"], @@ -108,7 +105,7 @@ dashletInstance.form = { ["PREVIOUS_YEAR", "Previous Year"] ] }); - + var storeDasInsOwnerType = new Ext.data.ArrayStore({ idIndex: 0, fields: ["id", "value"], @@ -116,13 +113,13 @@ dashletInstance.form = { ["DEPARTMENT", "Department"] ] }); - + var storeDasInsOwnerUID = new Ext.data.Store({ proxy: new Ext.data.HttpProxy({ url: URL_DASHLET_INSTANCE, method: "POST" }), - + reader: new Ext.data.JsonReader({ totalProperty: "resultTotal", root: "resultRoot", @@ -130,27 +127,27 @@ dashletInstance.form = { {name: "TABLE_NAME", type: "string"} ] }), - + autoLoad: true, //First call - + listeners: { beforeload: function (store) { storeDasInsOwnerUID.baseParams = {"option": "OWNERTYPE", "type": cboDasInsOwnerType.getValue() }; }, - + load: function (store, record, option) { if (dashletInstance.DAS_INS_UID) { cboDasInsOwnerUID.setValue(dashletInstance.DAS_INS_OWNER_UID); } else { - cboDasInsOwnerUID.setValue(store.getAt(0).get(cboDasInsOwnerUID.valueField)); + cboDasInsOwnerUID.setValue(store.getAt(0).get(cboDasInsOwnerUID.valueField)); } } } }); - + var storeProcess = new Ext.data.ArrayStore({ idIndex: 0, fields: ["id", "value"], @@ -159,7 +156,7 @@ dashletInstance.form = { //["SEL", "Selection"] ] }); - + var storeTask = new Ext.data.ArrayStore({ idIndex: 0, fields: ["id", "value"], @@ -168,102 +165,102 @@ dashletInstance.form = { //["SEL", "Selection"] ] }); - + //------------------------------------------------------------------------------------------------------------------ var hiddenDasInsUID = new Ext.form.Hidden({ id: "hiddenDasInsUID", name: "DAS_INS_UID" }); - + var cboDasUID = new Ext.form.ComboBox({ id: "cboDasUID", name: "DAS_UID", - + valueField: "DAS_UID", displayField: "DAS_TITLE", store: storeDasUID, - + triggerAction: "all", mode: "local", editable: false, - + width: 200, fieldLabel: "Dashboard" }); - + var cboDasInsType = new Ext.form.ComboBox({ id: "cboDasInsType", name: "DAS_INS_TYPE", - + valueField: "id", displayField: "value", value: "OPEN_CASES", store: storeDasInsType, - + triggerAction: "all", mode: "local", editable: false, - + width: 200, fieldLabel: "Type" }); - - + + var cboDasInsContextTime = new Ext.form.ComboBox({ id: "cboDasInsContextTime", name: "DAS_INS_CONTEXT_TIME", - + valueField: "id", displayField: "value", - value: "MONTH", + value: "TODAY", store: storeDasInsContextTime, - + triggerAction: "all", mode: "local", editable: false, - + width: 200, fieldLabel: "Period" }); - + var txtDasInsStartDate = new Ext.form.DateField({ id: "txtDasInsStartDate", name: "DAS_INS_START_DATE", - + value: new Date(2011, 0, 1), //january=0, february=1, etc width: 100, format: "Y/m/d", editable: false, fieldLabel: "Start Date" }); - + var txtDasInsEndDate = new Ext.form.DateField({ id: "txtDasInsEndDate", name: "DAS_INS_END_DATE", - + value: new Date(2011, 0, 1), width: 100, format: "Y/m/d", editable: false, fieldLabel: "Finish Date" }); - + var cboDasInsOwnerType = new Ext.form.ComboBox({ id: "cboDasInsOwnerType", name: "DAS_INS_OWNER_TYPE", - + valueField: "id", displayField: "value", value: "DEPARTMENT", store: storeDasInsOwnerType, - + triggerAction: "all", mode: "local", editable: false, - + width: 200, fieldLabel: "Owner Type", - + listeners: { select: function (combo, record, index) { storeDasInsOwnerUID.baseParams = {"option": "OWNERTYPE", @@ -273,61 +270,61 @@ dashletInstance.form = { } } }); - + var cboDasInsOwnerUID = new Ext.form.ComboBox({ id: "cboDasInsOwnerUID", name: "DAS_INS_OWNER_UID", - + valueField: "TABLE_UID", displayField: "TABLE_NAME", store: storeDasInsOwnerUID, - + triggerAction: "all", mode: "local", editable: false, - + width: 200, fieldLabel: "Assign To" }); - + var cboProcess = new Ext.form.ComboBox({ id: "cboProcess", name: "DAS_INS_PROCESSES", - + valueField: "id", displayField: "value", value: "ALL", store: storeProcess, - + triggerAction: "all", mode: "local", editable: false, - + width: 200, fieldLabel: "Process" }); - + var cboTask = new Ext.form.ComboBox({ id: "cboTask", name: "DAS_INS_TASKS", - + valueField: "id", displayField: "value", value: "ALL", store: storeTask, - + triggerAction: "all", mode: "local", editable: false, - + width: 200, fieldLabel: "Task" }); - + //------------------------------------------------------------------------------------------------------------------ var dashletInstanceFrm = new Ext.form.FormPanel({ id: "dashletInstanceFrm", - + style: "margin: 0 auto 0 auto;", //labelAlign: "top", labelWidth: 115, //The width of labels in pixels @@ -336,9 +333,9 @@ dashletInstance.form = { //cls: "class1", width: 400, //height: 400, - + title: "New Dashboard Instance", - + items: [hiddenDasInsUID, cboDasUID, cboDasInsType, @@ -351,18 +348,18 @@ dashletInstance.form = { //cboProcess, //cboTask ], - + buttonAlign: "right", buttons: [new Ext.Action({ id: "btnSubmit", - + text: "Save", //scope: this, handler: function () { dashletInstanceSaveProcessAjax(); } }), - + //{xtype: "button", // id: "btnReset", // text: "Reset", @@ -372,7 +369,7 @@ dashletInstance.form = { // //cboProcess.store.load(); // } //}, - + {xtype: "button", id: "btnCancel", text: "Cancel", @@ -382,23 +379,23 @@ dashletInstance.form = { } ] }); - + //------------------------------------------------------------------------------------------------------------------ dashletInstanceFrmLoad(); - + //------------------------------------------------------------------------------------------------------------------ var pnlMain = new Ext.Panel({ id: "pnlMain", - + region: "center", margins: {top:3, right:3, bottom:3, left:0}, //bodyStyle: "padding:0.5em;", //propiedades ... //no aceptaba para la derecha bodyStyle: "padding: 25px 25px 25px 25px;", //propiedades ... border: false, - + items: [dashletInstanceFrm] }); - + //------------------------------------------------------------------------------------------------------------------ //LOAD ALL PANELS var viewport = new Ext.Viewport({ diff --git a/workflow/engine/templates/dashboard/dashletsList.js b/workflow/engine/templates/dashboard/dashletsList.js index 1d1e28fd9..115a94643 100644 --- a/workflow/engine/templates/dashboard/dashletsList.js +++ b/workflow/engine/templates/dashboard/dashletsList.js @@ -174,7 +174,8 @@ Ext.onReady(function(){ {header: _('ID_TYPE'), dataIndex: 'DAS_INS_TYPE', width: 100, hidden: false, align: 'center'}, //{header: _('ID_PERIOD'), dataIndex: 'DAS_INS_CONTEXT_TIME', width: 100, hidden: false, align: 'center'}, {header: 'Period', dataIndex: 'DAS_INS_CONTEXT_TIME', width: 100, hidden: false, align: 'center'}, - {header: _('ID_OWNER'), dataIndex: 'DAS_INS_OWNER_TITLE', width: 200, hidden: false, align: 'center'}, + //{header: _('ID_OWNER'), dataIndex: 'DAS_INS_OWNER_TITLE', width: 200, 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'} ] diff --git a/workflow/public_html/images/icon-dashboard.png b/workflow/public_html/images/icon-dashboard.png new file mode 100644 index 0000000000000000000000000000000000000000..2394b33aa0a4c6469b1e5b382ba265b16018c761 GIT binary patch literal 1103 zcmV-V1hD&wP)4u*Y00009a7bBm000Aa z000Aa0e#hi%m4rY1ZP1_K>z@;j(q!3lK=n!AY({UO#lFTB>(_`g8%^e{{R4h=>PzA zFaQARU;qF*m;eA5Z<1fdMgRZ<#Ysd#RCwBA{Qv(y10y3N0}S+Cs^|In=U35>U%xzl z{Q7S8- z6q#8#7=APUWf0>OWw`z18pFD)%cn~-&ba*R_n*>Vzy2o9O;37|wmU#c=4uafT1SKQgFr$}_xt@tEQ3*Y7pl|DB7~ z#5jb+1vwa0C3zUWfB&_}wfv|M%!>d41UBf~&+kRX0`@$2zCU5O_U$Iaw?97^M45#c zcz&=lY`C=Mf;98wlRv)yPE(QPX1MX}2ZInFJA_2(x89}^FQ9-juosar=GzJLCa`}-%$L<1#W=3l@6F+6$ui{aLbp9~Vh+zday z|L}$x1Q0+hV1vH@(E7>vhk=QKk->mRhe3f|n&HvCI}B&LG^JS?e*XBb2r~#EfWQWQ{r>H{IEM(E4X+8q%V&=nrl0G5_w(zo ziS_S&r``N`mSq>W`khzrf9SFRE&BHLAH)BD{}_J$Vqy68{RcD5Abt$4+fT5IfaWn6>+&+(xc`#j($z~}{{H?o5oQoT0D)ue|Cg^UK%1j}nj5qIQdMO5 ze)9&yzpvjJ{(bq%@E1t`{PB(9JJ3Zc(i{voZarnVdhQy-pPxSxpC2fD4KoNJfWQW^ zO`HDu-{-H1j3>`BFkHRCz$zih@bCLKhQB~3{Qdp|6sQcJzW!!7a_ADn;X{Y+KYQ`O z^TnZxH4I1qAb?Qv+9zuV*Z)6$%>1RSp!i2zgn{Y6afbh|-soAFR4)As4B0<_e(m`C z=U4Zu!_{BVGc7;>F{0=GcN%&;e}Dce{SVCj|9<^8`~T;Up5*)Iml<#Xm_Yym1^@}T V;+t02t{(sZ002ovPDHLkV1hIKH0l5V literal 0 HcmV?d00001