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

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

/**

 * jGrowl 1.4.0

 * jGrowl 1.4.5

 *
* 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 157Zeile 158
			}).bind('jGrowl.afterOpen', function() {
o.afterOpen.apply( notification , [notification,message,o,self.element] );
}).bind('click', function() {

			}).bind('jGrowl.afterOpen', function() {
o.afterOpen.apply( notification , [notification,message,o,self.element] );
}).bind('click', function() {

				o.click.apply( notification, [notification.message,o,self.element] );

				o.click.apply( notification, [notification,message,o,self.element] );

			}).bind('jGrowl.beforeClose', function() {
if ( o.beforeClose.apply( notification , [notification,message,o,self.element] ) !== false )
$(this).trigger('jGrowl.close');

			}).bind('jGrowl.beforeClose', function() {
if ( o.beforeClose.apply( notification , [notification,message,o,self.element] ) !== false )
$(this).trigger('jGrowl.close');

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.8.0

*/

*/

(function($) {

 




  var current = null;

























(function (factory) {
// Making your jQuery plugin work better with npm tools
// http://blog.npmjs.org/post/112712169830/making-your-jquery-plugin-work-better-with-npm
if(typeof module === "object" && typeof module.exports === "object") {
factory(require("jquery"), window, document);
}
else {
factory(jQuery, window, document);
}
}(function($, window, document, undefined) {

var modals = [],
getCurrent = function() {
return modals.length ? modals[modals.length - 1] : null;
},
selectCurrent = function() {
var i,
selected = false;
for (i=modals.length-1; i>=0; i--) {
if (modals[i].$blocker) {
modals[i].$blocker.toggleClass('current',!selected).toggleClass('behind',selected);
selected = true;
}
}
};


$.modal = function(el, options) {


$.modal = function(el, options) {

    $.modal.close(); // Close any open modals.

 
    var remove, target;
this.$body = $('body');
this.options = $.extend({}, $.modal.defaults, options);
this.options.doFade = !isNaN(parseInt(this.options.fadeDuration, 10));

    var remove, target;
this.$body = $('body');
this.options = $.extend({}, $.modal.defaults, options);
this.options.doFade = !isNaN(parseInt(this.options.fadeDuration, 10));

 
    this.$blocker = null;
if (this.options.closeExisting)
while ($.modal.isActive())
$.modal.close(); // Close any open modals.
modals.push(this);

    if (el.is('a')) {
target = el.attr('href');
//Select element by id from href
if (/^#/.test(target)) {
this.$elm = $(target);
if (this.$elm.length !== 1) return null;

    if (el.is('a')) {
target = el.attr('href');
//Select element by id from href
if (/^#/.test(target)) {
this.$elm = $(target);
if (this.$elm.length !== 1) return null;

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

        this.open();
//AJAX
} else {

        this.open();
//AJAX
} else {

Zeile 275Zeile 308
        this.showSpinner();
el.trigger($.modal.AJAX_SEND);
$.get(target).done(function(html) {

        this.showSpinner();
el.trigger($.modal.AJAX_SEND);
$.get(target).done(function(html) {

          if (!current) return;

          if (!$.modal.isActive()) return;

          el.trigger($.modal.AJAX_SUCCESS);

          el.trigger($.modal.AJAX_SUCCESS);

 
          var current = getCurrent();

          current.$elm.empty().append(html).on($.modal.CLOSE, remove);
current.hideSpinner();
current.open();
el.trigger($.modal.AJAX_COMPLETE);
}).fail(function() {
el.trigger($.modal.AJAX_FAIL);

          current.$elm.empty().append(html).on($.modal.CLOSE, remove);
current.hideSpinner();
current.open();
el.trigger($.modal.AJAX_COMPLETE);
}).fail(function() {
el.trigger($.modal.AJAX_FAIL);

 
          var current = getCurrent();

          current.hideSpinner();

          current.hideSpinner();

 
          modals.pop(); // remove expected modal from the list

          el.trigger($.modal.AJAX_COMPLETE);
});
}
} else {
this.$elm = el;

          el.trigger($.modal.AJAX_COMPLETE);
});
}
} else {
this.$elm = el;

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

      this.open();

      this.open();

    }

    }

  };

$.modal.prototype = {
constructor: $.modal,

  };

$.modal.prototype = {
constructor: $.modal,





    open: function() {
var m = this;

    open: function() {
var m = this;

 
      this.block();

      if(this.options.doFade) {

      if(this.options.doFade) {

        this.block();

 
        setTimeout(function() {
m.show();
}, this.options.fadeDuration * this.options.fadeDelay);
} else {

        setTimeout(function() {
m.show();
}, this.options.fadeDuration * this.options.fadeDelay);
} else {

        this.block();

 
        this.show();

        this.show();

      }
if (this.options.escapeClose) {
$(document).on('keydown.modal', function(event) {
if (event.which == 27) $.modal.close();
});
}
if (this.options.clickClose) this.blocker.click($.modal.close);
},





      }
$(document).off('keydown.modal').on('keydown.modal', function(event) {
var current = getCurrent();
if (event.which == 27 && current.options.escapeClose) current.close();
});
if (this.options.clickClose)
this.$blocker.click(function(e) {
if (e.target==this)
$.modal.close();
});
},


    close: function() {

    close: function() {

 
      modals.pop();

      this.unblock();
this.hide();

      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');
},


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




    block: function() {

    block: function() {

      var initialOpacity = this.options.doFade ? 0 : this.options.opacity;

 
      this.$elm.trigger($.modal.BEFORE_BLOCK, [this._ctx()]);

      this.$elm.trigger($.modal.BEFORE_BLOCK, [this._ctx()]);

      this.blocker = $('<div class="jquery-modal blocker"></div>').css({
top: 0, right: 0, bottom: 0, left: 0,
width: "100%", height: "100%",
position: "fixed",
zIndex: this.options.zIndex,
background: this.options.overlay,
opacity: initialOpacity
});
this.$body.append(this.blocker);
if(this.options.doFade) {
this.blocker.animate({opacity: this.options.opacity}, this.options.fadeDuration);

      this.$body.css('overflow','hidden');
this.$blocker = $('<div class="jquery-modal blocker current"></div>').appendTo(this.$body);
selectCurrent();
if(this.options.doFade) {
this.$blocker.css('opacity',0).animate({opacity: 1}, this.options.fadeDuration);







      }
this.$elm.trigger($.modal.BLOCK, [this._ctx()]);
},


      }
this.$elm.trigger($.modal.BLOCK, [this._ctx()]);
},


    unblock: function() {
if(this.options.doFade) {
this.blocker.fadeOut(this.options.fadeDuration, function() {
$(this).remove();
});
} else {
this.blocker.remove();




    unblock: function(now) {
if (!now && this.options.doFade)
this.$blocker.fadeOut(this.options.fadeDuration, this.unblock.bind(this,true));
else {
this.$blocker.children().appendTo(this.$body);
this.$blocker.remove();
this.$blocker = null;
selectCurrent();
if (!$.modal.isActive())
this.$body.css('overflow','');

      }
},


      }
},


Zeile 358Zeile 392
        this.closeButton = $('<a href="#close-modal" rel="modal:close" class="close-modal ' + this.options.closeClass + '">' + this.options.closeText + '</a>');
this.$elm.append(this.closeButton);
}

        this.closeButton = $('<a href="#close-modal" rel="modal:close" class="close-modal ' + this.options.closeClass + '">' + this.options.closeText + '</a>');
this.$elm.append(this.closeButton);
}

      this.$elm.addClass(this.options.modalClass + ' current');
this.center();

      this.$elm.addClass(this.options.modalClass).appendTo(this.$blocker);


      if(this.options.doFade) {

      if(this.options.doFade) {

        this.$elm.fadeIn(this.options.fadeDuration);

        this.$elm.css('opacity',0).show().animate({opacity: 1}, this.options.fadeDuration);

      } else {
this.$elm.show();
}

      } else {
this.$elm.show();
}

Zeile 371Zeile 404
    hide: function() {
this.$elm.trigger($.modal.BEFORE_CLOSE, [this._ctx()]);
if (this.closeButton) this.closeButton.remove();

    hide: function() {
this.$elm.trigger($.modal.BEFORE_CLOSE, [this._ctx()]);
if (this.closeButton) this.closeButton.remove();

      this.$elm.removeClass('current');


      var _this = this;


      if(this.options.doFade) {

      if(this.options.doFade) {

        this.$elm.fadeOut(this.options.fadeDuration);



        this.$elm.fadeOut(this.options.fadeDuration, function () {
_this.$elm.trigger($.modal.AFTER_CLOSE, [_this._ctx()]);
});

      } else {

      } else {

        this.$elm.hide();



        this.$elm.hide(0, function () {
_this.$elm.trigger($.modal.AFTER_CLOSE, [_this._ctx()]);
});

      }
this.$elm.trigger($.modal.CLOSE, [this._ctx()]);
},

      }
this.$elm.trigger($.modal.CLOSE, [this._ctx()]);
},

Zeile 391Zeile 427

hideSpinner: function() {
if (this.spinner) this.spinner.remove();


hideSpinner: function() {
if (this.spinner) this.spinner.remove();

    },

center: function() {
this.$elm.css({
position: 'fixed',
top: "50%",
left: "50%",
marginTop: - (this.$elm.outerHeight() / 2),
marginLeft: - (this.$elm.outerWidth() / 2),
zIndex: this.options.zIndex + 1
});

 
    },

//Return context for custom events
_ctx: function() {

    },

//Return context for custom events
_ctx: function() {

      return { elm: this.$elm, blocker: this.blocker, options: this.options };
}
};

//resize is alias for center for now
$.modal.prototype.resize = $.modal.prototype.center;


      return { elm: this.$elm, $blocker: this.$blocker, options: this.options };
}
};





  $.modal.close = function(event) {

  $.modal.close = function(event) {

    if (!current) return;

    if (!$.modal.isActive()) return;

    if (event) event.preventDefault();

    if (event) event.preventDefault();

 
    var current = getCurrent();

    current.close();

    current.close();

    var that = current.$elm;
current = null;
return that;
};

$.modal.resize = function() {
if (!current) return;
current.resize();
};


    return current.$elm;
};









  // Returns if there currently is an active modal
$.modal.isActive = function () {

  // Returns if there currently is an active modal
$.modal.isActive = function () {

    return current ? true : false;

    return modals.length > 0;

  }

  }

 

$.modal.getCurrent = getCurrent;


$.modal.defaults = {


$.modal.defaults = {

    overlay: "#000",
opacity: 0.75,
zIndex: 1,

    closeExisting: true,



    escapeClose: true,
clickClose: true,
closeText: 'Close',

    escapeClose: true,
clickClose: true,
closeText: 'Close',

Zeile 445Zeile 461
    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 456Zeile 471
  $.modal.OPEN = 'modal:open';
$.modal.BEFORE_CLOSE = 'modal:before-close';
$.modal.CLOSE = 'modal:close';

  $.modal.OPEN = 'modal:open';
$.modal.BEFORE_CLOSE = 'modal:before-close';
$.modal.CLOSE = 'modal:close';

 
  $.modal.AFTER_CLOSE = 'modal:after-close';

  $.modal.AJAX_SEND = 'modal:ajax:send';
$.modal.AJAX_SUCCESS = 'modal:ajax:success';
$.modal.AJAX_FAIL = 'modal:ajax:fail';

  $.modal.AJAX_SEND = 'modal:ajax:send';
$.modal.AJAX_SUCCESS = 'modal:ajax:success';
$.modal.AJAX_FAIL = 'modal:ajax:fail';

Zeile 463Zeile 479

$.fn.modal = function(options){
if (this.length === 1) {


$.fn.modal = function(options){
if (this.length === 1) {

      current = new $.modal(this, options);

      new $.modal(this, options);

    }
return this;
};

    }
return this;
};

Zeile 474Zeile 490
    event.preventDefault();
$(this).modal();
});

    event.preventDefault();
$(this).modal();
});

})(jQuery);


}));



