From 29b83d8bb38eb017e84f260f37e3d9227d780625 Mon Sep 17 00:00:00 2001 From: Luis Fernando Saisa Lopez Date: Thu, 3 Oct 2013 12:46:30 -0400 Subject: [PATCH] BUG 13131 "Popup movible innecesario al momento..." SOLVED - Popup movible innecesario al momento de adicionar una nueva fila para ser llenada en el "Data" de los PM Tables - Problema: En ADMIN>Settings>PMTable al seleccionar de la lista un PM Table y al hacer click en la opcion "Data", al agregar una fila y al introducir datos erroneos aparece un mensaje en movimiento dificultado su visibilidad. - Solucion: Se elimino el mensaje en movimiento cambiandolo por otro, donde se muestra el mensaje sin ninguna dificultad. Disponible para la version 2.5.2 rFieldsEnableDisable --- workflow/engine/templates/pmTables/data.js | 34 ++++++++++++++++++++++ workflow/engine/templates/pmTables/edit.js | 34 ++++++++++++++++++++++ 2 files changed, 68 insertions(+) diff --git a/workflow/engine/templates/pmTables/data.js b/workflow/engine/templates/pmTables/data.js index c3d179d78..451b919ec 100755 --- a/workflow/engine/templates/pmTables/data.js +++ b/workflow/engine/templates/pmTables/data.js @@ -196,9 +196,39 @@ Ext.onReady(function(){ }); //row editor for table columns grid + var flagShowMessageError = 1; + if (!isReport) { editor = new Ext.ux.grid.RowEditor({ saveText : _("ID_UPDATE"), + isValid: function () + { + var valid = true; + this.items.each(function(f) { + if(!f.isValid(true)){ + valid = false; + + if (valid) { + flagShowMessageError = 1; + } + + return false; + } + }); + + if (valid) { + flagShowMessageError = 1; + } + + return valid; + }, + showTooltip: function (msg) + { + if (flagShowMessageError == 1) { + Ext.msgBoxSlider.msgTopCenter("error", _("ID_ERROR"), msg, 3); + flagShowMessageError = 0; + } + }, listeners : { afteredit : { fn:function(rowEditor, obj, data, rowIndex ){ @@ -206,6 +236,10 @@ Ext.onReady(function(){ //store.reload(); // only if it is an insert } } + }, + canceledit: function (grid, obj) + { + flagShowMessageError = 1; } } }); diff --git a/workflow/engine/templates/pmTables/edit.js b/workflow/engine/templates/pmTables/edit.js index 86f8a7168..163b477fb 100755 --- a/workflow/engine/templates/pmTables/edit.js +++ b/workflow/engine/templates/pmTables/edit.js @@ -242,6 +242,8 @@ Ext.onReady(function(){ var sizeEdit = Ext.getCmp("sizeEdit"); editorFieldsEnableDisable(selCombo, fieldNull, fieldPrimaryKey, fieldInc, sizeEdit); + + flagShowMessageError = 1; } }//select } @@ -339,13 +341,45 @@ Ext.onReady(function(){ ] }); //row editor for table columns grid + var flagShowMessageError = 1; + editor = new Ext.ux.grid.RowEditor({ saveText: _("ID_UPDATE"), + isValid: function () + { + var valid = true; + this.items.each(function(f) { + if(!f.isValid(true)){ + valid = false; + + if (valid) { + flagShowMessageError = 1; + } + + return false; + } + }); + + if (valid) { + flagShowMessageError = 1; + } + + return valid; + }, + showTooltip: function (msg) + { + if (flagShowMessageError == 1) { + Ext.msgBoxSlider.msgTopCenter("error", _("ID_ERROR"), msg, 3); + flagShowMessageError = 0; + } + }, listeners: { canceledit: function(grid,obj){ if ( grid.record.data.field_label == '' && grid.record.data.field_name == '') { store.remove(grid.record); } + + flagShowMessageError = 1; } } });