Skip to content

Commit

Permalink
Item14584: make wikiword backwards compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDaum committed Dec 17, 2017
1 parent 1ae8006 commit 704791e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/WIKIWORD.pm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ sub new {
my $this = bless(
$class->SUPER::new(
name => 'WikiWord',
version => '3.20',
version => '3.21',
author => 'Michael Daum',
homepage => 'http://foswiki.org/Extensions/JQueryPlugin',
javascript => ['wikiword.js'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* jQuery WikiWord plugin 3.20
* jQuery WikiWord plugin 3.21
*
* Copyright (c) 2008-2017 Foswiki Contributors http://foswiki.org
*
Expand Down Expand Up @@ -42,7 +42,12 @@ $.wikiword = {

// either a string or a jQuery object
if (typeof(thisOpts.source) === 'string') {
// first try to find the source within the same form
$source = $this.parents("form:first").find(thisOpts.source);
// if that fails, try in a global scope
if ($source.length === 0) {
$source = $(thisOpts.source);
}
} else {
$source = thisOpts.source;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* jQuery WikiWord plugin 3.20
* jQuery WikiWord plugin 3.21
*
* Copyright (c) 2008-2017 Foswiki Contributors http://foswiki.org
*
Expand Down Expand Up @@ -42,7 +42,12 @@ $.wikiword = {

// either a string or a jQuery object
if (typeof(thisOpts.source) === 'string') {
// first try to find the source within the same form
$source = $this.parents("form:first").find(thisOpts.source);
// if that fails, try in a global scope
if ($source.length === 0) {
$source = $(thisOpts.source);
}
} else {
$source = thisOpts.source;
}
Expand Down

0 comments on commit 704791e

Please sign in to comment.