From 0be3fc3037cea44c23261215f92d6c24dbf81060 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 23 Sep 2010 06:12:10 -0500 Subject: [PATCH] Ticket 867: 'cancel' button in editor. Notification lasts for 7000ms after edit. --- redakcja/static/js/wiki/view_editor_wysiwyg.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/redakcja/static/js/wiki/view_editor_wysiwyg.js b/redakcja/static/js/wiki/view_editor_wysiwyg.js index 42d91ca1..dc24aea8 100644 --- a/redakcja/static/js/wiki/view_editor_wysiwyg.js +++ b/redakcja/static/js/wiki/view_editor_wysiwyg.js @@ -346,7 +346,14 @@ }); } else { - $('.delete-button', $overlay).hide(); + $('.delete-button', $overlay).html("Anuluj"); + $('.delete-button', $overlay).click(function(){ + if (window.confirm("Czy jesteś pewien, że chcesz anulować zmiany?")) { + $overlay.remove(); + $(document).unbind('click.blur-overlay'); + return false; + }; + }); } @@ -385,7 +392,7 @@ var msg = $("

Twoje zmiany zostały naniesione na tekst źródłowy. Pamiętaj, że aby zmiany zostały utrwalone należy je zapisać!

Ta wiadomość zostanie automatycznie zamknięta za 6 sekund.

"); $("#base").prepend(msg); $("#save-button").css({border: '5px solid red'}); - $('#base .saveNotify').fadeOut(6000, function(){ + $('#base .saveNotify').fadeOut(7000, function(){ $(this).remove(); $("#save-button").css({border: '1px solid black'}); }); -- 2.20.1