includes/clientside/tinymce/tiny_mce_popup.js
changeset 778 57ce13805b6f
parent 543 dffcbfbc4e59
child 1193 e3b94bd055dc
--- a/includes/clientside/tinymce/tiny_mce_popup.js	Sun Dec 21 15:35:46 2008 -0500
+++ b/includes/clientside/tinymce/tiny_mce_popup.js	Sun Dec 21 16:28:00 2008 -0500
@@ -21,10 +21,14 @@
 		tinyMCE = w.tinyMCE;
 		t.editor = tinymce.EditorManager.activeEditor;
 		t.params = t.editor.windowManager.params;
+		t.features = t.editor.windowManager.features;
 
 		// Setup local DOM
 		t.dom = t.editor.windowManager.createInstance('tinymce.dom.DOMUtils', document);
-		t.dom.loadCSS(t.editor.settings.popup_css);
+
+		// Enables you to skip loading the default css
+		if (t.features.popup_css !== false)
+			t.dom.loadCSS(t.features.popup_css || t.editor.settings.popup_css);
 
 		// Setup on init listeners
 		t.listeners = [];
@@ -127,6 +131,14 @@
 		this.editor.execCallback('file_browser_callback', element_id, document.getElementById(element_id).value, type, window);
 	},
 
+	confirm : function(t, cb, s) {
+		this.editor.windowManager.confirm(t, cb, s, window);
+	},
+
+	alert : function(tx, cb, s) {
+		this.editor.windowManager.alert(tx, cb, s, window);
+	},
+
 	close : function() {
 		var t = this;
 
@@ -160,18 +172,25 @@
 	},*/
 
 	_onDOMLoaded : function() {
-		var t = this, ti = document.title, bm, h;
+		var t = this, ti = document.title, bm, h, nv;
 
 		// Translate page
-		h = document.body.innerHTML;
+		if (t.features.translate_i18n !== false) {
+			h = document.body.innerHTML;
+
+			// Replace a=x with a="x" in IE
+			if (tinymce.isIE)
+				h = h.replace(/ (value|title|alt)=([^"][^\s>]+)/gi, ' $1="$2"')
 
-		// Replace a=x with a="x" in IE
-		if (tinymce.isIE)
-			h = h.replace(/ (value|title|alt)=([^"][^\s>]+)/gi, ' $1="$2"')
+			document.dir = t.editor.getParam('directionality','');
+
+			if ((nv = t.editor.translate(h)) && nv != h)
+				document.body.innerHTML = nv;
 
-		document.dir = t.editor.getParam('directionality','');
-		document.body.innerHTML = t.editor.translate(h);
-		document.title = ti = t.editor.translate(ti);
+			if ((nv = t.editor.translate(ti)) && nv != ti)
+				document.title = ti = nv;
+		}
+
 		document.body.style.display = '';
 
 		// Restore selection in IE when focus is placed on a non textarea or input element of the type text