Skip to content

Commit

Permalink
Item12601: sync latest JQueryPlugin changes to release branch
Browse files Browse the repository at this point in the history
   * 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 to simple floats not to break installation on RHEL and SLES
   * Item12599: use jQuery-1.9x (not 2.0.x) for IE9
   * Item12600: minor changes to jquery components



git-svn-id: http://svn.foswiki.org/branches/Release01x01@16911 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
MichaelDaum authored and MichaelDaum committed Oct 12, 2013
1 parent 2d73ab3 commit e1b0ed6
Show file tree
Hide file tree
Showing 36 changed files with 658 additions and 111 deletions.
2 changes: 1 addition & 1 deletion JQueryPlugin/data/System/JQueryAjaxHelper.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="micha" date="1358771265" format="1.1" version="17"}%
%META:TOPICINFO{author="ProjectContributor" date="1358771265" format="1.1" version="17"}%
%META:TOPICPARENT{name="JQueryPlugin"}%
---+!! %TOPIC%
%JQREQUIRE{"chili, ui, ui::autocomplete" warn="off"}%
Expand Down
2 changes: 1 addition & 1 deletion JQueryPlugin/data/System/JQueryPNotify.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="micha" comment="reprev" date="1357812954" format="1.1" reprev="6" version="6"}%
%META:TOPICINFO{author="ProjectContributor" comment="reprev" date="1357812954" format="1.1" reprev="6" version="6"}%
%META:TOPICPARENT{name="JQueryPlugin"}%
---+ %TOPIC%
%JQPLUGINS{"pnotify"
Expand Down
14 changes: 7 additions & 7 deletions JQueryPlugin/data/System/JQueryPlugin.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1360672210" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1378458912" format="1.1" version="1"}%
---+!! %TOPIC%
<!--
* Set SHORTDESCRIPTION = jQuery <nop>JavaScript library for Foswiki
Expand Down Expand Up @@ -38,13 +38,12 @@ Whether writing your own plugins or writing Javascript code in topics, you shoul
Foswiki %SYSTEMWEB%.JQueryCodingStandards.

