From df4100cbc450589a2e8b0a9cb4999b7567d3000f Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sat, 12 May 2012 17:40:18 -0300 Subject: [PATCH] Set onfouces on input notes and link form. --- mindplot/src/main/javascript/widget/LinkEditor.js | 7 ++++++- mindplot/src/main/javascript/widget/NoteEditor.js | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/mindplot/src/main/javascript/widget/LinkEditor.js b/mindplot/src/main/javascript/widget/LinkEditor.js index 10313832..dbba4416 100644 --- a/mindplot/src/main/javascript/widget/LinkEditor.js +++ b/mindplot/src/main/javascript/widget/LinkEditor.js @@ -75,7 +75,12 @@ mindplot.widget.LinkEditor = new Class({ select.inject(form); // Add Input ... - var input = new Element('input', {placeholder: 'http://www.example.com/',type:'url',required:true}); + var input = new Element('input', { + placeholder: 'http://www.example.com/', + type:'url', + required:true, + autofocus:'' + }); if (model.getValue() != null) input.value = model.getValue(); diff --git a/mindplot/src/main/javascript/widget/NoteEditor.js b/mindplot/src/main/javascript/widget/NoteEditor.js index 3a50bf3a..222b5f77 100644 --- a/mindplot/src/main/javascript/widget/NoteEditor.js +++ b/mindplot/src/main/javascript/widget/NoteEditor.js @@ -67,7 +67,11 @@ mindplot.widget.NoteEditor = new Class({ var form = new Element('form', {'action': 'none', 'id':'noteFormId'}); // Add textarea ... - var textArea = new Element('textarea', {placeholder: 'Write your note here ...',required:true}); + var textArea = new Element('textarea', + {placeholder: 'Write your note here ...', + required:true, + autofocus:'autofocus' + }); if (model.getValue() != null) textArea.value = model.getValue();