From 69c9f4588c57a1159ab18c5987f99ea5471579d5 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 7 Dec 2015 12:13:51 +0100 Subject: make justify gallery work with more than one albums per page (eg album widget) --- view/js/main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'view/js') diff --git a/view/js/main.js b/view/js/main.js index ca7d50b90..d670b704a 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -758,9 +758,9 @@ function pageUpdate() { }); } -function justifyPhotos() { +function justifyPhotos(id) { justifiedGalleryActive = true; - $('#photo-album-contents').justifiedGallery({ + $('#' + id).justifiedGallery({ selector: '> a, > div:not(.spinner, #page-end)', margins: 3, border: 0, @@ -775,9 +775,9 @@ function justifyPhotos() { }).on('jg.complete', function(e){ justifiedGalleryActive = false; }); } -function justifyPhotosAjax() { +function justifyPhotosAjax(id) { justifiedGalleryActive = true; - $('#photo-album-contents').justifiedGallery('norewind').on('jg.complete', function(e){ justifiedGalleryActive = false; }); + $('#' + id).justifiedGallery('norewind').on('jg.complete', function(e){ justifiedGalleryActive = false; }); } function notify_popup_loader(notifyType) { -- cgit v1.2.3 From 293df6308c2c8b3581ee4ac812b3ac65f31ccc66 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 7 Dec 2015 18:57:03 +0100 Subject: some style.css janitor work --- view/js/mod_mitem.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'view/js') diff --git a/view/js/mod_mitem.js b/view/js/mod_mitem.js index e883763df..56805a723 100644 --- a/view/js/mod_mitem.js +++ b/view/js/mod_mitem.js @@ -2,11 +2,6 @@ * JavaScript used by mod/mitem. */ $(document).ready(function() { - $("a#settings-default-perms-menu").colorbox({ - 'inline' : true, - 'transition' : 'elastic' - }); - $('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() { var selstr; $('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() { @@ -19,4 +14,4 @@ $(document).ready(function() { $('#jot-public').show(); } }).trigger('change'); -}); \ No newline at end of file +}); -- cgit v1.2.3 From 68cbebe1a50162a83ed27f6a4afde831d25585ea Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 7 Dec 2015 20:28:17 +0100 Subject: mod_mitem.js is obsolete --- view/js/mod_mitem.js | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 view/js/mod_mitem.js (limited to 'view/js') diff --git a/view/js/mod_mitem.js b/view/js/mod_mitem.js deleted file mode 100644 index 56805a723..000000000 --- a/view/js/mod_mitem.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * JavaScript used by mod/mitem. - */ -$(document).ready(function() { - $('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() { - var selstr; - $('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() { - selstr = $(this).text(); - $('#jot-perms-icon').removeClass('icon-unlock').addClass('icon-lock'); - $('#jot-public').hide(); - }); - if(selstr === null) { - $('#jot-perms-icon').removeClass('icon-lock').addClass('icon-unlock'); - $('#jot-public').show(); - } - }).trigger('change'); -}); -- cgit v1.2.3