Added a new "hide-with-mce" CSS class in Dynano; all elements which have it will be hidden when TinyMCE is activated, and re-shown when it is destroyed.
--- a/includes/clientside/static/dynano.js Mon Nov 15 16:58:05 2010 -0500
+++ b/includes/clientside/static/dynano.js Mon Nov 15 19:21:40 2010 -0500
@@ -119,7 +119,6 @@
enano_tinymce_options.elements = this.object.id;
initTinyMCE();
this.object.dnIsMCE = 'yes';
- return true;
}
else
{
@@ -127,6 +126,13 @@
tinymce.EditorManager.execCommand("mceAddControl", true, this.object.id);
this.object.dnIsMCE = 'yes';
}
+ // Any elements to hide?
+ var objs = getElementsByClassName(this.object.parentNode, '*', 'hide-with-mce');
+ console.debug(objs);
+ for ( var i = 0; i < objs.length; i++ )
+ {
+ objs[i].style.display = 'none';
+ }
return this;
}
@@ -151,6 +157,12 @@
}
}
this.object.dnIsMCE = 'no';
+ // Any elements to re-show?
+ var objs = getElementsByClassName(this.object.parentNode, '*', 'hide-with-mce');
+ for ( var i = 0; i < objs.length; i++ )
+ {
+ objs[i].style.display = 'block';
+ }
return this;
}
--- a/includes/clientside/static/editor.js Mon Nov 15 16:58:05 2010 -0500
+++ b/includes/clientside/static/editor.js Mon Nov 15 19:21:40 2010 -0500
@@ -879,12 +879,19 @@
},
onclick: function()
{
+ console.info('setAjaxLoading');
setAjaxLoading();
- ajaxEditorDestroyModalWindow();
+ console.info('editor_open = false');
editor_open = false;
+ console.info('enableUnload');
enableUnload();
+ console.info('destroyMCE');
$dynano('ajaxEditArea').destroyMCE(false);
+ console.info('destroyModal()');
+ ajaxEditorDestroyModalWindow();
+ console.info('ajaxReset');
ajaxReset();
+ console.info('miniPromptDestroy');
miniPromptDestroy(this);
return false;
}
--- a/includes/clientside/static/functions.js Mon Nov 15 16:58:05 2010 -0500
+++ b/includes/clientside/static/functions.js Mon Nov 15 19:21:40 2010 -0500
@@ -1155,7 +1155,7 @@
function getElementsByClassName(oElm, strTagName, strClassName)
{
// first it gets all of the specified tags
- var arrElements = (strTagName == "*" && document.all) ? document.all : oElm.getElementsByTagName(strTagName);
+ var arrElements = oElm.getElementsByTagName(strTagName);
// then it sets up an array that'll hold the results
var arrReturnElements = new Array();
--- a/includes/clientside/static/template-compiler.js Mon Nov 15 16:58:05 2010 -0500
+++ b/includes/clientside/static/template-compiler.js Mon Nov 15 19:21:40 2010 -0500
@@ -4,8 +4,8 @@
window.templateParser = function(text)
{
this.tpl_code = text;
- this.tpl_strings = new Object();
- this.tpl_bool = new Object();
+ this.tpl_strings = {};
+ this.tpl_bool = {};
this.assign_vars = __tpAssignVars;
this.assign_bool = __tpAssignBool;
this.fetch_hook = __tpFetchHook;