Skip to content

Commit

Permalink
Item12650: Improve handling of deprecated plugins
Browse files Browse the repository at this point in the history
Group the deprecated plugins into a separate heading in the
configuration, and set them to EXPERT mode.  They'll be hidden unless
the checker flags a warning or error.

git-svn-id: http://svn.foswiki.org/branches/Release01x01@17077 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
GeorgeClark authored and GeorgeClark committed Nov 8, 2013
1 parent 00e278a commit a5d97d8
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 20 deletions.
5 changes: 3 additions & 2 deletions JQueryPlugin/data/System/JQueryPlugin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,9 @@ reduce bandwidth and speed up interactive performance.
| Release: | %$RELEASE% |
| Version: | %$VERSION% |
| Change History: | <!-- versions below in reverse order -->&nbsp; |
| 23 Oct 2013: | (4.90) - Release with Foswiki 1.1.9 \
Item12567: fix checking of version number in configure \
| 08 Nov 2013: | (4.91) - Release with Foswiki 1.1.9 \
Item12650: Add config error for removed Themeswitcher plugin |
| 23 Oct 2013: | (4.90) - Item12567: fix checking of version number in configure \
Item12577: deprecate jquery-tooltip in favour of jquery-ui-tooltip \
Item12596: improve documentation of jquery-ui \
Item12583: revert version string to simple float not to break installation on RHEL and SLES \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# See bottom of file for license and copyright information
package Foswiki::Configure::Checkers::JQueryPlugin::Plugins::Themeswitcher::Enabled;

use warnings;
use strict;

use Foswiki::Configure::Checker ();
our @ISA = qw( Foswiki::Configure::Checker );

sub check {
my $this = shift;
my $warnings;

if ( $Foswiki::cfg{JQueryPlugin}{Plugins}{Themeswitcher}{Enabled} ) {
$warnings .= $this->ERROR(<<'HERE');
Themeswitcher has been removed from Foswiki. This should be disabled to avoid
errors during Foswiki operation.
HERE
}

return $warnings;
}

1;
__END__
Foswiki - The Free and Open Source Wiki, http://foswiki.org/
Copyright (C) 2008-2013 Foswiki Contributors. Foswiki Contributors
are listed in the AUTHORS file in the root of this distribution.
NOTE: Please extend that file, not this notice.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version. For
more details read LICENSE in the root of this distribution.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
As per the GPL, removal of this notice is prohibited.
4 changes: 2 additions & 2 deletions JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Container for jQuery and plugins
use Foswiki::Plugins ();
use Foswiki::Plugins::JQueryPlugin::Plugins ();

our $VERSION = '4.90';
our $RELEASE = '4.90';
our $VERSION = '4.91';
our $RELEASE = '4.91';
our $SHORTDESCRIPTION = 'jQuery <nop>JavaScript library for Foswiki';
our $NO_PREFS_IN_TOPIC = 1;

Expand Down
40 changes: 24 additions & 16 deletions JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/Config.spec
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ $Foswiki::cfg{JQueryPlugin}{Themes}{Smoothness}{Enabled} = 1;
$Foswiki::cfg{JQueryPlugin}{Themes}{Foswiki}{Enabled} = 1;

# ---+++ Default plugins
# **BOOLEAN**
# Warning: this plugin is deprecated. Please use the autocomplete plugin part of the jQuery-ui package.
$Foswiki::cfg{JQueryPlugin}{Plugins}{Autocomplete}{Enabled} = 0;

# **BOOLEAN**
$Foswiki::cfg{JQueryPlugin}{Plugins}{Bgiframe}{Enabled} = 1;

Expand Down Expand Up @@ -152,10 +148,6 @@ $Foswiki::cfg{JQueryPlugin}{Plugins}{PopUpWindow}{Enabled} = 1;
# **BOOLEAN**
$Foswiki::cfg{JQueryPlugin}{Plugins}{QueryObject}{Enabled} = 1;

# **BOOLEAN**
# Warning: This plugin is deprecated. Use Corner instead
$Foswiki::cfg{JQueryPlugin}{Plugins}{Nifty}{Enabled} = 0;

