Skip to content

Commit

Permalink
Item12602: force-load jquery-migrate when using jquery > 1.9.x
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/branches/Release01x01@16913 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
MichaelDaum authored and MichaelDaum committed Oct 12, 2013
1 parent 51502ae commit ce9032d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/Plugins.pm
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,16 @@ HERE
}
}

# enable migrate for jQuery > 1.9.x as long as we still have 3rd party plugins
# making use of deprecated and removed features
unless ( $defaultPlugins =~ /\bmigrate\b/i ) {
if ( $jQuery =~ /^jquery-(\d+)\.(\d+)\.(\d+)/ ) {
my $jqVersion = $1 * 1000 + $2 * 100 + $3;
if ( $jqVersion > 1900 ) {
createPlugin("Migrate");
}
}
}
}

=begin TML
Expand Down

0 comments on commit ce9032d

Please sign in to comment.