Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Item13897: Convertions and bug fixes.
Foswiki::AppObject turned into a role. I overlooked classed which derive
from LostIterator, for example, but then they appear to be using app
(formely – session) attribute.

A lot of replacements of $Foswiki::Plugins::SESSION into $Foswiki::app

Converted a lot of JQuery plugins.

A JQuery plugin module may now have only one declaration of %pluginParams
hash instead of having constructor method.

Moved forms and seatch attributes from Foswiki.pm into Foswiki::App.
  • Loading branch information
vrurg committed May 6, 2016
1 parent 6b0ee42 commit 1d18544
Show file tree
Hide file tree
Showing 121 changed files with 968 additions and 1,528 deletions.
34 changes: 12 additions & 22 deletions JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/ANIMATE.pm
@@ -1,10 +1,9 @@
# See bottom of file for license and copyright information
package Foswiki::Plugins::JQueryPlugin::ANIMATE;
use strict;
use warnings;
use v5.14;

use Foswiki::Plugins::JQueryPlugin::Plugin;
our @ISA = qw( Foswiki::Plugins::JQueryPlugin::Plugin );
use Moo;
extends qw( Foswiki::Plugins::JQueryPlugin::Plugin );

=begin TML
Expand All @@ -22,24 +21,15 @@ Constructor
=cut

sub new {
my $class = shift;

my $this = bless(
$class->SUPER::new(
name => 'Animate',
version => '3.4.0',
author => 'Daniel Eden',
homepage => 'http://daneden.me/animate',
css => ['animate.css'],
javascript => ['animate.js'],
dependencies => ['livequery'],
),
$class
);

return $this;
}
our %pluginParams = (
name => 'Animate',
version => '3.4.0',
author => 'Daniel Eden',
homepage => 'http://daneden.me/animate',
css => ['animate.css'],
javascript => ['animate.js'],
dependencies => ['livequery'],
);

1;

Expand Down
37 changes: 13 additions & 24 deletions JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/AUTOCOMPLETE.pm
@@ -1,10 +1,10 @@
# See bottom of file for license and copyright information

package Foswiki::Plugins::JQueryPlugin::AUTOCOMPLETE;
use strict;
use warnings;
use Foswiki::Plugins::JQueryPlugin::Plugin;
our @ISA = qw( Foswiki::Plugins::JQueryPlugin::Plugin );
use v5.14;

use Moo;
extends qw( Foswiki::Plugins::JQueryPlugin::Plugin );

=begin TML
Expand All @@ -22,26 +22,15 @@ Constructor
=cut

sub new {
my $class = shift;

my $this = bless(
$class->SUPER::new(
name => 'Autocomplete',
version => '1.2.2',
author =>
'Dylan Verheul, Dan G. Switzer, Anjesh Tuladhar, Joern Zaefferer',
homepage => 'https://github.com/agarzola/jQueryAutocompletePlugin',
css => ['jquery.autocomplete.css'],
javascript =>
[ 'jquery.autocomplete.js', 'jquery.autocomplete.init.js' ],
dependencies => [ 'metadata', 'livequery', 'JQUERYPLUGIN::UI' ],
),
$class
);

return $this;
}
out %pluginParams = (
name => 'Autocomplete',
version => '1.2.2',
author => 'Dylan Verheul, Dan G. Switzer, Anjesh Tuladhar, Joern Zaefferer',
homepage => 'https://github.com/agarzola/jQueryAutocompletePlugin',
css => ['jquery.autocomplete.css'],
javascript => [ 'jquery.autocomplete.js', 'jquery.autocomplete.init.js' ],
dependencies => [ 'metadata', 'livequery', 'JQUERYPLUGIN::UI' ],
);

1;
__END__
Expand Down
30 changes: 10 additions & 20 deletions JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/BGIFRAME.pm
@@ -1,10 +1,9 @@
# See bottom of file for license and copyright information
package Foswiki::Plugins::JQueryPlugin::BGIFRAME;
use strict;
use warnings;
use v5.14;

