BUG 8709 "Comportamiento de focus no adecuado" SOLVED
- that behavior was happending after codemirror editor was added in script text area. - the problem was solved adding a set focus() call after codemirror editor was loaded.
This commit is contained in:
@@ -142,6 +142,8 @@ var CodeMirror = (function(){
|
||||
div.className = "CodeMirror-wrapping";
|
||||
div.style.width = options.width;
|
||||
div.style.height = (options.height == "dynamic") ? options.minHeight + "px" : options.height;
|
||||
div.style.border ='1px #848484 solid';
|
||||
|
||||
// This is used by Editor.reroutePasteEvent
|
||||
var teHack = this.textareaHack = createHTMLElement("textarea");
|
||||
div.appendChild(teHack);
|
||||
|
||||
@@ -609,8 +609,10 @@ function getElementByPMClass(__class){
|
||||
currentPopupWindow.remove();
|
||||
dynaformEditor.refreshCurrentView();
|
||||
}
|
||||
|
||||
var typePopup = 0;
|
||||
function fieldsAdd( type,label ){
|
||||
function fieldsAdd( type,label )
|
||||
{
|
||||
switch (type){
|
||||
case 'text' : label=TRANSLATIONS.ID_FIELD_DYNAFORM_TEXT; typePopup = 1; break;
|
||||
case 'currency' : label=TRANSLATIONS.ID_FIELD_DYNAFORM_CURRENCY; typePopup = 1; break;
|
||||
@@ -633,14 +635,17 @@ function getElementByPMClass(__class){
|
||||
case 'hidden' : label=TRANSLATIONS.ID_FIELD_DYNAFORM_HIDDEN; typePopup = 0; break;
|
||||
case 'link' : label=TRANSLATIONS.ID_FIELD_DYNAFORM_LINK; typePopup = 0; break;
|
||||
case 'file' : label=TRANSLATIONS.ID_FIELD_DYNAFORM_FILE; typePopup = 0; break;
|
||||
case 'javascript': label=TRANSLATIONS.ID_FIELD_DYNAFORM_JAVASCRIPT; typePopup = 0; break;
|
||||
case 'javascript': label=TRANSLATIONS.ID_FIELD_DYNAFORM_JAVASCRIPT; typePopup = 1; break;
|
||||
case 'grid' : label=TRANSLATIONS.ID_FIELD_DYNAFORM_GRID; typePopup = 0; break;
|
||||
|
||||
default : label=type; break
|
||||
}
|
||||
|
||||
if(typePopup == 0)
|
||||
popupWindow(G_STRINGS.ID_ADD + ' ' + label , '../dynaforms/fields_Edit?A='+DYNAFORM_URL+'&TYPE='+encodeURIComponent(type) , 510, 650, null,false,true);
|
||||
else
|
||||
popupWindow(G_STRINGS.ID_ADD + ' ' + label , '../dynaforms/fields_Edit?A='+DYNAFORM_URL+'&TYPE='+encodeURIComponent(type) , 510, 400 );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -3140,7 +3140,7 @@ button.x-btn-text:focus,.x-combo-selected{
|
||||
.CodeMirror-line-numbers {
|
||||
width: 2.2em;
|
||||
color: #aaa;
|
||||
background-color: #eee;
|
||||
background-color: #fff;
|
||||
text-align: right;
|
||||
padding-right: .3em;
|
||||
font-size: 10pt;
|
||||
|
||||
@@ -32,8 +32,6 @@ var fieldForm="javascript";
|
||||
var fieldName=getField("PME_XMLNODE_NAME",fieldForm);
|
||||
var savedFieldName=fieldName.value;
|
||||
var pme_validating;
|
||||
fieldName.focus();
|
||||
fieldName.select();
|
||||
leimnud.event.add(fieldName, 'change', {method:dynaformVerifyFieldName, instance:fieldName, event:true});
|
||||
|
||||
function cancel(){
|
||||
@@ -56,5 +54,13 @@ function saveJavascript()
|
||||
jsEditorPrompt.save();
|
||||
}
|
||||
|
||||
function setFocus1() {
|
||||
var fieldName=getField("PME_XMLNODE_NAME");
|
||||
fieldName.focus();
|
||||
fieldName.select();
|
||||
}
|
||||
|
||||
setTimeout('setFocus1()', 500);
|
||||
|
||||
]]></PME_JS>
|
||||
</dynaForm>
|
||||
Reference in New Issue
Block a user