Skip to content

Commit

Permalink
Item13941: Don't show EDITTABLE macro in static context
Browse files Browse the repository at this point in the history
Thanks to MichaelDaum for the fix.

Also bump version, update copyright, change log.  And escape braces in
the regexes so that new perl won't complain.
  • Loading branch information
gac410 committed Mar 20, 2016
1 parent 15bdc51 commit cbcf4b7
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 20 deletions.
31 changes: 16 additions & 15 deletions EditRowPlugin/data/System/EditRowPlugin.txt
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" comment="" date="1454442922" format="1.1" version="1"}% %META:TOPICINFO{author="ProjectContributor" comment="" date="1458435715" format="1.1" version="1"}%
---+!! !EditRowPlugin ---+!! !EditRowPlugin
<!-- <!--
One line description, required for extensions repository catalog. One line description, required for extensions repository catalog.
Expand Down Expand Up @@ -266,6 +266,7 @@ Provides the vertical row editing interface like
Another great Foswiki 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! Another great Foswiki 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: | <!-- versions below in reverse order -->&nbsp; | | Change History: | <!-- versions below in reverse order -->&nbsp; |
| 3.315 (19 Mar 2016) | Foswikitask:Item13941 Remove EDITTABLE macro in static context.|
| 3.314 (02 Feb 2016) | Foswikitask:Item10916 Pencils disappear after row move when both js and non-js controls are present.| | 3.314 (02 Feb 2016) | Foswikitask:Item10916 Pencils disappear after row move when both js and non-js controls are present.|
| 3.313 (26 Oct 2015) | Foswikitask:Item13834 Unable to edit cells containing utf-8 data.<br/> \ | 3.313 (26 Oct 2015) | Foswikitask:Item13834 Unable to edit cells containing utf-8 data.<br/> \
Foswikitask:Item13815 Typo in regular expression.<br/> \ Foswikitask:Item13815 Typo in regular expression.<br/> \
Expand Down Expand Up @@ -337,17 +338,17 @@ Another great Foswiki extension from the <a style="text-decoration:none" href="h
%META:FIELD{name="License" title="License" value="[[http://www.gnu.org/licenses/gpl.html][GPL (Gnu General Public License)]]"}% %META:FIELD{name="License" title="License" value="[[http://www.gnu.org/licenses/gpl.html][GPL (Gnu General Public License)]]"}%
%META:FIELD{name="Home" title="Home" value="http://foswiki.org/Extensions/EditRowPlugin"}% %META:FIELD{name="Home" title="Home" value="http://foswiki.org/Extensions/EditRowPlugin"}%
%META:FIELD{name="Support" title="Support" value="http://foswiki.org/Support/EditRowPlugin"}% %META:FIELD{name="Support" title="Support" value="http://foswiki.org/Support/EditRowPlugin"}%
%META:FILEATTACHMENT{name="icons.png" attr="h" comment="" date="1454442922" size="2457" user="ProjectContributor" version="1"}% %META:FILEATTACHMENT{name="icons.png" attr="h" comment="" date="1458435715" size="2457" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="example3.png" attr="h" comment="" date="1454442922" size="15337" user="ProjectContributor" version="1"}% %META:FILEATTACHMENT{name="example3.png" attr="h" comment="" date="1458435715" size="15337" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="example4.png" attr="h" comment="" date="1454442922" size="22834" user="ProjectContributor" version="1"}% %META:FILEATTACHMENT{name="example4.png" attr="h" comment="" date="1458435715" size="22834" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="erp.css" attr="h" comment="" date="1454442922" size="1454" user="ProjectContributor" version="1"}% %META:FILEATTACHMENT{name="erp.css" attr="h" comment="" date="1458435715" size="1454" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="screenshot2.png" attr="h" comment="" date="1454442922" size="12013" user="ProjectContributor" version="1"}% %META:FILEATTACHMENT{name="screenshot2.png" attr="h" comment="" date="1458435715" size="12013" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="TableSort.uncompressed.js" attr="h" comment="" date="1454442922" size="6803" user="ProjectContributor" version="1"}% %META:FILEATTACHMENT{name="TableSort.uncompressed.js" attr="h" comment="" date="1458435715" size="6803" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="erp.js" attr="h" comment="" date="1454442922" size="11898" user="ProjectContributor" version="1"}% %META:FILEATTACHMENT{name="erp.js" attr="h" comment="" date="1458435715" size="11898" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="erp.uncompressed.css" attr="h" comment="" date="1454442922" size="2130" user="ProjectContributor" version="1"}% %META:FILEATTACHMENT{name="erp.uncompressed.css" attr="h" comment="" date="1458435715" size="2130" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="example5.png" attr="h" comment="" date="1454442922" size="9132" user="ProjectContributor" version="1"}% %META:FILEATTACHMENT{name="example5.png" attr="h" comment="" date="1458435715" size="9132" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="erp.uncompressed.js" attr="h" comment="" date="1454442922" size="26625" user="ProjectContributor" version="1"}% %META:FILEATTACHMENT{name="erp.uncompressed.js" attr="h" comment="" date="1458435715" size="26625" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="screenshot1.png" attr="h" comment="" date="1454442922" size="19461" user="ProjectContributor" version="1"}% %META:FILEATTACHMENT{name="screenshot1.png" attr="h" comment="" date="1458435715" size="19461" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="TableSort.js" attr="h" comment="" date="1454442922" size="3626" user="ProjectContributor" version="1"}% %META:FILEATTACHMENT{name="TableSort.js" attr="h" comment="" date="1458435715" size="3626" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="wikiringlogo20x20.png" attr="h" comment="" date="1454442922" size="1343" user="ProjectContributor" version="1"}% %META:FILEATTACHMENT{name="wikiringlogo20x20.png" attr="h" comment="" date="1458435715" size="1343" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="clock.gif" attr="h" comment="" date="1454442922" size="1418" user="ProjectContributor" version="1"}% %META:FILEATTACHMENT{name="clock.gif" attr="h" comment="" date="1458435715" size="1418" user="ProjectContributor" version="1"}%
4 changes: 2 additions & 2 deletions EditRowPlugin/lib/Foswiki/Plugins/EditRowPlugin.pm
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ BEGIN {
} }
} }