use Foswiki::Plugins::JQueryPlugin::Plugin;
our @ISA = qw( Foswiki::Plugins::JQueryPlugin::Plugin );
use Moo;
extends qw( Foswiki::Plugins::JQueryPlugin::Plugin );

=begin TML
Expand All @@ -22,22 +21,13 @@ Constructor
=cut

sub new {
my $class = shift;

my $this = bless(
$class->SUPER::new(
name => 'bgiframe',
version => '2.1.2',
author => 'Brandon Aaron',
homepage => 'http://brandonaaron.net',
javascript => ['jquery.bgiframe.js'],
),
$class
);

return $this;
}
our %pluginParams = (
name => 'bgiframe',
version => '2.1.2',
author => 'Brandon Aaron',
homepage => 'http://brandonaaron.net',
javascript => ['jquery.bgiframe.js'],
);

1;

Expand Down
32 changes: 11 additions & 21 deletions JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/BLOCKUI.pm
@@ -1,10 +1,9 @@
# See bottom of file for license and copyright information
package Foswiki::Plugins::JQueryPlugin::BLOCKUI;
use strict;
use warnings;
use v5.14;

use Foswiki::Plugins::JQueryPlugin::Plugin;
our @ISA = qw( Foswiki::Plugins::JQueryPlugin::Plugin );
use Moo;
extends qw( Foswiki::Plugins::JQueryPlugin::Plugin );

=begin TML
Expand All @@ -22,23 +21,14 @@ Constructor
=cut

sub new {
my $class = shift;

my $this = bless(
$class->SUPER::new(
name => 'blockUI',
version => '2.59',
author => 'M. Alsup',
homepage => 'http://malsup.com/jquery/block/',
css => ['jquery.blockUI.css'],
javascript => [ 'jquery.blockUI.js', 'jquery.blockUI.init.js' ],
),
$class
);

return $this;
}
our %pluginParams = (
name => 'blockUI',
version => '2.59',
author => 'M. Alsup',
homepage => 'http://malsup.com/jquery/block/',
css => ['jquery.blockUI.css'],
javascript => [ 'jquery.blockUI.js', 'jquery.blockUI.init.js' ],
);

1;

Expand Down
37 changes: 14 additions & 23 deletions JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/BUTTON.pm
@@ -1,9 +1,9 @@
# See bottom of file for license and copyright information
package Foswiki::Plugins::JQueryPlugin::BUTTON;
use strict;
use warnings;
use Foswiki::Plugins::JQueryPlugin::Plugin;
our @ISA = qw( Foswiki::Plugins::JQueryPlugin::Plugin );
use v5.14;

use Moo;
extends qw( Foswiki::Plugins::JQueryPlugin::Plugin );

=begin TML
Expand All @@ -21,25 +21,16 @@ Constructor
=cut

sub new {
my $class = shift;

my $this = bless(
$class->SUPER::new(
name => 'Button',
version => '2.0',
author => 'Michael Daum',
homepage => 'http://foswiki.org/Extensions/JQueryPlugin',
tags => 'BUTTON',
css => ['jquery.button.css'],
javascript => ['jquery.button.init.js'],
dependencies => [ 'metadata', 'livequery', 'JQUERYPLUGIN::FORM' ],
),
$class
);

return $this;
}
our %pluginParams = (
name => 'Button',
version => '2.0',
author => 'Michael Daum',
homepage => 'http://foswiki.org/Extensions/JQueryPlugin',
tags => 'BUTTON',
css => ['jquery.button.css'],
javascript => ['jquery.button.init.js'],
dependencies => [ 'metadata', 'livequery', 'JQUERYPLUGIN::FORM' ],
);

