From d7b13ee167ec06f54374c96c9a057cf9d2864aa2 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 15 Nov 2009 17:12:26 -0800 Subject: Try to keep users from leaving the upgrade page, or running the upgrade twice. 1) Disable the "Upgrade all" link once clicked 2) Put up a "upgrade in progress" link to show that there's something happening. Fixes ticket #837. --- modules/gallery/css/upgrader.css | 4 ++++ modules/gallery/views/upgrader.html.php | 39 +++++++++++++++++++++++++++------ 2 files changed, 36 insertions(+), 7 deletions(-) (limited to 'modules') diff --git a/modules/gallery/css/upgrader.css b/modules/gallery/css/upgrader.css index e1038ad1..73da0ff4 100644 --- a/modules/gallery/css/upgrader.css +++ b/modules/gallery/css/upgrader.css @@ -92,6 +92,8 @@ div.button-active:hover { } div#dialog { + width: 340px; + height: 200px; position: absolute; background: blue; z-index: 1000; @@ -106,6 +108,8 @@ div#dialog a.close { } div#dialog div { + width: 292px; + height: 152px; margin: 2px; padding: 20px; border: 2px solid #999; diff --git a/modules/gallery/views/upgrader.html.php b/modules/gallery/views/upgrader.html.php index 0c985c6b..5cd1cd77 100644 --- a/modules/gallery/views/upgrader.html.php +++ b/modules/gallery/views/upgrader.html.php @@ -11,14 +11,22 @@ " />
- -
- [x] -
+ @@ -26,9 +34,26 @@ $(document).ready(function() { $("#dialog").css("left", Math.round(($(window).width() - $("#dialog").width()) / 2)); $("#dialog").css("top", Math.round(($(window).height() - $("#dialog").height()) / 2)); + $("#upgrade_link").click(function(event) { show_busy() }); + + + show_done(); + }); + + var show_busy = function() { + $("#dialog").css("visibility", "visible"); + $("#busy").show(); + $("#upgrade_link").parent().removeClass("button-active"); + $("#upgrade_link").replaceWith($("#upgrade_link").html()) + } + + var show_done = function() { + $("#dialog").css("visibility", "visible"); + $("#done").show(); + $("#dialog_close_link").show(); + } -

">

@@ -64,7 +89,7 @@
-- cgit v1.2.3