Index: openacs-4/packages/acs-templating/www/resources/tinymce/jscripts/tiny_mce/utils/form_utils.js
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/tinymce/jscripts/tiny_mce/utils/form_utils.js,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/acs-templating/www/resources/tinymce/jscripts/tiny_mce/utils/form_utils.js 25 Jan 2008 21:44:25 -0000 1.1
+++ openacs-4/packages/acs-templating/www/resources/tinymce/jscripts/tiny_mce/utils/form_utils.js 8 May 2009 17:34:11 -0000 1.2
@@ -4,30 +4,20 @@
* Various form utilitiy functions.
*
* @author Moxiecode
- * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
+ * @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
*/
-var themeBaseURL = tinyMCE.baseURL + '/themes/' + tinyMCE.getParam("theme");
+var themeBaseURL = tinyMCEPopup.editor.baseURI.toAbsolute('themes/' + tinyMCEPopup.getParam("theme"));
function getColorPickerHTML(id, target_form_element) {
var h = "";
- h += '';
- h += '
';
+ h += '';
+ h += ' ';
return h;
}
-function pickColor(e, target_form_element) {
- if ((e.keyCode == 32 || e.keyCode == 13) || e.type == "mousedown")
- tinyMCEPopup.pickColor(e, target_form_element);
-}
-
function updateColor(img_id, form_element_id) {
document.getElementById(img_id).style.backgroundColor = document.forms[0].elements[form_element_id].value;
}
@@ -40,34 +30,32 @@
if (state) {
lnk.setAttribute("realhref", lnk.getAttribute("href"));
lnk.removeAttribute("href");
- tinyMCE.switchClass(img, 'mceButtonDisabled', true);
+ tinyMCEPopup.dom.addClass(img, 'disabled');
} else {
- lnk.setAttribute("href", lnk.getAttribute("realhref"));
- tinyMCE.switchClass(img, 'mceButtonNormal', false);
+ if (lnk.getAttribute("realhref"))
+ lnk.setAttribute("href", lnk.getAttribute("realhref"));
+
+ tinyMCEPopup.dom.removeClass(img, 'disabled');
}
}
}
function getBrowserHTML(id, target_form_element, type, prefix) {
- var option = prefix + "_" + type + "_browser_callback";
- var cb = tinyMCE.getParam(option, tinyMCE.getParam("file_browser_callback"));
- if (cb == null)
- return "";
+ var option = prefix + "_" + type + "_browser_callback", cb, html;
- var html = "";
+ cb = tinyMCEPopup.getParam(option, tinyMCEPopup.getParam("file_browser_callback"));
- html += '';
- html += '
';
+ if (!cb)
+ return "";
+ html = "";
+ html += '';
+ html += ' ';
+
return html;
}
-function openBrower(img_id, target_form_element, type, option) {
+function openBrowser(img_id, target_form_element, type, option) {
var img = document.getElementById(img_id);
if (img.className != "mceButtonDisabled")
@@ -119,8 +107,8 @@
function addClassesToList(list_id, specific_option) {
// Setup class droplist
var styleSelectElm = document.getElementById(list_id);
- var styles = tinyMCE.getParam('theme_advanced_styles', false);
- styles = tinyMCE.getParam(specific_option, styles);
+ var styles = tinyMCEPopup.getParam('theme_advanced_styles', false);
+ styles = tinyMCEPopup.getParam(specific_option, styles);
if (styles) {
var stylesAr = styles.split(';');
@@ -136,10 +124,9 @@
}
}
} else {
- // Use auto impored classes
- var csses = tinyMCE.getCSSClasses(tinyMCE.getWindowArg('editor_id'));
- for (var i=0; i