/*
Conversion of 1.6.x popup_menu.js


/*
Conversion of 1.6.x popup_menu.js

Zeile 552Zeile 567
	}
})(jQuery);


	}
})(jQuery);


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

/*! jQuery-Impromptu - v6.2.3 - 2016-04-23

* http://trentrichardson.com/Impromptu

* http://trentrichardson.com/Impromptu

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

* Copyright (c) 2016 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 627
		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 653
		persistent: true,
timeout: 0,
states: {},

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

 
		initialState: 0,

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

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

Zeile 718Zeile 735
		* @var Int - A unique id, simply an autoincremented number
*/
id: null,

		* @var Int - A unique id, simply an autoincremented number
*/
id: null,





		/**
* open - Opens the prompt
* @param message String/Object - String of html or Object of states

		/**
* open - Opens the prompt
* @param message String/Object - String of html or Object of states

Zeile 727Zeile 744
		*/
open: function(message, options) {
var t = this;

		*/
open: function(message, options) {
var t = this;





			t.options = $.extend({},Imp.defaults,options);

// Be sure any previous timeouts are destroyed

			t.options = $.extend({},Imp.defaults,options);

// Be sure any previous timeouts are destroyed

Zeile 743Zeile 760
			//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>';

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

			}

			}

			msgbox += '<div class="'+ opts.prefix +' '+ opts.classes.prompt +'">'+

			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 783Zeile 800

