Sha256: e7bba07f5ad16a0dd621d06610228e71817a30e5f04adfbdbb3c96e156f09e48

Contents?: true

Size: 1.17 KB

Versions: 6

Compression:

Stored size: 1.17 KB

Contents

(function(){function j(a,f,b){a=a.getWrapperElement().appendChild(document.createElement("div"));a.className=b?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top";a.innerHTML=f;return a}CodeMirror.defineExtension("openDialog",function(a,f,b){function d(){g||(g=!0,e.parentNode.removeChild(e))}var e=j(this,a,b&&b.bottom),g=!1,h=this,c=e.getElementsByTagName("input")[0];if(c)CodeMirror.on(c,"keydown",function(a){if(13==a.keyCode||27==a.keyCode)CodeMirror.e_stop(a),
d(),h.focus(),13==a.keyCode&&f(c.value)}),c.focus(),CodeMirror.on(c,"blur",d);else if(a=e.getElementsByTagName("button")[0])CodeMirror.on(a,"click",function(){d();h.focus()}),a.focus(),CodeMirror.on(a,"blur",d);return d});CodeMirror.defineExtension("openConfirm",function(a,f,b){function d(){g||(g=!0,e.parentNode.removeChild(e),h.focus())}var e=j(this,a,b&&b.bottom),a=e.getElementsByTagName("button"),g=!1,h=this,c=1;a[0].focus();for(b=0;b<a.length;++b){var i=a[b];(function(a){CodeMirror.on(i,"click",
function(b){CodeMirror.e_preventDefault(b);d();a&&a(h)})})(f[b]);CodeMirror.on(i,"blur",function(){--c;setTimeout(function(){0>=c&&d()},200)});CodeMirror.on(i,"focus",function(){++c})}})})();

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rich-1.4.5 vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/util/dialog.js
rich-1.4.4 vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/util/dialog.js
rich-1.4.3 vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/util/dialog.js
rich-1.4.2 vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/util/dialog.js
rich-1.4.1 vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/util/dialog.js
rich-1.4 vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/util/dialog.js