11 lines
No EOL
22 KiB
JavaScript
11 lines
No EOL
22 KiB
JavaScript
/*
|
|
* # Fomantic UI - 2.9.0
|
|
* https://github.com/fomantic/Fomantic-UI
|
|
* http://fomantic-ui.com/
|
|
*
|
|
* Copyright 2022 Contributors
|
|
* Released under the MIT license
|
|
* http://opensource.org/licenses/MIT
|
|
*
|
|
*/
|
|
!function(Q,U,X,_){"use strict";Q.isFunction=Q.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},U=void 0!==U&&U.Math==Math?U:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),Q.flyout=Q.fn.flyout=function(O){var P,e=Q(this),D=Q(U),L=Q(X),z=Q("html"),B=Q("head"),N=Q("body"),R=e.selector||"",I=(new Date).getTime(),j=[],K=O,V="string"==typeof K,W=[].slice.call(arguments,1),q=U.requestAnimationFrame||U.mozRequestAnimationFrame||U.webkitRequestAnimationFrame||U.msRequestAnimationFrame||function(e){setTimeout(e,0)};return e.each(function(){var t,e,o,s,n,i,r,c,l=Q.isPlainObject(O)?Q.extend(!0,{},Q.fn.flyout.settings,O):Q.extend({},Q.fn.flyout.settings),a=l.selector,u=l.className,d=l.namespace,f=l.fields,h=l.regExp,g=l.error,p="."+d,m="module-"+d,b=Q(this),v=[U,X].indexOf(l.context)<0?L.find(l.context):N,y=b.find(a.close),k=b.children(a.flyout),x=v.children(a.pusher),w=b.hasClass("flyout"),S=this,C=w?b.data(m):_,A=!1,T=v[0]===N[0],F="",E="",H=!1,M={initialize:function(){var s;M.debug("Initializing flyout",O),M.create.id(),w||(M.create.flyout(),Q.isFunction(l.onHidden)||(l.onHidden=function(){M.destroy(),b.remove()}),l.autoShow||(l.autoShow=!0)),b.addClass(l.class),""!==l.title&&b.find(a.header).html(M.helpers.escape(l.title,l.preserveHTML)).addClass(l.classTitle),""!==l.content&&b.find(a.content).html(M.helpers.escape(l.content,l.preserveHTML)).addClass(l.classContent),M.has.configActions()&&(0===(s=b.find(a.actions).addClass(l.classActions)).length?s=Q("<div/>",{class:u.actions+" "+(l.classActions||"")}).appendTo(b):s.empty(),l.actions.forEach(function(e){var t=e[f.icon]?"<i "+(e[f.text]?'aria-hidden="true"':"")+' class="'+M.helpers.deQuote(e[f.icon])+' icon"></i>':"",n=M.helpers.escape(e[f.text]||"",l.preserveHTML),i=M.helpers.deQuote(e[f.class]||""),o=e[f.click]&&Q.isFunction(e[f.click])?e[f.click]:function(){};s.append(Q("<button/>",{html:t+n,"aria-label":(e[f.text]||e[f.icon]||"").replace(/<[^>]+(>|$)/g,""),class:u.button+" "+i,click:function(){!1!==o.call(S,b)&&M.hide()}}))})),c=M.get.transitionEvent(),l.delaySetup?q(M.setup.layout):M.setup.layout(),q(function(){M.setup.cache()}),"left"!=M.get.direction()&&"right"!=M.get.direction()||(M.setup.heights(),M.bind.resize()),M.bind.events(),M.observeChanges(),M.instantiate(),l.autoShow&&M.show()},instantiate:function(){M.verbose("Storing instance of module",M),C=M,b.data(m,C)},create:{flyout:function(){var e;M.verbose("Programmaticaly create flyout",v),b=Q("<div/>",{class:u.flyout,role:"dialog","aria-modal":l.dimPage}),l.closeIcon&&(y=Q("<i/>",{class:u.close,role:"button",tabindex:0,"aria-label":l.text.close}),b.append(y)),""!==l.title&&(e="_"+M.get.id()+"title",b.attr("aria-labelledby",e),Q("<div/>",{class:u.header,id:e}).appendTo(b)),""!==l.content&&(e="_"+M.get.id()+"desc",b.attr("aria-describedby",e),Q("<div/>",{class:u.content,id:e}).appendTo(b)),M.has.configActions()&&Q("<div/>",{class:u.actions}).appendTo(b),b.prependTo(v),S=b[0]},id:function(){n=(Math.random().toString(16)+"000000000").slice(2,10),s="."+n,M.verbose("Creating unique id for element",n)}},destroy:function(){i&&i.disconnect(),M.verbose("Destroying previous module for",b),b.off(p).removeData(m),M.is.ios()&&M.remove.ios(),y.off(s),t&&t.off(s),v.off(s),D.off(s),L.off(s)},event:{keyboard:function(e){e.which===l.keys.escape&&(l.closable?(M.debug("Escape key pressed hiding flyout"),M.hide()):M.debug("Escape key pressed, but closable is set to false"),e.preventDefault())},resize:function(){M.setup.heights()},clickaway:function(e){var t;l.closable&&(t=0<x.find(e.target).length||x.is(e.target),e=v.is(e.target),t&&(M.verbose("User clicked on dimmed page"),M.hide()),e&&(M.verbose("User clicked on dimmable context (scaled out page)"),M.hide()))},close:function(e){M.hide()},closeKeyUp:function(e){e=e.which;e!==l.keys.enter&&e!==l.keys.space||M.hide()},inputKeyDown:{first:function(e){e.which===l.keys.tab&&e.shiftKey&&(t.last().focus(),e.preventDefault())},last:function(e){e.which!==l.keys.tab||e.shiftKey||(t.first().focus(),e.preventDefault())}},approve:function(e){A||!1===l.onApprove.call(M.element,Q(this))?M.verbose("Approve callback returned false cancelling close"):(A=!0,M.hide(function(){A=!1}))},deny:function(e){A||!1===l.onDeny.call(M.element,Q(this))?M.verbose("Deny callback returned false cancelling close"):(A=!0,M.hide(function(){A=!1}))},touch:function(e){},containScroll:function(e){S.scrollTop<=0&&(S.scrollTop=1),S.scrollTop+S.offsetHeight>=S.scrollHeight&&(S.scrollTop=S.scrollHeight-S.offsetHeight-1)},scroll:function(e){0===Q(e.target).closest(a.flyout).length&&e.preventDefault()}},bind:{resize:function(){M.verbose("Adding resize event to window",D),D.on("resize"+s,M.event.resize)},events:function(){M.verbose("Attaching events"),b.on("click"+p,a.close,M.event.close).on("click"+p,a.approve,M.event.approve).on("click"+p,a.deny,M.event.deny),y.on("keyup"+s,M.event.closeKeyUp)},clickaway:function(){M.verbose("Adding clickaway events to context",v),v.on("click"+s,M.event.clickaway).on("touchend"+s,M.event.clickaway)},scrollLock:function(){l.scrollLock&&(M.debug("Disabling page scroll"),(H=M.has.scrollbar())&&(M.save.bodyMargin(),M.set.bodyMargin()),v.addClass(u.locked)),M.verbose("Adding events to contain flyout scroll"),L.on("touchmove"+s,M.event.touch),b.on("scroll"+p,M.event.containScroll)}},unbind:{clickaway:function(){M.verbose("Removing clickaway events from context",v),v.off(s)},scrollLock:function(){M.verbose("Removing scroll lock from page"),H&&M.restore.bodyMargin(),v.removeClass(u.locked),L.off(s),b.off("scroll"+p)}},add:{inlineCSS:function(){var e=M.cache.width||b.outerWidth(),t=M.cache.height||b.outerHeight(),n=M.is.rtl(),i=M.get.direction(),t={left:e,right:-e,top:t,bottom:-t};n&&(M.verbose("RTL detected, flipping widths"),t.left=-e,t.right=e),n="<style>","left"===i||"right"===i?(M.debug("Adding CSS rules for animation distance",e),n+=" .ui.visible."+i+".flyout ~ .fixed, .ui.visible."+i+".flyout ~ .pusher { -webkit-transform: translate3d("+t[i]+"px, 0, 0); transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!=i||(n+=" .ui.visible."+i+".flyout ~ .fixed, .ui.visible."+i+".flyout ~ .pusher { -webkit-transform: translate3d(0, "+t[i]+"px, 0); transform: translate3d(0, "+t[i]+"px, 0); }"),M.is.ie()&&("left"===i||"right"===i?(M.debug("Adding CSS rules for animation distance",e),n+=" body.pushable > .ui.visible."+i+".flyout ~ .pusher::after { -webkit-transform: translate3d("+t[i]+"px, 0, 0); transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!=i||(n+=" body.pushable > .ui.visible."+i+".flyout ~ .pusher::after { -webkit-transform: translate3d(0, "+t[i]+"px, 0); transform: translate3d(0, "+t[i]+"px, 0); }"),n+=" body.pushable > .ui.visible.left.flyout ~ .ui.visible.right.flyout ~ .pusher::after, body.pushable > .ui.visible.right.flyout ~ .ui.visible.left.flyout ~ .pusher::after { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }"),o=Q(n+="</style>").appendTo(B),M.debug("Adding sizing css to head",o)},keyboardShortcuts:function(){M.verbose("Adding keyboard shortcuts"),L.on("keydown"+p,M.event.keyboard)}},observeChanges:function(){"MutationObserver"in U&&((i=new MutationObserver(function(e){M.refreshInputs()})).observe(S,{childList:!0,subtree:!0}),M.debug("Setting up mutation observer",i))},refresh:function(){M.verbose("Refreshing selector cache"),v=[U,X].indexOf(l.context)<0?L.find(l.context):N,M.refreshFlyouts(),x=v.children(a.pusher),M.clear.cache()},refreshFlyouts:function(){M.verbose("Refreshing other flyouts"),k=v.children(a.flyout)},refreshInputs:function(){t&&t.off("keydown"+s),l.dimPage&&((t=b.find("[tabindex], :input").filter(":visible").filter(function(){return 0===Q(this).closest(".disabled").length})).first().on("keydown"+s,M.event.inputKeyDown.first),t.last().on("keydown"+s,M.event.inputKeyDown.last))},setup:{cache:function(){M.cache={width:b.outerWidth(),height:b.outerHeight()}},layout:function(){0===v.children(a.pusher).length&&(M.debug("Adding wrapper element for flyout"),M.error(g.pusher),x=Q('<div class="pusher" />'),v.children().not(a.omitted).not(k).wrapAll(x),M.refresh()),0!==b.nextAll(a.pusher).length&&b.nextAll(a.pusher)[0]===x[0]||(M.debug("Moved flyout to correct parent element"),M.error(g.movedFlyout,S),b.detach().prependTo(v),M.refresh()),M.is.mobile()&&b.addClass(u.fullscreen),M.clear.cache(),M.set.pushable(),M.set.direction()},heights:function(){M.debug("Setting up heights",b);var e=b.children(a.header),t=b.children(a.content),n=b.children(a.actions);t.css("min-height",v.height()-e.outerHeight()-n.outerHeight()+"px")}},attachEvents:function(e,t){var n=Q(e);t=Q.isFunction(M[t])?M[t]:M.toggle,0<n.length?(M.debug("Attaching flyout events to element",e,t),n.on("click"+p,t)):M.error(g.notFound,e)},show:function(e){e=Q.isFunction(e)?e:function(){},M.is.hidden()?!1===l.onShow.call(S)?M.verbose("Show callback returned false cancelling show"):(M.refresh(),M.othersActive()&&(M.debug("Other flyouts currently visible"),l.exclusive?M.hideOthers():A=!1),M.set.dimmerStyles(),M.pushPage(function(){e.call(S),l.onVisible.call(S),l.keyboardShortcuts&&M.add.keyboardShortcuts(),M.save.focus(),M.refreshInputs(),l.autofocus&&M.set.autofocus()}),l.onChange.call(S)):M.debug("Flyout is already visible")},hide:function(e){if(e=Q.isFunction(e)?e:function(){},!1===l.onHide.call(S,Q(this)))return M.verbose("Hide callback returned false cancelling hide"),A=!1;(M.is.visible()||M.is.animating())&&(M.debug("Hiding flyout",e),M.refreshFlyouts(),M.pullPage(function(){e.call(S),Q.isFunction(l.onHidden)&&l.onHidden.call(S),M.restore.focus()}),l.onChange.call(S))},othersAnimating:function(){return 0<k.not(b).filter("."+u.animating).length},othersVisible:function(){return 0<k.not(b).filter("."+u.visible).length},othersActive:function(){return M.othersVisible()||M.othersAnimating()},hideOthers:function(e){var t=k.not(b).filter("."+u.visible),n=t.length,i=0;e=e||function(){},t.flyout("hide",function(){++i==n&&e()})},toggle:function(){M.verbose("Determining toggled direction"),M.is.hidden()?M.show():M.hide()},pushPage:function(t){var e,n,i;t=Q.isFunction(t)?t:function(){},M.set.overlay(),l.returnScroll&&(r=(T?D:v).scrollTop()),M.bind.scrollLock(),e=function(){M.bind.clickaway(),M.add.inlineCSS(),M.set.animating(),M.set.visible()},n=function(){M.set.dimmed()},i=function(e){e.target==b[0]&&(b.off(c+s,i),M.remove.animating(),t.call(S))},b.off(c+s),b.on(c+s,i),q(e),l.dimPage&&!M.othersVisible()&&q(n)},pullPage:function(t){var e,n;t=Q.isFunction(t)?t:function(){},M.verbose("Removing context push state",M.get.direction()),M.unbind.clickaway(),M.othersActive()||(M.unbind.scrollLock(),l.keyboardShortcuts&&M.remove.keyboardShortcuts()),e=function(){M.set.overlay(),M.set.animating(),l.dimPage&&!M.othersVisible()&&M.set.closing(),M.remove.visible()},n=function(e){e.target==b[0]&&(b.off(c+s,n),M.remove.animating(),M.remove.closing(),M.remove.overlay(),M.remove.inlineCSS(),l.returnScroll&&M.scrollBack(),l.dimPage&&!M.othersVisible()&&x.removeClass(u.dimmed),t.call(S))},b.off(c+s),b.on(c+s,n),q(e)},scrollToTop:function(){M.verbose("Scrolling to top of page to avoid animation issues"),b.scrollTop(0),(T?D:v)[0].scrollTo(0,0)},scrollBack:function(){M.verbose("Scrolling back to original page position"),(T?D:v)[0].scrollTo(0,r)},clear:{cache:function(){M.verbose("Clearing cached dimensions"),M.cache={}}},set:{autofocus:function(){var e=t.filter("[autofocus]"),e=(0<e.length?e:1<t.length?t.filter(":not(i.close)"):t).first();0<e.length&&e.focus()},dimmerStyles:function(){l.blurring?x.addClass(u.blurring):x.removeClass(u.blurring)},bodyMargin:function(){var n=M.can.leftBodyScrollbar()?"left":"right";v.css((T?"margin-":"padding-")+n,E+"px"),v.find(a.bodyFixed.replace("right",n)).each(function(){var e=Q(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"calc("+e.css(t)+" + "+E+"px)")})},ios:function(){z.addClass(u.ios)},pushed:function(){v.addClass(u.pushed)},pushable:function(){v.addClass(u.pushable)},dimmed:function(){x.addClass(u.dimmed)},active:function(){b.addClass(u.active)},animating:function(){b.addClass(u.animating)},closing:function(){x.addClass(u.closing)},direction:function(e){e=e||M.get.direction(),b.addClass(u[e])},visible:function(){b.addClass(u.visible)},overlay:function(){b.addClass(u.overlay)}},remove:{inlineCSS:function(){M.debug("Removing inline css styles",o),o&&0<o.length&&o.remove()},keyboardShortcuts:function(){M.verbose("Removing keyboard shortcuts"),L.off("keydown"+p)},ios:function(){z.removeClass(u.ios)},pushed:function(){v.removeClass(u.pushed)},pushable:function(){v.removeClass(u.pushable)},active:function(){b.removeClass(u.active)},animating:function(){b.removeClass(u.animating)},closing:function(){x.removeClass(u.closing)},direction:function(e){e=e||M.get.direction(),b.removeClass(u[e])},visible:function(){b.removeClass(u.visible)},overlay:function(){b.removeClass(u.overlay)}},get:{direction:function(){return b.hasClass(u.top)?u.top:b.hasClass(u.right)?u.right:b.hasClass(u.bottom)?u.bottom:u.left},transitionEvent:function(){var e,t=X.createElement("element"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in n)if(t.style[e]!==_)return n[e]},id:function(){return n},element:function(){return b},settings:function(){return l}},can:{leftBodyScrollbar:function(){return M.cache.leftBodyScrollbar===_&&(M.cache.leftBodyScrollbar=M.is.rtl()&&(M.is.iframe&&!M.is.firefox()||M.is.safari()||M.is.edge()||M.is.ie())),M.cache.leftBodyScrollbar}},save:{focus:function(){0<Q(X.activeElement).closest(b).length||(e=Q(X.activeElement).blur())},bodyMargin:function(){F=v.css((T?"margin-":"padding-")+(M.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(F.replace(/[^\d.]/g,"")),t=T?U.innerWidth-X.documentElement.clientWidth:v[0].offsetWidth-v[0].clientWidth;E=e+t}},is:{safari:function(){return M.cache.isSafari===_&&(M.cache.isSafari=/constructor/i.test(U.HTMLElement)||!!U.ApplePaySession),M.cache.isSafari},edge:function(){return M.cache.isEdge===_&&(M.cache.isEdge=!!U.setImmediate&&!M.is.ie()),M.cache.isEdge},firefox:function(){return M.cache.isFirefox===_&&(M.cache.isFirefox=!!U.InstallTrigger),M.cache.isFirefox},iframe:function(){return!(self===top)},ie:function(){var e,t;return M.cache.isIE===_&&(e=!U.ActiveXObject&&"ActiveXObject"in U,t="ActiveXObject"in U,M.cache.isIE=e||t),M.cache.isIE},ios:function(){var e=navigator.userAgent,t=e.match(h.ios),n=e.match(h.mobileChrome);return!(!t||n)&&(M.verbose("Browser was found to be iOS",e),!0)},mobile:function(){var e=navigator.userAgent;return e.match(h.mobile)?(M.verbose("Browser was found to be mobile",e),!0):(M.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!M.is.visible()},visible:function(){return b.hasClass(u.visible)},animating:function(){return v.hasClass(u.animating)},rtl:function(){return M.cache.isRTL===_&&(M.cache.isRTL="rtl"===b.attr("dir")||"rtl"===b.css("direction")||"rtl"===N.attr("dir")||"rtl"===N.css("direction")||"rtl"===v.attr("dir")||"rtl"===v.css("direction")),M.cache.isRTL}},has:{configActions:function(){return Array.isArray(l.actions)&&0<l.actions.length},scrollbar:function(){return T||"hidden"!==v.css("overflow-y")}},restore:{focus:function(){e&&0<e.length&&l.restoreFocus&&e.focus()},bodyMargin:function(){var n=M.can.leftBodyScrollbar()?"left":"right";v.css((T?"margin-":"padding-")+n,F),v.find(a.bodyFixed.replace("right",n)).each(function(){var e=Q(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"")})}},helpers:{deQuote:function(e){return String(e).replace(/"/g,"")},escape:function(e,t){if(t)return e;var n={"<":"<",">":">",'"':""","'":"'","`":"`"};return/[&<>"'`]/.test(e)?(e=e.replace(/&(?![a-z0-9#]{1,12};)/gi,"&")).replace(/[<>"'`]/g,function(e){return n[e]}):e}},setting:function(e,t){if(M.debug("Changing setting",e,t),Q.isPlainObject(e))Q.extend(!0,l,e);else{if(t===_)return l[e];Q.isPlainObject(l[e])?Q.extend(!0,l[e],t):l[e]=t}},internal:function(e,t){if(Q.isPlainObject(e))Q.extend(!0,M,e);else{if(t===_)return M[e];M[e]=t}},debug:function(){!l.silent&&l.debug&&(l.performance?M.performance.log(arguments):(M.debug=Function.prototype.bind.call(console.info,console,l.name+":"),M.debug.apply(console,arguments)))},verbose:function(){!l.silent&&l.verbose&&l.debug&&(l.performance?M.performance.log(arguments):(M.verbose=Function.prototype.bind.call(console.info,console,l.name+":"),M.verbose.apply(console,arguments)))},error:function(){l.silent||(M.error=Function.prototype.bind.call(console.error,console,l.name+":"),M.error.apply(console,arguments))},performance:{log:function(e){var t,n;l.performance&&(n=(t=(new Date).getTime())-(I||t),I=t,j.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:S,"Execution Time":n})),clearTimeout(M.performance.timer),M.performance.timer=setTimeout(M.performance.display,500)},display:function(){var e=l.name+":",n=0;I=!1,clearTimeout(M.performance.timer),Q.each(j,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",R&&(e+=" '"+R+"'"),(console.group!==_||console.table!==_)&&0<j.length&&(console.groupCollapsed(e),console.table?console.table(j):Q.each(j,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),j=[]}},invoke:function(i,e,t){var o,s,n,r=C;return e=e||W,t=S||t,"string"==typeof i&&r!==_&&(i=i.split(/[\. ]/),o=i.length-1,Q.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(Q.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==_)return s=r[n],!1;{if(!Q.isPlainObject(r[t])||e==o)return r[t]!==_?s=r[t]:M.error(g.method,i),!1;r=r[t]}}})),Q.isFunction(s)?n=s.apply(t,e):s!==_&&(n=s),Array.isArray(P)?P.push(n):P!==_?P=[P,n]:n!==_&&(P=n),s}};V?(C===_&&(Q.isFunction(l.templates[K])&&(l.autoShow=!0,l.className.flyout=l.className.template,l=Q.extend(!0,{},l,l.templates[K].apply(M,W)),u=l.className,l.namespace,f=l.fields,g=l.error),M.initialize()),Q.isFunction(l.templates[K])||M.invoke(K)):(C!==_&&C.invoke("destroy"),M.initialize(),P=b)}),P!==_?P:this},Q.fn.flyout.settings={name:"Flyout",namespace:"flyout",silent:!1,debug:!1,verbose:!1,performance:!0,context:"body",exclusive:!1,closable:!0,autofocus:!0,restoreFocus:!0,dimPage:!0,scrollLock:!1,returnScroll:!1,delaySetup:!1,autoShow:!1,keyboardShortcuts:!0,title:"",content:"",class:"",classTitle:"",classContent:"",classActions:"",closeIcon:!1,actions:!1,preserveHTML:!0,fields:{class:"class",text:"text",icon:"icon",click:"click"},onChange:function(){},onShow:function(){},onHide:function(){return!0},onHidden:!1,onVisible:function(){},onApprove:function(){},onDeny:function(){},keys:{space:32,enter:13,escape:27,tab:9},className:{flyout:"ui flyout",close:"close icon",header:"ui header",content:"content",actions:"actions",active:"active",animating:"animating",blurring:"blurring",closing:"closing",dimmed:"dimmed",ios:"ios",locked:"locked",pushable:"pushable",pushed:"pushed",right:"right",top:"top",left:"left",bottom:"bottom",visible:"visible",overlay:"overlay",fullscreen:"fullscreen",template:"ui flyout",button:"ui button",ok:"positive",cancel:"negative",prompt:"ui fluid input"},selector:{bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.right.flyout, > .ui.fixed.nag, > .ui.fixed.nag > .close",fixed:".fixed",omitted:"script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed",pusher:".pusher",flyout:".ui.flyout",header:".ui.header",content:".content",actions:".actions",close:".close",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel"},regExp:{ios:/(iPad|iPhone|iPod)/g,mobileChrome:/(CriOS)/g,mobile:/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g},error:{method:"The method you called is not defined.",pusher:"Had to add pusher element. For optimal performance make sure body content is inside a pusher element",movedFlyout:"Had to move flyout. For optimal performance make sure flyout and pusher are direct children of your body tag",notFound:"There were no elements that matched the specified selector"},text:{ok:"Ok",cancel:"Cancel",close:"Close"}},Q.fn.flyout.settings.templates={getArguments:function(e){e=[].slice.call(e);return Q.isPlainObject(e[0])?Q.extend({handler:function(){},content:"",title:""},e[0]):(Q.isFunction(e[e.length-1])||e.push(function(){}),{handler:e.pop(),content:e.pop()||"",title:e.pop()||""})},alert:function(){var e=this.get.settings(),t=e.templates.getArguments(arguments);return{title:t.title,content:t.content,actions:[{text:e.text.ok,class:e.className.ok,click:t.handler}]}},confirm:function(){var e=this.get.settings(),t=e.templates.getArguments(arguments);return{title:t.title,content:t.content,actions:[{text:e.text.ok,class:e.className.ok,click:function(){t.handler(!0)}},{text:e.text.cancel,class:e.className.cancel,click:function(){t.handler(!1)}}]}},prompt:function(){var t=this,e=this.get.settings(),n=e.templates.getArguments(arguments);return 0===Q(Q.parseHTML(n.content)).filter(".ui.input").length&&(n.content+='<p><div class="'+e.className.prompt+'"><input placeholder="'+this.helpers.deQuote(n.placeholder||"")+'" type="text" value="'+this.helpers.deQuote(n.defaultValue||"")+'"></div></p>'),{title:n.title,content:n.content,actions:[{text:e.text.ok,class:e.className.ok,click:function(){var e=t.get.settings(),e=t.get.element().find(e.selector.prompt)[0];n.handler(Q(e).val())}},{text:e.text.cancel,class:e.className.cancel,click:function(){n.handler(null)}}]}}}}(jQuery,window,document); |