if(t.currentStateName === ''){
t.currentStateName = v.name;


if(t.currentStateName === ''){
t.currentStateName = v.name;

				}

				}

			}

			}





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

			//Events
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 902Zeile 928

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)

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

Zeile 912Zeile 939
			t.jqif[opts.show](opts.overlayspeed);
t.jqi[opts.show](opts.promptspeed, function(){


			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');
});

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

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

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


				pos = $.isFunction(stateobj.position) ? stateobj.position() : stateobj.position,
$jqistates = t.jqi.find('.'+ opts.prefix +'states'),

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

stateobj = $.extend({},Imp.defaults.state, {name:statename}, stateobj);


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

stateobj = $.extend({},Imp.defaults.state, {name:statename}, stateobj);


			if(stateobj.position.arrow !== null){
arrow = '<div class="'+ opts.prefix + 'arrow '+ opts.prefix + 'arrow'+ stateobj.position.arrow +'"></div>';

			if($.isPlainObject(pos) && pos.arrow !== null){
arrow = '<div class="'+ opts.prefix + 'arrow '+ opts.prefix + 'arrow'+ pos.arrow +'"></div>';

			}
if(stateobj.title && stateobj.title !== ''){
title = '<div class="lead '+ opts.prefix + 'title '+ opts.classes.title +'">'+ stateobj.title +'</div>';

			}
if(stateobj.title && stateobj.title !== ''){
title = '<div class="lead '+ opts.prefix + 'title '+ opts.classes.title +'">'+ stateobj.title +'</div>';

Zeile 994Zeile 1024
				showHtml = 'Error: html function must return text';
}


				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 1057
			
state += '</div></div>';


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


			$state = $(state);

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


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

if(afterState !== undefined){


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

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 1127Zeile 1157
		*/
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 1138Zeile 1200
				restoreFx = $.fx.off,
$state = t.getCurrentState(),
stateObj = t.options.states[$state.data('jqi-name')],

				restoreFx = $.fx.off,
$state = t.getCurrentState(),
stateObj = t.options.states[$state.data('jqi-name')],

				pos = stateObj? stateObj.position : undefined,

				pos = stateObj ? $.isFunction(stateObj.position) ? stateObj.position() : stateObj.position : undefined,

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

				$window = $(window),
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));

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





			// when resizing the window turn off animation
