Permalink
Browse files

Item14288: merge master

  • Loading branch information...
2 parents 173cb34 + 6f63e8c commit 7f54afb35177d4e09b6d2c56df90366d7f06dfdc MichaelDaum committed Sep 13, 2017
Showing with 271 additions and 156 deletions.
  1. +2 −1 ConfigurePlugin/data/System/ConfigurePlugin.txt
  2. +2 −2 ConfigurePlugin/lib/Foswiki/Plugins/ConfigurePlugin.pm
  3. +3 −3 ConfigurePlugin/pub/System/ConfigurePlugin/configure.uncompressed.js
  4. +19 −15 ConfigurePlugin/pub/System/ConfigurePlugin/types.uncompressed.js
  5. +8 −7 HistoryPlugin/data/System/HistoryPlugin.txt
  6. +7 −6 HistoryPlugin/lib/Foswiki/Plugins/HistoryPlugin.pm
  7. +2 −2 PatternSkin/data/System/WebCreateNewTopicComponents.txt
  8. +7 −0 SpreadSheetPlugin/test/unit/SpreadSheetPlugin/SpreadSheetPluginTests.pm
  9. +1 −1 TopicUserMappingContrib/lib/Foswiki/Users/TopicUserMapping.pm
  10. +17 −0 UnitTestContrib/test/unit/DependencyTests.pm
  11. +12 −7 WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin/HTML2TML.pm
  12. +33 −32 WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin/HTML2TML/Node.pm
  13. +3 −3 core/data/System/AdminSkillsAssumptions.txt
  14. +6 −5 core/data/System/Contribs.txt
  15. +8 −7 core/data/System/ContributedAddOns.txt
  16. +5 −4 core/data/System/DeveloperDocumentationCategory.txt
  17. +4 −3 core/data/System/InstallationGuide.txt
  18. +1 −1 core/data/System/InstallationGuidePart2.txt
  19. +4 −4 core/data/System/Plugins.txt
  20. +2 −2 core/data/System/ReferenceManual.txt
  21. +5 −2 core/data/System/ReleaseHistory.txt
  22. +1 −1 core/data/System/ReleaseNotes01x00.txt
  23. +11 −2 core/data/System/Skins.txt
  24. +1 −1 core/lib/Foswiki.spec
  25. +10 −7 core/lib/Foswiki/Configure/Checkers/AuthScripts.pm
  26. +48 −15 core/lib/Foswiki/Configure/Checkers/FeatureAccess/Configure.pm
  27. +5 −2 core/lib/Foswiki/Configure/Dependency.pm
  28. +2 −2 core/lib/Foswiki/UI.pm
  29. +3 −4 core/locale/nl.po
  30. +12 −6 core/locale/tlh.po
  31. +24 −9 core/tools/configure
  32. +3 −0 core/tools/develop/git-fix-meta.pl
