Salome HOME
It was impossible to edit the body of the knowledge when the ordered or unordered...
[tools/siman.git] / Workspace / Siman / WebContent / rtef / richtext.js
index b666b5b74c22e3310298ccce1ee88924518197e4..2b09b060b9bdb7861e0004bb986ea2a15efd5807 100644 (file)
@@ -269,7 +269,7 @@ function writeRichText(rte, html, css, width, height, buttons, readOnly, fullscr
                  document.writeln('<tbody><tr>');
                  insertBar();
                  if(fullscreen || activeCommand.get("save") != null){
-                         document.writeln('<td><input type="image" class="rteImg" id="'+rte+'SaveButton" src="'+imagesPath+'save.gif" alt="'+lblSave+'" title="'+lblSave+'" onmouseover="this.className=\'rteImgUp\'" onmouseout="this.className=\'rteImg\'" onmousedown="this.className=\'rteImgDn\'" onmouseup="this.className=\'rteImgUp\'" onClick="prepareSubmitEdit(currentRTE)"></td>');
+                         document.writeln('<td><input type="image" class="rteImg" id="'+rte+'SaveButton" src="'+imagesPath+'save.gif" alt="'+lblSave+'" title="'+lblSave+'" onmouseover="this.className=\'rteImgUp\'" onmouseout="this.className=\'rteImg\'" onmousedown="this.className=\'rteImgDn\'" onmouseup="this.className=\'rteImgUp\'" onClick="prepareSubmitEdit(\''+rte+'\')"></td>');
                          nbcommand += 1;
                  }
                  if(!isSafari && !isKonqueror) {
@@ -1336,12 +1336,12 @@ function checkspell() {
 //Validation
 //*****************
 function enableRTEvalidation(rteName) {
-    document.getElementById(rteName+'SaveButton').onclick = function(event){
+    document.getElementById(rteName+'SaveButton').addEventListener("click", function(event){
         updateRTEs();
            field = document.getElementById('hdn'+rteName);
            if(field.value != null && (field.value == "" || field.value.replace(/^\s+|\s+$/g,"").length == 0)) {
                event.preventDefault();
            }
-       };
+       });
 }
     
\ No newline at end of file