diff --git a/data/System/JQPackeryContrib.txt b/data/System/JQPackeryContrib.txt index 09645e1..949fe0f 100644 --- a/data/System/JQPackeryContrib.txt +++ b/data/System/JQPackeryContrib.txt @@ -142,15 +142,16 @@ See more demos at http://packery.metafizzy.co/ ---++ Change History -| | | +%TABLE{columnwidths="7em" tablewidth="100%"}% +| 27 Jul 2017 | initial release | %META:FORM{name="PackageForm"}% -%META:FIELD{name="Author" title="Author" value="MichaelDaum"}% +%META:FIELD{name="Author" title="Author" value="Michael Daum"}% %META:FIELD{name="Version" title="Version" value="%25$VERSION%25"}% %META:FIELD{name="Release" title="Release" value="%25$RELEASE%25"}% -%META:FIELD{name="Description" title="Description" value=""}% +%META:FIELD{name="Description" title="Description" value="%25$SHORTDESCRIPTION%25"}% %META:FIELD{name="Repository" title="Repository" value="https://github.com/foswiki/%25$ROOTMODULE%25"}% -%META:FIELD{name="Copyright" title="Copyright" value="2016, MichaelDaum, All Rights Reserved"}% +%META:FIELD{name="Copyright" title="Copyright" value="2017, MichaelDaum, All Rights Reserved"}% %META:FIELD{name="License" title="License" value="GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]])"}% -%META:FIELD{name="Home" title="Home" value="http://foswiki.org/Extensions/%25$ROOTMODULE%25"}% -%META:FIELD{name="Support" title="Support" value="http://foswiki.org/Support/%25$ROOTMODULE%25"}% +%META:FIELD{name="Home" title="Home" value="https://foswiki.org/Extensions/%25$ROOTMODULE%25"}% +%META:FIELD{name="Support" title="Support" value="https://foswiki.org/Support/%25$ROOTMODULE%25"}% diff --git a/lib/Foswiki/Contrib/JQPackeryContrib.pm b/lib/Foswiki/Contrib/JQPackeryContrib.pm index 1c6de08..b61de9d 100644 --- a/lib/Foswiki/Contrib/JQPackeryContrib.pm +++ b/lib/Foswiki/Contrib/JQPackeryContrib.pm @@ -1,6 +1,6 @@ # Extension for Foswiki - The Free and Open Source Wiki, http://foswiki.org/ # -# JQPackeryContrib is Copyright (C) 2016 Michael Daum http://michaeldaumconsulting.com +# JQPackeryContrib is Copyright (C) 2017 Michael Daum http://michaeldaumconsulting.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -20,14 +20,9 @@ use warnings; use Foswiki::Func (); -our $VERSION = '0.02'; -our $RELEASE = '24 Nov 2016'; +our $VERSION = '1.00'; +our $RELEASE = '27 Jul 2017'; our $SHORTDESCRIPTION = 'Gapless, draggable grid layouts'; our $NO_PREFS_IN_TOPIC = 1; -sub init { - require Foswiki::Plugins::JQueryPlugin; - Foswiki::Plugins::JQueryPlugin::registerPlugin("JQPackeryContrib", "Foswiki::Contrib::JQPackeryContrib::Core"); -} - 1; diff --git a/lib/Foswiki/Contrib/JQPackeryContrib/Core.pm b/lib/Foswiki/Contrib/JQPackeryContrib/Core.pm index 5b7f12c..3340ebe 100644 --- a/lib/Foswiki/Contrib/JQPackeryContrib/Core.pm +++ b/lib/Foswiki/Contrib/JQPackeryContrib/Core.pm @@ -1,6 +1,6 @@ # Extension for Foswiki - The Free and Open Source Wiki, http://foswiki.org/ # -# JQPackeryContrib is Copyright (C) 2016 Michael Daum http://michaeldaumconsulting.com +# JQPackeryContrib is Copyright (C) 2017 Michael Daum http://michaeldaumconsulting.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License diff --git a/lib/Foswiki/Contrib/JQPackeryContrib/MANIFEST b/lib/Foswiki/Contrib/JQPackeryContrib/MANIFEST index bdc22bc..61466ae 100644 --- a/lib/Foswiki/Contrib/JQPackeryContrib/MANIFEST +++ b/lib/Foswiki/Contrib/JQPackeryContrib/MANIFEST @@ -1,3 +1,4 @@ +!noci data/System/JQPackeryContrib.txt 0644 lib/Foswiki/Contrib/JQPackeryContrib/Config.spec 0644 lib/Foswiki/Contrib/JQPackeryContrib/Core.pm 0644 diff --git a/pub/System/JQPackeryContrib/packery.init.uncompressed.js b/pub/System/JQPackeryContrib/packery.init.uncompressed.js index a8b99f9..a51c567 100644 --- a/pub/System/JQPackeryContrib/packery.init.uncompressed.js +++ b/pub/System/JQPackeryContrib/packery.init.uncompressed.js @@ -13,20 +13,25 @@ jQuery(function($) { $this.css('visibility', 'visible');//.hide().fadeIn(); }); + function finishInit() { + if (opts.draggable) { + $items = $($this.packery('getItemElements')).draggable(); + $this.packery( 'bindUIDraggableEvents', $items ); + } + + $this.addClass("jqPackeryInited"); + } + if (opts.waitForImages) { $this.imagesLoaded(function() { $this.packery(opts); + finishInit(); }); } else { $this.packery(opts); + finishInit(); } - if (opts.draggable) { - $items = $($this.packery('getItemElements')).draggable(); - $this.packery( 'bindUIDraggableEvents', $items ); - } - - $this.addClass("jqPackeryInited"); }); }); diff --git a/pub/System/JQPackeryContrib/pkg.uncompressed.js b/pub/System/JQPackeryContrib/pkg.uncompressed.js index e006c22..8ec01d7 100644 --- a/pub/System/JQPackeryContrib/pkg.uncompressed.js +++ b/pub/System/JQPackeryContrib/pkg.uncompressed.js @@ -3423,20 +3423,25 @@ jQuery(function($) { $this.css('visibility', 'visible');//.hide().fadeIn(); }); + function finishInit() { + if (opts.draggable) { + $items = $($this.packery('getItemElements')).draggable(); + $this.packery( 'bindUIDraggableEvents', $items ); + } + + $this.addClass("jqPackeryInited"); + } + if (opts.waitForImages) { $this.imagesLoaded(function() { $this.packery(opts); + finishInit(); }); } else { $this.packery(opts); + finishInit(); } - if (opts.draggable) { - $items = $($this.packery('getItemElements')).draggable(); - $this.packery( 'bindUIDraggableEvents', $items ); - } - - $this.addClass("jqPackeryInited"); }); });