summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrent Richardson <trentdrichardson@gmail.com>2015-11-14 10:18:39 -0500
committerTrent Richardson <trentdrichardson@gmail.com>2015-11-14 10:18:39 -0500
commitef9596d302c2fa3fd7f789cdb192b12127934ee8 (patch)
treed4fffc7bcfae0417966a7d183aec04a8c88f0bb5
parent3d85412de1eed5838c90684a2addd0fdd457dd59 (diff)
downloadjQuery-Impromptu-origin/HEAD.zip
jQuery-Impromptu-origin/HEAD.tar.gz
jQuery-Impromptu-origin/HEAD.tar.bz2
-rw-r--r--dist/index.html2
-rw-r--r--dist/jquery-impromptu.css2
-rw-r--r--dist/jquery-impromptu.js2
-rw-r--r--dist/jquery-impromptu.min.css2
-rw-r--r--dist/jquery-impromptu.min.js4
-rw-r--r--jquery-impromptu.jquery.json2
6 files changed, 7 insertions, 7 deletions
diff --git a/dist/index.html b/dist/index.html
index d0de9f4..2ec3047 100644
--- a/dist/index.html
+++ b/dist/index.html
@@ -116,7 +116,7 @@
<h3>Version</h3>
<p>Version 6.2.2</p>
- <p>Last updated on 2015-05-10</p>
+ <p>Last updated on 2015-11-14</p>
<p>jQuery Impromptu is currently available for use in all personal or commercial projects under the <a href="MIT-LICENSE.txt" title="MIT License">MIT License</a>.</p>
diff --git a/dist/jquery-impromptu.css b/dist/jquery-impromptu.css
index 31beff6..f0820ea 100644
--- a/dist/jquery-impromptu.css
+++ b/dist/jquery-impromptu.css
@@ -1,4 +1,4 @@
-/*! jQuery-Impromptu - v6.2.2 - 2015-05-10
+/*! jQuery-Impromptu - v6.2.2 - 2015-11-14
* http://trentrichardson.com/Impromptu
* Copyright (c) 2015 Trent Richardson; Licensed MIT */
.jqifade{
diff --git a/dist/jquery-impromptu.js b/dist/jquery-impromptu.js
index 28c0c46..c50ab35 100644
--- a/dist/jquery-impromptu.js
+++ b/dist/jquery-impromptu.js
@@ -1,4 +1,4 @@
-/*! jQuery-Impromptu - v6.2.2 - 2015-05-10
+/*! jQuery-Impromptu - v6.2.2 - 2015-11-14
* http://trentrichardson.com/Impromptu
* Copyright (c) 2015 Trent Richardson; Licensed MIT */
(function(root, factory) {
diff --git a/dist/jquery-impromptu.min.css b/dist/jquery-impromptu.min.css
index ea2fc42..5d85064 100644
--- a/dist/jquery-impromptu.min.css
+++ b/dist/jquery-impromptu.min.css
@@ -1,3 +1,3 @@
-/*! jQuery-Impromptu - v6.2.2 - 2015-05-10
+/*! jQuery-Impromptu - v6.2.2 - 2015-11-14
* http://trentrichardson.com/Impromptu
* Copyright (c) 2015 Trent Richardson; Licensed MIT */.jqifade{position:absolute;background-color:#777}iframe.jqifade{display:block;z-index:-1}div.jqi{width:400px;max-width:90%;font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;position:absolute;background-color:#fff;font-size:11px;text-align:left;border:solid 1px #eee;border-radius:6px;-moz-border-radius:6px;-webkit-border-radius:6px;padding:7px}div.jqi .jqicontainer{}div.jqi .jqiclose{position:absolute;top:4px;right:-2px;width:18px;cursor:default;color:#bbb;font-weight:700}div.jqi .jqistate{background-color:#fff}div.jqi .jqititle{padding:5px 10px;font-size:16px;line-height:20px;border-bottom:solid 1px #eee}div.jqi .jqimessage{padding:10px;line-height:20px;color:#444;overflow:auto}div.jqi .jqibuttonshide{display:none}div.jqi .jqibuttons{text-align:right;margin:0 -7px -7px -7px;border-top:solid 1px #e4e4e4;background-color:#f4f4f4;border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;-webkit-border-radius:0 0 6px 6px}div.jqi .jqibuttons button{margin:0;padding:15px 20px;background-color:transparent;font-weight:400;border:0;border-left:solid 1px #e4e4e4;color:#777;font-weight:700;font-size:12px}div.jqi .jqibuttons button.jqidefaultbutton{color:#489afe}div.jqi .jqibuttons button:hover,div.jqi .jqibuttons button:focus{color:#287ade;outline:0}div.jqi .jqibuttons button[disabled]{color:#aaa}.jqiwarning .jqi .jqibuttons{background-color:#b95656}div.jqi .jqiparentstate::after{background-color:#777;opacity:.6;filter:alpha(opacity=60);content:'';position:absolute;top:0;left:0;bottom:0;right:0;border-radius:6px;-moz-border-radius:6px;-webkit-border-radius:6px}div.jqi .jqisubstate{position:absolute;top:0;left:20%;width:60%;padding:7px;border:solid 1px #eee;border-top:0;border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;-webkit-border-radius:0 0 6px 6px}div.jqi .jqisubstate .jqibuttons button{padding:10px 18px}.jqi .jqiarrow{position:absolute;height:0;width:0;line-height:0;font-size:0;border:solid 10px transparent}.jqi .jqiarrowtl{left:10px;top:-20px;border-bottom-color:#fff}.jqi .jqiarrowtc{left:50%;top:-20px;border-bottom-color:#fff;margin-left:-10px}.jqi .jqiarrowtr{right:10px;top:-20px;border-bottom-color:#fff}.jqi .jqiarrowbl{left:10px;bottom:-20px;border-top-color:#fff}.jqi .jqiarrowbc{left:50%;bottom:-20px;border-top-color:#fff;margin-left:-10px}.jqi .jqiarrowbr{right:10px;bottom:-20px;border-top-color:#fff}.jqi .jqiarrowlt{left:-20px;top:10px;border-right-color:#fff}.jqi .jqiarrowlm{left:-20px;top:50%;border-right-color:#fff;margin-top:-10px}.jqi .jqiarrowlb{left:-20px;bottom:10px;border-right-color:#fff}.jqi .jqiarrowrt{right:-20px;top:10px;border-left-color:#fff}.jqi .jqiarrowrm{right:-20px;top:50%;border-left-color:#fff;margin-top:-10px}.jqi .jqiarrowrb{right:-20px;bottom:10px;border-left-color:#fff} \ No newline at end of file
diff --git a/dist/jquery-impromptu.min.js b/dist/jquery-impromptu.min.js
index da3bf37..53bbd4e 100644
--- a/dist/jquery-impromptu.min.js
+++ b/dist/jquery-impromptu.min.js
@@ -1,4 +1,4 @@
-/*! jQuery-Impromptu - v6.2.2 - 2015-05-10
+/*! jQuery-Impromptu - v6.2.2 - 2015-11-14
* http://trentrichardson.com/Impromptu
* Copyright (c) 2015 Trent Richardson; Licensed MIT */
-(function(t,e){"function"==typeof define&&define.amd?define(["jquery"],e):e(t.jQuery)})(this,function(t){"use strict";var e=function(t,i){var n=this;return n.id=e.count++,e.lifo.push(n),t&&n.open(t,i),n};e.defaults={prefix:"jqi",classes:{box:"",fade:"",prompt:"",form:"",close:"",title:"",message:"",buttons:"",button:"",defaultButton:""},title:"",closeText:"&times;",buttons:{Ok:!0},buttonTimeout:1e3,loaded:function(){},submit:function(){},close:function(){},statechanging:function(){},statechanged:function(){},opacity:.6,zIndex:999,overlayspeed:"slow",promptspeed:"fast",show:"fadeIn",hide:"fadeOut",focus:0,defaultButton:0,useiframe:!1,top:"15%",position:{container:null,x:null,y:null,arrow:null,width:null},persistent:!0,timeout:0,states:{},initialState:0,state:{name:null,title:"",html:"",buttons:{Ok:!0},focus:0,defaultButton:0,position:{container:null,x:null,y:null,arrow:null,width:null},submit:function(){return!0}}},e.setDefaults=function(i){e.defaults=t.extend({},e.defaults,i)},e.setStateDefaults=function(i){e.defaults.state=t.extend({},e.defaults.state,i)},e.count=0,e.lifo=[],e.getLast=function(){var t=e.lifo.length;return t>0?e.lifo[t-1]:!1},e.removeFromStack=function(t){for(var i=e.lifo.length-1;i>=0;i--)if(e.lifo[i].id===t)return e.lifo.splice(i,1)[0]},e.prototype={id:null,open:function(i,n){var o=this;o.options=t.extend({},e.defaults,n),o.timeout&&clearTimeout(o.timeout),o.timeout=!1;var s=o.options,a=t(document.body),r=t(window),u='<div class="'+s.prefix+"box "+s.classes.box+'">';u+=s.useiframe&&t("object, applet").length>0?'<iframe src="javascript:false;" class="'+s.prefix+"fade "+s.classes.fade+'"></iframe>':'<div class="'+s.prefix+"fade "+s.classes.fade+'"></div>',u+='<div class="'+s.prefix+" "+s.classes.prompt+'">'+'<form action="#" class="'+s.prefix+"form "+s.classes.form+'">'+'<div class="'+s.prefix+"close "+s.classes.close+'">'+s.closeText+"</div>"+'<div class="'+s.prefix+'states"></div>'+"</form>"+"</div>"+"</div>",o.jqib=t(u).appendTo(a),o.jqi=o.jqib.children("."+s.prefix),o.jqif=o.jqib.children("."+s.prefix+"fade"),i.constructor===String&&(i={state0:{title:s.title,html:i,buttons:s.buttons,position:s.position,focus:s.focus,defaultButton:s.defaultButton,submit:s.submit}}),o.options.states={};var f,l;for(f in i)l=t.extend({},e.defaults.state,{name:f},i[f]),o.addState(l.name,l),""===o.currentStateName&&(o.currentStateName=l.name);o.jqi.on("click","."+s.prefix+"buttons button",function(){var e=t(this),i=e.parents("."+s.prefix+"state"),n=i.data("jqi-name"),a=o.options.states[n],r=i.children("."+s.prefix+"message"),u=a.buttons[e.text()]||a.buttons[e.html()],f={};if(o.options.buttonTimeout>0&&(o.disableStateButtons(n),setTimeout(function(){o.enableStateButtons(n)},o.options.buttonTimeout)),void 0===u)for(var l in a.buttons)(a.buttons[l].title===e.text()||a.buttons[l].title===e.html())&&(u=a.buttons[l].value);t.each(o.jqi.children("form").serializeArray(),function(t,e){void 0===f[e.name]?f[e.name]=e.value:typeof f[e.name]===Array||"object"==typeof f[e.name]?f[e.name].push(e.value):f[e.name]=[f[e.name],e.value]});var p=new t.Event("impromptu:submit");p.stateName=a.name,p.state=i,i.trigger(p,[u,r,f]),p.isDefaultPrevented()||o.close(!0,u,r,f)});var p=function(){if(s.persistent){var e=(""+s.top).indexOf("%")>=0?r.height()*(parseInt(s.top,10)/100):parseInt(s.top,10),i=parseInt(o.jqi.css("top").replace("px",""),10)-e;t("html,body").animate({scrollTop:i},"fast",function(){var t=0;o.jqib.addClass(s.prefix+"warning");var e=setInterval(function(){o.jqib.toggleClass(s.prefix+"warning"),t++>1&&(clearInterval(e),o.jqib.removeClass(s.prefix+"warning"))},100)})}else o.close(!0)},d=function(e){var i=window.event?event.keyCode:e.keyCode;if(27===i&&p(),13===i){var n=o.getCurrentState().find("."+s.prefix+"defaultbutton"),a=t(e.target);a.is("textarea,."+s.prefix+"button")===!1&&n.length>0&&(e.preventDefault(),n.click())}if(9===i){var r=t("input,select,textarea,button",o.getCurrentState()),u=!e.shiftKey&&e.target===r[r.length-1],f=e.shiftKey&&e.target===r[0];if(u||f)return setTimeout(function(){if(r){var t=r[f===!0?r.length-1:0];t&&t.focus()}},10),!1}};return o.position(),o.style(),o._windowResize=function(t){o.position(t)},r.resize({animate:!1},o._windowResize),o.jqif.click(p),o.jqi.find("."+s.prefix+"close").click(function(){o.close()}),o.jqi.find("."+s.prefix+"form").submit(function(){return!1}),o.jqib.on("keydown",d).on("impromptu:loaded",s.loaded).on("impromptu:close",s.close).on("impromptu:statechanging",s.statechanging).on("impromptu:statechanged",s.statechanged),o.jqif[s.show](s.overlayspeed),o.jqi[s.show](s.promptspeed,function(){o.goToState(isNaN(s.initialState)?s.initialState:o.jqi.find("."+s.prefix+"states ."+s.prefix+"state").eq(s.initialState).data("jqi-name")),o.jqib.trigger("impromptu:loaded")}),s.timeout>0&&(o.timeout=setTimeout(function(){o.close(!0)},s.timeout)),o},close:function(i,n,o,s){var a=this;return e.removeFromStack(a.id),a.timeout&&(clearTimeout(a.timeout),a.timeout=!1),a.jqib&&a.jqib[a.options.hide]("fast",function(){a.jqib.trigger("impromptu:close",[n,o,s]),a.jqib.remove(),t(window).off("resize",a._windowResize),"function"==typeof i&&i()}),a.currentStateName="",a},addState:function(i,n,o){var s,a,r,u,f,l=this,p="",d=null,c="",m="",h=l.options,v=t.isFunction(n.position)?n.position():n.position,g=l.jqi.find("."+h.prefix+"states"),b=[],x=0;if(n=t.extend({},e.defaults.state,{name:i},n),t.isPlainObject(v)&&null!==v.arrow&&(c='<div class="'+h.prefix+"arrow "+h.prefix+"arrow"+v.arrow+'"></div>'),n.title&&""!==n.title&&(m='<div class="lead '+h.prefix+"title "+h.classes.title+'">'+n.title+"</div>"),s=n.html,"function"==typeof n.html&&(s="Error: html function must return text"),p+='<div class="'+h.prefix+'state" data-jqi-name="'+i+'">'+c+m+'<div class="'+h.prefix+"message "+h.classes.message+'">'+s+"</div>"+'<div class="'+h.prefix+"buttons"+(t.isEmptyObject(n.buttons)?"hide ":" ")+h.classes.buttons+'">',t.isArray(n.buttons))b=n.buttons;else if(t.isPlainObject(n.buttons))for(r in n.buttons)n.buttons.hasOwnProperty(r)&&b.push({title:r,value:n.buttons[r]});for(x=0,f=b.length;f>x;x++)u=b[x],a=n.focus===x||isNaN(n.focus)&&n.defaultButton===x?h.prefix+"defaultbutton "+h.classes.defaultButton:"",p+='<button class="'+h.classes.button+" "+h.prefix+"button "+a,u.classes!==void 0&&(p+=" "+(t.isArray(u.classes)?u.classes.join(" "):u.classes)+" "),p+='" name="'+h.prefix+"_"+i+"_button"+u.title.replace(/[^a-z0-9]+/gi,"")+'" value="'+u.value+'">'+u.title+"</button>";return p+="</div></div>",d=t(p).css({display:"none"}),d.on("impromptu:submit",n.submit),void 0!==o?l.getState(o).after(d):g.append(d),l.options.states[i]=n,d},removeState:function(t,e){var i=this,n=i.getState(t),o=function(){n.remove()};return 0===n.length?!1:("none"!==n.css("display")?void 0!==e&&i.getState(e).length>0?i.goToState(e,!1,o):n.next().length>0?i.nextState(o):n.prev().length>0?i.prevState(o):i.close():n.slideUp("slow",o),!0)},getApi:function(){return this},getBox:function(){return this.jqib},getPrompt:function(){return this.jqi},getState:function(t){return this.jqi.find('[data-jqi-name="'+t+'"]')},getCurrentState:function(){return this.getState(this.getCurrentStateName())},getCurrentStateName:function(){return this.currentStateName},disableStateButtons:function(e,i,n){var o=this;t.isArray(e)&&(i=e,e=null),o.getState(e||o.getCurrentStateName()).find("."+o.options.prefix+"button").each(function(e,o){(void 0===i||-1!==t.inArray(o.value,i))&&(o.disabled=!n)})},enableStateButtons:function(t,e){this.disableStateButtons(t,e,!0)},position:function(e){var i=this,n=t.fx.off,o=i.getCurrentState(),s=i.options.states[o.data("jqi-name")],a=s?t.isFunction(s.position)?s.position():s.position:void 0,r=t(window),u=document.body.scrollHeight,f=t(window).height(),l=(t(document).height(),u>f?u:f),p=parseInt(r.scrollTop(),10),d=p+((""+i.options.top).indexOf("%")>=0?f*(parseInt(i.options.top,10)/100):parseInt(i.options.top,10));if(void 0!==e&&e.data.animate===!1&&(t.fx.off=!0),i.jqib.css({position:"absolute",height:l,width:"100%",top:0,left:0,right:0,bottom:0}),i.jqif.css({position:"fixed",height:l,width:"100%",top:0,left:0,right:0,bottom:0}),a&&a.container){var c=t(a.container).offset(),m=!1;t.isPlainObject(c)&&void 0!==c.top&&(d=c.top+a.y-((""+i.options.top).indexOf("%")>=0?f*(parseInt(i.options.top,10)/100):parseInt(i.options.top,10)),i.jqi.css({position:"absolute"}),i.jqi.animate({top:c.top+a.y,left:c.left+a.x,marginLeft:0,width:void 0!==a.width?a.width:null},function(){!m&&c.top+a.y+i.jqi.outerHeight(!0)>p+f&&(t("html,body").animate({scrollTop:d},"slow","swing",function(){}),m=!0)}),(p>d||d>p+f)&&(t("html,body").animate({scrollTop:d},"slow","swing",function(){}),m=!0))}else a&&a.width?(i.jqi.css({position:"absolute",left:"50%"}),i.jqi.animate({top:a.y||d,left:a.x||"50%",marginLeft:-1*(a.width/2),width:a.width})):i.jqi.css({position:"absolute",top:d,left:"50%",marginLeft:-1*(i.jqi.outerWidth(!1)/2)});void 0!==e&&e.data.animate===!1&&(t.fx.off=n)},style:function(){var t=this;t.jqif.css({zIndex:t.options.zIndex,display:"none",opacity:t.options.opacity}),t.jqi.css({zIndex:t.options.zIndex+1,display:"none"}),t.jqib.css({zIndex:t.options.zIndex})},goToState:function(e,i,n){var o=this,s=(o.jqi,o.options),a=o.getState(e),r=s.states[a.data("jqi-name")],u=new t.Event("impromptu:statechanging"),f=o.options;if(void 0!==r){if("function"==typeof r.html){var l=r.html;a.find("."+f.prefix+"message ").html(l())}"function"==typeof i&&(n=i,i=!1),o.jqib.trigger(u,[o.getCurrentStateName(),e]),!u.isDefaultPrevented()&&a.length>0&&(o.jqi.find("."+f.prefix+"parentstate").removeClass(f.prefix+"parentstate"),i?(o.jqi.find("."+f.prefix+"substate").not(a).slideUp(s.promptspeed).removeClass("."+f.prefix+"substate").find("."+f.prefix+"arrow").hide(),o.jqi.find("."+f.prefix+"state:visible").addClass(f.prefix+"parentstate"),a.addClass(f.prefix+"substate")):o.jqi.find("."+f.prefix+"state").not(a).slideUp(s.promptspeed).find("."+f.prefix+"arrow").hide(),o.currentStateName=r.name,a.slideDown(s.promptspeed,function(){var i=t(this);o.enableStateButtons(),"string"==typeof r.focus?i.find(r.focus).eq(0).focus():i.find("."+f.prefix+"defaultbutton").focus(),i.find("."+f.prefix+"arrow").show(s.promptspeed),"function"==typeof n&&o.jqib.on("impromptu:statechanged",n),o.jqib.trigger("impromptu:statechanged",[e]),"function"==typeof n&&o.jqib.off("impromptu:statechanged",n)}),i||o.position())}return a},nextState:function(t){var e=this,i=e.getCurrentState().next();return i.length>0&&e.goToState(i.data("jqi-name"),t),i},prevState:function(t){var e=this,i=e.getCurrentState().prev();return i.length>0&&e.goToState(i.data("jqi-name"),t),i}},t.prompt=function(t,i){var n=new e(t,i);return n.jqi},t.each(e,function(e,i){t.prompt[e]=i}),t.each(e.prototype,function(i){t.prompt[i]=function(){var t=e.getLast();return t&&"function"==typeof t[i]?t[i].apply(t,arguments):void 0}}),t.fn.prompt=function(e){void 0===e&&(e={}),void 0===e.withDataAndEvents&&(e.withDataAndEvents=!1),t.prompt(t(this).clone(e.withDataAndEvents).html(),e)},window.Impromptu=e}); \ No newline at end of file
+!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],b):b(a.jQuery)}(this,function(a){"use strict";var b=function(a,c){var d=this;return d.id=b.count++,b.lifo.push(d),a&&d.open(a,c),d};b.defaults={prefix:"jqi",classes:{box:"",fade:"",prompt:"",form:"",close:"",title:"",message:"",buttons:"",button:"",defaultButton:""},title:"",closeText:"&times;",buttons:{Ok:!0},buttonTimeout:1e3,loaded:function(a){},submit:function(a,b,c,d){},close:function(a,b,c,d){},statechanging:function(a,b,c){},statechanged:function(a,b){},opacity:.6,zIndex:999,overlayspeed:"slow",promptspeed:"fast",show:"fadeIn",hide:"fadeOut",focus:0,defaultButton:0,useiframe:!1,top:"15%",position:{container:null,x:null,y:null,arrow:null,width:null},persistent:!0,timeout:0,states:{},initialState:0,state:{name:null,title:"",html:"",buttons:{Ok:!0},focus:0,defaultButton:0,position:{container:null,x:null,y:null,arrow:null,width:null},submit:function(a,b,c,d){return!0}}},b.setDefaults=function(c){b.defaults=a.extend({},b.defaults,c)},b.setStateDefaults=function(c){b.defaults.state=a.extend({},b.defaults.state,c)},b.count=0,b.lifo=[],b.getLast=function(){var a=b.lifo.length;return a>0?b.lifo[a-1]:!1},b.removeFromStack=function(a){for(var c=b.lifo.length-1;c>=0;c--)if(b.lifo[c].id===a)return b.lifo.splice(c,1)[0]},b.prototype={id:null,open:function(c,d){var e=this;e.options=a.extend({},b.defaults,d),e.timeout&&clearTimeout(e.timeout),e.timeout=!1;var f=e.options,g=a(document.body),h=a(window),i='<div class="'+f.prefix+"box "+f.classes.box+'">';i+=f.useiframe&&a("object, applet").length>0?'<iframe src="javascript:false;" class="'+f.prefix+"fade "+f.classes.fade+'"></iframe>':'<div class="'+f.prefix+"fade "+f.classes.fade+'"></div>',i+='<div class="'+f.prefix+" "+f.classes.prompt+'"><form action="#" class="'+f.prefix+"form "+f.classes.form+'"><div class="'+f.prefix+"close "+f.classes.close+'">'+f.closeText+'</div><div class="'+f.prefix+'states"></div></form></div></div>',e.jqib=a(i).appendTo(g),e.jqi=e.jqib.children("."+f.prefix),e.jqif=e.jqib.children("."+f.prefix+"fade"),c.constructor===String&&(c={state0:{title:f.title,html:c,buttons:f.buttons,position:f.position,focus:f.focus,defaultButton:f.defaultButton,submit:f.submit}}),e.options.states={};var j,k;for(j in c)k=a.extend({},b.defaults.state,{name:j},c[j]),e.addState(k.name,k),""===e.currentStateName&&(e.currentStateName=k.name);e.jqi.on("click","."+f.prefix+"buttons button",function(b){var c=a(this),d=c.parents("."+f.prefix+"state"),g=d.data("jqi-name"),h=e.options.states[g],i=d.children("."+f.prefix+"message"),j=h.buttons[c.text()]||h.buttons[c.html()],k={};if(e.options.buttonTimeout>0&&(e.disableStateButtons(g),setTimeout(function(){e.enableStateButtons(g)},e.options.buttonTimeout)),void 0===j)for(var l in h.buttons)(h.buttons[l].title===c.text()||h.buttons[l].title===c.html())&&(j=h.buttons[l].value);a.each(e.jqi.children("form").serializeArray(),function(a,b){void 0===k[b.name]?k[b.name]=b.value:typeof k[b.name]===Array||"object"==typeof k[b.name]?k[b.name].push(b.value):k[b.name]=[k[b.name],b.value]});var m=new a.Event("impromptu:submit");m.stateName=h.name,m.state=d,d.trigger(m,[j,i,k]),m.isDefaultPrevented()||e.close(!0,j,i,k)});var l=function(){if(f.persistent){var b=f.top.toString().indexOf("%")>=0?h.height()*(parseInt(f.top,10)/100):parseInt(f.top,10),c=parseInt(e.jqi.css("top").replace("px",""),10)-b;a("html,body").animate({scrollTop:c},"fast",function(){var a=0;e.jqib.addClass(f.prefix+"warning");var b=setInterval(function(){e.jqib.toggleClass(f.prefix+"warning"),a++>1&&(clearInterval(b),e.jqib.removeClass(f.prefix+"warning"))},100)})}else e.close(!0)},m=function(b){var c=window.event?event.keyCode:b.keyCode;if(27===c&&l(),13===c){var d=e.getCurrentState().find("."+f.prefix+"defaultbutton"),g=a(b.target);g.is("textarea,."+f.prefix+"button")===!1&&d.length>0&&(b.preventDefault(),d.click())}if(9===c){var h=a("input,select,textarea,button",e.getCurrentState()),i=!b.shiftKey&&b.target===h[h.length-1],j=b.shiftKey&&b.target===h[0];if(i||j)return setTimeout(function(){if(h){var a=h[j===!0?h.length-1:0];a&&a.focus()}},10),!1}};return e.position(),e.style(),e._windowResize=function(a){e.position(a)},h.resize({animate:!1},e._windowResize),e.jqif.click(l),e.jqi.find("."+f.prefix+"close").click(function(){e.close()}),e.jqi.find("."+f.prefix+"form").submit(function(){return!1}),e.jqib.on("keydown",m).on("impromptu:loaded",f.loaded).on("impromptu:close",f.close).on("impromptu:statechanging",f.statechanging).on("impromptu:statechanged",f.statechanged),e.jqif[f.show](f.overlayspeed),e.jqi[f.show](f.promptspeed,function(){e.goToState(isNaN(f.initialState)?f.initialState:e.jqi.find("."+f.prefix+"states ."+f.prefix+"state").eq(f.initialState).data("jqi-name")),e.jqib.trigger("impromptu:loaded")}),f.timeout>0&&(e.timeout=setTimeout(function(){e.close(!0)},f.timeout)),e},close:function(c,d,e,f){var g=this;return b.removeFromStack(g.id),g.timeout&&(clearTimeout(g.timeout),g.timeout=!1),g.jqib&&g.jqib[g.options.hide]("fast",function(){g.jqib.trigger("impromptu:close",[d,e,f]),g.jqib.remove(),a(window).off("resize",g._windowResize),"function"==typeof c&&c()}),g.currentStateName="",g},addState:function(c,d,e){var f,g,h,i,j,k=this,l="",m=null,n="",o="",p=k.options,q=a.isFunction(d.position)?d.position():d.position,r=k.jqi.find("."+p.prefix+"states"),s=[],t=0;if(d=a.extend({},b.defaults.state,{name:c},d),a.isPlainObject(q)&&null!==q.arrow&&(n='<div class="'+p.prefix+"arrow "+p.prefix+"arrow"+q.arrow+'"></div>'),d.title&&""!==d.title&&(o='<div class="lead '+p.prefix+"title "+p.classes.title+'">'+d.title+"</div>"),f=d.html,"function"==typeof d.html&&(f="Error: html function must return text"),l+='<div class="'+p.prefix+'state" data-jqi-name="'+c+'">'+n+o+'<div class="'+p.prefix+"message "+p.classes.message+'">'+f+'</div><div class="'+p.prefix+"buttons"+(a.isEmptyObject(d.buttons)?"hide ":" ")+p.classes.buttons+'">',a.isArray(d.buttons))s=d.buttons;else if(a.isPlainObject(d.buttons))for(h in d.buttons)d.buttons.hasOwnProperty(h)&&s.push({title:h,value:d.buttons[h]});for(t=0,j=s.length;j>t;t++)i=s[t],g=d.focus===t||isNaN(d.focus)&&d.defaultButton===t?p.prefix+"defaultbutton "+p.classes.defaultButton:"",l+='<button class="'+p.classes.button+" "+p.prefix+"button "+g,"undefined"!=typeof i.classes&&(l+=" "+(a.isArray(i.classes)?i.classes.join(" "):i.classes)+" "),l+='" name="'+p.prefix+"_"+c+"_button"+i.title.replace(/[^a-z0-9]+/gi,"")+'" value="'+i.value+'">'+i.title+"</button>";return l+="</div></div>",m=a(l).css({display:"none"}),m.on("impromptu:submit",d.submit),void 0!==e?k.getState(e).after(m):r.append(m),k.options.states[c]=d,m},removeState:function(a,b){var c=this,d=c.getState(a),e=function(){d.remove()};return 0===d.length?!1:("none"!==d.css("display")?void 0!==b&&c.getState(b).length>0?c.goToState(b,!1,e):d.next().length>0?c.nextState(e):d.prev().length>0?c.prevState(e):c.close():d.slideUp("slow",e),!0)},getApi:function(){return this},getBox:function(){return this.jqib},getPrompt:function(){return this.jqi},getState:function(a){return this.jqi.find('[data-jqi-name="'+a+'"]')},getCurrentState:function(){return this.getState(this.getCurrentStateName())},getCurrentStateName:function(){return this.currentStateName},disableStateButtons:function(b,c,d){var e=this;a.isArray(b)&&(c=b,b=null),e.getState(b||e.getCurrentStateName()).find("."+e.options.prefix+"button").each(function(b,e){(void 0===c||-1!==a.inArray(e.value,c))&&(e.disabled=!d)})},enableStateButtons:function(a,b){this.disableStateButtons(a,b,!0)},position:function(b){var c=this,d=a.fx.off,e=c.getCurrentState(),f=c.options.states[e.data("jqi-name")],g=f?a.isFunction(f.position)?f.position():f.position:void 0,h=a(window),i=document.body.scrollHeight,j=a(window).height(),k=(a(document).height(),i>j?i:j),l=parseInt(h.scrollTop(),10),m=l+(c.options.top.toString().indexOf("%")>=0?j*(parseInt(c.options.top,10)/100):parseInt(c.options.top,10));if(void 0!==b&&b.data.animate===!1&&(a.fx.off=!0),c.jqib.css({position:"absolute",height:k,width:"100%",top:0,left:0,right:0,bottom:0}),c.jqif.css({position:"fixed",height:k,width:"100%",top:0,left:0,right:0,bottom:0}),g&&g.container){var n=a(g.container).offset(),o=!1;a.isPlainObject(n)&&void 0!==n.top&&(m=n.top+g.y-(c.options.top.toString().indexOf("%")>=0?j*(parseInt(c.options.top,10)/100):parseInt(c.options.top,10)),c.jqi.css({position:"absolute"}),c.jqi.animate({top:n.top+g.y,left:n.left+g.x,marginLeft:0,width:void 0!==g.width?g.width:null},function(){!o&&n.top+g.y+c.jqi.outerHeight(!0)>l+j&&(a("html,body").animate({scrollTop:m},"slow","swing",function(){}),o=!0)}),(l>m||m>l+j)&&(a("html,body").animate({scrollTop:m},"slow","swing",function(){}),o=!0))}else g&&g.width?(c.jqi.css({position:"absolute",left:"50%"}),c.jqi.animate({top:g.y||m,left:g.x||"50%",marginLeft:g.width/2*-1,width:g.width})):c.jqi.css({position:"absolute",top:m,left:"50%",marginLeft:c.jqi.outerWidth(!1)/2*-1});void 0!==b&&b.data.animate===!1&&(a.fx.off=d)},style:function(){var a=this;a.jqif.css({zIndex:a.options.zIndex,display:"none",opacity:a.options.opacity}),a.jqi.css({zIndex:a.options.zIndex+1,display:"none"}),a.jqib.css({zIndex:a.options.zIndex})},goToState:function(b,c,d){var e=this,f=(e.jqi,e.options),g=e.getState(b),h=f.states[g.data("jqi-name")],i=new a.Event("impromptu:statechanging"),j=e.options;if(void 0!==h){if("function"==typeof h.html){var k=h.html;g.find("."+j.prefix+"message ").html(k())}"function"==typeof c&&(d=c,c=!1),e.jqib.trigger(i,[e.getCurrentStateName(),b]),!i.isDefaultPrevented()&&g.length>0&&(e.jqi.find("."+j.prefix+"parentstate").removeClass(j.prefix+"parentstate"),c?(e.jqi.find("."+j.prefix+"substate").not(g).slideUp(f.promptspeed).removeClass("."+j.prefix+"substate").find("."+j.prefix+"arrow").hide(),e.jqi.find("."+j.prefix+"state:visible").addClass(j.prefix+"parentstate"),g.addClass(j.prefix+"substate")):e.jqi.find("."+j.prefix+"state").not(g).slideUp(f.promptspeed).find("."+j.prefix+"arrow").hide(),e.currentStateName=h.name,g.slideDown(f.promptspeed,function(){var c=a(this);e.enableStateButtons(),"string"==typeof h.focus?c.find(h.focus).eq(0).focus():c.find("."+j.prefix+"defaultbutton").focus(),c.find("."+j.prefix+"arrow").show(f.promptspeed),"function"==typeof d&&e.jqib.on("impromptu:statechanged",d),e.jqib.trigger("impromptu:statechanged",[b]),"function"==typeof d&&e.jqib.off("impromptu:statechanged",d)}),c||e.position())}return g},nextState:function(a){var b=this,c=b.getCurrentState().next();return c.length>0&&b.goToState(c.data("jqi-name"),a),c},prevState:function(a){var b=this,c=b.getCurrentState().prev();return c.length>0&&b.goToState(c.data("jqi-name"),a),c}},a.prompt=function(a,c){var d=new b(a,c);return d.jqi},a.each(b,function(b,c){a.prompt[b]=c}),a.each(b.prototype,function(c,d){a.prompt[c]=function(){var a=b.getLast();return a&&"function"==typeof a[c]?a[c].apply(a,arguments):void 0}}),a.fn.prompt=function(b){void 0===b&&(b={}),void 0===b.withDataAndEvents&&(b.withDataAndEvents=!1),a.prompt(a(this).clone(b.withDataAndEvents).html(),b)},window.Impromptu=b}); \ No newline at end of file
diff --git a/jquery-impromptu.jquery.json b/jquery-impromptu.jquery.json
index a092895..cbf6d08 100644
--- a/jquery-impromptu.jquery.json
+++ b/jquery-impromptu.jquery.json
@@ -3,7 +3,7 @@
"title": "jQuery-Impromptu",
"description": "An extension to help provide a more pleasant way to spontaneously prompt a user for input.",
"version": "6.2.2",
- "modified": "2015-05-10",
+ "modified": "2015-11-14",
"homepage": "http://trentrichardson.com/Impromptu",
"author": {
"name": "Trent Richardson",