From 5d8ef96b9f16cb1c78babdb928262d4952927eae Mon Sep 17 00:00:00 2001 From: viraj96 Date: Thu, 10 Mar 2016 17:34:23 +0530 Subject: [PATCH 1/4] Sort buttons fixed invalid url fixed additional fix to infobox invalid URL fixed Delete public.js Update galleryalbum.js Update galleryinfobox.js invalid url Delete public.js Update gallery.js Update public.php Update gallery.js Update galleryview.js Update galleryview.js Update galleryview.js Update galleryview.js Update galleryview.js invalid url fixes Revert "invalid url fixed" This reverts commit 34738a0801f7bd165e862fad2a125213c84ce2d3. Sort buttons fixed Revert "invalid url fixed" This reverts commit 34738a0801f7bd165e862fad2a125213c84ce2d3. Made some minor changes Sort buttons issue Sort buttons issue 2 Sort buttons issue 3 Sort buttons issue 3 --- css/public.css | 7 ------- js/galleryview.js | 32 ++++++++++++++------------------ templates/public.php | 2 +- 3 files changed, 15 insertions(+), 26 deletions(-) diff --git a/css/public.css b/css/public.css index 4be4bb88c7..94265c2aa0 100644 --- a/css/public.css +++ b/css/public.css @@ -40,13 +40,6 @@ body { opacity: .5; } -#save-button-confirm:disabled, #save-button-confirm:disabled:hover, #save-button-confirm:disabled:focus { - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=20)"; - filter: alpha(opacity=20); - opacity: .2; - cursor: default; -} - #save-button-confirm:hover, #save-button-confirm:focus { opacity: 1; diff --git a/js/galleryview.js b/js/galleryview.js index 901928f477..b5908973ec 100644 --- a/js/galleryview.js +++ b/js/galleryview.js @@ -35,7 +35,6 @@ // Only do it when the app is initialised if (this.requestId === -1) { this._initButtons(); - this._blankUrl(); } if ($.isEmptyObject(Gallery.imageMap)) { this.clear(); @@ -232,9 +231,20 @@ var availableWidth = $(window).width() - Gallery.buttonsWidth; this.breadcrumb.init(albumPath, availableWidth); - - $('#sort-name-button').show(); - $('#sort-date-button').show(); + var album = Gallery.albumMap[albumPath]; + var sum = album.images.length + album.subAlbums.length; + //If sum of the number of images and subalbums exceeds 1 then show the buttons. + if(sum>1) + { + $('#sort-name-button').show(); + $('#sort-date-button').show(); + } + //Otherwise do not show buttons. + else + { + $('#sort-name-button').hide(); + $('#sort-date-button').hide(); + } var currentSort = Gallery.config.albumSorting; this.sortControlsSetup(currentSort.type, currentSort.order); Gallery.albumMap[Gallery.currentAlbum].images.sort( @@ -341,20 +351,6 @@ $(this).removeClass('hover'); }); } - }, - - /** - * If no url is entered then do not show the error box. - * - */ - _blankUrl: function() { - $('#remote_address').on("change keyup paste", function() { - if ($(this).val() === '') { - $('#save-button-confirm').prop('disabled', true); - } else { - $('#save-button-confirm').prop('disabled', false); - } - }); } }; diff --git a/templates/public.php b/templates/public.php index 3eee6b91a4..ff92420c49 100644 --- a/templates/public.php +++ b/templates/public.php @@ -82,7 +82,7 @@ + class="icon-confirm svg"> From 1078b405c080aebf4c169ca56f8e72aa0fdd6be7 Mon Sep 17 00:00:00 2001 From: viraj96 Date: Thu, 10 Mar 2016 21:42:56 +0530 Subject: [PATCH 2/4] Revert "Sort buttons fixed" This reverts commit 5d8ef96b9f16cb1c78babdb928262d4952927eae. --- css/public.css | 7 +++++++ js/galleryview.js | 32 ++++++++++++++++++-------------- templates/public.php | 2 +- 3 files changed, 26 insertions(+), 15 deletions(-) diff --git a/css/public.css b/css/public.css index 94265c2aa0..4be4bb88c7 100644 --- a/css/public.css +++ b/css/public.css @@ -40,6 +40,13 @@ body { opacity: .5; } +#save-button-confirm:disabled, #save-button-confirm:disabled:hover, #save-button-confirm:disabled:focus { + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=20)"; + filter: alpha(opacity=20); + opacity: .2; + cursor: default; +} + #save-button-confirm:hover, #save-button-confirm:focus { opacity: 1; diff --git a/js/galleryview.js b/js/galleryview.js index b5908973ec..901928f477 100644 --- a/js/galleryview.js +++ b/js/galleryview.js @@ -35,6 +35,7 @@ // Only do it when the app is initialised if (this.requestId === -1) { this._initButtons(); + this._blankUrl(); } if ($.isEmptyObject(Gallery.imageMap)) { this.clear(); @@ -231,20 +232,9 @@ var availableWidth = $(window).width() - Gallery.buttonsWidth; this.breadcrumb.init(albumPath, availableWidth); - var album = Gallery.albumMap[albumPath]; - var sum = album.images.length + album.subAlbums.length; - //If sum of the number of images and subalbums exceeds 1 then show the buttons. - if(sum>1) - { - $('#sort-name-button').show(); - $('#sort-date-button').show(); - } - //Otherwise do not show buttons. - else - { - $('#sort-name-button').hide(); - $('#sort-date-button').hide(); - } + + $('#sort-name-button').show(); + $('#sort-date-button').show(); var currentSort = Gallery.config.albumSorting; this.sortControlsSetup(currentSort.type, currentSort.order); Gallery.albumMap[Gallery.currentAlbum].images.sort( @@ -351,6 +341,20 @@ $(this).removeClass('hover'); }); } + }, + + /** + * If no url is entered then do not show the error box. + * + */ + _blankUrl: function() { + $('#remote_address').on("change keyup paste", function() { + if ($(this).val() === '') { + $('#save-button-confirm').prop('disabled', true); + } else { + $('#save-button-confirm').prop('disabled', false); + } + }); } }; diff --git a/templates/public.php b/templates/public.php index ff92420c49..3eee6b91a4 100644 --- a/templates/public.php +++ b/templates/public.php @@ -82,7 +82,7 @@ + class="icon-confirm svg" disabled> From fb25ac5749f1910a2a0424f4775fde0dbb835f10 Mon Sep 17 00:00:00 2001 From: viraj96 Date: Thu, 10 Mar 2016 21:48:44 +0530 Subject: [PATCH 3/4] final sort buttons --- js/galleryview.js | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/js/galleryview.js b/js/galleryview.js index 901928f477..f6b4d55322 100644 --- a/js/galleryview.js +++ b/js/galleryview.js @@ -232,9 +232,22 @@ var availableWidth = $(window).width() - Gallery.buttonsWidth; this.breadcrumb.init(albumPath, availableWidth); - - $('#sort-name-button').show(); - $('#sort-date-button').show(); + var album = Gallery.albumMap[albumPath]; + var images = album.images; + var subAlbums = album.subAlbums; + + var sum = album.images.length + album.subAlbums.length; + //If sum of the number of images and subalbums exceeds 1 then show the buttons. + if(sum > 1) + { + $('#sort-name-button').show(); + $('#sort-date-button').show(); + } + else + { + $('#sort-name-button').hide(); + $('#sort-date-button').hide(); + } var currentSort = Gallery.config.albumSorting; this.sortControlsSetup(currentSort.type, currentSort.order); Gallery.albumMap[Gallery.currentAlbum].images.sort( From b4c8794376de3f519a92c546af5f8f1c5879bfbc Mon Sep 17 00:00:00 2001 From: viraj96 Date: Thu, 10 Mar 2016 21:51:11 +0530 Subject: [PATCH 4/4] final sort buttons --- js/galleryview.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/js/galleryview.js b/js/galleryview.js index f6b4d55322..339d5b444c 100644 --- a/js/galleryview.js +++ b/js/galleryview.js @@ -233,8 +233,6 @@ var availableWidth = $(window).width() - Gallery.buttonsWidth; this.breadcrumb.init(albumPath, availableWidth); var album = Gallery.albumMap[albumPath]; - var images = album.images; - var subAlbums = album.subAlbums; var sum = album.images.length + album.subAlbums.length; //If sum of the number of images and subalbums exceeds 1 then show the buttons.