Vergleich jscripts/jquery.plugins.js - 1.8.4 - 1.8.10

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 1Zeile 1
/**

/**

 * jGrowl 1.4.0

 * jGrowl 1.4.3

 *
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* Written by Stan Lemon <stosh1985@gmail.com>

 *
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* Written by Stan Lemon <stosh1985@gmail.com>

 * Last updated: 2014.04.18

 * Last updated: 2015.02.01

 */
(function($) {
/** jGrowl Wrapper - Establish a base jGrowl Container for compatibility with older releases. **/
$.jGrowl = function( m , o ) {
// To maintain compatibility with older version that only supported one instance we'll create the base container.

 */
(function($) {
/** jGrowl Wrapper - Establish a base jGrowl Container for compatibility with older releases. **/
$.jGrowl = function( m , o ) {
// To maintain compatibility with older version that only supported one instance we'll create the base container.

		if ( $('#jGrowl').size() === 0 )
$('<div id="jGrowl"></div>').addClass( (o && o.position) ? o.position : $.jGrowl.defaults.position ).appendTo('body');

		if ( $('#jGrowl').length === 0 )
$('<div id="jGrowl"></div>').addClass( (o && o.position) ? o.position : $.jGrowl.defaults.position ).appendTo( (o && o.appendTo) ? o.appendTo : $.jGrowl.defaults.appendTo );


// Create a notification on the container.
$('#jGrowl').jGrowl(m,o);


// Create a notification on the container.
$('#jGrowl').jGrowl(m,o);

Zeile 56Zeile 56
			group:				'',
sticky: false,
position: 'top-right',

			group:				'',
sticky: false,
position: 'top-right',

 
			appendTo:			'body',

			glue:				'after',
theme: 'default',
themeState: 'highlight',

			glue:				'after',
theme: 'default',
themeState: 'highlight',

Zeile 148Zeile 149
						if ($.support.opacity === false)
this.style.removeAttribute('filter');


						if ($.support.opacity === false)
this.style.removeAttribute('filter');


						if ( $(this).data("jGrowl") !== null ) // Happens when a notification is closing before it's open.

						if ( $(this).data("jGrowl") !== null && typeof $(this).data("jGrowl") !== 'undefined') // Happens when a notification is closing before it's open.

							$(this).data("jGrowl").created = new Date();

$(this).trigger('jGrowl.afterOpen');

							$(this).data("jGrowl").created = new Date();

$(this).trigger('jGrowl.afterOpen');

Zeile 178Zeile 179
			if ( o.corners !== '' && $.fn.corner !== undefined ) $(notification).corner( o.corners );

/** Add a Global Closer if more than one notification exists **/

			if ( o.corners !== '' && $.fn.corner !== undefined ) $(notification).corner( o.corners );

/** Add a Global Closer if more than one notification exists **/

			if ($('.jGrowl-notification:parent', self.element).size() > 1 &&
$('.jGrowl-closer', self.element).size() === 0 && this.defaults.closer !== false ) {

			if ($('.jGrowl-notification:parent', self.element).length > 1 &&
$('.jGrowl-closer', self.element).length === 0 && this.defaults.closer !== false ) {

				$(this.defaults.closerTemplate).addClass('jGrowl-closer ' + this.defaults.themeState + ' ui-corner-all').addClass(this.defaults.theme)
.appendTo(self.element).animate(this.defaults.animateOpen, this.defaults.speed, this.defaults.easing)
.bind("click.jGrowl", function() {

				$(this.defaults.closerTemplate).addClass('jGrowl-closer ' + this.defaults.themeState + ' ui-corner-all').addClass(this.defaults.theme)
.appendTo(self.element).animate(this.defaults.animateOpen, this.defaults.speed, this.defaults.easing)
.bind("click.jGrowl", function() {

Zeile 206Zeile 207
			});

if (this.notifications.length > 0 &&

			});

if (this.notifications.length > 0 &&

				(this.defaults.pool === 0 || $(this.element).find('.jGrowl-notification:parent').size() < this.defaults.pool) )

				(this.defaults.pool === 0 || $(this.element).find('.jGrowl-notification:parent').length < this.defaults.pool) )

				this.render( this.notifications.shift() );


				this.render( this.notifications.shift() );


			if ($(this.element).find('.jGrowl-notification:parent').size() < 2 ) {

			if ($(this.element).find('.jGrowl-notification:parent').length < 2 ) {

				$(this.element).find('.jGrowl-closer').animate(this.defaults.animateClose, this.defaults.speed, this.defaults.easing, function() {
$(this).remove();
});

				$(this.element).find('.jGrowl-closer').animate(this.defaults.animateClose, this.defaults.speed, this.defaults.easing, function() {
$(this).remove();
});

Zeile 220Zeile 221
		startup: function(e) {
this.element = $(e).addClass('jGrowl').append('<div class="jGrowl-notification"></div>');
this.interval = setInterval( function() {

		startup: function(e) {
this.element = $(e).addClass('jGrowl').append('<div class="jGrowl-notification"></div>');
this.interval = setInterval( function() {

				$(e).data('jGrowl.instance').update();





				// some error in chage ^^
var instance = $(e).data('jGrowl.instance');
if (undefined !== instance) {
instance.update();
}

			}, parseInt(this.defaults.check, 10));
},


			}, parseInt(this.defaults.check, 10));
},


Zeile 248Zeile 253

/*
A simple jQuery modal (http://github.com/kylefox/jquery-modal)


/*
A simple jQuery modal (http://github.com/kylefox/jquery-modal)

    Version 0.5.5

    Version 0.5.8

*/
(function($) {


*/
(function($) {


Zeile 289Zeile 294
      }
} else {
this.$elm = el;

      }
} else {
this.$elm = el;

 
      this.$body.append(this.$elm);

      this.open();
}
};

      this.open();
}
};

Zeile 318Zeile 324
    close: function() {
this.unblock();
this.hide();

    close: function() {
this.unblock();
this.hide();

	  // Deletes the element (multi-modal feature: e.g. when you click on multiple report buttons, you will want to see different content for each)
if (!this.options.keepelement)
this.$elm.remove();

 
      $(document).off('keydown.modal');
},


      $(document).off('keydown.modal');
},


Zeile 445Zeile 448
    showSpinner: true,
showClose: true,
fadeDuration: null, // Number of milliseconds the fade animation takes.

    showSpinner: true,
showClose: true,
fadeDuration: null, // Number of milliseconds the fade animation takes.

    fadeDelay: 1.0,        // Point during the overlay's fade-in that the modal begins to fade in (.5 = 50%, 1.5 = 150%, etc.)
keepelement: false // Added by Pirata Nervo: this allows modal elements to be kept on closing when the HTML is present in the same template as the jQuery code (e.g. login modal)

    fadeDelay: 1.0        // Point during the overlay's fade-in that the modal begins to fade in (.5 = 50%, 1.5 = 150%, etc.)


  };

// Event constants

  };

// Event constants

Zeile 490Zeile 492
		if(typeof close_in_popupmenu == 'undefined')
{
var close_in_popupmenu = true;

		if(typeof close_in_popupmenu == 'undefined')
{
var close_in_popupmenu = true;

		}

		}

		// Opening Popup
this.open = function(e)
{

		// Opening Popup
this.open = function(e)
{

Zeile 552Zeile 554
	}
})(jQuery);


	}
})(jQuery);


/*! jQuery-Impromptu - v6.0.0 - 2014-12-27

/*! jQuery-Impromptu - v6.2.1 - 2015-05-10

* http://trentrichardson.com/Impromptu

* http://trentrichardson.com/Impromptu

* Copyright (c) 2014 Trent Richardson; Licensed MIT */

* Copyright (c) 2015 Trent Richardson; Licensed MIT */

(function(root, factory) {
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);

(function(root, factory) {
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);

Zeile 612Zeile 614
		buttons: {
Ok: true
},

		buttons: {
Ok: true
},

 
		buttonTimeout: 1000,

		loaded: function(e){},
submit: function(e,v,m,f){},
close: function(e,v,m,f){},

		loaded: function(e){},
submit: function(e,v,m,f){},
close: function(e,v,m,f){},

Zeile 637Zeile 640
		persistent: true,
timeout: 0,
states: {},

		persistent: true,
timeout: 0,
states: {},

 
		initialState: 0,

		state: {
name: null,
title: '',

		state: {
name: null,
title: '',

Zeile 743Zeile 747
			//build the box and fade
var msgbox = '<div class="'+ opts.prefix +'box '+ opts.classes.box +'">';
if(opts.useiframe && ($('object, applet').length > 0)) {

			//build the box and fade
var msgbox = '<div class="'+ opts.prefix +'box '+ opts.classes.box +'">';
if(opts.useiframe && ($('object, applet').length > 0)) {

				msgbox += '<iframe src="javascript:false;" style="display:block;position:absolute;z-index:-1;" class="'+ opts.prefix +'fade '+ opts.classes.fade +'"></iframe>';

				msgbox += '<iframe src="javascript:false;" class="'+ opts.prefix +'fade '+ opts.classes.fade +'"></iframe>';

			} else {
msgbox += '<div class="'+ opts.prefix +'fade '+ opts.classes.fade +'"></div>';
}
msgbox += '<div class="'+ opts.prefix +' '+ opts.classes.prompt +'">'+

			} else {
msgbox += '<div class="'+ opts.prefix +'fade '+ opts.classes.fade +'"></div>';
}
msgbox += '<div class="'+ opts.prefix +' '+ opts.classes.prompt +'">'+

						'<form action="javascript:false;" onsubmit="return false;" class="'+ opts.prefix +'form '+ opts.classes.form +'">'+

						'<form action="#" class="'+ opts.prefix +'form '+ opts.classes.form +'">'+

							'<div class="'+ opts.prefix +'close '+ opts.classes.close +'">'+ opts.closeText +'</div>'+
'<div class="'+ opts.prefix +'states"></div>'+
'</form>'+

							'<div class="'+ opts.prefix +'close '+ opts.classes.close +'">'+ opts.closeText +'</div>'+
'<div class="'+ opts.prefix +'states"></div>'+
'</form>'+

Zeile 790Zeile 794
			t.jqi.on('click', '.'+ opts.prefix +'buttons button', function(e){
var $t = $(this),
$state = $t.parents('.'+ opts.prefix +'state'),

			t.jqi.on('click', '.'+ opts.prefix +'buttons button', function(e){
var $t = $(this),
$state = $t.parents('.'+ opts.prefix +'state'),

					stateobj = t.options.states[$state.data('jqi-name')],


					statename = $state.data('jqi-name'),
stateobj = t.options.states[statename],

					msg = $state.children('.'+ opts.prefix +'message'),
clicked = stateobj.buttons[$t.text()] || stateobj.buttons[$t.html()],
forminputs = {};

					msg = $state.children('.'+ opts.prefix +'message'),
clicked = stateobj.buttons[$t.text()] || stateobj.buttons[$t.html()],
forminputs = {};

 

// disable for a moment to prevent multiple clicks
if(t.options.buttonTimeout > 0){
t.disableStateButtons(statename);
setTimeout(function(){
t.enableStateButtons(statename);
}, t.options.buttonTimeout);
}


// if for some reason we couldn't get the value
if(clicked === undefined){


// if for some reason we couldn't get the value
if(clicked === undefined){

Zeile 863Zeile 876
				if(key === 13){
var $defBtn = t.getCurrentState().find('.'+ opts.prefix +'defaultbutton');
var $tgt = $(e.target);

				if(key === 13){
var $defBtn = t.getCurrentState().find('.'+ opts.prefix +'defaultbutton');
var $tgt = $(e.target);





					if($tgt.is('textarea,.'+opts.prefix+'button') === false && $defBtn.length > 0){
e.preventDefault();
$defBtn.click();

					if($tgt.is('textarea,.'+opts.prefix+'button') === false && $defBtn.length > 0){
e.preventDefault();
$defBtn.click();

Zeile 887Zeile 900
							}
},10);
return false;

							}
},10);
return false;

					}
}
};


					}
}
};


			t.position();
t.style();

			t.position();
t.style();





			// store copy of the window resize function for interal use only
t._windowResize = function(e){
t.position(e);

			// store copy of the window resize function for interal use only
t._windowResize = function(e){
t.position(e);

Zeile 902Zeile 915

t.jqif.click(fadeClicked);
t.jqi.find('.'+ opts.prefix +'close').click(function(){ t.close(); });


t.jqif.click(fadeClicked);
t.jqi.find('.'+ opts.prefix +'close').click(function(){ t.close(); });

 
			t.jqi.find('.'+ opts.prefix +'form').submit(function(){ return false; });

			t.jqib.on("keydown",keyDownEventHandler)
.on('impromptu:loaded', opts.loaded)
.on('impromptu:close', opts.close)
.on('impromptu:statechanging', opts.statechanging)
.on('impromptu:statechanged', opts.statechanged);

			t.jqib.on("keydown",keyDownEventHandler)
.on('impromptu:loaded', opts.loaded)
.on('impromptu:close', opts.close)
.on('impromptu:statechanging', opts.statechanging)
.on('impromptu:statechanged', opts.statechanged);





			// Show it
t.jqif[opts.show](opts.overlayspeed);
t.jqi[opts.show](opts.promptspeed, function(){

			// Show it
t.jqif[opts.show](opts.overlayspeed);
t.jqi[opts.show](opts.promptspeed, function(){


var $firstState = t.jqi.find('.'+ opts.prefix +'states .'+ opts.prefix +'state').eq(0);
t.goToState($firstState.data('jqi-name'));





t.goToState(
isNaN(opts.initialState) ? opts.initialState :
t.jqi.find('.'+ opts.prefix +'states .'+ opts.prefix +'state').eq(opts.initialState).data('jqi-name')
);


				t.jqib.trigger('impromptu:loaded');
});

				t.jqib.trigger('impromptu:loaded');
});





			// Timeout
if(opts.timeout > 0){
t.timeout = setTimeout(function(){ t.close(true); },opts.timeout);

			// Timeout
if(opts.timeout > 0){
t.timeout = setTimeout(function(){ t.close(true); },opts.timeout);

			}

return t;
},


			}

return t;
},


		/**
* close - Closes the prompt
* @param callback Function - called when the transition is complete

		/**
* close - Closes the prompt
* @param callback Function - called when the transition is complete

Zeile 941Zeile 957
			if(t.timeout){
clearTimeout(t.timeout);
t.timeout = false;

			if(t.timeout){
clearTimeout(t.timeout);
t.timeout = false;

			}


			}


			if(t.jqib){
t.jqib[t.options.hide]('fast',function(){


			if(t.jqib){
t.jqib[t.options.hide]('fast',function(){


Zeile 958Zeile 974
				});
}
t.currentStateName = "";

				});
}
t.currentStateName = "";





			return t;
},


			return t;
},


Zeile 976Zeile 992
				arrow = '',
title = '',
opts = t.options,

				arrow = '',
title = '',
opts = t.options,

				$jqistates = $('.'+ opts.prefix +'states'),

				$jqistates = t.jqi.find('.'+ opts.prefix +'states'),

				buttons = [],
showHtml,defbtn,k,v,l,i=0;


				buttons = [],
showHtml,defbtn,k,v,l,i=0;


Zeile 992Zeile 1008
			showHtml = stateobj.html;
if (typeof stateobj.html === 'function') {
showHtml = 'Error: html function must return text';

			showHtml = stateobj.html;
if (typeof stateobj.html === 'function') {
showHtml = 'Error: html function must return text';

			}

			}





			state += '<div class="'+ opts.prefix + 'state" data-jqi-name="'+ statename +'" style="display:none;">'+

			state += '<div class="'+ opts.prefix + 'state" data-jqi-name="'+ statename +'">'+

						arrow + title +
'<div class="'+ opts.prefix +'message '+ opts.classes.message +'">' + showHtml +'</div>'+

						arrow + title +
'<div class="'+ opts.prefix +'message '+ opts.classes.message +'">' + showHtml +'</div>'+

						'<div class="'+ opts.prefix +'buttons '+ opts.classes.buttons +'"'+ ($.isEmptyObject(stateobj.buttons)? 'style="display:none;"':'') +'>';

						'<div class="'+ opts.prefix +'buttons'+ ($.isEmptyObject(stateobj.buttons)? 'hide ':' ') + opts.classes.buttons +'">';


// state buttons may be in object or array, lets convert objects to arrays
if($.isArray(stateobj.buttons)){


// state buttons may be in object or array, lets convert objects to arrays
if($.isArray(stateobj.buttons)){

Zeile 1027Zeile 1043
			
state += '</div></div>';


			
state += '</div></div>';


			$state = $(state);

$state.on('impromptu:submit', stateobj.submit);


			$state = $(state).css({display:'none'});

$state.on('impromptu:submit', stateobj.submit);


			if(afterState !== undefined){

			if(afterState !== undefined){

				$jqistates.find('[data-jqi-name="'+afterState+'"]').after($state);
}

				t.getState(afterState).after($state);
}

			else{
$jqistates.append($state);
}

			else{
$jqistates.append($state);
}

Zeile 1041Zeile 1057
			t.options.states[statename] = stateobj;

return $state;

			t.options.states[statename] = stateobj;

return $state;

		},


		},


		/**
* removeState - Removes a state from the prompt
* @param state String - Name of the state

		/**
* removeState - Removes a state from the prompt
* @param state String - Name of the state

Zeile 1078Zeile 1094
			}

return true;

			}

return true;

		},

/**

		},

/**

		* getApi - Get the api, so you can extract it from $.prompt stack
* @return jQuery - the prompt
*/

		* getApi - Get the api, so you can extract it from $.prompt stack
* @return jQuery - the prompt
*/

Zeile 1090Zeile 1106

/**
* getBox - Get the box containing fade and prompt


/**
* getBox - Get the box containing fade and prompt

		* @return jQuery - the prompt

		* @return jQuery - the prompt

		*/
getBox: function() {
return this.jqib;

		*/
getBox: function() {
return this.jqib;

Zeile 1102Zeile 1118
		*/
getPrompt: function() {
return this.jqi;

		*/
getPrompt: function() {
return this.jqi;

		},

		},


/**
* getState - Get the state by its name


/**
* getState - Get the state by its name

Zeile 1127Zeile 1143
		*/
getCurrentStateName: function() {
return this.currentStateName;

		*/
getCurrentStateName: function() {
return this.currentStateName;

 
		},

/**
* disableStateButtons - Disables the buttons in a state
* @param statename String - Name of the state containing buttons
* @param buttons Array - Array of button values to disable. By default all are disabled
* @param enable Boolean - True to enable the buttons instead of disabling (internally use only)
* @return Void
*/
disableStateButtons: function(statename, buttons, enable) {
var t = this;

if($.isArray(statename)){
buttons = statename;
statename = null;
}

t.getState(statename || t.getCurrentStateName()).find('.'+ t.options.prefix + 'button').each(function(i,btn){
if(buttons === undefined || $.inArray(btn.value, buttons) !== -1){
btn.disabled = !enable;
}
});
},

/**
* enableStateButtons - Enables the buttons in a state
* @param statename String - Name of the state containing buttons. Defaults to current state
* @param buttons Array - Array of button values to enable. By default all are enabled
* @return Void
*/
enableStateButtons: function(statename, buttons) {
this.disableStateButtons(statename, buttons, true);

		},

/**

		},

/**

Zeile 1143Zeile 1191
				bodyHeight = document.body.scrollHeight, //$(document.body).outerHeight(true),
windowHeight = $(window).height(),
documentHeight = $(document).height(),

				bodyHeight = document.body.scrollHeight, //$(document.body).outerHeight(true),
windowHeight = $(window).height(),
documentHeight = $(document).height(),

				height = bodyHeight > windowHeight ? bodyHeight : windowHeight,
top = parseInt($window.scrollTop(),10) + (t.options.top.toString().indexOf('%') >= 0?


				height = (bodyHeight > windowHeight) ? bodyHeight : windowHeight,
scrollTop = parseInt($window.scrollTop(),10),
top = scrollTop + (t.options.top.toString().indexOf('%') >= 0?

						(windowHeight*(parseInt(t.options.top,10)/100)) : parseInt(t.options.top,10));

// when resizing the window turn off animation

						(windowHeight*(parseInt(t.options.top,10)/100)) : parseInt(t.options.top,10));

// when resizing the window turn off animation

Zeile 1173Zeile 1222

// tour positioning
if(pos && pos.container){


// tour positioning
if(pos && pos.container){

				var offset = $(pos.container).offset();



				var offset = $(pos.container).offset(),
hasScrolled = false;


				if($.isPlainObject(offset) && offset.top !== undefined){

				if($.isPlainObject(offset) && offset.top !== undefined){

 
					top = (offset.top + pos.y) - (t.options.top.toString().indexOf('%') >= 0? (windowHeight*(parseInt(t.options.top,10)/100)) : parseInt(t.options.top,10));


					t.jqi.css({
position: "absolute"

					t.jqi.css({
position: "absolute"

					});

					});

					t.jqi.animate({
top: offset.top + pos.y,
left: offset.left + pos.x,
marginLeft: 0,
width: (pos.width !== undefined)? pos.width : null

					t.jqi.animate({
top: offset.top + pos.y,
left: offset.left + pos.x,
marginLeft: 0,
width: (pos.width !== undefined)? pos.width : null

 
					}, function(){
// if it didn't scroll before, check that the bottom is within view. Since width
// is animated we must use the callback before we know the height
if(!hasScrolled && (offset.top + pos.y + t.jqi.outerHeight(true)) > (scrollTop + windowHeight)){
$('html,body').animate({ scrollTop: top }, 'slow', 'swing', function(){});
hasScrolled = true;
}

					});

					});

					top = (offset.top + pos.y) - (t.options.top.toString().indexOf('%') >= 0? (windowHeight*(parseInt(t.options.top,10)/100)) : parseInt(t.options.top,10));
$('html,body').animate({ scrollTop: top }, 'slow', 'swing', function(){});






// scroll if the top is out of the viewing area
if(top < scrollTop || top > scrollTop + windowHeight){
$('html,body').animate({ scrollTop: top }, 'slow', 'swing', function(){});
hasScrolled = true;
}

				}
}
// custom state width animation

				}
}
// custom state width animation

Zeile 1296Zeile 1359

$state.slideDown(jqiopts.promptspeed,function(){
var $t = $(this);


$state.slideDown(jqiopts.promptspeed,function(){
var $t = $(this);




						t.enableStateButtons();


						// if focus is a selector, find it, else its button index
if(typeof(stateobj.focus) === 'string'){
$t.find(stateobj.focus).eq(0).focus();

						// if focus is a selector, find it, else its button index
if(typeof(stateobj.focus) === 'string'){
$t.find(stateobj.focus).eq(0).focus();