Skip to content

Commit

Permalink
Item14288: Merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDaum committed Dec 7, 2017
2 parents 1175d88 + 5f07c26 commit 2d1b98d
Show file tree
Hide file tree
Showing 43 changed files with 140 additions and 97 deletions.
4 changes: 2 additions & 2 deletions JQueryPlugin/data/System/JQueryAjaxHelper.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1452096476" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1512569664" format="1.1" version="1"}%
%META:TOPICPARENT{name="JQueryPlugin"}%
---+!! %TOPIC%
%JQREQUIRE{"chili, ui, ui::autocomplete" warn="off"}%
Expand Down Expand Up @@ -63,7 +63,7 @@ loads the =topic= section of this topic, which expands to the topic list.
"^%URLPARAM{"term" default="does not exist"}%.*"
type="regex"
scope="topic"
format="<nop>%URLPARAM{"format" encode="safe,quote" default="{\\"label\\":\\"$topic\\", \\"value\\":\\"$web.$topic\\"}"}%"
format="<nop>%URLPARAM{"format" encode="safe,quote" default="{\\"label\\":\\"$topic\\", \\"value\\":\\"$topic\\"}"}%"
separator=","
limit="%URLPARAM{"limit" default="10"}%"
nonoise="on"
Expand Down
5 changes: 2 additions & 3 deletions JQueryPlugin/data/System/JQueryLiveQuery.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1456220586" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1512570593" format="1.1" version="1"}%
%META:TOPICPARENT{name="JQueryPlugin"}%
---+ %TOPIC%
%JQPLUGINS{"livequery"
Expand Down Expand Up @@ -160,10 +160,9 @@ processed by an event handler registered using =livequery=.
%STARTSECTION{"loadme"}% <div class="trigger">hello world</div> %ENDSECTION{"loadme"}%
</verbatim>


This is a JQueryLoader that will load the content of the =loadme= section below one with a delay of two second.

<div id="loader" class="jqLoader {section:'loadme', delay:2000}">
<div id="loader" class="jqLoader" data-section="loadme" data-delay="2000">
%ICON{"processing"}%
</div>

Expand Down
10 changes: 5 additions & 5 deletions JQueryPlugin/data/System/JQueryLoader.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1456220586" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1512570593" format="1.1" version="1"}%
%META:TOPICPARENT{name="JQueryPlugin"}%
---+!! %TOPIC%
%JQPLUGINS{"loader"
Expand All @@ -23,10 +23,10 @@ Then add the ==jqLoader== css class to the div (or verbatim) element which will
a container for the content to be loaded. Any ==jqLoader== container requires either
an ==url== or a ==section== parameter to specify the location from where to load the content.

Parameter are specified using JQueryMetadata, as in
Parameter are specified using HTML5 data, as in

<verbatim class="html">
<div class="jqLoader {key:'value', ....}"></div>
<div class="jqLoader" data-key1="value1" data-key2="value2" ...></div>
</verbatim>

| *Parameter* | *Description* | *Default* |
Expand Down Expand Up @@ -61,7 +61,7 @@ events can be used to hook your own callbacks to be processed when they are fire

<verbatim class="tml">
%JQREQUIRE{"loader"}%
<div class="jqLoader {section:'recentchanges'}" id="myLoader">
<div class="jqLoader" data-section="recentchanges" id="myLoader">
<verbatim>
%STARTSECTION{"recentchanges"}%<!-- -->
%SEARCH{
Expand All @@ -82,7 +82,7 @@ events can be used to hook your own callbacks to be processed when they are fire
... if installed:

%JQREQUIRE{"loader"}%
<div class="jqLoader {section:'recentchanges', effect:'%CALCULATE{$FILTER([^a-zA-Z0-9 ], %URLPARAM{"effect" default="fade" }%)}%'}" id="myLoader"></div>
<div class="jqLoader" id="myLoader" data-section="recentchanges" data-effect="%URLPARAM{"effect" default="fade" encode="safe"}%" ></div>

<div class="foswikiLeft">
<label for="effect"><b>Effect:</b></label>
Expand Down
6 changes: 3 additions & 3 deletions JQueryPlugin/data/System/JQueryTextboxList.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1456220586" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1512570593" format="1.1" version="1"}%
%META:TOPICPARENT{name="JQueryPlugin"}%
---+ %TOPIC%
%JQPLUGINS{"textboxlist"
Expand All @@ -13,7 +13,7 @@

---++ Description
%STARTSECTION{"summary"}%
Turns a text input into a Facebook like list widget with autocompletion.
Turns a text input into a list widget with autocompletion.
This plugin adds a new formfield type =textboxlist= to DataForms.
%ENDSECTION{"summary"}%

Expand Down Expand Up @@ -48,7 +48,7 @@ In both cases =options= is a json object to customized the textboxlist to your n
| listValueClass | css class of values in the list | jqTextboxListValue |
| closeClass | css class of the close button of a list value | jqTextboxListClose |
| enableClose | boolean flag toggling the display of a close button on a list value | true |
| doSort | boolean flag enabling to sort list values when displaying them | false |
| sorting | option to enable sorting of the list of values, can =true=, =false= or =manual= | manual |
| inputName | name of the input element used for list values; equals to the name of the original input field if undefined | undefined |
| resetControl | jquery selector to specify a reset button; will revert changes to the initial list of values | undefined |
| clearControl | jquery selector to specify a clear button that will empty the textboxlist | undefined |
Expand Down
5 changes: 3 additions & 2 deletions JQueryPlugin/data/System/JQueryWikiWord.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1456220586" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1512571883" format="1.1" version="1"}%
%META:TOPICPARENT{name="JQueryPlugin"}%
---+ %TOPIC%
%JQPLUGINS{"wikiword"
Expand Down Expand Up @@ -27,7 +27,8 @@ to derive the !WikiWord using HTML5 meta data:
prefix:'string to be prefixed to the wiki word', /* e.g. 'Project' */
suffix:'string to be appended to the wiki word', /* e.g. 'AUTOINC0' */
transliterate: true,
allow:'characters that are allowed in a wiki word' /* e.g. 'a-zA-Z\\d' */
allowedRegex:'characters that are allowed in a wiki word', /* e.g. 'a-zA-Z\\d' */
forbiddenRegex:'characters that are not allowed in a wiki word' /* e.g. '[^a-zA-Z\\d]' */
}
</verbatim>

Expand Down
2 changes: 1 addition & 1 deletion JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/LIVEQUERY.pm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ sub new {
my $this = bless(
$class->SUPER::new(
name => 'LiveQuery',
version => '1.3.1',
version => '1.3.6',
author => 'Brandon Aaron, Alexander Zaytsev',
homepage => 'https://github.com/hazzik/livequery',
javascript => ['jquery.livequery.js'],
Expand Down
2 changes: 1 addition & 1 deletion JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/LOADER.pm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ sub new {
my $this = bless(
$class->SUPER::new(
name => 'Loader',
version => '2.11',
version => '2.12',
author => 'Michael Daum',
homepage => 'http://foswiki.org/Extensions/JQueryPlugin',
tags => 'LOADER',
Expand Down
2 changes: 1 addition & 1 deletion JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/STARS.pm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ sub new {
my $this = bless(
$class->SUPER::new(
name => 'Stars',
version => '2.00',
version => '2.10',
author => 'Michael Daum',
homepage => 'http://foswiki.org/Extensions/JQueryPlugin',
css => [ 'jquery.stars.css', ],
Expand Down
12 changes: 6 additions & 6 deletions JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/SUPERFISH.pm
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ sub new {

my $this = bless(
$class->SUPER::new(
name => 'Superfish',
version => '1.7.7',
author => 'Joel Birch',
homepage => 'http://users.tpg.com.au/j_birch/plugins/superfish/',
javascript => ['jquery.superfish.js'],
css => ['jquery.superfish.css'],
name => 'Superfish',
version => '1.7.7',
author => 'Joel Birch',
homepage => 'https://superfish.joelbirch.co/',
javascript => ['jquery.superfish.js'],
css => ['jquery.superfish.css'],
dependencies => ['hoverintent'],
),
$class
Expand Down
4 changes: 2 additions & 2 deletions JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/TEXTBOXLIST.pm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ sub new {
my $this = bless(
$class->SUPER::new(
name => 'TextboxList',
version => '1.01',
version => '2.11',
author => 'Michael Daum',
homepage => 'http://foswiki.org/Extensions/JQueryPlugin',
css => ['jquery.textboxlist.css'],
Expand All @@ -47,7 +47,7 @@ sub new {
__END__
Foswiki - The Free and Open Source Wiki, http://foswiki.org/
Copyright (C) 2010-2016 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
10 changes: 5 additions & 5 deletions JQueryPlugin/pub/System/JQueryPlugin/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ FOSWIKI_LIB=$(FOSWIKI_ROOT)/lib
JQUERYPLUGIN_LIB=$(FOSWIKI_LIB)/Foswiki/Plugins/JQueryPlugin

MINIFYJS=$(shell if which uglifyjs >/dev/null; then echo $(UGLIFYJS); else echo $(NOMINIFYJS); fi)
UGLIFYJS="uglifyjs -m -b beautify=false,ascii-only=true"
UGLIFYJS="uglifyjs -m -c --"
NOMINIFYJS="echo 'WARNING: no javascript minifier found' >&2"

MINIFYCSS=$(shell if which cssmin >/dev/null; then echo $(CSSMIN); else echo $(NOMINIFYCSS); fi)
CSSMIN="cssmin"
NOMINIFYCSS="echo 'WARNING: no css minifier found' >&2"

JSLINT=$(shell if which eslint > /dev/null; then echo $(ESHINT); else echo $(NOJSLINT); fi)
NOJSLINT="echo 'WARNING: no javascrit linter found' >&2"
NOJSLINT="echo 'WARNING: no javascript linter found' >&2"

SASS=$(shell if which node-sass >/dev/null; then echo $(SASS_CMD); else echo $(NOSASS); fi)
SASS_CMD="node-sass --output-style expanded"
NOSASS="echo 'WARNING: no sass preprocessor found' >&2"

ESHINT="eslint"
ESHINT="eslint -f compact"
GZIP="gzip"
CAT="cat"
PATCH="patch"
Expand All @@ -44,14 +44,14 @@ jslint: subdirs $(TARGET:.js=.jslint)
@if $(DEBUG); then \
echo creating $@ from $<; $(CAT) $< > $@; \
else \
echo minifying $@ from $<; $(MINIFYJS) $< -o $@; \
echo minifying $@ from $<; $(MINIFYJS) $< > $@; \
fi

%.js: %_src.js
@if $(DEBUG); then \
echo creating $@ from $<; $(CAT) $< > $@; \
else \
echo minifying $@ from $<; $(MINIFYJS) $< -o $@; \
echo minifying $@ from $<; $(MINIFYJS) $< > $@; \
fi

%.gz: %
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
"use strict";
var $j = jQuery.noConflict();
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"use strict";
jQuery(function($) {
var defaults = {
selectFirst:false,
Expand All @@ -14,7 +15,7 @@ jQuery(function($) {
$this.attr("autocomplete")
|| $this[0].getAttribute("autocomplete") /* fix for firefox-4 */
|| '',
options = $.extend({}, defaults, $this.metadata());
options = $.extend({}, defaults, $this.data(), $this.metadata());

if (!urlOrData.match("^https?://")) {
urlOrData = urlOrData.split(/\s*,\s*/);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"use strict";
jQuery(function($) {
'use strict';

$(".jqButton:not(.jqInitedButton)").livequery(function() {
var $this = $(this),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
"use strict";
jQuery(function($) {
$(".jqCycle:not(.jqInitedCycle)").livequery(function() {
var $this = $(this);
var opts = $.extend({}, $this.metadata());
var opts = $.extend({}, $this.data(), $this.metadata());
$this.addClass(".jqInitedCycle").cycle(opts);
});
});
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* jQuery fluid font plugin 1.0
* jQuery fluid font plugin 1.01
*
* Copyright (c) 2009-2016 Foswiki Contributors http://foswiki.org
* Copyright (c) 2009-2017 Foswiki Contributors http://foswiki.org
*
* inspired by TextZooming by James Newbery http://www.tinnedfruit.com/sandbox/textzoom.html
*
Expand All @@ -11,6 +11,7 @@
*
*/

"use strict";
/***************************************************************************
* plugin definition
*/
Expand Down Expand Up @@ -47,7 +48,7 @@

fontSize = $this.css('font-size');
fontRatio = getRatio(fontSize);
lineHeight = $this.css('line-height')
lineHeight = $this.css('line-height');
lineRatio = getRatio(lineHeight);
lineRatio = lineRatio / fontRatio;
//$.log("fontSize="+fontSize+" lineHeight="+lineHeight+" fontRatio="+fontRatio+" lineRatio="+lineRatio);
Expand Down Expand Up @@ -97,7 +98,7 @@
/* initialisation */
$(function() {
$(".jqFluidFont").not(".jqInitedFluidFont").each(function() {
var $this = $(this), opts = $.extend({}, $this.metadata());
var $this = $(this), opts = $.extend({}, $this.data(), $this.metadata());
$this.addClass("jqInitedFluidFont");
$this.fluidfont(opts);
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
"use strict";
jQuery(function($) {
$(".jqGradient:not(.jqInitedGradient)").each(function() {
var $this = $(this);
$this.addClass("jqInitedGradient");
var opts = $.extend({}, $this.metadata());
var opts = $.extend({}, $this.data(), $this.metadata());
$this.gradient(opts);
});
});
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"use strict";
jQuery(function($) {
var defaults = {
speed: 1000,
Expand All @@ -8,7 +9,7 @@ jQuery(function($) {
$('.jqInnerfade:not(.jqInitedInnerfade)').livequery(function() {
var $this = $(this);
$this.addClass("jqInitedInnerfade");
var opts = $.extend({}, defaults, $this.metadata());
var opts = $.extend({}, defaults, $this.data(), $this.metadata());
$this.innerfade(opts);
});
});
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
/*
* jQuery Loader plugin 2.11
* jQuery Loader plugin 2.13
*
* Copyright (c) 2011-2016 Foswiki Contributors http://foswiki.org
* Copyright (c) 2011-2017 Foswiki Contributors http://foswiki.org
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
*/
"use strict";
jQuery(function($) {

// global defaults
Expand Down Expand Up @@ -55,7 +56,7 @@ jQuery(function($) {
self.load();
}
}
};
}

// init method
JQLoader.prototype.init = function() {
Expand All @@ -65,7 +66,13 @@ jQuery(function($) {
// add refresh listener
$elem.bind("refresh.jqloader", function(e, opts) {
$.extend(self.options, opts);
self.load();
if (self.options.delay) {
window.setTimeout(function() {
self.load();
}, self.options.delay);
} else {
self.load();
}
});

// add onload listener
Expand Down Expand Up @@ -135,7 +142,6 @@ jQuery(function($) {
// load method
JQLoader.prototype.load = function() {
var self = this,
pubUrlPath = foswiki.getPreference("PUBURLPATH"),
$elem = $(self.element),
web = self.options.web || foswiki.getPreference("WEB"),
topic = self.options.topic || foswiki.getPreference("TOPIC"),
Expand Down Expand Up @@ -225,7 +231,7 @@ jQuery(function($) {
);
}
});
}
};

// register css class
$(".jqLoader:not(.jqLoaderInited)").livequery(function() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict';
"use strict";
jQuery(function($) {
var defaults = {
waitForImages: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3185,7 +3185,7 @@ return Outlayer;

}));

'use strict';
"use strict";
jQuery(function($) {
var defaults = {
waitForImages: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"use strict";
jQuery(function($) {
var pubUrlPath = foswiki.getPreference("PUBURLPATH")+'/'+foswiki.getPreference("SYSTEMWEB")+'/JQueryPlugin';

Expand All @@ -13,7 +14,7 @@ jQuery(function($) {
options = $.extend({
caption: '',
skin: 'stormtrooper'
}, $this.metadata());
}, $this.data(), $this.metadata());

if (options.autoplay) {
options.flashvars = $.extend({}, options.flashvars, {
Expand Down
Loading

0 comments on commit 2d1b98d

Please sign in to comment.