editor: removed extraneous debug info; changed around the order by which the textarea is created and appended to the DOM
authorDan Fuhry <dan@enanocms.org>
Tue, 16 Nov 2010 12:24:38 -0500
changeset 1316 3df4818b99bf
parent 1315 d423fc0e9bc9
child 1318 a736fcf3d2fd
editor: removed extraneous debug info; changed around the order by which the textarea is created and appended to the DOM
includes/clientside/static/editor.js
--- a/includes/clientside/static/editor.js	Tue Nov 16 12:23:10 2010 -0500
+++ b/includes/clientside/static/editor.js	Tue Nov 16 12:24:38 2010 -0500
@@ -197,14 +197,15 @@
 	var ta_wrapper = document.createElement('div');
 	ta_wrapper.style.margin = '10px 0';
 	
+	// ta_wrapper.style.clear = 'both';
+	var textarea = document.createElement('textarea');
+	textarea.id = 'ajaxEditArea';
+	
 	// A hook allowing plugins to create a toolbar on top of the textarea
 	eval(setHook('editor_gui_toolbar'));
 	
-	// ta_wrapper.style.clear = 'both';
-	var textarea = document.createElement('textarea');
 	ta_wrapper.appendChild(textarea);
 	
-	textarea.id = 'ajaxEditArea';
 	textarea.rows = '20';
 	textarea.cols = '60';
 	textarea.style.width = '98.7%';
@@ -450,7 +451,10 @@
 	form.appendChild(ta_wrapper);
 	if ( !readonly )
 		form.appendChild(tblholder);
-	form.innerHTML += '<div style="margin: 10px 0 0 0;">' + toolbar + '</div>';
+	var tbdiv = document.createElement('div');
+	tbdiv.innerHTML = toolbar;
+	tbdiv.style.margin = '10px 0 0 0';
+	form.appendChild(tbdiv);
 	edcon.appendChild(form);
 	
 	if ( response.edit_notice && !readonly )
@@ -879,19 +883,12 @@
 					},
 					onclick: function()
 					{
-						console.info('setAjaxLoading');
 						setAjaxLoading();
-						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;
 					}