From 6ec81006e7ac8ebc61d15af22e3bbda782c46b68 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 15 Nov 2009 16:02:39 -0800 Subject: Fix a bug where we were using tags in css to figure out whether we should gray out an element. --- modules/gallery/css/upgrader.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/gallery/css') diff --git a/modules/gallery/css/upgrader.css b/modules/gallery/css/upgrader.css index 64e4ca07..97d00941 100644 --- a/modules/gallery/css/upgrader.css +++ b/modules/gallery/css/upgrader.css @@ -112,8 +112,8 @@ div#confirmation div { background: #eee; } -.gray_on_done { - opacity: ; +.muted { + opacity: 0.5; } pre { -- cgit v1.2.3 From 9e5714aee817637ee954e8529da33c1be6f7ef19 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 15 Nov 2009 16:14:30 -0800 Subject: Tweak upgrader html and css so that we set opacity properly for rows that are done, and disable the upgrade link when there're no actions to take. --- modules/gallery/controllers/upgrader.php | 2 +- modules/gallery/css/upgrader.css | 4 ++-- modules/gallery/views/upgrader.html.php | 8 +++++++- 3 files changed, 10 insertions(+), 4 deletions(-) (limited to 'modules/gallery/css') diff --git a/modules/gallery/controllers/upgrader.php b/modules/gallery/controllers/upgrader.php index a86e8af9..48769bce 100644 --- a/modules/gallery/controllers/upgrader.php +++ b/modules/gallery/controllers/upgrader.php @@ -43,7 +43,7 @@ class Upgrader_Controller extends Controller { $view->can_upgrade = identity::active_user()->admin || $session->get("can_upgrade"); $view->upgrade_token = $upgrade_token; $view->available = module::available(); - $view->done = ($available_upgrades == 0); + $view->done = $available_upgrades == 0; print $view; } diff --git a/modules/gallery/css/upgrader.css b/modules/gallery/css/upgrader.css index 97d00941..01689a97 100644 --- a/modules/gallery/css/upgrader.css +++ b/modules/gallery/css/upgrader.css @@ -37,7 +37,7 @@ td { } tr.current td { - color: #999; + opacity: 0.5; font-style: italic; } @@ -87,7 +87,7 @@ div.button a { text-decoration: none; } -div.button:hover { +div.button-active:hover { background: #ccc; } diff --git a/modules/gallery/views/upgrader.html.php b/modules/gallery/views/upgrader.html.php index 44234ec0..90e1c5b6 100644 --- a/modules/gallery/views/upgrader.html.php +++ b/modules/gallery/views/upgrader.html.php @@ -58,11 +58,17 @@ -
+ +
+ +
+ + +

"> -- cgit v1.2.3 From 3481c8b58f87d6e1e653e165de4b40b98c00369d Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 15 Nov 2009 16:21:45 -0800 Subject: Change "confirmation" to "dialog" in preparation for putting up a "we're working, stay tuned" message. --- modules/gallery/css/upgrader.css | 6 +++--- modules/gallery/views/upgrader.html.php | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'modules/gallery/css') diff --git a/modules/gallery/css/upgrader.css b/modules/gallery/css/upgrader.css index 01689a97..e1038ad1 100644 --- a/modules/gallery/css/upgrader.css +++ b/modules/gallery/css/upgrader.css @@ -91,7 +91,7 @@ div.button-active:hover { background: #ccc; } -div#confirmation { +div#dialog { position: absolute; background: blue; z-index: 1000; @@ -99,13 +99,13 @@ div#confirmation { text-align: center; } -div#confirmation a.close { +div#dialog a.close { float: right; padding: 10px; text-decoration: none; } -div#confirmation div { +div#dialog div { 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 90e1c5b6..0c985c6b 100644 --- a/modules/gallery/views/upgrader.html.php +++ b/modules/gallery/views/upgrader.html.php @@ -12,8 +12,8 @@

-
- [x] +
+ [x]

@@ -24,8 +24,8 @@

-- cgit v1.2.3 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/gallery/css') 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