1/* jQuery Alert Dialogs Plugin 2 * 3 * Version 1.2 4 * (c) 2014 by R. Parcinski (http://www.rpa-com.de) 5 * 6 * Cory S.N. LaViska 7 * A Beautiful Site (http://abeautifulsite.net/) 8 * 14 May 2009 9 * 10 * Visit http://abeautifulsite.net/notebook/87 for more information 11 * 12 * License: 13 * 14 * This plugin is dual-licensed under the GNU General Public License and the MIT License and 15 * is copyright 2008 A Beautiful Site, LLC. 16 */ 17(function(e){e.alerts={verticalOffset:-75,horizontalOffset:0,repositionOnResize:true,overlayOpacity:.01,overlayColor:"#FFF",draggable:true,okButton:"OK",cancelButton:"Cancel",dialogClass:null,alert:function(t,n,r,i){if(n==null)n="Alert";if(i==null)i="alert";e.alerts._show(n,t,null,i,function(e){if(r)r(e)})},confirm:function(t,n,r,i,s){if(n==null)n="Confirm";if(i!=null)e.alerts.okButton=i;if(s!=null)e.alerts.cancelButton=s;e.alerts._show(n,t,null,"confirm",function(e){if(r)r(e)})},prompt:function(t,n,r,i){if(r==null)r="Prompt";e.alerts._show(r,t,n,"prompt",function(e){if(i)i(e)})},_show:function(t,n,r,i,s){e.alerts._hide();e.alerts._overlay("show");e("BODY").append('<div id="js_popup_container">'+'<h1 id="js_popup_title"></h1>'+'<div id="js_popup_content">'+'<div id="js_popup_message"></div>'+"</div>"+"</div>");if(e.alerts.dialogClass)e("#js_popup_container").addClass(e.alerts.dialogClass);var o=e.browser.msie&&parseInt(e.browser.version)<=6?"absolute":"fixed";e("#js_popup_container").css({position:o,zIndex:99999,padding:0,margin:0});e("#js_popup_title").text(t);e("#js_popup_content").addClass(i);e("#js_popup_message").text(n);e("#js_popup_message").html(e("#js_popup_message").text().replace(/\n/g,"<br />"));e("#js_popup_container").css({minWidth:e("#js_popup_container").outerWidth(),maxWidth:e("#js_popup_container").outerWidth()});e.alerts._reposition();e.alerts._maintainPosition(true);switch(i){case"alert":case"alert_error":e("#js_popup_message").after('<div id="js_popup_panel"><input type="button" value="'+e.alerts.okButton+'" id="js_popup_ok" /></div>');e("#js_popup_ok").click(function(){e.alerts._hide();s(true)});break;case"confirm":e("#js_popup_message").after('<div id="js_popup_panel"><input type="button" value="'+e.alerts.okButton+'" id="js_popup_ok" /> <input type="button" value="'+e.alerts.cancelButton+'" id="js_popup_cancel" /></div>');e("#js_popup_ok").click(function(){e.alerts._hide();if(s)s(true)});e("#js_popup_cancel").click(function(){e.alerts._hide();if(s)s(false)});e("#js_popup_ok").focus();e("#js_popup_ok, #js_popup_cancel").keypress(function(t){if(t.keyCode==13)e("#js_popup_ok").trigger("click");if(t.keyCode==27)e("#js_popup_cancel").trigger("click")});break;case"prompt":e("#js_popup_message").append('<br /><input type="text" size="30" id="js_popup_prompt" />').after('<div id="js_popup_panel"><input type="button" value="'+e.alerts.okButton+'" id="js_popup_ok" /> <input type="button" value="'+e.alerts.cancelButton+'" id="js_popup_cancel" /></div>');e("#js_popup_prompt").width(e("#js_popup_message").width());e("#js_popup_ok").click(function(){var t=e("#js_popup_prompt").val();e.alerts._hide();if(s)s(t)});e("#js_popup_cancel").click(function(){e.alerts._hide();if(s)s(null)});e("#js_popup_prompt, #js_popup_ok, #js_popup_cancel").keypress(function(t){if(t.keyCode==13)e("#js_popup_ok").trigger("click");if(t.keyCode==27)e("#js_popup_cancel").trigger("click")});if(r)e("#js_popup_prompt").val(r);e("#js_popup_prompt").focus().select();break}if(e.alerts.draggable){try{e("#js_popup_container").draggable({handle:e("#js_popup_title")});e("#js_popup_title").css({cursor:"move"})}catch(u){}}},_hide:function(){e("#js_popup_container").remove();e.alerts._overlay("hide");e.alerts._maintainPosition(false)},_overlay:function(t){switch(t){case"show":e.alerts._overlay("hide");e("BODY").append('<div id="js_popup_overlay"></div>');e("#js_popup_overlay").css({position:"absolute",zIndex:99998,top:"0px",left:"0px",width:"100%",height:e(document).height(),background:e.alerts.overlayColor,opacity:e.alerts.overlayOpacity});break;case"hide":e("#js_popup_overlay").remove();break}},_reposition:function(){var t=e(window).height()/2-e("#js_popup_container").outerHeight()/2+e.alerts.verticalOffset;var n=e(window).width()/2-e("#js_popup_container").outerWidth()/2+e.alerts.horizontalOffset;if(t<0)t=0;if(n<0)n=0;if(e.browser.msie&&parseInt(e.browser.version)<=6)t=t+e(window).scrollTop();e("#js_popup_container").css({top:t+"px",left:n+"px"});e("#js_popup_overlay").height(e(document).height())},_maintainPosition:function(t){if(e.alerts.repositionOnResize){switch(t){case true:e(window).bind("resize",e.alerts._reposition);break;case false:e(window).unbind("resize",e.alerts._reposition);break}}}};jAlert=function(t,n,r){e.alerts.alert(t,n,r)};jAlertError=function(t,n,r){e.alerts.alert(t,n,r,"alert_error")};jConfirm=function(t,n,r,i,s){e.alerts.confirm(t,n,r,i,s)};jPrompt=function(t,n,r,i){e.alerts.prompt(t,n,r,i)}})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.