includes/clientside/tinymce/plugins/advhr/jscripts/rule.js
author Dan
Fri, 09 Nov 2007 23:36:49 -0500
changeset 250 acb9d021b860
parent 1 fe660c52c48f
permissions -rw-r--r--
Database name can now contain dashes (as per requested at http://forum.enanocms.org/viewtopic.php?f=5&t=14); corrected some installer behavior issues with connecting as root and setting up permissions resulting in logs not being flushed, configs not being inserted, and what have you.

function init() {
	tinyMCEPopup.resizeToInnerSize();

	var formObj = document.forms[0];
	formObj.width.value  = tinyMCE.getWindowArg('width');
	formObj.size.value   = tinyMCE.getWindowArg('size');
	formObj.insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('mceDo'),'Insert',true);
	if (tinyMCE.getWindowArg('noshade')) {
		formObj.noshade.checked = true;
	}
	if (tinyMCE.getWindowArg('width').lastIndexOf('%')!=-1) {
		formObj.width2.value = "%";
		formObj.width.value  = formObj.width.value.substring(0,formObj.width.value.length-1);
	}
}

function insertHR() {
	var formObj = document.forms[0];
	var width   = formObj.width.value;
	var size    = formObj.size.value;
	var html = '<hr';
	if (size!='' && size!=0) {
		html += ' size="' + size + '"';
	}
	if (width!='' && width!=0) {
		html += ' width="' + width;
		if (formObj.width2.value=='%') {
			html += '%';
		}
		html += '"';
	}
	if (formObj.noshade.checked==true) {
		html += ' noshade="noshade"';
	}
	html += ' />';

	tinyMCEPopup.execCommand("mceInsertContent", true, html);
	tinyMCEPopup.close();
}

function cancelAction() {
	tinyMCEPopup.close();
}