Change field required and label dashboard

This commit is contained in:
Marco Antonio Nina Mena
2015-04-27 15:32:55 -04:00
parent c540789fbb
commit fb01724ae0
2 changed files with 18 additions and 17 deletions

View File

@@ -76,6 +76,8 @@ Ext.onReady(function() {
statusButton = new Ext.Action({
text: _('ID_STATUS'),
icon : '',
id : 'activator',
iconCls: 'silk-add',
handler: statusDashboard,
disabled: true
@@ -105,19 +107,19 @@ Ext.onReady(function() {
}
}
var activator = Ext.getCmp('activator');
if( record.data.DAS_STATUS == 1 ){
statusButton.setIconClass('icon-activate');
statusButton.setText( _('ID_DEACTIVATE') );
activator.setIcon('/images/deactivate.png');
activator.setText( _('ID_DEACTIVATE') );
editButton.enable();
deleteButton.enable();
//statusButton.enable();
} else {
statusButton.setIconClass('icon-deactivate');
statusButton.setText( _('ID_ACTIVATE') );
activator.setIcon('/images/activate.png');
activator.setText( _('ID_ACTIVATE') );
editButton.disable();
deleteButton.disable();
//statusButton.disable();
}
}
},
rowdeselect: function(sm, index, record){
editButton.disable();
@@ -237,7 +239,7 @@ Ext.onReady(function() {
viewConfig: {
forceFit:true
},
title : _('ID_DASHBOARD'),
title : _('ID_STRATEGIC_DASHBOARD'),
store: store,
cm: cmodel,
sm: smodel,

View File

@@ -41,7 +41,6 @@ var frmDashboard;
var addTabButton;
var tabPanel;
var dashboardIndicatorFields;
var dashboardIndicatorPanel;
var store;
var indexTab = 0;
@@ -49,7 +48,7 @@ var comboPageSize = 10;
var resultTpl;
var storeIndicatorType;
var storeGraphic;
var storeFrecuency;
var storeFrequency;
var storeProject;
var storeGroup;
var storeUsers;
@@ -79,7 +78,7 @@ Ext.onReady( function() {
items : [
{
id : 'DAS_TITLE',
fieldLabel : _('ID_DASHBOARD_TITLE')+ ' *',
fieldLabel : '<span style=\"color:red;\" ext:qtip="'+ _('ID_FIELD_REQUIRED', _('ID_DASHBOARD_TITLE')) +'"> * </span>' + _('ID_DASHBOARD_TITLE'),
xtype : 'textfield',
anchor : '85%',
maxLength : 250,
@@ -297,7 +296,7 @@ Ext.onReady( function() {
}
});
storeFrecuency = new Ext.data.GroupingStore( {
storeFrequency = new Ext.data.GroupingStore( {
proxy : new Ext.data.HttpProxy({
api: {
read : urlProxy + 'catalog/periodicity'
@@ -754,7 +753,7 @@ var addTab = function (flag) {
hidden : true
},
{
fieldLabel : _('ID_INDICATOR_TITLE')+ ' *',
fieldLabel : '<span style=\"color:red;\" ext:qtip="'+ _('ID_FIELD_REQUIRED', _('ID_INDICATOR_TITLE')) +'"> * </span>' + _('ID_INDICATOR_TITLE'),
id : 'IND_TITLE_'+ indexTab,
xtype : 'textfield',
anchor : '85%',
@@ -768,7 +767,7 @@ var addTab = function (flag) {
anchor : '85%',
editable : false,
id : 'IND_TYPE_'+ indexTab,
fieldLabel : _('ID_INDICATOR_TYPE')+ ' *',
fieldLabel : '<span style=\"color:red;\" ext:qtip="'+ _('ID_FIELD_REQUIRED', _('ID_INDICATOR_TYPE')) +'"> * </span>' + _('ID_INDICATOR_TYPE'),
displayField : 'CAT_LABEL_ID',
valueField : 'CAT_UID',
forceSelection : false,
@@ -880,7 +879,7 @@ var addTab = function (flag) {
new Ext.form.ComboBox({
anchor : '85%',
editable : false,
fieldLabel : _('ID_PROCESS')+ ' *',
fieldLabel : '<span style=\"color:red;\" ext:qtip="'+ _('ID_FIELD_REQUIRED', _('ID_PROCESS')) +'"> * </span>' + _('ID_PROCESS'),
id : 'IND_PROCESS_'+ indexTab,
displayField : 'prj_name',
valueField : 'prj_uid',
@@ -923,7 +922,7 @@ var addTab = function (flag) {
typeAhead : true,
autocomplete : true,
triggerAction : 'all',
store : storeFrecuency
store : storeFrequency
}),
new Ext.form.ComboBox({
anchor : '85%',
@@ -955,7 +954,7 @@ var addTab = function (flag) {
typeAhead : true,
autocomplete : true,
triggerAction : 'all',
store : storeFrecuency
store : storeFrequency
})
]
})