Index: /main/trunk/greenstone3/web/interfaces/default/js/documentedit_scripts.js =================================================================== --- /main/trunk/greenstone3/web/interfaces/default/js/documentedit_scripts.js (revision 32852) +++ /main/trunk/greenstone3/web/interfaces/default/js/documentedit_scripts.js (revision 32853) @@ -233,11 +233,4 @@ mapGPScontainer.css("display", "none"); - addFunctionalityToTable(mapGPScontainer); // ********************************** - mapGPScontainer.metaNameField.css("display", "none"); - mapGPScontainer.addRowButton.css("display", "none"); - if (enable_add_all_metadata_button == true) { - mapGPScontainer.addAllButton.css("display", "none"); - } - } @@ -290,8 +283,4 @@ function readyPageForEditing() { - // CKEDITOR.on('instanceReady', function(evt) { - // addCKEEditableState(evt,editableInitStates); - // }); - if ($("#metadataSetList").length) { var setList = $("#metadataSetList"); @@ -307,14 +296,8 @@ //wait for 0.5 sec to let ckeditor up - // The following is now done in the CKEDTIOR.on('instanceReady') handler, which is added when docReady, see documentedit_scripts_util::$( document ).ready(...) - // Attempting CKEDTIOR.on('instanceReady') at the start of this method didn't work because it was probably too late in page load phase to add the event handler then + // Initialising editableInitStates for CKEDITOR instances now happens in the CKEDITOR.on('instanceReady') handler, which is added upon docReady, see documentedit_scripts_util::$( document ).ready(...) + // Attempting CKEDITOR.on('instanceReady') at the start of this method or anywhere in this method didn't work because it was probably too late in page load phase to add the event handler then // (the instanceReady() event would have been triggered before this method finally got called). - /* - setTimeout(function () { - $(".sectionText").each(function () { - addEditableState(this, editableInitStates); - }); - }, 500); - */ + var editBar = $("#editBarLeft"); @@ -380,5 +363,9 @@ // We need to keep track of editableElementsInitialisationProgress: the number of editable elements that need to be initialised/need to finish initialising // As CKEditors will be added, meaning more editable elements, must increment our counter editableElementsInitialisationProgress - var $num_editable_textareas = $(".sectionText"); // consider searching for 'contenteditable="true"' as this is what CKEDITOR is looking for (we think!) + //var $num_editable_textareas = $(".sectionText"); // consider searching for 'contenteditable="true"' as this is what CKEDITOR is looking for (we think!) + // I think for us it's always a