if(e !== undefined && e.data.animate === false){
$.fx.off = true;

			// when resizing the window turn off animation
if(e !== undefined && e.data.animate === false){
$.fx.off = true;

Zeile 1154Zeile 1217

t.jqib.css({
position: "absolute",


t.jqib.css({
position: "absolute",

				height: height,
width: "100%",
top: 0,

				height: height,
width: "100%",
top: 0,

				left: 0,
right: 0,
bottom: 0

				left: 0,
right: 0,
bottom: 0

Zeile 1169Zeile 1232
				left: 0,
right: 0,
bottom: 0

				left: 0,
right: 0,
bottom: 0

			});

			});


// 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"
});

Zeile 1184Zeile 1250
						left: offset.left + pos.x,
marginLeft: 0,
width: (pos.width !== undefined)? pos.width : null

						left: offset.left + pos.x,
marginLeft: 0,
width: (pos.width !== undefined)? pos.width : null

					});
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(){});
}












					}, 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;
}
});

// 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
else if(pos && pos.width){

			}
// custom state width animation
else if(pos && pos.width){

Zeile 1216Zeile 1293
			if(e !== undefined && e.data.animate === false){
$.fx.off = restoreFx;
}

			if(e !== undefined && e.data.animate === false){
$.fx.off = restoreFx;
}

		},

