PHP Classes

File: htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/advhr/js/rule.js

Recommend this page to a friend!
  Classes of Michael Beck   Xoops 2.5   htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/advhr/js/rule.js   Download  
File: htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/advhr/js/rule.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Xoops 2.5
Modular content management publication system
Author: By
Last change:
Date: 6 years ago
Size: 1,462 bytes
 

Contents

Class file image Download
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) : (dom.getStyle('width') || ''); f.size.value = dom.getAttrib(n, 'size') || parseInt(dom.getStyle('height')) || ''; f.noshade.checked = !!dom.getAttrib(n, 'noshade') || !!dom.getStyle('border-width'); selectByValue(f, 'width2', w.indexOf('%') != -1 ? '%' : 'px'); }, update : function() { var ed = tinyMCEPopup.editor, h, f = document.forms[0], st = ''; h = '<hr'; if (f.size.value) { h += ' size="' + f.size.value + '"'; st += ' height:' + f.size.value + 'px;'; } if (f.width.value) { h += ' width="' + f.width.value + (f.width2.value == '%' ? '%' : '') + '"'; st += ' width:' + f.width.value + (f.width2.value == '%' ? '%' : 'px') + ';'; } if (f.noshade.checked) { h += ' noshade="noshade"'; st += ' border-width: 1px; border-style: solid; border-color: #CCCCCC; color: #ffffff;'; } if (ed.settings.inline_styles) h += ' style="' + tinymce.trim(st) + '"'; h += ' />'; ed.execCommand("mceInsertContent", false, h); tinyMCEPopup.close(); } }; tinyMCEPopup.requireLangPack(); tinyMCEPopup.onInit.add(AdvHRDialog.init, AdvHRDialog);