---++ jQuery References and tutorials
* [[http://docs.jquery.com/How_jQuery_Works][Getting the feet wet]]
* [[http://docs.jquery.com/Tutorials][Tutorials]]
* [[http://docs.jquery.com/Main_Page][Reference API]]
* [[http://learn.jquery.com/about-jquery/how-jquery-works/][How jQuery Works]]
* [[http://http://learn.jquery.com/][jQuery Learning Center]]
* [[http://api.jquery.com/][jQuery API Documentatiom]]
* [[http://jqapi.com][Alternative jQuery Documentation and API Browser]]
* [[http://docs.jquery.com/Using_jQuery_with_Other_Libraries][Using jQuery with other libraries]]
* [[http://docs.jquery.com/Plugins][Plugin repository]]
* [[http://www.learningjquery.com/2010/07/great-ways-to-learn-jquery][Great Ways to Learn jQuery]]
* [[http://learn.jquery.com/using-jquery-core/avoid-conflicts-other-libraries/][Avoiding Conflicts with Other Libraries]]
* [[http://plugins.jquery.com/][The jQuery Plugin Registry]]

---++ Macros

Expand Down Expand Up @@ -127,6 +126,7 @@ reduce bandwidth and speed up interactive performance.
| Release: | %$RELEASE% |
| Version: | %$VERSION% |
| Change History: | <!-- versions below in reverse order -->&nbsp; |
| | (4.83) - Item12567: fix version check in =configure= |
| 07 Jun 2013: | (4.82) - Item12528: fixed char mapping in jquery.wikiword |
| 31 May 2013: | (4.81) - Item12520: added jquery-1.10.1 and jquery-2.0.2 |
| 30 May 2013: | (4.80) - Item12519: upgraded superfish, supersubs and hoverintent |
Expand Down
2 changes: 1 addition & 1 deletion JQueryPlugin/data/System/JQueryShrinkUrls.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="micha" date="1368687524" format="1.1" version="2"}%
%META:TOPICINFO{author="ProjectContributor" date="1368687524" format="1.1" version="2"}%
%META:TOPICPARENT{name="JQueryPlugin"}%
---+ %TOPIC%
%JQPLUGINS{"shrinkurls"
Expand Down
6 changes: 3 additions & 3 deletions JQueryPlugin/data/System/JQueryUIDialog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1342004918" format="1.1" reprev="3" version="3"}%
%META:TOPICINFO{author="ProjectContributor" date="1378463537" format="1.1" reprev="3" version="1"}%
%META:TOPICPARENT{name="JQueryPlugin"}%
---+!! %TOPIC%

Expand Down Expand Up @@ -32,7 +32,7 @@ To load the library into the current wiki page, add this somewhere on the page:
%JQREQUIRE{"ui::dialog"}%
</verbatim>

This will initialized the following css classes to build the dialog widgets:
This will initialize the following css classes to build the dialog widgets:

* =jqUIDialog=: dialog definition
* =jqUIDialogLink=: anchor pointing to a dialog
Expand Down Expand Up @@ -144,7 +144,7 @@ $("#mydialog").bind("dialogclose", function() {
---+++ Drop-down login dialog
<a href="#dialog" class="jqUIDialogLink">Login</a>

<div id="dialog" title="%MAKETEXT{"Login"}%" class="jqUIDialog {modal:true, position:'center', width:'auto', show: {effect: 'drop', direction: 'up', duration:'fast'}, hide:{ effect: 'drop', direction: 'up', duration:'fast' }}">
<div id="dialog" title="%MAKETEXT{"Login"}%" class="jqUIDialog {modal:true, position:'center top', width:'auto', show: {effect: 'drop', direction: 'up', duration:'fast'}, hide:{ effect: 'drop', direction: 'up', duration:'fast' }}">
<!-- position:'top' would be nicer but doesn't work for some reasons -->
<table class='foswikiLayoutTable'>
<tr>
Expand Down
130 changes: 130 additions & 0 deletions JQueryPlugin/data/System/JQueryUITooltip.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
%META:TOPICINFO{author="ProjectContributor" comment="reprev" date="1380268113" format="1.1" reprev="6" version="1"}%
%META:TOPICPARENT{name="JQueryPlugin"}%
---+!! %TOPIC%

%TOC%

---++ Summary
%JQPLUGINS{"ui::tooltip"
format="
Homepage: $homepage <br />
Author(s): $author <br />
Version: $version
"
}%

%STARTSECTION{"summary"}%
%ENDSECTION{"summary"}%

---++ Usage

To load the library into the current wiki page, add this somewhere on the page:

<verbatim class="tml">
%JQREQUIRE{"ui::tooltip"}%
</verbatim>
%JQREQUIRE{"ui::tooltip"}%

This will initialize all DOM elements with a =jqUITooltip= css class and add a jQuery-ui tooltip to it.

<verbatim class="tml">
<a href="#" class="jqUITooltip" title="This is the tooltip content">hover me</a>
</verbatim>

<a href="#" class="jqUITooltip" title="This is the tooltip content">hover me</a>

The plugin will also delegate the feature to all elements in a =jqUITooltip= container by means of delegation.
This means that all elements contained in a =jqUITooltip= container will be tooltip-enabled.
By default any content of a =title= attribute will serve as the content for the tooltip displayed
when hovering over this element.

<verbatim class="tml">
<div class="jqUITooltip">
* <a href="#" title="This is the tooltip content">hover me</a>
* <a href="#" title="This is the tooltip content">hover me</a>
* <a href="#" title="This is the tooltip content">hover me</a>
* <a href="#" title="This is the tooltip content">hover me</a>
</div>
</verbatim>

<div class="jqUITooltip">
* <a href="#" title="This is the tooltip content">hover me</a>
* <a href="#" title="This is the tooltip content">hover me</a>
* <a href="#" title="This is the tooltip content">hover me</a>
* <a href="#" title="This is the tooltip content">hover me</a>
</div>

---++ Parameters

The plugin comes with a set of convenient parameters that can be specified using HTML5 data attributes. See the examples below.

| *Name* | *Description* | *Default* |
| arrow | boolean flag to display a small arrow next to the tooltip pointing to its root element |
| delay | milliseconds delay before the tooltip appears | 500 |
| duration | duration of the animation to show/hide the tooltip | 200 |
| position | specifies the position of the tooltip relative to the element it appears at; this can either be one of the standard position specifiers known to jQuery or one of the short-cuts =bottom=, =top=, =left=, =right= | default |
| theme | specifies one of the predefined look&feel settings; possible values: =default=, =transparent=, =info=, =error=, =help=, =frame= | default |
| track | boolean flag to switch on/off the tooltip to follow the mouse pointer | true |

---++ Examples

---+++!! Use of HTML data attributes
<verbatim class="tml">
<table class="foswikiLayoutTable jqUITooltip" data-theme="info" data-position="bottom" data-arrow="true" data-delay="0">
<tr>
<th>First Name:</th>
<th>Last Name:</th>
</tr>
<tr>
<td>
<input type="text" class="foswikiInputField" title="Please insert your first name" size="30" />
</td>
<td>
<input type="text" class="foswikiInputField" title="Please insert your last name" size="30" />
</td>
</tr>
</table>
</verbatim>

<table class="foswikiLayoutTable jqUITooltip" data-theme="info" data-position="bottom" data-arrow="true" data-delay="0">
<tr>
<th>First Name:</th>
<th>Last Name:</th>
</tr>
<tr>
<td>
<input type="text" class="foswikiInputField" title="Please insert your first name" size="30" />
</td>
<td>
<input type="text" class="foswikiInputField" title="Please insert your last name" size="30" />
</td>
</tr>
</table>

---+++!! Themes
<table class="foswikiLayoutTable">
<tr>
<th>Default:</th>
<td><input id="age" title="We ask for your age only for statistical purposes." class="foswikiInputField jqUITooltip" data-theme="default" data-position="right" data-arrow="true" data-delay="0" /></td>
</tr>
<tr>
<th>Transparent:</th>
<td><input id="age" title="We ask for your age only for statistical purposes." class="foswikiInputField jqUITooltip" data-theme="transparent" data-position="right" data-arrow="true" data-delay="0" /></td>
</tr>
<tr>
<th>Info:</th>
<td><input id="age" title="We ask for your age only for statistical purposes." class="foswikiInputField jqUITooltip" data-theme="info" data-position="right" data-arrow="true" data-delay="0" /></td>
</tr>
<tr>
<th>Error:</th>
<td><input id="age" title="We ask for your age only for statistical purposes." class="foswikiInputField jqUITooltip" data-theme="error" data-position="right" data-arrow="true" data-delay="0" /></td>
</tr>
<tr>
<th>Help:</th>
<td><input id="age" title="We ask for your age only for statistical purposes." class="foswikiInputField jqUITooltip" data-theme="help" data-position="right" data-arrow="true" data-delay="0" /></td>
</tr>
<tr>
<th>Frame:</th>
<td><input id="age" title="We ask for your age only for statistical purposes." class="foswikiInputField jqUITooltip" data-theme="frame" data-position="right" data-arrow="true" data-delay="0" /></td>
</tr>
</table>
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ sub check {
my $e = '';
my $jqversion = $Foswiki::cfg{JQueryPlugin}{JQueryVersion};

if ( $jqversion =~ /^jquery-(\d+\.\d+)/ && defined $1
and $1 <= 1.3 )
if ( $jqversion =~ /^jquery-(\d+)\.(\d+)/ && defined $1
and ( $1 * 1000 + $2 ) <= 1003 )
{
$e .= $this->WARN(<<'MESSAGE');
jQuery 1.3.x and earlier are not compatible with Foswiki default plugins
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::Tooltip::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}{Tooltip}{Enabled} ) {
$warnings .= $this->WARN(<<'HERE');
Tooltip has been deprecated. Please use the tooltip plugin part of the jQuery-ui package.
The new plugin is not backwards compatible. See the JQueryPlugin documentation for further details.
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.
7 changes: 3 additions & 4 deletions JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ Container for jQuery and plugins
use Foswiki::Plugins ();
use Foswiki::Plugins::JQueryPlugin::Plugins ();

# Simple decimal version, use parse method, no leading "v"
use version; our $VERSION = version->parse("4.82");
our $RELEASE = '4.82';
our $VERSION = '4.83';
our $RELEASE = '4.83';
our $SHORTDESCRIPTION = 'jQuery <nop>JavaScript library for Foswiki';
our $NO_PREFS_IN_TOPIC = 1;

Expand Down Expand Up @@ -329,7 +328,7 @@ sub handleJQueryIcon {
my $img = $iconFormat;
$img =~ s/\$iconPath/$iconPath/g;
$img =~ s/\$iconClass/$iconClass/g;
$img =~ s/\$iconAlt/alt='$iconAlt' /g if $iconAlt;
$img =~ s/\$iconAlt/alt='$iconAlt' /g if $iconAlt;
$img =~ s/\$iconTitle/title='$iconTitle' /g if $iconTitle;
$img =~ s/\$(iconAlt|iconTitle)//go;

Expand Down
6 changes: 5 additions & 1 deletion JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/Config.spec
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ $Foswiki::cfg{JQueryPlugin}{Plugins}{TextboxList}{Enabled} = 1;
$Foswiki::cfg{JQueryPlugin}{Plugins}{Tmpl}{Enabled} = 1;

# **BOOLEAN**
$Foswiki::cfg{JQueryPlugin}{Plugins}{Tooltip}{Enabled} = 1;
# 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 @@ -232,6 +233,9 @@ $Foswiki::cfg{JQueryPlugin}{Plugins}{'UI::Datepicker'}{Enabled} = 1;
# **BOOLEAN**
$Foswiki::cfg{JQueryPlugin}{Plugins}{'UI::Progressbar'}{Enabled} = 1;

# **BOOLEAN**
$Foswiki::cfg{JQueryPlugin}{Plugins}{'UI::Tooltip'}{Enabled} = 1;

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

Expand Down
6 changes: 6 additions & 0 deletions JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ data/System/JQueryTmpl.txt 0644
data/System/JQueryTooltip.txt 0644
data/System/JQueryTreeview.txt 0644
data/System/JQueryUI.txt 0644
data/System/JQueryUITooltip.txt 0644
data/System/JQueryValidate.txt 0644
data/System/JQueryWikiWord.txt 0644
data/System/VarBUTTON.txt 0644
Expand All @@ -66,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/Tooltip/Enabled.pm 0644
lib/Foswiki/Configure/Checkers/JQueryPlugin/Plugins/Nifty/Enabled.pm 0644
lib/Foswiki/Form/Color.pm 0644
lib/Foswiki/Form/Rating.pm 0644
Expand Down Expand Up @@ -123,6 +125,7 @@ lib/Foswiki/Plugins/JQueryPlugin/UI.pm 0644
lib/Foswiki/Plugins/JQueryPlugin/UI/PROGRESSBAR.pm 0644
lib/Foswiki/Plugins/JQueryPlugin/UI/SLIDER.pm 0644
lib/Foswiki/Plugins/JQueryPlugin/UI/TABS.pm 0644
lib/Foswiki/Plugins/JQueryPlugin/UI/TOOLTIP.pm 0644
lib/Foswiki/Plugins/JQueryPlugin/UI/BUTTON.pm 0644
lib/Foswiki/Plugins/JQueryPlugin/UI/DATEPICKER.pm 0644
lib/Foswiki/Plugins/JQueryPlugin/UI/AUTOCOMPLETE.pm 0644
Expand Down Expand Up @@ -896,6 +899,9 @@ pub/System/JQueryPlugin/ui/jquery.ui.tabs.init.js.gz 0644
pub/System/JQueryPlugin/ui/jquery.ui.tabs.init.uncompressed.js 0644
pub/System/JQueryPlugin/ui/jquery.ui.tabs.js 0644
pub/System/JQueryPlugin/ui/jquery.ui.tooltip.js 0644
pub/System/JQueryPlugin/ui/jquery.ui.tooltip.init.js 0644
pub/System/JQueryPlugin/ui/jquery.ui.tooltip.init.js.gz 0644
pub/System/JQueryPlugin/ui/jquery.ui.tooltip.init.uncompressed.js 0644
pub/System/JQuerySlimbox/IMG_1190.JPG 0644
pub/System/JQuerySuperfish/example.js 0644
tools/jslint4java.jar 0444
Expand Down
13 changes: 5 additions & 8 deletions JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/MEDIA.pm
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,11 @@ sub new {

my $this = bless(
$class->SUPER::new(
name => 'Media',
version => '0.96',
author => 'M. Alsup',
homepage => 'http://malsup.com/jquery/media',
javascript => [
'jquery.media.js', 'jquery.media.init.js',
'mediaplayer/swfobject.js'
],
name => 'Media',
version => '0.96',
author => 'M. Alsup',
homepage => 'http://malsup.com/jquery/media',
javascript => [ 'jquery.media.js', 'jquery.media.init.js', ],
dependencies => [ 'metadata', 'livequery' ],
),
$class
Expand Down
6 changes: 3 additions & 3 deletions JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/Plugins.pm
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ sub init {

if ($jQueryIE) {
$code = <<"HERE";
<literal><!--[if lt IE 9]>
<literal><!--[if lte IE 9]>
<script type='text/javascript' src='%PUBURLPATH%/%SYSTEMWEB%/JQueryPlugin/$jQueryIE.js'></script>
<![endif]-->
<!--[if gte IE 9]><!-->
<!--[if gt IE 9]><!-->
<script type='text/javascript' src='%PUBURLPATH%/%SYSTEMWEB%/JQueryPlugin/$jQuery.js'></script>
<!--<![endif]-->
</literal>
Expand Down Expand Up @@ -353,7 +353,7 @@ sub getPlugins {

my @plugins = ();
foreach my $key ( sort keys %plugins ) {
next if $key eq 'empty'; # skip this one
next if $key eq 'empty'; # skip this one
next if $include && $key !~ /^($include)$/;
my $pluginDesc = $plugins{$key};
my $plugin = load( $pluginDesc->{name} );
Expand Down
2 changes: 1 addition & 1 deletion JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/UI.pm
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ sub new {
version => '1.10.3',
puburl => '%PUBURLPATH%/%SYSTEMWEB%/JQueryPlugin/ui',
author => 'see http://jqueryui.com/about',
homepage => 'http://docs.jquery.com/UI',
homepage => 'http://api.jqueryui.com/',
javascript => [ 'jquery-ui.js', ],
dependencies => [ 'metadata', 'livequery', 'easing' ],
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ sub new {
version => '1.10.3',
puburl => '%PUBURLPATH%/%SYSTEMWEB%/JQueryPlugin/ui',
author => 'see http://jqueryui.com/about',
homepage => 'http://docs.jquery.com/UI',
homepage => 'http://api.jqueryui.com/accordion/',
javascript => ['jquery.ui.accordion.init.js'],
dependencies => [ 'ui', ],
),
Expand Down
Loading

0 comments on commit e1b0ed6

Please sign in to comment.