From 72636d9e78940531758b893f1d210000ce0d28b3 Mon Sep 17 00:00:00 2001 From: dheeyi Date: Mon, 11 May 2015 15:09:54 -0400 Subject: [PATCH] =?UTF-8?q?PM-2655=20CaseNote:=20Te=20permite=20enviar=20u?= =?UTF-8?q?n=20case=20note=20con=20espacios.=20Causa=20:=20Definida=20asi.?= =?UTF-8?q?=20Soluci=C3=B3=20Se=20agrego=20una=20validaci=C3=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- workflow/engine/templates/app/main.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/workflow/engine/templates/app/main.js b/workflow/engine/templates/app/main.js index 70fdbb402..e1995d6cd 100644 --- a/workflow/engine/templates/app/main.js +++ b/workflow/engine/templates/app/main.js @@ -213,13 +213,18 @@ function openCaseNotesWindow(appUid1, delIndex, modalSw, appTitle, proUid, taskU growMin: 40, growMax: 80, maxLengthText : 500, - allowBlank :true, + allowBlank :false, selectOnFocus :true, enableKeyEvents: true, listeners : { scope : this, keyup : updateTextCtr, - keydown: updateTextCtr + keydown: updateTextCtr, + 'change': function(field, newVal, oldVal){ + var textAreaValue = newVal.replace(/^\s+/,'').replace(/\s+$/,''); + field.setValue(textAreaValue.trim()); + Ext.getCmp('caseNoteText').focus(false, 200); + } } }) ],