svn commit: r794358 - in /lenya/branches/BRANCH_2_0_X/src/modules/tinymce: resources/javascript/tiny_config.js xslt/page2edit.xsl

[email protected]
Newsgroups gmane.comp.cms.lenya.cvs
Message-ID <[email protected]>
Author: ragaller
Date: Wed Jul 15 18:47:33 2009
New Revision: 794358

URL: http://svn.apache.org/viewvc?rev=794358&view=rev
Log:
active unloadhandler module and handle the onbeforeunload events for the submit and ok buttons

Modified:
    lenya/branches/BRANCH_2_0_X/src/modules/tinymce/resources/javascript/tiny_config.js
    lenya/branches/BRANCH_2_0_X/src/modules/tinymce/xslt/page2edit.xsl

Modified: lenya/branches/BRANCH_2_0_X/src/modules/tinymce/resources/javascript/tiny_config.js
URL: http://svn.apache.org/viewvc/lenya/branches/BRANCH_2_0_X/src/modules/tinymce/resources/javascript/tiny_config.js?rev=794358&r1=794357&r2=794358&view=diff
==============================================================================
--- lenya/branches/BRANCH_2_0_X/src/modules/tinymce/resources/javascript/tiny_config.js (original)
+++ lenya/branches/BRANCH_2_0_X/src/modules/tinymce/resources/javascript/tiny_config.js Wed Jul 15 18:47:33 2009
@@ -53,7 +53,7 @@
     /* enable plugins for custom save function, fullscreen editing
        and search-and-replace. */
     //plugins : "save,fullscreen,searchreplace,table,contextmenu,simplebrowser,xhtmlxtras",
-    plugins : "searchreplace,table,contextmenu,simplebrowser",
+    plugins : "searchreplace,table,contextmenu,simplebrowser,unloadhandler",
         
     /* grey out the "save" button unless there are unsaved changes: */
     //save_enablewhendirty : false,

Modified: lenya/branches/BRANCH_2_0_X/src/modules/tinymce/xslt/page2edit.xsl
URL: http://svn.apache.org/viewvc/lenya/branches/BRANCH_2_0_X/src/modules/tinymce/xslt/page2edit.xsl?rev=794358&r1=794357&r2=794358&view=diff
==============================================================================
--- lenya/branches/BRANCH_2_0_X/src/modules/tinymce/xslt/page2edit.xsl (original)
+++ lenya/branches/BRANCH_2_0_X/src/modules/tinymce/xslt/page2edit.xsl Wed Jul 15 18:47:33 2009
@@ -221,10 +221,10 @@
           </textarea>
           <xsl:text>
           </xsl:text>
-          <input i18n:attr="value" type="submit" name="submit" value="Save"/>		
+          <input i18n:attr="value" type="submit" name="submit" value="Save" onclick="javascript:window.onbeforeunload = true;"/>        
           <xsl:text>
           </xsl:text>
-          <input i18n:attr="value" type="submit" name="cancel" value="Cancel"/>		
+          <input i18n:attr="value" type="submit" name="cancel" value="Cancel" onclick="javascript:window.onbeforeunload = true;"/>      
           <xsl:text>
       </xsl:text>
       </form>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.