You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by ad...@apache.org on 2019/07/12 12:43:32 UTC

[roller] branch revert-30-ROL-2136-5.2.x created (now 05c8e03)

This is an automated email from the ASF dual-hosted git repository.

adityasharma pushed a change to branch revert-30-ROL-2136-5.2.x
in repository https://gitbox.apache.org/repos/asf/roller.git.


      at 05c8e03  Revert "Improved: Editor should confirm user before leaving the page (ROL-2136)"

This branch includes the following new commits:

     new 05c8e03  Revert "Improved: Editor should confirm user before leaving the page (ROL-2136)"

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[roller] 01/01: Revert "Improved: Editor should confirm user before leaving the page (ROL-2136)"

Posted by ad...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

adityasharma pushed a commit to branch revert-30-ROL-2136-5.2.x
in repository https://gitbox.apache.org/repos/asf/roller.git

commit 05c8e03d159d151817096f762ae26a8d990a1da6
Author: Aditya Sharma <ia...@gmail.com>
AuthorDate: Fri Jul 12 18:13:29 2019 +0530

    Revert "Improved: Editor should confirm user before leaving the page (ROL-2136)"
---
 app/src/main/webapp/WEB-INF/jsps/editor/EntryEditor.jsp | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/app/src/main/webapp/WEB-INF/jsps/editor/EntryEditor.jsp b/app/src/main/webapp/WEB-INF/jsps/editor/EntryEditor.jsp
index 1a2df74..5050b29 100644
--- a/app/src/main/webapp/WEB-INF/jsps/editor/EntryEditor.jsp
+++ b/app/src/main/webapp/WEB-INF/jsps/editor/EntryEditor.jsp
@@ -125,16 +125,6 @@
                 textAreaElement.focus();
             }
         }
-        // Added event listener to confirm once the editor content is changed
-        jQuery("#edit_content").one("change", function() {
-            jQuery(window).on("beforeunload", function(event) {
-                // Chrome requires returnValue to be set and original event is found as originalEvent
-                // see https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onbeforeunload#Example
-                if (event.originalEvent)
-                    event.originalEvent.returnValue = "Are you sure you want to leave?";
-                return "Are you sure you want to leave?";
-            });
-        });
     </script>
 </s:if>
 <s:else>
@@ -179,7 +169,7 @@
                 'edit_content', 'edit_summary'
             ];
 
-            xinha_plugins = xinha_plugins ? xinha_plugins :[ 'UnsavedChanges'];
+            xinha_plugins = xinha_plugins ? xinha_plugins :[];
             if(!Xinha.loadPlugins(xinha_plugins, xinha_init)) return;
 
             xinha_config = xinha_config ? xinha_config() : new Xinha.Config();