includes/clientside/tinymce/plugins/advhr/jscripts/rule.js
changeset 1 fe660c52c48f
equal deleted inserted replaced
0:902822492a68 1:fe660c52c48f
       
     1 function init() {
       
     2 	tinyMCEPopup.resizeToInnerSize();
       
     3 
       
     4 	var formObj = document.forms[0];
       
     5 	formObj.width.value  = tinyMCE.getWindowArg('width');
       
     6 	formObj.size.value   = tinyMCE.getWindowArg('size');
       
     7 	formObj.insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('mceDo'),'Insert',true);
       
     8 	if (tinyMCE.getWindowArg('noshade')) {
       
     9 		formObj.noshade.checked = true;
       
    10 	}
       
    11 	if (tinyMCE.getWindowArg('width').lastIndexOf('%')!=-1) {
       
    12 		formObj.width2.value = "%";
       
    13 		formObj.width.value  = formObj.width.value.substring(0,formObj.width.value.length-1);
       
    14 	}
       
    15 }
       
    16 
       
    17 function insertHR() {
       
    18 	var formObj = document.forms[0];
       
    19 	var width   = formObj.width.value;
       
    20 	var size    = formObj.size.value;
       
    21 	var html = '<hr';
       
    22 	if (size!='' && size!=0) {
       
    23 		html += ' size="' + size + '"';
       
    24 	}
       
    25 	if (width!='' && width!=0) {
       
    26 		html += ' width="' + width;
       
    27 		if (formObj.width2.value=='%') {
       
    28 			html += '%';
       
    29 		}
       
    30 		html += '"';
       
    31 	}
       
    32 	if (formObj.noshade.checked==true) {
       
    33 		html += ' noshade="noshade"';
       
    34 	}
       
    35 	html += ' />';
       
    36 
       
    37 	tinyMCEPopup.execCommand("mceInsertContent", true, html);
       
    38 	tinyMCEPopup.close();
       
    39 }
       
    40 
       
    41 function cancelAction() {
       
    42 	tinyMCEPopup.close();
       
    43 }