Skip to content

Commit

Permalink
Item11397:Item11742:
Browse files Browse the repository at this point in the history
   * use a JSON instead of <meta> to export preferences to javascript
   * add jquery-1.7.2 (new default)
   * deprecate all jquery versions prior to 1.7.1
   * improve docu and integration of scrollto and serialscroll
   * removed deprecated foswiki.web, foswiki.topic etc properties
   * improved foswiki theme for better x-browser gradients

git-svn-id: http://svn.foswiki.org/branches/Release01x01@15191 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
GeorgeClark authored and GeorgeClark committed Jul 26, 2012
1 parent 56a2fe8 commit b8d7435
Show file tree
Hide file tree
Showing 23 changed files with 9,555 additions and 87 deletions.
2 changes: 1 addition & 1 deletion JQueryPlugin/data/System/JQueryLoader.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Parameter are specified using JQueryMetadata, as in

| *Parameter* | *Description* | *Default* |
| url | the full url from where the content, e.g. =url:'%SCRIPTURL{"view"}%/MyWeb/MyTopic?section=mysection;skin=text'= | |
| section | the ... | |
| section | the section within the topic (see %SYSTEMWEB%.VarSTARTSECTION) | |
| mode | specify whether the content is either loaded automatically or by clicking on the container; \
possible values: =auto=, =manual= | =auto= |
| placeholder | the image to be displayed as long as the content hasn't been loaded \
Expand Down
10 changes: 8 additions & 2 deletions JQueryPlugin/data/System/JQueryPlugin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Besides jQuery itself, !JQueryPlugin comes with a selection of third party plugi
These are integrated into Foswiki either by means of a special [[#Macros][macro]], by means of "minimal markup", or initialized using
a custom javascript initializer. This way the set of Foswiki macros that comes with !JQueryPlugin is kept rather low compared to the features available
in third party plugins. "Minimal markup" is a way to avoid the need to write javascript code to initialize the interface. Instead, a special
css class is added to an html element that triggers its initialization. See JQueryMetadata for an example.
css class is added to an html element that triggers its initialization. See %SYSTEMWEB%.JQueryMetadata for an example.

Use [[#VarJQREQUIRE][JQREQUIRE]] to make use of a specific jQuery plugin on a page. This will prepare the page by loading the required javascript
and css components. If you need to make a feature available on each and every page of your site, you may add this plugin to the list of default plugins
Expand All @@ -45,7 +45,7 @@ them at Foswiki:Development.UsingJQueryWithFoswiki#adding_plugins.
---++ Writing your own Javascript

Whether writing your own plugins or writing Javascript code in topics, you should observe the
Foswiki JQueryCodingStandards.
Foswiki %SYSTEMWEB%.JQueryCodingStandards.

---++ jQuery References and tutorials
* [[http://docs.jquery.com/How_jQuery_Works][Getting the feet wet]]
Expand Down Expand Up @@ -138,6 +138,12 @@ reduce bandwidth and speed up interactive performance.
| Version: | %$VERSION% |
| Change History: | <!-- versions below in reverse order -->&nbsp; |
| 01 Jun 2012: | (4.34) - simplemodal updated to 1.4.2. |
| 10 Apr 2012: | (4.40) - Item11397, Item11742. \
use a JSON instead of &lt;meta> to export preferences to javascript; \
add jquery-1.7.2 (new default); \
deprecate all jquery versions prior to 1.7.1 \
improve docu and integration of scrollto and serialscroll; \
removed deprecated foswiki.web, foswiki.topic etc properties |
| 06 Apr 2012: | (4.33) - Item11511, Item11512. Minor changes to improve JSON output and Javascript validations.%BR%\
Item11685: deprecate simmplemodal, replace by jquery.ui.dialog.%BR%\
Item11654: JQueryTmpl is discontinued upstream.%BR%\
Expand Down
12 changes: 10 additions & 2 deletions JQueryPlugin/data/System/JQueryScrollTo.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1264712966" format="1.1" version="1"}%
%META:TOPICINFO{author="micha" comment="reprev" date="1333530884" format="1.1" reprev="3" version="3"}%
%META:TOPICPARENT{name="JQueryPlugin"}%
---+ %TOPIC%
%JQPLUGINS{"scrollto"
Expand All @@ -17,4 +17,12 @@ See also JQuerySerialScroll, JQueryLocalScroll
%ENDSECTION{"summary"}%

---++ Examples
%JQREQUIRE{"scrollto"}%
%JQREQUIRE{"scrollto"}%

* <a href="#" class="jqScrollToLink {'target':'-=100px', 'duration':1000}">scroll up 100px</a>
* <a href="#" class="jqScrollToLink {'target':'+=100px', 'duration':1000}">scroll down 100px</a>
* <a href="#" class="jqScrollToLink {'target':'0', 'duration':1000}">scroll to the top</a>
* <a href="#" class="jqScrollToLink {'target':'100%', 'duration':1000}">scroll to the bottom</a>
* <a href="#" class="jqScrollToLink {'target':'0'}">jump to the top</a>
* <a href="#" class="jqScrollToLink {'target':'100%'}">jump to the bottom</a>

28 changes: 12 additions & 16 deletions JQueryPlugin/data/System/JQuerySerialScroll.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1264712966" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" comment="reprev" date="1330025199" format="1.1" reprev="3" version="3"}%
%META:TOPICPARENT{name="JQueryPlugin"}%
---+ %TOPIC%
%JQPLUGINS{"serialscroll"
Expand All @@ -19,20 +19,16 @@ It uses JQueryScrollTo to achieve the scrolling animation.
<div id="screen1">
<div id="slideshow">
<ul>
<li><img width="225" height="300" src="http://www.stockvault.net/watermark.php?i=9020" /></li>
<li><img width="225" height="300" src="http://www.stockvault.net/watermark.php?i=8430" /></li>
<li><img width="225" height="300" src="http://www.stockvault.net/watermark.php?i=7898" /></li>
<li><img width="225" height="300" src="http://www.stockvault.net/watermark.php?i=7894" /></li>
<li><img width="225" height="300" src="http://www.stockvault.net/watermark.php?i=3526" /></li>
<li><img width="225" height="300" src="http://www.stockvault.net/watermark.php?i=7863" /></li>
<li><img width="225" height="300" src="http://www.stockvault.net/watermark.php?i=7743" /></li>
<li><img width="225" height="300" src="http://www.stockvault.net/watermark.php?i=7150" /></li>
<li><img width="225" height="300" src="http://www.stockvault.net/watermark.php?i=7164" /></li>
<li><img width="225" height="300" src="http://www.stockvault.net/watermark.php?i=7149" /></li>
<li><img width="225" height="300" src="http://www.stockvault.net/watermark.php?i=4922" /></li>
<li><img width="225" height="300" src="http://www.stockvault.net/watermark.php?i=9307" /></li>
<li><img width="225" height="300" src="http://www.stockvault.net/watermark.php?i=9922" /></li>
<li><img width="225" height="300" src="http://www.stockvault.net/watermark.php?i=9976" /></li>
<li><img width="225" height="300" src="http://lorempixel.com/255/300/people?t=1" /></li>
<li><img width="225" height="300" src="http://lorempixel.com/255/300/people?t=2" /></li>
<li><img width="225" height="300" src="http://lorempixel.com/255/300/people?t=3" /></li>
<li><img width="225" height="300" src="http://lorempixel.com/255/300/people?t=4" /></li>
<li><img width="225" height="300" src="http://lorempixel.com/255/300/people?t=5" /></li>
<li><img width="225" height="300" src="http://lorempixel.com/255/300/people?t=6" /></li>
<li><img width="225" height="300" src="http://lorempixel.com/255/300/people?t=7" /></li>
<li><img width="225" height="300" src="http://lorempixel.com/255/300/people?t=8" /></li>
<li><img width="225" height="300" src="http://lorempixel.com/255/300/people?t=9" /></li>
<li><img width="225" height="300" src="http://lorempixel.com/255/300/people?t=10" /></li>
</ul>
</div>
<div id="buttons">
Expand Down Expand Up @@ -93,4 +89,4 @@ It uses JQueryScrollTo to achieve the scrolling animation.
float:right;
}
</style>
</literal>
</literal>
2 changes: 1 addition & 1 deletion JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin.pm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use vars qw(
);

$VERSION = '$Rev$';
$RELEASE = '4.34';
$RELEASE = '4.40';
$SHORTDESCRIPTION = 'jQuery <nop>JavaScript library for Foswiki';
$NO_PREFS_IN_TOPIC = 1;

Expand Down
10 changes: 7 additions & 3 deletions JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/Config.spec
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $Foswiki::cfg{JQueryPlugin}{MemoryCache} = 1;

# **STRING**
# search path for JQICONs
$Foswiki::cfg{JQueryPlugin}{IconSearchPath} = 'FamFamFamSilkIcons, FamFamFamSilkCompanion1Icons, FamFamFamFlagIcons, FamFamFamMiniIcons, FamFamFamMintIcons';
$Foswiki::cfg{JQueryPlugin}{IconSearchPath} = 'FamFamFamSilkIcons, FamFamFamSilkCompanion1Icons, FamFamFamSilkCompanion2Icons, FamFamFamSilkGeoSilkIcons, FamFamFamFlagIcons, FamFamFamMiniIcons, FamFamFamMintIcons';

# **BOOLEAN**
# Enable this switch to prevent name conflicts with other javascript frameworks that
Expand All @@ -26,8 +26,12 @@ $Foswiki::cfg{JQueryPlugin}{NoConflict} = 0;
# **STRING**
$Foswiki::cfg{JQueryPlugin}{DefaultPlugins} = '';

# **SELECT jquery-1.4.3, jquery-1.4.4, jquery-1.5, jquery-1.5.1, jquery-1.5.2, jquery-1.6.1, jquery-1.6.2, jquery-1.6.3, jquery-1.6.4, jquery-1.7, jquery-1.7.1**
$Foswiki::cfg{JQueryPlugin}{JQueryVersion} = 'jquery-1.7.1';
# **SELECT jquery-1.7.2, jquery-1.7.1**
# Foswiki also ships jquery-1.4.3, jquery-1.4.4, jquery-1.5, jquery-1.5.1,
# jquery-1.5.2, jquery-1.6.1, jquery-1.6.2, jquery-1.6.3, jquery-1.6.4,
# jquery-1.7. However these older versions are deprecated and will be removed
# from the JQueryPlugin package soon.
$Foswiki::cfg{JQueryPlugin}{JQueryVersion} = 'jquery-1.7.2';

# **SELECT ,base, flickr, foswiki, lightness, redmond, smoothness**
$Foswiki::cfg{JQueryPlugin}{JQueryTheme} = 'foswiki';
Expand Down
13 changes: 4 additions & 9 deletions JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/FOSWIKI.pm
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,13 @@ sub init {
}

# add exported preferences to head
my $text = '';
my @prefs = ();
foreach my $pref ( split( /\s*,\s*/, $prefs ) ) {
$text .=
'<meta name="foswiki.'
. $pref
. '" content="%ENCODE{"%'
. $pref
. '%"}%" />'
. " <!-- $pref -->\n";
push @prefs, ' "'.$pref.'": "%ENCODE{"%'.$pref.'%" type="quote"}%"';
}
my $text = "<script type='text/javascript'>\njQuery.extend(foswiki, {\n \"preferences\": {\n".join(",\n", @prefs)."\n}});\n</script>";

Foswiki::Func::addToZone( "head", "JQUERYPLUGIN::FOSWIKI::META", $text );
Foswiki::Func::addToZone( "script", "JQUERYPLUGIN::FOSWIKI::PREFERENCES", $text, "JQUERYPLUGIN::FOSWIKI");
}

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 @@ -305,6 +305,9 @@ pub/System/JQueryPlugin/jquery-1.7.uncompressed.js 0644
pub/System/JQueryPlugin/jquery-1.7.1.js 0644
pub/System/JQueryPlugin/jquery-1.7.1.js.gz 0644
pub/System/JQueryPlugin/jquery-1.7.1.uncompressed.js 0644
pub/System/JQueryPlugin/jquery-1.7.2.js 0644
pub/System/JQueryPlugin/jquery-1.7.2.js.gz 0644
pub/System/JQueryPlugin/jquery-1.7.2.uncompressed.js 0644
pub/System/JQueryPlugin/Makefile 0644
pub/System/JQueryPlugin/Makefile.include 0644
pub/System/JQueryPlugin/plugins/autocomplete/jquery.autocomplete.css 0644
Expand Down Expand Up @@ -556,6 +559,9 @@ pub/System/JQueryPlugin/plugins/rating/star.gif 0644
pub/System/JQueryPlugin/plugins/scrollto/jquery.scrollTo.js 0644
pub/System/JQueryPlugin/plugins/scrollto/jquery.scrollTo.js.gz 0644
pub/System/JQueryPlugin/plugins/scrollto/jquery.scrollTo.uncompressed.js 0644
pub/System/JQueryPlugin/plugins/scrollto/jquery.scrollTo.init.js 0644
pub/System/JQueryPlugin/plugins/scrollto/jquery.scrollTo.init.js.gz 0644
pub/System/JQueryPlugin/plugins/scrollto/jquery.scrollTo.init.uncompressed.js 0644
pub/System/JQueryPlugin/plugins/scrollto/Makefile 0644
pub/System/JQueryPlugin/plugins/serialscroll/jquery.serialScroll.js 0644
pub/System/JQueryPlugin/plugins/serialscroll/jquery.serialScroll.js.gz 0644
Expand Down
2 changes: 1 addition & 1 deletion JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/Plugins.pm
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ sub getIconUrlPath {

unless (@iconSearchPath) {
my $iconSearchPath = $Foswiki::cfg{JQueryPlugin}{IconSearchPath}
|| 'FamFamFamSilkIcons, FamFamFamSilkCompanion1Icons, FamFamFamSilkCompanion2Icons, FamFamFamFlagIcons, FamFamFamMiniIcons, FamFamFamMintIcons';
|| 'FamFamFamSilkIcons, FamFamFamSilkCompanion1Icons, FamFamFamSilkCompanion2Icons, FamFamFamSilkGeoSilkIcons, FamFamFamFlagIcons, FamFamFamMiniIcons, FamFamFamMintIcons';
@iconSearchPath = split( /\s*,\s*/, $iconSearchPath );
}

Expand Down
4 changes: 2 additions & 2 deletions JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/SCROLLTO.pm
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ sub new {
version => '1.4.2',
author => 'Ariel Flesler',
homepage => 'http://plugins.jquery.com/project/ScrollTo',
javascript => ['jquery.scrollTo.js'],
javascript => ['jquery.scrollTo.js', 'jquery.scrollTo.init.js'],
dependencies => ['easing'],
),
$class
Expand All @@ -52,7 +52,7 @@ NOTE: Please extend that file, not this notice.
Additional copyrights apply to some or all of the code in this
file as follows:
Copyright (C) 2006-2010 Michael Daum http://michaeldaumconsulting.com
Copyright (C) 2006-2012 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 JQueryPlugin/pub/System/JQueryPlugin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ TARGET=\
jquery-1.6.4.js \
jquery-1.7.js \
jquery-1.7.1.js \
jquery-1.7.2.js \

-include Makefile.include
Loading

0 comments on commit b8d7435

Please sign in to comment.