Vergleich admin/jscripts/codemirror/addon/dialog/dialog.js - 1.8.6 - 1.8.38

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 56Zeile 56

var inp = dialog.getElementsByTagName("input")[0], button;
if (inp) {


var inp = dialog.getElementsByTagName("input")[0], button;
if (inp) {

 
      inp.focus();


      if (options.value) {
inp.value = options.value;

      if (options.value) {
inp.value = options.value;

        inp.select();



        if (options.selectValueOnOpen !== false) {
inp.select();
}

      }

if (options.onInput)
CodeMirror.on(inp, "input", function(e) { options.onInput(e, inp.value, close);});
if (options.onKeyUp)
CodeMirror.on(inp, "keyup", function(e) {options.onKeyUp(e, inp.value, close);});

      }

if (options.onInput)
CodeMirror.on(inp, "input", function(e) { options.onInput(e, inp.value, close);});
if (options.onKeyUp)
CodeMirror.on(inp, "keyup", function(e) {options.onKeyUp(e, inp.value, close);});





      CodeMirror.on(inp, "keydown", function(e) {
if (options && options.onKeyDown && options.onKeyDown(e, inp.value, close)) { return; }
if (e.keyCode == 27 || (options.closeOnEnter !== false && e.keyCode == 13)) {

      CodeMirror.on(inp, "keydown", function(e) {
if (options && options.onKeyDown && options.onKeyDown(e, inp.value, close)) { return; }
if (e.keyCode == 27 || (options.closeOnEnter !== false && e.keyCode == 13)) {

Zeile 77Zeile 81
      });

if (options.closeOnBlur !== false) CodeMirror.on(inp, "blur", close);

      });

if (options.closeOnBlur !== false) CodeMirror.on(inp, "blur", close);


inp.focus();

 
    } else if (button = dialog.getElementsByTagName("button")[0]) {
CodeMirror.on(button, "click", function() {
close();

    } else if (button = dialog.getElementsByTagName("button")[0]) {
CodeMirror.on(button, "click", function() {
close();