Changeset 32439 for main

Show
Ignore:
Timestamp:
11.09.2018 13:06:19 (9 months ago)
Author:
kjdon
Message:

put back a change I made ages ago. the instanceReady thing never seems to be called, so have put it back to adding each sectionText thing to initstates. Note, there is a bug in firefox whereby if you click on some text - which opens up ckeditor, it adds in a <br/> element to the text you have clicked on. Doesn't do that in Chrome. Can't see how to change it. It just means that you will be prompted to save if you have clicked on some text, even if you haven't made any changes.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/js/documentedit_scripts.js

    r32132 r32439  
    152152function readyPageForEditing() 
    153153{ 
    154     CKEDITOR.on('instanceReady', function(evt) { 
    155     addCKEEditableState(evt,editableInitStates); 
    156     }); 
     154 
     155 //   CKEDITOR.on('instanceReady', function(evt) { 
     156//  addCKEEditableState(evt,editableInitStates); 
     157 //   }); 
     158 
    157159    if($("#metadataSetList").length) 
    158160    { 
     
    171173    $("#editContentButton").html(gs.text.de.hide_editor); 
    172174    //wait for 0.5 sec to let ckeditor up  
    173     //setTimeout(function(){ $(".sectionText").each(function(){addEditableState(this,editableInitStates);}); }, 500);    
     175    setTimeout(function(){ $(".sectionText").each(function(){addEditableState(this,editableInitStates);}); }, 500);  
    174176    var editBar = $("#editBarLeft"); 
    175177     
     
    330332**************************************/ 
    331333 
     334//  not using this anymore as the instanceready never seems to get called  
    332335function addCKEEditableState(evt,stateArray)  
    333336{ 
     
    339342             initHTML : nodeText 
    340343         }); 
    341     
    342 } 
     344} 
     345 
    343346function addEditableState(editable,stateArray) 
    344347{ 
     
    399402    if (StateToCheck.initHTML == "") { 
    400403    return false; 
    401     }  
     404    } 
     405 
    402406    return true; 
    403407