Skip to content

Commit

Permalink
Item14444: fixed initializer and docu
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDaum committed Jul 27, 2017
1 parent d80fe35 commit 7765c4c
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 27 deletions.
13 changes: 7 additions & 6 deletions data/System/JQPackeryContrib.txt
Expand Up @@ -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"}%
11 changes: 3 additions & 8 deletions 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
Expand All @@ -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;
2 changes: 1 addition & 1 deletion 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
Expand Down
1 change: 1 addition & 0 deletions 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
Expand Down
17 changes: 11 additions & 6 deletions pub/System/JQPackeryContrib/packery.init.uncompressed.js
Expand Up @@ -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");
});
});

17 changes: 11 additions & 6 deletions pub/System/JQPackeryContrib/pkg.uncompressed.js
Expand Up @@ -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");
});
});

0 comments on commit 7765c4c

Please sign in to comment.