our $VERSION = '3.314'; our $VERSION = '3.315';
our $RELEASE = '02 Feb 2016'; our $RELEASE = '19 Mar 2016';
our $SHORTDESCRIPTION = 'Inline edit for tables'; our $SHORTDESCRIPTION = 'Inline edit for tables';
our $NO_PREFS_IN_TOPIC = 1; our $NO_PREFS_IN_TOPIC = 1;


Expand Down
10 changes: 7 additions & 3 deletions EditRowPlugin/lib/Foswiki/Plugins/EditRowPlugin/View.pm
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -21,11 +21,15 @@ sub process {


my $macro = $Foswiki::cfg{Plugins}{EditRowPlugin}{Macro} || 'EDITTABLE'; my $macro = $Foswiki::cfg{Plugins}{EditRowPlugin}{Macro} || 'EDITTABLE';


return 0 unless $text =~ /%${macro}({.*?})?%/s; return 0 unless $text =~ /%${macro}(\{.*?\})?%/s;


my $context = Foswiki::Func::getContext(); my $context = Foswiki::Func::getContext();
return 0 unless $context->{view}; return 0 unless $context->{view};
return 0 if $context->{static};
if ( $context->{static} ) {
$_[0] =~ s/%${macro}(\{.*?\})?%//s;
return 1;
}


my $query = Foswiki::Func::getCgiQuery(); my $query = Foswiki::Func::getCgiQuery();
return 0 unless $query; return 0 unless $query;
Expand Down Expand Up @@ -253,7 +257,7 @@ sub process {
__END__ __END__
Author: Crawford Currie http://c-dot.co.uk Author: Crawford Currie http://c-dot.co.uk
Copyright (c) 2008-2011 Foswiki Contributors Copyright (c) 2008-2016 Foswiki Contributors
Copyright (c) 2007 WindRiver Inc. and TWiki Contributors. Copyright (c) 2007 WindRiver Inc. and TWiki Contributors.
All Rights Reserved. Foswiki Contributors are listed in the All Rights Reserved. Foswiki Contributors are listed in the
AUTHORS file in the root of this distribution. AUTHORS file in the root of this distribution.
Expand Down

0 comments on commit cbcf4b7

Please sign in to comment.