-
Notifications
You must be signed in to change notification settings - Fork 0
/
jquery.dirtyforms.dialogs.pnotify.min.js.map
1 lines (1 loc) · 8.96 KB
/
jquery.dirtyforms.dialogs.pnotify.min.js.map
1
{"version":3,"sources":["jquery.dirtyforms.dialogs.pnotify.min.js"],"names":["$","window","document","undefined","modal_overlay","notice","isPN1","PNotify","DirtyForms","dialog","title","class","proceedButtonText","stayButtonText","styling","width","open","choice","message","ignoreClass","content","extend","this","hide","confirm","align","buttons","text","addClass","history","addclass","stack","dir1","dir2","modal","closer","sticker","animate","before_open","get","css","top","height","left","fadeIn","display","position","bottom","right","appendTo","pnotify","bindEnterKey","proceedSelector","staySelector","isDF1","close","decision","e","type","which","remove","fadeOut","decidingCancel","keydown","click","decidingContinue","fire","bind","stash","refire","selector","jQuery"],"mappings":";;;;;CAMA,SAAUA,EAAGC,EAAQC,EAAUC,GAQ3B,GAAIC,GACAC,EACAC,EAA2B,kBAAZC,QAEnBP,GAAEQ,WAAWC,QAGTC,MAAO,oCACPC,QAAO,eACPC,kBAAmB,kBACnBC,eAAgB,YAChBC,QAAS,aACTC,MAAO,MAGPC,KAAM,SAAUC,EAAQC,EAASC,GAC7B,GAAIC,GAAUpB,EAAEqB,QAAO,MACnBX,MAAOY,KAAKZ,MACZa,MAAM,EACNT,QAASQ,KAAKR,QACdC,MAAOO,KAAKP,MAGZS,SACIA,SAAS,EACTC,MAAO,SACPC,UAEQC,KAAML,KAAKV,kBACXgB,SAAU,iBAAmBT,IAG7BQ,KAAML,KAAKT,eACXe,SAAU,cAAgBT,KAKtCU,SACIA,SAAS,GAGbC,SAAU,eAAiBR,KAAAA,SAC3BS,OAASC,KAAQ,OAAQC,KAAQ,QAASC,OAAS,GAGnDR,SACIS,QAAQ,EACRC,SAAS,GAGbD,QAAQ,EACRC,SAAS,EAKTC,QAASf,KAAKe,UAAYlC,EAAYA,EAAYmB,KAAKe,QAEvDV,KAAOrB,EACH,gBAAkBgB,KAAAA,SAAa,QACnBJ,EAAU,iHAE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C,MAAO,WACH,OAAO,GAEXC,OAAQ,WACJ,OAAO,GAEXC,SAAU,UAGfC,OAAQtE,OAAQC","file":"jquery.dirtyforms.dialogs.pnotify.min.js","sourceRoot":"/","sourcesContent":["/*!\nPNotify dialog module (for jQuery Dirty Forms) | v2.0.0 | github.com/snikch/jquery.dirtyforms\n(c) 2015 Shad Storhaug\nLicense MIT\n*/\n\n(function($, window, document, undefined) {\n // Can't use ECMAScript 5's strict mode because several apps \n // including ASP.NET trace the stack via arguments.caller.callee \n // and Firefox dies if you try to trace through \"use strict\" call chains. \n // See jQuery issue (#13335)\n // Support: Firefox 18+\n //\"use strict\";\n\n var modal_overlay,\n notice,\n isPN1 = typeof PNotify !== 'function';\n\n $.DirtyForms.dialog = {\n\n // Custom properties and methods to allow overriding (may differ per dialog)\n title: 'Are you sure you want to do that?',\n class: 'dirty-dialog',\n proceedButtonText: 'Leave This Page',\n stayButtonText: 'Stay Here',\n styling: 'bootstrap3',\n width: '330',\n\n // Typical Dirty Forms Properties and Methods\n open: function (choice, message, ignoreClass) {\n var content = $.extend(true, {}, {\n title: this.title,\n hide: false,\n styling: this.styling,\n width: this.width,\n\n // 3.x and 2.x confirm buttons\n confirm: {\n confirm: true,\n align: 'center',\n buttons: [\n {\n text: this.proceedButtonText,\n addClass: 'dirty-proceed ' + ignoreClass\n },\n {\n text: this.stayButtonText,\n addClass: 'dirty-stay ' + ignoreClass\n }\n ]\n },\n // 3.x don't use history\n history: {\n history: false\n },\n // 3.x modal dialog\n addclass: 'stack-modal ' + this.class,\n stack: { 'dir1': 'down', 'dir2': 'right', 'modal': true },\n\n // 3.x and 2.x hide closer and sticker\n buttons: {\n closer: false,\n sticker: false\n },\n // 1.x hide closer and sticker\n closer: false,\n sticker: false,\n\n // NOTE: Animate does not seem to work in 3.x in conjunction with confirm,\n // but this is being added so the settings can be supplied externally should\n // this issue be fixed. https://github.com/sciactive/pnotify/issues/224\n animate: this.animate === undefined ? undefined : this.animate,\n\n text: !isPN1 ? message :\n '<span class=\"' + this.class + '\">' +\n '<p>' + message + '</p>' +\n '<span style=\"display:block;text-align:center;\">' +\n '<button type=\"button\" class=\"btn btn-default dirty-proceed ' + ignoreClass + '\">' + this.proceedButtonText + '</button> ' +\n '<button type=\"button\" class=\"btn btn-default dirty-stay ' + ignoreClass + '\">' + this.stayButtonText + '</button>' +\n '</span>' +\n '</span>',\n\n // Not supported in 3.x\n before_open: function (PNotify) {\n if (!isPN1) {\n // Position this notice in the center of the screen.\n PNotify.get().css({\n \"top\": ($(window).height() / 2) - (PNotify.get().height() / 2),\n \"left\": ($(window).width() / 2) - (PNotify.get().width() / 2)\n });\n }\n\n // Make a modal screen overlay.\n if (modal_overlay) modal_overlay.fadeIn(\"fast\");\n else modal_overlay = $(\"<div />\", {\n \"class\": \"ui-widget-overlay\",\n \"css\": {\n \"display\": \"none\",\n \"position\": \"fixed\",\n \"top\": \"0\",\n \"bottom\": \"0\",\n \"right\": \"0\",\n \"left\": \"0\"\n }\n }).appendTo(\"body\").fadeIn(\"fast\");\n }\n });\n\n // Patch for PNotify 1.x\n notice = !isPN1 ? new PNotify(content) : $.pnotify(content);\n\n // Bind Events\n choice.bindEnterKey = true;\n choice.proceedSelector = '.' + this.class + ' .dirty-proceed';\n choice.staySelector = '.' + this.class + ' .dirty-stay,.ui-widget-overlay';\n\n // Support for Dirty Forms < 2.0\n if (choice.isDF1) {\n var close = function (decision) {\n return function (e) {\n if (e.type !== 'keydown' || (e.type === 'keydown' && (e.which == 27 || e.which == 13))) {\n notice.remove();\n if (modal_overlay) modal_overlay.fadeOut(\"fast\");\n decision(e);\n return false;\n }\n };\n };\n // Trap the escape key and force a close. Cancel it so PNotify doesn't intercept it.\n var decidingCancel = $.DirtyForms.decidingCancel;\n $(document).keydown(close(decidingCancel));\n $(choice.staySelector).click(close(decidingCancel));\n $(choice.proceedSelector).click(close($.DirtyForms.decidingContinue));\n }\n },\n close: function () {\n notice.remove();\n if (modal_overlay) modal_overlay.fadeOut(\"fast\");\n },\n\n // Support for Dirty Forms < 2.0\n fire: function (message, title) {\n this.title = title;\n this.open({ isDF1: true }, message, $.DirtyForms.ignoreClass);\n },\n\n // Support for Dirty Forms < 1.2\n bind: function () {\n },\n stash: function () {\n return false;\n },\n refire: function () {\n return false;\n },\n selector: 'no-op'\n };\n\n})(jQuery, window, document);"]}