aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/lib/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'lib/scripts')
-rw-r--r--lib/scripts/behaviour.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/scripts/behaviour.js b/lib/scripts/behaviour.js
index f9aad3d02..9372dbff8 100644
--- a/lib/scripts/behaviour.js
+++ b/lib/scripts/behaviour.js
@@ -55,6 +55,7 @@ var dw_behaviour = {
dw_behaviour.quickSelect();
dw_behaviour.checkWindowsShares();
dw_behaviour.subscription();
+ dw_behaviour.pageRestoreConfirm();
dw_behaviour.revisionBoxHandler();
jQuery(document).on('click','#page__revisions input[type=checkbox]',
@@ -82,6 +83,18 @@ var dw_behaviour = {
},
/**
+ * Display confirm dialog on page restore action
+ */
+ pageRestoreConfirm: function(){
+ var $revert = jQuery('#dokuwiki__pagetools li.revert a');
+ if($revert.length) {
+ $revert.on('click', function() {
+ return confirm(LANG.restore_confirm);
+ });
+ }
+ },
+
+ /**
* Looks for an element with the ID focus__this at sets focus to it
*/
focusMarker: function(){