@@ -1,4 +1,4 @@
-%META:TOPICINFO{author="ProjectContributor" date="1491685944" format="1.1" version="1"}%
+%META:TOPICINFO{author="ProjectContributor" date="1505301976" format="1.1" version="1"}%
%META:TOPICPARENT{name="Plugins"}%
---+!! Configure Plugin
%FORMFIELD{"Description"}%
@@ -42,6 +42,7 @@ The plugin uses the =JsonRpcContrib=, which must be installed.
---++ Change History
+| 05 Sep 2017: | (1.09) Foswikitask:Item14472: replaced use of =attr()= with =prop()= where needed; fixed use of =null= value trying to trim values |
| 04 Apr 2017: | (1.08) Foswikitask:Item13883: Updated base template to suggest solutions when configure shows base login page.<br/>\
Foswikitask:Item14366: Reorder initialization to allow local CGI::Carp |
| 23 Jan 2017: | (1.07) Foswikitask:Item14287: Configure needs to encode reported configuration values. |
@@ -31,8 +31,8 @@ package Foswiki::Plugins::ConfigurePlugin;
use strict;
use warnings;
-our $VERSION = '1.08';
-our $RELEASE = '04 Apr 2017';
+our $VERSION = '1.09';
+our $RELEASE = '05 Sep 2017';
our $SHORTDESCRIPTION = '=configure= interface using json-rpc';
our $NO_PREFS_IN_TOPIC = 1;
@@ -650,7 +650,7 @@ function _id_ify(id) {
$butt = $('<input type="checkbox" id="' + id + '">').appendTo($buttons);
$butt.click(function() {
if ( $(this).attr("checked") ) {
- $ui.removeAttr("disabled");
+ $ui.prop("disabled", false);
$node.removeClass("disabled");
} else {
$ui.attr("disabled", "disabled");
@@ -667,7 +667,7 @@ function _id_ify(id) {
$ui.attr("disabled", "disabled");
$node.addClass("disabled");
} else {
- $butt.attr("checked", "checked");
+ $butt.prop("checked", true);
}
$butt.appendTo($buttons);
$("<label for='"+id+"'> enable</label>")
@@ -896,7 +896,7 @@ if (0) {
add_dependency(
entry.ENABLE_IF, $node, function($n, tf) {
if (tf) {
- $n.find("input,textarea").removeAttr('disabled');
+ $n.find("input,textarea").prop('disabled', false);
} else {
$n.find("input,textarea")
.attr('disabled', 'disabled');
@@ -45,7 +45,7 @@ var Types = {};
this.useVal(val);
}
if (this.spec.SPELLCHECK) {
- this.$ui.attr('spellcheck', 'true');
+ this.$ui.prop('spellcheck', true);
}
if (typeof(change_handler) !== "undefined") {
this.$ui.change(change_handler);
@@ -133,7 +133,7 @@ var Types = {};
}
if (this.spec.current_value !== 0) {
- this.$ui.attr('checked', true);
+ this.$ui.prop('checked', true);
}
if (this.spec.extraClass) {
this.$ui.addClass(this.spec.extraClass);
@@ -165,15 +165,15 @@ var Types = {};
} else if ( val == '1') {
val = true;
}
- this.$ui.attr('checked', val );
+ this.$ui.prop('checked', val );
}
});
Types.PASSWORD = Types.STRING.extend({
createUI: function(change_handler) {
this._super(change_handler);
this.$ui.attr('type', 'password');
- this.$ui.attr('autocomplete', 'off');
+ this.$ui.prop('autocomplete', false);
return this.$ui;
}
});
@@ -252,8 +252,10 @@ var Types = {};
isDefault: function() {
// To do this comparison requires parsing and rewriting the perl to
// javascript. Not impossible, but tricky.
- var a = this.currentValue().trim(),
- b = this.spec['default'].trim(), av, bv;
+ var a = this.currentValue(),
+ b = this.spec['default'], av, bv;
+ a = (a == null) ? null : a.trim();
+ b = (b == null) ? null : b.trim();
try {
// See if they parse as JS - they probably will! If they don't,
// parse, fall back to a string comparison :-(
@@ -308,7 +310,7 @@ var Types = {};
Types.PATHINFO = Types.STRING.extend({
createUI: function(change_handler) {
this._super(change_handler);
- this.$ui.attr('readonly', 'readonly');
+ this.$ui.prop('readonly', true);
return this.$ui;
}
});
@@ -340,8 +342,8 @@ var Types = {};
Types.NULL = Types.BaseType.extend({
createUI: function(change_handler) {
this._super(change_handler);
- this.$ui.attr('readonly', 'readonly');
- this.$ui.attr('disabled', 'disabled');
+ this.$ui.prop('readonly', true);
+ this.$ui.prop('disabled', true);
this.$ui.attr('size', '1');
return this.$ui;
}
@@ -392,7 +394,7 @@ var Types = {};
this.$ui.change(change_handler);
}
if (this.spec.MULTIPLE) {
- this.$ui.attr('multiple', 'multiple');
+ this.$ui.prop('multiple', true);
}
if (typeof(this.spec.select_from) !== "undefined") {
@@ -401,7 +403,7 @@ var Types = {};
opt = this.spec.select_from[i];
$option = $('<option>' + opt + '</option>');
if (sel[opt]) {
- $option.attr('selected', 'selected');
+ $option.prop('selected', true);
}
this.$ui.append($option);
}
@@ -420,17 +422,19 @@ var Types = {};
this.$ui.find('option').each(function() {
var opt = sf[i++];
if (sel[opt]) {
- $(this).attr('selected', 'selected');
+ $(this).prop('selected', true);
} else {
- $(this).removeAttr('selected');
+ $(this).prop('selected', false);
}
});
}
},
isDefault: function() {
- var a = this.currentValue().trim(),
- b = this.spec['default'].trim();
+ var a = this.currentValue(),
+ b = this.spec['default'];
+ a = (a == null) ? null : a.trim();
+ b = (b == null) ? null : b.trim();
b = b.replace(/^\s*(["'])(.*?)\1\s*/, "$2");
return a === b;
}
@@ -1,8 +1,8 @@
-%META:TOPICINFO{author="ProjectContributor" comment="" date="1441729129" format="1.1" version="1"}%
+%META:TOPICINFO{author="ProjectContributor" comment="" date="1505301976" format="1.1" version="1"}%
%META:TOPICPARENT{name="Plugins"}%
---+ History Plugin
-%$SHORTDESCRIPTION%.
+%FORMFIELD{"Description"}%.
The output can arbitrarily be formatted. An example for a Wikipedia-like history is included.
@@ -63,10 +63,11 @@ __Note:__ You do not need to install anything on the browser to use this plugin.
---++ Plugin Info
<!--
- * Set SHORTDESCRIPTION = Shows a complete history of a document
+ * Set SHORTDESCRIPTION = %$SHORTDESCRIPTION%
-->
| Change History: | <!-- versions below in reverse order -->&nbsp; |
+| 01 Sep 2017: | 1.14 fixed formatting of date tokens |
| 08 Sep 2015: | 1.13 Remove RevCommentPlugin hooks from the templates. |
| 15 Mar 2015: | 1.12 Version released with Foswiki 2.0 Foswikitask:Item12881: Add HISTORYPLUGIN_NREV setting. |
| 28 Nov 2012: | 1.11 Version released with Foswiki 1.1.6. Change to perl version strings |
@@ -94,12 +95,12 @@ __Note:__ You do not need to install anything on the browser to use this plugin.
__Related Topics:__ %SYSTEMWEB%.%WIKIPREFSTOPIC%, %LOCALSITEPREFS%, [[%SYSTEMWEB%.Plugins][Plugins]]
%META:FORM{name="PackageForm"}%
-%META:FIELD{name="Copyright" title="Copyright" value=" 2006, !JChristophFuchs; 2008-2015 Kenneth Lavrsen and Foswiki Contributors"}%
-%META:FIELD{name="Home" title="Home" value="http://foswiki.org/Extensions/HistoryPlugin"}%
+%META:FIELD{name="Copyright" title="Copyright" value=" 2006, !JChristophFuchs; 2008-2017 Kenneth Lavrsen and Foswiki Contributors"}%
+%META:FIELD{name="Home" title="Home" value="https://foswiki.org/Extensions/HistoryPlugin"}%
%META:FIELD{name="Release" title="Release" value="%25$RELEASE%25"}%
%META:FIELD{name="License" title="License" value="GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]])"}%
%META:FIELD{name="Version" title="Version" value="%25$VERSION%25"}%
%META:FIELD{name="Author" title="Author" value="Foswiki:Main.KennethLavrsen"}%
-%META:FIELD{name="Support" title="Support" value="http://foswiki.org/Support/HistoryPlugin"}%
+%META:FIELD{name="Support" title="Support" value="https://foswiki.org/Support/HistoryPlugin"}%
%META:FIELD{name="Repository" title="Repository" value="https://github.com/foswiki/distro"}%
-%META:FILEATTACHMENT{name="screenshot.png" attr="h" comment="" date="1441729129" size="72043" user="ProjectContributor" version="1"}%
+%META:FILEATTACHMENT{name="screenshot.png" attr="h" comment="" date="1505301976" size="72043" user="ProjectContributor" version="1"}%
@@ -10,8 +10,8 @@ use Foswiki::AccessControlException ();
# =========================
# Simple decimal version, no leading "v"
-our $VERSION = "1.13";
-our $RELEASE = '1.13';
+our $VERSION = "1.14";
+our $RELEASE = '01 Sep 2017';
our $NO_PREFS_IN_TOPIC = 1;
our $SHORTDESCRIPTION = 'Shows a complete history of a topic';
@@ -156,7 +156,7 @@ sub _handleHistory {
$revinfo =~ s/\$rev/$rev/g;
$revinfo =~ s/\$date/Foswiki::Func::formatTime($date)/ge;
$revinfo =~
-s/\$(year|ye|week|web|wday|tz|topic|time|seconds|rev|rcs|month|mo|minutes|longdate|isotz|iso|http|hours|epoch|email|dow|day)/_formatTime("\$$1", $topic, $web)/ge;
+s/\$(year|ye|week|web|wday|tz|topic|time|seconds|rev|rcs|month|mo|minutes|longdate|isotz|iso|http|hours|epoch|email|dow|day)/_formatTime("\$$1", $web, $topic, $rev)/ge;
$revinfo =~ s/\$username/$user/g;
$revinfo =~ s/\$wikiname/$wikiName/g;
$revinfo =~ s/\$wikiusername/$wikiUserName/g;
@@ -177,9 +177,10 @@ s/\$(year|ye|week|web|wday|tz|topic|time|seconds|rev|rcs|month|mo|minutes|longda
}
sub _formatTime {
- my ( $format, $topic, $web ) = @_;
+ my ( $format, $web, $topic, $rev ) = @_;
- return Foswiki::Func::expandCommonVariables( '%REVINFO{"' . $format . '"}%',
+ return Foswiki::Func::expandCommonVariables(
+ '%REVINFO{"' . $format . '" rev="' . $rev . '"}%',
$topic, $web );
}
@@ -248,7 +249,7 @@ sub _handleHeadFoot {
__END__
Foswiki - The Free and Open Source Wiki, http://foswiki.org/
-Copyright (C) 2008-2015 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.
@@ -1,4 +1,4 @@
-%META:TOPICINFO{author="ProjectContributor" date="1449867281" format="1.1" version="1"}%
+%META:TOPICINFO{author="ProjectContributor" date="1505301976" format="1.1" version="1"}%
%META:TOPICPARENT{name="WebHome"}%
---+!! <nop>%TOPIC%
This topic is meant for developers. It contains =INCLUDE= sections to build a "create new topic" form.
@@ -105,7 +105,7 @@ This is the code used in the [[%SANDBOXWEB%.%HOMETOPIC%]] form:
}%%ADDTOZONE{"head"
tag="WebCreateNewTopicTemplate:META"
text="<noautolink><literal><meta name='foswiki.webTopicCreator.nameFeedback' content='%MAKETEXT{"Topic will be named: "}%' />
-<meta name='foswiki.webTopicCreator.errorFeedbackNoWikiName' content='<p class=\"foswikiGrayText\">%MAKETEXT{"Enter the topic name as WikiWord or check the allow non-Wiki Word box."}%</p>' /></literal></noautolink>"
+<meta name='foswiki.webTopicCreator.errorFeedbackNoWikiName' content='<p class=\"foswikiGrayText\">%ENCODE{"%MAKETEXT{"Enter the topic name as WikiWord or check the allow non-Wiki Word box."}%" type="entity"}%</p>' /></literal></noautolink>"
requires=""
}%%ENDSECTION{"js"}%
@@ -89,6 +89,13 @@ sub CALC {
my $rsltR = Foswiki::Func::expandCommonVariables($calcR);
if ($ne) {
+ my $i = 1;
+ while ( $rsltC eq $rsltR ) {
+ $rsltR = Foswiki::Func::expandCommonVariables($calcR);
+ print STDERR "RETRY For NE\n";
+ $i++;
+ last if ( $i == 5 );
+ }
$this->assert_str_not_equals( $rsltC, $rsltR );
}
else {
@@ -447,7 +447,7 @@ m/^\s+\*\s($Foswiki::regex{webNameRegex}\.)?($Foswiki::regex{wikiWordRegex})\s*(
$entry .= $odate;
}
else {
- print STDERR "6: Appending $today to $entry NL $line \n";
+ #print STDERR "6: Appending $today to $entry NL $line \n";
$entry .= $today . "\n" . $line;
}
@@ -346,6 +346,23 @@ sub test_check_dep_version_with_underscore {
}
+sub test_check_dep_version_oddball_DBI {
+ my ($this) = @_;
+
+ # Check a normal installed dependency with a version number that includes _
+ # 1, Algorithm::Diff v1.19_01 installed
+ my $dep = new Foswiki::Configure::Dependency(
+ type => "perl",
+ module => "DBI",
+ version => ">=1"
+ );
+ my ( $ok, $message ) = $dep->checkDependency();
+ $this->assert_equals( 1, $ok );
+ $this->assert_matches( qr/DBI version \d+\.\d+(?:_\d+)? installed/,
+ $message );
+
+}
+
sub test_compare_extension_versions {
my ($this) = @_;
@@ -196,13 +196,18 @@ DEFAULT
$text =~ s/\&\#x22;/\&quot;/goi;
$text =~ s/\&\#160;/\&nbsp;/goi;
- # SMELL: Item11912 These are left behind by TMCE as zero width characters
- # surrounding italics and bold inserted by Ctrl-i and Ctrl-b
- # We really ought to have a better solution. TMCE is supposed
- # to handle this it the cleanup routine, but it doesn't happen,
- # and cleanup routine has been deprecated.
- $text =~ s/&#xFEFF;//g; # TMCE 3.5.x
- $text =~ s/&#x200B;//g; # TMCE pre 3.5
+ # Item11912 Item14420 Zero-width space (x200B) and Non-breaking
+ # zero-width space (xFEFF) are left behind by TinyMCE with
+ # italics and bold inserted by Ctrl-i and Ctrl-b. This is probably
+ # a TinyMCE bug, but in general these characters are useless in TML
+ # so we strip them in all their forms anyway.
+ foreach my $d ( 0xFEFF, 0x200B ) {
+ $text =~ s/&#$d;//g; # decimal entity
+ my $c = chr($d);
+ $text =~ s/$c//g;
+ my $h = sprintf( "%04x", $d );
+ $text =~ s/&#x$h;//g; # hex entity
+ }
HTML::Entities::_decode_entities( $text, safeEntities() );
Oops, something went wrong.

0 comments on commit 7f54afb

Please sign in to comment.