Skip to content

Commit

Permalink
Item15138: IconSearchPath can't be set to empty
Browse files Browse the repository at this point in the history
Item15139: add optional t parameter to jquery.loader to prevent browser caching

Item15140: a natedit formfield cannot be checked for mandatoryness
  • Loading branch information
MichaelDaum committed Jun 1, 2022
1 parent d8de321 commit ea93d52
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 8 deletions.
3 changes: 2 additions & 1 deletion JQueryPlugin/data/System/JQueryLoader.txt
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" comment="" date="1645517959" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" comment="" date="1654084128" format="1.1" version="1"}%
%META:TOPICPARENT{name="JQueryPlugin"}%
---+!! %TOPIC%
%JQPLUGINS{"loader"
Expand Down Expand Up @@ -33,6 +33,7 @@ Parameter are specified using HTML5 data, as in
| web | the web from where to load content | current web |
| topic | the topic from where to load content | current topic |
| section | the section within the topic (see %SYSTEMWEB%.VarSTARTSECTION) | |
| caching | boolean if disabled will prevent browser caching | true |
| select | jQuery selector to extract a specific node from the retrieved data | |
| params | url parameter that are sent to the server | ={"skin":"text"}= |
| mode | specify whether the content is either loaded automatically or by clicking on the container; \
Expand Down
4 changes: 2 additions & 2 deletions JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin.pm
Expand Up @@ -25,8 +25,8 @@ BEGIN {
}
}

our $VERSION = '10.22';
our $RELEASE = '25 Apr 2022';
our $VERSION = '10.30';
our $RELEASE = '01 Jun 2022';
our $SHORTDESCRIPTION = 'jQuery <nop>JavaScript library for Foswiki';
our $NO_PREFS_IN_TOPIC = 1;
our $iconService;
Expand Down
4 changes: 2 additions & 2 deletions JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/IconService.pm
Expand Up @@ -45,7 +45,7 @@ sub new {
# icon search path
unless ( defined $this->{_iconSearchPath} ) {
my $iconSearchPath = $Foswiki::cfg{JQueryPlugin}{IconSearchPath}
|| 'FamFamFamSilkIcons, FamFamFamSilkCompanion1Icons, FamFamFamSilkCompanion2Icons, FamFamFamSilkGeoSilkIcons, FamFamFamFlagIcons, FamFamFamMiniIcons, FamFamFamMintIcons';
// 'FamFamFamSilkIcons, FamFamFamSilkCompanion1Icons, FamFamFamSilkCompanion2Icons, FamFamFamSilkGeoSilkIcons, FamFamFamFlagIcons, FamFamFamMiniIcons, FamFamFamMintIcons';
@{ $this->{_iconSearchPath} } = split( /\s*,\s*/, $iconSearchPath );
}

Expand Down Expand Up @@ -434,7 +434,7 @@ sub _readIconPath {
__END__
Foswiki - The Free and Open Source Wiki, http://foswiki.org/
Copyright (C) 2010-2020 Foswiki Contributors. Foswiki Contributors
Copyright (C) 2010-2022 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
2 changes: 1 addition & 1 deletion JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/LOADER.pm
Expand Up @@ -12,7 +12,7 @@ sub new {
my $this = bless(
$class->SUPER::new(
name => 'Loader',
version => '4.60',
version => '4.70',
author => 'Michael Daum',
homepage => 'http://foswiki.org/Extensions/JQueryPlugin',
tags => 'LOADER',
Expand Down
Expand Up @@ -19,6 +19,7 @@
topic: undefined,
section: undefined,
skin: 'text',
caching: true,
select: undefined,
hideEffect: 'fadeOut',
showEffect: 'fadeIn',
Expand Down Expand Up @@ -157,6 +158,10 @@
params.skin = self.opts.skin;
}

if (!self.opts.caching) {
params.t = Date.now();
}

// hide effect
if (self.opts.hideEffect) {
self.container.animateCSS({
Expand Down
Expand Up @@ -2,7 +2,17 @@
jQuery(function($) {

$.validator.addClassRules("foswikiMandatory", {
required: true
required: true,
normalizer: function(val) {
var elem = this,
natedit = $(elem).data("natedit");

if (typeof(natedit) !== 'undefined' && typeof(natedit.getValue) !== 'undefined') {
//console.log("getting value from natedit");
val = natedit.getValue();
}
return val;
}
});

$(".jqValidate:not(.jqInitedValidate)").livequery(function() {
Expand Down
Expand Up @@ -3183,7 +3183,17 @@ return $;
jQuery(function($) {

$.validator.addClassRules("foswikiMandatory", {
required: true
required: true,
normalizer: function(val) {
var elem = this,
natedit = $(elem).data("natedit");

if (typeof(natedit) !== 'undefined' && typeof(natedit.getValue) !== 'undefined') {
//console.log("getting value from natedit");
val = natedit.getValue();
}
return val;
}
});

$(".jqValidate:not(.jqInitedValidate)").livequery(function() {
Expand Down

0 comments on commit ea93d52

Please sign in to comment.