Skip to content

Commit

Permalink
Item14124: make skin of a jquery.loader backend configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDaum committed Jul 25, 2016
1 parent b62305d commit e01a4fb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 2 additions & 0 deletions JQueryPlugin/.gitignore
Expand Up @@ -18,6 +18,7 @@
/pub/System/JQueryPlugin/jquery-1.12.1.js
/pub/System/JQueryPlugin/jquery-1.12.2.js
/pub/System/JQueryPlugin/jquery-1.12.3.js
/pub/System/JQueryPlugin/jquery-1.12.4.js
/pub/System/JQueryPlugin/jquery-1.7.1.js
/pub/System/JQueryPlugin/jquery-1.7.2.js
/pub/System/JQueryPlugin/jquery-1.8.0.js
Expand All @@ -36,6 +37,7 @@
/pub/System/JQueryPlugin/jquery-2.2.1.js
/pub/System/JQueryPlugin/jquery-2.2.2.js
/pub/System/JQueryPlugin/jquery-2.2.3.js
/pub/System/JQueryPlugin/jquery-2.2.4.js
/pub/System/JQueryPlugin/plugins/fontawesome/icon-animate.css
/pub/System/JQueryPlugin/noconflict.js
/pub/System/JQueryPlugin/plugins/animate/animate.css
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 => '2.10',
version => '2.11',
author => 'Michael Daum',
homepage => 'http://foswiki.org/Extensions/JQueryPlugin',
tags => 'LOADER',
Expand Down
@@ -1,5 +1,5 @@
/*
* jQuery Loader plugin 2.10
* jQuery Loader plugin 2.11
*
* Copyright (c) 2011-2016 Foswiki Contributors http://foswiki.org
*
Expand All @@ -18,6 +18,7 @@ jQuery(function($) {
params: undefined,
topic: undefined,
section: undefined,
skin: 'text',
select: undefined,
minHeight: 0,
effect: 'fade', // show, fade, slide, blind, clip, drop, explode, fold, puff, pulsate, highlight
Expand Down Expand Up @@ -138,7 +139,7 @@ jQuery(function($) {
$elem = $(self.element),
web = self.options.web || foswiki.getPreference("WEB"),
topic = self.options.topic || foswiki.getPreference("TOPIC"),
params = $.extend({ "skin": "text"}, self.options.params);
params = $.extend({}, self.options.params);

// construct url
if (typeof(self.options.url) === 'undefined') {
Expand All @@ -149,6 +150,10 @@ jQuery(function($) {
params.section = self.options.section;
}

if (typeof(self.options.skin) !== 'undefined' && self.options.skin) {
params.skin = self.options.skin;
}

// trigger beforeload
$elem.trigger("beforeload.jqloader", self);

Expand Down

0 comments on commit e01a4fb

Please sign in to comment.