From 7e86b7c02b81cc7698d09489d1828d1456fe9d85 Mon Sep 17 00:00:00 2001 From: Fredrik Erlandsson Date: Tue, 13 Mar 2012 15:31:02 +0100 Subject: [PATCH] Squashed '3.0/themes/pear4gallery3/' changes from 993b36a..02f212c 02f212c Version 3.4 fab3234 fire pearInit when page have loaded not on DOM-ready 62ba165 makes sure the album thumb is restored when the user is not skimmig 102ac19 fix for #22, integration of the facebook comment module (acctually replaces the normal comments module) 2180ed9 Closes #24 by limiting the number of thumbnails in skimming albums Support for custom logo in footer (max size of 40x40 px) 734b8c9 closes #1, finally came up with a solution to set view mode per album 3d13a7d varius skin fixes 167be6c fix for stupid error. 02db5af creates download dialog when pressing the download icon cb41c1f version 3.2.1 64e4e07 more IE fixes.. 15b66cd fix for IE rednering, defaultView (grid) and thumbpadding. bcc9bfd version 3.2 e6b68c4 fix for disapearing icons d436453 fix when dialog fills entire window 2d1ecb2 cookies are saved at site path 8d654a9 cookie set sidebar state 4c030ce style fix for sidebar 1c3e517 New approach for the sidebar f9493ce fixes non cetered portrait images c67a209 fix for overlay carousel d7e1b5c fix for error dialog when submitting comments 0cbc3f6 fix for strange bug in chrome that did not show .conroller in mosaic view.. bbdc1f0 fix for image advance even in textarea f5e53b1 fix for image too low when using certan kinds of effects in mosaic view fd28875 bug fixes.. 76daf45 form update.. 729d7ce theming dialogs a653761 merge of pear.css and icons/pear.css hide dl icon in mosaic view when there is no link version up to 3.1b c355b22 New dialogs for comments and photo info, closes #14 232863c minor ajax and ui fixes 089744b updated buttons c679391 updated ui-theme 523c7f8 support for option-menu even on detailImage d2f2264 broken checkin.. 8b0fb96 Rewrite of album.html.php, fixes #10 32c492b fix for the slider track ae32371 fix for centering the pear logo b9d9eb7 fix when view_full is not supported c9a4389 fixes bug with download link in hoverview ff3b3c7 fix for broken carousel and thumb click 28bd9cb fixes problem when the transition is set to 'none' 32023c4 total rewrite of pear.js, 658019f first revision of search.html (for diff purporse) a99addd Fix for mixed content pages. b882159 fixes #15, support for dynamic page view. 70391a7 stupid spelling error b8afa13 fix for endless scroll 7355f99 fix when slideShowImages is undefined a093d57 invoke scaleIt when switching mode 5e33eb1 code clean up, and wait untill the image is loaded before it's shown 1b68ae0 fix for image is stretched and then replaced in detail view a9e22b2 support to hide album count of children via option 4c341a7 fixes #13, Click on image act as "Back to Album" in detailView ddd9a1e Support for dynamic pagesize, closes #12 git-subtree-dir: 3.0/themes/pear4gallery3 git-subtree-split: 02f212c2ccd6608e6564e1377f49dd780d4e4ba1 --- admin/controllers/admin_theme_options.php | 32 +- admin/views/admin_include.html.php | 9 +- controllers/pear.php | 98 ++ css/dark-hive/jquery.ui.accordion.css | 19 - css/dark-hive/jquery.ui.all.css | 11 - css/dark-hive/jquery.ui.autocomplete.css | 53 - css/dark-hive/jquery.ui.base.css | 11 - css/dark-hive/jquery.ui.button.css | 38 - css/dark-hive/jquery.ui.core.css | 41 - css/dark-hive/jquery.ui.datepicker.css | 68 -- css/dark-hive/jquery.ui.dialog.css | 21 - css/dark-hive/jquery.ui.progressbar.css | 11 - css/dark-hive/jquery.ui.resizable.css | 20 - css/dark-hive/jquery.ui.selectable.css | 10 - css/dark-hive/jquery.ui.slider.css | 24 - css/dark-hive/jquery.ui.tabs.css | 18 - css/dark-hive/jquery.ui.theme.css | 249 ----- css/fix-ie.css | 20 +- css/pear.css | 904 ++++++++++++++++-- css/screen.css | 37 +- .../images/ui-bg_flat_25_000000_40x100.png | Bin .../images/ui-bg_flat_30_cccccc_40x100.png | Bin .../images/ui-bg_flat_50_5c5c5c_40x100.png | Bin .../images/ui-bg_glass_40_ffc73d_1x400.png | Bin .../ui-bg_highlight-hard_20_222222_1x100.png | Bin .../ui-bg_highlight-soft_33_212121_1x100.png | Bin 0 -> 154 bytes .../ui-bg_highlight-soft_33_220022_1x100.png | Bin .../ui-bg_highlight-soft_35_2b2b2b_1x100.png | Bin .../ui-bg_highlight-soft_44_444444_1x100.png | Bin .../ui-bg_highlight-soft_80_eeeeee_1x100.png | Bin .../images/ui-icons_4b8e0b_256x240.png | Bin .../images/ui-icons_999999_256x240.png | Bin .../images/ui-icons_a83300_256x240.png | Bin .../images/ui-icons_cccccc_256x240.png | Bin .../images/ui-icons_ffffff_256x240.png | Bin .../jquery-ui-1.8.17.custom.css} | 41 +- helpers/pear4gallery3_event.php | 68 ++ icons/button_left.png | Bin 778 -> 0 bytes icons/button_pause.png | Bin 2826 -> 0 bytes icons/button_play.png | Bin 216 -> 0 bytes icons/button_right.png | Bin 2322 -> 0 bytes icons/color_picker_sprite.png | Bin 3474 -> 0 bytes icons/controller.png | Bin 0 -> 29408 bytes icons/controller_half.png | Bin 0 -> 17675 bytes icons/empty_image.png | Bin 0 -> 23382 bytes icons/larger.png | Bin 449 -> 0 bytes icons/load.gif | Bin 0 -> 8238 bytes icons/pear.css | 762 --------------- icons/sliderView.png | Bin 0 -> 539 bytes icons/smaller.png | Bin 326 -> 0 bytes icons/track_fill_right.png | Bin 162 -> 0 bytes js/gallery.ajax.js | 14 + js/gallery.dialog.js | 25 +- js/jquery-1.6.2.min.js | 18 - js/jquery-1.7.1.min.js | 4 + js/jquery-ui-1.8.16.custom.min.js | 791 --------------- js/jquery-ui-1.8.17.custom.min.js | 356 +++++++ js/jquery.endless-scroll.js | 126 +++ js/jquery.getscrollbarwidth.js | 31 + js/pear.js | 687 +++++++------ models/pear_album_view.php | 21 + theme.info | 2 +- views/about.html.php | 49 + views/album.html.php | 159 +-- views/dynamic.html.php | 29 +- views/exif_dialog.html.php | 2 +- views/facebook_comment.html.php | 16 + views/hoverView.html.php | 28 +- views/page.html.php | 67 +- views/paginator.html.php | 54 +- views/search.html.php | 48 + views/thumbs.html.php | 73 ++ 72 files changed, 2332 insertions(+), 2833 deletions(-) create mode 100644 controllers/pear.php delete mode 100644 css/dark-hive/jquery.ui.accordion.css delete mode 100644 css/dark-hive/jquery.ui.all.css delete mode 100644 css/dark-hive/jquery.ui.autocomplete.css delete mode 100644 css/dark-hive/jquery.ui.base.css delete mode 100644 css/dark-hive/jquery.ui.button.css delete mode 100644 css/dark-hive/jquery.ui.core.css delete mode 100644 css/dark-hive/jquery.ui.datepicker.css delete mode 100644 css/dark-hive/jquery.ui.dialog.css delete mode 100644 css/dark-hive/jquery.ui.progressbar.css delete mode 100644 css/dark-hive/jquery.ui.resizable.css delete mode 100644 css/dark-hive/jquery.ui.selectable.css delete mode 100644 css/dark-hive/jquery.ui.slider.css delete mode 100644 css/dark-hive/jquery.ui.tabs.css delete mode 100644 css/dark-hive/jquery.ui.theme.css rename css/{dark-hive => ui-pear-theme}/images/ui-bg_flat_25_000000_40x100.png (100%) rename css/{dark-hive => ui-pear-theme}/images/ui-bg_flat_30_cccccc_40x100.png (100%) rename css/{dark-hive => ui-pear-theme}/images/ui-bg_flat_50_5c5c5c_40x100.png (100%) rename css/{dark-hive => ui-pear-theme}/images/ui-bg_glass_40_ffc73d_1x400.png (100%) rename css/{dark-hive => ui-pear-theme}/images/ui-bg_highlight-hard_20_222222_1x100.png (100%) create mode 100644 css/ui-pear-theme/images/ui-bg_highlight-soft_33_212121_1x100.png rename css/{dark-hive => ui-pear-theme}/images/ui-bg_highlight-soft_33_220022_1x100.png (100%) rename css/{dark-hive => ui-pear-theme}/images/ui-bg_highlight-soft_35_2b2b2b_1x100.png (100%) rename css/{dark-hive => ui-pear-theme}/images/ui-bg_highlight-soft_44_444444_1x100.png (100%) rename css/{dark-hive => ui-pear-theme}/images/ui-bg_highlight-soft_80_eeeeee_1x100.png (100%) rename css/{dark-hive => ui-pear-theme}/images/ui-icons_4b8e0b_256x240.png (100%) rename css/{dark-hive => ui-pear-theme}/images/ui-icons_999999_256x240.png (100%) rename css/{dark-hive => ui-pear-theme}/images/ui-icons_a83300_256x240.png (100%) rename css/{dark-hive => ui-pear-theme}/images/ui-icons_cccccc_256x240.png (100%) rename css/{dark-hive => ui-pear-theme}/images/ui-icons_ffffff_256x240.png (100%) rename css/{dark-hive/jquery-ui-1.8.16.custom.css => ui-pear-theme/jquery-ui-1.8.17.custom.css} (97%) create mode 100644 helpers/pear4gallery3_event.php delete mode 100644 icons/button_left.png delete mode 100644 icons/button_pause.png delete mode 100644 icons/button_play.png delete mode 100644 icons/button_right.png delete mode 100644 icons/color_picker_sprite.png create mode 100644 icons/controller.png create mode 100644 icons/controller_half.png create mode 100644 icons/empty_image.png delete mode 100644 icons/larger.png create mode 100644 icons/load.gif delete mode 100644 icons/pear.css create mode 100644 icons/sliderView.png delete mode 100644 icons/smaller.png delete mode 100644 icons/track_fill_right.png create mode 100644 js/gallery.ajax.js delete mode 100644 js/jquery-1.6.2.min.js create mode 100644 js/jquery-1.7.1.min.js delete mode 100644 js/jquery-ui-1.8.16.custom.min.js create mode 100644 js/jquery-ui-1.8.17.custom.min.js create mode 100644 js/jquery.endless-scroll.js create mode 100644 js/jquery.getscrollbarwidth.js create mode 100644 models/pear_album_view.php create mode 100644 views/about.html.php create mode 100644 views/facebook_comment.html.php create mode 100644 views/search.html.php create mode 100644 views/thumbs.html.php diff --git a/admin/controllers/admin_theme_options.php b/admin/controllers/admin_theme_options.php index 7746cdb8..0befe51b 100644 --- a/admin/controllers/admin_theme_options.php +++ b/admin/controllers/admin_theme_options.php @@ -77,11 +77,14 @@ class Admin_Theme_Options_Controller extends Admin_Controller { $group = $form->group("edit_theme")->label(t("General Settings")); $group->input("favicon") - ->label(t("URL (or relative path) to your favicon.ico")) + ->label(t("URL (relative path) to your favicon.ico")) ->value(module::get_var("gallery", "favicon_url")); $group->input("appletouchicon") - ->label(t("URL (or relative path) to your apple-touch-icon.png")) + ->label(t("URL (relative path) to apple-touch-icon.png")) ->value(module::get_var("gallery", "appletouchicon_url")); + $group->input("logo_path") + ->label(t("URL (relative path) to custom logo")) + ->value(module::get_var("gallery", "logo_path")); $group->input("slideshow_time") ->label(t("Slideshow timeout (in ms)")) ->value(module::get_var("th_pear4gallery3", "slideshow_time", "5000")); @@ -89,6 +92,9 @@ class Admin_Theme_Options_Controller extends Admin_Controller { /* Advanced Options - General ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ $group = $form->group("edit_theme_adv_main")->label(t("Advanced Options - General")); + $group->checkbox("hide_item_count") + ->label(t("Hide Album Count")) + ->checked(module::get_var("th_pear4gallery3", "hide_item_count")); $group->checkbox("hide_logo") ->label(t("Hide Bottom Pear Logo")) ->checked(module::get_var("th_pear4gallery3", "hide_logo")); @@ -108,11 +114,14 @@ class Admin_Theme_Options_Controller extends Admin_Controller { ->checked(module::get_var("th_pear4gallery3", "show_breadcrumbs")); $group->dropdown("sidebar_view") ->label(t("Show Sidebar mode")) - ->options(array("hidden" => t("Hidden (Default)"), "static" => t("Always visible"), "toggle" => t("Toggleable"))) + ->options(array("hidden" => t("Hidden (Default)"), "static" => t("Always visible"), "toggle" => t("Hover"), "button" => t("Togglable via button"))) ->selected(module::get_var("th_pear4gallery3", "sidebar_view")); $group->input("ga_code") ->label(t("Google analytics code.")) ->value(module::get_var("th_pear4gallery3", "ga_code")); + $group->input("skimm_lim") + ->label(t("Limit amount of thumbs in album skimming")) + ->value(module::get_var("th_pear4gallery3", "skimm_lim", "50")); /* Advanced Options - Mosaic page ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ @@ -155,6 +164,7 @@ class Admin_Theme_Options_Controller extends Admin_Controller { $group->checkbox("build_resize")->label(t("Mark all Image Resizes for Rebuild"))->checked(false); $group->checkbox("build_thumbs")->label(t("Mark all Thumbnails for Rebuild"))->checked(false); $group->checkbox("build_exif")->label(t("Mark Exif Info data for reload"))->checked(false); + $iptccheck = module::is_active("iptc") and module::info("iptc"); if ($iptccheck): $group->checkbox("build_iptc")->label(t("Mark IPTC Info data for reload"))->checked(false); endif; @@ -208,6 +218,7 @@ class Admin_Theme_Options_Controller extends Admin_Controller { } protected function legacy() { + module::clear_var("th_pear4gallery3", "hide_item_count"); module::clear_var("th_pear4gallery3", "hide_logo"); module::clear_var("th_pear4gallery3", "mainmenu_view"); module::clear_var("th_pear4gallery3", "show_guest_menu"); @@ -216,6 +227,7 @@ class Admin_Theme_Options_Controller extends Admin_Controller { module::clear_var("th_pear4gallery3", "show_sidebar"); module::clear_var("th_pear4gallery3", "sidebar_view"); module::clear_var("th_pear4gallery3", "ga_code"); + module::clear_var("th_pear4gallery3", "skimm_lim"); module::clear_var("th_pear4gallery3", "mosaic_effect"); } @@ -259,12 +271,6 @@ class Admin_Theme_Options_Controller extends Admin_Controller { endif; $purge_cache = $form->maintenance->purge_cache->value; - $thumb_descmode_a = $form->edit_theme_adv_thumb->thumb_descmode_a->value; - $thumb_descmode = $form->edit_theme_adv_thumb->thumb_descmode->value; - $thumb_metamode = $form->edit_theme_adv_thumb->thumb_metamode->value; - $photo_descmode = $form->edit_theme_adv_photo->photo_descmode->value; - $photo_popupbox = $form->edit_theme_adv_photo->photo_popupbox->value; - if ($build_resize): graphics::remove_rule("gallery", "resize", "gallery_graphics::resize"); graphics::add_rule("gallery", "resize", "gallery_graphics::resize", @@ -291,12 +297,13 @@ class Admin_Theme_Options_Controller extends Admin_Controller { module::set_var("gallery", "page_size", 50); module::set_var("gallery", "favicon_url", $form->edit_theme->favicon->value); module::set_var("gallery", "appletouchicon_url", $form->edit_theme->appletouchicon->value); + module::set_var("gallery", "logo_path", $form->edit_theme->logo_path->value); - $this->save_item_state("logo_path", $form->edit_theme->logo_path->value, $form->edit_theme->logo_path->value); $this->save_item_state("slideshow_time", $form->edit_theme->slideshow_time->value != 5000, filter_var($form->edit_theme->slideshow_time->value, FILTER_VALIDATE_INT, array('options' => array('default' => 5000, 'min_range' => 1000)))); // * Advanced Options - General ****************************************** + $this->save_item_state("hide_item_count", $form->edit_theme_adv_main->hide_item_count->value, TRUE); $this->save_item_state("hide_logo", $form->edit_theme_adv_main->hide_logo->value, TRUE); $this->save_item_state("mainmenu_view", $form->edit_theme_adv_main->mainmenu_view->value != "grid", $form->edit_theme_adv_main->mainmenu_view->value); $this->save_item_state("show_guest_menu",$form->edit_theme_adv_main->show_guest_menu->value, TRUE); @@ -304,6 +311,7 @@ class Admin_Theme_Options_Controller extends Admin_Controller { $this->save_item_state("show_breadcrumbs",$form->edit_theme_adv_main->show_breadcrumbs->value, TRUE); $this->save_item_state("sidebar_view",$form->edit_theme_adv_main->sidebar_view->value != "hidden", $form->edit_theme_adv_main->sidebar_view->value); $this->save_item_state("ga_code", $form->edit_theme_adv_main->ga_code->value, $form->edit_theme_adv_main->ga_code->value); + $this->save_item_state("skimm_lim", $form->edit_theme_adv_main->skimm_lim->value != 50, $form->edit_theme_adv_main->skimm_lim->value); // * Advanced Options - Photo page *************************************** $this->save_item_state("mosaic_effect", $form->edit_theme_adv_mosaic->mosaic_effect->value != "blind", $form->edit_theme_adv_mosaic->mosaic_effect->value); @@ -316,10 +324,6 @@ class Admin_Theme_Options_Controller extends Admin_Controller { module::event("theme_edit_form_completed", $form); - if ($_priorratio != $thumb_ratio): - message::warning(t("Thumb aspect ratio has been changed. Consider rebuilding thumbs if needed.")); - endif; - message::success(t("Updated theme details")); if ($build_exif): diff --git a/admin/views/admin_include.html.php b/admin/views/admin_include.html.php index 8d818bb7..7d02b05c 100644 --- a/admin/views/admin_include.html.php +++ b/admin/views/admin_include.html.php @@ -39,9 +39,9 @@ #gd-admin p.g-error { padding-left: 30px; border: none; margin-bottom: 0; background-image: none; } #g-content { padding: 0 1em; width: 97%; font-size: 1em; } -#g-content form ul li input { display: inline; float: left; margin-right: 0.8em; } -#g-content form ul li select { display: inline; float: left; margin-right: 0.8em; width: 50.6%; padding: 0 0 0 .2em; } -#g-content form ul li input[type='text'] { width: 50%; } +#g-content form ul li input { display: inline; float: left; margin-right: 0.8em; } +#g-content form ul li select { display: inline; float: left; margin-right: 0.8em; width: 35%; padding: 0 0 0 .2em; } +#g-content form ul li input[type='text'] { width: 35%; } #g-content form ul li textarea { height: 6em; } #g-content form input[type="submit"] { border: #5b86ab 2px solid; padding: 0.3em; color: #fff; background: url(/themes/greydragon/images/button-grad-vs.png) #5580a6 repeat-x left top; } #g-content form input[type="submit"]:hover, @@ -50,7 +50,7 @@ input.ui-state-hover { background-image: url(/themes/greydragon/images/button-gr - - - -
-
- -
-
- -
-
- -
+
+ + +
-
- - album_bottom() ?> -paginator() ?> diff --git a/views/dynamic.html.php b/views/dynamic.html.php index a8a4d362..7f3b9c40 100644 --- a/views/dynamic.html.php +++ b/views/dynamic.html.php @@ -1,29 +1,6 @@ -
-
- dynamic_top() ?> -
-

