New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

zebra_dialog

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zebra_dialog - npm Package Compare versions

Comparing version 3.0.5 to 3.0.6

0

CHANGELOG.md

@@ -0,0 +0,0 @@ ## version 3.0.5 (August 18, 2020)

2

dist/zebra_dialog.min.js

@@ -1,1 +0,1 @@

!function(T){"use strict";T.Zebra_Dialog=function(){var _,h,f={animation_speed_hide:250,animation_speed_show:0,auto_close:!(this.version="3.0.4"),auto_focus_button:!0,buttons:!0,center_buttons:!1,custom_class:!1,default_value:"",disable_page_scrolling:!0,height:0,keyboard:!0,margin:0,max_height:0,max_width:450,message:"",modal:!0,backdrop_close:!0,backdrop_opacity:".9",position:"center",reposition_speed:500,show_close_button:!0,source:!1,title:"",type:"information",vcenter_short_message:!0,width:0,onClose:null},y=this,v={},D=!1,Z=!1,w=function(){var t,e,o,i,s,a=T(window).width(),n=T(window).height(),r=y.dialog.outerWidth(),l=y.dialog.outerHeight(),d=a<768,g=0,c=0;y.dialog_left=void 0,y.dialog_top=void 0,(s=(y.settings.margin+"").match(/^([0-9]+)(\%)?$/))&&(void 0!==s[2]?(g=parseInt(a*parseInt(s[1],10)/100,10),c=parseInt(n*parseInt(s[1],10)/100,10)):g=c=parseInt(s[1],10),isNaN(g)&&(g=c=0)),t={left:g,top:c,right:a-g-r,bottom:n-c-l,center:(a-r)/2,middle:(n-l)/2},T.isArray(y.settings.position)&&2===y.settings.position.length&&"string"==typeof y.settings.position[0]&&y.settings.position[0].match(/^(left|right|center)[\s0-9\+\-]*$/)&&"string"==typeof y.settings.position[1]&&y.settings.position[1].match(/^(top|bottom|middle|center)[\s0-9\+\-]*$/)&&(y.settings.position[0]=y.settings.position[0].toLowerCase(),y.settings.position[1]=y.settings.position[1].toLowerCase(),"center"===y.settings.position[1]&&(y.settings.position[1]="middle"),T.each(t,function(t,e){var o,i,s;for(o=0;o<2;o++)(i=(s=d?y.settings.position[o].replace(/[0-9\+\-\s]/g,""):y.settings.position[o]).replace(t,e))!==s&&(0===o?y.dialog_left=p(i):y.dialog_top=p(i))})),void 0!==y.dialog_left&&void 0!==y.dialog_top||(y.dialog_left=t.center,y.dialog_top=t.middle),y.dialog_top<c&&(y.dialog_top=c),n-2*c<l+c?y.body.css("height",n-2*c-(T(".ZebraDialog_Title",y.dialog).length?T(".ZebraDialog_Title",y.dialog).outerHeight():0)-(T(".ZebraDialog_Buttons",y.dialog).length?T(".ZebraDialog_Buttons",y.dialog).outerHeight():0)-(parseFloat(y.body.css("marginTop"))||0)-(parseFloat(y.body.css("marginBottom"))||0)-(parseFloat(y.body.css("paddingTop"))||0)-(parseFloat(y.body.css("paddingBottom"))||0)-(parseFloat(y.body.css("borderTopWidth"))||0)-(parseFloat(y.body.css("borderBottomWidth"))||0)):Z&&y.body.css("height",y.dialog.height()-(T(".ZebraDialog_Title",y.dialog).length?T(".ZebraDialog_Title",y.dialog).outerHeight():0)-(T(".ZebraDialog_Buttons",y.dialog).length?T(".ZebraDialog_Buttons",y.dialog).outerHeight():0)-(parseFloat(y.body.css("marginTop"))||0)-(parseFloat(y.body.css("marginBottom"))||0)-(parseFloat(y.body.css("paddingTop"))||0)-(parseFloat(y.body.css("paddingBottom"))||0)-(parseFloat(y.body.css("borderTopWidth"))||0)-(parseFloat(y.body.css("borderBottomWidth"))||0)),y.iframe&&y.body.css("overflow","hidden"),y.settings.vcenter_short_message&&(o=(e=y.body.find("div:first")).height())<(i=y.body.height())&&e.css("padding-top",(i-o)/2),"boolean"==typeof arguments[0]&&!1===arguments[0]||0===y.settings.reposition_speed?y.dialog.css({left:y.dialog_left,top:y.dialog_top,visibility:"visible",opacity:0}).animate({opacity:"1"},y.settings.animation_speed_show):(y.dialog.stop(!0),y.dialog.css("visibility","visible").animate({left:y.dialog_left,top:y.dialog_top},y.settings.reposition_speed)),void 0===_&&(!1!==y.settings.auto_focus_button?y.dialog.find("a[class^=ZebraDialog_Button]").eq(!0===y.settings.auto_focus_button?0:y.settings.auto_focus_button).focus():y.body.attr("tabindex",1).focus().removeAttr("tabindex"))},k=function(){switch(y.settings.type){case"confirmation":case"error":case"information":case"question":case"warning":case"prompt":return y.settings.type.charAt(0).toUpperCase()+y.settings.type.slice(1).toLowerCase();default:return!1}},p=function(t){var e=0;for(t=t.replace(/\s/g,"").match(/[+\-]?([0-9\.\s]+)/g)||[];t.length;)e+=parseFloat(t.shift());return e};return y.settings={},"string"==typeof arguments[0]&&(v.message=arguments[0]),"object"!=typeof arguments[0]&&"object"!=typeof arguments[1]||(v=T.extend(v,"object"==typeof arguments[0]?arguments[0]:arguments[1])),y.init=function(){var t,i,e,o,s,a,n,r,l,d,g,c,p,u,b=T("body"),m=0;if(y.settings=T.extend({},f,v),T(".ZebraDialog").each(function(){var t=parseInt(T(this).css("zIndex"),10);t&&m<t&&(m=t)}),y.settings.modal&&(y.backdrop=T("<div>",{"class":"ZebraDialogBackdrop"+(y.settings.custom_class?" "+y.settings.custom_class:"")}).css({position:"fixed",left:0,top:0,opacity:y.settings.backdrop_opacity+""}),0<m&&(y.backdrop.css("zIndex",m+1),T(".ZebraDialogBackdrop").each(function(){var t=T(this);t.data("ZebraDialog_opacity")||t.data("ZebraDialog_opacity",t.css("opacity")).css("opacity",0)}),T(".ZebraDialog").each(function(){T(this).data("ZebraDialog_MuteESC",!0)})),y.settings.backdrop_close&&y.backdrop.on("click",function(){y.close()}),y.backdrop.appendTo(b),y.settings.disable_page_scrolling&&window.innerWidth>document.body.clientWidth&&!b.hasClass("ZebraDialog_NoScroll")&&b.data("ZebraDialog_vScroll",window.pageYOffset).css({right:(c=T("<div>").css({visibility:"hidden",overflow:"scroll",msOverflowStyle:"scrollbar"}).appendTo(T("body")),p=T("<div>").appendTo(c),u=c.outerWidth()-p.outerWidth(),c.remove(),p.remove(),u),top:-1*T(window).scrollTop()}).addClass("ZebraDialog_NoScroll")),y.dialog=T("<div>",{"class":"ZebraDialog"+(y.settings.custom_class?" "+y.settings.custom_class:"")+(y.settings.modal?"":" ZebraDialog_NotModal")+(!1!==k()?" ZebraDialog_Icon ZebraDialog_"+k():"")}).css({position:"fixed",left:0,top:0,visibility:"hidden"}),0<m&&y.dialog.css("zIndex",m+1),h=Math.floor(9999999*Math.random()),(d=(y.settings.width+"").match(/^([0-9]+)(\%)?$/))&&(d=void 0!==d[2]?parseInt(Math.max(document.documentElement.clientWidth,window.innerWidth||0)*parseInt(d[1],10)/100,10):parseInt(d[1],10),!isNaN(d)&&0<d&&y.dialog.css("width",d)),(isNaN(d)||0===d)&&(d=(y.settings.max_width+"").match(/^([0-9]+)(\%)?$/))&&(d=void 0!==d[2]?parseInt(Math.max(document.documentElement.clientWidth,window.innerWidth||0)*parseInt(d[1],10)/100,10):parseInt(d[1],10),!isNaN(d)&&0<d&&y.dialog.css("max-width",d)),(d=(y.settings.height+"").match(/^([0-9]+)(\%)?$/))&&(d=void 0!==d[2]?parseInt(Math.max(document.documentElement.clientHeight,window.innerHeight||0)*parseInt(d[1],10)/100,10):parseInt(d[1],10),!isNaN(d)&&0<d&&(y.dialog.css("height",d),Z=!0)),(isNaN(d)||0===d)&&(d=(y.settings.max_height+"").match(/^([0-9]+)(\%)?$/))&&(d=void 0!==d[2]?parseInt(Math.max(document.documentElement.clientHeight,window.innerHeight||0)*parseInt(d[1],10)/100,10):parseInt(d[1],10),!isNaN(d)&&0<d&&(y.dialog.css("max-height",d),Z=!0)),y.settings.title?l=T("<h3>",{"class":"ZebraDialog_Title"}).html(y.settings.title).appendTo(y.dialog):y.dialog.addClass("ZebraDialog_NoTitle"),void 0!==y.settings.source.iframe&&(y.settings.vcenter_short_message=!1),y.body=T("<div>",{"class":"ZebraDialog_Body"}),"prompt"===y.settings.type&&(y.settings.message+='<input type="text" name="ZebraDialog_Prompt_Input" value="'+y.settings.default_value+'" class="ZebraDialog_Prompt_Input">'),y.settings.vcenter_short_message?T("<div>").html(y.settings.message).appendTo(y.body):y.body.html(y.settings.message),"prompt"===y.settings.type&&(y.settings.message=T(".ZebraDialog_Prompt_Input",y.body),T(".ZebraDialog_Prompt_Input",y.body).on("keypress",function(t){13===t.keyCode&&(D?D.trigger("click"):y.close(!0,this.value))})),y.settings.source&&"object"==typeof y.settings.source)for(g in o=y.settings.vcenter_short_message?T("div:first",y.body):y.body,y.settings.source)switch(g){case"ajax":t="string"==typeof y.settings.source[g]?{url:y.settings.source[g]}:y.settings.source[g],r=T("<div>").attr("class","ZebraDialog_Spinner").appendTo(o),t.success=function(t){r.remove(),o.append(t),w(!1)},T.ajax(t);break;case"iframe":s={width:"100%",height:"100%",marginheight:"0",marginwidth:"0",frameborder:"0"},a=T.extend(s,"string"==typeof y.settings.source[g]?{src:y.settings.source[g]}:y.settings.source[g]),y.iframe=T("<iframe>").attr(a).on("load",function(){T(".ZebraDialog_Spinner",y.body).remove()}),y.body.append(T("<div>").addClass("ZebraDialog_Spinner ZebraDialog_iFrame")),o.append(y.iframe);break;case"inline":o.append(y.settings.source[g])}return y.body.appendTo(y.dialog),(e=function(){if(!0!==y.settings.buttons&&!T.isArray(y.settings.buttons))return!1;if(!0===y.settings.buttons)switch(y.settings.type){case"question":case"warning":case"prompt":y.settings.buttons=["Ok","Cancel"];break;default:y.settings.buttons=["Ok"]}return y.settings.buttons}())?(i=T("<div>",{"class":"ZebraDialog_Buttons"}).appendTo(y.dialog),T.each(e,function(t,o){var e=T("<a>",{href:"javascript:void(0)","class":"ZebraDialog_Button_"+t+(void 0!==o.custom_class&&""!==o.custom_class.toString().trim()?" "+o.custom_class:"")});void 0!==o.caption?e.html(o.caption):e.html(o),e.on("click",function(){var t=!0,e="prompt"===y.settings.type&&T(".ZebraDialog_Prompt_Input",y.body).length?T(".ZebraDialog_Prompt_Input",y.body).val():void 0;void 0!==o.callback&&(t=o.callback(y.dialog,e)),!1!==t&&y.close(void 0!==o.caption?o.caption:o,e)}),e.appendTo(i),void 0!==o.default_confirmation&&o.default_confirmation&&(D=e)}),y.settings.center_buttons&&i.addClass("ZebraDialog_Buttons_Centered")):y.dialog.addClass("ZebraDialog_NoButtons"),y.dialog.appendTo(b),y.settings.show_close_button?T('<a href="javascript:void(0)" class="ZebraDialog_Close">&times;</a>').on("click",function(t){t.preventDefault(),y.close()}).appendTo(l||y.body):y.dialog.addClass("ZebraDialog_NoCloseButton"),T(window).on("resize.ZebraDialog_"+h,function(){clearTimeout(_),_=setTimeout(function(){w()},100)}),y.settings.keyboard&&T(document).on("keyup.ZebraDialog_"+h,function(t){if(!y.dialog.data("ZebraDialog_MuteESC"))return 27===t.which&&y.close(),!0}),!1!==y.settings.auto_close&&(y.dialog.on("click",function(){clearTimeout(y.timeout),y.close()}),y.timeout=setTimeout(y.close,y.settings.auto_close)),w(!1),"prompt"===y.settings.type&&(T(".ZebraDialog_Prompt_Input",y.body).focus(),""!==y.settings.default_value&&(y.settings.message.get(0).setSelectionRange?(n=2*y.settings.default_value.length,setTimeout(function(){y.settings.message.get(0).setSelectionRange(n,n)},1)):y.settings.message.val(y.settings.default_value))),y},y.close=function(t,e){var o,i=y.settings.animation_speed_hide,s=T(".ZebraDialogBackdrop"),a=T(".ZebraDialog"),n=T("body"),r=s.length;T(document).off(".ZebraDialog_"+h),T(window).off(".ZebraDialog_"+h),y.settings.modal&&y.backdrop&&(1<r&&T(s[r-1]).is(y.backdrop)?((o=T(s[r-2])).css("opacity",o.data("ZebraDialog_opacity")).removeData("ZebraDialog_opacity"),i=0,T(a[r-2]).removeData("ZebraDialog_MuteESC")):1===r&&n.hasClass("ZebraDialog_NoScroll")&&(n.removeClass("ZebraDialog_NoScroll").css({right:"",top:"",height:""}),T(window).scrollTop(n.data("ZebraDialog_vScroll"))),y.backdrop.off("click").animate({opacity:"0"},i,function(){y.backdrop.remove()})),y.dialog.animate({top:"0",opacity:"0"},y.settings.animation_speed_hide,function(){y.dialog.remove(),y.settings.onClose&&"function"==typeof y.settings.onClose&&y.settings.onClose(void 0!==t?t:"",e)})},y.update=function(){clearTimeout(_),_=setTimeout(function(){w()},100)},y.init()}}(jQuery);
!function(D){"use strict";D.Zebra_Dialog=function(){var p,u,b={animation_speed_hide:250,animation_speed_show:0,auto_close:!(this.version="3.0.5"),auto_focus_button:!0,buttons:!0,center_buttons:!1,custom_class:!1,default_value:"",disable_page_scrolling:!0,height:0,keyboard:!0,margin:0,max_height:0,max_width:450,message:"",modal:!0,backdrop_close:!0,backdrop_opacity:".9",position:"center",reposition_speed:500,show_close_button:!0,source:!1,title:"",type:"information",vcenter_short_message:!0,width:0,onClose:null},m=this,_={},h=!1,f=!1,y=function(){var t,e=D(window).width(),o=D(window).height(),i=m.dialog.outerWidth(),s=m.dialog.outerHeight(),a=e<768,n=0,r=0;m.dialog_left=undefined,m.dialog_top=undefined,t={left:n=(t=(m.settings.margin+"").match(/^([0-9]+)(\%)?$/))&&(undefined!==t[2]?(n=parseInt(e*parseInt(t[1],10)/100,10),r=parseInt(o*parseInt(t[1],10)/100,10)):n=r=parseInt(t[1],10),isNaN(n))?r=0:n,top:r,right:e-n-i,bottom:o-r-s,center:(e-i)/2,middle:(o-s)/2},D.isArray(m.settings.position)&&2===m.settings.position.length&&"string"==typeof m.settings.position[0]&&m.settings.position[0].match(/^(left|right|center)[\s0-9\+\-]*$/)&&"string"==typeof m.settings.position[1]&&m.settings.position[1].match(/^(top|bottom|middle|center)[\s0-9\+\-]*$/)&&(m.settings.position[0]=m.settings.position[0].toLowerCase(),m.settings.position[1]=m.settings.position[1].toLowerCase(),"center"===m.settings.position[1]&&(m.settings.position[1]="middle"),D.each(t,function(t,e){for(var o,i,s=0;s<2;s++)(o=(i=a?m.settings.position[s].replace(/[0-9\+\-\s]/g,""):m.settings.position[s]).replace(t,e))!==i&&(0===s?m.dialog_left=d(o):m.dialog_top=d(o))})),undefined!==m.dialog_left&&undefined!==m.dialog_top||(m.dialog_left=t.center,m.dialog_top=t.middle),m.dialog_top<r&&(m.dialog_top=r),o-2*r<s+r?m.body.css("height",o-2*r-(D(".ZebraDialog_Title",m.dialog).length?D(".ZebraDialog_Title",m.dialog).outerHeight():0)-(D(".ZebraDialog_Buttons",m.dialog).length?D(".ZebraDialog_Buttons",m.dialog).outerHeight():0)-(parseFloat(m.body.css("marginTop"))||0)-(parseFloat(m.body.css("marginBottom"))||0)-(parseFloat(m.body.css("paddingTop"))||0)-(parseFloat(m.body.css("paddingBottom"))||0)-(parseFloat(m.body.css("borderTopWidth"))||0)-(parseFloat(m.body.css("borderBottomWidth"))||0)):f&&m.body.css("height",m.dialog.height()-(D(".ZebraDialog_Title",m.dialog).length?D(".ZebraDialog_Title",m.dialog).outerHeight():0)-(D(".ZebraDialog_Buttons",m.dialog).length?D(".ZebraDialog_Buttons",m.dialog).outerHeight():0)-(parseFloat(m.body.css("marginTop"))||0)-(parseFloat(m.body.css("marginBottom"))||0)-(parseFloat(m.body.css("paddingTop"))||0)-(parseFloat(m.body.css("paddingBottom"))||0)-(parseFloat(m.body.css("borderTopWidth"))||0)-(parseFloat(m.body.css("borderBottomWidth"))||0)),m.iframe&&m.body.css("overflow","hidden"),m.settings.vcenter_short_message&&(e=(n=m.body.find("div:first")).height())<(i=m.body.height())&&n.css("padding-top",(i-e)/2),"boolean"==typeof arguments[0]&&!1===arguments[0]||0===m.settings.reposition_speed?m.dialog.css({left:m.dialog_left,top:m.dialog_top,visibility:"visible",opacity:0}).animate({opacity:"1"},m.settings.animation_speed_show):(m.dialog.stop(!0),m.dialog.css("visibility","visible").animate({left:m.dialog_left,top:m.dialog_top},m.settings.reposition_speed)),undefined===p&&(!1!==m.settings.auto_focus_button?m.dialog.find("a[class^=ZebraDialog_Button]").eq(!0===m.settings.auto_focus_button?0:m.settings.auto_focus_button).focus():m.body.attr("tabindex",1).focus().removeAttr("tabindex"))},v=function(){switch(m.settings.type){case"confirmation":case"error":case"information":case"question":case"warning":case"prompt":return m.settings.type.charAt(0).toUpperCase()+m.settings.type.slice(1).toLowerCase();default:return!1}},d=function(t){var e=0;for(t=t.replace(/\s/g,"").match(/[+\-]?([0-9\.\s]+)/g)||[];t.length;)e+=parseFloat(t.shift());return e};return m.settings={},"string"==typeof arguments[0]&&(_.message=arguments[0]),"object"!=typeof arguments[0]&&"object"!=typeof arguments[1]||(_=D.extend(_,"object"==typeof arguments[0]?arguments[0]:arguments[1])),m.init=function(){var e,o,t,i,s,a,n,r,d,l,g=D("body"),c=0;if(m.settings=D.extend({},b,_),D(".ZebraDialog").each(function(){var t=parseInt(D(this).css("zIndex"),10);t&&c<t&&(c=t)}),m.settings.modal&&(m.backdrop=D("<div>",{"class":"ZebraDialogBackdrop"+(m.settings.custom_class?" "+m.settings.custom_class:"")}).css({position:"fixed",left:0,top:0,opacity:m.settings.backdrop_opacity+""}),0<c&&(m.backdrop.css("zIndex",c+1),D(".ZebraDialogBackdrop").each(function(){var t=D(this);t.data("ZebraDialog_opacity")||t.data("ZebraDialog_opacity",t.css("opacity")).css("opacity",0)}),D(".ZebraDialog").each(function(){D(this).data("ZebraDialog_MuteESC",!0)})),m.settings.backdrop_close&&m.backdrop.on("click",function(){m.close()}),m.backdrop.appendTo(g),m.settings.disable_page_scrolling)&&window.innerWidth>document.body.clientWidth&&!g.hasClass("ZebraDialog_NoScroll")&&g.data("ZebraDialog_vScroll",window.pageYOffset).css({right:(r=D("<div>").css({visibility:"hidden",overflow:"scroll",msOverflowStyle:"scrollbar"}).appendTo(D("body")),d=D("<div>").appendTo(r),l=r.outerWidth()-d.outerWidth(),r.remove(),d.remove(),l),top:-1*D(window).scrollTop()}).addClass("ZebraDialog_NoScroll"),m.dialog=D("<div>",{"class":"ZebraDialog"+(m.settings.custom_class?" "+m.settings.custom_class:"")+(m.settings.modal?"":" ZebraDialog_NotModal")+(!1!==v()?" ZebraDialog_Icon ZebraDialog_"+v():"")}).css({position:"fixed",left:0,top:0,visibility:"hidden"}),0<c&&m.dialog.css("zIndex",c+1),u=Math.floor(9999999*Math.random()),(r=(m.settings.width+"").match(/^([0-9]+)(\%)?$/))&&(r=undefined!==r[2]?parseInt(Math.max(document.documentElement.clientWidth,window.innerWidth||0)*parseInt(r[1],10)/100,10):parseInt(r[1],10),!isNaN(r))&&0<r&&m.dialog.css("width",r),(isNaN(r)||0===r)&&(r=(m.settings.max_width+"").match(/^([0-9]+)(\%)?$/))&&(r=undefined!==r[2]?parseInt(Math.max(document.documentElement.clientWidth,window.innerWidth||0)*parseInt(r[1],10)/100,10):parseInt(r[1],10),!isNaN(r))&&0<r&&m.dialog.css("max-width",r),(r=(m.settings.height+"").match(/^([0-9]+)(\%)?$/))&&(r=undefined!==r[2]?parseInt(Math.max(document.documentElement.clientHeight,window.innerHeight||0)*parseInt(r[1],10)/100,10):parseInt(r[1],10),!isNaN(r))&&0<r&&(m.dialog.css("height",r),f=!0),(isNaN(r)||0===r)&&(r=(m.settings.max_height+"").match(/^([0-9]+)(\%)?$/))&&(r=undefined!==r[2]?parseInt(Math.max(document.documentElement.clientHeight,window.innerHeight||0)*parseInt(r[1],10)/100,10):parseInt(r[1],10),!isNaN(r))&&0<r&&(m.dialog.css("max-height",r),f=!0),m.settings.title?a=D("<h3>",{"class":"ZebraDialog_Title"}).html(m.settings.title).appendTo(m.dialog):m.dialog.addClass("ZebraDialog_NoTitle"),undefined!==m.settings.source.iframe&&(m.settings.vcenter_short_message=!1),m.body=D("<div>",{"class":"ZebraDialog_Body"}),"prompt"===m.settings.type&&(m.settings.message+='<input type="text" name="ZebraDialog_Prompt_Input" value="'+m.settings.default_value+'" class="ZebraDialog_Prompt_Input">'),m.settings.vcenter_short_message?D("<div>").html(m.settings.message).appendTo(m.body):m.body.html(m.settings.message),"prompt"===m.settings.type&&(m.settings.message=D(".ZebraDialog_Prompt_Input",m.body),D(".ZebraDialog_Prompt_Input",m.body).on("keypress",function(t){13===t.keyCode&&(h?h.trigger("click"):m.close(!0,this.value))})),m.settings.source&&"object"==typeof m.settings.source)for(n in o=m.settings.vcenter_short_message?D("div:first",m.body):m.body,m.settings.source)switch(n){case"ajax":t="string"==typeof m.settings.source[n]?{url:m.settings.source[n]}:m.settings.source[n],s=D("<div>").attr("class","ZebraDialog_Spinner").appendTo(o),t.success=function(t){s.remove(),o.append(t),y(!1)},D.ajax(t);break;case"iframe":t=D.extend({width:"100%",height:"100%",marginheight:"0",marginwidth:"0",frameborder:"0"},"string"==typeof m.settings.source[n]?{src:m.settings.source[n]}:m.settings.source[n]),m.iframe=D("<iframe>").attr(t).on("load",function(){D(".ZebraDialog_Spinner",m.body).remove()}),m.body.append(D("<div>").addClass("ZebraDialog_Spinner ZebraDialog_iFrame")),o.append(m.iframe);break;case"inline":o.append(m.settings.source[n])}return m.body.appendTo(m.dialog),(d=function(){if(!0!==m.settings.buttons&&!D.isArray(m.settings.buttons))return!1;if(!0===m.settings.buttons)switch(m.settings.type){case"question":case"warning":case"prompt":m.settings.buttons=["Ok","Cancel"];break;default:m.settings.buttons=["Ok"]}return m.settings.buttons}())?(e=D("<div>",{"class":"ZebraDialog_Buttons"}).appendTo(m.dialog),D.each(d,function(t,o){t=D("<a>",{href:"javascript:void(0)","class":"ZebraDialog_Button_"+t+(undefined!==o.custom_class&&""!==o.custom_class.toString().trim()?" "+o.custom_class:"")});undefined!==o.caption?t.html(o.caption):t.html(o),t.on("click",function(){var t=!0,e="prompt"===m.settings.type&&D(".ZebraDialog_Prompt_Input",m.body).length?D(".ZebraDialog_Prompt_Input",m.body).val():undefined;!1!==(t=undefined!==o.callback?o.callback(m.dialog,e):t)&&m.close(undefined!==o.caption?o.caption:o,e)}),t.appendTo(e),undefined!==o.default_confirmation&&o.default_confirmation&&(h=t)}),m.settings.center_buttons&&e.addClass("ZebraDialog_Buttons_Centered")):m.dialog.addClass("ZebraDialog_NoButtons"),m.dialog.appendTo(g),m.settings.show_close_button?D('<a href="javascript:void(0)" class="ZebraDialog_Close">&times;</a>').on("click",function(t){t.preventDefault(),m.close()}).appendTo(a||m.body):m.dialog.addClass("ZebraDialog_NoCloseButton"),D(window).on("resize.ZebraDialog_"+u,function(){clearTimeout(p),p=setTimeout(function(){y()},100)}),m.settings.keyboard&&D(document).on("keyup.ZebraDialog_"+u,function(t){if(!m.dialog.data("ZebraDialog_MuteESC"))return 27===t.which&&m.close(),!0}),!1!==m.settings.auto_close&&(m.dialog.on("click",function(){clearTimeout(m.timeout),m.close()}),m.timeout=setTimeout(m.close,m.settings.auto_close)),y(!1),"prompt"===m.settings.type&&(D(".ZebraDialog_Prompt_Input",m.body).focus(),""!==m.settings.default_value)&&(m.settings.message.get(0).setSelectionRange?(i=2*m.settings.default_value.length,setTimeout(function(){m.settings.message.get(0).setSelectionRange(i,i)},1)):m.settings.message.val(m.settings.default_value)),m},m.close=function(t,e){var o=m.settings.animation_speed_hide,i=D(".ZebraDialogBackdrop"),s=D(".ZebraDialog"),a=D("body"),n=i.length;D(document).off(".ZebraDialog_"+u),D(window).off(".ZebraDialog_"+u),m.settings.modal&&m.backdrop&&(1<n&&D(i[n-1]).is(m.backdrop)?((i=D(i[n-2])).css("opacity",i.data("ZebraDialog_opacity")).removeData("ZebraDialog_opacity"),o=0,D(s[n-2]).removeData("ZebraDialog_MuteESC")):1===n&&a.hasClass("ZebraDialog_NoScroll")&&(a.removeClass("ZebraDialog_NoScroll").css({right:"",top:"",height:""}),D(window).scrollTop(a.data("ZebraDialog_vScroll"))),m.backdrop.off("click").animate({opacity:"0"},o,function(){m.backdrop.remove()})),m.dialog.animate({top:"0",opacity:"0"},m.settings.animation_speed_hide,function(){m.dialog.remove(),m.settings.onClose&&"function"==typeof m.settings.onClose&&m.settings.onClose(undefined!==t?t:"",e)})},m.update=function(){clearTimeout(p),p=setTimeout(function(){y()},100)},m.init()}}(jQuery);

