Permalink
Browse files

Item14584: make wikiword backwards compatible

  • Loading branch information...
MichaelDaum committed Dec 17, 2017
1 parent 1ae8006 commit 704791e9669b604b96a11f39f467c095b42cbad0
@@ -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'],
@@ -1,5 +1,5 @@
/*
* jQuery WikiWord plugin 3.20
* jQuery WikiWord plugin 3.21
*
* Copyright (c) 2008-2017 Foswiki Contributors http://foswiki.org
*
@@ -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;
}
@@ -1,5 +1,5 @@
/*
* jQuery WikiWord plugin 3.20
* jQuery WikiWord plugin 3.21
*
* Copyright (c) 2008-2017 Foswiki Contributors http://foswiki.org
*
@@ -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;
}

0 comments on commit 704791e

Please sign in to comment.