Skip to content

Commit

Permalink
Item14009: Fix anchor style comment locations.
Browse files Browse the repository at this point in the history
Thanks to PaulMerchantJr for the fix.
  • Loading branch information
gac410 committed Jan 21, 2017
1 parent 335d48d commit ca77c75
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
13 changes: 7 additions & 6 deletions CommentPlugin/data/System/CommentPlugin.txt
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" comment="" date="1460168492" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" comment="" date="1485009132" format="1.1" version="1"}%
%META:TOPICPARENT{name="Plugins"}%
---+!! Comment Plugin

Expand Down Expand Up @@ -279,6 +279,7 @@ This plugin has been significantly changed from the =10 April 2011= version ship
Another great extension from the <a style="text-decoration:none" href="http://wikiring.com"><img src="%ATTACHURLPATH%/wikiringlogo20x20.png" alt="" /> *WikiRing* </a> - working together to improve your wiki experience!

| Change History: | |
| 2.92 (21 Jan 2017) | Foswikitask:Item14009: Comment plugin does not properly identify location to insert comment when specified as an anchor. |
| 2.91 (08 Apr 2016) | Foswikitask:Item14022: Update Foswiki.org links to https. Released with Foswiki 2.1.1. |
| 2.9 (03 Feb 2016) | Foswikitask:Item13854: Set ALLOWTOPICVIEW = "*" on Comment Template. *Requires compatibility patch on Foswiki 1.x or Foswiki 1.1.10.* |
| 2.8 (15 Nov 2015) | Foswikitask:Item13852: Warn that COMMENT ACLs should be configured if enabled. Also suppress guest session warning on Foswiki 1.1. |
Expand Down Expand Up @@ -332,8 +333,8 @@ Another great extension from the <a style="text-decoration:none" href="http://wi
%META:FIELD{name="License" title="License" value="GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]])"}%
%META:FIELD{name="Home" title="Home" value="http://foswiki.org/Extensions/CommentPlugin"}%
%META:FIELD{name="Support" title="Support" value="http://foswiki.org/Support/CommentPlugin"}%
%META:FILEATTACHMENT{name="comment.uncompressed.css" attr="h" comment="" date="1460168492" size="70" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="comment.js" attr="h" comment="" date="1460168492" size="1931" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="comment.css" attr="h" comment="" date="1460168492" size="60" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="comment.uncompressed.js" attr="h" comment="" date="1460168492" size="5134" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="wikiringlogo20x20.png" attr="h" comment="" date="1460168492" size="1343" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="comment.uncompressed.css" attr="h" comment="" date="1485009132" size="70" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="comment.js" attr="h" comment="" date="1485009132" size="1931" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="comment.css" attr="h" comment="" date="1485009132" size="60" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="comment.uncompressed.js" attr="h" comment="" date="1485009132" size="5134" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="wikiringlogo20x20.png" attr="h" comment="" date="1485009132" size="1343" user="ProjectContributor" version="1"}%
6 changes: 3 additions & 3 deletions CommentPlugin/lib/Foswiki/Plugins/CommentPlugin.pm
Expand Up @@ -13,8 +13,8 @@ use Foswiki::Func ();
use Foswiki::Plugins ();

# Please use major.minor
our $VERSION = '2.91';
our $RELEASE = '08 Apr 2016';
our $VERSION = '2.92';
our $RELEASE = '21 Jan 2017';
our $SHORTDESCRIPTION =
'Quickly post comments to a page without an edit/save cycle';
our $NO_PREFS_IN_TOPIC = 1;
Expand Down Expand Up @@ -274,7 +274,7 @@ sub _restSave {
__END__
Foswiki - The Free and Open Source Wiki, http://foswiki.org/
Copyright (C) 2008-2016 Foswiki Contributors. Foswiki Contributors
Copyright (C) 2008-2017 Foswiki Contributors. Foswiki Contributors
are listed in the AUTHORS file in the root of this distribution.
NOTE: Please extend that file, not this notice.
Expand Down
@@ -1,7 +1,7 @@
/*
Foswiki - The Free and Open Source Wiki, http://foswiki.org/
Copyright (C) 2010-2014 Foswiki Contributors. Foswiki Contributors
Copyright (C) 2010-2017 Foswiki Contributors. Foswiki Contributors
are listed in the AUTHORS file in the root of this distribution.
NOTE: Please extend that file, not this notice.
Expand Down Expand Up @@ -62,8 +62,9 @@ This is an example of a simple AJAX comment submission.
relto = $('*:contains("' + form.comment.location.value
+ '")')[0];
} else if (form.comment_anchor) {
relto = $("a[name='" + form.comment_anchor.value
+ "']");
var anchor = form.comment_anchor.value.slice(1);
relto = $("a[name='" + anchor
+ "'],*[id='" + anchor + "']");
} else {
relto = $(".commentPluginForm")[form.comment_index.value];
if (relto)
Expand Down

0 comments on commit ca77c75

Please sign in to comment.