@@ -0,0 +0,0 @@ $(document).ready(function() {

@@ -0,0 +0,0 @@ ### GNU LESSER GENERAL PUBLIC LICENSE

{
"name": "zebra_dialog",
"description": "A small, compact, and highly configurable dialog box plugin for jQuery meant to replace JavaScript's native alert and confirmation windows",
"description": "A small, compact, and highly configurable jQuery plugin for creating beautiful modal dialog boxes",
"author": {

@@ -15,3 +15,3 @@ "name": "Stefan Gabos",

"license": "LGPL-3.0",
"version": "3.0.5",
"version": "3.0.6",
"keywords": [

@@ -32,10 +32,11 @@ "jquery-plugin",

"devDependencies": {
"grunt": "^1.2.1",
"grunt-cli": "^1.3.2",
"ansi-regex": ">=6.0.1",
"grunt": "^1.5.3",
"grunt-cli": "^1.4.3",
"grunt-contrib-copy": "*",
"grunt-contrib-cssmin": "^2.2.1",
"grunt-contrib-jshint": "^2.1.0",
"grunt-contrib-uglify": "^3.4.0",
"grunt-contrib-cssmin": "^3.0.0",
"grunt-contrib-jshint": "^3.2.0",
"grunt-contrib-uglify": "^4.0.1",
"grunt-contrib-watch": "*",
"grunt-eslint": "^22.0.0",
"grunt-eslint": "^24.0.0",
"grunt-includes": "*",

@@ -45,5 +46,6 @@ "grunt-newer": "*",

"grunt-sass": "^3.1.0",
"node-sass": "^4.14.1",
"json-schema": ">=0.4.0",
"sass": "*",
"time-grunt": "^2.0.0"
}
}
<img src="https://raw.githubusercontent.com/stefangabos/zebrajs/master/docs/images/logo.png" alt="zebrajs" align="right">
# Zebra Dialog &nbsp;[![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Zebra_Dialog%20-%20a%20small,%20compact%20and%20highly%20configurable%20jQuery%20plugin%20for%20creating%20responsive%20modal%20dialog%20boxes&url=https://github.com/stefangabos/Zebra_Dialog&via=stefangabos&hashtags=jquery,dialog,notifications,alert,modal,javascript)
# Zebra Dialog &nbsp;[![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=A+small,+compact,+mobile-friendly+and+highly+configurable+jQuery+plugin+for+creating+responsive+modal+dialog+boxes&url=https://github.com/stefangabos/Zebra_Dialog&via=stefangabos&hashtags=jquery,dialog,notifications,alert,modal,javascript)

@@ -33,3 +33,3 @@ *A small, compact, mobile-friendly and highly configurable jQuery plugin for creating responsive modal dialog boxes*

For the [classic theme](https://stefangabos.github.io/Zebra_Dialog/index.html), the icons used for *confirmation*, *information*, *error* and *question* dialog boxes are made by [DryIcon](http://dryicons.com/free-icons/preview/aesthetica/) while the *warning* icon is made by [Function Design & Development Studio](http://wefunction.com/2008/07/function-free-icon-set/).
For the [classic theme](https://stefangabos.github.io/Zebra_Dialog/index.html), the icons used for *confirmation*, *information*, *error* and *question* dialog boxes are made by [DryIcon](http://dryicons.com/free-icons/preview/aesthetica/) while the *warning* icon is made by Function Design & Development Studio (website is not online anymore).

@@ -40,2 +40,11 @@ For the [flat theme](https://stefangabos.github.io/Zebra_Dialog/flat.html), the icons used are made by [Elegant Themes](http://www.elegantthemes.com/blog/freebie-of-the-week/beautiful-flat-icons-for-free)

## 🎂 Support the development of this project
Your support means a lot and it keeps me motivated to keep working on open source projects.<br>
If you like this project please ⭐ it by clicking on the star button at the top of the page.<br>
If you are feeling generous, you can buy me a coffee by donating through PayPal, or you can become a sponsor.<br>
Either way - **Thank you!** 🎉
[<img src="https://img.shields.io/github/stars/stefangabos/zebra_dialog?color=green&label=star%20it%20on%20GitHub" width="132" height="20" alt="Star it on GitHub">](https://github.com/stefangabos/Zebra_Dialog) [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RKMCMRZB493LY) [<img src="https://img.shields.io/badge/-Sponsor-fafbfc?logo=GitHub%20Sponsors">](https://github.com/sponsors/stefangabos)
## Demo

@@ -521,6 +530,2 @@

## Support the development of this project
[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RKMCMRZB493LY)
## Sponsors

@@ -527,0 +532,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc