Sha256: feff1f01de947e60fb3dc7e0e294ea7e8a3cf5daec0795fac124fc87c49cc1ec
Contents?: true
Size: 853 Bytes
Versions: 1
Compression:
Stored size: 853 Bytes
Contents
var AdvHRDialog = { init : function(ed) { var dom = ed.dom, f = document.forms[0], n = ed.selection.getNode(), w; w = dom.getAttrib(n, 'width'); f.width.value = w ? parseInt(w) : ''; f.size.value = dom.getAttrib(n, 'size'); f.noshade.checked = !!dom.getAttrib(n, 'noshade'); selectByValue(f, 'width2', w.indexOf('%') != -1 ? '%' : 'px'); }, update : function() { var ed = tinyMCEPopup.editor, h, f = document.forms[0]; h = '<hr'; if (f.size.value) h += ' size="' + f.size.value + '"'; if (f.width.value) h += ' width="' + f.width.value + (f.width2.value == '%' ? '%' : '') + '"'; if (f.noshade.checked) h += ' noshade="noshade"'; h += ' />'; ed.execCommand("mceInsertContent", false, h); tinyMCEPopup.close(); } }; tinyMCEPopup.requireLangPack(); tinyMCEPopup.onInit.add(AdvHRDialog.init, AdvHRDialog);
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rails_tinymce-0.0.1 | assets/public/javascripts/tiny_mce/plugins/advhr/js/rule.js |