Merge pull request #32 from apache/revert-30-ROL-2136-5.2.x
Revert "Improved: Editor should confirm user before leaving the page (ROL-2136)"
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();