# **BOOLEAN**
$Foswiki::cfg{JQueryPlugin}{Plugins}{Rating}{Enabled} = 1;

Expand All @@ -165,10 +157,6 @@ $Foswiki::cfg{JQueryPlugin}{Plugins}{ScrollTo}{Enabled} = 1;
# **BOOLEAN**
$Foswiki::cfg{JQueryPlugin}{Plugins}{SerialScroll}{Enabled} = 1;

# **BOOLEAN**
# Warning: This plugin is deprecated. The shake effect is now part of the latest jQuery-ui package.
$Foswiki::cfg{JQueryPlugin}{Plugins}{Shake}{Enabled} = 0;

# **BOOLEAN**
$Foswiki::cfg{JQueryPlugin}{Plugins}{ShrinkUrls}{Enabled} = 1;

Expand All @@ -193,10 +181,6 @@ $Foswiki::cfg{JQueryPlugin}{Plugins}{TextboxList}{Enabled} = 1;
# **BOOLEAN**
$Foswiki::cfg{JQueryPlugin}{Plugins}{Tmpl}{Enabled} = 1;

# **BOOLEAN**
# Warning: this plugin is deprecated. Please use the tooltip plugin part of the jQuery-ui package.
$Foswiki::cfg{JQueryPlugin}{Plugins}{Tooltip}{Enabled} = 0;

# **BOOLEAN**
$Foswiki::cfg{JQueryPlugin}{Plugins}{Treeview}{Enabled} = 1;

Expand Down Expand Up @@ -245,4 +229,28 @@ $Foswiki::cfg{JQueryPlugin}{Plugins}{WikiWord}{Enabled} = 1;
# **BOOLEAN**
$Foswiki::cfg{JQueryPlugin}{Plugins}{Loader}{Enabled} = 1;

# ---+++ Deprecated plugins
# Any plugins listed here should be disabled. They will be removed in a future release of Foswiki.
# If enabled, they will be generate a Warning if deprecated, and an Error if the module has been removed from
# the Foswiki distribution.

# **BOOLEAN EXPERT**
# Warning: this plugin is deprecated. Please use the autocomplete plugin part of the jQuery-ui package.
$Foswiki::cfg{JQueryPlugin}{Plugins}{Autocomplete}{Enabled} = 0;

# **BOOLEAN EXPERT**
$Foswiki::cfg{JQueryPlugin}{Plugins}{Themeswitcher}{Enabled} = 0;

# **BOOLEAN EXPERT**
# Warning: this plugin is deprecated. Please use the tooltip plugin part of the jQuery-ui package.
$Foswiki::cfg{JQueryPlugin}{Plugins}{Tooltip}{Enabled} = 0;

# **BOOLEAN EXPERT**
# Warning: This plugin is deprecated. Use Corner instead
$Foswiki::cfg{JQueryPlugin}{Plugins}{Nifty}{Enabled} = 0;

# **BOOLEAN EXPERT**
# Warning: This plugin is deprecated. The shake effect is now part of the latest jQuery-ui package.
$Foswiki::cfg{JQueryPlugin}{Plugins}{Shake}{Enabled} = 0;

1;
1 change: 1 addition & 0 deletions JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ data/System/VarTABPANE.txt 0644
lib/Foswiki/Configure/Checkers/JQueryPlugin/JQueryVersion.pm 0644
lib/Foswiki/Configure/Checkers/JQueryPlugin/Plugins/Autocomplete/Enabled.pm 0644
lib/Foswiki/Configure/Checkers/JQueryPlugin/Plugins/Shake/Enabled.pm 0644
lib/Foswiki/Configure/Checkers/JQueryPlugin/Plugins/Themeswitcher/Enabled.pm 0644
lib/Foswiki/Configure/Checkers/JQueryPlugin/Plugins/Tooltip/Enabled.pm 0644
lib/Foswiki/Configure/Checkers/JQueryPlugin/Plugins/Nifty/Enabled.pm 0644
lib/Foswiki/Form/Color.pm 0644
Expand Down

0 comments on commit a5d97d8

Please sign in to comment.