-
- - +dynamic_top() ?> + + dynamic_bottom() ?> -paginator() ?> diff --git a/views/exif_dialog.html.php b/views/exif_dialog.html.php index 7c845a06..32d3fae0 100644 --- a/views/exif_dialog.html.php +++ b/views/exif_dialog.html.php @@ -4,7 +4,7 @@ .g-odd { background: #333; } .g-even { background: #222; } -

+

diff --git a/views/facebook_comment.html.php b/views/facebook_comment.html.php new file mode 100644 index 00000000..1558d68c --- /dev/null +++ b/views/facebook_comment.html.php @@ -0,0 +1,16 @@ + +
+
+ + +
+ + diff --git a/views/hoverView.html.php b/views/hoverView.html.php index b38ad8f7..eb1f59c5 100644 --- a/views/hoverView.html.php +++ b/views/hoverView.html.php @@ -3,21 +3,21 @@
- -
+
-
-
-
-
- - -
- -
-
+
+
+ +
+
+ +
+
+
+ + +
+
diff --git a/views/page.html.php b/views/page.html.php index c0170162..7891aad9 100644 --- a/views/page.html.php +++ b/views/page.html.php @@ -1,14 +1,18 @@ +page_subtype == "photo"): foreach (end($parents)->viewable()->children() as $i => $child) if(!($child->is_album() || $child->is_movie())) - if($child->url() == $_SERVER['REQUEST_URI']): - $page_size = module::get_var("gallery","page_size"); ?> - - - - - + if($child->url() == $_SERVER['REQUEST_URI']) { + header("HTTP/1.1 302 Found"); + header("Location: ".end($parents)->url()."#img=$i&viewMode=detail&redirected=true"); + die(0); + }?> @@ -49,9 +53,11 @@ script("json2-min.js") ?> - script("jquery-1.6.2.min.js") ?> + script("jquery-1.7.1.min.js") ?> script("jquery.form.js") ?> - script("jquery-ui-1.8.16.custom.min.js") ?> + script("jquery-ui-1.8.17.custom.min.js") ?> + script("jquery.endless-scroll.js") ?> + script("jquery.getscrollbarwidth.js") ?> script("gallery.common.js") ?> diff --git a/views/search.html.php b/views/search.html.php new file mode 100644 index 00000000..3436a00c --- /dev/null +++ b/views/search.html.php @@ -0,0 +1,48 @@ + + +" id="g-search-form" class="g-short-form"> +
+ + + +
    +
  • + + +
  • +
  • + for_html_attr() ?>" class="submit" /> +
  • +
+
+ + +
+

+ + + + paginator() ?> + + +

+ %term", array("term" => $q)) ?> +

+ + +
diff --git a/views/thumbs.html.php b/views/thumbs.html.php new file mode 100644 index 00000000..716ad657 --- /dev/null +++ b/views/thumbs.html.php @@ -0,0 +1,73 @@ + +paginator() ?> + + + $child): ?> + 50) break; ?> + + is_album()): ?> + url()."/'+getAlbumHash(skimimg);"; ?> + + + is_photo()): ?> + + is_movie()): ?> + url()."';"; ?> + + + + + + + admin || access::can("add", $item)): ?> + id") ?> +
  • Add some.", + array("attrs" => html::mark_clean("href=\"$addurl\" class=\"g-dialog-link\""))) ?>
  • + +
  • + +