Skip to content

Commit

Permalink
Item12511: deprecate jquery.metadata
Browse files Browse the repository at this point in the history
make sure the plugin is still releasable
  • Loading branch information
MichaelDaum committed Jan 23, 2017
1 parent 047543c commit 636b0db
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 37 deletions.
13 changes: 13 additions & 0 deletions .gitignore
@@ -0,0 +1,13 @@
*.swp
*.gz
igp_*
pub/System/JQPrettyPhotoContrib/jquery.prettyPhoto.init.js
pub/System/JQPrettyPhotoContrib/jquery.prettyPhoto.js
pub/System/JQPrettyPhotoContrib/jquery.prettyPhoto.css
/JQPrettyPhotoContrib.md5
/JQPrettyPhotoContrib.sha1
/JQPrettyPhotoContrib.tgz
/JQPrettyPhotoContrib.txt
/JQPrettyPhotoContrib.zip
/JQPrettyPhotoContrib_installer
/JQPrettyPhotoContrib_installer.pl
34 changes: 18 additions & 16 deletions data/System/JQPrettyPhotoContrib.txt
@@ -1,6 +1,6 @@
%META:TOPICINFO{author="ProjectContributor" comment="reprev" date="1302157505" format="1.1" reprev="2" version="3"}%
---+!! %TOPIC%
%SHORTDESCRIPTION%
%FORMFIELD{"Description"}%

%TOC%

Expand Down Expand Up @@ -30,29 +30,31 @@ will automatically switch from slimbox to prettyPhoto for lightboxing.
</div>

---++ Installation Instructions

%$INSTALL_INSTRUCTIONS%

---++ Info
<!--
* Set SHORTDESCRIPTION = %$SHORTDESCRIPTION%
-->

| Author(s): | Michael Daum|
| Copyright: | &copy; 2011 Michael Daum http://michaeldaumconsulting.com |
| License: | [[http://www.gnu.org/licenses/gpl.html][GPL (Gnu General Public License)]] |
| Release: | %$RELEASE% |
| Version: | %$VERSION% |
| Change History: | <!-- versions below in reverse order -->&nbsp; |
---++ Dependencies
%$DEPENDENCIES%

---++ Change History
%TABLE{columnwidths="7em" tablewidth="100%"}%
| 23 Jan 2017: | make sure the package is still release-able; deprecated jquery.metadata - use html5 data instead |
| 30 Sep 2011: | upgrading to prettyPhoto 3.1.3; \
switching off overlay gallery by default for performance reasons |
| 06 Apr 2011: | initial release |
| Dependencies: | %$DEPENDENCIES% |
| Home page: | Foswiki:Extensions/%TOPIC% |
| Support: | Foswiki:Support/%TOPIC% |


%META:FILEATTACHMENT{name="5.jpg" attachment="5.jpg" attr="" comment="" date="1302089011" size="44257" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="4.jpg" attachment="4.jpg" attr="" comment="" date="1302089012" size="98304" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="3.jpg" attachment="3.jpg" attr="" comment="" date="1302089014" size="35532" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="2.jpg" attachment="2.jpg" attr="" comment="" date="1302089016" size="84412" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="1.jpg" attachment="1.jpg" attr="" comment="" date="1302089018" size="61924" user="ProjectContributor" version="1"}%
%META:FORM{name="PackageForm"}%
%META:FIELD{name="Author" title="Author" value="Michael Daum"}%
%META:FIELD{name="Copyright" title="Copyright" value="&copy; 2011-2017 Michael Daum http://michaeldaumconsulting.com"}%
%META:FIELD{name="Description" title="Description" value="%25$SHORTDESCRIPTION%25"}%
%META:FIELD{name="Home" title="Home" value="Foswiki:Extensions/%TOPIC%"}%
%META:FIELD{name="License" title="License" value="[[http://www.gnu.org/licenses/gpl.html][GPL (Gnu General Public License)]]"}%
%META:FIELD{name="Release" title="Release" value="%$RELEASE%"}%
%META:FIELD{name="Repository" title="Repository" value="https://github.com/foswiki/%TOPIC%"}%
%META:FIELD{name="Support" title="Support" value="Foswiki:Support/%TOPIC%"}%
%META:FIELD{name="Version" title="Version" value="%$VERSION%"}%
6 changes: 3 additions & 3 deletions lib/Foswiki/Contrib/JQPrettyPhotoContrib.pm
@@ -1,6 +1,6 @@
# Plugin for Foswiki - The Free and Open Source Wiki, http://foswiki.org/
#
# JQPrettyPhotoContrib is Copyright (C) 2011 Michael Daum http://michaeldaumconsulting.com
# JQPrettyPhotoContrib is Copyright (C) 2011-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 @@ -25,8 +25,8 @@ use warnings;
=cut


our $VERSION = '1.11';
our $RELEASE = '1.11';
our $VERSION = '1.20';
our $RELEASE = '23 Jan 2017';
our $SHORTDESCRIPTION = 'Yet another nice lightbox plugin';
our $NO_PREFS_IN_TOPIC = 1;

Expand Down
2 changes: 1 addition & 1 deletion lib/Foswiki/Contrib/JQPrettyPhotoContrib/Core.pm
Expand Up @@ -50,7 +50,7 @@ sub new {
__END__
Foswiki - The Free and Open Source Wiki, http://foswiki.org/
Copyright (C) 2011 Michael Daum http://michaeldaumconsulting.com
Copyright (C) 2011-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
16 changes: 1 addition & 15 deletions lib/Foswiki/Contrib/JQPrettyPhotoContrib/build.pl
@@ -1,24 +1,10 @@
#!/usr/bin/perl -w
#!/usr/bin/env perl
BEGIN { unshift @INC, split( /:/, $ENV{FOSWIKI_LIBS} ); }
use Foswiki::Contrib::Build;

# Create the build object
$build = new Foswiki::Contrib::Build('JQPrettyPhotoContrib');

# (Optional) Set the details of the repository for uploads.
# This can be any web on any accessible Foswiki installation.
# These defaults will be used when expanding tokens in .txt
# files, but be warned, they can be overridden at upload time!

# name of web to upload to
$build->{UPLOADTARGETWEB} = 'Extensions';
# Full URL of pub directory
$build->{UPLOADTARGETPUB} = 'http://foswiki.org/pub';
# Full URL of bin directory
$build->{UPLOADTARGETSCRIPT} = 'http://foswiki.org/bin';
# Script extension
$build->{UPLOADTARGETSUFFIX} = '';

# Build the target on the command line, or the default target
$build->build($build->{target});

Expand Up @@ -11,15 +11,15 @@ jQuery(function($) {

$(".jqPrettyPhoto:not(.jqInitedPrettyPhoto)").livequery(function() {
var $this = $(this),
opts = $.extend({}, defaults, $this.metadata()),
opts = $.extend({}, defaults, $this.data(), $this.metadata()),
groupRel = "prettyPhoto["+Math.floor(Math.random() * 100)+"]";

$this.addClass("jqInitedPrettyPhoto");

function initPrettyPhoto() {
$this.find(opts.itemSelector).attr('rel', groupRel).each(function() {
var $el = $(this),
imgOpts = $.extend({}, $el.metadata()),
imgOpts = $.extend({}, $el.data(), $el.metadata()),
text = $el.find("img").attr('alt') || '',
href = imgOpts.origUrl || $el.attr('href');

Expand Down

0 comments on commit 636b0db

Please sign in to comment.