=begin TML
Expand Down
33 changes: 11 additions & 22 deletions JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/CHILI.pm
@@ -1,10 +1,8 @@
# See bottom of file for license and copyright information
package Foswiki::Plugins::JQueryPlugin::CHILI;
use strict;
use warnings;

use Foswiki::Plugins::JQueryPlugin::Plugin;
our @ISA = qw( Foswiki::Plugins::JQueryPlugin::Plugin );
use v5.14;
use Moo;
extends qw(Foswiki::Plugins::JQueryPlugin::Plugin);

=begin TML
Expand All @@ -22,23 +20,14 @@ Constructor
=cut

sub new {
my $class = shift;

my $this = bless(
$class->SUPER::new(
name => 'Chili',
version => '2.2_1',
author => 'Andrea Ercolino',
homepage => 'https://github.com/aercolino/Chili',
javascript => [ 'jquery.chili.js', 'jquery.chili.init.js' ],
dependencies => [ 'metadata', 'livequery' ],
),
$class
);

return $this;
}
our %pluginParams = (
name => 'Chili',
version => '2.2_1',
author => 'Andrea Ercolino',
homepage => 'https://github.com/aercolino/Chili',
javascript => [ 'jquery.chili.js', 'jquery.chili.init.js' ],
dependencies => [ 'metadata', 'livequery' ],
);

1;

Expand Down
30 changes: 10 additions & 20 deletions JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/COOKIE.pm
@@ -1,10 +1,9 @@
# See bottom of file for license and copyright information
package Foswiki::Plugins::JQueryPlugin::COOKIE;
use strict;
use warnings;
use v5.14;

use Foswiki::Plugins::JQueryPlugin::Plugin;
our @ISA = qw( Foswiki::Plugins::JQueryPlugin::Plugin );
use Moo;
extends qw( Foswiki::Plugins::JQueryPlugin::Plugin );

=begin TML
Expand All @@ -22,23 +21,14 @@ Constructor
=cut

sub new {
my $class = shift;

my $this = bless(
$class->SUPER::new(
name => 'Cookie',
version => '20100921', # based on the blog posting on the homepage
author => 'Klaus Hartl, Uzbekjon',
homepage =>
our %pluginParams = (
name => 'Cookie',
version => '20100921', # based on the blog posting on the homepage
author => 'Klaus Hartl, Uzbekjon',
homepage =>
'http://jquery-howto.blogspot.com/2010/09/jquery-cookies-getsetdelete-plugin.html',
javascript => ['jquery.cookie.js'],
),
$class
);

return $this;
}
javascript => ['jquery.cookie.js'],
);

1;
__END__
Expand Down
32 changes: 11 additions & 21 deletions JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/CORNER.pm
@@ -1,10 +1,9 @@
# See bottom of file for license and copyright information
package Foswiki::Plugins::JQueryPlugin::CORNER;
use strict;
use warnings;
use v5.14;

use Foswiki::Plugins::JQueryPlugin::Plugin;
our @ISA = qw( Foswiki::Plugins::JQueryPlugin::Plugin );
use Moo;
extends qw( Foswiki::Plugins::JQueryPlugin::Plugin );

=begin TML
Expand All @@ -22,23 +21,14 @@ Constructor
=cut

sub new {
my $class = shift;

my $this = bless(
$class->SUPER::new(
name => 'Corner',
version => '2.12',
author => 'Dave Methvin, Mike Alsup',
homepage => 'http://jquery.malsup.com/corner',
javascript => [ 'jquery.corner.js', 'jquery.corner.init.js' ],
dependencies => ['livequery'],
),
$class
);

return $this;
}
our %pluginParams = (
name => 'Corner',
version => '2.12',
author => 'Dave Methvin, Mike Alsup',
homepage => 'http://jquery.malsup.com/corner',
javascript => [ 'jquery.corner.js', 'jquery.corner.init.js' ],
dependencies => ['livequery'],
);

1;

Expand Down

0 comments on commit 1d18544

Please sign in to comment.