Permalink
Browse files

Item13941: Don't show EDITTABLE macro in static context

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...
1 parent d1428a2 commit 60ee4cd387e2942b08a626c6199fe574b17fddab @gac410 gac410 committed Mar 20, 2016
@@ -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
<!--
One line description, required for extensions repository catalog.
@@ -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!
| 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.313 (26 Oct 2015) | Foswikitask:Item13834 Unable to edit cells containing utf-8 data.<br/> \
Foswikitask:Item13815 Typo in regular expression.<br/> \
@@ -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="Home" title="Home" value="http://foswiki.org/Extensions/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="example3.png" attr="h" comment="" date="1454442922" 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="erp.css" attr="h" comment="" date="1454442922" 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="TableSort.uncompressed.js" attr="h" comment="" date="1454442922" 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.uncompressed.css" attr="h" comment="" date="1454442922" 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="erp.uncompressed.js" attr="h" comment="" date="1454442922" 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="TableSort.js" attr="h" comment="" date="1454442922" 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="clock.gif" attr="h" comment="" date="1454442922" size="1418" 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="1458435715" size="15337" 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="1458435715" size="1454" 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="1458435715" size="6803" 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="1458435715" size="2130" 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="1458435715" size="26625" 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="1458435715" size="3626" 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="1458435715" size="1418" user="ProjectContributor" version="1"}%
@@ -32,8 +32,8 @@ BEGIN {
}
}
-our $VERSION = '3.314';
-our $RELEASE = '02 Feb 2016';
+our $VERSION = '3.315';
+our $RELEASE = '19 Mar 2016';
our $SHORTDESCRIPTION = 'Inline edit for tables';
our $NO_PREFS_IN_TOPIC = 1;
@@ -21,11 +21,15 @@ sub process {
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();
return 0 unless $context->{view};
- return 0 if $context->{static};
+
+ if ( $context->{static} ) {
+ $_[0] =~ s/%${macro}(\{.*?\})?%//s;
+ return 1;
+ }
my $query = Foswiki::Func::getCgiQuery();
return 0 unless $query;
@@ -253,7 +257,7 @@ sub process {
__END__
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.
All Rights Reserved. Foswiki Contributors are listed in the
AUTHORS file in the root of this distribution.

0 comments on commit 60ee4cd

Please sign in to comment.