summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrent Richardson <trentdrichardson@gmail.com>2014-11-16 21:06:55 -0500
committerTrent Richardson <trentdrichardson@gmail.com>2014-11-16 21:06:55 -0500
commit05eb46469b14a464c70a41664b9d02a052e64b62 (patch)
tree132b3330b0a42b13460265a20e1d10ee9a0dbd78
parent6dbe11def320866a8ed5cf7b3f56191483e6b337 (diff)
downloadjQuery-Impromptu-05eb46469b14a464c70a41664b9d02a052e64b62.zip
jQuery-Impromptu-05eb46469b14a464c70a41664b9d02a052e64b62.tar.gz
jQuery-Impromptu-05eb46469b14a464c70a41664b9d02a052e64b62.tar.bz2
New Versionv5.3.0
-rw-r--r--dist/index.html4
-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.js2
-rw-r--r--jquery-impromptu.jquery.json4
6 files changed, 8 insertions, 8 deletions
diff --git a/dist/index.html b/dist/index.html
index 842cbab..11bfefd 100644
--- a/dist/index.html
+++ b/dist/index.html
@@ -115,8 +115,8 @@
</ul>
<h3>Version</h3>
- <p>Version 5.2.6</p>
- <p>Last updated on 2014-09-01</p>
+ <p>Version 5.3.0</p>
+ <p>Last updated on 2014-11-16</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 8319a24..e478513 100644
--- a/dist/jquery-impromptu.css
+++ b/dist/jquery-impromptu.css
@@ -1,4 +1,4 @@
-/*! jQuery-Impromptu - v5.2.6 - 2014-09-01
+/*! jQuery-Impromptu - v5.3.0 - 2014-11-16
* http://trentrichardson.com/Impromptu
* Copyright (c) 2014 Trent Richardson; Licensed MIT */
.jqifade{
diff --git a/dist/jquery-impromptu.js b/dist/jquery-impromptu.js
index 4d9076d..4da8692 100644
--- a/dist/jquery-impromptu.js
+++ b/dist/jquery-impromptu.js
@@ -1,4 +1,4 @@
-/*! jQuery-Impromptu - v5.2.6 - 2014-09-01
+/*! jQuery-Impromptu - v5.3.0 - 2014-11-16
* http://trentrichardson.com/Impromptu
* Copyright (c) 2014 Trent Richardson; Licensed MIT */
(function(root, factory) {
diff --git a/dist/jquery-impromptu.min.css b/dist/jquery-impromptu.min.css
index ecc32b7..fbb94ec 100644
--- a/dist/jquery-impromptu.min.css
+++ b/dist/jquery-impromptu.min.css
@@ -1,3 +1,3 @@
-/*! jQuery-Impromptu - v5.2.6 - 2014-09-01
+/*! jQuery-Impromptu - v5.3.0 - 2014-11-16
* http://trentrichardson.com/Impromptu
* Copyright (c) 2014 Trent Richardson; Licensed MIT */.jqifade{position:absolute;background-color:#777}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}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}.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 37b66a0..a3986a0 100644
--- a/dist/jquery-impromptu.min.js
+++ b/dist/jquery-impromptu.min.js
@@ -1,4 +1,4 @@
-/*! jQuery-Impromptu - v5.2.6 - 2014-09-01
+/*! jQuery-Impromptu - v5.3.0 - 2014-11-16
* http://trentrichardson.com/Impromptu
* Copyright (c) 2014 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(i,n){void 0!==n&&void 0!==n.classes&&"string"==typeof n.classes&&(n={box:n.classes}),e.options=t.extend({},e.defaults,n),e.currentPrefix=e.options.prefix,e.timeout&&clearTimeout(e.timeout),e.timeout=!1;var o=e.options,s=t(document.body),a=t(window),r='<div class="'+e.options.prefix+"box "+o.classes.box+'">';r+=o.useiframe&&t("object, applet").length>0?'<iframe src="javascript:false;" style="display:block;position:absolute;z-index:-1;" class="'+o.prefix+"fade "+o.classes.fade+'"></iframe>':'<div class="'+o.prefix+"fade "+o.classes.fade+'"></div>',r+='<div class="'+o.prefix+" "+o.classes.prompt+'">'+'<form action="javascript:false;" onsubmit="return false;" class="'+o.prefix+"form "+o.classes.form+'">'+'<div class="'+o.prefix+"close "+o.classes.close+'">'+o.closeText+"</div>"+'<div class="'+o.prefix+'states"></div>'+"</form>"+"</div>"+"</div>",e.jqib=t(r).appendTo(s),e.jqi=e.jqib.children("."+o.prefix),e.jqif=e.jqib.children("."+o.prefix+"fade"),i.constructor===String&&(i={state0:{title:o.title,html:i,buttons:o.buttons,position:o.position,focus:o.focus,defaultButton:o.defaultButton,submit:o.submit}}),e.options.states={};var u,f;for(u in i)f=t.extend({},e.defaults.state,{name:u},i[u]),e.addState(f.name,f),""===e.currentStateName&&(e.currentStateName=f.name);e.jqi.on("click","."+o.prefix+"buttons button",function(){var i=t(this),n=i.parents("."+o.prefix+"state"),s=e.options.states[n.data("jqi-name")],a=n.children("."+o.prefix+"message"),r=s.buttons[i.text()]||s.buttons[i.html()],u={};if(void 0===r)for(var f in s.buttons)(s.buttons[f].title===i.text()||s.buttons[f].title===i.html())&&(r=s.buttons[f].value);t.each(e.jqi.children("form").serializeArray(),function(t,e){void 0===u[e.name]?u[e.name]=e.value:typeof u[e.name]===Array||"object"==typeof u[e.name]?u[e.name].push(e.value):u[e.name]=[u[e.name],e.value]});var l=new t.Event("impromptu:submit");l.stateName=s.name,l.state=n,n.trigger(l,[r,a,u]),l.isDefaultPrevented()||e.close(!0,r,a,u)});var l=function(){if(o.persistent){var i=(""+o.top).indexOf("%")>=0?a.height()*(parseInt(o.top,10)/100):parseInt(o.top,10),n=parseInt(e.jqi.css("top").replace("px",""),10)-i;t("html,body").animate({scrollTop:n},"fast",function(){var t=0;e.jqib.addClass(o.prefix+"warning");var i=setInterval(function(){e.jqib.toggleClass(o.prefix+"warning"),t++>1&&(clearInterval(i),e.jqib.removeClass(o.prefix+"warning"))},100)})}else e.close(!0)},p=function(i){var n=window.event?event.keyCode:i.keyCode;if(27===n&&l(),13===n){var s=e.getCurrentState().find("."+o.prefix+"defaultbutton"),a=t(i.target);a.is("textarea,."+o.prefix+"button")===!1&&s.length>0&&(i.preventDefault(),s.click())}if(9===n){var r=t("input,select,textarea,button",e.getCurrentState()),u=!i.shiftKey&&i.target===r[r.length-1],f=i.shiftKey&&i.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 e.position(),e.style(),e.jqif.click(l),a.resize({animate:!1},e.position),e.jqi.find("."+o.prefix+"close").click(e.close),e.jqib.on("keydown",p).on("impromptu:loaded",o.loaded).on("impromptu:close",o.close).on("impromptu:statechanging",o.statechanging).on("impromptu:statechanged",o.statechanged),e.jqif[o.show](o.overlayspeed),e.jqi[o.show](o.promptspeed,function(){var t=e.jqi.find("."+o.prefix+"states ."+o.prefix+"state").eq(0);e.goToState(t.data("jqi-name")),e.jqib.trigger("impromptu:loaded")}),o.timeout>0&&(e.timeout=setTimeout(function(){e.close(!0)},o.timeout)),e.jqib};e.defaults={prefix:"jqi",classes:{box:"",fade:"",prompt:"",form:"",close:"",title:"",message:"",buttons:"",button:"",defaultButton:""},title:"",closeText:"&times;",buttons:{Ok:!0},loaded:function(){},submit:function(){},close:function(){},statechanging:function(){},statechanged:function(){},opacity:.6,zIndex:999,overlayspeed:"slow",promptspeed:"fast",show:"fadeIn",focus:0,defaultButton:0,useiframe:!1,top:"15%",position:{container:null,x:null,y:null,arrow:null,width:null},persistent:!0,timeout:0,states:{},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.currentPrefix=e.defaults.prefix,e.currentStateName="",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.position=function(i){var n=t.fx.off,o=e.getCurrentState(),s=e.options.states[o.data("jqi-name")],a=s?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)+((""+e.options.top).indexOf("%")>=0?f*(parseInt(e.options.top,10)/100):parseInt(e.options.top,10));if(void 0!==i&&i.data.animate===!1&&(t.fx.off=!0),e.jqib.css({position:"absolute",height:l,width:"100%",top:0,left:0,right:0,bottom:0}),e.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();t.isPlainObject(c)&&void 0!==c.top&&(e.jqi.css({position:"absolute"}),e.jqi.animate({top:c.top+a.y,left:c.left+a.x,marginLeft:0,width:void 0!==a.width?a.width:null}),p=c.top+a.y-((""+e.options.top).indexOf("%")>=0?f*(parseInt(e.options.top,10)/100):parseInt(e.options.top,10)),t("html,body").animate({scrollTop:p},"slow","swing",function(){}))}else a&&a.width?(e.jqi.css({position:"absolute",left:"50%"}),e.jqi.animate({top:a.y||p,left:a.x||"50%",marginLeft:-1*(a.width/2),width:a.width})):e.jqi.css({position:"absolute",top:p,left:"50%",marginLeft:-1*(e.jqi.outerWidth(!1)/2)});void 0!==i&&i.data.animate===!1&&(t.fx.off=n)},e.style=function(){e.jqif.css({zIndex:e.options.zIndex,display:"none",opacity:e.options.opacity}),e.jqi.css({zIndex:e.options.zIndex+1,display:"none"}),e.jqib.css({zIndex:e.options.zIndex})},e.get=function(){return t("."+e.currentPrefix)},e.addState=function(i,n,o){var s,a,r,u,f,l="",p=null,c="",d="",m=e.options,x=t("."+e.currentPrefix+"states"),v=[],g=0;if(n=t.extend({},e.defaults.state,{name:i},n),null!==n.position.arrow&&(c='<div class="'+m.prefix+"arrow "+m.prefix+"arrow"+n.position.arrow+'"></div>'),n.title&&""!==n.title&&(d='<div class="lead '+m.prefix+"title "+m.classes.title+'">'+n.title+"</div>"),s=n.html,"function"==typeof n.html&&(s="Error: html function must return text"),l+='<div id="'+m.prefix+"state_"+i+'" class="'+m.prefix+'state" data-jqi-name="'+i+'" style="display:none;">'+c+d+'<div class="'+m.prefix+"message "+m.classes.message+'">'+s+"</div>"+'<div class="'+m.prefix+"buttons "+m.classes.buttons+'"'+(t.isEmptyObject(n.buttons)?'style="display:none;"':"")+">",t.isArray(n.buttons))v=n.buttons;else if(t.isPlainObject(n.buttons))for(r in n.buttons)n.buttons.hasOwnProperty(r)&&v.push({title:r,value:n.buttons[r]});for(g=0,f=v.length;f>g;g++)u=v[g],a=n.focus===g||isNaN(n.focus)&&n.defaultButton===g?e.currentPrefix+"defaultbutton "+m.classes.defaultButton:"",l+='<button class="'+m.classes.button+" "+e.currentPrefix+"button "+a,u.classes!==void 0&&(l+=" "+(t.isArray(u.classes)?u.classes.join(" "):u.classes)+" "),l+='" name="'+m.prefix+"_"+i+"_button"+u.title.replace(/[^a-z0-9]+/gi,"")+'" id="'+m.prefix+"_"+i+"_button"+u.title.replace(/[^a-z0-9]+/gi,"")+'" value="'+u.value+'">'+u.title+"</button>";return l+="</div></div>",p=t(l),p.on("impromptu:submit",n.submit),void 0!==o?x.find("#"+e.currentPrefix+"state_"+o).after(p):x.append(p),e.options.states[i]=n,p},e.removeState=function(t,i){var n=e.getState(t),o=function(){n.remove()};return 0===n.length?!1:("none"!==n.css("display")?void 0!==i&&e.getState(i).length>0?e.goToState(i,!1,o):n.next().length>0?e.nextState(o):n.prev().length>0?e.prevState(o):e.close():n.slideUp("slow",o),!0)},e.getState=function(i){return t("#"+e.currentPrefix+"state_"+i)},e.getStateContent=function(t){return e.getState(t)},e.getCurrentState=function(){return e.getState(e.getCurrentStateName())},e.getCurrentStateName=function(){return e.currentStateName},e.goToState=function(i,n,o){var s=(e.get(),e.options),a=e.getState(i),r=s.states[a.data("jqi-name")],u=new t.Event("impromptu:statechanging"),f=e.options;if(void 0!==r){if("function"==typeof r.html){var l=r.html;a.find("."+f.prefix+"message ").html(l())}"function"==typeof n&&(o=n,n=!1),e.jqib.trigger(u,[e.getCurrentStateName(),i]),!u.isDefaultPrevented()&&a.length>0&&(e.jqi.find("."+e.currentPrefix+"parentstate").removeClass(e.currentPrefix+"parentstate"),n?(e.jqi.find("."+e.currentPrefix+"substate").not(a).slideUp(s.promptspeed).removeClass("."+e.currentPrefix+"substate").find("."+e.currentPrefix+"arrow").hide(),e.jqi.find("."+e.currentPrefix+"state:visible").addClass(e.currentPrefix+"parentstate"),a.addClass(e.currentPrefix+"substate")):e.jqi.find("."+e.currentPrefix+"state").not(a).slideUp(s.promptspeed).find("."+e.currentPrefix+"arrow").hide(),e.currentStateName=r.name,a.slideDown(s.promptspeed,function(){var n=t(this);"string"==typeof r.focus?n.find(r.focus).eq(0).focus():n.find("."+e.currentPrefix+"defaultbutton").focus(),n.find("."+e.currentPrefix+"arrow").show(s.promptspeed),"function"==typeof o&&e.jqib.on("impromptu:statechanged",o),e.jqib.trigger("impromptu:statechanged",[i]),"function"==typeof o&&e.jqib.off("impromptu:statechanged",o)}),n||e.position())}return a},e.nextState=function(i){var n=t("#"+e.currentPrefix+"state_"+e.getCurrentStateName()).next();return n.length>0&&e.goToState(n.attr("id").replace(e.currentPrefix+"state_",""),i),n},e.prevState=function(i){var n=t("#"+e.currentPrefix+"state_"+e.getCurrentStateName()).prev();return n.length>0&&e.goToState(n.attr("id").replace(e.currentPrefix+"state_",""),i),n},e.close=function(i,n,o,s){e.timeout&&(clearTimeout(e.timeout),e.timeout=!1),e.jqib&&e.jqib.fadeOut("fast",function(){e.jqib.trigger("impromptu:close",[n,o,s]),e.jqib.remove(),t(window).off("resize",e.position)}),e.currentStateName=""},t.fn.prompt=function(i){void 0===i&&(i={}),void 0===i.withDataAndEvents&&(i.withDataAndEvents=!1),e(t(this).clone(i.withDataAndEvents).html(),i)},t.prompt=e,window.Impromptu=e}); \ No newline at end of file
diff --git a/jquery-impromptu.jquery.json b/jquery-impromptu.jquery.json
index 5b403a3..c36dfec 100644
--- a/jquery-impromptu.jquery.json
+++ b/jquery-impromptu.jquery.json
@@ -2,8 +2,8 @@
"name": "jquery-impromptu",
"title": "jQuery-Impromptu",
"description": "An extension to help provide a more pleasant way to spontaneously prompt a user for input.",
- "version": "5.2.6",
- "modified": "2014-09-01",
+ "version": "5.3.0",
+ "modified": "2014-11-16",
"homepage": "http://trentrichardson.com/Impromptu",
"author": {
"name": "Trent Richardson",