includes/clientside/tinymce/plugins/advhr/jscripts/rule.js
changeset 335 67bd3121a12e
parent 334 c72b545f1304
child 336 bfa2e9c23f03
equal deleted inserted replaced
334:c72b545f1304 335:67bd3121a12e
     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 }