Skip to content

Commit

Permalink
Item12079: twisty preferences added to the wrong zone
Browse files Browse the repository at this point in the history
It was adding its json to the head zone. -> Should be in the script zone. 
Also: HTML validation tests need a text/javascript type to script tags.




git-svn-id: http://svn.foswiki.org/trunk@15386 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
MichaelDaum authored and MichaelDaum committed Sep 18, 2012
1 parent 982ae9b commit 0e6f840
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions TwistyPlugin/data/System/TwistyPlugin.txt
Expand Up @@ -488,6 +488,7 @@ You can override some default settings in the plugin by setting the following [[
| Version: | %$VERSION% |
| Release: | %$RELEASE% |
| Change&nbsp;History: | <!-- versions below in reverse order -->&nbsp; |
| 18 Sep 2012 | 1.6.16 Foswikitask:Item11983: fixed script being added to the wrong zone |
| 05 Dec 2011 | 1.6.15 Released with Foswiki 1.1.4 - minor changes |
| 07 Jul 2011 | 1.6.14 Foswikitask:Item10946: fixed requesting of defunct/missing jquery.twisty.css |
| 02 Jun 2011 | 1.6.13 Foswikitask:Item10827: clear pref completely when using =remember="off"=. Effective from Foswiki 1.1.4 and higher. |
Expand Down
7 changes: 4 additions & 3 deletions TwistyPlugin/lib/Foswiki/Plugins/TwistyPlugin.pm
Expand Up @@ -19,7 +19,7 @@ use vars qw( @twistystack $doneHeader $doneDefaults $twistyCount

our $VERSION = '$Rev$';

our $RELEASE = '1.6.15';
our $RELEASE = '1.6.16';
our $SHORTDESCRIPTION =
'Twisty section Javascript library to open/close content dynamically';
our $NO_PREFS_IN_TOPIC = 1;
Expand Down Expand Up @@ -68,8 +68,9 @@ sub _exportAnimationSpeed {
# add TWISTYANIMATIONSPEED to the html head so
# that it may be used in the client JS with
# foswiki.getPreference('TWISTYANIMATIONSPEED')
Foswiki::Func::addToZone( "head", "TWISTYPLUGIN::META", <<"HERE");
<meta name="foswiki.TWISTYANIMATIONSPEED" content="$pref" />
Foswiki::Func::addToZone( "script", "TWISTYPLUGIN::META",
<<"HERE", "JQUERYPLUGIN::FOSWIKI::PREFERENCES" );
<script type='text/javascript'>jQuery.extend(foswiki.preferences, { TWISTYANIMATIONSPEED: '$pref' });</script>
HERE

return;
Expand Down

0 comments on commit 0e6f840

Please sign in to comment.