diff options
| author | Tim Almdal <tnalmdal@shaw.ca> | 2009-02-02 03:55:33 +0000 |
|---|---|---|
| committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-02-02 03:55:33 +0000 |
| commit | 01d00dfd8680c9e03fda9c4a0fb3dce04a88e2f8 (patch) | |
| tree | 2b73a29646b1172cb79ceb6cba6490b5bb66a909 | |
| parent | 0eb593711bc2d5abac0ec35eb21d9fe722e7bd30 (diff) | |
Change the item menu to allow the watch icon to change depending on
whether the item is currently being watched. Currently the icon is
the same as the add icon and needs to be changed.
| -rw-r--r-- | modules/notification/helpers/notification_menu.php | 4 | ||||
| -rw-r--r-- | themes/default/css/screen.css | 9 | ||||
| -rw-r--r-- | themes/default/images/ico-remove-watch.png | bin | 0 -> 1378 bytes |
3 files changed, 10 insertions, 3 deletions
diff --git a/modules/notification/helpers/notification_menu.php b/modules/notification/helpers/notification_menu.php index 3781b663..d04aa8ba 100644 --- a/modules/notification/helpers/notification_menu.php +++ b/modules/notification/helpers/notification_menu.php @@ -24,12 +24,14 @@ class notification_menu_Core { $item = $theme->item(); if ($item) { + $watching = notification::is_watching($item); + $menu ->append(Menu::factory("link") ->id("watch") ->label(t("Enable notifications for this album")) ->url(url::site("notification/watch/$item->id")) - ->css_id("gWatchLink")); + ->css_id($watching ? "gRemoveWatchLink" : "gAddWatchLink")); } } } diff --git a/themes/default/css/screen.css b/themes/default/css/screen.css index 03872ce4..76ec290d 100644 --- a/themes/default/css/screen.css +++ b/themes/default/css/screen.css @@ -556,7 +556,8 @@ form p.gError { } #gViewMenu #gAlbumLink, -#gViewMenu #gWatchLink, +#gViewMenu #gRemoveWatchLink, +#gViewMenu #gAddWatchLink, #gViewMenu #gHybridLink, #gViewMenu #gSlideshowLink, #gViewMenu #gFullsizeLink, @@ -576,10 +577,14 @@ form p.gError { background-image: url('../images/ico-view-album.png'); } -#gViewMenu #gWatchLink { +#gViewMenu #gAddWatchLink { background-image: url('../images/ico-add-watch.png'); } +#gViewMenu #gRemoveWatchLink { + background-image: url('../images/ico-remove-watch.png'); +} + #gViewMenu #gHybridLink { background-image: url('../images/ico-view-hybrid.png'); } diff --git a/themes/default/images/ico-remove-watch.png b/themes/default/images/ico-remove-watch.png Binary files differnew file mode 100644 index 00000000..8de3bc4e --- /dev/null +++ b/themes/default/images/ico-remove-watch.png |
