Progress 19 for the dashboards

This commit is contained in:
Julio Cesar Laura
2011-10-31 23:26:42 -04:00
parent 5db373fd61
commit 1fa14e297f
4 changed files with 96 additions and 92 deletions

View File

@@ -64,8 +64,8 @@
.x-locationbar .x-btn-menu-active .x-btn-menu-arrow-wrap .x-btn-center button { .x-locationbar .x-btn-menu-active .x-btn-menu-arrow-wrap .x-btn-center button {
background-position: 0pt -97px; background-position: 0pt -97px;
} }
.x-locationbar .x-btn-click .x-btn-center, .x-locationbar .x-btn-click .x-btn-center,
.x-locationbar .x-btn-pressed .x-btn-center, .x-locationbar .x-btn-pressed .x-btn-center,
.x-locationbar .x-btn-menu-active .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; 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; background-image:url(/images/edit.gif) !important;
} }
/** /**
* style for case list grid * style for case list grid
@@ -298,7 +298,7 @@ button.x-btn-text:focus,.x-combo-selected{
} }
.x-grid3-col-openLink a { .x-grid3-col-openLink a {
color: black; color: black;
border-color:#ff0; border-color:#ff0;
} }
@@ -611,14 +611,14 @@ antes funcionaba.
.toolbar-item{ .toolbar-item{
display: table-cell; display: table-cell;
background-color:#fff; background-color:#fff;
width : 50px !important; width : 50px !important;
height: 25px !important; height: 25px !important;
border: 1px; border: 1px;
border-style: solid; border-style: solid;
border-color: #ccc; border-color: #ccc;
font-size: 12px; font-size: 12px;
padding: 1px 1px 1px 1px; padding: 1px 1px 1px 1px;
@@ -772,6 +772,12 @@ antes funcionaba.
background-position:0 -8929px !important; 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*/ /* Language Support module styles*/
.upload-icon { .upload-icon {
@@ -823,13 +829,13 @@ antes funcionaba.
background-position:0 -8929px !important; background-position:0 -8929px !important;
} }
.x-grid-empty{ .x-grid-empty{
text-align: center; text-align: center;
position: absolute; position: absolute;
top: 40%; top: 40%;
left: 40%; left: 40%;
font-size: 15px; font-size: 15px;
color:black filter:progid:DXImageTransform.Microsoft.Alpha(opacity=80); color:black filter:progid:DXImageTransform.Microsoft.Alpha(opacity=80);
opacity: .55; opacity: .55;
-moz-opacity: .55; -moz-opacity: .55;
} }
@@ -838,7 +844,7 @@ antes funcionaba.
* --Row Editor UX Lib CSS-- * --Row Editor UX Lib CSS--
*/ */
.ext-ie .x-row-editor .x-form-text { .ext-ie .x-row-editor .x-form-text {
margin:0 !important; margin:0 !important;
} }
.x-row-editor-header { .x-row-editor-header {
height:2px; height:2px;
@@ -1062,7 +1068,7 @@ antes funcionaba.
.x-toolbar1 .x-btn-tr { background-position: -3px 0; } .x-toolbar1 .x-btn-tr { background-position: -3px 0; }
.x-toolbar1 .x-btn-tc { background-position: 0 -6px; } .x-toolbar1 .x-btn-tc { background-position: 0 -6px; }
.x-toolbar1 .x-btn-ml { background-position: 0 -24px; } .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-mc { background-position: 0 -1096px; }
.x-toolbar1 .x-btn-bl { background-position: 0 -3px; } .x-toolbar1 .x-btn-bl { background-position: 0 -3px; }
.x-toolbar1 .x-btn-br { background-position: -3px -3px; } .x-toolbar1 .x-btn-br { background-position: -3px -3px; }

View File

@@ -3,13 +3,11 @@ Ext.namespace("dashletInstance");
dashletInstance.form = { dashletInstance.form = {
init: function () { init: function () {
var URL_DASHLET_INSTANCE = "dashletInstance"; var URL_DASHLET_INSTANCE = "dashletInstance";
dashletInstanceSaveProcessAjax = function () { dashletInstanceSaveProcessAjax = function () {
var myMask = new Ext.LoadMask(Ext.getBody(), {msg: "Saving. Please wait..."}); var myMask = new Ext.LoadMask(Ext.getBody(), {msg: "Saving. Please wait..."});
myMask.show(); myMask.show();
Ext.MessageBox.alert("", hiddenDasInsUID.getValue()+"------");
Ext.Ajax.request({ Ext.Ajax.request({
url: "saveDashletInstance", url: "saveDashletInstance",
method: "POST", method: "POST",
@@ -25,12 +23,12 @@ dashletInstance.form = {
//"DAS_INS_PROCESSES": cboProcess.getValue(), //"DAS_INS_PROCESSES": cboProcess.getValue(),
//"DAS_INS_TASKS": cboTask.getValue() //"DAS_INS_TASKS": cboTask.getValue()
}, },
success:function (result, request) { success:function (result, request) {
myMask.hide(); myMask.hide();
var dataResponse = Ext.util.JSON.decode(result.responseText) var dataResponse = Ext.util.JSON.decode(result.responseText)
switch (dataResponse.status) { switch (dataResponse.status) {
case "OK": //Ext.MessageBox.alert("Message", "Dashboard Instance registered correctly"); case "OK": //Ext.MessageBox.alert("Message", "Dashboard Instance registered correctly");
window.location.href = "dashletsList"; window.location.href = "dashletsList";
@@ -45,7 +43,7 @@ dashletInstance.form = {
} }
}); });
} }
dashletInstanceFrmLoad = function () { dashletInstanceFrmLoad = function () {
if (dashletInstance.DAS_INS_UID) { if (dashletInstance.DAS_INS_UID) {
hiddenDasInsUID.setValue(dashletInstance.DAS_INS_UID) hiddenDasInsUID.setValue(dashletInstance.DAS_INS_UID)
@@ -53,20 +51,20 @@ dashletInstance.form = {
cboDasInsType.setValue(dashletInstance.DAS_INS_TYPE); cboDasInsType.setValue(dashletInstance.DAS_INS_TYPE);
cboDasInsContextTime.setValue(dashletInstance.DAS_INS_CONTEXT_TIME); cboDasInsContextTime.setValue(dashletInstance.DAS_INS_CONTEXT_TIME);
cboDasInsOwnerType.setValue(dashletInstance.DAS_INS_OWNER_TYPE); cboDasInsOwnerType.setValue(dashletInstance.DAS_INS_OWNER_TYPE);
//cboDasInsOwnerUID.setValue(dashletInstance.DAS_INS_OWNER_UID); //cboDasInsOwnerUID.setValue(dashletInstance.DAS_INS_OWNER_UID);
} }
} }
//------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------
var storeDasUID = new Ext.data.Store({ var storeDasUID = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({ proxy: new Ext.data.HttpProxy({
url: URL_DASHLET_INSTANCE, url: URL_DASHLET_INSTANCE,
method: "POST" method: "POST"
}), }),
baseParams: {"option": "DASHLST"}, baseParams: {"option": "DASHLST"},
reader: new Ext.data.JsonReader({ reader: new Ext.data.JsonReader({
totalProperty: "resultTotal", totalProperty: "resultTotal",
root: "resultRoot", root: "resultRoot",
@@ -74,28 +72,27 @@ dashletInstance.form = {
{name: "DAS_TITLE", type: "string"} {name: "DAS_TITLE", type: "string"}
] ]
}), }),
autoLoad: true, //First call autoLoad: true, //First call
listeners: { listeners: {
load: function (store, record, option) { load: function (store, record, option) {
cboDasUID.setValue(store.getAt(0).get(cboDasUID.valueField)); cboDasUID.setValue(store.getAt(0).get(cboDasUID.valueField));
} }
} }
}); });
var storeDasInsType = new Ext.data.ArrayStore({ var storeDasInsType = new Ext.data.ArrayStore({
idIndex: 0, //definimos la posicion del ID de cada registro idIndex: 0, //definimos la posicion del ID de cada registro
fields: ["id", "value"], fields: ["id", "value"],
data: [["OPEN_CASES", "Open Cases"] data: [["OPEN_CASES", "Open Cases"]
] ]
}); });
var storeDasInsContextTime = new Ext.data.ArrayStore({ var storeDasInsContextTime = new Ext.data.ArrayStore({
idIndex: 0, idIndex: 0,
fields: ["id", "value"], fields: ["id", "value"],
data: [//["RANGE", "Date Ranges"], data: [//["RANGE", "Date Ranges"],
["MONTH", "Month"],
["TODAY", "Today"], ["TODAY", "Today"],
["YESTERDAY", "Yesterday"], ["YESTERDAY", "Yesterday"],
["THIS_WEEK", "This Week"], ["THIS_WEEK", "This Week"],
@@ -108,7 +105,7 @@ dashletInstance.form = {
["PREVIOUS_YEAR", "Previous Year"] ["PREVIOUS_YEAR", "Previous Year"]
] ]
}); });
var storeDasInsOwnerType = new Ext.data.ArrayStore({ var storeDasInsOwnerType = new Ext.data.ArrayStore({
idIndex: 0, idIndex: 0,
fields: ["id", "value"], fields: ["id", "value"],
@@ -116,13 +113,13 @@ dashletInstance.form = {
["DEPARTMENT", "Department"] ["DEPARTMENT", "Department"]
] ]
}); });
var storeDasInsOwnerUID = new Ext.data.Store({ var storeDasInsOwnerUID = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({ proxy: new Ext.data.HttpProxy({
url: URL_DASHLET_INSTANCE, url: URL_DASHLET_INSTANCE,
method: "POST" method: "POST"
}), }),
reader: new Ext.data.JsonReader({ reader: new Ext.data.JsonReader({
totalProperty: "resultTotal", totalProperty: "resultTotal",
root: "resultRoot", root: "resultRoot",
@@ -130,27 +127,27 @@ dashletInstance.form = {
{name: "TABLE_NAME", type: "string"} {name: "TABLE_NAME", type: "string"}
] ]
}), }),
autoLoad: true, //First call autoLoad: true, //First call
listeners: { listeners: {
beforeload: function (store) { beforeload: function (store) {
storeDasInsOwnerUID.baseParams = {"option": "OWNERTYPE", storeDasInsOwnerUID.baseParams = {"option": "OWNERTYPE",
"type": cboDasInsOwnerType.getValue() "type": cboDasInsOwnerType.getValue()
}; };
}, },
load: function (store, record, option) { load: function (store, record, option) {
if (dashletInstance.DAS_INS_UID) { if (dashletInstance.DAS_INS_UID) {
cboDasInsOwnerUID.setValue(dashletInstance.DAS_INS_OWNER_UID); cboDasInsOwnerUID.setValue(dashletInstance.DAS_INS_OWNER_UID);
} }
else { else {
cboDasInsOwnerUID.setValue(store.getAt(0).get(cboDasInsOwnerUID.valueField)); cboDasInsOwnerUID.setValue(store.getAt(0).get(cboDasInsOwnerUID.valueField));
} }
} }
} }
}); });
var storeProcess = new Ext.data.ArrayStore({ var storeProcess = new Ext.data.ArrayStore({
idIndex: 0, idIndex: 0,
fields: ["id", "value"], fields: ["id", "value"],
@@ -159,7 +156,7 @@ dashletInstance.form = {
//["SEL", "Selection"] //["SEL", "Selection"]
] ]
}); });
var storeTask = new Ext.data.ArrayStore({ var storeTask = new Ext.data.ArrayStore({
idIndex: 0, idIndex: 0,
fields: ["id", "value"], fields: ["id", "value"],
@@ -168,102 +165,102 @@ dashletInstance.form = {
//["SEL", "Selection"] //["SEL", "Selection"]
] ]
}); });
//------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------
var hiddenDasInsUID = new Ext.form.Hidden({ var hiddenDasInsUID = new Ext.form.Hidden({
id: "hiddenDasInsUID", id: "hiddenDasInsUID",
name: "DAS_INS_UID" name: "DAS_INS_UID"
}); });
var cboDasUID = new Ext.form.ComboBox({ var cboDasUID = new Ext.form.ComboBox({
id: "cboDasUID", id: "cboDasUID",
name: "DAS_UID", name: "DAS_UID",
valueField: "DAS_UID", valueField: "DAS_UID",
displayField: "DAS_TITLE", displayField: "DAS_TITLE",
store: storeDasUID, store: storeDasUID,
triggerAction: "all", triggerAction: "all",
mode: "local", mode: "local",
editable: false, editable: false,
width: 200, width: 200,
fieldLabel: "Dashboard" fieldLabel: "Dashboard"
}); });
var cboDasInsType = new Ext.form.ComboBox({ var cboDasInsType = new Ext.form.ComboBox({
id: "cboDasInsType", id: "cboDasInsType",
name: "DAS_INS_TYPE", name: "DAS_INS_TYPE",
valueField: "id", valueField: "id",
displayField: "value", displayField: "value",
value: "OPEN_CASES", value: "OPEN_CASES",
store: storeDasInsType, store: storeDasInsType,
triggerAction: "all", triggerAction: "all",
mode: "local", mode: "local",
editable: false, editable: false,
width: 200, width: 200,
fieldLabel: "Type" fieldLabel: "Type"
}); });
var cboDasInsContextTime = new Ext.form.ComboBox({ var cboDasInsContextTime = new Ext.form.ComboBox({
id: "cboDasInsContextTime", id: "cboDasInsContextTime",
name: "DAS_INS_CONTEXT_TIME", name: "DAS_INS_CONTEXT_TIME",
valueField: "id", valueField: "id",
displayField: "value", displayField: "value",
value: "MONTH", value: "TODAY",
store: storeDasInsContextTime, store: storeDasInsContextTime,
triggerAction: "all", triggerAction: "all",
mode: "local", mode: "local",
editable: false, editable: false,
width: 200, width: 200,
fieldLabel: "Period" fieldLabel: "Period"
}); });
var txtDasInsStartDate = new Ext.form.DateField({ var txtDasInsStartDate = new Ext.form.DateField({
id: "txtDasInsStartDate", id: "txtDasInsStartDate",
name: "DAS_INS_START_DATE", name: "DAS_INS_START_DATE",
value: new Date(2011, 0, 1), //january=0, february=1, etc value: new Date(2011, 0, 1), //january=0, february=1, etc
width: 100, width: 100,
format: "Y/m/d", format: "Y/m/d",
editable: false, editable: false,
fieldLabel: "Start Date" fieldLabel: "Start Date"
}); });
var txtDasInsEndDate = new Ext.form.DateField({ var txtDasInsEndDate = new Ext.form.DateField({
id: "txtDasInsEndDate", id: "txtDasInsEndDate",
name: "DAS_INS_END_DATE", name: "DAS_INS_END_DATE",
value: new Date(2011, 0, 1), value: new Date(2011, 0, 1),
width: 100, width: 100,
format: "Y/m/d", format: "Y/m/d",
editable: false, editable: false,
fieldLabel: "Finish Date" fieldLabel: "Finish Date"
}); });
var cboDasInsOwnerType = new Ext.form.ComboBox({ var cboDasInsOwnerType = new Ext.form.ComboBox({
id: "cboDasInsOwnerType", id: "cboDasInsOwnerType",
name: "DAS_INS_OWNER_TYPE", name: "DAS_INS_OWNER_TYPE",
valueField: "id", valueField: "id",
displayField: "value", displayField: "value",
value: "DEPARTMENT", value: "DEPARTMENT",
store: storeDasInsOwnerType, store: storeDasInsOwnerType,
triggerAction: "all", triggerAction: "all",
mode: "local", mode: "local",
editable: false, editable: false,
width: 200, width: 200,
fieldLabel: "Owner Type", fieldLabel: "Owner Type",
listeners: { listeners: {
select: function (combo, record, index) { select: function (combo, record, index) {
storeDasInsOwnerUID.baseParams = {"option": "OWNERTYPE", storeDasInsOwnerUID.baseParams = {"option": "OWNERTYPE",
@@ -273,61 +270,61 @@ dashletInstance.form = {
} }
} }
}); });
var cboDasInsOwnerUID = new Ext.form.ComboBox({ var cboDasInsOwnerUID = new Ext.form.ComboBox({
id: "cboDasInsOwnerUID", id: "cboDasInsOwnerUID",
name: "DAS_INS_OWNER_UID", name: "DAS_INS_OWNER_UID",
valueField: "TABLE_UID", valueField: "TABLE_UID",
displayField: "TABLE_NAME", displayField: "TABLE_NAME",
store: storeDasInsOwnerUID, store: storeDasInsOwnerUID,
triggerAction: "all", triggerAction: "all",
mode: "local", mode: "local",
editable: false, editable: false,
width: 200, width: 200,
fieldLabel: "Assign To" fieldLabel: "Assign To"
}); });
var cboProcess = new Ext.form.ComboBox({ var cboProcess = new Ext.form.ComboBox({
id: "cboProcess", id: "cboProcess",
name: "DAS_INS_PROCESSES", name: "DAS_INS_PROCESSES",
valueField: "id", valueField: "id",
displayField: "value", displayField: "value",
value: "ALL", value: "ALL",
store: storeProcess, store: storeProcess,
triggerAction: "all", triggerAction: "all",
mode: "local", mode: "local",
editable: false, editable: false,
width: 200, width: 200,
fieldLabel: "Process" fieldLabel: "Process"
}); });
var cboTask = new Ext.form.ComboBox({ var cboTask = new Ext.form.ComboBox({
id: "cboTask", id: "cboTask",
name: "DAS_INS_TASKS", name: "DAS_INS_TASKS",
valueField: "id", valueField: "id",
displayField: "value", displayField: "value",
value: "ALL", value: "ALL",
store: storeTask, store: storeTask,
triggerAction: "all", triggerAction: "all",
mode: "local", mode: "local",
editable: false, editable: false,
width: 200, width: 200,
fieldLabel: "Task" fieldLabel: "Task"
}); });
//------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------
var dashletInstanceFrm = new Ext.form.FormPanel({ var dashletInstanceFrm = new Ext.form.FormPanel({
id: "dashletInstanceFrm", id: "dashletInstanceFrm",
style: "margin: 0 auto 0 auto;", style: "margin: 0 auto 0 auto;",
//labelAlign: "top", //labelAlign: "top",
labelWidth: 115, //The width of labels in pixels labelWidth: 115, //The width of labels in pixels
@@ -336,9 +333,9 @@ dashletInstance.form = {
//cls: "class1", //cls: "class1",
width: 400, width: 400,
//height: 400, //height: 400,
title: "New Dashboard Instance", title: "New Dashboard Instance",
items: [hiddenDasInsUID, items: [hiddenDasInsUID,
cboDasUID, cboDasUID,
cboDasInsType, cboDasInsType,
@@ -351,18 +348,18 @@ dashletInstance.form = {
//cboProcess, //cboProcess,
//cboTask //cboTask
], ],
buttonAlign: "right", buttonAlign: "right",
buttons: [new Ext.Action({ buttons: [new Ext.Action({
id: "btnSubmit", id: "btnSubmit",
text: "Save", text: "Save",
//scope: this, //scope: this,
handler: function () { handler: function () {
dashletInstanceSaveProcessAjax(); dashletInstanceSaveProcessAjax();
} }
}), }),
//{xtype: "button", //{xtype: "button",
// id: "btnReset", // id: "btnReset",
// text: "Reset", // text: "Reset",
@@ -372,7 +369,7 @@ dashletInstance.form = {
// //cboProcess.store.load(); // //cboProcess.store.load();
// } // }
//}, //},
{xtype: "button", {xtype: "button",
id: "btnCancel", id: "btnCancel",
text: "Cancel", text: "Cancel",
@@ -382,23 +379,23 @@ dashletInstance.form = {
} }
] ]
}); });
//------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------
dashletInstanceFrmLoad(); dashletInstanceFrmLoad();
//------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------
var pnlMain = new Ext.Panel({ var pnlMain = new Ext.Panel({
id: "pnlMain", id: "pnlMain",
region: "center", region: "center",
margins: {top:3, right:3, bottom:3, left:0}, margins: {top:3, right:3, bottom:3, left:0},
//bodyStyle: "padding:0.5em;", //propiedades ... //no aceptaba para la derecha //bodyStyle: "padding:0.5em;", //propiedades ... //no aceptaba para la derecha
bodyStyle: "padding: 25px 25px 25px 25px;", //propiedades ... bodyStyle: "padding: 25px 25px 25px 25px;", //propiedades ...
border: false, border: false,
items: [dashletInstanceFrm] items: [dashletInstanceFrm]
}); });
//------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------
//LOAD ALL PANELS //LOAD ALL PANELS
var viewport = new Ext.Viewport({ var viewport = new Ext.Viewport({

View File

@@ -174,7 +174,8 @@ Ext.onReady(function(){
{header: _('ID_TYPE'), dataIndex: 'DAS_INS_TYPE', width: 100, hidden: false, align: 'center'}, {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: _('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: '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_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'} {header: _('ID_STATUS'), dataIndex: 'DAS_INS_STATUS_LABEL', width: 60, hidden: false, align: 'center'}
] ]

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB