1
0
This repository has been archived on 2021-04-26. You can view files and clone it, but cannot push or open issues or pull requests.
gallery3-contrib/js/gallery.dialog.js

215 lines
7.3 KiB
JavaScript
Raw Normal View History

Squashed '3.0/themes/pear4gallery3/' changes from b24d37b..11c3c2a 11c3c2a version 3.0 063ad6f move of context menu to top of thumb 0188d22 closes #4, now the form-dialog is just loaded once 508366d annoying " 4047609 fixes #8, support for slideshow duration 5ed2ff0 updated options page b65bc7b fixes #7, image animation d6d5319 Removed temporary sidebarToggle 9499b7b Attempt to fix #3, support for a sidebar 13b0419 fixes #5, issues with hovering thumbnails e0fcc41 Fix for broken slideshow, fixes #6 0bdd3c6 Fix for slideShowImages when album is empty. ca62330 Fix for broken dialogs f0d9e34 Copy of gallery.dialog.js from G3.0.0 e4a18f3 Updated jqury version. 7be51a8 Added support for breadcrumbs and sidebar (enable via theme options) fad0fe4 Hash update 9d3b519 Fix for detail hash Imgage preload a2cfa32 Fix for IE Support for using 'esc' to hide detailView 41a9863 fix so only Grid mode is supported if album does not contain any images 92c70a1 themeing the exif data 22386c3 Combined viewMode.png and removed some depricated files. dc10f0a New icons. cad0376 Fix for height of thumbs. 5c21b24 updated paginator with support for hash 6a13dab Updated theme b305613 fix for pageheight, with paginator ae87410 lNavBar fix 751bd86 New ui-theme 9a937a1 first attempt for item-option-overlay d024eba Fix for setTimeout. e167b2d JSLint take 2, reoder function reorder 82e0f38 Reindent and JSLint take 1. git-subtree-dir: 3.0/themes/pear4gallery3 git-subtree-split: 11c3c2ac87bc21b5daf5384e32d77492c5d6779a
2012-01-10 14:07:23 +00:00
(function($) {
$.widget("ui.gallery_dialog", {
_init: function() {
var self = this;
if (!self.options.immediate) {
this.element.unbind('click');
this.element.click(function(event) {
Squashed '3.0/themes/pear4gallery3/' changes from b24d37b..11c3c2a 11c3c2a version 3.0 063ad6f move of context menu to top of thumb 0188d22 closes #4, now the form-dialog is just loaded once 508366d annoying " 4047609 fixes #8, support for slideshow duration 5ed2ff0 updated options page b65bc7b fixes #7, image animation d6d5319 Removed temporary sidebarToggle 9499b7b Attempt to fix #3, support for a sidebar 13b0419 fixes #5, issues with hovering thumbnails e0fcc41 Fix for broken slideshow, fixes #6 0bdd3c6 Fix for slideShowImages when album is empty. ca62330 Fix for broken dialogs f0d9e34 Copy of gallery.dialog.js from G3.0.0 e4a18f3 Updated jqury version. 7be51a8 Added support for breadcrumbs and sidebar (enable via theme options) fad0fe4 Hash update 9d3b519 Fix for detail hash Imgage preload a2cfa32 Fix for IE Support for using 'esc' to hide detailView 41a9863 fix so only Grid mode is supported if album does not contain any images 92c70a1 themeing the exif data 22386c3 Combined viewMode.png and removed some depricated files. dc10f0a New icons. cad0376 Fix for height of thumbs. 5c21b24 updated paginator with support for hash 6a13dab Updated theme b305613 fix for pageheight, with paginator ae87410 lNavBar fix 751bd86 New ui-theme 9a937a1 first attempt for item-option-overlay d024eba Fix for setTimeout. e167b2d JSLint take 2, reoder function reorder 82e0f38 Reindent and JSLint take 1. git-subtree-dir: 3.0/themes/pear4gallery3 git-subtree-split: 11c3c2ac87bc21b5daf5384e32d77492c5d6779a
2012-01-10 14:07:23 +00:00
event.preventDefault();
self._show($(event.currentTarget).attr("href"));
return false;
});
} else {
self._show(this.element.attr("href"));
}
},
_show: function(sHref) {
var self = this;
var eDialog = '<div id="g-dialog"></div>';
if ($("#g-dialog").length) {
$("#g-dialog").dialog("close");
}
$("body").append(eDialog);
if (!self.options.close) {
self.options.close = self.close_dialog;
}
$("#g-dialog").dialog(self.options);
$("#g-dialog").gallery_show_loading();
$.ajax({
url: sHref,
type: "GET",
beforeSend: function(xhr) {
// Until we convert to jquery 1.4, we need to save the XMLHttpRequest object so that we
// can detect the mime type of the reply
this.xhrData = xhr;
},
success: function(data, textStatus, xhr) {
// Pre jquery 1.4, get the saved XMLHttpRequest object
if (xhr == undefined) {
xhr = this.xhrData;
}
var mimeType = /^(\w+\/\w+)\;?/.exec(xhr.getResponseHeader("Content-Type"));
var content = "";
if (mimeType[1] == "application/json") {
data = JSON.parse(data);
content = unescape(data.html);
} else {
content = data;
}
$("#g-dialog").html(content).gallery_show_loading();
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
2012-03-13 14:31:02 +00:00
$("#g-add-comment,#g-dialog .showCommentForm").gallery_dialog();
Squashed '3.0/themes/pear4gallery3/' changes from b24d37b..11c3c2a 11c3c2a version 3.0 063ad6f move of context menu to top of thumb 0188d22 closes #4, now the form-dialog is just loaded once 508366d annoying " 4047609 fixes #8, support for slideshow duration 5ed2ff0 updated options page b65bc7b fixes #7, image animation d6d5319 Removed temporary sidebarToggle 9499b7b Attempt to fix #3, support for a sidebar 13b0419 fixes #5, issues with hovering thumbnails e0fcc41 Fix for broken slideshow, fixes #6 0bdd3c6 Fix for slideShowImages when album is empty. ca62330 Fix for broken dialogs f0d9e34 Copy of gallery.dialog.js from G3.0.0 e4a18f3 Updated jqury version. 7be51a8 Added support for breadcrumbs and sidebar (enable via theme options) fad0fe4 Hash update 9d3b519 Fix for detail hash Imgage preload a2cfa32 Fix for IE Support for using 'esc' to hide detailView 41a9863 fix so only Grid mode is supported if album does not contain any images 92c70a1 themeing the exif data 22386c3 Combined viewMode.png and removed some depricated files. dc10f0a New icons. cad0376 Fix for height of thumbs. 5c21b24 updated paginator with support for hash 6a13dab Updated theme b305613 fix for pageheight, with paginator ae87410 lNavBar fix 751bd86 New ui-theme 9a937a1 first attempt for item-option-overlay d024eba Fix for setTimeout. e167b2d JSLint take 2, reoder function reorder 82e0f38 Reindent and JSLint take 1. git-subtree-dir: 3.0/themes/pear4gallery3 git-subtree-split: 11c3c2ac87bc21b5daf5384e32d77492c5d6779a
2012-01-10 14:07:23 +00:00
if ($("#g-dialog form").length) {
self.form_loaded(null, $("#g-dialog form"));
}
self._layout();
$("#g-dialog").dialog("open");
self._set_title();
if ($("#g-dialog form").length) {
self._ajaxify_dialog();
//Possible not necessary but kept just in case.
$("#g-dialog").removeClass("g-loading-small g-loading-large");
}
}
});
$("#g-dialog").dialog("option", "self", self);
},
_layout: function() {
var dialogWidth;
var dialogHeight = $("#g-dialog").height();
var cssWidth = new String($("#g-dialog form").css("width"));
var childWidth = cssWidth.replace(/[^0-9]/g,"");
var size = $.gallery_get_viewport_size();
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
2012-03-13 14:31:02 +00:00
if ($("#g-dialog iframe").length && !$("#g-dialog #fb-root")) {
Squashed '3.0/themes/pear4gallery3/' changes from b24d37b..11c3c2a 11c3c2a version 3.0 063ad6f move of context menu to top of thumb 0188d22 closes #4, now the form-dialog is just loaded once 508366d annoying " 4047609 fixes #8, support for slideshow duration 5ed2ff0 updated options page b65bc7b fixes #7, image animation d6d5319 Removed temporary sidebarToggle 9499b7b Attempt to fix #3, support for a sidebar 13b0419 fixes #5, issues with hovering thumbnails e0fcc41 Fix for broken slideshow, fixes #6 0bdd3c6 Fix for slideShowImages when album is empty. ca62330 Fix for broken dialogs f0d9e34 Copy of gallery.dialog.js from G3.0.0 e4a18f3 Updated jqury version. 7be51a8 Added support for breadcrumbs and sidebar (enable via theme options) fad0fe4 Hash update 9d3b519 Fix for detail hash Imgage preload a2cfa32 Fix for IE Support for using 'esc' to hide detailView 41a9863 fix so only Grid mode is supported if album does not contain any images 92c70a1 themeing the exif data 22386c3 Combined viewMode.png and removed some depricated files. dc10f0a New icons. cad0376 Fix for height of thumbs. 5c21b24 updated paginator with support for hash 6a13dab Updated theme b305613 fix for pageheight, with paginator ae87410 lNavBar fix 751bd86 New ui-theme 9a937a1 first attempt for item-option-overlay d024eba Fix for setTimeout. e167b2d JSLint take 2, reoder function reorder 82e0f38 Reindent and JSLint take 1. git-subtree-dir: 3.0/themes/pear4gallery3 git-subtree-split: 11c3c2ac87bc21b5daf5384e32d77492c5d6779a
2012-01-10 14:07:23 +00:00
dialogWidth = size.width() - 100;
// Set the iframe width and height
$("#g-dialog iframe").width("100%").height(size.height() - 100);
} else if ($("#g-dialog .g-dialog-panel").length) {
dialogWidth = size.width() - 100;
$("#g-dialog").dialog("option", "height", size.height() - 100);
} else if (childWidth == "" || childWidth > 300) {
dialogWidth = 500;
}
$("#g-dialog").dialog('option', 'width', dialogWidth);
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
2012-03-13 14:31:02 +00:00
var mosaicTableH = $("#mosaicTable").height();
if (mosaicTableH !== 0 && $("#g-dialog").height() > mosaicTableH) {
$("#g-dialog").dialog("option", "height", mosaicTableH);
}
$('#g-dialog').dialog( "option", "position", 'center' );
Squashed '3.0/themes/pear4gallery3/' changes from b24d37b..11c3c2a 11c3c2a version 3.0 063ad6f move of context menu to top of thumb 0188d22 closes #4, now the form-dialog is just loaded once 508366d annoying " 4047609 fixes #8, support for slideshow duration 5ed2ff0 updated options page b65bc7b fixes #7, image animation d6d5319 Removed temporary sidebarToggle 9499b7b Attempt to fix #3, support for a sidebar 13b0419 fixes #5, issues with hovering thumbnails e0fcc41 Fix for broken slideshow, fixes #6 0bdd3c6 Fix for slideShowImages when album is empty. ca62330 Fix for broken dialogs f0d9e34 Copy of gallery.dialog.js from G3.0.0 e4a18f3 Updated jqury version. 7be51a8 Added support for breadcrumbs and sidebar (enable via theme options) fad0fe4 Hash update 9d3b519 Fix for detail hash Imgage preload a2cfa32 Fix for IE Support for using 'esc' to hide detailView 41a9863 fix so only Grid mode is supported if album does not contain any images 92c70a1 themeing the exif data 22386c3 Combined viewMode.png and removed some depricated files. dc10f0a New icons. cad0376 Fix for height of thumbs. 5c21b24 updated paginator with support for hash 6a13dab Updated theme b305613 fix for pageheight, with paginator ae87410 lNavBar fix 751bd86 New ui-theme 9a937a1 first attempt for item-option-overlay d024eba Fix for setTimeout. e167b2d JSLint take 2, reoder function reorder 82e0f38 Reindent and JSLint take 1. git-subtree-dir: 3.0/themes/pear4gallery3 git-subtree-split: 11c3c2ac87bc21b5daf5384e32d77492c5d6779a
2012-01-10 14:07:23 +00:00
},
form_loaded: function(event, ui) {
// Should be defined (and localized) in the theme
MSG_CANCEL = MSG_CANCEL || 'Cancel';
var eCancel = '<a href="#" class="g-cancel g-left">' + MSG_CANCEL + '</a>';
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
2012-03-13 14:31:02 +00:00
$("#g-dialog input[type=submit]").addClass("submit");
Squashed '3.0/themes/pear4gallery3/' changes from b24d37b..11c3c2a 11c3c2a version 3.0 063ad6f move of context menu to top of thumb 0188d22 closes #4, now the form-dialog is just loaded once 508366d annoying " 4047609 fixes #8, support for slideshow duration 5ed2ff0 updated options page b65bc7b fixes #7, image animation d6d5319 Removed temporary sidebarToggle 9499b7b Attempt to fix #3, support for a sidebar 13b0419 fixes #5, issues with hovering thumbnails e0fcc41 Fix for broken slideshow, fixes #6 0bdd3c6 Fix for slideShowImages when album is empty. ca62330 Fix for broken dialogs f0d9e34 Copy of gallery.dialog.js from G3.0.0 e4a18f3 Updated jqury version. 7be51a8 Added support for breadcrumbs and sidebar (enable via theme options) fad0fe4 Hash update 9d3b519 Fix for detail hash Imgage preload a2cfa32 Fix for IE Support for using 'esc' to hide detailView 41a9863 fix so only Grid mode is supported if album does not contain any images 92c70a1 themeing the exif data 22386c3 Combined viewMode.png and removed some depricated files. dc10f0a New icons. cad0376 Fix for height of thumbs. 5c21b24 updated paginator with support for hash 6a13dab Updated theme b305613 fix for pageheight, with paginator ae87410 lNavBar fix 751bd86 New ui-theme 9a937a1 first attempt for item-option-overlay d024eba Fix for setTimeout. e167b2d JSLint take 2, reoder function reorder 82e0f38 Reindent and JSLint take 1. git-subtree-dir: 3.0/themes/pear4gallery3 git-subtree-split: 11c3c2ac87bc21b5daf5384e32d77492c5d6779a
2012-01-10 14:07:23 +00:00
if ($("#g-dialog .submit").length) {
$("#g-dialog .submit").addClass("ui-state-default ui-corner-all");
$.fn.gallery_hover_init();
$("#g-dialog .submit").parent().append(eCancel);
$("#g-dialog .g-cancel").click(function(event) {
$("#g-dialog").dialog("close");
event.preventDefault();
});
}
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
2012-03-13 14:31:02 +00:00
$("#g-dialog textarea,#g-dialog input").addClass("ui-widget-content ui-corner-all");
Squashed '3.0/themes/pear4gallery3/' changes from b24d37b..11c3c2a 11c3c2a version 3.0 063ad6f move of context menu to top of thumb 0188d22 closes #4, now the form-dialog is just loaded once 508366d annoying " 4047609 fixes #8, support for slideshow duration 5ed2ff0 updated options page b65bc7b fixes #7, image animation d6d5319 Removed temporary sidebarToggle 9499b7b Attempt to fix #3, support for a sidebar 13b0419 fixes #5, issues with hovering thumbnails e0fcc41 Fix for broken slideshow, fixes #6 0bdd3c6 Fix for slideShowImages when album is empty. ca62330 Fix for broken dialogs f0d9e34 Copy of gallery.dialog.js from G3.0.0 e4a18f3 Updated jqury version. 7be51a8 Added support for breadcrumbs and sidebar (enable via theme options) fad0fe4 Hash update 9d3b519 Fix for detail hash Imgage preload a2cfa32 Fix for IE Support for using 'esc' to hide detailView 41a9863 fix so only Grid mode is supported if album does not contain any images 92c70a1 themeing the exif data 22386c3 Combined viewMode.png and removed some depricated files. dc10f0a New icons. cad0376 Fix for height of thumbs. 5c21b24 updated paginator with support for hash 6a13dab Updated theme b305613 fix for pageheight, with paginator ae87410 lNavBar fix 751bd86 New ui-theme 9a937a1 first attempt for item-option-overlay d024eba Fix for setTimeout. e167b2d JSLint take 2, reoder function reorder 82e0f38 Reindent and JSLint take 1. git-subtree-dir: 3.0/themes/pear4gallery3 git-subtree-split: 11c3c2ac87bc21b5daf5384e32d77492c5d6779a
2012-01-10 14:07:23 +00:00
$("#g-dialog .ui-state-default").hover(
function() {
$(this).addClass("ui-state-hover");
},
function() {
$(this).removeClass("ui-state-hover");
}
);
},
close_dialog: function(event, ui) {
var self = $("#g-dialog").dialog("option", "self");
if ($("#g-dialog form").length) {
self._trigger("form_closing", null, $("#g-dialog form"));
}
self._trigger("dialog_closing", null, $("#g-dialog"));
$("#g-dialog").dialog("destroy").remove();
},
_ajaxify_dialog: function() {
var self = this;
$("#g-dialog form").ajaxForm({
beforeSubmit: function(formData, form, options) {
form.find(":submit")
.addClass("ui-state-disabled")
.attr("disabled", "disabled");
return true;
},
beforeSend: function(xhr) {
// Until we convert to jquery 1.4, we need to save the XMLHttpRequest object so that we
// can detect the mime type of the reply
this.xhrData = xhr;
},
success: function(data) {
if (data.html) {
$("#g-dialog").html(unescape(data.html));
$("#g-dialog").dialog("option", "position", "center");
$("#g-dialog form :submit").removeClass("ui-state-disabled")
.attr("disabled", null);
self._set_title();
self._ajaxify_dialog();
self.form_loaded(null, $("#g-dialog form"));
if (typeof data.reset == 'function') {
eval(data.reset + '()');
}
}
if (data.result == "success") {
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
2012-03-13 14:31:02 +00:00
if (data.view && data.form) {
$("#detail_comment").click();
return;
}
Squashed '3.0/themes/pear4gallery3/' changes from b24d37b..11c3c2a 11c3c2a version 3.0 063ad6f move of context menu to top of thumb 0188d22 closes #4, now the form-dialog is just loaded once 508366d annoying " 4047609 fixes #8, support for slideshow duration 5ed2ff0 updated options page b65bc7b fixes #7, image animation d6d5319 Removed temporary sidebarToggle 9499b7b Attempt to fix #3, support for a sidebar 13b0419 fixes #5, issues with hovering thumbnails e0fcc41 Fix for broken slideshow, fixes #6 0bdd3c6 Fix for slideShowImages when album is empty. ca62330 Fix for broken dialogs f0d9e34 Copy of gallery.dialog.js from G3.0.0 e4a18f3 Updated jqury version. 7be51a8 Added support for breadcrumbs and sidebar (enable via theme options) fad0fe4 Hash update 9d3b519 Fix for detail hash Imgage preload a2cfa32 Fix for IE Support for using 'esc' to hide detailView 41a9863 fix so only Grid mode is supported if album does not contain any images 92c70a1 themeing the exif data 22386c3 Combined viewMode.png and removed some depricated files. dc10f0a New icons. cad0376 Fix for height of thumbs. 5c21b24 updated paginator with support for hash 6a13dab Updated theme b305613 fix for pageheight, with paginator ae87410 lNavBar fix 751bd86 New ui-theme 9a937a1 first attempt for item-option-overlay d024eba Fix for setTimeout. e167b2d JSLint take 2, reoder function reorder 82e0f38 Reindent and JSLint take 1. git-subtree-dir: 3.0/themes/pear4gallery3 git-subtree-split: 11c3c2ac87bc21b5daf5384e32d77492c5d6779a
2012-01-10 14:07:23 +00:00
if (data.location) {
window.location = data.location;
} else {
window.location.reload();
}
}
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
2012-03-13 14:31:02 +00:00
else {
$("#g-dialog").dialog('option', 'title', 'Error');
if(data.form) {
$("#g-dialog").html(data.form);
self.form_loaded(null, $("#g-dialog form"));
self._ajaxify_dialog();
} else {
$("#g-dialog").html("Something went wrong, try again later.");
}
}
$('#g-dialog').dialog( "option", "position", 'center' );
Squashed '3.0/themes/pear4gallery3/' changes from b24d37b..11c3c2a 11c3c2a version 3.0 063ad6f move of context menu to top of thumb 0188d22 closes #4, now the form-dialog is just loaded once 508366d annoying " 4047609 fixes #8, support for slideshow duration 5ed2ff0 updated options page b65bc7b fixes #7, image animation d6d5319 Removed temporary sidebarToggle 9499b7b Attempt to fix #3, support for a sidebar 13b0419 fixes #5, issues with hovering thumbnails e0fcc41 Fix for broken slideshow, fixes #6 0bdd3c6 Fix for slideShowImages when album is empty. ca62330 Fix for broken dialogs f0d9e34 Copy of gallery.dialog.js from G3.0.0 e4a18f3 Updated jqury version. 7be51a8 Added support for breadcrumbs and sidebar (enable via theme options) fad0fe4 Hash update 9d3b519 Fix for detail hash Imgage preload a2cfa32 Fix for IE Support for using 'esc' to hide detailView 41a9863 fix so only Grid mode is supported if album does not contain any images 92c70a1 themeing the exif data 22386c3 Combined viewMode.png and removed some depricated files. dc10f0a New icons. cad0376 Fix for height of thumbs. 5c21b24 updated paginator with support for hash 6a13dab Updated theme b305613 fix for pageheight, with paginator ae87410 lNavBar fix 751bd86 New ui-theme 9a937a1 first attempt for item-option-overlay d024eba Fix for setTimeout. e167b2d JSLint take 2, reoder function reorder 82e0f38 Reindent and JSLint take 1. git-subtree-dir: 3.0/themes/pear4gallery3 git-subtree-split: 11c3c2ac87bc21b5daf5384e32d77492c5d6779a
2012-01-10 14:07:23 +00:00
}
});
},
_set_title: function() {
// Remove titlebar for progress dialogs or set title
if ($("#g-dialog #g-progress").length) {
$(".ui-dialog-titlebar").remove();
} else if ($("#g-dialog h1").length) {
$("#g-dialog").dialog('option', 'title', $("#g-dialog h1:eq(0)").html());
$("#g-dialog h1:eq(0)").hide();
} else if ($("#g-dialog fieldset legend").length) {
$("#g-dialog").dialog('option', 'title', $("#g-dialog fieldset legend:eq(0)").html());
}
},
form_closing: function(event, ui) {},
dialog_closing: function(event, ui) {}
});
$.extend($.ui.gallery_dialog, {
defaults: {
autoOpen: false,
autoResize: true,
modal: true,
resizable: false,
position: "center"
}
});
})(jQuery);