]> SALOME platform Git repositories - tools/siman.git/commitdiff
Salome HOME
It was impossible to edit the body of the knowledge when the ordered or unordered...
authormka <mka@opencascade.com>
Mon, 1 Jul 2013 11:52:07 +0000 (11:52 +0000)
committermka <mka@opencascade.com>
Mon, 1 Jul 2013 11:52:07 +0000 (11:52 +0000)
Workspace/Siman/WebContent/jsp/editKnowledge.jsp
Workspace/Siman/WebContent/rtef/richtext.js

index 78451f55a726d564a6bdcee9d15d18d5bbd2e645..1cff9e54ed0a24f7a79fb69d2344fea639b9c1de 100644 (file)
@@ -75,7 +75,7 @@
         if (todo == Action.editKnowledge && kelm.getIndex().equals(typenumber)) {
 %>            <td>
                 <script language='JavaScript' type='text/javascript'>
-<%        out.print("displayTextEditor('knowledgeValue', '" + kelm.getFullValue() + "', 450, 150);"
+<%        out.print("displayTextEditor('knowledgeValue', '" + kelm.getFullValue().replaceAll("[\n\r]","") + "', 450, 150);"
                      + "enableRTEvalidation('knowledgeValue');");
 %>              </script>
               </td>
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