/**

		},

/**

		* style - Restyles the prompt (Used internally)
* @return void
*/

		* style - Restyles the prompt (Used internally)
* @return void
*/

Zeile 1296Zeile 1373

$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();

Zeile 1417Zeile 1495
}));

/*!

}));

/*!

 * jQuery Cookie Plugin v1.4.1
* https://github.com/carhartl/jquery-cookie

 * JavaScript Cookie v2.1.4
* https://github.com/js-cookie/js-cookie

 *

 *

 * Copyright 2013 Klaus Hartl

 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack

 * Released under the MIT license
*/

 * Released under the MIT license
*/

(function (factory) {


;(function (factory) {
var registeredInModuleLoader = false;

	if (typeof define === 'function' && define.amd) {

	if (typeof define === 'function' && define.amd) {

		// AMD
define(['jquery'], factory);
} else if (typeof exports === 'object') {
// CommonJS
factory(require('jquery'));
} else {
// Browser globals
factory(jQuery);
}
}(function ($) {

var pluses = /\+/g;

function encode(s) {
return config.raw ? s : encodeURIComponent(s);
}

function decode(s) {
return config.raw ? s : decodeURIComponent(s);
}

function stringifyCookieValue(value) {
return encode(config.json ? JSON.stringify(value) : String(value));
}

function parseCookieValue(s) {
if (s.indexOf('"') === 0) {
// This is a quoted cookie as according to RFC2068, unescape...
s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
}

try {
// Replace server-side written pluses with spaces.
// If we can't decode the cookie, ignore it, it's unusable.
// If we can't parse the cookie, ignore it, it's unusable.
s = decodeURIComponent(s.replace(pluses, ' '));
return config.json ? JSON.parse(s) : s;
} catch(e) {}
}

function read(s, converter) {
var value = config.raw ? s : parseCookieValue(s);
return $.isFunction(converter) ? converter(value) : value;

		define(factory);
registeredInModuleLoader = true;










































	}

	}


var config = $.cookie = function (key, value, options) {

// Write

if (value !== undefined && !$.isFunction(value)) {
options = $.extend({}, config.defaults, options);

if (typeof options.expires === 'number') {
var days = options.expires, t = options.expires = new Date();
t.setTime(+t + days * 864e+5);
}

return (document.cookie = [
encode(key), '=', stringifyCookieValue(value),
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
options.path ? '; path=' + options.path : '',
options.domain ? '; domain=' + options.domain : '',
options.secure ? '; secure' : ''
].join(''));
}

// Read

var result = key ? undefined : {};

// To prevent the for loop in the first place assign an empty array
// in case there are no cookies at all. Also prevents odd result when
// calling $.cookie().
var cookies = document.cookie ? document.cookie.split('; ') : [];

for (var i = 0, l = cookies.length; i < l; i++) {
var parts = cookies[i].split('=');
var name = decode(parts.shift());
var cookie = parts.join('=');

if (key && key === name) {
// If second argument (value) is a function it's a converter...
result = read(cookie, value);
break;
}

// Prevent storing a cookie that we couldn't decode.
if (!key && (cookie = read(cookie)) !== undefined) {
result[name] = cookie;















































































	if (typeof exports === 'object') {
module.exports = factory();
registeredInModuleLoader = true;
}
if (!registeredInModuleLoader) {
var OldCookies = window.Cookies;
var api = window.Cookies = factory();
api.noConflict = function () {
window.Cookies = OldCookies;
return api;
};
}
}(function () {
function extend () {
var i = 0;
var result = {};
for (; i < arguments.length; i++) {
var attributes = arguments[ i ];
for (var key in attributes) {
result[key] = attributes[key];
}
}
return result;
}

function init (converter) {
function api (key, value, attributes) {
var result;
if (typeof document === 'undefined') {
return;
}

// Write

if (arguments.length > 1) {
attributes = extend({
path: '/'
}, api.defaults, attributes);

if (typeof attributes.expires === 'number') {
var expires = new Date();
expires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5);
attributes.expires = expires;
}

// We're using "expires" because "max-age" is not supported by IE
attributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';

try {
result = JSON.stringify(value);
if (/^[\{\[]/.test(result)) {
value = result;
}
} catch (e) {}

if (!converter.write) {
value = encodeURIComponent(String(value))
.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);
} else {
value = converter.write(value, key);
}

key = encodeURIComponent(String(key));
key = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent);
key = key.replace(/[\(\)]/g, escape);

var stringifiedAttributes = '';

for (var attributeName in attributes) {
if (!attributes[attributeName]) {
continue;
}
stringifiedAttributes += '; ' + attributeName;
if (attributes[attributeName] === true) {
continue;
}
stringifiedAttributes += '=' + attributes[attributeName];
}
return (document.cookie = key + '=' + value + stringifiedAttributes);
}

// Read

if (!key) {
result = {};
}

// To prevent the for loop in the first place assign an empty array
// in case there are no cookies at all. Also prevents odd result when
// calling "get()"
var cookies = document.cookie ? document.cookie.split('; ') : [];
var rdecode = /(%[0-9A-Z]{2})+/g;
var i = 0;

for (; i < cookies.length; i++) {
var parts = cookies[i].split('=');
var cookie = parts.slice(1).join('=');

if (cookie.charAt(0) === '"') {
cookie = cookie.slice(1, -1);
}

try {
var name = parts[0].replace(rdecode, decodeURIComponent);
cookie = converter.read ?
converter.read(cookie, name) : converter(cookie, name) ||
cookie.replace(rdecode, decodeURIComponent);

if (this.json) {
try {
cookie = JSON.parse(cookie);
} catch (e) {}
}

if (key === name) {
result = cookie;
break;
}

if (!key) {
result[name] = cookie;
}
} catch (e) {}

			}

			}

 

return result;

		}


		}


		return result;
};

















		api.set = api;
api.get = function (key) {
return api.call(api, key);
};
api.getJSON = function () {
return api.apply({
json: true
}, [].slice.call(arguments));
};
api.defaults = {};

api.remove = function (key, attributes) {
api(key, '', extend(attributes, {
expires: -1
}));
};

api.withConverter = init;





	config.defaults = {};

$.removeCookie = function (key, options) {
if ($.cookie(key) === undefined) {
return false;
}

// Must not alter options, thus extending a fresh object...
$.cookie(key, '', $.extend({}, options, { expires: -1 }));
return !$.cookie(key);
};

		return api;
}














 
	return init(function () {});

}));

}));