Improvement formDashboards

This commit is contained in:
Marco Antonio Nina Mena
2015-03-30 17:57:16 -04:00
parent 87f728a947
commit a981a2842d

View File

@@ -106,7 +106,7 @@ Ext.onReady( function() {
disabled: true disabled: true
}); });
actionButtons = [deleteButton]; actionButtons = [deleteButton , '->'];
var owner = Ext.data.Record.create ([ var owner = Ext.data.Record.create ([
@@ -387,20 +387,21 @@ Ext.onReady( function() {
ownerInfoGrid = new Ext.grid.GridPanel({ ownerInfoGrid = new Ext.grid.GridPanel({
region : 'center', region : 'center',
layout : 'fit', //layout : 'fit',
id : 'ownerInfoGrid', id : 'ownerInfoGrid',
height : 200, height : 200,
autoWidth : true, //autoWidth : true,
//anchor : '80%', //anchor : '80%',
stateful : true, width : '100%',
//stateful : true,
stateId : 'gridDashboardList', stateId : 'gridDashboardList',
enableColumnResize : true, //enableColumnResize : true,
enableHdMenu: true, enableHdMenu: true,
frame : false, frame : false,
columnLines : false, columnLines : false,
viewConfig : { /*viewConfig : {
forceFit:true forceFit:true
}, },*/
store: store, store: store,
cm: cmodel, cm: cmodel,
sm: smodel, sm: smodel,
@@ -422,6 +423,7 @@ Ext.onReady( function() {
dashboardOwnerFields = new Ext.form.FieldSet({ dashboardOwnerFields = new Ext.form.FieldSet({
title : _('ID_OWNER_INFORMATION'), title : _('ID_OWNER_INFORMATION'),
collapsible : true, collapsible : true,
width : '100%',
//collapsed : true, //collapsed : true,
items : [ items : [
{ {
@@ -485,10 +487,8 @@ Ext.onReady( function() {
}, },
{ {
title: _('ID_PRO_USER'), title: _('ID_PRO_USER'),
anchor : '100%', },
autoHeight: true, ownerInfoGrid
items : ownerInfoGrid
}
] ]
}); });
@@ -503,7 +503,8 @@ Ext.onReady( function() {
minTabWidth : 115, minTabWidth : 115,
tabWidth : 135, tabWidth : 135,
enableTabScroll : true, enableTabScroll : true,
anchor : '98%', //anchor : '98%',
width : '100%',
height : 300, height : 300,
defaults : { defaults : {
autoScroll :true autoScroll :true
@@ -512,6 +513,11 @@ Ext.onReady( function() {
scope: this, scope: this,
beforeremove : function ( that, component ) { beforeremove : function ( that, component ) {
if (flag) { if (flag) {
if (tabPanel.items.items.length == 1 ) {
PMExt.warning(_('ID_DASHBOARD'), _('ID_MIN_INDICATOR_DASHBOARD'));
return false;
}
tabPanel.getItem(component.id).show(); tabPanel.getItem(component.id).show();
Ext.MessageBox.show({ Ext.MessageBox.show({
title: _('ID_CONFIRM'), title: _('ID_CONFIRM'),
@@ -631,7 +637,7 @@ Ext.onReady( function() {
labelAlign :'right', labelAlign :'right',
autoScroll : true, autoScroll : true,
fileUpload : true, fileUpload : true,
width : 800, width : '100%',
bodyStyle : 'padding:10px', bodyStyle : 'padding:10px',
waitMsgTarget : true, waitMsgTarget : true,
frame : true, frame : true,