includes/clientside/static/editor.js
changeset 1316 3df4818b99bf
parent 1311 a228f7e8fb15
child 1332 12286b3ee214
equal deleted inserted replaced
1315:d423fc0e9bc9 1316:3df4818b99bf
   195 	
   195 	
   196 	// Textarea containing the content
   196 	// Textarea containing the content
   197 	var ta_wrapper = document.createElement('div');
   197 	var ta_wrapper = document.createElement('div');
   198 	ta_wrapper.style.margin = '10px 0';
   198 	ta_wrapper.style.margin = '10px 0';
   199 	
   199 	
       
   200 	// ta_wrapper.style.clear = 'both';
       
   201 	var textarea = document.createElement('textarea');
       
   202 	textarea.id = 'ajaxEditArea';
       
   203 	
   200 	// A hook allowing plugins to create a toolbar on top of the textarea
   204 	// A hook allowing plugins to create a toolbar on top of the textarea
   201 	eval(setHook('editor_gui_toolbar'));
   205 	eval(setHook('editor_gui_toolbar'));
   202 	
   206 	
   203 	// ta_wrapper.style.clear = 'both';
       
   204 	var textarea = document.createElement('textarea');
       
   205 	ta_wrapper.appendChild(textarea);
   207 	ta_wrapper.appendChild(textarea);
   206 	
   208 	
   207 	textarea.id = 'ajaxEditArea';
       
   208 	textarea.rows = '20';
   209 	textarea.rows = '20';
   209 	textarea.cols = '60';
   210 	textarea.cols = '60';
   210 	textarea.style.width = '98.7%';
   211 	textarea.style.width = '98.7%';
   211 	
   212 	
   212 	// Revision metadata controls
   213 	// Revision metadata controls
   448 	form.appendChild(preview_anchor);
   449 	form.appendChild(preview_anchor);
   449 	form.appendChild(preview_container);
   450 	form.appendChild(preview_container);
   450 	form.appendChild(ta_wrapper);
   451 	form.appendChild(ta_wrapper);
   451 	if ( !readonly )
   452 	if ( !readonly )
   452 		form.appendChild(tblholder);
   453 		form.appendChild(tblholder);
   453 	form.innerHTML += '<div style="margin: 10px 0 0 0;">' + toolbar + '</div>';
   454 	var tbdiv = document.createElement('div');
       
   455 	tbdiv.innerHTML = toolbar;
       
   456 	tbdiv.style.margin = '10px 0 0 0';
       
   457 	form.appendChild(tbdiv);
   454 	edcon.appendChild(form);
   458 	edcon.appendChild(form);
   455 	
   459 	
   456 	if ( response.edit_notice && !readonly )
   460 	if ( response.edit_notice && !readonly )
   457 	{
   461 	{
   458 		edcon.appendChild(en_div);
   462 		edcon.appendChild(en_div);
   877 					style: {
   881 					style: {
   878 						fontWeight: 'bold'
   882 						fontWeight: 'bold'
   879 					},
   883 					},
   880 					onclick: function()
   884 					onclick: function()
   881 					{
   885 					{
   882 						console.info('setAjaxLoading');
       
   883 						setAjaxLoading();
   886 						setAjaxLoading();
   884 						console.info('editor_open = false');
       
   885 						editor_open = false;
   887 						editor_open = false;
   886 						console.info('enableUnload');
       
   887 						enableUnload();
   888 						enableUnload();
   888 						console.info('destroyMCE');
       
   889 						$dynano('ajaxEditArea').destroyMCE(false);
   889 						$dynano('ajaxEditArea').destroyMCE(false);
   890 						console.info('destroyModal()');
       
   891 						ajaxEditorDestroyModalWindow();
   890 						ajaxEditorDestroyModalWindow();
   892 						console.info('ajaxReset');
       
   893 						ajaxReset();
   891 						ajaxReset();
   894 						console.info('miniPromptDestroy');
       
   895 						miniPromptDestroy(this);
   892 						miniPromptDestroy(this);
   896 						return false;
   893 						return false;
   897 					}
   894 					}
   898 				},
   895 				},
   899 				{
   896 				{