@ -1 +0,0 @@ |
|||||
define(["exports","./util"],function(a,b){"use strict";function c(a){return a&&a.__esModule?a:{"default":a}}function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(a,"__esModule",{value:!0});var e=c(b),f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=function(a){var b="alert",c="4.0.0-alpha.4",g="bs.alert",h="."+g,i=".data-api",j=a.fn[b],k=150,l={DISMISS:'[data-dismiss="alert"]'},m={CLOSE:"close"+h,CLOSED:"closed"+h,CLICK_DATA_API:"click"+h+i},n={ALERT:"alert",FADE:"fade",IN:"in"},o=function(){function b(a){d(this,b),this._element=a}return f(b,[{key:"close",value:function(a){a=a||this._element;var b=this._getRootElement(a),c=this._triggerCloseEvent(b);c.isDefaultPrevented()||this._removeElement(b)}},{key:"dispose",value:function(){a.removeData(this._element,g),this._element=null}},{key:"_getRootElement",value:function(b){var c=e["default"].getSelectorFromElement(b),d=!1;return c&&(d=a(c)[0]),d||(d=a(b).closest("."+n.ALERT)[0]),d}},{key:"_triggerCloseEvent",value:function(b){var c=a.Event(m.CLOSE);return a(b).trigger(c),c}},{key:"_removeElement",value:function(b){return a(b).removeClass(n.IN),e["default"].supportsTransitionEnd()&&a(b).hasClass(n.FADE)?void a(b).one(e["default"].TRANSITION_END,a.proxy(this._destroyElement,this,b)).emulateTransitionEnd(k):void this._destroyElement(b)}},{key:"_destroyElement",value:function(b){a(b).detach().trigger(m.CLOSED).remove()}}],[{key:"_jQueryInterface",value:function(c){return this.each(function(){var d=a(this),e=d.data(g);e||(e=new b(this),d.data(g,e)),"close"===c&&e[c](this)})}},{key:"_handleDismiss",value:function(a){return function(b){b&&b.preventDefault(),a.close(this)}}},{key:"VERSION",get:function(){return c}}]),b}();return a(document).on(m.CLICK_DATA_API,l.DISMISS,o._handleDismiss(new o)),a.fn[b]=o._jQueryInterface,a.fn[b].Constructor=o,a.fn[b].noConflict=function(){return a.fn[b]=j,o._jQueryInterface},o}(jQuery);a["default"]=g}); |
|
@ -1 +0,0 @@ |
|||||
define(["exports"],function(a){"use strict";function b(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(a,"__esModule",{value:!0});var c=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),d=function(a){var d="button",e="4.0.0-alpha.4",f="bs.button",g="."+f,h=".data-api",i=a.fn[d],j={ACTIVE:"active",BUTTON:"btn",FOCUS:"focus"},k={DATA_TOGGLE_CARROT:'[data-toggle^="button"]',DATA_TOGGLE:'[data-toggle="buttons"]',INPUT:"input",ACTIVE:".active",BUTTON:".btn"},l={CLICK_DATA_API:"click"+g+h,FOCUS_BLUR_DATA_API:"focus"+g+h+" "+("blur"+g+h)},m=function(){function d(a){b(this,d),this._element=a}return c(d,[{key:"toggle",value:function(){var b=!0,c=a(this._element).closest(k.DATA_TOGGLE)[0];if(c){var d=a(this._element).find(k.INPUT)[0];if(d){if("radio"===d.type)if(d.checked&&a(this._element).hasClass(j.ACTIVE))b=!1;else{var e=a(c).find(k.ACTIVE)[0];e&&a(e).removeClass(j.ACTIVE)}b&&(d.checked=!a(this._element).hasClass(j.ACTIVE),a(this._element).trigger("change")),d.focus()}}else this._element.setAttribute("aria-pressed",!a(this._element).hasClass(j.ACTIVE));b&&a(this._element).toggleClass(j.ACTIVE)}},{key:"dispose",value:function(){a.removeData(this._element,f),this._element=null}}],[{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=a(this).data(f);c||(c=new d(this),a(this).data(f,c)),"toggle"===b&&c[b]()})}},{key:"VERSION",get:function(){return e}}]),d}();return a(document).on(l.CLICK_DATA_API,k.DATA_TOGGLE_CARROT,function(b){b.preventDefault();var c=b.target;a(c).hasClass(j.BUTTON)||(c=a(c).closest(k.BUTTON)),m._jQueryInterface.call(a(c),"toggle")}).on(l.FOCUS_BLUR_DATA_API,k.DATA_TOGGLE_CARROT,function(b){var c=a(b.target).closest(k.BUTTON)[0];a(c).toggleClass(j.FOCUS,/^focus(in)?$/.test(b.type))}),a.fn[d]=m._jQueryInterface,a.fn[d].Constructor=m,a.fn[d].noConflict=function(){return a.fn[d]=i,m._jQueryInterface},m}(jQuery);a["default"]=d}); |
|
@ -1 +0,0 @@ |
|||||
define(["jquery","core/custom_interaction_events","core/log"],function(a,b,c){var d={TOGGLE_REGION:'[data-region="drawer-toggle"]',TOGGLE_ACTION:'[data-action="toggle-drawer"]',TOGGLE_TARGET:"aria-controls",TOGGLE_SIDE:"left",BODY:"body"},e=function(){a(d.TOGGLE_REGION).length||c.debug("Page is missing a drawer region"),a(d.TOGGLE_ACTION).length||c.debug("Page is missing a drawer toggle link"),a(d.TOGGLE_REGION).each(function(b,c){var e=a(c).find(d.TOGGLE_ACTION),f=e.attr("aria-controls"),g=a(document.getElementById(f)),h="false"==e.attr("aria-expanded"),i=e.attr("data-side"),j=a(d.BODY);g.on("mousewheel DOMMouseScroll",this.preventPageScroll),h?e.attr("aria-expanded","false"):(j.addClass("drawer-open-"+i),e.attr("aria-expanded","true"))}.bind(this)),this.registerEventListeners();var b=a(document).width()<768;b&&this.closeAll()};return e.prototype.closeAll=function(){a(d.TOGGLE_REGION).each(function(b,c){var e=a(c).find(d.TOGGLE_ACTION),f=e.attr("data-side"),g=a(d.BODY),h=e.attr("aria-controls"),i=a(document.getElementById(h)),j=e.attr("data-preference");e.attr("aria-expanded","false"),g.removeClass("drawer-open-"+f),i.attr("aria-hidden","true"),i.addClass("closed"),M.util.set_user_preference(j,"false")})},e.prototype.toggleDrawer=function(b){var c=a(b.target).closest("[data-action=toggle-drawer]"),e=c.attr("aria-controls"),f=a(document.getElementById(e)),g=a(d.BODY),h=c.attr("data-side"),i=c.attr("data-preference");g.addClass("drawer-ease");var j="true"==c.attr("aria-expanded");if(j)g.removeClass("drawer-open-"+h),c.attr("aria-expanded","false"),f.attr("aria-hidden","true"),f.addClass("closed"),M.util.set_user_preference(i,"false");else{var k=a(document).width()<768;k&&this.closeAll(),c.attr("aria-expanded","true"),f.attr("aria-hidden","false"),f.focus(),g.addClass("drawer-open-"+h),f.removeClass("closed"),M.util.set_user_preference(i,"true")}},e.prototype.preventPageScroll=function(b){var c=b.wheelDelta||b.originalEvent&&b.originalEvent.wheelDelta||-b.originalEvent.detail,d=this.scrollTop+a(this).outerHeight()-this.scrollHeight>=0,e=this.scrollTop<=0;(c<0&&d||c>0&&e)&&b.preventDefault()},e.prototype.registerEventListeners=function(){a(d.TOGGLE_ACTION).each(function(c,d){b.define(a(d),[b.events.activate]),a(d).on(b.events.activate,function(a,b){this.toggleDrawer(b.originalEvent),b.originalEvent.preventDefault()}.bind(this))}.bind(this))},{init:function(){return new e}}}); |
|
@ -1 +0,0 @@ |
|||||
define(["exports","./util"],function(a,b){"use strict";function c(a){return a&&a.__esModule?a:{"default":a}}function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(a,"__esModule",{value:!0});var e=c(b),f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=function(a){var b="dropdown",c="4.0.0-alpha.4",g="bs.dropdown",h="."+g,i=".data-api",j=a.fn[b],k=27,l=38,m=40,n=3,o={HIDE:"hide"+h,HIDDEN:"hidden"+h,SHOW:"show"+h,SHOWN:"shown"+h,CLICK:"click"+h,CLICK_DATA_API:"click"+h+i,KEYDOWN_DATA_API:"keydown"+h+i},p={BACKDROP:"dropdown-backdrop",DISABLED:"disabled",OPEN:"open"},q={BACKDROP:".dropdown-backdrop",DATA_TOGGLE:'[data-toggle="dropdown"]',FORM_CHILD:".dropdown form",ROLE_MENU:'[role="menu"]',ROLE_LISTBOX:'[role="listbox"]',NAVBAR_NAV:".navbar-nav",VISIBLE_ITEMS:'[role="menu"] li:not(.disabled) a, [role="listbox"] li:not(.disabled) a'},r=function(){function b(a){d(this,b),this._element=a,this._addEventListeners()}return f(b,[{key:"toggle",value:function(){if(this.disabled||a(this).hasClass(p.DISABLED))return!1;var c=b._getParentFromElement(this),d=a(c).hasClass(p.OPEN);if(b._clearMenus(),d)return!1;if("ontouchstart"in document.documentElement&&!a(c).closest(q.NAVBAR_NAV).length){var e=document.createElement("div");e.className=p.BACKDROP,a(e).insertBefore(this),a(e).on("click",b._clearMenus)}var f={relatedTarget:this},g=a.Event(o.SHOW,f);return a(c).trigger(g),!g.isDefaultPrevented()&&(this.focus(),this.setAttribute("aria-expanded","true"),a(c).toggleClass(p.OPEN),a(c).trigger(a.Event(o.SHOWN,f)),!1)}},{key:"dispose",value:function(){a.removeData(this._element,g),a(this._element).off(h),this._element=null}},{key:"_addEventListeners",value:function(){a(this._element).on(o.CLICK,this.toggle)}}],[{key:"_jQueryInterface",value:function(c){return this.each(function(){var d=a(this).data(g);if(d||a(this).data(g,d=new b(this)),"string"==typeof c){if(void 0===d[c])throw new Error('No method named "'+c+'"');d[c].call(this)}})}},{key:"_clearMenus",value:function(c){if(!c||c.which!==n){var d=a(q.BACKDROP)[0];d&&d.parentNode.removeChild(d);for(var e=a.makeArray(a(q.DATA_TOGGLE)),f=0;f<e.length;f++){var g=b._getParentFromElement(e[f]),h={relatedTarget:e[f]};if(a(g).hasClass(p.OPEN)&&!(c&&"click"===c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(g,c.target))){var i=a.Event(o.HIDE,h);a(g).trigger(i),i.isDefaultPrevented()||(e[f].setAttribute("aria-expanded","false"),a(g).removeClass(p.OPEN).trigger(a.Event(o.HIDDEN,h)))}}}}},{key:"_getParentFromElement",value:function(b){var c=void 0,d=e["default"].getSelectorFromElement(b);return d&&(c=a(d)[0]),c||b.parentNode}},{key:"_dataApiKeydownHandler",value:function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)&&(c.preventDefault(),c.stopPropagation(),!this.disabled&&!a(this).hasClass(p.DISABLED))){var d=b._getParentFromElement(this),e=a(d).hasClass(p.OPEN);if(!e&&c.which!==k||e&&c.which===k){if(c.which===k){var f=a(d).find(q.DATA_TOGGLE)[0];a(f).trigger("focus")}return void a(this).trigger("click")}var g=a.makeArray(a(q.VISIBLE_ITEMS));if(g=g.filter(function(a){return a.offsetWidth||a.offsetHeight}),g.length){var h=g.indexOf(c.target);c.which===l&&h>0&&h--,c.which===m&&h<g.length-1&&h++,h<0&&(h=0),g[h].focus()}}}},{key:"VERSION",get:function(){return c}}]),b}();return a(document).on(o.KEYDOWN_DATA_API,q.DATA_TOGGLE,r._dataApiKeydownHandler).on(o.KEYDOWN_DATA_API,q.ROLE_MENU,r._dataApiKeydownHandler).on(o.KEYDOWN_DATA_API,q.ROLE_LISTBOX,r._dataApiKeydownHandler).on(o.CLICK_DATA_API,r._clearMenus).on(o.CLICK_DATA_API,q.DATA_TOGGLE,r.prototype.toggle).on(o.CLICK_DATA_API,q.FORM_CHILD,function(a){a.stopPropagation()}),a.fn[b]=r._jQueryInterface,a.fn[b].Constructor=r,a.fn[b].noConflict=function(){return a.fn[b]=j,r._jQueryInterface},r}(jQuery);a["default"]=g}); |
|
@ -1 +0,0 @@ |
|||||
define(["jquery","core/event"],function(a,b){return{enhance:function(c){var d=document.getElementById(c);a(d).on(b.Events.FORM_FIELD_VALIDATION,function(b,c){b.preventDefault();var e=a(d).closest(".form-group"),f=e.find(".form-control-feedback");"TEXTAREA"==a(d).prop("tagName")&&e.find("[contenteditable]")&&(d=e.find("[contenteditable]")),""!==c?(e.addClass("has-danger"),e.data("client-validation-error",!0),a(d).addClass("form-control-danger"),a(d).attr("aria-describedby",f.attr("id")),a(d).attr("aria-invalid",!0),f.attr("tabindex",0),f.html(c),f.is(":visible")||(f.show(),f.focus())):e.data("client-validation-error")===!0&&(e.removeClass("has-danger"),e.data("client-validation-error",!1),a(d).removeClass("form-control-danger"),a(d).removeAttr("aria-describedby"),a(d).attr("aria-invalid",!1),f.hide())})}}}); |
|
@ -1 +0,0 @@ |
|||||
define(["jquery","./tether","core/event"],function(a,b,c){return window.jQuery=a,window.Tether=b,require(["theme_ilb/util","theme_ilb/alert","theme_ilb/button","theme_ilb/carousel","theme_ilb/collapse","theme_ilb/dropdown","theme_ilb/modal","theme_ilb/scrollspy","theme_ilb/tab","theme_ilb/tooltip","theme_ilb/popover"],function(){a("body").popover({selector:'[data-toggle="popover"]',trigger:"focus"}),c.getLegacyEvents().done(function(b){a(document).on(b.FILTER_CONTENT_UPDATED,function(){a("body").popover({selector:'[data-toggle="popover"]',trigger:"focus"})})})}),{}}); |
|
@ -1 +0,0 @@ |
|||||
define(["exports","./tooltip"],function(a,b){"use strict";function c(a){return a&&a.__esModule?a:{"default":a}}function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(a,"__esModule",{value:!0});var g=c(b),h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol?"symbol":typeof a},i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=function(a){var b="popover",c="4.0.0-alpha.4",j="bs.popover",k="."+j,l=a.fn[b],m=a.extend({},g["default"].Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),n=a.extend({},g["default"].DefaultType,{content:"(string|element|function)"}),o={FADE:"fade",IN:"in"},p={TITLE:".popover-title",CONTENT:".popover-content",ARROW:".popover-arrow"},q={HIDE:"hide"+k,HIDDEN:"hidden"+k,SHOW:"show"+k,SHOWN:"shown"+k,INSERTED:"inserted"+k,CLICK:"click"+k,FOCUSIN:"focusin"+k,FOCUSOUT:"focusout"+k,MOUSEENTER:"mouseenter"+k,MOUSELEAVE:"mouseleave"+k},r=function(g){function l(){return d(this,l),e(this,(l.__proto__||Object.getPrototypeOf(l)).apply(this,arguments))}return f(l,g),i(l,[{key:"isWithContent",value:function(){return this.getTitle()||this._getContent()}},{key:"getTipElement",value:function(){return this.tip=this.tip||a(this.config.template)[0]}},{key:"setContent",value:function(){var b=a(this.getTipElement());this.setElementContent(b.find(p.TITLE),this.getTitle()),this.setElementContent(b.find(p.CONTENT),this._getContent()),b.removeClass(o.FADE).removeClass(o.IN),this.cleanupTether()}},{key:"_getContent",value:function(){return this.element.getAttribute("data-content")||("function"==typeof this.config.content?this.config.content.call(this.element):this.config.content)}}],[{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=a(this).data(j),d="object"===("undefined"==typeof b?"undefined":h(b))?b:null;if((c||!/destroy|hide/.test(b))&&(c||(c=new l(this,d),a(this).data(j,c)),"string"==typeof b)){if(void 0===c[b])throw new Error('No method named "'+b+'"');c[b]()}})}},{key:"VERSION",get:function(){return c}},{key:"Default",get:function(){return m}},{key:"NAME",get:function(){return b}},{key:"DATA_KEY",get:function(){return j}},{key:"Event",get:function(){return q}},{key:"EVENT_KEY",get:function(){return k}},{key:"DefaultType",get:function(){return n}}]),l}(g["default"]);return a.fn[b]=r._jQueryInterface,a.fn[b].Constructor=r,a.fn[b].noConflict=function(){return a.fn[b]=l,r._jQueryInterface},r}(jQuery);a["default"]=j}); |
|
@ -1 +0,0 @@ |
|||||
define(["exports","./util"],function(a,b){"use strict";function c(a){return a&&a.__esModule?a:{"default":a}}function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(a,"__esModule",{value:!0});var e=c(b),f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol?"symbol":typeof a},g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=function(a){var b="scrollspy",c="4.0.0-alpha.4",h="bs.scrollspy",i="."+h,j=".data-api",k=a.fn[b],l={offset:10,method:"auto",target:""},m={offset:"number",method:"string",target:"(string|element)"},n={ACTIVATE:"activate"+i,SCROLL:"scroll"+i,LOAD_DATA_API:"load"+i+j},o={DROPDOWN_ITEM:"dropdown-item",DROPDOWN_MENU:"dropdown-menu",NAV_LINK:"nav-link",NAV:"nav",ACTIVE:"active"},p={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",LIST_ITEM:".list-item",LI:"li",LI_DROPDOWN:"li.dropdown",NAV_LINKS:".nav-link",DROPDOWN:".dropdown",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},q={OFFSET:"offset",POSITION:"position"},r=function(){function j(b,c){d(this,j),this._element=b,this._scrollElement="BODY"===b.tagName?window:b,this._config=this._getConfig(c),this._selector=this._config.target+" "+p.NAV_LINKS+","+(this._config.target+" "+p.DROPDOWN_ITEMS),this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,a(this._scrollElement).on(n.SCROLL,a.proxy(this._process,this)),this.refresh(),this._process()}return g(j,[{key:"refresh",value:function(){var b=this,c=this._scrollElement!==this._scrollElement.window?q.POSITION:q.OFFSET,d="auto"===this._config.method?c:this._config.method,f=d===q.POSITION?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight();var g=a.makeArray(a(this._selector));g.map(function(b){var c=void 0,g=e["default"].getSelectorFromElement(b);return g&&(c=a(g)[0]),c&&(c.offsetWidth||c.offsetHeight)?[a(c)[d]().top+f,g]:null}).filter(function(a){return a}).sort(function(a,b){return a[0]-b[0]}).forEach(function(a){b._offsets.push(a[0]),b._targets.push(a[1])})}},{key:"dispose",value:function(){a.removeData(this._element,h),a(this._scrollElement).off(i),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null}},{key:"_getConfig",value:function(c){if(c=a.extend({},l,c),"string"!=typeof c.target){var d=a(c.target).attr("id");d||(d=e["default"].getUID(b),a(c.target).attr("id",d)),c.target="#"+d}return e["default"].typeCheckConfig(b,c,m),c}},{key:"_getScrollTop",value:function(){return this._scrollElement===window?this._scrollElement.scrollY:this._scrollElement.scrollTop}},{key:"_getScrollHeight",value:function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}},{key:"_process",value:function(){var a=this._getScrollTop()+this._config.offset,b=this._getScrollHeight(),c=this._config.offset+b-this._scrollElement.offsetHeight;if(this._scrollHeight!==b&&this.refresh(),a>=c){var d=this._targets[this._targets.length-1];this._activeTarget!==d&&this._activate(d)}if(this._activeTarget&&a<this._offsets[0])return this._activeTarget=null,void this._clear();for(var e=this._offsets.length;e--;){var f=this._activeTarget!==this._targets[e]&&a>=this._offsets[e]&&(void 0===this._offsets[e+1]||a<this._offsets[e+1]);f&&this._activate(this._targets[e])}}},{key:"_activate",value:function(b){this._activeTarget=b,this._clear();var c=this._selector.split(",");c=c.map(function(a){return a+'[data-target="'+b+'"],'+(a+'[href="'+b+'"]')});var d=a(c.join(","));d.hasClass(o.DROPDOWN_ITEM)?(d.closest(p.DROPDOWN).find(p.DROPDOWN_TOGGLE).addClass(o.ACTIVE),d.addClass(o.ACTIVE)):d.parents(p.LI).find(p.NAV_LINKS).addClass(o.ACTIVE),a(this._scrollElement).trigger(n.ACTIVATE,{relatedTarget:b})}},{key:"_clear",value:function(){a(this._selector).filter(p.ACTIVE).removeClass(o.ACTIVE)}}],[{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=a(this).data(h),d="object"===("undefined"==typeof b?"undefined":f(b))&&b||null;if(c||(c=new j(this,d),a(this).data(h,c)),"string"==typeof b){if(void 0===c[b])throw new Error('No method named "'+b+'"');c[b]()}})}},{key:"VERSION",get:function(){return c}},{key:"Default",get:function(){return l}}]),j}();return a(window).on(n.LOAD_DATA_API,function(){for(var b=a.makeArray(a(p.DATA_SPY)),c=b.length;c--;){var d=a(b[c]);r._jQueryInterface.call(d,d.data())}}),a.fn[b]=r._jQueryInterface,a.fn[b].Constructor=r,a.fn[b].noConflict=function(){return a.fn[b]=k,r._jQueryInterface},r}(jQuery);a["default"]=h}); |
|
@ -1 +0,0 @@ |
|||||
define(["exports","./util"],function(a,b){"use strict";function c(a){return a&&a.__esModule?a:{"default":a}}function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(a,"__esModule",{value:!0});var e=c(b),f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=function(a){var b="tab",c="4.0.0-alpha.4",g="bs.tab",h="."+g,i=".data-api",j=a.fn[b],k=150,l={HIDE:"hide"+h,HIDDEN:"hidden"+h,SHOW:"show"+h,SHOWN:"shown"+h,CLICK_DATA_API:"click"+h+i},m={DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active",FADE:"fade",IN:"in"},n={A:"a",LI:"li",DROPDOWN:".dropdown",UL:"ul:not(.dropdown-menu)",FADE_CHILD:"> .nav-item .fade, > .fade",ACTIVE:".active",ACTIVE_CHILD:"> .nav-item > .active, > .active",DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"]',DROPDOWN_TOGGLE:".dropdown-toggle",DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu .active"},o=function(){function b(a){d(this,b),this._element=a}return f(b,[{key:"show",value:function(){var b=this;if(!this._element.parentNode||this._element.parentNode.nodeType!==Node.ELEMENT_NODE||!a(this._element).hasClass(m.ACTIVE)){var c=void 0,d=void 0,f=a(this._element).closest(n.UL)[0],g=e["default"].getSelectorFromElement(this._element);f&&(d=a.makeArray(a(f).find(n.ACTIVE)),d=d[d.length-1]);var h=a.Event(l.HIDE,{relatedTarget:this._element}),i=a.Event(l.SHOW,{relatedTarget:d});if(d&&a(d).trigger(h),a(this._element).trigger(i),!i.isDefaultPrevented()&&!h.isDefaultPrevented()){g&&(c=a(g)[0]),this._activate(this._element,f);var j=function(){var c=a.Event(l.HIDDEN,{relatedTarget:b._element}),e=a.Event(l.SHOWN,{relatedTarget:d});a(d).trigger(c),a(b._element).trigger(e)};c?this._activate(c,c.parentNode,j):j()}}}},{key:"dispose",value:function(){a.removeClass(this._element,g),this._element=null}},{key:"_activate",value:function(b,c,d){var f=a(c).find(n.ACTIVE_CHILD)[0],g=d&&e["default"].supportsTransitionEnd()&&(f&&a(f).hasClass(m.FADE)||Boolean(a(c).find(n.FADE_CHILD)[0])),h=a.proxy(this._transitionComplete,this,b,f,g,d);f&&g?a(f).one(e["default"].TRANSITION_END,h).emulateTransitionEnd(k):h(),f&&a(f).removeClass(m.IN)}},{key:"_transitionComplete",value:function(b,c,d,f){if(c){a(c).removeClass(m.ACTIVE);var g=a(c).find(n.DROPDOWN_ACTIVE_CHILD)[0];g&&a(g).removeClass(m.ACTIVE),c.setAttribute("aria-expanded",!1)}if(a(b).addClass(m.ACTIVE),b.setAttribute("aria-expanded",!0),d?(e["default"].reflow(b),a(b).addClass(m.IN)):a(b).removeClass(m.FADE),b.parentNode&&a(b.parentNode).hasClass(m.DROPDOWN_MENU)){var h=a(b).closest(n.DROPDOWN)[0];h&&a(h).find(n.DROPDOWN_TOGGLE).addClass(m.ACTIVE),b.setAttribute("aria-expanded",!0)}f&&f()}}],[{key:"_jQueryInterface",value:function(c){return this.each(function(){var d=a(this),e=d.data(g);if(e||(e=e=new b(this),d.data(g,e)),"string"==typeof c){if(void 0===e[c])throw new Error('No method named "'+c+'"');e[c]()}})}},{key:"VERSION",get:function(){return c}}]),b}();return a(document).on(l.CLICK_DATA_API,n.DATA_TOGGLE,function(b){b.preventDefault(),o._jQueryInterface.call(a(this),"show")}),a.fn[b]=o._jQueryInterface,a.fn[b].Constructor=o,a.fn[b].noConflict=function(){return a.fn[b]=j,o._jQueryInterface},o}(jQuery);a["default"]=g}); |
|
@ -1 +0,0 @@ |
|||||
define(["exports"],function(a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var b=function(a){function b(a){return{}.toString.call(a).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function c(a){return(a[0]||a).nodeType}function d(){return{bindType:h.end,delegateType:h.end,handle:function(b){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}}}function e(){if(window.QUnit)return!1;var a=document.createElement("bootstrap");for(var b in j)if(void 0!==a.style[b])return{end:j[b]};return!1}function f(b){var c=this,d=!1;return a(this).one(k.TRANSITION_END,function(){d=!0}),setTimeout(function(){d||k.triggerTransitionEnd(c)},b),this}function g(){h=e(),a.fn.emulateTransitionEnd=f,k.supportsTransitionEnd()&&(a.event.special[k.TRANSITION_END]=d())}var h=!1,i=1e6,j={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},k={TRANSITION_END:"bsTransitionEnd",getUID:function(a){do a+=~~(Math.random()*i);while(document.getElementById(a));return a},getSelectorFromElement:function(a){var b=a.getAttribute("data-target");return b||(b=a.getAttribute("href")||"",b=/^#[a-z]/i.test(b)?b:null),b},reflow:function(a){new Function("bs","return bs")(a.offsetHeight)},triggerTransitionEnd:function(b){a(b).trigger(h.end)},supportsTransitionEnd:function(){return Boolean(h)},typeCheckConfig:function(a,d,e){for(var f in e)if(e.hasOwnProperty(f)){var g=e[f],h=d[f],i=void 0;if(i=h&&c(h)?"element":b(h),!new RegExp(g).test(i))throw new Error(a.toUpperCase()+": "+('Option "'+f+'" provided type "'+i+'" ')+('but expected type "'+g+'".'))}}};return g(),k}(jQuery);a["default"]=b}); |
|
@ -1,218 +0,0 @@ |
|||||
define(['exports', './util'], function (exports, _util) { |
|
||||
'use strict'; |
|
||||
|
|
||||
Object.defineProperty(exports, "__esModule", { |
|
||||
value: true |
|
||||
}); |
|
||||
|
|
||||
var _util2 = _interopRequireDefault(_util); |
|
||||
|
|
||||
function _interopRequireDefault(obj) { |
|
||||
return obj && obj.__esModule ? obj : { |
|
||||
default: obj |
|
||||
}; |
|
||||
} |
|
||||
|
|
||||
function _classCallCheck(instance, Constructor) { |
|
||||
if (!(instance instanceof Constructor)) { |
|
||||
throw new TypeError("Cannot call a class as a function"); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
var _createClass = function () { |
|
||||
function defineProperties(target, props) { |
|
||||
for (var i = 0; i < props.length; i++) { |
|
||||
var descriptor = props[i]; |
|
||||
descriptor.enumerable = descriptor.enumerable || false; |
|
||||
descriptor.configurable = true; |
|
||||
if ("value" in descriptor) descriptor.writable = true; |
|
||||
Object.defineProperty(target, descriptor.key, descriptor); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
return function (Constructor, protoProps, staticProps) { |
|
||||
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
|
||||
if (staticProps) defineProperties(Constructor, staticProps); |
|
||||
return Constructor; |
|
||||
}; |
|
||||
}(); |
|
||||
|
|
||||
/** |
|
||||
* -------------------------------------------------------------------------- |
|
||||
* Bootstrap (v4.0.0-alpha.4): alert.js |
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
|
||||
* -------------------------------------------------------------------------- |
|
||||
*/ |
|
||||
|
|
||||
var Alert = function ($) { |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* Constants |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
var NAME = 'alert'; |
|
||||
var VERSION = '4.0.0-alpha.4'; |
|
||||
var DATA_KEY = 'bs.alert'; |
|
||||
var EVENT_KEY = '.' + DATA_KEY; |
|
||||
var DATA_API_KEY = '.data-api'; |
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME]; |
|
||||
var TRANSITION_DURATION = 150; |
|
||||
|
|
||||
var Selector = { |
|
||||
DISMISS: '[data-dismiss="alert"]' |
|
||||
}; |
|
||||
|
|
||||
var Event = { |
|
||||
CLOSE: 'close' + EVENT_KEY, |
|
||||
CLOSED: 'closed' + EVENT_KEY, |
|
||||
CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY |
|
||||
}; |
|
||||
|
|
||||
var ClassName = { |
|
||||
ALERT: 'alert', |
|
||||
FADE: 'fade', |
|
||||
IN: 'in' |
|
||||
}; |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* Class Definition |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
var Alert = function () { |
|
||||
function Alert(element) { |
|
||||
_classCallCheck(this, Alert); |
|
||||
|
|
||||
this._element = element; |
|
||||
} |
|
||||
|
|
||||
// getters
|
|
||||
|
|
||||
_createClass(Alert, [{ |
|
||||
key: 'close', |
|
||||
value: function close(element) { |
|
||||
element = element || this._element; |
|
||||
|
|
||||
var rootElement = this._getRootElement(element); |
|
||||
var customEvent = this._triggerCloseEvent(rootElement); |
|
||||
|
|
||||
if (customEvent.isDefaultPrevented()) { |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
this._removeElement(rootElement); |
|
||||
} |
|
||||
}, { |
|
||||
key: 'dispose', |
|
||||
value: function dispose() { |
|
||||
$.removeData(this._element, DATA_KEY); |
|
||||
this._element = null; |
|
||||
} |
|
||||
}, { |
|
||||
key: '_getRootElement', |
|
||||
value: function _getRootElement(element) { |
|
||||
var selector = _util2.default.getSelectorFromElement(element); |
|
||||
var parent = false; |
|
||||
|
|
||||
if (selector) { |
|
||||
parent = $(selector)[0]; |
|
||||
} |
|
||||
|
|
||||
if (!parent) { |
|
||||
parent = $(element).closest('.' + ClassName.ALERT)[0]; |
|
||||
} |
|
||||
|
|
||||
return parent; |
|
||||
} |
|
||||
}, { |
|
||||
key: '_triggerCloseEvent', |
|
||||
value: function _triggerCloseEvent(element) { |
|
||||
var closeEvent = $.Event(Event.CLOSE); |
|
||||
|
|
||||
$(element).trigger(closeEvent); |
|
||||
return closeEvent; |
|
||||
} |
|
||||
}, { |
|
||||
key: '_removeElement', |
|
||||
value: function _removeElement(element) { |
|
||||
$(element).removeClass(ClassName.IN); |
|
||||
|
|
||||
if (!_util2.default.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) { |
|
||||
this._destroyElement(element); |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
$(element).one(_util2.default.TRANSITION_END, $.proxy(this._destroyElement, this, element)).emulateTransitionEnd(TRANSITION_DURATION); |
|
||||
} |
|
||||
}, { |
|
||||
key: '_destroyElement', |
|
||||
value: function _destroyElement(element) { |
|
||||
$(element).detach().trigger(Event.CLOSED).remove(); |
|
||||
} |
|
||||
}], [{ |
|
||||
key: '_jQueryInterface', |
|
||||
value: function _jQueryInterface(config) { |
|
||||
return this.each(function () { |
|
||||
var $element = $(this); |
|
||||
var data = $element.data(DATA_KEY); |
|
||||
|
|
||||
if (!data) { |
|
||||
data = new Alert(this); |
|
||||
$element.data(DATA_KEY, data); |
|
||||
} |
|
||||
|
|
||||
if (config === 'close') { |
|
||||
data[config](this); |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
}, { |
|
||||
key: '_handleDismiss', |
|
||||
value: function _handleDismiss(alertInstance) { |
|
||||
return function (event) { |
|
||||
if (event) { |
|
||||
event.preventDefault(); |
|
||||
} |
|
||||
|
|
||||
alertInstance.close(this); |
|
||||
}; |
|
||||
} |
|
||||
}, { |
|
||||
key: 'VERSION', |
|
||||
get: function get() { |
|
||||
return VERSION; |
|
||||
} |
|
||||
}]); |
|
||||
|
|
||||
return Alert; |
|
||||
}(); |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* Data Api implementation |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
$(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert())); |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* jQuery |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
$.fn[NAME] = Alert._jQueryInterface; |
|
||||
$.fn[NAME].Constructor = Alert; |
|
||||
$.fn[NAME].noConflict = function () { |
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT; |
|
||||
return Alert._jQueryInterface; |
|
||||
}; |
|
||||
|
|
||||
return Alert; |
|
||||
}(jQuery); |
|
||||
|
|
||||
exports.default = Alert; |
|
||||
}); |
|
@ -1,195 +0,0 @@ |
|||||
define(['exports'], function (exports) { |
|
||||
'use strict'; |
|
||||
|
|
||||
Object.defineProperty(exports, "__esModule", { |
|
||||
value: true |
|
||||
}); |
|
||||
|
|
||||
function _classCallCheck(instance, Constructor) { |
|
||||
if (!(instance instanceof Constructor)) { |
|
||||
throw new TypeError("Cannot call a class as a function"); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
var _createClass = function () { |
|
||||
function defineProperties(target, props) { |
|
||||
for (var i = 0; i < props.length; i++) { |
|
||||
var descriptor = props[i]; |
|
||||
descriptor.enumerable = descriptor.enumerable || false; |
|
||||
descriptor.configurable = true; |
|
||||
if ("value" in descriptor) descriptor.writable = true; |
|
||||
Object.defineProperty(target, descriptor.key, descriptor); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
return function (Constructor, protoProps, staticProps) { |
|
||||
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
|
||||
if (staticProps) defineProperties(Constructor, staticProps); |
|
||||
return Constructor; |
|
||||
}; |
|
||||
}(); |
|
||||
|
|
||||
/** |
|
||||
* -------------------------------------------------------------------------- |
|
||||
* Bootstrap (v4.0.0-alpha.4): button.js |
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
|
||||
* -------------------------------------------------------------------------- |
|
||||
*/ |
|
||||
|
|
||||
var Button = function ($) { |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* Constants |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
var NAME = 'button'; |
|
||||
var VERSION = '4.0.0-alpha.4'; |
|
||||
var DATA_KEY = 'bs.button'; |
|
||||
var EVENT_KEY = '.' + DATA_KEY; |
|
||||
var DATA_API_KEY = '.data-api'; |
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME]; |
|
||||
|
|
||||
var ClassName = { |
|
||||
ACTIVE: 'active', |
|
||||
BUTTON: 'btn', |
|
||||
FOCUS: 'focus' |
|
||||
}; |
|
||||
|
|
||||
var Selector = { |
|
||||
DATA_TOGGLE_CARROT: '[data-toggle^="button"]', |
|
||||
DATA_TOGGLE: '[data-toggle="buttons"]', |
|
||||
INPUT: 'input', |
|
||||
ACTIVE: '.active', |
|
||||
BUTTON: '.btn' |
|
||||
}; |
|
||||
|
|
||||
var Event = { |
|
||||
CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY, |
|
||||
FOCUS_BLUR_DATA_API: 'focus' + EVENT_KEY + DATA_API_KEY + ' ' + ('blur' + EVENT_KEY + DATA_API_KEY) |
|
||||
}; |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* Class Definition |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
var Button = function () { |
|
||||
function Button(element) { |
|
||||
_classCallCheck(this, Button); |
|
||||
|
|
||||
this._element = element; |
|
||||
} |
|
||||
|
|
||||
// getters
|
|
||||
|
|
||||
_createClass(Button, [{ |
|
||||
key: 'toggle', |
|
||||
value: function toggle() { |
|
||||
var triggerChangeEvent = true; |
|
||||
var rootElement = $(this._element).closest(Selector.DATA_TOGGLE)[0]; |
|
||||
|
|
||||
if (rootElement) { |
|
||||
var input = $(this._element).find(Selector.INPUT)[0]; |
|
||||
|
|
||||
if (input) { |
|
||||
if (input.type === 'radio') { |
|
||||
if (input.checked && $(this._element).hasClass(ClassName.ACTIVE)) { |
|
||||
triggerChangeEvent = false; |
|
||||
} else { |
|
||||
var activeElement = $(rootElement).find(Selector.ACTIVE)[0]; |
|
||||
|
|
||||
if (activeElement) { |
|
||||
$(activeElement).removeClass(ClassName.ACTIVE); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
if (triggerChangeEvent) { |
|
||||
input.checked = !$(this._element).hasClass(ClassName.ACTIVE); |
|
||||
$(this._element).trigger('change'); |
|
||||
} |
|
||||
|
|
||||
input.focus(); |
|
||||
} |
|
||||
} else { |
|
||||
this._element.setAttribute('aria-pressed', !$(this._element).hasClass(ClassName.ACTIVE)); |
|
||||
} |
|
||||
|
|
||||
if (triggerChangeEvent) { |
|
||||
$(this._element).toggleClass(ClassName.ACTIVE); |
|
||||
} |
|
||||
} |
|
||||
}, { |
|
||||
key: 'dispose', |
|
||||
value: function dispose() { |
|
||||
$.removeData(this._element, DATA_KEY); |
|
||||
this._element = null; |
|
||||
} |
|
||||
}], [{ |
|
||||
key: '_jQueryInterface', |
|
||||
value: function _jQueryInterface(config) { |
|
||||
return this.each(function () { |
|
||||
var data = $(this).data(DATA_KEY); |
|
||||
|
|
||||
if (!data) { |
|
||||
data = new Button(this); |
|
||||
$(this).data(DATA_KEY, data); |
|
||||
} |
|
||||
|
|
||||
if (config === 'toggle') { |
|
||||
data[config](); |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
}, { |
|
||||
key: 'VERSION', |
|
||||
get: function get() { |
|
||||
return VERSION; |
|
||||
} |
|
||||
}]); |
|
||||
|
|
||||
return Button; |
|
||||
}(); |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* Data Api implementation |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) { |
|
||||
event.preventDefault(); |
|
||||
|
|
||||
var button = event.target; |
|
||||
|
|
||||
if (!$(button).hasClass(ClassName.BUTTON)) { |
|
||||
button = $(button).closest(Selector.BUTTON); |
|
||||
} |
|
||||
|
|
||||
Button._jQueryInterface.call($(button), 'toggle'); |
|
||||
}).on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) { |
|
||||
var button = $(event.target).closest(Selector.BUTTON)[0]; |
|
||||
$(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type)); |
|
||||
}); |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* jQuery |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
$.fn[NAME] = Button._jQueryInterface; |
|
||||
$.fn[NAME].Constructor = Button; |
|
||||
$.fn[NAME].noConflict = function () { |
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT; |
|
||||
return Button._jQueryInterface; |
|
||||
}; |
|
||||
|
|
||||
return Button; |
|
||||
}(jQuery); |
|
||||
|
|
||||
exports.default = Button; |
|
||||
}); |
|
@ -1,514 +0,0 @@ |
|||||
define(['exports', './util'], function (exports, _util) { |
|
||||
'use strict'; |
|
||||
|
|
||||
Object.defineProperty(exports, "__esModule", { |
|
||||
value: true |
|
||||
}); |
|
||||
|
|
||||
var _util2 = _interopRequireDefault(_util); |
|
||||
|
|
||||
function _interopRequireDefault(obj) { |
|
||||
return obj && obj.__esModule ? obj : { |
|
||||
default: obj |
|
||||
}; |
|
||||
} |
|
||||
|
|
||||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { |
|
||||
return typeof obj; |
|
||||
} : function (obj) { |
|
||||
return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; |
|
||||
}; |
|
||||
|
|
||||
function _classCallCheck(instance, Constructor) { |
|
||||
if (!(instance instanceof Constructor)) { |
|
||||
throw new TypeError("Cannot call a class as a function"); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
var _createClass = function () { |
|
||||
function defineProperties(target, props) { |
|
||||
for (var i = 0; i < props.length; i++) { |
|
||||
var descriptor = props[i]; |
|
||||
descriptor.enumerable = descriptor.enumerable || false; |
|
||||
descriptor.configurable = true; |
|
||||
if ("value" in descriptor) descriptor.writable = true; |
|
||||
Object.defineProperty(target, descriptor.key, descriptor); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
return function (Constructor, protoProps, staticProps) { |
|
||||
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
|
||||
if (staticProps) defineProperties(Constructor, staticProps); |
|
||||
return Constructor; |
|
||||
}; |
|
||||
}(); |
|
||||
|
|
||||
/** |
|
||||
* -------------------------------------------------------------------------- |
|
||||
* Bootstrap (v4.0.0-alpha.4): carousel.js |
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
|
||||
* -------------------------------------------------------------------------- |
|
||||
*/ |
|
||||
|
|
||||
var Carousel = function ($) { |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* Constants |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
var NAME = 'carousel'; |
|
||||
var VERSION = '4.0.0-alpha.4'; |
|
||||
var DATA_KEY = 'bs.carousel'; |
|
||||
var EVENT_KEY = '.' + DATA_KEY; |
|
||||
var DATA_API_KEY = '.data-api'; |
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME]; |
|
||||
var TRANSITION_DURATION = 600; |
|
||||
var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
|
|
||||
var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
|
|
||||
|
|
||||
var Default = { |
|
||||
interval: 5000, |
|
||||
keyboard: true, |
|
||||
slide: false, |
|
||||
pause: 'hover', |
|
||||
wrap: true |
|
||||
}; |
|
||||
|
|
||||
var DefaultType = { |
|
||||
interval: '(number|boolean)', |
|
||||
keyboard: 'boolean', |
|
||||
slide: '(boolean|string)', |
|
||||
pause: '(string|boolean)', |
|
||||
wrap: 'boolean' |
|
||||
}; |
|
||||
|
|
||||
var Direction = { |
|
||||
NEXT: 'next', |
|
||||
PREVIOUS: 'prev' |
|
||||
}; |
|
||||
|
|
||||
var Event = { |
|
||||
SLIDE: 'slide' + EVENT_KEY, |
|
||||
SLID: 'slid' + EVENT_KEY, |
|
||||
KEYDOWN: 'keydown' + EVENT_KEY, |
|
||||
MOUSEENTER: 'mouseenter' + EVENT_KEY, |
|
||||
MOUSELEAVE: 'mouseleave' + EVENT_KEY, |
|
||||
LOAD_DATA_API: 'load' + EVENT_KEY + DATA_API_KEY, |
|
||||
CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY |
|
||||
}; |
|
||||
|
|
||||
var ClassName = { |
|
||||
CAROUSEL: 'carousel', |
|
||||
ACTIVE: 'active', |
|
||||
SLIDE: 'slide', |
|
||||
RIGHT: 'right', |
|
||||
LEFT: 'left', |
|
||||
ITEM: 'carousel-item' |
|
||||
}; |
|
||||
|
|
||||
var Selector = { |
|
||||
ACTIVE: '.active', |
|
||||
ACTIVE_ITEM: '.active.carousel-item', |
|
||||
ITEM: '.carousel-item', |
|
||||
NEXT_PREV: '.next, .prev', |
|
||||
INDICATORS: '.carousel-indicators', |
|
||||
DATA_SLIDE: '[data-slide], [data-slide-to]', |
|
||||
DATA_RIDE: '[data-ride="carousel"]' |
|
||||
}; |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* Class Definition |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
var Carousel = function () { |
|
||||
function Carousel(element, config) { |
|
||||
_classCallCheck(this, Carousel); |
|
||||
|
|
||||
this._items = null; |
|
||||
this._interval = null; |
|
||||
this._activeElement = null; |
|
||||
|
|
||||
this._isPaused = false; |
|
||||
this._isSliding = false; |
|
||||
|
|
||||
this._config = this._getConfig(config); |
|
||||
this._element = $(element)[0]; |
|
||||
this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0]; |
|
||||
|
|
||||
this._addEventListeners(); |
|
||||
} |
|
||||
|
|
||||
// getters
|
|
||||
|
|
||||
_createClass(Carousel, [{ |
|
||||
key: 'next', |
|
||||
value: function next() { |
|
||||
if (!this._isSliding) { |
|
||||
this._slide(Direction.NEXT); |
|
||||
} |
|
||||
} |
|
||||
}, { |
|
||||
key: 'nextWhenVisible', |
|
||||
value: function nextWhenVisible() { |
|
||||
// Don't call next when the page isn't visible
|
|
||||
if (!document.hidden) { |
|
||||
this.next(); |
|
||||
} |
|
||||
} |
|
||||
}, { |
|
||||
key: 'prev', |
|
||||
value: function prev() { |
|
||||
if (!this._isSliding) { |
|
||||
this._slide(Direction.PREVIOUS); |
|
||||
} |
|
||||
} |
|
||||
}, { |
|
||||
key: 'pause', |
|
||||
value: function pause(event) { |
|
||||
if (!event) { |
|
||||
this._isPaused = true; |
|
||||
} |
|
||||
|
|
||||
if ($(this._element).find(Selector.NEXT_PREV)[0] && _util2.default.supportsTransitionEnd()) { |
|
||||
_util2.default.triggerTransitionEnd(this._element); |
|
||||
this.cycle(true); |
|
||||
} |
|
||||
|
|
||||
clearInterval(this._interval); |
|
||||
this._interval = null; |
|
||||
} |
|
||||
}, { |
|
||||
key: 'cycle', |
|
||||
value: function cycle(event) { |
|
||||
if (!event) { |
|
||||
this._isPaused = false; |
|
||||
} |
|
||||
|
|
||||
if (this._interval) { |
|
||||
clearInterval(this._interval); |
|
||||
this._interval = null; |
|
||||
} |
|
||||
|
|
||||
if (this._config.interval && !this._isPaused) { |
|
||||
this._interval = setInterval($.proxy(document.visibilityState ? this.nextWhenVisible : this.next, this), this._config.interval); |
|
||||
} |
|
||||
} |
|
||||
}, { |
|
||||
key: 'to', |
|
||||
value: function to(index) { |
|
||||
var _this = this; |
|
||||
|
|
||||
this._activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0]; |
|
||||
|
|
||||
var activeIndex = this._getItemIndex(this._activeElement); |
|
||||
|
|
||||
if (index > this._items.length - 1 || index < 0) { |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
if (this._isSliding) { |
|
||||
$(this._element).one(Event.SLID, function () { |
|
||||
return _this.to(index); |
|
||||
}); |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
if (activeIndex === index) { |
|
||||
this.pause(); |
|
||||
this.cycle(); |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
var direction = index > activeIndex ? Direction.NEXT : Direction.PREVIOUS; |
|
||||
|
|
||||
this._slide(direction, this._items[index]); |
|
||||
} |
|
||||
}, { |
|
||||
key: 'dispose', |
|
||||
value: function dispose() { |
|
||||
$(this._element).off(EVENT_KEY); |
|
||||
$.removeData(this._element, DATA_KEY); |
|
||||
|
|
||||
this._items = null; |
|
||||
this._config = null; |
|
||||
this._element = null; |
|
||||
this._interval = null; |
|
||||
this._isPaused = null; |
|
||||
this._isSliding = null; |
|
||||
this._activeElement = null; |
|
||||
this._indicatorsElement = null; |
|
||||
} |
|
||||
}, { |
|
||||
key: '_getConfig', |
|
||||
value: function _getConfig(config) { |
|
||||
config = $.extend({}, Default, config); |
|
||||
_util2.default.typeCheckConfig(NAME, config, DefaultType); |
|
||||
return config; |
|
||||
} |
|
||||
}, { |
|
||||
key: '_addEventListeners', |
|
||||
value: function _addEventListeners() { |
|
||||
if (this._config.keyboard) { |
|
||||
$(this._element).on(Event.KEYDOWN, $.proxy(this._keydown, this)); |
|
||||
} |
|
||||
|
|
||||
if (this._config.pause === 'hover' && !('ontouchstart' in document.documentElement)) { |
|
||||
$(this._element).on(Event.MOUSEENTER, $.proxy(this.pause, this)).on(Event.MOUSELEAVE, $.proxy(this.cycle, this)); |
|
||||
} |
|
||||
} |
|
||||
}, { |
|
||||
key: '_keydown', |
|
||||
value: function _keydown(event) { |
|
||||
event.preventDefault(); |
|
||||
|
|
||||
if (/input|textarea/i.test(event.target.tagName)) { |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
switch (event.which) { |
|
||||
case ARROW_LEFT_KEYCODE: |
|
||||
this.prev(); |
|
||||
break; |
|
||||
case ARROW_RIGHT_KEYCODE: |
|
||||
this.next(); |
|
||||
break; |
|
||||
default: |
|
||||
return; |
|
||||
} |
|
||||
} |
|
||||
}, { |
|
||||
key: '_getItemIndex', |
|
||||
value: function _getItemIndex(element) { |
|
||||
this._items = $.makeArray($(element).parent().find(Selector.ITEM)); |
|
||||
return this._items.indexOf(element); |
|
||||
} |
|
||||
}, { |
|
||||
key: '_getItemByDirection', |
|
||||
value: function _getItemByDirection(direction, activeElement) { |
|
||||
var isNextDirection = direction === Direction.NEXT; |
|
||||
var isPrevDirection = direction === Direction.PREVIOUS; |
|
||||
var activeIndex = this._getItemIndex(activeElement); |
|
||||
var lastItemIndex = this._items.length - 1; |
|
||||
var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex; |
|
||||
|
|
||||
if (isGoingToWrap && !this._config.wrap) { |
|
||||
return activeElement; |
|
||||
} |
|
||||
|
|
||||
var delta = direction === Direction.PREVIOUS ? -1 : 1; |
|
||||
var itemIndex = (activeIndex + delta) % this._items.length; |
|
||||
|
|
||||
return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex]; |
|
||||
} |
|
||||
}, { |
|
||||
key: '_triggerSlideEvent', |
|
||||
value: function _triggerSlideEvent(relatedTarget, directionalClassname) { |
|
||||
var slideEvent = $.Event(Event.SLIDE, { |
|
||||
relatedTarget: relatedTarget, |
|
||||
direction: directionalClassname |
|
||||
}); |
|
||||
|
|
||||
$(this._element).trigger(slideEvent); |
|
||||
|
|
||||
return slideEvent; |
|
||||
} |
|
||||
}, { |
|
||||
key: '_setActiveIndicatorElement', |
|
||||
value: function _setActiveIndicatorElement(element) { |
|
||||
if (this._indicatorsElement) { |
|
||||
$(this._indicatorsElement).find(Selector.ACTIVE).removeClass(ClassName.ACTIVE); |
|
||||
|
|
||||
var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)]; |
|
||||
|
|
||||
if (nextIndicator) { |
|
||||
$(nextIndicator).addClass(ClassName.ACTIVE); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
}, { |
|
||||
key: '_slide', |
|
||||
value: function _slide(direction, element) { |
|
||||
var _this2 = this; |
|
||||
|
|
||||
var activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0]; |
|
||||
var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement); |
|
||||
|
|
||||
var isCycling = Boolean(this._interval); |
|
||||
|
|
||||
var directionalClassName = direction === Direction.NEXT ? ClassName.LEFT : ClassName.RIGHT; |
|
||||
|
|
||||
if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) { |
|
||||
this._isSliding = false; |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
var slideEvent = this._triggerSlideEvent(nextElement, directionalClassName); |
|
||||
if (slideEvent.isDefaultPrevented()) { |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
if (!activeElement || !nextElement) { |
|
||||
// some weirdness is happening, so we bail
|
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
this._isSliding = true; |
|
||||
|
|
||||
if (isCycling) { |
|
||||
this.pause(); |
|
||||
} |
|
||||
|
|
||||
this._setActiveIndicatorElement(nextElement); |
|
||||
|
|
||||
var slidEvent = $.Event(Event.SLID, { |
|
||||
relatedTarget: nextElement, |
|
||||
direction: directionalClassName |
|
||||
}); |
|
||||
|
|
||||
if (_util2.default.supportsTransitionEnd() && $(this._element).hasClass(ClassName.SLIDE)) { |
|
||||
|
|
||||
$(nextElement).addClass(direction); |
|
||||
|
|
||||
_util2.default.reflow(nextElement); |
|
||||
|
|
||||
$(activeElement).addClass(directionalClassName); |
|
||||
$(nextElement).addClass(directionalClassName); |
|
||||
|
|
||||
$(activeElement).one(_util2.default.TRANSITION_END, function () { |
|
||||
$(nextElement).removeClass(directionalClassName).removeClass(direction); |
|
||||
|
|
||||
$(nextElement).addClass(ClassName.ACTIVE); |
|
||||
|
|
||||
$(activeElement).removeClass(ClassName.ACTIVE).removeClass(direction).removeClass(directionalClassName); |
|
||||
|
|
||||
_this2._isSliding = false; |
|
||||
|
|
||||
setTimeout(function () { |
|
||||
return $(_this2._element).trigger(slidEvent); |
|
||||
}, 0); |
|
||||
}).emulateTransitionEnd(TRANSITION_DURATION); |
|
||||
} else { |
|
||||
$(activeElement).removeClass(ClassName.ACTIVE); |
|
||||
$(nextElement).addClass(ClassName.ACTIVE); |
|
||||
|
|
||||
this._isSliding = false; |
|
||||
$(this._element).trigger(slidEvent); |
|
||||
} |
|
||||
|
|
||||
if (isCycling) { |
|
||||
this.cycle(); |
|
||||
} |
|
||||
} |
|
||||
}], [{ |
|
||||
key: '_jQueryInterface', |
|
||||
value: function _jQueryInterface(config) { |
|
||||
return this.each(function () { |
|
||||
var data = $(this).data(DATA_KEY); |
|
||||
var _config = $.extend({}, Default, $(this).data()); |
|
||||
|
|
||||
if ((typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object') { |
|
||||
$.extend(_config, config); |
|
||||
} |
|
||||
|
|
||||
var action = typeof config === 'string' ? config : _config.slide; |
|
||||
|
|
||||
if (!data) { |
|
||||
data = new Carousel(this, _config); |
|
||||
$(this).data(DATA_KEY, data); |
|
||||
} |
|
||||
|
|
||||
if (typeof config === 'number') { |
|
||||
data.to(config); |
|
||||
} else if (typeof action === 'string') { |
|
||||
if (data[action] === undefined) { |
|
||||
throw new Error('No method named "' + action + '"'); |
|
||||
} |
|
||||
data[action](); |
|
||||
} else if (_config.interval) { |
|
||||
data.pause(); |
|
||||
data.cycle(); |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
}, { |
|
||||
key: '_dataApiClickHandler', |
|
||||
value: function _dataApiClickHandler(event) { |
|
||||
var selector = _util2.default.getSelectorFromElement(this); |
|
||||
|
|
||||
if (!selector) { |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
var target = $(selector)[0]; |
|
||||
|
|
||||
if (!target || !$(target).hasClass(ClassName.CAROUSEL)) { |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
var config = $.extend({}, $(target).data(), $(this).data()); |
|
||||
var slideIndex = this.getAttribute('data-slide-to'); |
|
||||
|
|
||||
if (slideIndex) { |
|
||||
config.interval = false; |
|
||||
} |
|
||||
|
|
||||
Carousel._jQueryInterface.call($(target), config); |
|
||||
|
|
||||
if (slideIndex) { |
|
||||
$(target).data(DATA_KEY).to(slideIndex); |
|
||||
} |
|
||||
|
|
||||
event.preventDefault(); |
|
||||
} |
|
||||
}, { |
|
||||
key: 'VERSION', |
|
||||
get: function get() { |
|
||||
return VERSION; |
|
||||
} |
|
||||
}, { |
|
||||
key: 'Default', |
|
||||
get: function get() { |
|
||||
return Default; |
|
||||
} |
|
||||
}]); |
|
||||
|
|
||||
return Carousel; |
|
||||
}(); |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* Data Api implementation |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler); |
|
||||
|
|
||||
$(window).on(Event.LOAD_DATA_API, function () { |
|
||||
$(Selector.DATA_RIDE).each(function () { |
|
||||
var $carousel = $(this); |
|
||||
Carousel._jQueryInterface.call($carousel, $carousel.data()); |
|
||||
}); |
|
||||
}); |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* jQuery |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
$.fn[NAME] = Carousel._jQueryInterface; |
|
||||
$.fn[NAME].Constructor = Carousel; |
|
||||
$.fn[NAME].noConflict = function () { |
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT; |
|
||||
return Carousel._jQueryInterface; |
|
||||
}; |
|
||||
|
|
||||
return Carousel; |
|
||||
}(jQuery); |
|
||||
|
|
||||
exports.default = Carousel; |
|
||||
}); |
|
@ -1,396 +0,0 @@ |
|||||
define(['exports', './util'], function (exports, _util) { |
|
||||
'use strict'; |
|
||||
|
|
||||
Object.defineProperty(exports, "__esModule", { |
|
||||
value: true |
|
||||
}); |
|
||||
|
|
||||
var _util2 = _interopRequireDefault(_util); |
|
||||
|
|
||||
function _interopRequireDefault(obj) { |
|
||||
return obj && obj.__esModule ? obj : { |
|
||||
default: obj |
|
||||
}; |
|
||||
} |
|
||||
|
|
||||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { |
|
||||
return typeof obj; |
|
||||
} : function (obj) { |
|
||||
return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; |
|
||||
}; |
|
||||
|
|
||||
function _classCallCheck(instance, Constructor) { |
|
||||
if (!(instance instanceof Constructor)) { |
|
||||
throw new TypeError("Cannot call a class as a function"); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
var _createClass = function () { |
|
||||
function defineProperties(target, props) { |
|
||||
for (var i = 0; i < props.length; i++) { |
|
||||
var descriptor = props[i]; |
|
||||
descriptor.enumerable = descriptor.enumerable || false; |
|
||||
descriptor.configurable = true; |
|
||||
if ("value" in descriptor) descriptor.writable = true; |
|
||||
Object.defineProperty(target, descriptor.key, descriptor); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
return function (Constructor, protoProps, staticProps) { |
|
||||
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
|
||||
if (staticProps) defineProperties(Constructor, staticProps); |
|
||||
return Constructor; |
|
||||
}; |
|
||||
}(); |
|
||||
|
|
||||
/** |
|
||||
* -------------------------------------------------------------------------- |
|
||||
* Bootstrap (v4.0.0-alpha.4): collapse.js |
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
|
||||
* -------------------------------------------------------------------------- |
|
||||
*/ |
|
||||
|
|
||||
var Collapse = function ($) { |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* Constants |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
var NAME = 'collapse'; |
|
||||
var VERSION = '4.0.0-alpha.4'; |
|
||||
var DATA_KEY = 'bs.collapse'; |
|
||||
var EVENT_KEY = '.' + DATA_KEY; |
|
||||
var DATA_API_KEY = '.data-api'; |
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME]; |
|
||||
var TRANSITION_DURATION = 600; |
|
||||
|
|
||||
var Default = { |
|
||||
toggle: true, |
|
||||
parent: '' |
|
||||
}; |
|
||||
|
|
||||
var DefaultType = { |
|
||||
toggle: 'boolean', |
|
||||
parent: 'string' |
|
||||
}; |
|
||||
|
|
||||
var Event = { |
|
||||
SHOW: 'show' + EVENT_KEY, |
|
||||
SHOWN: 'shown' + EVENT_KEY, |
|
||||
HIDE: 'hide' + EVENT_KEY, |
|
||||
HIDDEN: 'hidden' + EVENT_KEY, |
|
||||
CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY |
|
||||
}; |
|
||||
|
|
||||
var ClassName = { |
|
||||
IN: 'in', |
|
||||
COLLAPSE: 'collapse', |
|
||||
COLLAPSING: 'collapsing', |
|
||||
COLLAPSED: 'collapsed' |
|
||||
}; |
|
||||
|
|
||||
var Dimension = { |
|
||||
WIDTH: 'width', |
|
||||
HEIGHT: 'height' |
|
||||
}; |
|
||||
|
|
||||
var Selector = { |
|
||||
ACTIVES: '.panel > .in, .panel > .collapsing', |
|
||||
DATA_TOGGLE: '[data-toggle="collapse"]' |
|
||||
}; |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* Class Definition |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
var Collapse = function () { |
|
||||
function Collapse(element, config) { |
|
||||
_classCallCheck(this, Collapse); |
|
||||
|
|
||||
this._isTransitioning = false; |
|
||||
this._element = element; |
|
||||
this._config = this._getConfig(config); |
|
||||
this._triggerArray = $.makeArray($('[data-toggle="collapse"][href="#' + element.id + '"],' + ('[data-toggle="collapse"][data-target="#' + element.id + '"]'))); |
|
||||
|
|
||||
this._parent = this._config.parent ? this._getParent() : null; |
|
||||
|
|
||||
if (!this._config.parent) { |
|
||||
this._addAriaAndCollapsedClass(this._element, this._triggerArray); |
|
||||
} |
|
||||
|
|
||||
if (this._config.toggle) { |
|
||||
this.toggle(); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
// getters
|
|
||||
|
|
||||
_createClass(Collapse, [{ |
|
||||
key: 'toggle', |
|
||||
value: function toggle() { |
|
||||
if ($(this._element).hasClass(ClassName.IN)) { |
|
||||
this.hide(); |
|
||||
} else { |
|
||||
this.show(); |
|
||||
} |
|
||||
} |
|
||||
}, { |
|
||||
key: 'show', |
|
||||
value: function show() { |
|
||||
var _this = this; |
|
||||
|
|
||||
if (this._isTransitioning || $(this._element).hasClass(ClassName.IN)) { |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
var actives = void 0; |
|
||||
var activesData = void 0; |
|
||||
|
|
||||
if (this._parent) { |
|
||||
actives = $.makeArray($(Selector.ACTIVES)); |
|
||||
if (!actives.length) { |
|
||||
actives = null; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
if (actives) { |
|
||||
activesData = $(actives).data(DATA_KEY); |
|
||||
if (activesData && activesData._isTransitioning) { |
|
||||
return; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
var startEvent = $.Event(Event.SHOW); |
|
||||
$(this._element).trigger(startEvent); |
|
||||
if (startEvent.isDefaultPrevented()) { |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
if (actives) { |
|
||||
Collapse._jQueryInterface.call($(actives), 'hide'); |
|
||||
if (!activesData) { |
|
||||
$(actives).data(DATA_KEY, null); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
var dimension = this._getDimension(); |
|
||||
|
|
||||
$(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING); |
|
||||
|
|
||||
this._element.style[dimension] = 0; |
|
||||
this._element.setAttribute('aria-expanded', true); |
|
||||
|
|
||||
if (this._triggerArray.length) { |
|
||||
$(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true); |
|
||||
} |
|
||||
|
|
||||
this.setTransitioning(true); |
|
||||
|
|
||||
var complete = function complete() { |
|
||||
$(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.IN); |
|
||||
|
|
||||
_this._element.style[dimension] = ''; |
|
||||
|
|
||||
_this.setTransitioning(false); |
|
||||
|
|
||||
$(_this._element).trigger(Event.SHOWN); |
|
||||
}; |
|
||||
|
|
||||
if (!_util2.default.supportsTransitionEnd()) { |
|
||||
complete(); |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1); |
|
||||
var scrollSize = 'scroll' + capitalizedDimension; |
|
||||
|
|
||||
$(this._element).one(_util2.default.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); |
|
||||
|
|
||||
this._element.style[dimension] = this._element[scrollSize] + 'px'; |
|
||||
} |
|
||||
}, { |
|
||||
key: 'hide', |
|
||||
value: function hide() { |
|
||||
var _this2 = this; |
|
||||
|
|
||||
if (this._isTransitioning || !$(this._element).hasClass(ClassName.IN)) { |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
var startEvent = $.Event(Event.HIDE); |
|
||||
$(this._element).trigger(startEvent); |
|
||||
if (startEvent.isDefaultPrevented()) { |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
var dimension = this._getDimension(); |
|
||||
var offsetDimension = dimension === Dimension.WIDTH ? 'offsetWidth' : 'offsetHeight'; |
|
||||
|
|
||||
this._element.style[dimension] = this._element[offsetDimension] + 'px'; |
|
||||
|
|
||||
_util2.default.reflow(this._element); |
|
||||
|
|
||||
$(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.IN); |
|
||||
|
|
||||
this._element.setAttribute('aria-expanded', false); |
|
||||
|
|
||||
if (this._triggerArray.length) { |
|
||||
$(this._triggerArray).addClass(ClassName.COLLAPSED).attr('aria-expanded', false); |
|
||||
} |
|
||||
|
|
||||
this.setTransitioning(true); |
|
||||
|
|
||||
var complete = function complete() { |
|
||||
_this2.setTransitioning(false); |
|
||||
$(_this2._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN); |
|
||||
}; |
|
||||
|
|
||||
this._element.style[dimension] = 0; |
|
||||
|
|
||||
if (!_util2.default.supportsTransitionEnd()) { |
|
||||
complete(); |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
$(this._element).one(_util2.default.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); |
|
||||
} |
|
||||
}, { |
|
||||
key: 'setTransitioning', |
|
||||
value: function setTransitioning(isTransitioning) { |
|
||||
this._isTransitioning = isTransitioning; |
|
||||
} |
|
||||
}, { |
|
||||
key: 'dispose', |
|
||||
value: function dispose() { |
|
||||
$.removeData(this._element, DATA_KEY); |
|
||||
|
|
||||
this._config = null; |
|
||||
this._parent = null; |
|
||||
this._element = null; |
|
||||
this._triggerArray = null; |
|
||||
this._isTransitioning = null; |
|
||||
} |
|
||||
}, { |
|
||||
key: '_getConfig', |
|
||||
value: function _getConfig(config) { |
|
||||
config = $.extend({}, Default, config); |
|
||||
config.toggle = Boolean(config.toggle); // coerce string values
|
|
||||
_util2.default.typeCheckConfig(NAME, config, DefaultType); |
|
||||
return config; |
|
||||
} |
|
||||
}, { |
|
||||
key: '_getDimension', |
|
||||
value: function _getDimension() { |
|
||||
var hasWidth = $(this._element).hasClass(Dimension.WIDTH); |
|
||||
return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT; |
|
||||
} |
|
||||
}, { |
|
||||
key: '_getParent', |
|
||||
value: function _getParent() { |
|
||||
var _this3 = this; |
|
||||
|
|
||||
var parent = $(this._config.parent)[0]; |
|
||||
var selector = '[data-toggle="collapse"][data-parent="' + this._config.parent + '"]'; |
|
||||
|
|
||||
$(parent).find(selector).each(function (i, element) { |
|
||||
_this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]); |
|
||||
}); |
|
||||
|
|
||||
return parent; |
|
||||
} |
|
||||
}, { |
|
||||
key: '_addAriaAndCollapsedClass', |
|
||||
value: function _addAriaAndCollapsedClass(element, triggerArray) { |
|
||||
if (element) { |
|
||||
var isOpen = $(element).hasClass(ClassName.IN); |
|
||||
element.setAttribute('aria-expanded', isOpen); |
|
||||
|
|
||||
if (triggerArray.length) { |
|
||||
$(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
}], [{ |
|
||||
key: '_getTargetFromElement', |
|
||||
value: function _getTargetFromElement(element) { |
|
||||
var selector = _util2.default.getSelectorFromElement(element); |
|
||||
return selector ? $(selector)[0] : null; |
|
||||
} |
|
||||
}, { |
|
||||
key: '_jQueryInterface', |
|
||||
value: function _jQueryInterface(config) { |
|
||||
return this.each(function () { |
|
||||
var $this = $(this); |
|
||||
var data = $this.data(DATA_KEY); |
|
||||
var _config = $.extend({}, Default, $this.data(), (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' && config); |
|
||||
|
|
||||
if (!data && _config.toggle && /show|hide/.test(config)) { |
|
||||
_config.toggle = false; |
|
||||
} |
|
||||
|
|
||||
if (!data) { |
|
||||
data = new Collapse(this, _config); |
|
||||
$this.data(DATA_KEY, data); |
|
||||
} |
|
||||
|
|
||||
if (typeof config === 'string') { |
|
||||
if (data[config] === undefined) { |
|
||||
throw new Error('No method named "' + config + '"'); |
|
||||
} |
|
||||
data[config](); |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
}, { |
|
||||
key: 'VERSION', |
|
||||
get: function get() { |
|
||||
return VERSION; |
|
||||
} |
|
||||
}, { |
|
||||
key: 'Default', |
|
||||
get: function get() { |
|
||||
return Default; |
|
||||
} |
|
||||
}]); |
|
||||
|
|
||||
return Collapse; |
|
||||
}(); |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* Data Api implementation |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { |
|
||||
event.preventDefault(); |
|
||||
|
|
||||
var target = Collapse._getTargetFromElement(this); |
|
||||
var data = $(target).data(DATA_KEY); |
|
||||
var config = data ? 'toggle' : $(this).data(); |
|
||||
|
|
||||
Collapse._jQueryInterface.call($(target), config); |
|
||||
}); |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* jQuery |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
$.fn[NAME] = Collapse._jQueryInterface; |
|
||||
$.fn[NAME].Constructor = Collapse; |
|
||||
$.fn[NAME].noConflict = function () { |
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT; |
|
||||
return Collapse._jQueryInterface; |
|
||||
}; |
|
||||
|
|
||||
return Collapse; |
|
||||
}(jQuery); |
|
||||
|
|
||||
exports.default = Collapse; |
|
||||
}); |
|
@ -1,165 +0,0 @@ |
|||||
// This file is part of Moodle - http://moodle.org/
|
|
||||
//
|
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
|
||||
// it under the terms of the GNU General Public License as published by
|
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||
// (at your option) any later version.
|
|
||||
//
|
|
||||
// Moodle is distributed in the hope that it will be useful,
|
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||
// GNU General Public License for more details.
|
|
||||
//
|
|
||||
// You should have received a copy of the GNU General Public License
|
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
|
||||
|
|
||||
/** |
|
||||
* Contain the logic for a drawer. |
|
||||
* |
|
||||
* @package theme_ilb |
|
||||
* @copyright 2016 Damyon Wiese |
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
|
||||
*/ |
|
||||
define(['jquery', 'core/custom_interaction_events', 'core/log'], |
|
||||
function($, CustomEvents, Log) { |
|
||||
|
|
||||
var SELECTORS = { |
|
||||
TOGGLE_REGION: '[data-region="drawer-toggle"]', |
|
||||
TOGGLE_ACTION: '[data-action="toggle-drawer"]', |
|
||||
TOGGLE_TARGET: 'aria-controls', |
|
||||
TOGGLE_SIDE: 'left', |
|
||||
BODY: 'body' |
|
||||
}; |
|
||||
|
|
||||
/** |
|
||||
* Constructor for the Drawer. |
|
||||
* |
|
||||
* @param {object} root The root jQuery element for the modal |
|
||||
*/ |
|
||||
var Drawer = function() { |
|
||||
|
|
||||
if (!$(SELECTORS.TOGGLE_REGION).length) { |
|
||||
Log.debug('Page is missing a drawer region'); |
|
||||
} |
|
||||
if (!$(SELECTORS.TOGGLE_ACTION).length) { |
|
||||
Log.debug('Page is missing a drawer toggle link'); |
|
||||
} |
|
||||
$(SELECTORS.TOGGLE_REGION).each(function(index, ele) { |
|
||||
var trigger = $(ele).find(SELECTORS.TOGGLE_ACTION); |
|
||||
var drawerid = trigger.attr('aria-controls'); |
|
||||
var drawer = $(document.getElementById(drawerid)); |
|
||||
var hidden = trigger.attr('aria-expanded') == 'false'; |
|
||||
var side = trigger.attr('data-side'); |
|
||||
var body = $(SELECTORS.BODY); |
|
||||
|
|
||||
drawer.on('mousewheel DOMMouseScroll', this.preventPageScroll); |
|
||||
|
|
||||
if (!hidden) { |
|
||||
body.addClass('drawer-open-' + side); |
|
||||
trigger.attr('aria-expanded', 'true'); |
|
||||
} else { |
|
||||
trigger.attr('aria-expanded', 'false'); |
|
||||
} |
|
||||
}.bind(this)); |
|
||||
|
|
||||
this.registerEventListeners(); |
|
||||
var small = $(document).width() < 768; |
|
||||
if (small) { |
|
||||
this.closeAll(); |
|
||||
} |
|
||||
}; |
|
||||
|
|
||||
Drawer.prototype.closeAll = function() { |
|
||||
$(SELECTORS.TOGGLE_REGION).each(function(index, ele) { |
|
||||
var trigger = $(ele).find(SELECTORS.TOGGLE_ACTION); |
|
||||
var side = trigger.attr('data-side'); |
|
||||
var body = $(SELECTORS.BODY); |
|
||||
var drawerid = trigger.attr('aria-controls'); |
|
||||
var drawer = $(document.getElementById(drawerid)); |
|
||||
var preference = trigger.attr('data-preference'); |
|
||||
|
|
||||
trigger.attr('aria-expanded', 'false'); |
|
||||
body.removeClass('drawer-open-' + side); |
|
||||
drawer.attr('aria-hidden', 'true'); |
|
||||
drawer.addClass('closed'); |
|
||||
M.util.set_user_preference(preference, 'false'); |
|
||||
}); |
|
||||
}; |
|
||||
|
|
||||
/** |
|
||||
* Open / close the blocks drawer. |
|
||||
* |
|
||||
* @method toggleDrawer |
|
||||
* @param {Event} e |
|
||||
*/ |
|
||||
Drawer.prototype.toggleDrawer = function(e) { |
|
||||
var trigger = $(e.target).closest('[data-action=toggle-drawer]'); |
|
||||
var drawerid = trigger.attr('aria-controls'); |
|
||||
var drawer = $(document.getElementById(drawerid)); |
|
||||
var body = $(SELECTORS.BODY); |
|
||||
var side = trigger.attr('data-side'); |
|
||||
var preference = trigger.attr('data-preference'); |
|
||||
|
|
||||
body.addClass('drawer-ease'); |
|
||||
var open = trigger.attr('aria-expanded') == 'true'; |
|
||||
if (!open) { |
|
||||
var small = $(document).width() < 768; |
|
||||
if (small) { |
|
||||
this.closeAll(); |
|
||||
} |
|
||||
// Open.
|
|
||||
trigger.attr('aria-expanded', 'true'); |
|
||||
drawer.attr('aria-hidden', 'false'); |
|
||||
drawer.focus(); |
|
||||
body.addClass('drawer-open-' + side); |
|
||||
drawer.removeClass('closed'); |
|
||||
M.util.set_user_preference(preference, 'true'); |
|
||||
} else { |
|
||||
// Close.
|
|
||||
body.removeClass('drawer-open-' + side); |
|
||||
trigger.attr('aria-expanded', 'false'); |
|
||||
drawer.attr('aria-hidden', 'true'); |
|
||||
drawer.addClass('closed'); |
|
||||
M.util.set_user_preference(preference, 'false'); |
|
||||
} |
|
||||
}; |
|
||||
|
|
||||
/** |
|
||||
* Prevent the page from scrolling when the drawer is at max scroll. |
|
||||
* |
|
||||
* @method preventPageScroll |
|
||||
* @param {Event} e |
|
||||
*/ |
|
||||
Drawer.prototype.preventPageScroll = function(e) { |
|
||||
var delta = e.wheelDelta || (e.originalEvent && e.originalEvent.wheelDelta) || -e.originalEvent.detail, |
|
||||
bottomOverflow = (this.scrollTop + $(this).outerHeight() - this.scrollHeight) >= 0, |
|
||||
topOverflow = this.scrollTop <= 0; |
|
||||
|
|
||||
if ((delta < 0 && bottomOverflow) || (delta > 0 && topOverflow)) { |
|
||||
e.preventDefault(); |
|
||||
} |
|
||||
}; |
|
||||
|
|
||||
/** |
|
||||
* Set up all of the event handling for the modal. |
|
||||
* |
|
||||
* @method registerEventListeners |
|
||||
*/ |
|
||||
Drawer.prototype.registerEventListeners = function() { |
|
||||
|
|
||||
$(SELECTORS.TOGGLE_ACTION).each(function(index, element) { |
|
||||
CustomEvents.define($(element), [CustomEvents.events.activate]); |
|
||||
$(element).on(CustomEvents.events.activate, function(e, data) { |
|
||||
this.toggleDrawer(data.originalEvent); |
|
||||
data.originalEvent.preventDefault(); |
|
||||
}.bind(this)); |
|
||||
}.bind(this)); |
|
||||
|
|
||||
}; |
|
||||
|
|
||||
return { |
|
||||
'init': function() { |
|
||||
return new Drawer(); |
|
||||
} |
|
||||
}; |
|
||||
}); |
|
@ -1,323 +0,0 @@ |
|||||
define(['exports', './util'], function (exports, _util) { |
|
||||
'use strict'; |
|
||||
|
|
||||
Object.defineProperty(exports, "__esModule", { |
|
||||
value: true |
|
||||
}); |
|
||||
|
|
||||
var _util2 = _interopRequireDefault(_util); |
|
||||
|
|
||||
function _interopRequireDefault(obj) { |
|
||||
return obj && obj.__esModule ? obj : { |
|
||||
default: obj |
|
||||
}; |
|
||||
} |
|
||||
|
|
||||
function _classCallCheck(instance, Constructor) { |
|
||||
if (!(instance instanceof Constructor)) { |
|
||||
throw new TypeError("Cannot call a class as a function"); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
var _createClass = function () { |
|
||||
function defineProperties(target, props) { |
|
||||
for (var i = 0; i < props.length; i++) { |
|
||||
var descriptor = props[i]; |
|
||||
descriptor.enumerable = descriptor.enumerable || false; |
|
||||
descriptor.configurable = true; |
|
||||
if ("value" in descriptor) descriptor.writable = true; |
|
||||
Object.defineProperty(target, descriptor.key, descriptor); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
return function (Constructor, protoProps, staticProps) { |
|
||||
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
|
||||
if (staticProps) defineProperties(Constructor, staticProps); |
|
||||
return Constructor; |
|
||||
}; |
|
||||
}(); |
|
||||
|
|
||||
/** |
|
||||
* -------------------------------------------------------------------------- |
|
||||
* Bootstrap (v4.0.0-alpha.4): dropdown.js |
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
|
||||
* -------------------------------------------------------------------------- |
|
||||
*/ |
|
||||
|
|
||||
var Dropdown = function ($) { |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* Constants |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
var NAME = 'dropdown'; |
|
||||
var VERSION = '4.0.0-alpha.4'; |
|
||||
var DATA_KEY = 'bs.dropdown'; |
|
||||
var EVENT_KEY = '.' + DATA_KEY; |
|
||||
var DATA_API_KEY = '.data-api'; |
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME]; |
|
||||
var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
|
|
||||
var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key
|
|
||||
var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key
|
|
||||
var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse)
|
|
||||
|
|
||||
var Event = { |
|
||||
HIDE: 'hide' + EVENT_KEY, |
|
||||
HIDDEN: 'hidden' + EVENT_KEY, |
|
||||
SHOW: 'show' + EVENT_KEY, |
|
||||
SHOWN: 'shown' + EVENT_KEY, |
|
||||
CLICK: 'click' + EVENT_KEY, |
|
||||
CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY, |
|
||||
KEYDOWN_DATA_API: 'keydown' + EVENT_KEY + DATA_API_KEY |
|
||||
}; |
|
||||
|
|
||||
var ClassName = { |
|
||||
BACKDROP: 'dropdown-backdrop', |
|
||||
DISABLED: 'disabled', |
|
||||
OPEN: 'open' |
|
||||
}; |
|
||||
|
|
||||
var Selector = { |
|
||||
BACKDROP: '.dropdown-backdrop', |
|
||||
DATA_TOGGLE: '[data-toggle="dropdown"]', |
|
||||
FORM_CHILD: '.dropdown form', |
|
||||
ROLE_MENU: '[role="menu"]', |
|
||||
ROLE_LISTBOX: '[role="listbox"]', |
|
||||
NAVBAR_NAV: '.navbar-nav', |
|
||||
VISIBLE_ITEMS: '[role="menu"] li:not(.disabled) a, ' + '[role="listbox"] li:not(.disabled) a' |
|
||||
}; |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* Class Definition |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
var Dropdown = function () { |
|
||||
function Dropdown(element) { |
|
||||
_classCallCheck(this, Dropdown); |
|
||||
|
|
||||
this._element = element; |
|
||||
|
|
||||
this._addEventListeners(); |
|
||||
} |
|
||||
|
|
||||
// getters
|
|
||||
|
|
||||
_createClass(Dropdown, [{ |
|
||||
key: 'toggle', |
|
||||
value: function toggle() { |
|
||||
if (this.disabled || $(this).hasClass(ClassName.DISABLED)) { |
|
||||
return false; |
|
||||
} |
|
||||
|
|
||||
var parent = Dropdown._getParentFromElement(this); |
|
||||
var isActive = $(parent).hasClass(ClassName.OPEN); |
|
||||
|
|
||||
Dropdown._clearMenus(); |
|
||||
|
|
||||
if (isActive) { |
|
||||
return false; |
|
||||
} |
|
||||
|
|
||||
if ('ontouchstart' in document.documentElement && !$(parent).closest(Selector.NAVBAR_NAV).length) { |
|
||||
|
|
||||
// if mobile we use a backdrop because click events don't delegate
|
|
||||
var dropdown = document.createElement('div'); |
|
||||
dropdown.className = ClassName.BACKDROP; |
|
||||
$(dropdown).insertBefore(this); |
|
||||
$(dropdown).on('click', Dropdown._clearMenus); |
|
||||
} |
|
||||
|
|
||||
var relatedTarget = { relatedTarget: this }; |
|
||||
var showEvent = $.Event(Event.SHOW, relatedTarget); |
|
||||
|
|
||||
$(parent).trigger(showEvent); |
|
||||
|
|
||||
if (showEvent.isDefaultPrevented()) { |
|
||||
return false; |
|
||||
} |
|
||||
|
|
||||
this.focus(); |
|
||||
this.setAttribute('aria-expanded', 'true'); |
|
||||
|
|
||||
$(parent).toggleClass(ClassName.OPEN); |
|
||||
$(parent).trigger($.Event(Event.SHOWN, relatedTarget)); |
|
||||
|
|
||||
return false; |
|
||||
} |
|
||||
}, { |
|
||||
key: 'dispose', |
|
||||
value: function dispose() { |
|
||||
$.removeData(this._element, DATA_KEY); |
|
||||
$(this._element).off(EVENT_KEY); |
|
||||
this._element = null; |
|
||||
} |
|
||||
}, { |
|
||||
key: '_addEventListeners', |
|
||||
value: function _addEventListeners() { |
|
||||
$(this._element).on(Event.CLICK, this.toggle); |
|
||||
} |
|
||||
}], [{ |
|
||||
key: '_jQueryInterface', |
|
||||
value: function _jQueryInterface(config) { |
|
||||
return this.each(function () { |
|
||||
var data = $(this).data(DATA_KEY); |
|
||||
|
|
||||
if (!data) { |
|
||||
$(this).data(DATA_KEY, data = new Dropdown(this)); |
|
||||
} |
|
||||
|
|
||||
if (typeof config === 'string') { |
|
||||
if (data[config] === undefined) { |
|
||||
throw new Error('No method named "' + config + '"'); |
|
||||
} |
|
||||
data[config].call(this); |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
}, { |
|
||||
key: '_clearMenus', |
|
||||
value: function _clearMenus(event) { |
|
||||
if (event && event.which === RIGHT_MOUSE_BUTTON_WHICH) { |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
var backdrop = $(Selector.BACKDROP)[0]; |
|
||||
if (backdrop) { |
|
||||
backdrop.parentNode.removeChild(backdrop); |
|
||||
} |
|
||||
|
|
||||
var toggles = $.makeArray($(Selector.DATA_TOGGLE)); |
|
||||
|
|
||||
for (var i = 0; i < toggles.length; i++) { |
|
||||
var parent = Dropdown._getParentFromElement(toggles[i]); |
|
||||
var relatedTarget = { relatedTarget: toggles[i] }; |
|
||||
|
|
||||
if (!$(parent).hasClass(ClassName.OPEN)) { |
|
||||
continue; |
|
||||
} |
|
||||
|
|
||||
if (event && event.type === 'click' && /input|textarea/i.test(event.target.tagName) && $.contains(parent, event.target)) { |
|
||||
continue; |
|
||||
} |
|
||||
|
|
||||
var hideEvent = $.Event(Event.HIDE, relatedTarget); |
|
||||
$(parent).trigger(hideEvent); |
|
||||
if (hideEvent.isDefaultPrevented()) { |
|
||||
continue; |
|
||||
} |
|
||||
|
|
||||
toggles[i].setAttribute('aria-expanded', 'false'); |
|
||||
|
|
||||
$(parent).removeClass(ClassName.OPEN).trigger($.Event(Event.HIDDEN, relatedTarget)); |
|
||||
} |
|
||||
} |
|
||||
}, { |
|
||||
key: '_getParentFromElement', |
|
||||
value: function _getParentFromElement(element) { |
|
||||
var parent = void 0; |
|
||||
var selector = _util2.default.getSelectorFromElement(element); |
|
||||
|
|
||||
if (selector) { |
|
||||
parent = $(selector)[0]; |
|
||||
} |
|
||||
|
|
||||
return parent || element.parentNode; |
|
||||
} |
|
||||
}, { |
|
||||
key: '_dataApiKeydownHandler', |
|
||||
value: function _dataApiKeydownHandler(event) { |
|
||||
if (!/(38|40|27|32)/.test(event.which) || /input|textarea/i.test(event.target.tagName)) { |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
event.preventDefault(); |
|
||||
event.stopPropagation(); |
|
||||
|
|
||||
if (this.disabled || $(this).hasClass(ClassName.DISABLED)) { |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
var parent = Dropdown._getParentFromElement(this); |
|
||||
var isActive = $(parent).hasClass(ClassName.OPEN); |
|
||||
|
|
||||
if (!isActive && event.which !== ESCAPE_KEYCODE || isActive && event.which === ESCAPE_KEYCODE) { |
|
||||
|
|
||||
if (event.which === ESCAPE_KEYCODE) { |
|
||||
var toggle = $(parent).find(Selector.DATA_TOGGLE)[0]; |
|
||||
$(toggle).trigger('focus'); |
|
||||
} |
|
||||
|
|
||||
$(this).trigger('click'); |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
var items = $.makeArray($(Selector.VISIBLE_ITEMS)); |
|
||||
|
|
||||
items = items.filter(function (item) { |
|
||||
return item.offsetWidth || item.offsetHeight; |
|
||||
}); |
|
||||
|
|
||||
if (!items.length) { |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
var index = items.indexOf(event.target); |
|
||||
|
|
||||
if (event.which === ARROW_UP_KEYCODE && index > 0) { |
|
||||
// up
|
|
||||
index--; |
|
||||
} |
|
||||
|
|
||||
if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) { |
|
||||
// down
|
|
||||
index++; |
|
||||
} |
|
||||
|
|
||||
if (index < 0) { |
|
||||
index = 0; |
|
||||
} |
|
||||
|
|
||||
items[index].focus(); |
|
||||
} |
|
||||
}, { |
|
||||
key: 'VERSION', |
|
||||
get: function get() { |
|
||||
return VERSION; |
|
||||
} |
|
||||
}]); |
|
||||
|
|
||||
return Dropdown; |
|
||||
}(); |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* Data Api implementation |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
$(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.ROLE_MENU, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.ROLE_LISTBOX, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, Dropdown.prototype.toggle).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) { |
|
||||
e.stopPropagation(); |
|
||||
}); |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* jQuery |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
$.fn[NAME] = Dropdown._jQueryInterface; |
|
||||
$.fn[NAME].Constructor = Dropdown; |
|
||||
$.fn[NAME].noConflict = function () { |
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT; |
|
||||
return Dropdown._jQueryInterface; |
|
||||
}; |
|
||||
|
|
||||
return Dropdown; |
|
||||
}(jQuery); |
|
||||
|
|
||||
exports.default = Dropdown; |
|
||||
}); |
|
@ -1,65 +0,0 @@ |
|||||
// This file is part of Moodle - http://moodle.org/
|
|
||||
//
|
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
|
||||
// it under the terms of the GNU General Public License as published by
|
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||
// (at your option) any later version.
|
|
||||
//
|
|
||||
// Moodle is distributed in the hope that it will be useful,
|
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||
// GNU General Public License for more details.
|
|
||||
//
|
|
||||
// You should have received a copy of the GNU General Public License
|
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
|
||||
|
|
||||
/** |
|
||||
* Custom form error event handler to manipulate the bootstrap markup and show |
|
||||
* nicely styled errors in an mform. |
|
||||
* |
|
||||
* @module theme_ilb/form-display-errors |
|
||||
* @copyright 2016 Damyon Wiese <damyon@moodle.com> |
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
|
||||
*/ |
|
||||
define(['jquery', 'core/event'], function($, Event) { |
|
||||
return { |
|
||||
enhance: function(elementid) { |
|
||||
var element = document.getElementById(elementid); |
|
||||
$(element).on(Event.Events.FORM_FIELD_VALIDATION, function(event, msg) { |
|
||||
event.preventDefault(); |
|
||||
var parent = $(element).closest('.form-group'); |
|
||||
var feedback = parent.find('.form-control-feedback'); |
|
||||
|
|
||||
// Sometimes (atto) we have a hidden textarea backed by a real contenteditable div.
|
|
||||
if (($(element).prop("tagName") == 'TEXTAREA') && parent.find('[contenteditable]')) { |
|
||||
element = parent.find('[contenteditable]'); |
|
||||
} |
|
||||
if (msg !== '') { |
|
||||
parent.addClass('has-danger'); |
|
||||
parent.data('client-validation-error', true); |
|
||||
$(element).addClass('form-control-danger'); |
|
||||
$(element).attr('aria-describedby', feedback.attr('id')); |
|
||||
$(element).attr('aria-invalid', true); |
|
||||
feedback.attr('tabindex', 0); |
|
||||
feedback.html(msg); |
|
||||
|
|
||||
// Only display and focus when the error was not already visible.
|
|
||||
if (!feedback.is(':visible')) { |
|
||||
feedback.show(); |
|
||||
feedback.focus(); |
|
||||
} |
|
||||
|
|
||||
} else { |
|
||||
if (parent.data('client-validation-error') === true) { |
|
||||
parent.removeClass('has-danger'); |
|
||||
parent.data('client-validation-error', false); |
|
||||
$(element).removeClass('form-control-danger'); |
|
||||
$(element).removeAttr('aria-describedby'); |
|
||||
$(element).attr('aria-invalid', false); |
|
||||
feedback.hide(); |
|
||||
} |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
}; |
|
||||
}); |
|
@ -1,62 +0,0 @@ |
|||||
// This file is part of Moodle - http://moodle.org/
|
|
||||
//
|
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
|
||||
// it under the terms of the GNU General Public License as published by
|
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||
// (at your option) any later version.
|
|
||||
//
|
|
||||
// Moodle is distributed in the hope that it will be useful,
|
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||
// GNU General Public License for more details.
|
|
||||
//
|
|
||||
// You should have received a copy of the GNU General Public License
|
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
|
||||
|
|
||||
/** |
|
||||
* Template renderer for Moodle. Load and render Moodle templates with Mustache. |
|
||||
* |
|
||||
* @module core/templates |
|
||||
* @package core |
|
||||
* @class templates |
|
||||
* @copyright 2015 Damyon Wiese <damyon@moodle.com> |
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
|
||||
* @since 2.9 |
|
||||
*/ |
|
||||
define(['jquery', './tether', 'core/event'], function(jQuery, Tether, Event) { |
|
||||
|
|
||||
window.jQuery = jQuery; |
|
||||
window.Tether = Tether; |
|
||||
|
|
||||
require(['theme_ilb/util', |
|
||||
'theme_ilb/alert', |
|
||||
'theme_ilb/button', |
|
||||
'theme_ilb/carousel', |
|
||||
'theme_ilb/collapse', |
|
||||
'theme_ilb/dropdown', |
|
||||
'theme_ilb/modal', |
|
||||
'theme_ilb/scrollspy', |
|
||||
'theme_ilb/tab', |
|
||||
'theme_ilb/tooltip', |
|
||||
'theme_ilb/popover'], |
|
||||
function() { |
|
||||
|
|
||||
jQuery('body').popover({ |
|
||||
selector: '[data-toggle="popover"]', |
|
||||
trigger: 'focus' |
|
||||
}); |
|
||||
|
|
||||
// We need to call popover automatically if nodes are added to the page later.
|
|
||||
Event.getLegacyEvents().done(function(events) { |
|
||||
jQuery(document).on(events.FILTER_CONTENT_UPDATED, function() { |
|
||||
jQuery('body').popover({ |
|
||||
selector: '[data-toggle="popover"]', |
|
||||
trigger: 'focus' |
|
||||
}); |
|
||||
}); |
|
||||
}); |
|
||||
}); |
|
||||
|
|
||||
|
|
||||
return {}; |
|
||||
}); |
|
@ -1,559 +0,0 @@ |
|||||
define(['exports', './util'], function (exports, _util) { |
|
||||
'use strict'; |
|
||||
|
|
||||
Object.defineProperty(exports, "__esModule", { |
|
||||
value: true |
|
||||
}); |
|
||||
|
|
||||
var _util2 = _interopRequireDefault(_util); |
|
||||
|
|
||||
function _interopRequireDefault(obj) { |
|
||||
return obj && obj.__esModule ? obj : { |
|
||||
default: obj |
|
||||
}; |
|
||||
} |
|
||||
|
|
||||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { |
|
||||
return typeof obj; |
|
||||
} : function (obj) { |
|
||||
return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; |
|
||||
}; |
|
||||
|
|
||||
function _classCallCheck(instance, Constructor) { |
|
||||
if (!(instance instanceof Constructor)) { |
|
||||
throw new TypeError("Cannot call a class as a function"); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
var _createClass = function () { |
|
||||
function defineProperties(target, props) { |
|
||||
for (var i = 0; i < props.length; i++) { |
|
||||
var descriptor = props[i]; |
|
||||
descriptor.enumerable = descriptor.enumerable || false; |
|
||||
descriptor.configurable = true; |
|
||||
if ("value" in descriptor) descriptor.writable = true; |
|
||||
Object.defineProperty(target, descriptor.key, descriptor); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
return function (Constructor, protoProps, staticProps) { |
|
||||
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
|
||||
if (staticProps) defineProperties(Constructor, staticProps); |
|
||||
return Constructor; |
|
||||
}; |
|
||||
}(); |
|
||||
|
|
||||
/** |
|
||||
* -------------------------------------------------------------------------- |
|
||||
* Bootstrap (v4.0.0-alpha.4): modal.js |
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
|
||||
* -------------------------------------------------------------------------- |
|
||||
*/ |
|
||||
|
|
||||
var Modal = function ($) { |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* Constants |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
var NAME = 'modal'; |
|
||||
var VERSION = '4.0.0-alpha.4'; |
|
||||
var DATA_KEY = 'bs.modal'; |
|
||||
var EVENT_KEY = '.' + DATA_KEY; |
|
||||
var DATA_API_KEY = '.data-api'; |
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME]; |
|
||||
var TRANSITION_DURATION = 300; |
|
||||
var BACKDROP_TRANSITION_DURATION = 150; |
|
||||
var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
|
|
||||
|
|
||||
var Default = { |
|
||||
backdrop: true, |
|
||||
keyboard: true, |
|
||||
focus: true, |
|
||||
show: true |
|
||||
}; |
|
||||
|
|
||||
var DefaultType = { |
|
||||
backdrop: '(boolean|string)', |
|
||||
keyboard: 'boolean', |
|
||||
focus: 'boolean', |
|
||||
show: 'boolean' |
|
||||
}; |
|
||||
|
|
||||
var Event = { |
|
||||
HIDE: 'hide' + EVENT_KEY, |
|
||||
HIDDEN: 'hidden' + EVENT_KEY, |
|
||||
SHOW: 'show' + EVENT_KEY, |
|
||||
SHOWN: 'shown' + EVENT_KEY, |
|
||||
FOCUSIN: 'focusin' + EVENT_KEY, |
|
||||
RESIZE: 'resize' + EVENT_KEY, |
|
||||
CLICK_DISMISS: 'click.dismiss' + EVENT_KEY, |
|
||||
KEYDOWN_DISMISS: 'keydown.dismiss' + EVENT_KEY, |
|
||||
MOUSEUP_DISMISS: 'mouseup.dismiss' + EVENT_KEY, |
|
||||
MOUSEDOWN_DISMISS: 'mousedown.dismiss' + EVENT_KEY, |
|
||||
CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY |
|
||||
}; |
|
||||
|
|
||||
var ClassName = { |
|
||||
SCROLLBAR_MEASURER: 'modal-scrollbar-measure', |
|
||||
BACKDROP: 'modal-backdrop', |
|
||||
OPEN: 'modal-open', |
|
||||
FADE: 'fade', |
|
||||
IN: 'in' |
|
||||
}; |
|
||||
|
|
||||
var Selector = { |
|
||||
DIALOG: '.modal-dialog', |
|
||||
DATA_TOGGLE: '[data-toggle="modal"]', |
|
||||
DATA_DISMISS: '[data-dismiss="modal"]', |
|
||||
FIXED_CONTENT: '.navbar-fixed-top, .navbar-fixed-bottom, .is-fixed' |
|
||||
}; |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* Class Definition |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
var Modal = function () { |
|
||||
function Modal(element, config) { |
|
||||
_classCallCheck(this, Modal); |
|
||||
|
|
||||
this._config = this._getConfig(config); |
|
||||
this._element = element; |
|
||||
this._dialog = $(element).find(Selector.DIALOG)[0]; |
|
||||
this._backdrop = null; |
|
||||
this._isShown = false; |
|
||||
this._isBodyOverflowing = false; |
|
||||
this._ignoreBackdropClick = false; |
|
||||
this._originalBodyPadding = 0; |
|
||||
this._scrollbarWidth = 0; |
|
||||
} |
|
||||
|
|
||||
// getters
|
|
||||
|
|
||||
_createClass(Modal, [{ |
|
||||
key: 'toggle', |
|
||||
value: function toggle(relatedTarget) { |
|
||||
return this._isShown ? this.hide() : this.show(relatedTarget); |
|
||||
} |
|
||||
}, { |
|
||||
key: 'show', |
|
||||
value: function show(relatedTarget) { |
|
||||
var _this = this; |
|
||||
|
|
||||
var showEvent = $.Event(Event.SHOW, { |
|
||||
relatedTarget: relatedTarget |
|
||||
}); |
|
||||
|
|
||||
$(this._element).trigger(showEvent); |
|
||||
|
|
||||
if (this._isShown || showEvent.isDefaultPrevented()) { |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
this._isShown = true; |
|
||||
|
|
||||
this._checkScrollbar(); |
|
||||
this._setScrollbar(); |
|
||||
|
|
||||
$(document.body).addClass(ClassName.OPEN); |
|
||||
|
|
||||
this._setEscapeEvent(); |
|
||||
this._setResizeEvent(); |
|
||||
|
|
||||
$(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, $.proxy(this.hide, this)); |
|
||||
|
|
||||
$(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () { |
|
||||
$(_this._element).one(Event.MOUSEUP_DISMISS, function (event) { |
|
||||
if ($(event.target).is(_this._element)) { |
|
||||
_this._ignoreBackdropClick = true; |
|
||||
} |
|
||||
}); |
|
||||
}); |
|
||||
|
|
||||
this._showBackdrop($.proxy(this._showElement, this, relatedTarget)); |
|
||||
} |
|
||||
}, { |
|
||||
key: 'hide', |
|
||||
value: function hide(event) { |
|
||||
if (event) { |
|
||||
event.preventDefault(); |
|
||||
} |
|
||||
|
|
||||
var hideEvent = $.Event(Event.HIDE); |
|
||||
|
|
||||
$(this._element).trigger(hideEvent); |
|
||||
|
|
||||
if (!this._isShown || hideEvent.isDefaultPrevented()) { |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
this._isShown = false; |
|
||||
|
|
||||
this._setEscapeEvent(); |
|
||||
this._setResizeEvent(); |
|
||||
|
|
||||
$(document).off(Event.FOCUSIN); |
|
||||
|
|
||||
$(this._element).removeClass(ClassName.IN); |
|
||||
|
|
||||
$(this._element).off(Event.CLICK_DISMISS); |
|
||||
$(this._dialog).off(Event.MOUSEDOWN_DISMISS); |
|
||||
|
|
||||
if (_util2.default.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) { |
|
||||
|
|
||||
$(this._element).one(_util2.default.TRANSITION_END, $.proxy(this._hideModal, this)).emulateTransitionEnd(TRANSITION_DURATION); |
|
||||
} else { |
|
||||
this._hideModal(); |
|
||||
} |
|
||||
} |
|
||||
}, { |
|
||||
key: 'dispose', |
|
||||
value: function dispose() { |
|
||||
$.removeData(this._element, DATA_KEY); |
|
||||
|
|
||||
$(window).off(EVENT_KEY); |
|
||||
$(document).off(EVENT_KEY); |
|
||||
$(this._element).off(EVENT_KEY); |
|
||||
$(this._backdrop).off(EVENT_KEY); |
|
||||
|
|
||||
this._config = null; |
|
||||
this._element = null; |
|
||||
this._dialog = null; |
|
||||
this._backdrop = null; |
|
||||
this._isShown = null; |
|
||||
this._isBodyOverflowing = null; |
|
||||
this._ignoreBackdropClick = null; |
|
||||
this._originalBodyPadding = null; |
|
||||
this._scrollbarWidth = null; |
|
||||
} |
|
||||
}, { |
|
||||
key: '_getConfig', |
|
||||
value: function _getConfig(config) { |
|
||||
config = $.extend({}, Default, config); |
|
||||
_util2.default.typeCheckConfig(NAME, config, DefaultType); |
|
||||
return config; |
|
||||
} |
|
||||
}, { |
|
||||
key: '_showElement', |
|
||||
value: function _showElement(relatedTarget) { |
|
||||
var _this2 = this; |
|
||||
|
|
||||
var transition = _util2.default.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE); |
|
||||
|
|
||||
if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) { |
|
||||
// don't move modals dom position
|
|
||||
document.body.appendChild(this._element); |
|
||||
} |
|
||||
|
|
||||
this._element.style.display = 'block'; |
|
||||
this._element.removeAttribute('aria-hidden'); |
|
||||
this._element.scrollTop = 0; |
|
||||
|
|
||||
if (transition) { |
|
||||
_util2.default.reflow(this._element); |
|
||||
} |
|
||||
|
|
||||
$(this._element).addClass(ClassName.IN); |
|
||||
|
|
||||
if (this._config.focus) { |
|
||||
this._enforceFocus(); |
|
||||
} |
|
||||
|
|
||||
var shownEvent = $.Event(Event.SHOWN, { |
|
||||
relatedTarget: relatedTarget |
|
||||
}); |
|
||||
|
|
||||
var transitionComplete = function transitionComplete() { |
|
||||
if (_this2._config.focus) { |
|
||||
_this2._element.focus(); |
|
||||
} |
|
||||
$(_this2._element).trigger(shownEvent); |
|
||||
}; |
|
||||
|
|
||||
if (transition) { |
|
||||
$(this._dialog).one(_util2.default.TRANSITION_END, transitionComplete).emulateTransitionEnd(TRANSITION_DURATION); |
|
||||
} else { |
|
||||
transitionComplete(); |
|
||||
} |
|
||||
} |
|
||||
}, { |
|
||||
key: '_enforceFocus', |
|
||||
value: function _enforceFocus() { |
|
||||
var _this3 = this; |
|
||||
|
|
||||
$(document).off(Event.FOCUSIN) // guard against infinite focus loop
|
|
||||
.on(Event.FOCUSIN, function (event) { |
|
||||
if (document !== event.target && _this3._element !== event.target && !$(_this3._element).has(event.target).length) { |
|
||||
_this3._element.focus(); |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
}, { |
|
||||
key: '_setEscapeEvent', |
|
||||
value: function _setEscapeEvent() { |
|
||||
var _this4 = this; |
|
||||
|
|
||||
if (this._isShown && this._config.keyboard) { |
|
||||
$(this._element).on(Event.KEYDOWN_DISMISS, function (event) { |
|
||||
if (event.which === ESCAPE_KEYCODE) { |
|
||||
_this4.hide(); |
|
||||
} |
|
||||
}); |
|
||||
} else if (!this._isShown) { |
|
||||
$(this._element).off(Event.KEYDOWN_DISMISS); |
|
||||
} |
|
||||
} |
|
||||
}, { |
|
||||
key: '_setResizeEvent', |
|
||||
value: function _setResizeEvent() { |
|
||||
if (this._isShown) { |
|
||||
$(window).on(Event.RESIZE, $.proxy(this._handleUpdate, this)); |
|
||||
} else { |
|
||||
$(window).off(Event.RESIZE); |
|
||||
} |
|
||||
} |
|
||||
}, { |
|
||||
key: '_hideModal', |
|
||||
value: function _hideModal() { |
|
||||
var _this5 = this; |
|
||||
|
|
||||
this._element.style.display = 'none'; |
|
||||
this._element.setAttribute('aria-hidden', 'true'); |
|
||||
this._showBackdrop(function () { |
|
||||
$(document.body).removeClass(ClassName.OPEN); |
|
||||
_this5._resetAdjustments(); |
|
||||
_this5._resetScrollbar(); |
|
||||
$(_this5._element).trigger(Event.HIDDEN); |
|
||||
}); |
|
||||
} |
|
||||
}, { |
|
||||
key: '_removeBackdrop', |
|
||||
value: function _removeBackdrop() { |
|
||||
if (this._backdrop) { |
|
||||
$(this._backdrop).remove(); |
|
||||
this._backdrop = null; |
|
||||
} |
|
||||
} |
|
||||
}, { |
|
||||
key: '_showBackdrop', |
|
||||
value: function _showBackdrop(callback) { |
|
||||
var _this6 = this; |
|
||||
|
|
||||
var animate = $(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : ''; |
|
||||
|
|
||||
if (this._isShown && this._config.backdrop) { |
|
||||
var doAnimate = _util2.default.supportsTransitionEnd() && animate; |
|
||||
|
|
||||
this._backdrop = document.createElement('div'); |
|
||||
this._backdrop.className = ClassName.BACKDROP; |
|
||||
|
|
||||
if (animate) { |
|
||||
$(this._backdrop).addClass(animate); |
|
||||
} |
|
||||
|
|
||||
$(this._backdrop).appendTo(document.body); |
|
||||
|
|
||||
$(this._element).on(Event.CLICK_DISMISS, function (event) { |
|
||||
if (_this6._ignoreBackdropClick) { |
|
||||
_this6._ignoreBackdropClick = false; |
|
||||
return; |
|
||||
} |
|
||||
if (event.target !== event.currentTarget) { |
|
||||
return; |
|
||||
} |
|
||||
if (_this6._config.backdrop === 'static') { |
|
||||
_this6._element.focus(); |
|
||||
} else { |
|
||||
_this6.hide(); |
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
if (doAnimate) { |
|
||||
_util2.default.reflow(this._backdrop); |
|
||||
} |
|
||||
|
|
||||
$(this._backdrop).addClass(ClassName.IN); |
|
||||
|
|
||||
if (!callback) { |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
if (!doAnimate) { |
|
||||
callback(); |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
$(this._backdrop).one(_util2.default.TRANSITION_END, callback).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION); |
|
||||
} else if (!this._isShown && this._backdrop) { |
|
||||
$(this._backdrop).removeClass(ClassName.IN); |
|
||||
|
|
||||
var callbackRemove = function callbackRemove() { |
|
||||
_this6._removeBackdrop(); |
|
||||
if (callback) { |
|
||||
callback(); |
|
||||
} |
|
||||
}; |
|
||||
|
|
||||
if (_util2.default.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) { |
|
||||
$(this._backdrop).one(_util2.default.TRANSITION_END, callbackRemove).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION); |
|
||||
} else { |
|
||||
callbackRemove(); |
|
||||
} |
|
||||
} else if (callback) { |
|
||||
callback(); |
|
||||
} |
|
||||
} |
|
||||
}, { |
|
||||
key: '_handleUpdate', |
|
||||
value: function _handleUpdate() { |
|
||||
this._adjustDialog(); |
|
||||
} |
|
||||
}, { |
|
||||
key: '_adjustDialog', |
|
||||
value: function _adjustDialog() { |
|
||||
var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight; |
|
||||
|
|
||||
if (!this._isBodyOverflowing && isModalOverflowing) { |
|
||||
this._element.style.paddingLeft = this._scrollbarWidth + 'px'; |
|
||||
} |
|
||||
|
|
||||
if (this._isBodyOverflowing && !isModalOverflowing) { |
|
||||
this._element.style.paddingRight = this._scrollbarWidth + 'px'; |
|
||||
} |
|
||||
} |
|
||||
}, { |
|
||||
key: '_resetAdjustments', |
|
||||
value: function _resetAdjustments() { |
|
||||
this._element.style.paddingLeft = ''; |
|
||||
this._element.style.paddingRight = ''; |
|
||||
} |
|
||||
}, { |
|
||||
key: '_checkScrollbar', |
|
||||
value: function _checkScrollbar() { |
|
||||
this._isBodyOverflowing = document.body.clientWidth < window.innerWidth; |
|
||||
this._scrollbarWidth = this._getScrollbarWidth(); |
|
||||
} |
|
||||
}, { |
|
||||
key: '_setScrollbar', |
|
||||
value: function _setScrollbar() { |
|
||||
var bodyPadding = parseInt($(Selector.FIXED_CONTENT).css('padding-right') || 0, 10); |
|
||||
|
|
||||
this._originalBodyPadding = document.body.style.paddingRight || ''; |
|
||||
|
|
||||
if (this._isBodyOverflowing) { |
|
||||
document.body.style.paddingRight = bodyPadding + this._scrollbarWidth + 'px'; |
|
||||
} |
|
||||
} |
|
||||
}, { |
|
||||
key: '_resetScrollbar', |
|
||||
value: function _resetScrollbar() { |
|
||||
document.body.style.paddingRight = this._originalBodyPadding; |
|
||||
} |
|
||||
}, { |
|
||||
key: '_getScrollbarWidth', |
|
||||
value: function _getScrollbarWidth() { |
|
||||
// thx d.walsh
|
|
||||
var scrollDiv = document.createElement('div'); |
|
||||
scrollDiv.className = ClassName.SCROLLBAR_MEASURER; |
|
||||
document.body.appendChild(scrollDiv); |
|
||||
var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth; |
|
||||
document.body.removeChild(scrollDiv); |
|
||||
return scrollbarWidth; |
|
||||
} |
|
||||
}], [{ |
|
||||
key: '_jQueryInterface', |
|
||||
value: function _jQueryInterface(config, relatedTarget) { |
|
||||
return this.each(function () { |
|
||||
var data = $(this).data(DATA_KEY); |
|
||||
var _config = $.extend({}, Modal.Default, $(this).data(), (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' && config); |
|
||||
|
|
||||
if (!data) { |
|
||||
data = new Modal(this, _config); |
|
||||
$(this).data(DATA_KEY, data); |
|
||||
} |
|
||||
|
|
||||
if (typeof config === 'string') { |
|
||||
if (data[config] === undefined) { |
|
||||
throw new Error('No method named "' + config + '"'); |
|
||||
} |
|
||||
data[config](relatedTarget); |
|
||||
} else if (_config.show) { |
|
||||
data.show(relatedTarget); |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
}, { |
|
||||
key: 'VERSION', |
|
||||
get: function get() { |
|
||||
return VERSION; |
|
||||
} |
|
||||
}, { |
|
||||
key: 'Default', |
|
||||
get: function get() { |
|
||||
return Default; |
|
||||
} |
|
||||
}]); |
|
||||
|
|
||||
return Modal; |
|
||||
}(); |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* Data Api implementation |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { |
|
||||
var _this7 = this; |
|
||||
|
|
||||
var target = void 0; |
|
||||
var selector = _util2.default.getSelectorFromElement(this); |
|
||||
|
|
||||
if (selector) { |
|
||||
target = $(selector)[0]; |
|
||||
} |
|
||||
|
|
||||
var config = $(target).data(DATA_KEY) ? 'toggle' : $.extend({}, $(target).data(), $(this).data()); |
|
||||
|
|
||||
if (this.tagName === 'A') { |
|
||||
event.preventDefault(); |
|
||||
} |
|
||||
|
|
||||
var $target = $(target).one(Event.SHOW, function (showEvent) { |
|
||||
if (showEvent.isDefaultPrevented()) { |
|
||||
// only register focus restorer if modal will actually get shown
|
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
$target.one(Event.HIDDEN, function () { |
|
||||
if ($(_this7).is(':visible')) { |
|
||||
_this7.focus(); |
|
||||
} |
|
||||
}); |
|
||||
}); |
|
||||
|
|
||||
Modal._jQueryInterface.call($(target), config, this); |
|
||||
}); |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* jQuery |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
$.fn[NAME] = Modal._jQueryInterface; |
|
||||
$.fn[NAME].Constructor = Modal; |
|
||||
$.fn[NAME].noConflict = function () { |
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT; |
|
||||
return Modal._jQueryInterface; |
|
||||
}; |
|
||||
|
|
||||
return Modal; |
|
||||
}(jQuery); |
|
||||
|
|
||||
exports.default = Modal; |
|
||||
}); |
|
@ -1,250 +0,0 @@ |
|||||
define(['exports', './tooltip'], function (exports, _tooltip) { |
|
||||
'use strict'; |
|
||||
|
|
||||
Object.defineProperty(exports, "__esModule", { |
|
||||
value: true |
|
||||
}); |
|
||||
|
|
||||
var _tooltip2 = _interopRequireDefault(_tooltip); |
|
||||
|
|
||||
function _interopRequireDefault(obj) { |
|
||||
return obj && obj.__esModule ? obj : { |
|
||||
default: obj |
|
||||
}; |
|
||||
} |
|
||||
|
|
||||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { |
|
||||
return typeof obj; |
|
||||
} : function (obj) { |
|
||||
return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; |
|
||||
}; |
|
||||
|
|
||||
function _classCallCheck(instance, Constructor) { |
|
||||
if (!(instance instanceof Constructor)) { |
|
||||
throw new TypeError("Cannot call a class as a function"); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
var _createClass = function () { |
|
||||
function defineProperties(target, props) { |
|
||||
for (var i = 0; i < props.length; i++) { |
|
||||
var descriptor = props[i]; |
|
||||
descriptor.enumerable = descriptor.enumerable || false; |
|
||||
descriptor.configurable = true; |
|
||||
if ("value" in descriptor) descriptor.writable = true; |
|
||||
Object.defineProperty(target, descriptor.key, descriptor); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
return function (Constructor, protoProps, staticProps) { |
|
||||
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
|
||||
if (staticProps) defineProperties(Constructor, staticProps); |
|
||||
return Constructor; |
|
||||
}; |
|
||||
}(); |
|
||||
|
|
||||
function _possibleConstructorReturn(self, call) { |
|
||||
if (!self) { |
|
||||
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
|
||||
} |
|
||||
|
|
||||
return call && (typeof call === "object" || typeof call === "function") ? call : self; |
|
||||
} |
|
||||
|
|
||||
function _inherits(subClass, superClass) { |
|
||||
if (typeof superClass !== "function" && superClass !== null) { |
|
||||
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); |
|
||||
} |
|
||||
|
|
||||
subClass.prototype = Object.create(superClass && superClass.prototype, { |
|
||||
constructor: { |
|
||||
value: subClass, |
|
||||
enumerable: false, |
|
||||
writable: true, |
|
||||
configurable: true |
|
||||
} |
|
||||
}); |
|
||||
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* -------------------------------------------------------------------------- |
|
||||
* Bootstrap (v4.0.0-alpha.4): popover.js |
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
|
||||
* -------------------------------------------------------------------------- |
|
||||
*/ |
|
||||
|
|
||||
var Popover = function ($) { |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* Constants |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
var NAME = 'popover'; |
|
||||
var VERSION = '4.0.0-alpha.4'; |
|
||||
var DATA_KEY = 'bs.popover'; |
|
||||
var EVENT_KEY = '.' + DATA_KEY; |
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME]; |
|
||||
|
|
||||
var Default = $.extend({}, _tooltip2.default.Default, { |
|
||||
placement: 'right', |
|
||||
trigger: 'click', |
|
||||
content: '', |
|
||||
template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-title"></h3>' + '<div class="popover-content"></div></div>' |
|
||||
}); |
|
||||
|
|
||||
var DefaultType = $.extend({}, _tooltip2.default.DefaultType, { |
|
||||
content: '(string|element|function)' |
|
||||
}); |
|
||||
|
|
||||
var ClassName = { |
|
||||
FADE: 'fade', |
|
||||
IN: 'in' |
|
||||
}; |
|
||||
|
|
||||
var Selector = { |
|
||||
TITLE: '.popover-title', |
|
||||
CONTENT: '.popover-content', |
|
||||
ARROW: '.popover-arrow' |
|
||||
}; |
|
||||
|
|
||||
var Event = { |
|
||||
HIDE: 'hide' + EVENT_KEY, |
|
||||
HIDDEN: 'hidden' + EVENT_KEY, |
|
||||
SHOW: 'show' + EVENT_KEY, |
|
||||
SHOWN: 'shown' + EVENT_KEY, |
|
||||
INSERTED: 'inserted' + EVENT_KEY, |
|
||||
CLICK: 'click' + EVENT_KEY, |
|
||||
FOCUSIN: 'focusin' + EVENT_KEY, |
|
||||
FOCUSOUT: 'focusout' + EVENT_KEY, |
|
||||
MOUSEENTER: 'mouseenter' + EVENT_KEY, |
|
||||
MOUSELEAVE: 'mouseleave' + EVENT_KEY |
|
||||
}; |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* Class Definition |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
var Popover = function (_Tooltip) { |
|
||||
_inherits(Popover, _Tooltip); |
|
||||
|
|
||||
function Popover() { |
|
||||
_classCallCheck(this, Popover); |
|
||||
|
|
||||
return _possibleConstructorReturn(this, (Popover.__proto__ || Object.getPrototypeOf(Popover)).apply(this, arguments)); |
|
||||
} |
|
||||
|
|
||||
_createClass(Popover, [{ |
|
||||
key: 'isWithContent', |
|
||||
value: function isWithContent() { |
|
||||
return this.getTitle() || this._getContent(); |
|
||||
} |
|
||||
}, { |
|
||||
key: 'getTipElement', |
|
||||
value: function getTipElement() { |
|
||||
return this.tip = this.tip || $(this.config.template)[0]; |
|
||||
} |
|
||||
}, { |
|
||||
key: 'setContent', |
|
||||
value: function setContent() { |
|
||||
var $tip = $(this.getTipElement()); |
|
||||
|
|
||||
// we use append for html objects to maintain js events
|
|
||||
this.setElementContent($tip.find(Selector.TITLE), this.getTitle()); |
|
||||
this.setElementContent($tip.find(Selector.CONTENT), this._getContent()); |
|
||||
|
|
||||
$tip.removeClass(ClassName.FADE).removeClass(ClassName.IN); |
|
||||
|
|
||||
this.cleanupTether(); |
|
||||
} |
|
||||
}, { |
|
||||
key: '_getContent', |
|
||||
value: function _getContent() { |
|
||||
return this.element.getAttribute('data-content') || (typeof this.config.content === 'function' ? this.config.content.call(this.element) : this.config.content); |
|
||||
} |
|
||||
}], [{ |
|
||||
key: '_jQueryInterface', |
|
||||
value: function _jQueryInterface(config) { |
|
||||
return this.each(function () { |
|
||||
var data = $(this).data(DATA_KEY); |
|
||||
var _config = (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' ? config : null; |
|
||||
|
|
||||
if (!data && /destroy|hide/.test(config)) { |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
if (!data) { |
|
||||
data = new Popover(this, _config); |
|
||||
$(this).data(DATA_KEY, data); |
|
||||
} |
|
||||
|
|
||||
if (typeof config === 'string') { |
|
||||
if (data[config] === undefined) { |
|
||||
throw new Error('No method named "' + config + '"'); |
|
||||
} |
|
||||
data[config](); |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
}, { |
|
||||
key: 'VERSION', |
|
||||
get: function get() { |
|
||||
return VERSION; |
|
||||
} |
|
||||
}, { |
|
||||
key: 'Default', |
|
||||
get: function get() { |
|
||||
return Default; |
|
||||
} |
|
||||
}, { |
|
||||
key: 'NAME', |
|
||||
get: function get() { |
|
||||
return NAME; |
|
||||
} |
|
||||
}, { |
|
||||
key: 'DATA_KEY', |
|
||||
get: function get() { |
|
||||
return DATA_KEY; |
|
||||
} |
|
||||
}, { |
|
||||
key: 'Event', |
|
||||
get: function get() { |
|
||||
return Event; |
|
||||
} |
|
||||
}, { |
|
||||
key: 'EVENT_KEY', |
|
||||
get: function get() { |
|
||||
return EVENT_KEY; |
|
||||
} |
|
||||
}, { |
|
||||
key: 'DefaultType', |
|
||||
get: function get() { |
|
||||
return DefaultType; |
|
||||
} |
|
||||
}]); |
|
||||
|
|
||||
return Popover; |
|
||||
}(_tooltip2.default); |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* jQuery |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
$.fn[NAME] = Popover._jQueryInterface; |
|
||||
$.fn[NAME].Constructor = Popover; |
|
||||
$.fn[NAME].noConflict = function () { |
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT; |
|
||||
return Popover._jQueryInterface; |
|
||||
}; |
|
||||
|
|
||||
return Popover; |
|
||||
}(jQuery); |
|
||||
|
|
||||
exports.default = Popover; |
|
||||
}); |
|
@ -1,353 +0,0 @@ |
|||||
define(['exports', './util'], function (exports, _util) { |
|
||||
'use strict'; |
|
||||
|
|
||||
Object.defineProperty(exports, "__esModule", { |
|
||||
value: true |
|
||||
}); |
|
||||
|
|
||||
var _util2 = _interopRequireDefault(_util); |
|
||||
|
|
||||
function _interopRequireDefault(obj) { |
|
||||
return obj && obj.__esModule ? obj : { |
|
||||
default: obj |
|
||||
}; |
|
||||
} |
|
||||
|
|
||||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { |
|
||||
return typeof obj; |
|
||||
} : function (obj) { |
|
||||
return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; |
|
||||
}; |
|
||||
|
|
||||
function _classCallCheck(instance, Constructor) { |
|
||||
if (!(instance instanceof Constructor)) { |
|
||||
throw new TypeError("Cannot call a class as a function"); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
var _createClass = function () { |
|
||||
function defineProperties(target, props) { |
|
||||
for (var i = 0; i < props.length; i++) { |
|
||||
var descriptor = props[i]; |
|
||||
descriptor.enumerable = descriptor.enumerable || false; |
|
||||
descriptor.configurable = true; |
|
||||
if ("value" in descriptor) descriptor.writable = true; |
|
||||
Object.defineProperty(target, descriptor.key, descriptor); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
return function (Constructor, protoProps, staticProps) { |
|
||||
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
|
||||
if (staticProps) defineProperties(Constructor, staticProps); |
|
||||
return Constructor; |
|
||||
}; |
|
||||
}(); |
|
||||
|
|
||||
/** |
|
||||
* -------------------------------------------------------------------------- |
|
||||
* Bootstrap (v4.0.0-alpha.4): scrollspy.js |
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
|
||||
* -------------------------------------------------------------------------- |
|
||||
*/ |
|
||||
|
|
||||
var ScrollSpy = function ($) { |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* Constants |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
var NAME = 'scrollspy'; |
|
||||
var VERSION = '4.0.0-alpha.4'; |
|
||||
var DATA_KEY = 'bs.scrollspy'; |
|
||||
var EVENT_KEY = '.' + DATA_KEY; |
|
||||
var DATA_API_KEY = '.data-api'; |
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME]; |
|
||||
|
|
||||
var Default = { |
|
||||
offset: 10, |
|
||||
method: 'auto', |
|
||||
target: '' |
|
||||
}; |
|
||||
|
|
||||
var DefaultType = { |
|
||||
offset: 'number', |
|
||||
method: 'string', |
|
||||
target: '(string|element)' |
|
||||
}; |
|
||||
|
|
||||
var Event = { |
|
||||
ACTIVATE: 'activate' + EVENT_KEY, |
|
||||
SCROLL: 'scroll' + EVENT_KEY, |
|
||||
LOAD_DATA_API: 'load' + EVENT_KEY + DATA_API_KEY |
|
||||
}; |
|
||||
|
|
||||
var ClassName = { |
|
||||
DROPDOWN_ITEM: 'dropdown-item', |
|
||||
DROPDOWN_MENU: 'dropdown-menu', |
|
||||
NAV_LINK: 'nav-link', |
|
||||
NAV: 'nav', |
|
||||
ACTIVE: 'active' |
|
||||
}; |
|
||||
|
|
||||
var Selector = { |
|
||||
DATA_SPY: '[data-spy="scroll"]', |
|
||||
ACTIVE: '.active', |
|
||||
LIST_ITEM: '.list-item', |
|
||||
LI: 'li', |
|
||||
LI_DROPDOWN: 'li.dropdown', |
|
||||
NAV_LINKS: '.nav-link', |
|
||||
DROPDOWN: '.dropdown', |
|
||||
DROPDOWN_ITEMS: '.dropdown-item', |
|
||||
DROPDOWN_TOGGLE: '.dropdown-toggle' |
|
||||
}; |
|
||||
|
|
||||
var OffsetMethod = { |
|
||||
OFFSET: 'offset', |
|
||||
POSITION: 'position' |
|
||||
}; |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* Class Definition |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
var ScrollSpy = function () { |
|
||||
function ScrollSpy(element, config) { |
|
||||
_classCallCheck(this, ScrollSpy); |
|
||||
|
|
||||
this._element = element; |
|
||||
this._scrollElement = element.tagName === 'BODY' ? window : element; |
|
||||
this._config = this._getConfig(config); |
|
||||
this._selector = this._config.target + ' ' + Selector.NAV_LINKS + ',' + (this._config.target + ' ' + Selector.DROPDOWN_ITEMS); |
|
||||
this._offsets = []; |
|
||||
this._targets = []; |
|
||||
this._activeTarget = null; |
|
||||
this._scrollHeight = 0; |
|
||||
|
|
||||
$(this._scrollElement).on(Event.SCROLL, $.proxy(this._process, this)); |
|
||||
|
|
||||
this.refresh(); |
|
||||
this._process(); |
|
||||
} |
|
||||
|
|
||||
// getters
|
|
||||
|
|
||||
_createClass(ScrollSpy, [{ |
|
||||
key: 'refresh', |
|
||||
value: function refresh() { |
|
||||
var _this = this; |
|
||||
|
|
||||
var autoMethod = this._scrollElement !== this._scrollElement.window ? OffsetMethod.POSITION : OffsetMethod.OFFSET; |
|
||||
|
|
||||
var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method; |
|
||||
|
|
||||
var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0; |
|
||||
|
|
||||
this._offsets = []; |
|
||||
this._targets = []; |
|
||||
|
|
||||
this._scrollHeight = this._getScrollHeight(); |
|
||||
|
|
||||
var targets = $.makeArray($(this._selector)); |
|
||||
|
|
||||
targets.map(function (element) { |
|
||||
var target = void 0; |
|
||||
var targetSelector = _util2.default.getSelectorFromElement(element); |
|
||||
|
|
||||
if (targetSelector) { |
|
||||
target = $(targetSelector)[0]; |
|
||||
} |
|
||||
|
|
||||
if (target && (target.offsetWidth || target.offsetHeight)) { |
|
||||
// todo (fat): remove sketch reliance on jQuery position/offset
|
|
||||
return [$(target)[offsetMethod]().top + offsetBase, targetSelector]; |
|
||||
} |
|
||||
return null; |
|
||||
}).filter(function (item) { |
|
||||
return item; |
|
||||
}).sort(function (a, b) { |
|
||||
return a[0] - b[0]; |
|
||||
}).forEach(function (item) { |
|
||||
_this._offsets.push(item[0]); |
|
||||
_this._targets.push(item[1]); |
|
||||
}); |
|
||||
} |
|
||||
}, { |
|
||||
key: 'dispose', |
|
||||
value: function dispose() { |
|
||||
$.removeData(this._element, DATA_KEY); |
|
||||
$(this._scrollElement).off(EVENT_KEY); |
|
||||
|
|
||||
this._element = null; |
|
||||
this._scrollElement = null; |
|
||||
this._config = null; |
|
||||
this._selector = null; |
|
||||
this._offsets = null; |
|
||||
this._targets = null; |
|
||||
this._activeTarget = null; |
|
||||
this._scrollHeight = null; |
|
||||
} |
|
||||
}, { |
|
||||
key: '_getConfig', |
|
||||
value: function _getConfig(config) { |
|
||||
config = $.extend({}, Default, config); |
|
||||
|
|
||||
if (typeof config.target !== 'string') { |
|
||||
var id = $(config.target).attr('id'); |
|
||||
if (!id) { |
|
||||
id = _util2.default.getUID(NAME); |
|
||||
$(config.target).attr('id', id); |
|
||||
} |
|
||||
config.target = '#' + id; |
|
||||
} |
|
||||
|
|
||||
_util2.default.typeCheckConfig(NAME, config, DefaultType); |
|
||||
|
|
||||
return config; |
|
||||
} |
|
||||
}, { |
|
||||
key: '_getScrollTop', |
|
||||
value: function _getScrollTop() { |
|
||||
return this._scrollElement === window ? this._scrollElement.scrollY : this._scrollElement.scrollTop; |
|
||||
} |
|
||||
}, { |
|
||||
key: '_getScrollHeight', |
|
||||
value: function _getScrollHeight() { |
|
||||
return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight); |
|
||||
} |
|
||||
}, { |
|
||||
key: '_process', |
|
||||
value: function _process() { |
|
||||
var scrollTop = this._getScrollTop() + this._config.offset; |
|
||||
var scrollHeight = this._getScrollHeight(); |
|
||||
var maxScroll = this._config.offset + scrollHeight - this._scrollElement.offsetHeight; |
|
||||
|
|
||||
if (this._scrollHeight !== scrollHeight) { |
|
||||
this.refresh(); |
|
||||
} |
|
||||
|
|
||||
if (scrollTop >= maxScroll) { |
|
||||
var target = this._targets[this._targets.length - 1]; |
|
||||
|
|
||||
if (this._activeTarget !== target) { |
|
||||
this._activate(target); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
if (this._activeTarget && scrollTop < this._offsets[0]) { |
|
||||
this._activeTarget = null; |
|
||||
this._clear(); |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
for (var i = this._offsets.length; i--;) { |
|
||||
var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (this._offsets[i + 1] === undefined || scrollTop < this._offsets[i + 1]); |
|
||||
|
|
||||
if (isActiveTarget) { |
|
||||
this._activate(this._targets[i]); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
}, { |
|
||||
key: '_activate', |
|
||||
value: function _activate(target) { |
|
||||
this._activeTarget = target; |
|
||||
|
|
||||
this._clear(); |
|
||||
|
|
||||
var queries = this._selector.split(','); |
|
||||
queries = queries.map(function (selector) { |
|
||||
return selector + '[data-target="' + target + '"],' + (selector + '[href="' + target + '"]'); |
|
||||
}); |
|
||||
|
|
||||
var $link = $(queries.join(',')); |
|
||||
|
|
||||
if ($link.hasClass(ClassName.DROPDOWN_ITEM)) { |
|
||||
$link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE); |
|
||||
$link.addClass(ClassName.ACTIVE); |
|
||||
} else { |
|
||||
// todo (fat) this is kinda sus...
|
|
||||
// recursively add actives to tested nav-links
|
|
||||
$link.parents(Selector.LI).find(Selector.NAV_LINKS).addClass(ClassName.ACTIVE); |
|
||||
} |
|
||||
|
|
||||
$(this._scrollElement).trigger(Event.ACTIVATE, { |
|
||||
relatedTarget: target |
|
||||
}); |
|
||||
} |
|
||||
}, { |
|
||||
key: '_clear', |
|
||||
value: function _clear() { |
|
||||
$(this._selector).filter(Selector.ACTIVE).removeClass(ClassName.ACTIVE); |
|
||||
} |
|
||||
}], [{ |
|
||||
key: '_jQueryInterface', |
|
||||
value: function _jQueryInterface(config) { |
|
||||
return this.each(function () { |
|
||||
var data = $(this).data(DATA_KEY); |
|
||||
var _config = (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' && config || null; |
|
||||
|
|
||||
if (!data) { |
|
||||
data = new ScrollSpy(this, _config); |
|
||||
$(this).data(DATA_KEY, data); |
|
||||
} |
|
||||
|
|
||||
if (typeof config === 'string') { |
|
||||
if (data[config] === undefined) { |
|
||||
throw new Error('No method named "' + config + '"'); |
|
||||
} |
|
||||
data[config](); |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
}, { |
|
||||
key: 'VERSION', |
|
||||
get: function get() { |
|
||||
return VERSION; |
|
||||
} |
|
||||
}, { |
|
||||
key: 'Default', |
|
||||
get: function get() { |
|
||||
return Default; |
|
||||
} |
|
||||
}]); |
|
||||
|
|
||||
return ScrollSpy; |
|
||||
}(); |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* Data Api implementation |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
$(window).on(Event.LOAD_DATA_API, function () { |
|
||||
var scrollSpys = $.makeArray($(Selector.DATA_SPY)); |
|
||||
|
|
||||
for (var i = scrollSpys.length; i--;) { |
|
||||
var $spy = $(scrollSpys[i]); |
|
||||
ScrollSpy._jQueryInterface.call($spy, $spy.data()); |
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* jQuery |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
$.fn[NAME] = ScrollSpy._jQueryInterface; |
|
||||
$.fn[NAME].Constructor = ScrollSpy; |
|
||||
$.fn[NAME].noConflict = function () { |
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT; |
|
||||
return ScrollSpy._jQueryInterface; |
|
||||
}; |
|
||||
|
|
||||
return ScrollSpy; |
|
||||
}(jQuery); |
|
||||
|
|
||||
exports.default = ScrollSpy; |
|
||||
}); |
|
@ -1,289 +0,0 @@ |
|||||
define(['exports', './util'], function (exports, _util) { |
|
||||
'use strict'; |
|
||||
|
|
||||
Object.defineProperty(exports, "__esModule", { |
|
||||
value: true |
|
||||
}); |
|
||||
|
|
||||
var _util2 = _interopRequireDefault(_util); |
|
||||
|
|
||||
function _interopRequireDefault(obj) { |
|
||||
return obj && obj.__esModule ? obj : { |
|
||||
default: obj |
|
||||
}; |
|
||||
} |
|
||||
|
|
||||
function _classCallCheck(instance, Constructor) { |
|
||||
if (!(instance instanceof Constructor)) { |
|
||||
throw new TypeError("Cannot call a class as a function"); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
var _createClass = function () { |
|
||||
function defineProperties(target, props) { |
|
||||
for (var i = 0; i < props.length; i++) { |
|
||||
var descriptor = props[i]; |
|
||||
descriptor.enumerable = descriptor.enumerable || false; |
|
||||
descriptor.configurable = true; |
|
||||
if ("value" in descriptor) descriptor.writable = true; |
|
||||
Object.defineProperty(target, descriptor.key, descriptor); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
return function (Constructor, protoProps, staticProps) { |
|
||||
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
|
||||
if (staticProps) defineProperties(Constructor, staticProps); |
|
||||
return Constructor; |
|
||||
}; |
|
||||
}(); |
|
||||
|
|
||||
/** |
|
||||
* -------------------------------------------------------------------------- |
|
||||
* Bootstrap (v4.0.0-alpha.4): tab.js |
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
|
||||
* -------------------------------------------------------------------------- |
|
||||
*/ |
|
||||
|
|
||||
var Tab = function ($) { |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* Constants |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
var NAME = 'tab'; |
|
||||
var VERSION = '4.0.0-alpha.4'; |
|
||||
var DATA_KEY = 'bs.tab'; |
|
||||
var EVENT_KEY = '.' + DATA_KEY; |
|
||||
var DATA_API_KEY = '.data-api'; |
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME]; |
|
||||
var TRANSITION_DURATION = 150; |
|
||||
|
|
||||
var Event = { |
|
||||
HIDE: 'hide' + EVENT_KEY, |
|
||||
HIDDEN: 'hidden' + EVENT_KEY, |
|
||||
SHOW: 'show' + EVENT_KEY, |
|
||||
SHOWN: 'shown' + EVENT_KEY, |
|
||||
CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY |
|
||||
}; |
|
||||
|
|
||||
var ClassName = { |
|
||||
DROPDOWN_MENU: 'dropdown-menu', |
|
||||
ACTIVE: 'active', |
|
||||
FADE: 'fade', |
|
||||
IN: 'in' |
|
||||
}; |
|
||||
|
|
||||
var Selector = { |
|
||||
A: 'a', |
|
||||
LI: 'li', |
|
||||
DROPDOWN: '.dropdown', |
|
||||
UL: 'ul:not(.dropdown-menu)', |
|
||||
FADE_CHILD: '> .nav-item .fade, > .fade', |
|
||||
ACTIVE: '.active', |
|
||||
ACTIVE_CHILD: '> .nav-item > .active, > .active', |
|
||||
DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"]', |
|
||||
DROPDOWN_TOGGLE: '.dropdown-toggle', |
|
||||
DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active' |
|
||||
}; |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* Class Definition |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
var Tab = function () { |
|
||||
function Tab(element) { |
|
||||
_classCallCheck(this, Tab); |
|
||||
|
|
||||
this._element = element; |
|
||||
} |
|
||||
|
|
||||
// getters
|
|
||||
|
|
||||
_createClass(Tab, [{ |
|
||||
key: 'show', |
|
||||
value: function show() { |
|
||||
var _this = this; |
|
||||
|
|
||||
if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(ClassName.ACTIVE)) { |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
var target = void 0; |
|
||||
var previous = void 0; |
|
||||
var ulElement = $(this._element).closest(Selector.UL)[0]; |
|
||||
var selector = _util2.default.getSelectorFromElement(this._element); |
|
||||
|
|
||||
if (ulElement) { |
|
||||
previous = $.makeArray($(ulElement).find(Selector.ACTIVE)); |
|
||||
previous = previous[previous.length - 1]; |
|
||||
} |
|
||||
|
|
||||
var hideEvent = $.Event(Event.HIDE, { |
|
||||
relatedTarget: this._element |
|
||||
}); |
|
||||
|
|
||||
var showEvent = $.Event(Event.SHOW, { |
|
||||
relatedTarget: previous |
|
||||
}); |
|
||||
|
|
||||
if (previous) { |
|
||||
$(previous).trigger(hideEvent); |
|
||||
} |
|
||||
|
|
||||
$(this._element).trigger(showEvent); |
|
||||
|
|
||||
if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) { |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
if (selector) { |
|
||||
target = $(selector)[0]; |
|
||||
} |
|
||||
|
|
||||
this._activate(this._element, ulElement); |
|
||||
|
|
||||
var complete = function complete() { |
|
||||
var hiddenEvent = $.Event(Event.HIDDEN, { |
|
||||
relatedTarget: _this._element |
|
||||
}); |
|
||||
|
|
||||
var shownEvent = $.Event(Event.SHOWN, { |
|
||||
relatedTarget: previous |
|
||||
}); |
|
||||
|
|
||||
$(previous).trigger(hiddenEvent); |
|
||||
$(_this._element).trigger(shownEvent); |
|
||||
}; |
|
||||
|
|
||||
if (target) { |
|
||||
this._activate(target, target.parentNode, complete); |
|
||||
} else { |
|
||||
complete(); |
|
||||
} |
|
||||
} |
|
||||
}, { |
|
||||
key: 'dispose', |
|
||||
value: function dispose() { |
|
||||
$.removeClass(this._element, DATA_KEY); |
|
||||
this._element = null; |
|
||||
} |
|
||||
}, { |
|
||||
key: '_activate', |
|
||||
value: function _activate(element, container, callback) { |
|
||||
var active = $(container).find(Selector.ACTIVE_CHILD)[0]; |
|
||||
var isTransitioning = callback && _util2.default.supportsTransitionEnd() && (active && $(active).hasClass(ClassName.FADE) || Boolean($(container).find(Selector.FADE_CHILD)[0])); |
|
||||
|
|
||||
var complete = $.proxy(this._transitionComplete, this, element, active, isTransitioning, callback); |
|
||||
|
|
||||
if (active && isTransitioning) { |
|
||||
$(active).one(_util2.default.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); |
|
||||
} else { |
|
||||
complete(); |
|
||||
} |
|
||||
|
|
||||
if (active) { |
|
||||
$(active).removeClass(ClassName.IN); |
|
||||
} |
|
||||
} |
|
||||
}, { |
|
||||
key: '_transitionComplete', |
|
||||
value: function _transitionComplete(element, active, isTransitioning, callback) { |
|
||||
if (active) { |
|
||||
$(active).removeClass(ClassName.ACTIVE); |
|
||||
|
|
||||
var dropdownChild = $(active).find(Selector.DROPDOWN_ACTIVE_CHILD)[0]; |
|
||||
|
|
||||
if (dropdownChild) { |
|
||||
$(dropdownChild).removeClass(ClassName.ACTIVE); |
|
||||
} |
|
||||
|
|
||||
active.setAttribute('aria-expanded', false); |
|
||||
} |
|
||||
|
|
||||
$(element).addClass(ClassName.ACTIVE); |
|
||||
element.setAttribute('aria-expanded', true); |
|
||||
|
|
||||
if (isTransitioning) { |
|
||||
_util2.default.reflow(element); |
|
||||
$(element).addClass(ClassName.IN); |
|
||||
} else { |
|
||||
$(element).removeClass(ClassName.FADE); |
|
||||
} |
|
||||
|
|
||||
if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) { |
|
||||
|
|
||||
var dropdownElement = $(element).closest(Selector.DROPDOWN)[0]; |
|
||||
if (dropdownElement) { |
|
||||
$(dropdownElement).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE); |
|
||||
} |
|
||||
|
|
||||
element.setAttribute('aria-expanded', true); |
|
||||
} |
|
||||
|
|
||||
if (callback) { |
|
||||
callback(); |
|
||||
} |
|
||||
} |
|
||||
}], [{ |
|
||||
key: '_jQueryInterface', |
|
||||
value: function _jQueryInterface(config) { |
|
||||
return this.each(function () { |
|
||||
var $this = $(this); |
|
||||
var data = $this.data(DATA_KEY); |
|
||||
|
|
||||
if (!data) { |
|
||||
data = data = new Tab(this); |
|
||||
$this.data(DATA_KEY, data); |
|
||||
} |
|
||||
|
|
||||
if (typeof config === 'string') { |
|
||||
if (data[config] === undefined) { |
|
||||
throw new Error('No method named "' + config + '"'); |
|
||||
} |
|
||||
data[config](); |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
}, { |
|
||||
key: 'VERSION', |
|
||||
get: function get() { |
|
||||
return VERSION; |
|
||||
} |
|
||||
}]); |
|
||||
|
|
||||
return Tab; |
|
||||
}(); |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* Data Api implementation |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { |
|
||||
event.preventDefault(); |
|
||||
Tab._jQueryInterface.call($(this), 'show'); |
|
||||
}); |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* jQuery |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
$.fn[NAME] = Tab._jQueryInterface; |
|
||||
$.fn[NAME].Constructor = Tab; |
|
||||
$.fn[NAME].noConflict = function () { |
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT; |
|
||||
return Tab._jQueryInterface; |
|
||||
}; |
|
||||
|
|
||||
return Tab; |
|
||||
}(jQuery); |
|
||||
|
|
||||
exports.default = Tab; |
|
||||
}); |
|
@ -1,646 +0,0 @@ |
|||||
define(['exports', './util'], function (exports, _util) { |
|
||||
'use strict'; |
|
||||
|
|
||||
Object.defineProperty(exports, "__esModule", { |
|
||||
value: true |
|
||||
}); |
|
||||
|
|
||||
var _util2 = _interopRequireDefault(_util); |
|
||||
|
|
||||
function _interopRequireDefault(obj) { |
|
||||
return obj && obj.__esModule ? obj : { |
|
||||
default: obj |
|
||||
}; |
|
||||
} |
|
||||
|
|
||||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { |
|
||||
return typeof obj; |
|
||||
} : function (obj) { |
|
||||
return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; |
|
||||
}; |
|
||||
|
|
||||
function _classCallCheck(instance, Constructor) { |
|
||||
if (!(instance instanceof Constructor)) { |
|
||||
throw new TypeError("Cannot call a class as a function"); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
var _createClass = function () { |
|
||||
function defineProperties(target, props) { |
|
||||
for (var i = 0; i < props.length; i++) { |
|
||||
var descriptor = props[i]; |
|
||||
descriptor.enumerable = descriptor.enumerable || false; |
|
||||
descriptor.configurable = true; |
|
||||
if ("value" in descriptor) descriptor.writable = true; |
|
||||
Object.defineProperty(target, descriptor.key, descriptor); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
return function (Constructor, protoProps, staticProps) { |
|
||||
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
|
||||
if (staticProps) defineProperties(Constructor, staticProps); |
|
||||
return Constructor; |
|
||||
}; |
|
||||
}(); |
|
||||
|
|
||||
/** |
|
||||
* -------------------------------------------------------------------------- |
|
||||
* Bootstrap (v4.0.0-alpha.4): tooltip.js |
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
|
||||
* -------------------------------------------------------------------------- |
|
||||
*/ |
|
||||
|
|
||||
var Tooltip = function ($) { |
|
||||
|
|
||||
/** |
|
||||
* Check for Tether dependency |
|
||||
* Tether - http://github.hubspot.com/tether/
|
|
||||
*/ |
|
||||
if (window.Tether === undefined) { |
|
||||
throw new Error('Bootstrap tooltips require Tether (http://github.hubspot.com/tether/)'); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* Constants |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
var NAME = 'tooltip'; |
|
||||
var VERSION = '4.0.0-alpha.4'; |
|
||||
var DATA_KEY = 'bs.tooltip'; |
|
||||
var EVENT_KEY = '.' + DATA_KEY; |
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME]; |
|
||||
var TRANSITION_DURATION = 150; |
|
||||
var CLASS_PREFIX = 'bs-tether'; |
|
||||
|
|
||||
var Default = { |
|
||||
animation: true, |
|
||||
template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div></div>', |
|
||||
trigger: 'hover focus', |
|
||||
title: '', |
|
||||
delay: 0, |
|
||||
html: false, |
|
||||
selector: false, |
|
||||
placement: 'top', |
|
||||
offset: '0 0', |
|
||||
constraints: [] |
|
||||
}; |
|
||||
|
|
||||
var DefaultType = { |
|
||||
animation: 'boolean', |
|
||||
template: 'string', |
|
||||
title: '(string|element|function)', |
|
||||
trigger: 'string', |
|
||||
delay: '(number|object)', |
|
||||
html: 'boolean', |
|
||||
selector: '(string|boolean)', |
|
||||
placement: '(string|function)', |
|
||||
offset: 'string', |
|
||||
constraints: 'array' |
|
||||
}; |
|
||||
|
|
||||
var AttachmentMap = { |
|
||||
TOP: 'bottom center', |
|
||||
RIGHT: 'middle left', |
|
||||
BOTTOM: 'top center', |
|
||||
LEFT: 'middle right' |
|
||||
}; |
|
||||
|
|
||||
var HoverState = { |
|
||||
IN: 'in', |
|
||||
OUT: 'out' |
|
||||
}; |
|
||||
|
|
||||
var Event = { |
|
||||
HIDE: 'hide' + EVENT_KEY, |
|
||||
HIDDEN: 'hidden' + EVENT_KEY, |
|
||||
SHOW: 'show' + EVENT_KEY, |
|
||||
SHOWN: 'shown' + EVENT_KEY, |
|
||||
INSERTED: 'inserted' + EVENT_KEY, |
|
||||
CLICK: 'click' + EVENT_KEY, |
|
||||
FOCUSIN: 'focusin' + EVENT_KEY, |
|
||||
FOCUSOUT: 'focusout' + EVENT_KEY, |
|
||||
MOUSEENTER: 'mouseenter' + EVENT_KEY, |
|
||||
MOUSELEAVE: 'mouseleave' + EVENT_KEY |
|
||||
}; |
|
||||
|
|
||||
var ClassName = { |
|
||||
FADE: 'fade', |
|
||||
IN: 'in' |
|
||||
}; |
|
||||
|
|
||||
var Selector = { |
|
||||
TOOLTIP: '.tooltip', |
|
||||
TOOLTIP_INNER: '.tooltip-inner' |
|
||||
}; |
|
||||
|
|
||||
var TetherClass = { |
|
||||
element: false, |
|
||||
enabled: false |
|
||||
}; |
|
||||
|
|
||||
var Trigger = { |
|
||||
HOVER: 'hover', |
|
||||
FOCUS: 'focus', |
|
||||
CLICK: 'click', |
|
||||
MANUAL: 'manual' |
|
||||
}; |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* Class Definition |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
var Tooltip = function () { |
|
||||
function Tooltip(element, config) { |
|
||||
_classCallCheck(this, Tooltip); |
|
||||
|
|
||||
// private
|
|
||||
this._isEnabled = true; |
|
||||
this._timeout = 0; |
|
||||
this._hoverState = ''; |
|
||||
this._activeTrigger = {}; |
|
||||
this._tether = null; |
|
||||
|
|
||||
// protected
|
|
||||
this.element = element; |
|
||||
this.config = this._getConfig(config); |
|
||||
this.tip = null; |
|
||||
|
|
||||
this._setListeners(); |
|
||||
} |
|
||||
|
|
||||
// getters
|
|
||||
|
|
||||
_createClass(Tooltip, [{ |
|
||||
key: 'enable', |
|
||||
value: function enable() { |
|
||||
this._isEnabled = true; |
|
||||
} |
|
||||
}, { |
|
||||
key: 'disable', |
|
||||
value: function disable() { |
|
||||
this._isEnabled = false; |
|
||||
} |
|
||||
}, { |
|
||||
key: 'toggleEnabled', |
|
||||
value: function toggleEnabled() { |
|
||||
this._isEnabled = !this._isEnabled; |
|
||||
} |
|
||||
}, { |
|
||||
key: 'toggle', |
|
||||
value: function toggle(event) { |
|
||||
if (event) { |
|
||||
var dataKey = this.constructor.DATA_KEY; |
|
||||
var context = $(event.currentTarget).data(dataKey); |
|
||||
|
|
||||
if (!context) { |
|
||||
context = new this.constructor(event.currentTarget, this._getDelegateConfig()); |
|
||||
$(event.currentTarget).data(dataKey, context); |
|
||||
} |
|
||||
|
|
||||
context._activeTrigger.click = !context._activeTrigger.click; |
|
||||
|
|
||||
if (context._isWithActiveTrigger()) { |
|
||||
context._enter(null, context); |
|
||||
} else { |
|
||||
context._leave(null, context); |
|
||||
} |
|
||||
} else { |
|
||||
|
|
||||
if ($(this.getTipElement()).hasClass(ClassName.IN)) { |
|
||||
this._leave(null, this); |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
this._enter(null, this); |
|
||||
} |
|
||||
} |
|
||||
}, { |
|
||||
key: 'dispose', |
|
||||
value: function dispose() { |
|
||||
clearTimeout(this._timeout); |
|
||||
|
|
||||
this.cleanupTether(); |
|
||||
|
|
||||
$.removeData(this.element, this.constructor.DATA_KEY); |
|
||||
|
|
||||
$(this.element).off(this.constructor.EVENT_KEY); |
|
||||
|
|
||||
if (this.tip) { |
|
||||
$(this.tip).remove(); |
|
||||
} |
|
||||
|
|
||||
this._isEnabled = null; |
|
||||
this._timeout = null; |
|
||||
this._hoverState = null; |
|
||||
this._activeTrigger = null; |
|
||||
this._tether = null; |
|
||||
|
|
||||
this.element = null; |
|
||||
this.config = null; |
|
||||
this.tip = null; |
|
||||
} |
|
||||
}, { |
|
||||
key: 'show', |
|
||||
value: function show() { |
|
||||
var _this = this; |
|
||||
|
|
||||
var showEvent = $.Event(this.constructor.Event.SHOW); |
|
||||
|
|
||||
if (this.isWithContent() && this._isEnabled) { |
|
||||
$(this.element).trigger(showEvent); |
|
||||
|
|
||||
var isInTheDom = $.contains(this.element.ownerDocument.documentElement, this.element); |
|
||||
|
|
||||
if (showEvent.isDefaultPrevented() || !isInTheDom) { |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
var tip = this.getTipElement(); |
|
||||
var tipId = _util2.default.getUID(this.constructor.NAME); |
|
||||
|
|
||||
tip.setAttribute('id', tipId); |
|
||||
this.element.setAttribute('aria-describedby', tipId); |
|
||||
|
|
||||
this.setContent(); |
|
||||
|
|
||||
if (this.config.animation) { |
|
||||
$(tip).addClass(ClassName.FADE); |
|
||||
} |
|
||||
|
|
||||
var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement; |
|
||||
|
|
||||
var attachment = this._getAttachment(placement); |
|
||||
|
|
||||
$(tip).data(this.constructor.DATA_KEY, this).appendTo(document.body); |
|
||||
|
|
||||
$(this.element).trigger(this.constructor.Event.INSERTED); |
|
||||
|
|
||||
this._tether = new Tether({ |
|
||||
attachment: attachment, |
|
||||
element: tip, |
|
||||
target: this.element, |
|
||||
classes: TetherClass, |
|
||||
classPrefix: CLASS_PREFIX, |
|
||||
offset: this.config.offset, |
|
||||
constraints: this.config.constraints, |
|
||||
addTargetClasses: false |
|
||||
}); |
|
||||
|
|
||||
_util2.default.reflow(tip); |
|
||||
this._tether.position(); |
|
||||
|
|
||||
$(tip).addClass(ClassName.IN); |
|
||||
|
|
||||
var complete = function complete() { |
|
||||
var prevHoverState = _this._hoverState; |
|
||||
_this._hoverState = null; |
|
||||
|
|
||||
$(_this.element).trigger(_this.constructor.Event.SHOWN); |
|
||||
|
|
||||
if (prevHoverState === HoverState.OUT) { |
|
||||
_this._leave(null, _this); |
|
||||
} |
|
||||
}; |
|
||||
|
|
||||
if (_util2.default.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) { |
|
||||
$(this.tip).one(_util2.default.TRANSITION_END, complete).emulateTransitionEnd(Tooltip._TRANSITION_DURATION); |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
complete(); |
|
||||
} |
|
||||
} |
|
||||
}, { |
|
||||
key: 'hide', |
|
||||
value: function hide(callback) { |
|
||||
var _this2 = this; |
|
||||
|
|
||||
var tip = this.getTipElement(); |
|
||||
var hideEvent = $.Event(this.constructor.Event.HIDE); |
|
||||
var complete = function complete() { |
|
||||
if (_this2._hoverState !== HoverState.IN && tip.parentNode) { |
|
||||
tip.parentNode.removeChild(tip); |
|
||||
} |
|
||||
|
|
||||
_this2.element.removeAttribute('aria-describedby'); |
|
||||
$(_this2.element).trigger(_this2.constructor.Event.HIDDEN); |
|
||||
_this2.cleanupTether(); |
|
||||
|
|
||||
if (callback) { |
|
||||
callback(); |
|
||||
} |
|
||||
}; |
|
||||
|
|
||||
$(this.element).trigger(hideEvent); |
|
||||
|
|
||||
if (hideEvent.isDefaultPrevented()) { |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
$(tip).removeClass(ClassName.IN); |
|
||||
|
|
||||
if (_util2.default.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) { |
|
||||
|
|
||||
$(tip).one(_util2.default.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); |
|
||||
} else { |
|
||||
complete(); |
|
||||
} |
|
||||
|
|
||||
this._hoverState = ''; |
|
||||
} |
|
||||
}, { |
|
||||
key: 'isWithContent', |
|
||||
value: function isWithContent() { |
|
||||
return Boolean(this.getTitle()); |
|
||||
} |
|
||||
}, { |
|
||||
key: 'getTipElement', |
|
||||
value: function getTipElement() { |
|
||||
return this.tip = this.tip || $(this.config.template)[0]; |
|
||||
} |
|
||||
}, { |
|
||||
key: 'setContent', |
|
||||
value: function setContent() { |
|
||||
var $tip = $(this.getTipElement()); |
|
||||
|
|
||||
this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle()); |
|
||||
|
|
||||
$tip.removeClass(ClassName.FADE).removeClass(ClassName.IN); |
|
||||
|
|
||||
this.cleanupTether(); |
|
||||
} |
|
||||
}, { |
|
||||
key: 'setElementContent', |
|
||||
value: function setElementContent($element, content) { |
|
||||
var html = this.config.html; |
|
||||
if ((typeof content === 'undefined' ? 'undefined' : _typeof(content)) === 'object' && (content.nodeType || content.jquery)) { |
|
||||
// content is a DOM node or a jQuery
|
|
||||
if (html) { |
|
||||
if (!$(content).parent().is($element)) { |
|
||||
$element.empty().append(content); |
|
||||
} |
|
||||
} else { |
|
||||
$element.text($(content).text()); |
|
||||
} |
|
||||
} else { |
|
||||
$element[html ? 'html' : 'text'](content); |
|
||||
} |
|
||||
} |
|
||||
}, { |
|
||||
key: 'getTitle', |
|
||||
value: function getTitle() { |
|
||||
var title = this.element.getAttribute('data-original-title'); |
|
||||
|
|
||||
if (!title) { |
|
||||
title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title; |
|
||||
} |
|
||||
|
|
||||
return title; |
|
||||
} |
|
||||
}, { |
|
||||
key: 'cleanupTether', |
|
||||
value: function cleanupTether() { |
|
||||
if (this._tether) { |
|
||||
this._tether.destroy(); |
|
||||
} |
|
||||
} |
|
||||
}, { |
|
||||
key: '_getAttachment', |
|
||||
value: function _getAttachment(placement) { |
|
||||
return AttachmentMap[placement.toUpperCase()]; |
|
||||
} |
|
||||
}, { |
|
||||
key: '_setListeners', |
|
||||
value: function _setListeners() { |
|
||||
var _this3 = this; |
|
||||
|
|
||||
var triggers = this.config.trigger.split(' '); |
|
||||
|
|
||||
triggers.forEach(function (trigger) { |
|
||||
if (trigger === 'click') { |
|
||||
$(_this3.element).on(_this3.constructor.Event.CLICK, _this3.config.selector, $.proxy(_this3.toggle, _this3)); |
|
||||
} else if (trigger !== Trigger.MANUAL) { |
|
||||
var eventIn = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSEENTER : _this3.constructor.Event.FOCUSIN; |
|
||||
var eventOut = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSELEAVE : _this3.constructor.Event.FOCUSOUT; |
|
||||
|
|
||||
$(_this3.element).on(eventIn, _this3.config.selector, $.proxy(_this3._enter, _this3)).on(eventOut, _this3.config.selector, $.proxy(_this3._leave, _this3)); |
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
if (this.config.selector) { |
|
||||
this.config = $.extend({}, this.config, { |
|
||||
trigger: 'manual', |
|
||||
selector: '' |
|
||||
}); |
|
||||
} else { |
|
||||
this._fixTitle(); |
|
||||
} |
|
||||
} |
|
||||
}, { |
|
||||
key: '_fixTitle', |
|
||||
value: function _fixTitle() { |
|
||||
var titleType = _typeof(this.element.getAttribute('data-original-title')); |
|
||||
if (this.element.getAttribute('title') || titleType !== 'string') { |
|
||||
this.element.setAttribute('data-original-title', this.element.getAttribute('title') || ''); |
|
||||
this.element.setAttribute('title', ''); |
|
||||
} |
|
||||
} |
|
||||
}, { |
|
||||
key: '_enter', |
|
||||
value: function _enter(event, context) { |
|
||||
var dataKey = this.constructor.DATA_KEY; |
|
||||
|
|
||||
context = context || $(event.currentTarget).data(dataKey); |
|
||||
|
|
||||
if (!context) { |
|
||||
context = new this.constructor(event.currentTarget, this._getDelegateConfig()); |
|
||||
$(event.currentTarget).data(dataKey, context); |
|
||||
} |
|
||||
|
|
||||
if (event) { |
|
||||
context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true; |
|
||||
} |
|
||||
|
|
||||
if ($(context.getTipElement()).hasClass(ClassName.IN) || context._hoverState === HoverState.IN) { |
|
||||
context._hoverState = HoverState.IN; |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
clearTimeout(context._timeout); |
|
||||
|
|
||||
context._hoverState = HoverState.IN; |
|
||||
|
|
||||
if (!context.config.delay || !context.config.delay.show) { |
|
||||
context.show(); |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
context._timeout = setTimeout(function () { |
|
||||
if (context._hoverState === HoverState.IN) { |
|
||||
context.show(); |
|
||||
} |
|
||||
}, context.config.delay.show); |
|
||||
} |
|
||||
}, { |
|
||||
key: '_leave', |
|
||||
value: function _leave(event, context) { |
|
||||
var dataKey = this.constructor.DATA_KEY; |
|
||||
|
|
||||
context = context || $(event.currentTarget).data(dataKey); |
|
||||
|
|
||||
if (!context) { |
|
||||
context = new this.constructor(event.currentTarget, this._getDelegateConfig()); |
|
||||
$(event.currentTarget).data(dataKey, context); |
|
||||
} |
|
||||
|
|
||||
if (event) { |
|
||||
context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false; |
|
||||
} |
|
||||
|
|
||||
if (context._isWithActiveTrigger()) { |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
clearTimeout(context._timeout); |
|
||||
|
|
||||
context._hoverState = HoverState.OUT; |
|
||||
|
|
||||
if (!context.config.delay || !context.config.delay.hide) { |
|
||||
context.hide(); |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
context._timeout = setTimeout(function () { |
|
||||
if (context._hoverState === HoverState.OUT) { |
|
||||
context.hide(); |
|
||||
} |
|
||||
}, context.config.delay.hide); |
|
||||
} |
|
||||
}, { |
|
||||
key: '_isWithActiveTrigger', |
|
||||
value: function _isWithActiveTrigger() { |
|
||||
for (var trigger in this._activeTrigger) { |
|
||||
if (this._activeTrigger[trigger]) { |
|
||||
return true; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
return false; |
|
||||
} |
|
||||
}, { |
|
||||
key: '_getConfig', |
|
||||
value: function _getConfig(config) { |
|
||||
config = $.extend({}, this.constructor.Default, $(this.element).data(), config); |
|
||||
|
|
||||
if (config.delay && typeof config.delay === 'number') { |
|
||||
config.delay = { |
|
||||
show: config.delay, |
|
||||
hide: config.delay |
|
||||
}; |
|
||||
} |
|
||||
|
|
||||
_util2.default.typeCheckConfig(NAME, config, this.constructor.DefaultType); |
|
||||
|
|
||||
return config; |
|
||||
} |
|
||||
}, { |
|
||||
key: '_getDelegateConfig', |
|
||||
value: function _getDelegateConfig() { |
|
||||
var config = {}; |
|
||||
|
|
||||
if (this.config) { |
|
||||
for (var key in this.config) { |
|
||||
if (this.constructor.Default[key] !== this.config[key]) { |
|
||||
config[key] = this.config[key]; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
return config; |
|
||||
} |
|
||||
}], [{ |
|
||||
key: '_jQueryInterface', |
|
||||
value: function _jQueryInterface(config) { |
|
||||
return this.each(function () { |
|
||||
var data = $(this).data(DATA_KEY); |
|
||||
var _config = (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' ? config : null; |
|
||||
|
|
||||
if (!data && /destroy|hide/.test(config)) { |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
if (!data) { |
|
||||
data = new Tooltip(this, _config); |
|
||||
$(this).data(DATA_KEY, data); |
|
||||
} |
|
||||
|
|
||||
if (typeof config === 'string') { |
|
||||
if (data[config] === undefined) { |
|
||||
throw new Error('No method named "' + config + '"'); |
|
||||
} |
|
||||
data[config](); |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
}, { |
|
||||
key: 'VERSION', |
|
||||
get: function get() { |
|
||||
return VERSION; |
|
||||
} |
|
||||
}, { |
|
||||
key: 'Default', |
|
||||
get: function get() { |
|
||||
return Default; |
|
||||
} |
|
||||
}, { |
|
||||
key: 'NAME', |
|
||||
get: function get() { |
|
||||
return NAME; |
|
||||
} |
|
||||
}, { |
|
||||
key: 'DATA_KEY', |
|
||||
get: function get() { |
|
||||
return DATA_KEY; |
|
||||
} |
|
||||
}, { |
|
||||
key: 'Event', |
|
||||
get: function get() { |
|
||||
return Event; |
|
||||
} |
|
||||
}, { |
|
||||
key: 'EVENT_KEY', |
|
||||
get: function get() { |
|
||||
return EVENT_KEY; |
|
||||
} |
|
||||
}, { |
|
||||
key: 'DefaultType', |
|
||||
get: function get() { |
|
||||
return DefaultType; |
|
||||
} |
|
||||
}]); |
|
||||
|
|
||||
return Tooltip; |
|
||||
}(); |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* jQuery |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
$.fn[NAME] = Tooltip._jQueryInterface; |
|
||||
$.fn[NAME].Constructor = Tooltip; |
|
||||
$.fn[NAME].noConflict = function () { |
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT; |
|
||||
return Tooltip._jQueryInterface; |
|
||||
}; |
|
||||
|
|
||||
return Tooltip; |
|
||||
}(jQuery); |
|
||||
|
|
||||
exports.default = Tooltip; |
|
||||
}); |
|
@ -1,163 +0,0 @@ |
|||||
define(['exports'], function (exports) { |
|
||||
'use strict'; |
|
||||
|
|
||||
Object.defineProperty(exports, "__esModule", { |
|
||||
value: true |
|
||||
}); |
|
||||
/** |
|
||||
* -------------------------------------------------------------------------- |
|
||||
* Bootstrap (v4.0.0-alpha.4): util.js |
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
|
||||
* -------------------------------------------------------------------------- |
|
||||
*/ |
|
||||
|
|
||||
var Util = function ($) { |
|
||||
|
|
||||
/** |
|
||||
* ------------------------------------------------------------------------ |
|
||||
* Private TransitionEnd Helpers |
|
||||
* ------------------------------------------------------------------------ |
|
||||
*/ |
|
||||
|
|
||||
var transition = false; |
|
||||
|
|
||||
var MAX_UID = 1000000; |
|
||||
|
|
||||
var TransitionEndEvent = { |
|
||||
WebkitTransition: 'webkitTransitionEnd', |
|
||||
MozTransition: 'transitionend', |
|
||||
OTransition: 'oTransitionEnd otransitionend', |
|
||||
transition: 'transitionend' |
|
||||
}; |
|
||||
|
|
||||
// shoutout AngusCroll (https://goo.gl/pxwQGp)
|
|
||||
function toType(obj) { |
|
||||
return {}.toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase(); |
|
||||
} |
|
||||
|
|
||||
function isElement(obj) { |
|
||||
return (obj[0] || obj).nodeType; |
|
||||
} |
|
||||
|
|
||||
function getSpecialTransitionEndEvent() { |
|
||||
return { |
|
||||
bindType: transition.end, |
|
||||
delegateType: transition.end, |
|
||||
handle: function handle(event) { |
|
||||
if ($(event.target).is(this)) { |
|
||||
return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
|
|
||||
} |
|
||||
return undefined; |
|
||||
} |
|
||||
}; |
|
||||
} |
|
||||
|
|
||||
function transitionEndTest() { |
|
||||
if (window.QUnit) { |
|
||||
return false; |
|
||||
} |
|
||||
|
|
||||
var el = document.createElement('bootstrap'); |
|
||||
|
|
||||
for (var name in TransitionEndEvent) { |
|
||||
if (el.style[name] !== undefined) { |
|
||||
return { end: TransitionEndEvent[name] }; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
return false; |
|
||||
} |
|
||||
|
|
||||
function transitionEndEmulator(duration) { |
|
||||
var _this = this; |
|
||||
|
|
||||
var called = false; |
|
||||
|
|
||||
$(this).one(Util.TRANSITION_END, function () { |
|
||||
called = true; |
|
||||
}); |
|
||||
|
|
||||
setTimeout(function () { |
|
||||
if (!called) { |
|
||||
Util.triggerTransitionEnd(_this); |
|
||||
} |
|
||||
}, duration); |
|
||||
|
|
||||
return this; |
|
||||
} |
|
||||
|
|
||||
function setTransitionEndSupport() { |
|
||||
transition = transitionEndTest(); |
|
||||
|
|
||||
$.fn.emulateTransitionEnd = transitionEndEmulator; |
|
||||
|
|
||||
if (Util.supportsTransitionEnd()) { |
|
||||
$.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent(); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* -------------------------------------------------------------------------- |
|
||||
* Public Util Api |
|
||||
* -------------------------------------------------------------------------- |
|
||||
*/ |
|
||||
|
|
||||
var Util = { |
|
||||
|
|
||||
TRANSITION_END: 'bsTransitionEnd', |
|
||||
|
|
||||
getUID: function getUID(prefix) { |
|
||||
do { |
|
||||
/* eslint-disable no-bitwise */ |
|
||||
prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
|
|
||||
/* eslint-enable no-bitwise */ |
|
||||
} while (document.getElementById(prefix)); |
|
||||
return prefix; |
|
||||
}, |
|
||||
getSelectorFromElement: function getSelectorFromElement(element) { |
|
||||
var selector = element.getAttribute('data-target'); |
|
||||
|
|
||||
if (!selector) { |
|
||||
selector = element.getAttribute('href') || ''; |
|
||||
selector = /^#[a-z]/i.test(selector) ? selector : null; |
|
||||
} |
|
||||
|
|
||||
return selector; |
|
||||
}, |
|
||||
reflow: function reflow(element) { |
|
||||
new Function('bs', 'return bs')(element.offsetHeight); |
|
||||
}, |
|
||||
triggerTransitionEnd: function triggerTransitionEnd(element) { |
|
||||
$(element).trigger(transition.end); |
|
||||
}, |
|
||||
supportsTransitionEnd: function supportsTransitionEnd() { |
|
||||
return Boolean(transition); |
|
||||
}, |
|
||||
typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) { |
|
||||
for (var property in configTypes) { |
|
||||
if (configTypes.hasOwnProperty(property)) { |
|
||||
var expectedTypes = configTypes[property]; |
|
||||
var value = config[property]; |
|
||||
var valueType = void 0; |
|
||||
|
|
||||
if (value && isElement(value)) { |
|
||||
valueType = 'element'; |
|
||||
} else { |
|
||||
valueType = toType(value); |
|
||||
} |
|
||||
|
|
||||
if (!new RegExp(expectedTypes).test(valueType)) { |
|
||||
throw new Error(componentName.toUpperCase() + ': ' + ('Option "' + property + '" provided type "' + valueType + '" ') + ('but expected type "' + expectedTypes + '".')); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
}; |
|
||||
|
|
||||
setTransitionEndSupport(); |
|
||||
|
|
||||
return Util; |
|
||||
}(jQuery); |
|
||||
|
|
||||
exports.default = Util; |
|
||||
}); |
|
@ -0,0 +1,58 @@ |
|||||
|
<?php |
||||
|
// This file is part of Moodle - http://moodle.org/ |
||||
|
// |
||||
|
// Moodle is free software: you can redistribute it and/or modify |
||||
|
// it under the terms of the GNU General Public License as published by |
||||
|
// the Free Software Foundation, either version 3 of the License, or |
||||
|
// (at your option) any later version. |
||||
|
// |
||||
|
// Moodle is distributed in the hope that it will be useful, |
||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
// GNU General Public License for more details. |
||||
|
// |
||||
|
// You should have received a copy of the GNU General Public License |
||||
|
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. |
||||
|
|
||||
|
/** |
||||
|
* Question renderer. |
||||
|
* |
||||
|
* @package theme_boost |
||||
|
* @copyright 2017 onwards Ankit Agarwal <ankit.agrr@gmail.com> |
||||
|
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
||||
|
*/ |
||||
|
|
||||
|
namespace theme_boost\output\core_question; |
||||
|
defined('MOODLE_INTERNAL') || die(); |
||||
|
|
||||
|
require_once($CFG->dirroot . '/' . $CFG->admin . '/renderer.php'); |
||||
|
|
||||
|
/** |
||||
|
* Question renderer class. |
||||
|
* |
||||
|
* @package theme_boost |
||||
|
* @copyright 2017 onwards Ankit Agarwal <ankit.agrr@gmail.com> |
||||
|
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
||||
|
*/ |
||||
|
class bank_renderer extends \core_question_bank_renderer { |
||||
|
|
||||
|
/** |
||||
|
* Display additional navigation if needed. |
||||
|
* |
||||
|
* @return string |
||||
|
*/ |
||||
|
public function extra_horizontal_navigation() { |
||||
|
// Horizontal navigation for question bank. |
||||
|
if ($questionnode = $this->page->settingsnav->find("questionbank", \navigation_node::TYPE_CONTAINER)) { |
||||
|
if ($children = $questionnode->children) { |
||||
|
$tabs = []; |
||||
|
foreach ($children as $key => $node) { |
||||
|
$tabs[] = new \tabobject($node->key, $node->action, $node->text); |
||||
|
} |
||||
|
$active = $questionnode->find_active_node()->key; |
||||
|
return \html_writer::div(print_tabs([$tabs], $active, null, null, true), 'questionbank-navigation'); |
||||
|
} |
||||
|
} |
||||
|
return ''; |
||||
|
} |
||||
|
} |
@ -0,0 +1,46 @@ |
|||||
|
<?php |
||||
|
// This file is part of Moodle - http://moodle.org/ |
||||
|
// |
||||
|
// Moodle is free software: you can redistribute it and/or modify |
||||
|
// it under the terms of the GNU General Public License as published by |
||||
|
// the Free Software Foundation, either version 3 of the License, or |
||||
|
// (at your option) any later version. |
||||
|
// |
||||
|
// Moodle is distributed in the hope that it will be useful, |
||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
// GNU General Public License for more details. |
||||
|
// |
||||
|
// You should have received a copy of the GNU General Public License |
||||
|
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. |
||||
|
|
||||
|
/** |
||||
|
* Privacy Subsystem implementation for theme_boost. |
||||
|
* |
||||
|
* @package theme_boost |
||||
|
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk> |
||||
|
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
||||
|
*/ |
||||
|
|
||||
|
namespace theme_boost\privacy; |
||||
|
|
||||
|
defined('MOODLE_INTERNAL') || die(); |
||||
|
|
||||
|
/** |
||||
|
* The boost theme does not store any data. |
||||
|
* |
||||
|
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk> |
||||
|
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
||||
|
*/ |
||||
|
class provider implements \core_privacy\local\metadata\null_provider { |
||||
|
|
||||
|
/** |
||||
|
* Get the language string identifier with the component's language |
||||
|
* file to explain why this plugin stores no data. |
||||
|
* |
||||
|
* @return string |
||||
|
*/ |
||||
|
public static function get_reason() : string { |
||||
|
return 'privacy:metadata'; |
||||
|
} |
||||
|
} |
@ -1,265 +0,0 @@ |
|||||
<?php |
|
||||
// This file is part of Moodle - http://moodle.org/ |
|
||||
// |
|
||||
// Moodle is free software: you can redistribute it and/or modify |
|
||||
// it under the terms of the GNU General Public License as published by |
|
||||
// the Free Software Foundation, either version 3 of the License, or |
|
||||
// (at your option) any later version. |
|
||||
// |
|
||||
// Moodle is distributed in the hope that it will be useful, |
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
||||
// GNU General Public License for more details. |
|
||||
// |
|
||||
// You should have received a copy of the GNU General Public License |
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. |
|
||||
|
|
||||
/** |
|
||||
* Used to convert a bootswatch file from https://bootswatch.com/ to a Moodle preset. |
|
||||
* |
|
||||
* @package theme_ilb |
|
||||
* @subpackage cli |
|
||||
* @copyright 2016 Damyon Wiese |
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
|
||||
*/ |
|
||||
|
|
||||
define('CLI_SCRIPT', true); |
|
||||
|
|
||||
require(__DIR__.'/../../../config.php'); |
|
||||
require_once($CFG->libdir.'/clilib.php'); |
|
||||
|
|
||||
|
|
||||
// Now get cli options. |
|
||||
list($options, $unrecognized) = cli_get_params(array('help' => false), |
|
||||
array('h' => 'help', 'v' => 'variables', 'b' => 'bootswatch', 'p' => 'preset')); |
|
||||
|
|
||||
if ($unrecognized) { |
|
||||
$unrecognized = implode("\n ", $unrecognized); |
|
||||
cli_error(get_string('cliunknowoption', 'admin', $unrecognized)); |
|
||||
} |
|
||||
|
|
||||
if (!isset($options['variables'])) { |
|
||||
$options['variables'] = '_variables.scss'; |
|
||||
} |
|
||||
if (!isset($options['bootswatch'])) { |
|
||||
$options['bootswatch'] = '_bootswatch.scss'; |
|
||||
} |
|
||||
if (!isset($options['preset'])) { |
|
||||
$options['preset'] = 'preset.scss'; |
|
||||
} |
|
||||
|
|
||||
if ($options['help']) { |
|
||||
$help = "Convert a Bootswatch file from Bootstrap 3 to a Moodle preset file compatible with bootstrap 4. |
|
||||
|
|
||||
This scripts takes the scss files from a Bootstrap 3 Bootswatch and produces a Moodle compatible preset file. |
|
||||
|
|
||||
Options: |
|
||||
-h, --help Print out this help |
|
||||
-v, --variables=<variables file> |
|
||||
-b, --bootswatch=<bootswatch file> |
|
||||
-p, --preset=<preset file> |
|
||||
|
|
||||
Example: |
|
||||
\$import-bootswatch.php -v=_variables.scss -b=_bootswatch.scss -p=preset-paper.scss |
|
||||
"; |
|
||||
|
|
||||
echo $help; |
|
||||
die; |
|
||||
} |
|
||||
|
|
||||
cli_heading('Convert a Bootswatch file from Bootstrap 3 to a Moodle preset file compatible with bootstrap 4.'); |
|
||||
$variablesfile = $options['variables']; |
|
||||
$bootswatchfile = $options['bootswatch']; |
|
||||
$presetfile = $options['preset']; |
|
||||
|
|
||||
$sourcevariables = @file_get_contents($variablesfile); |
|
||||
if (!$sourcevariables) { |
|
||||
die('Could not read variables file: ' . $variablesfile . "\n"); |
|
||||
} |
|
||||
$sourcebootswatch = @file_get_contents($bootswatchfile); |
|
||||
if (!$sourcebootswatch) { |
|
||||
die('Could not read bootswatch file: ' . $bootswatchfile . "\n"); |
|
||||
} |
|
||||
|
|
||||
function str_replace_one($needle, $replace, $haystack) { |
|
||||
$pos = strpos($haystack, $needle); |
|
||||
if ($pos !== false) { |
|
||||
$newstring = substr_replace($haystack, $replace, $pos, strlen($needle)); |
|
||||
} |
|
||||
return $newstring; |
|
||||
} |
|
||||
|
|
||||
$out = @fopen($presetfile, "w"); |
|
||||
|
|
||||
if (!$out) { |
|
||||
die('Could not open preset file for writing: ' . $presetfile . "\n"); |
|
||||
} |
|
||||
|
|
||||
// Write the license (MIT). |
|
||||
|
|
||||
$license = <<<EOD |
|
||||
// |
|
||||
// The MIT License (MIT) |
|
||||
// |
|
||||
// Copyright (c) 2013 Thomas Park |
|
||||
// |
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy |
|
||||
// of this software and associated documentation files (the "Software"), to deal |
|
||||
// in the Software without restriction, including without limitation the rights |
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
||||
// copies of the Software, and to permit persons to whom the Software is |
|
||||
// furnished to do so, subject to the following conditions: |
|
||||
// |
|
||||
// The above copyright notice and this permission notice shall be included in |
|
||||
// all copies or substantial portions of the Software. |
|
||||
// |
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
|
||||
// THE SOFTWARE. |
|
||||
// |
|
||||
|
|
||||
EOD; |
|
||||
|
|
||||
fwrite($out, $license); |
|
||||
|
|
||||
$workingvariables = $sourcevariables; |
|
||||
// Now start tweaking the variables strings. |
|
||||
|
|
||||
// Insert a lightest grey colour. |
|
||||
$newrule = '$gray-lightest: lighten($gray-lighter, 13.5%);'; |
|
||||
$nextline = '$brand-primary'; |
|
||||
$workingvariables = str_replace_one($nextline, "$newrule\n\n$nextline", $workingvariables); |
|
||||
|
|
||||
// Set body-color to text-color. |
|
||||
$newrule = '$body-color: $text-color;'; |
|
||||
$nextline = '//** Global textual link color.'; |
|
||||
$workingvariables = str_replace_one($nextline, "$newrule\n\n$nextline", $workingvariables); |
|
||||
|
|
||||
// Add a font-size-root the same as font-size-base. |
|
||||
$newrule = '$font-size-root: $font-size-base;'; |
|
||||
$nextline = '$font-size-large'; |
|
||||
$workingvariables = str_replace_one($nextline, "$newrule\n\n$nextline", $workingvariables); |
|
||||
|
|
||||
// Replace all 'large' with 'lg'. |
|
||||
$workingvariables = str_replace('large', 'lg', $workingvariables); |
|
||||
// Replace all 'small' with 'sm'. |
|
||||
$workingvariables = str_replace('small', 'sm', $workingvariables); |
|
||||
// Replace all 'vertical' with 'y'. |
|
||||
$workingvariables = str_replace('vertical', 'y', $workingvariables); |
|
||||
// Replace all 'horizontal' with 'x'. |
|
||||
$workingvariables = str_replace('horizontal', 'x', $workingvariables); |
|
||||
// Replace all 'border-radius-base' with 'border-radius'. |
|
||||
$workingvariables = str_replace('border-radius-base', 'border-radius', $workingvariables); |
|
||||
// Replace all 'condensed-cell' with 'sm-cell'. |
|
||||
$workingvariables = str_replace('condensed-cell', 'sm-cell', $workingvariables); |
|
||||
|
|
||||
|
|
||||
// Add styles for btn-secondary. |
|
||||
$newrule = '$btn-secondary-color: $btn-default-color; |
|
||||
$btn-secondary-bg: $btn-default-bg; |
|
||||
$btn-secondary-border: $btn-default-border; |
|
||||
|
|
||||
'; |
|
||||
$nextline = '$btn-primary-color'; |
|
||||
$workingvariables = str_replace_one($nextline, "$newrule\n\n$nextline", $workingvariables); |
|
||||
|
|
||||
// Add a input-border rule matching input-border-color. |
|
||||
$newrule = '$input-border-color: $input-border;'; |
|
||||
$nextline = '$input-border-radius:'; |
|
||||
$workingvariables = str_replace_one($nextline, "$newrule\n\n$nextline", $workingvariables); |
|
||||
// Replace all 'input-height-base:' with 'input-height:'. |
|
||||
$workingvariables = str_replace('input-height-base:', 'input-height:', $workingvariables); |
|
||||
|
|
||||
// Replace all '-default-' with '-light-'. |
|
||||
$workingvariables = str_replace('navbar-default-', 'navbar-light-', $workingvariables); |
|
||||
|
|
||||
// Replace all '-inverse-' with '-dark-'. |
|
||||
$workingvariables = str_replace('navbar-inverse-', 'navbar-dark-', $workingvariables); |
|
||||
|
|
||||
// Add a pagination-border-color rule matching pagination-border. |
|
||||
$newrule = '$pagination-border-color: $pagination-border;'; |
|
||||
$nextline = '$pagination-hover-color'; |
|
||||
$workingvariables = str_replace_one($nextline, "$newrule\n\n$nextline", $workingvariables); |
|
||||
|
|
||||
// Replace all 'label-' with 'tag-'. |
|
||||
$workingvariables = str_replace('label-', 'tag-', $workingvariables); |
|
||||
|
|
||||
// Replace all 'panel-' with 'card-'. |
|
||||
$workingvariables = str_replace('panel-', 'card-', $workingvariables); |
|
||||
|
|
||||
fwrite($out, $workingvariables); |
|
||||
|
|
||||
fwrite($out, ' |
|
||||
@import "moodle"; |
|
||||
'); |
|
||||
|
|
||||
// Now replacements on the bootswatch. |
|
||||
$workingbootswatch = $sourcebootswatch; |
|
||||
|
|
||||
$mixins = <<<EOD |
|
||||
|
|
||||
@mixin placeholder(\$text) { |
|
||||
placeholder: \$text; |
|
||||
} |
|
||||
@mixin box-shadow(\$text) { |
|
||||
box-shadow: \$text; |
|
||||
} |
|
||||
@mixin transform(\$transforms) { |
|
||||
transform: \$transforms; |
|
||||
} |
|
||||
@mixin rotate (\$deg) { |
|
||||
@include transform(rotate(#{\$deg}deg)); |
|
||||
} |
|
||||
@mixin scale(\$scale) { |
|
||||
@include transform(scale(\$scale)); |
|
||||
} |
|
||||
@mixin translate (\$x, \$y) { |
|
||||
@include transform(translate(\$x, \$y)); |
|
||||
} |
|
||||
@mixin skew (\$x, \$y) { |
|
||||
@include transform(skew(#{\$x}deg, #{\$y}deg)); |
|
||||
} |
|
||||
@mixin transform-origin (\$origin) { |
|
||||
transform-origin: \$origin; |
|
||||
} |
|
||||
|
|
||||
EOD; |
|
||||
// Prepend some mixins. |
|
||||
$workingbootswatch = $mixins . $workingbootswatch; |
|
||||
|
|
||||
// Replace all 'large' with 'lg'. |
|
||||
$workingbootswatch = str_replace('large', 'lg', $workingbootswatch); |
|
||||
// Replace all 'small' with 'sm'. |
|
||||
$workingbootswatch = str_replace('small', 'sm', $workingbootswatch); |
|
||||
// Replace all 'vertical' with 'y'. |
|
||||
$workingbootswatch = str_replace('vertical', 'y', $workingbootswatch); |
|
||||
// Replace all 'horizontal' with 'x'. |
|
||||
$workingbootswatch = str_replace('horizontal', 'x', $workingbootswatch); |
|
||||
// Replace all 'border-radius-base' with 'border-radius'. |
|
||||
$workingbootswatch = str_replace('border-radius-base', 'border-radius', $workingbootswatch); |
|
||||
// Replace all 'condensed-cell' with 'sm-cell'. |
|
||||
$workingbootswatch = str_replace('condensed-cell', 'sm-cell', $workingbootswatch); |
|
||||
|
|
||||
// Replace all 'input-height-base:' with 'input-height:'. |
|
||||
$workingbootswatch = str_replace('input-height-base:', 'input-height:', $workingbootswatch); |
|
||||
|
|
||||
// Replace all '-default-' with '-light-'. |
|
||||
$workingbootswatch = str_replace('navbar-default-', 'navbar-light-', $workingbootswatch); |
|
||||
|
|
||||
// Replace all '-inverse-' with '-dark-'. |
|
||||
$workingbootswatch = str_replace('navbar-inverse-', 'navbar-dark-', $workingbootswatch); |
|
||||
|
|
||||
// Replace all 'label-' with 'tag-'. |
|
||||
$workingbootswatch = str_replace('label-', 'tag-', $workingbootswatch); |
|
||||
|
|
||||
// Replace all 'panel-' with 'card-'. |
|
||||
$workingbootswatch = str_replace('panel-', 'card-', $workingbootswatch); |
|
||||
|
|
||||
fwrite($out, $workingbootswatch); |
|
||||
|
|
||||
fclose($out); |
|
||||
|
|
@ -1,5 +0,0 @@ |
|||||
This CLI script can be used to convert a bootswatch file from https://bootswatch.com/ to a Moodle preset. |
|
||||
|
|
||||
To use it - download the _variables.scss and the _bootswatch.scss files for the chosen bootswatch into the current |
|
||||
folder and run "php import-bootswatch.php". This will generate a new file "preset.scss" which can be put |
|
||||
into the scss file as a Moodle preset. |
|
@ -1,43 +1,12 @@ |
|||||
<?php |
<?php |
||||
// This file is part of Moodle - http://moodle.org/ |
// Every file should have GPL and copyright in the header - we skip it in tutorials but you should not skip it for real. |
||||
// |
|
||||
// Moodle is free software: you can redistribute it and/or modify |
|
||||
// it under the terms of the GNU General Public License as published by |
|
||||
// the Free Software Foundation, either version 3 of the License, or |
|
||||
// (at your option) any later version. |
|
||||
// |
|
||||
// Moodle is distributed in the hope that it will be useful, |
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
||||
// GNU General Public License for more details. |
|
||||
// |
|
||||
// You should have received a copy of the GNU General Public License |
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. |
|
||||
|
|
||||
/** |
|
||||
* Language file. |
|
||||
* |
|
||||
* @package theme_ilb |
|
||||
* @copyright 2016 Frédéric Massart |
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
|
||||
*/ |
|
||||
|
|
||||
|
// This line protects the file from being accessed by a URL directly. |
||||
defined('MOODLE_INTERNAL') || die(); |
defined('MOODLE_INTERNAL') || die(); |
||||
|
|
||||
$string['advancedsettings'] = 'Advanced settings'; |
// A description shown in the admin theme selector. |
||||
$string['brandcolor'] = 'Brand colour'; |
$string['choosereadme'] = 'Tema do ILB para o Moodle'; |
||||
$string['brandcolor_desc'] = 'The accent colour.'; |
// The name of our plugin. |
||||
$string['choosereadme'] = 'Ilb is a modern highly-customisable theme. This theme is intended to be used directly, or as a parent theme when creating new themes utilising Bootstrap 4.'; |
$string['pluginname'] = 'ILB'; |
||||
$string['currentinparentheses'] = '(current)'; |
// We need to include a lang string for each block region. |
||||
$string['configtitle'] = 'Ilb'; |
|
||||
$string['generalsettings'] = 'General settings'; |
|
||||
$string['pluginname'] = 'Ilb'; |
|
||||
$string['presetfiles'] = 'Additional theme preset files'; |
|
||||
$string['presetfiles_desc'] = 'Preset files can be used to dramatically alter the appearance of the theme. See <a href=https://docs.moodle.org/dev/Ilb_Presets>Ilb presets</a> for information on creating and sharing your own preset files, and see the <a href=http://moodle.net/ilb>Presets repository</a> for presets that others have shared.'; |
|
||||
$string['preset'] = 'Theme preset'; |
|
||||
$string['preset_desc'] = 'Pick a preset to broadly change the look of the theme.'; |
|
||||
$string['rawscss'] = 'Raw SCSS'; |
|
||||
$string['rawscss_desc'] = 'Use this field to provide SCSS or CSS code which will be injected at the end of the style sheet.'; |
|
||||
$string['rawscsspre'] = 'Raw initial SCSS'; |
|
||||
$string['rawscsspre_desc'] = 'In this field you can provide initialising SCSS code, it will be injected before everything else. Most of the time you will use this setting to define variables.'; |
|
||||
$string['region-side-pre'] = 'Right'; |
$string['region-side-pre'] = 'Right'; |
@ -1,137 +0,0 @@ |
|||||
<?php |
|
||||
// This file is part of Moodle - http://moodle.org/ |
|
||||
// |
|
||||
// Moodle is free software: you can redistribute it and/or modify |
|
||||
// it under the terms of the GNU General Public License as published by |
|
||||
// the Free Software Foundation, either version 3 of the License, or |
|
||||
// (at your option) any later version. |
|
||||
// |
|
||||
// Moodle is distributed in the hope that it will be useful, |
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
||||
// GNU General Public License for more details. |
|
||||
// |
|
||||
// You should have received a copy of the GNU General Public License |
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. |
|
||||
|
|
||||
/** |
|
||||
* A one column layout for the ilb theme. |
|
||||
* |
|
||||
* @package theme_ilb |
|
||||
* @copyright 2016 Damyon Wiese |
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
|
||||
*/ |
|
||||
|
|
||||
defined('MOODLE_INTERNAL') || die(); |
|
||||
|
|
||||
require_once($CFG->libdir . '/../config.php'); |
|
||||
|
|
||||
if (isloggedin()) { |
|
||||
user_preference_allow_ajax_update('drawer-open-nav', PARAM_ALPHA); |
|
||||
require_once($CFG->libdir . '/behat/lib.php'); |
|
||||
|
|
||||
$navdraweropen = (get_user_preferences('drawer-open-nav', 'true') == 'true'); |
|
||||
$extraclasses = []; |
|
||||
if ($navdraweropen) { |
|
||||
$extraclasses[] = 'drawer-open-left'; |
|
||||
} |
|
||||
//$bodyattributes = $OUTPUT->body_attributes($extraclasses); |
|
||||
$blockshtml = $OUTPUT->blocks('side-pre'); |
|
||||
$hasblocks = strpos($blockshtml, 'data-block=') !== false; |
|
||||
$regionmainsettingsmenu = $OUTPUT->region_main_settings_menu(); |
|
||||
|
|
||||
//$user_picture = false; |
|
||||
//if ($user->picture) { |
|
||||
//$user_picture = get_file_url($USER->id.'/'.$size['large'].'.jpg', null, 'user'); |
|
||||
//} |
|
||||
global $USER,$PAGE; |
|
||||
$user_picture=new user_picture($USER); |
|
||||
$user_picture_url=$user_picture->get_url($PAGE); |
|
||||
$user_profile_url=$CFG->wwwroot . "/user/profile.php?id=" . $USER->id . "&course=1"; |
|
||||
|
|
||||
|
|
||||
switch($USER->profile['situacaoaluno']) |
|
||||
{ |
|
||||
case '1': |
|
||||
$cpf1 = 'cpf1'; |
|
||||
break; |
|
||||
case '2': |
|
||||
$cpf2 = 'cpf2'; |
|
||||
break; |
|
||||
case '3': |
|
||||
$cpf3 = 'cpf3'; |
|
||||
break; |
|
||||
} |
|
||||
|
|
||||
$templatecontext = [ |
|
||||
'sitename' => format_string($SITE->shortname, true, ['context' => context_course::instance(SITEID), "escape" => false]), |
|
||||
'output' => $OUTPUT, |
|
||||
'projetos_especiais' => $OUTPUT->image_url('projetos_especiais', 'theme'), |
|
||||
'conheca-senado' => $OUTPUT->image_url('conheca-senado', 'theme'), |
|
||||
'Cursos-on-line-sem-tutor' => $OUTPUT->image_url('Cursos-on-line-sem-tutor', 'theme'), |
|
||||
'Cursos-on-line' => $OUTPUT->image_url('Cursos-on-line', 'theme'), |
|
||||
'formacao_interna' => $OUTPUT->image_url('formacao_interna', 'theme'), |
|
||||
'oficinas-interlegis' => $OUTPUT->image_url('oficinas-interlegis', 'theme'), |
|
||||
'pos-graduacao' => $OUTPUT->image_url('pos-graduacao', 'theme'), |
|
||||
'video-aula' => $OUTPUT->image_url('video-aula', 'theme'), |
|
||||
'icon_ContatoEmail-azul' => $OUTPUT->image_url('icon_ContatoEmail-azul', 'theme'), |
|
||||
'icon_ContatoFone-azul' => $OUTPUT->image_url('icon_ContatoFone-azul', 'theme'), |
|
||||
'fundo-c' => $OUTPUT->image_url('fundo-c', 'theme'), |
|
||||
'matricula_aberta' => $OUTPUT->image_url('matricula_aberta', 'theme'), |
|
||||
'matricula_aberta_verde' => $OUTPUT->image_url('matricula_aberta_verde', 'theme'), |
|
||||
'matricula_encerrada' => $OUTPUT->image_url('matricula_encerrada', 'theme'), |
|
||||
'matricula_encerrada_vermelha' => $OUTPUT->image_url('matricula_encerrada_vermelho', 'theme'), |
|
||||
'logo_saberes_xl' => $OUTPUT->image_url('logo_saberes_xl', 'theme'), |
|
||||
'sidepreblocks' => $blockshtml, |
|
||||
'hasblocks' => $hasblocks, |
|
||||
'bodyattributes' => $bodyattributes, |
|
||||
'navdraweropen' => $navdraweropen, |
|
||||
'regionmainsettingsmenu' => $regionmainsettingsmenu, |
|
||||
'hasregionmainsettingsmenu' => !empty($regionmainsettingsmenu), |
|
||||
'username' => $USER->username, |
|
||||
'firstname' => $USER->firstname, |
|
||||
'lastname' => $USER->lastname, |
|
||||
'sessKey' => $USER->sesskey, |
|
||||
'cpf1' => $cpf1, |
|
||||
'cpf2' => $cpf2, |
|
||||
'cpf3' => $cpf3, |
|
||||
'loginChangeNotification' => false, |
|
||||
'moodle_url' => $CFG->wwwroot, |
|
||||
'userpictureurl' => $user_picture_url, |
|
||||
'userprofileurl' => $user_profile_url, |
|
||||
]; |
|
||||
|
|
||||
$templatecontext['flatnavigation'] = $PAGE->flatnav; |
|
||||
|
|
||||
echo $OUTPUT->render_from_template('theme_ilb/frontpage_ilblogado', $templatecontext); |
|
||||
|
|
||||
} else { |
|
||||
$bodyattributes = $OUTPUT->body_attributes([]); |
|
||||
|
|
||||
$templatecontext = [ |
|
||||
'sitename' => format_string($SITE->shortname, true, ['context' => context_course::instance(SITEID), "escape" => false]), |
|
||||
'projetos_especiais' => $OUTPUT->image_url('projetos_especiais', 'theme'), |
|
||||
'conheca-senado' => $OUTPUT->image_url('conheca-senado', 'theme'), |
|
||||
'Cursos-on-line-sem-tutor' => $OUTPUT->image_url('Cursos-on-line-sem-tutor', 'theme'), |
|
||||
'Cursos-on-line' => $OUTPUT->image_url('Cursos-on-line', 'theme'), |
|
||||
'formacao_interna' => $OUTPUT->image_url('formacao_interna', 'theme'), |
|
||||
'oficinas-interlegis' => $OUTPUT->image_url('oficinas-interlegis', 'theme'), |
|
||||
'pos-graduacao' => $OUTPUT->image_url('pos-graduacao', 'theme'), |
|
||||
'video-aula' => $OUTPUT->image_url('video-aula', 'theme'), |
|
||||
'fundo-c' => $OUTPUT->image_url('fundo-c', 'theme'), |
|
||||
'matricula_aberta' => $OUTPUT->image_url('matricula_aberta', 'theme'), |
|
||||
'matricula_aberta_verde' => $OUTPUT->image_url('matricula_aberta_verde', 'theme'), |
|
||||
'matricula_encerrada' => $OUTPUT->image_url('matricula_encerrada', 'theme'), |
|
||||
'matricula_encerrada_vermelha' => $OUTPUT->image_url('matricula_encerrada_vermelho', 'theme'), |
|
||||
'icon_ContatoEmail-azul' => $OUTPUT->image_url('icon_ContatoEmail-azul', 'theme'), |
|
||||
'icon_ContatoFone-azul' => $OUTPUT->image_url('icon_ContatoFone-azul', 'theme'), |
|
||||
'logo_saberes_xl' => $OUTPUT->image_url('logo_saberes_xl', 'theme'), |
|
||||
'output' => $OUTPUT, |
|
||||
'bodyattributes' => $bodyattributes, |
|
||||
'moodle_url' => $CFG->wwwroot |
|
||||
]; |
|
||||
|
|
||||
|
|
||||
|
|
||||
echo $OUTPUT->render_from_template('theme_ilb/frontpage_ilblogado', $templatecontext); |
|
||||
} |
|
@ -1,40 +0,0 @@ |
|||||
<?php |
|
||||
// This file is part of Moodle - http://moodle.org/ |
|
||||
// |
|
||||
// Moodle is free software: you can redistribute it and/or modify |
|
||||
// it under the terms of the GNU General Public License as published by |
|
||||
// the Free Software Foundation, either version 3 of the License, or |
|
||||
// (at your option) any later version. |
|
||||
// |
|
||||
// Moodle is distributed in the hope that it will be useful, |
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
||||
// GNU General Public License for more details. |
|
||||
// |
|
||||
// You should have received a copy of the GNU General Public License |
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. |
|
||||
|
|
||||
/** |
|
||||
* A one column layout for the ilb theme. |
|
||||
* |
|
||||
* @package theme_ilb |
|
||||
* @copyright 2016 Damyon Wiese |
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
|
||||
*/ |
|
||||
|
|
||||
defined('MOODLE_INTERNAL') || die(); |
|
||||
|
|
||||
require_once($CFG->libdir . '/../config.php'); |
|
||||
|
|
||||
$bodyattributes = $OUTPUT->body_attributes([]); |
|
||||
|
|
||||
$templatecontext = [ |
|
||||
'sitename' => format_string($SITE->shortname, true, ['context' => context_course::instance(SITEID), "escape" => false]), |
|
||||
'output' => $OUTPUT, |
|
||||
'favicon' => $OUTPUT->image_url('favicon', 'theme'), |
|
||||
'bodyattributes' => $bodyattributes, |
|
||||
'moodle_url' => $CFG->wwwroot |
|
||||
]; |
|
||||
|
|
||||
echo $OUTPUT->render_from_template('theme_ilb/head', $templatecontext); |
|
||||
|
|
@ -1,40 +0,0 @@ |
|||||
<?php |
|
||||
// This file is part of Moodle - http://moodle.org/ |
|
||||
// |
|
||||
// Moodle is free software: you can redistribute it and/or modify |
|
||||
// it under the terms of the GNU General Public License as published by |
|
||||
// the Free Software Foundation, either version 3 of the License, or |
|
||||
// (at your option) any later version. |
|
||||
// |
|
||||
// Moodle is distributed in the hope that it will be useful, |
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
||||
// GNU General Public License for more details. |
|
||||
// |
|
||||
// You should have received a copy of the GNU General Public License |
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. |
|
||||
|
|
||||
/** |
|
||||
* A one column layout for the ilb theme. |
|
||||
* |
|
||||
* @package theme_ilb |
|
||||
* @copyright 2016 Damyon Wiese |
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
|
||||
*/ |
|
||||
|
|
||||
defined('MOODLE_INTERNAL') || die(); |
|
||||
|
|
||||
require_once($CFG->libdir . '/../config.php'); |
|
||||
|
|
||||
$bodyattributes = $OUTPUT->body_attributes([]); |
|
||||
|
|
||||
$templatecontext = [ |
|
||||
'sitename' => format_string($SITE->shortname, true, ['context' => context_course::instance(SITEID), "escape" => false]), |
|
||||
'output' => $OUTPUT, |
|
||||
'favicon' => $OUTPUT->image_url('favicon', 'theme'), |
|
||||
'bodyattributes' => $bodyattributes, |
|
||||
'moodle_url' => $CFG->wwwroot |
|
||||
]; |
|
||||
|
|
||||
echo $OUTPUT->render_from_template('theme_ilb/head2', $templatecontext); |
|
||||
|
|
Before Width: | Height: | Size: 182 B |
Before Width: | Height: | Size: 555 B After Width: | Height: | Size: 425 B |
Before Width: | Height: | Size: 372 B |
After Width: | Height: | Size: 473 B |
Before Width: | Height: | Size: 293 B |
After Width: | Height: | Size: 473 B |
Before Width: | Height: | Size: 424 B |
After Width: | Height: | Size: 319 B |
Before Width: | Height: | Size: 150 B |
Before Width: | Height: | Size: 458 B After Width: | Height: | Size: 425 B |
Before Width: | Height: | Size: 410 B |
After Width: | Height: | Size: 412 B |
Before Width: | Height: | Size: 207 B |
Before Width: | Height: | Size: 618 B After Width: | Height: | Size: 561 B |
After Width: | Height: | Size: 279 B |
Before Width: | Height: | Size: 263 B |
Before Width: | Height: | Size: 693 B After Width: | Height: | Size: 675 B |
Before Width: | Height: | Size: 536 B |
After Width: | Height: | Size: 904 B |
Before Width: | Height: | Size: 397 B |
After Width: | Height: | Size: 904 B |
After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 180 B |
Before Width: | Height: | Size: 569 B After Width: | Height: | Size: 574 B |
Before Width: | Height: | Size: 509 B |
After Width: | Height: | Size: 279 B |
Before Width: | Height: | Size: 512 B |
After Width: | Height: | Size: 279 B |
Before Width: | Height: | Size: 257 B |
Before Width: | Height: | Size: 571 B After Width: | Height: | Size: 654 B |
Before Width: | Height: | Size: 250 B |
Before Width: | Height: | Size: 635 B After Width: | Height: | Size: 478 B |
Before Width: | Height: | Size: 207 B |
Before Width: | Height: | Size: 842 B After Width: | Height: | Size: 895 B |
After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 111 B |
Before Width: | Height: | Size: 95 B |
Before Width: | Height: | Size: 387 B After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 114 B |
Before Width: | Height: | Size: 438 B After Width: | Height: | Size: 279 B |
@ -1,32 +0,0 @@ |
|||||
Description of Twitter bootstrap import into Moodle |
|
||||
|
|
||||
Twitter bootstrap |
|
||||
----------------- |
|
||||
|
|
||||
Sass: |
|
||||
This theme uses the original unmodified version 4.0.0-alpha-3 Twitter bootstrap sass files. |
|
||||
The bootstrap repository is available on: |
|
||||
|
|
||||
https://github.com/twitter/bootstrap.git |
|
||||
|
|
||||
To update to the latest release of twitter bootstrap: |
|
||||
* re-apply /* rtl:begin:ignore */ on the top of _popover.scss before .popover rule and /* rtl:end:ignore */ before |
|
||||
.popover-arrow::after rule. See MDL-56763 commit (1a4faf9b). |
|
||||
* remove all files from scss/bootstrap, |
|
||||
* download the new scss files and store them in scss/bootstrap |
|
||||
* update ./thirdpartylibs.xml |
|
||||
|
|
||||
Javascript: |
|
||||
|
|
||||
This theme uses the transpiled javascript from bootstrap4 as amd modules. |
|
||||
|
|
||||
To update the javascript files: |
|
||||
Checkout the latest branch of bootstrap to a folder, in that folder run: |
|
||||
|
|
||||
> mkdir "out" |
|
||||
> npm install babel-cli babel-preset-es2015 babel-plugin-transform-es2015-modules-amd |
|
||||
> ./node_modules/babel-cli/bin/babel.js --presets es2015 --plugins transform-es2015-modules-amd -d out/ js/src/ |
|
||||
|
|
||||
Copy the transpiled files from out/ into the amd/src/ folder for the theme. |
|
||||
Run grunt to re-compile the JS files. |
|
||||
|
|
@ -0,0 +1,34 @@ |
|||||
|
// Spinning Icons |
||||
|
// -------------------------- |
||||
|
|
||||
|
.#{$fa-css-prefix}-spin { |
||||
|
-webkit-animation: fa-spin 2s infinite linear; |
||||
|
animation: fa-spin 2s infinite linear; |
||||
|
} |
||||
|
|
||||
|
.#{$fa-css-prefix}-pulse { |
||||
|
-webkit-animation: fa-spin 1s infinite steps(8); |
||||
|
animation: fa-spin 1s infinite steps(8); |
||||
|
} |
||||
|
|
||||
|
@-webkit-keyframes fa-spin { |
||||
|
0% { |
||||
|
-webkit-transform: rotate(0deg); |
||||
|
transform: rotate(0deg); |
||||
|
} |
||||
|
100% { |
||||
|
-webkit-transform: rotate(359deg); |
||||
|
transform: rotate(359deg); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@keyframes fa-spin { |
||||
|
0% { |
||||
|
-webkit-transform: rotate(0deg); |
||||
|
transform: rotate(0deg); |
||||
|
} |
||||
|
100% { |
||||
|
-webkit-transform: rotate(359deg); |
||||
|
transform: rotate(359deg); |
||||
|
} |
||||
|
} |
@ -0,0 +1,25 @@ |
|||||
|
// Bordered & Pulled |
||||
|
// ------------------------- |
||||
|
|
||||
|
.#{$fa-css-prefix}-border { |
||||
|
padding: .2em .25em .15em; |
||||
|
border: solid .08em $fa-border-color; |
||||
|
border-radius: .1em; |
||||
|
} |
||||
|
|
||||
|
.#{$fa-css-prefix}-pull-left { float: left; } |
||||
|
.#{$fa-css-prefix}-pull-right { float: right; } |
||||
|
|
||||
|
.#{$fa-css-prefix} { |
||||
|
&.#{$fa-css-prefix}-pull-left { margin-right: .3em; } |
||||
|
&.#{$fa-css-prefix}-pull-right { margin-left: .3em; } |
||||
|
} |
||||
|
|
||||
|
/* Deprecated as of 4.4.0 */ |
||||
|
.pull-right { float: right; } |
||||
|
.pull-left { float: left; } |
||||
|
|
||||
|
.#{$fa-css-prefix} { |
||||
|
&.pull-left { margin-right: .3em; } |
||||
|
&.pull-right { margin-left: .3em; } |
||||
|
} |
@ -0,0 +1,12 @@ |
|||||
|
// Base Class Definition |
||||
|
// ------------------------- |
||||
|
|
||||
|
.#{$fa-css-prefix} { |
||||
|
display: inline-block; |
||||
|
font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration |
||||
|
font-size: inherit; // can't have font-size inherit on line above, so need to override |
||||
|
text-rendering: auto; // optimizelegibility throws things off #1094 |
||||
|
-webkit-font-smoothing: antialiased; |
||||
|
-moz-osx-font-smoothing: grayscale; |
||||
|
|
||||
|
} |
@ -0,0 +1,6 @@ |
|||||
|
// Fixed Width Icons |
||||
|
// ------------------------- |
||||
|
.#{$fa-css-prefix}-fw { |
||||
|
width: (18em / 14); |
||||
|
text-align: center; |
||||
|
} |
@ -0,0 +1,789 @@ |
|||||
|
/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen |
||||
|
readers do not read off random characters that represent icons */ |
||||
|
|
||||
|
.#{$fa-css-prefix}-glass:before { content: $fa-var-glass; } |
||||
|
.#{$fa-css-prefix}-music:before { content: $fa-var-music; } |
||||
|
.#{$fa-css-prefix}-search:before { content: $fa-var-search; } |
||||
|
.#{$fa-css-prefix}-envelope-o:before { content: $fa-var-envelope-o; } |
||||
|
.#{$fa-css-prefix}-heart:before { content: $fa-var-heart; } |
||||
|
.#{$fa-css-prefix}-star:before { content: $fa-var-star; } |
||||
|
.#{$fa-css-prefix}-star-o:before { content: $fa-var-star-o; } |
||||
|
.#{$fa-css-prefix}-user:before { content: $fa-var-user; } |
||||
|
.#{$fa-css-prefix}-film:before { content: $fa-var-film; } |
||||
|
.#{$fa-css-prefix}-th-large:before { content: $fa-var-th-large; } |
||||
|
.#{$fa-css-prefix}-th:before { content: $fa-var-th; } |
||||
|
.#{$fa-css-prefix}-th-list:before { content: $fa-var-th-list; } |
||||
|
.#{$fa-css-prefix}-check:before { content: $fa-var-check; } |
||||
|
.#{$fa-css-prefix}-remove:before, |
||||
|
.#{$fa-css-prefix}-close:before, |
||||
|
.#{$fa-css-prefix}-times:before { content: $fa-var-times; } |
||||
|
.#{$fa-css-prefix}-search-plus:before { content: $fa-var-search-plus; } |
||||
|
.#{$fa-css-prefix}-search-minus:before { content: $fa-var-search-minus; } |
||||
|
.#{$fa-css-prefix}-power-off:before { content: $fa-var-power-off; } |
||||
|
.#{$fa-css-prefix}-signal:before { content: $fa-var-signal; } |
||||
|
.#{$fa-css-prefix}-gear:before, |
||||
|
.#{$fa-css-prefix}-cog:before { content: $fa-var-cog; } |
||||
|
.#{$fa-css-prefix}-trash-o:before { content: $fa-var-trash-o; } |
||||
|
.#{$fa-css-prefix}-home:before { content: $fa-var-home; } |
||||
|
.#{$fa-css-prefix}-file-o:before { content: $fa-var-file-o; } |
||||
|
.#{$fa-css-prefix}-clock-o:before { content: $fa-var-clock-o; } |
||||
|
.#{$fa-css-prefix}-road:before { content: $fa-var-road; } |
||||
|
.#{$fa-css-prefix}-download:before { content: $fa-var-download; } |
||||
|
.#{$fa-css-prefix}-arrow-circle-o-down:before { content: $fa-var-arrow-circle-o-down; } |
||||
|
.#{$fa-css-prefix}-arrow-circle-o-up:before { content: $fa-var-arrow-circle-o-up; } |
||||
|
.#{$fa-css-prefix}-inbox:before { content: $fa-var-inbox; } |
||||
|
.#{$fa-css-prefix}-play-circle-o:before { content: $fa-var-play-circle-o; } |
||||
|
.#{$fa-css-prefix}-rotate-right:before, |
||||
|
.#{$fa-css-prefix}-repeat:before { content: $fa-var-repeat; } |
||||
|
.#{$fa-css-prefix}-refresh:before { content: $fa-var-refresh; } |
||||
|
.#{$fa-css-prefix}-list-alt:before { content: $fa-var-list-alt; } |
||||
|
.#{$fa-css-prefix}-lock:before { content: $fa-var-lock; } |
||||
|
.#{$fa-css-prefix}-flag:before { content: $fa-var-flag; } |
||||
|
.#{$fa-css-prefix}-headphones:before { content: $fa-var-headphones; } |
||||
|
.#{$fa-css-prefix}-volume-off:before { content: $fa-var-volume-off; } |
||||
|
.#{$fa-css-prefix}-volume-down:before { content: $fa-var-volume-down; } |
||||
|
.#{$fa-css-prefix}-volume-up:before { content: $fa-var-volume-up; } |
||||
|
.#{$fa-css-prefix}-qrcode:before { content: $fa-var-qrcode; } |
||||
|
.#{$fa-css-prefix}-barcode:before { content: $fa-var-barcode; } |
||||
|
.#{$fa-css-prefix}-tag:before { content: $fa-var-tag; } |
||||
|
.#{$fa-css-prefix}-tags:before { content: $fa-var-tags; } |
||||
|
.#{$fa-css-prefix}-book:before { content: $fa-var-book; } |
||||
|
.#{$fa-css-prefix}-bookmark:before { content: $fa-var-bookmark; } |
||||
|
.#{$fa-css-prefix}-print:before { content: $fa-var-print; } |
||||
|
.#{$fa-css-prefix}-camera:before { content: $fa-var-camera; } |
||||
|
.#{$fa-css-prefix}-font:before { content: $fa-var-font; } |
||||
|
.#{$fa-css-prefix}-bold:before { content: $fa-var-bold; } |
||||
|
.#{$fa-css-prefix}-italic:before { content: $fa-var-italic; } |
||||
|
.#{$fa-css-prefix}-text-height:before { content: $fa-var-text-height; } |
||||
|
.#{$fa-css-prefix}-text-width:before { content: $fa-var-text-width; } |
||||
|
.#{$fa-css-prefix}-align-left:before { content: $fa-var-align-left; } |
||||
|
.#{$fa-css-prefix}-align-center:before { content: $fa-var-align-center; } |
||||
|
.#{$fa-css-prefix}-align-right:before { content: $fa-var-align-right; } |
||||
|
.#{$fa-css-prefix}-align-justify:before { content: $fa-var-align-justify; } |
||||
|
.#{$fa-css-prefix}-list:before { content: $fa-var-list; } |
||||
|
.#{$fa-css-prefix}-dedent:before, |
||||
|
.#{$fa-css-prefix}-outdent:before { content: $fa-var-outdent; } |
||||
|
.#{$fa-css-prefix}-indent:before { content: $fa-var-indent; } |
||||
|
.#{$fa-css-prefix}-video-camera:before { content: $fa-var-video-camera; } |
||||
|
.#{$fa-css-prefix}-photo:before, |
||||
|
.#{$fa-css-prefix}-image:before, |
||||
|
.#{$fa-css-prefix}-picture-o:before { content: $fa-var-picture-o; } |
||||
|
.#{$fa-css-prefix}-pencil:before { content: $fa-var-pencil; } |
||||
|
.#{$fa-css-prefix}-map-marker:before { content: $fa-var-map-marker; } |
||||
|
.#{$fa-css-prefix}-adjust:before { content: $fa-var-adjust; } |
||||
|
.#{$fa-css-prefix}-tint:before { content: $fa-var-tint; } |
||||
|
.#{$fa-css-prefix}-edit:before, |
||||
|
.#{$fa-css-prefix}-pencil-square-o:before { content: $fa-var-pencil-square-o; } |
||||
|
.#{$fa-css-prefix}-share-square-o:before { content: $fa-var-share-square-o; } |
||||
|
.#{$fa-css-prefix}-check-square-o:before { content: $fa-var-check-square-o; } |
||||
|
.#{$fa-css-prefix}-arrows:before { content: $fa-var-arrows; } |
||||
|
.#{$fa-css-prefix}-step-backward:before { content: $fa-var-step-backward; } |
||||
|
.#{$fa-css-prefix}-fast-backward:before { content: $fa-var-fast-backward; } |
||||
|
.#{$fa-css-prefix}-backward:before { content: $fa-var-backward; } |
||||
|
.#{$fa-css-prefix}-play:before { content: $fa-var-play; } |
||||
|
.#{$fa-css-prefix}-pause:before { content: $fa-var-pause; } |
||||
|
.#{$fa-css-prefix}-stop:before { content: $fa-var-stop; } |
||||
|
.#{$fa-css-prefix}-forward:before { content: $fa-var-forward; } |
||||
|
.#{$fa-css-prefix}-fast-forward:before { content: $fa-var-fast-forward; } |
||||
|
.#{$fa-css-prefix}-step-forward:before { content: $fa-var-step-forward; } |
||||
|
.#{$fa-css-prefix}-eject:before { content: $fa-var-eject; } |
||||
|
.#{$fa-css-prefix}-chevron-left:before { content: $fa-var-chevron-left; } |
||||
|
.#{$fa-css-prefix}-chevron-right:before { content: $fa-var-chevron-right; } |
||||
|
.#{$fa-css-prefix}-plus-circle:before { content: $fa-var-plus-circle; } |
||||
|
.#{$fa-css-prefix}-minus-circle:before { content: $fa-var-minus-circle; } |
||||
|
.#{$fa-css-prefix}-times-circle:before { content: $fa-var-times-circle; } |
||||
|
.#{$fa-css-prefix}-check-circle:before { content: $fa-var-check-circle; } |
||||
|
.#{$fa-css-prefix}-question-circle:before { content: $fa-var-question-circle; } |
||||
|
.#{$fa-css-prefix}-info-circle:before { content: $fa-var-info-circle; } |
||||
|
.#{$fa-css-prefix}-crosshairs:before { content: $fa-var-crosshairs; } |
||||
|
.#{$fa-css-prefix}-times-circle-o:before { content: $fa-var-times-circle-o; } |
||||
|
.#{$fa-css-prefix}-check-circle-o:before { content: $fa-var-check-circle-o; } |
||||
|
.#{$fa-css-prefix}-ban:before { content: $fa-var-ban; } |
||||
|
.#{$fa-css-prefix}-arrow-left:before { content: $fa-var-arrow-left; } |
||||
|
.#{$fa-css-prefix}-arrow-right:before { content: $fa-var-arrow-right; } |
||||
|
.#{$fa-css-prefix}-arrow-up:before { content: $fa-var-arrow-up; } |
||||
|
.#{$fa-css-prefix}-arrow-down:before { content: $fa-var-arrow-down; } |
||||
|
.#{$fa-css-prefix}-mail-forward:before, |
||||
|
.#{$fa-css-prefix}-share:before { content: $fa-var-share; } |
||||
|
.#{$fa-css-prefix}-expand:before { content: $fa-var-expand; } |
||||
|
.#{$fa-css-prefix}-compress:before { content: $fa-var-compress; } |
||||
|
.#{$fa-css-prefix}-plus:before { content: $fa-var-plus; } |
||||
|
.#{$fa-css-prefix}-minus:before { content: $fa-var-minus; } |
||||
|
.#{$fa-css-prefix}-asterisk:before { content: $fa-var-asterisk; } |
||||
|
.#{$fa-css-prefix}-exclamation-circle:before { content: $fa-var-exclamation-circle; } |
||||
|
.#{$fa-css-prefix}-gift:before { content: $fa-var-gift; } |
||||
|
.#{$fa-css-prefix}-leaf:before { content: $fa-var-leaf; } |
||||
|
.#{$fa-css-prefix}-fire:before { content: $fa-var-fire; } |
||||
|
.#{$fa-css-prefix}-eye:before { content: $fa-var-eye; } |
||||
|
.#{$fa-css-prefix}-eye-slash:before { content: $fa-var-eye-slash; } |
||||
|
.#{$fa-css-prefix}-warning:before, |
||||
|
.#{$fa-css-prefix}-exclamation-triangle:before { content: $fa-var-exclamation-triangle; } |
||||
|
.#{$fa-css-prefix}-plane:before { content: $fa-var-plane; } |
||||
|
.#{$fa-css-prefix}-calendar:before { content: $fa-var-calendar; } |
||||
|
.#{$fa-css-prefix}-random:before { content: $fa-var-random; } |
||||
|
.#{$fa-css-prefix}-comment:before { content: $fa-var-comment; } |
||||
|
.#{$fa-css-prefix}-magnet:before { content: $fa-var-magnet; } |
||||
|
.#{$fa-css-prefix}-chevron-up:before { content: $fa-var-chevron-up; } |
||||
|
.#{$fa-css-prefix}-chevron-down:before { content: $fa-var-chevron-down; } |
||||
|
.#{$fa-css-prefix}-retweet:before { content: $fa-var-retweet; } |
||||
|
.#{$fa-css-prefix}-shopping-cart:before { content: $fa-var-shopping-cart; } |
||||
|
.#{$fa-css-prefix}-folder:before { content: $fa-var-folder; } |
||||
|
.#{$fa-css-prefix}-folder-open:before { content: $fa-var-folder-open; } |
||||
|
.#{$fa-css-prefix}-arrows-v:before { content: $fa-var-arrows-v; } |
||||
|
.#{$fa-css-prefix}-arrows-h:before { content: $fa-var-arrows-h; } |
||||
|
.#{$fa-css-prefix}-bar-chart-o:before, |
||||
|
.#{$fa-css-prefix}-bar-chart:before { content: $fa-var-bar-chart; } |
||||
|
.#{$fa-css-prefix}-twitter-square:before { content: $fa-var-twitter-square; } |
||||
|
.#{$fa-css-prefix}-facebook-square:before { content: $fa-var-facebook-square; } |
||||
|
.#{$fa-css-prefix}-camera-retro:before { content: $fa-var-camera-retro; } |
||||
|
.#{$fa-css-prefix}-key:before { content: $fa-var-key; } |
||||
|
.#{$fa-css-prefix}-gears:before, |
||||
|
.#{$fa-css-prefix}-cogs:before { content: $fa-var-cogs; } |
||||
|
.#{$fa-css-prefix}-comments:before { content: $fa-var-comments; } |
||||
|
.#{$fa-css-prefix}-thumbs-o-up:before { content: $fa-var-thumbs-o-up; } |
||||
|
.#{$fa-css-prefix}-thumbs-o-down:before { content: $fa-var-thumbs-o-down; } |
||||
|
.#{$fa-css-prefix}-star-half:before { content: $fa-var-star-half; } |
||||
|
.#{$fa-css-prefix}-heart-o:before { content: $fa-var-heart-o; } |
||||
|
.#{$fa-css-prefix}-sign-out:before { content: $fa-var-sign-out; } |
||||
|
.#{$fa-css-prefix}-linkedin-square:before { content: $fa-var-linkedin-square; } |
||||
|
.#{$fa-css-prefix}-thumb-tack:before { content: $fa-var-thumb-tack; } |
||||
|
.#{$fa-css-prefix}-external-link:before { content: $fa-var-external-link; } |
||||
|
.#{$fa-css-prefix}-sign-in:before { content: $fa-var-sign-in; } |
||||
|
.#{$fa-css-prefix}-trophy:before { content: $fa-var-trophy; } |
||||
|
.#{$fa-css-prefix}-github-square:before { content: $fa-var-github-square; } |
||||
|
.#{$fa-css-prefix}-upload:before { content: $fa-var-upload; } |
||||
|
.#{$fa-css-prefix}-lemon-o:before { content: $fa-var-lemon-o; } |
||||
|
.#{$fa-css-prefix}-phone:before { content: $fa-var-phone; } |
||||
|
.#{$fa-css-prefix}-square-o:before { content: $fa-var-square-o; } |
||||
|
.#{$fa-css-prefix}-bookmark-o:before { content: $fa-var-bookmark-o; } |
||||
|
.#{$fa-css-prefix}-phone-square:before { content: $fa-var-phone-square; } |
||||
|
.#{$fa-css-prefix}-twitter:before { content: $fa-var-twitter; } |
||||
|
.#{$fa-css-prefix}-facebook-f:before, |
||||
|
.#{$fa-css-prefix}-facebook:before { content: $fa-var-facebook; } |
||||
|
.#{$fa-css-prefix}-github:before { content: $fa-var-github; } |
||||
|
.#{$fa-css-prefix}-unlock:before { content: $fa-var-unlock; } |
||||
|
.#{$fa-css-prefix}-credit-card:before { content: $fa-var-credit-card; } |
||||
|
.#{$fa-css-prefix}-feed:before, |
||||
|
.#{$fa-css-prefix}-rss:before { content: $fa-var-rss; } |
||||
|
.#{$fa-css-prefix}-hdd-o:before { content: $fa-var-hdd-o; } |
||||
|
.#{$fa-css-prefix}-bullhorn:before { content: $fa-var-bullhorn; } |
||||
|
.#{$fa-css-prefix}-bell:before { content: $fa-var-bell; } |
||||
|
.#{$fa-css-prefix}-certificate:before { content: $fa-var-certificate; } |
||||
|
.#{$fa-css-prefix}-hand-o-right:before { content: $fa-var-hand-o-right; } |
||||
|
.#{$fa-css-prefix}-hand-o-left:before { content: $fa-var-hand-o-left; } |
||||
|
.#{$fa-css-prefix}-hand-o-up:before { content: $fa-var-hand-o-up; } |
||||
|
.#{$fa-css-prefix}-hand-o-down:before { content: $fa-var-hand-o-down; } |
||||
|
.#{$fa-css-prefix}-arrow-circle-left:before { content: $fa-var-arrow-circle-left; } |
||||
|
.#{$fa-css-prefix}-arrow-circle-right:before { content: $fa-var-arrow-circle-right; } |
||||
|
.#{$fa-css-prefix}-arrow-circle-up:before { content: $fa-var-arrow-circle-up; } |
||||
|
.#{$fa-css-prefix}-arrow-circle-down:before { content: $fa-var-arrow-circle-down; } |
||||
|
.#{$fa-css-prefix}-globe:before { content: $fa-var-globe; } |
||||
|
.#{$fa-css-prefix}-wrench:before { content: $fa-var-wrench; } |
||||
|
.#{$fa-css-prefix}-tasks:before { content: $fa-var-tasks; } |
||||
|
.#{$fa-css-prefix}-filter:before { content: $fa-var-filter; } |
||||
|
.#{$fa-css-prefix}-briefcase:before { content: $fa-var-briefcase; } |
||||
|
.#{$fa-css-prefix}-arrows-alt:before { content: $fa-var-arrows-alt; } |
||||
|
.#{$fa-css-prefix}-group:before, |
||||
|
.#{$fa-css-prefix}-users:before { content: $fa-var-users; } |
||||
|
.#{$fa-css-prefix}-chain:before, |
||||
|
.#{$fa-css-prefix}-link:before { content: $fa-var-link; } |
||||
|
.#{$fa-css-prefix}-cloud:before { content: $fa-var-cloud; } |
||||
|
.#{$fa-css-prefix}-flask:before { content: $fa-var-flask; } |
||||
|
.#{$fa-css-prefix}-cut:before, |
||||
|
.#{$fa-css-prefix}-scissors:before { content: $fa-var-scissors; } |
||||
|
.#{$fa-css-prefix}-copy:before, |
||||
|
.#{$fa-css-prefix}-files-o:before { content: $fa-var-files-o; } |
||||
|
.#{$fa-css-prefix}-paperclip:before { content: $fa-var-paperclip; } |
||||
|
.#{$fa-css-prefix}-save:before, |
||||
|
.#{$fa-css-prefix}-floppy-o:before { content: $fa-var-floppy-o; } |
||||
|
.#{$fa-css-prefix}-square:before { content: $fa-var-square; } |
||||
|
.#{$fa-css-prefix}-navicon:before, |
||||
|
.#{$fa-css-prefix}-reorder:before, |
||||
|
.#{$fa-css-prefix}-bars:before { content: $fa-var-bars; } |
||||
|
.#{$fa-css-prefix}-list-ul:before { content: $fa-var-list-ul; } |
||||
|
.#{$fa-css-prefix}-list-ol:before { content: $fa-var-list-ol; } |
||||
|
.#{$fa-css-prefix}-strikethrough:before { content: $fa-var-strikethrough; } |
||||
|
.#{$fa-css-prefix}-underline:before { content: $fa-var-underline; } |
||||
|
.#{$fa-css-prefix}-table:before { content: $fa-var-table; } |
||||
|
.#{$fa-css-prefix}-magic:before { content: $fa-var-magic; } |
||||
|
.#{$fa-css-prefix}-truck:before { content: $fa-var-truck; } |
||||
|
.#{$fa-css-prefix}-pinterest:before { content: $fa-var-pinterest; } |
||||
|
.#{$fa-css-prefix}-pinterest-square:before { content: $fa-var-pinterest-square; } |
||||
|
.#{$fa-css-prefix}-google-plus-square:before { content: $fa-var-google-plus-square; } |
||||
|
.#{$fa-css-prefix}-google-plus:before { content: $fa-var-google-plus; } |
||||
|
.#{$fa-css-prefix}-money:before { content: $fa-var-money; } |
||||
|
.#{$fa-css-prefix}-caret-down:before { content: $fa-var-caret-down; } |
||||
|
.#{$fa-css-prefix}-caret-up:before { content: $fa-var-caret-up; } |
||||
|
.#{$fa-css-prefix}-caret-left:before { content: $fa-var-caret-left; } |
||||
|
.#{$fa-css-prefix}-caret-right:before { content: $fa-var-caret-right; } |
||||
|
.#{$fa-css-prefix}-columns:before { content: $fa-var-columns; } |
||||
|
.#{$fa-css-prefix}-unsorted:before, |
||||
|
.#{$fa-css-prefix}-sort:before { content: $fa-var-sort; } |
||||
|
.#{$fa-css-prefix}-sort-down:before, |
||||
|
.#{$fa-css-prefix}-sort-desc:before { content: $fa-var-sort-desc; } |
||||
|
.#{$fa-css-prefix}-sort-up:before, |
||||
|
.#{$fa-css-prefix}-sort-asc:before { content: $fa-var-sort-asc; } |
||||
|
.#{$fa-css-prefix}-envelope:before { content: $fa-var-envelope; } |
||||
|
.#{$fa-css-prefix}-linkedin:before { content: $fa-var-linkedin; } |
||||
|
.#{$fa-css-prefix}-rotate-left:before, |
||||
|
.#{$fa-css-prefix}-undo:before { content: $fa-var-undo; } |
||||
|
.#{$fa-css-prefix}-legal:before, |
||||
|
.#{$fa-css-prefix}-gavel:before { content: $fa-var-gavel; } |
||||
|
.#{$fa-css-prefix}-dashboard:before, |
||||
|
.#{$fa-css-prefix}-tachometer:before { content: $fa-var-tachometer; } |
||||
|
.#{$fa-css-prefix}-comment-o:before { content: $fa-var-comment-o; } |
||||
|
.#{$fa-css-prefix}-comments-o:before { content: $fa-var-comments-o; } |
||||
|
.#{$fa-css-prefix}-flash:before, |
||||
|
.#{$fa-css-prefix}-bolt:before { content: $fa-var-bolt; } |
||||
|
.#{$fa-css-prefix}-sitemap:before { content: $fa-var-sitemap; } |
||||
|
.#{$fa-css-prefix}-umbrella:before { content: $fa-var-umbrella; } |
||||
|
.#{$fa-css-prefix}-paste:before, |
||||
|
.#{$fa-css-prefix}-clipboard:before { content: $fa-var-clipboard; } |
||||
|
.#{$fa-css-prefix}-lightbulb-o:before { content: $fa-var-lightbulb-o; } |
||||
|
.#{$fa-css-prefix}-exchange:before { content: $fa-var-exchange; } |
||||
|
.#{$fa-css-prefix}-cloud-download:before { content: $fa-var-cloud-download; } |
||||
|
.#{$fa-css-prefix}-cloud-upload:before { content: $fa-var-cloud-upload; } |
||||
|
.#{$fa-css-prefix}-user-md:before { content: $fa-var-user-md; } |
||||
|
.#{$fa-css-prefix}-stethoscope:before { content: $fa-var-stethoscope; } |
||||
|
.#{$fa-css-prefix}-suitcase:before { content: $fa-var-suitcase; } |
||||
|
.#{$fa-css-prefix}-bell-o:before { content: $fa-var-bell-o; } |
||||
|
.#{$fa-css-prefix}-coffee:before { content: $fa-var-coffee; } |
||||
|
.#{$fa-css-prefix}-cutlery:before { content: $fa-var-cutlery; } |
||||
|
.#{$fa-css-prefix}-file-text-o:before { content: $fa-var-file-text-o; } |
||||
|
.#{$fa-css-prefix}-building-o:before { content: $fa-var-building-o; } |
||||
|
.#{$fa-css-prefix}-hospital-o:before { content: $fa-var-hospital-o; } |
||||
|
.#{$fa-css-prefix}-ambulance:before { content: $fa-var-ambulance; } |
||||
|
.#{$fa-css-prefix}-medkit:before { content: $fa-var-medkit; } |
||||
|
.#{$fa-css-prefix}-fighter-jet:before { content: $fa-var-fighter-jet; } |
||||
|
.#{$fa-css-prefix}-beer:before { content: $fa-var-beer; } |
||||
|
.#{$fa-css-prefix}-h-square:before { content: $fa-var-h-square; } |
||||
|
.#{$fa-css-prefix}-plus-square:before { content: $fa-var-plus-square; } |
||||
|
.#{$fa-css-prefix}-angle-double-left:before { content: $fa-var-angle-double-left; } |
||||
|
.#{$fa-css-prefix}-angle-double-right:before { content: $fa-var-angle-double-right; } |
||||
|
.#{$fa-css-prefix}-angle-double-up:before { content: $fa-var-angle-double-up; } |
||||
|
.#{$fa-css-prefix}-angle-double-down:before { content: $fa-var-angle-double-down; } |
||||
|
.#{$fa-css-prefix}-angle-left:before { content: $fa-var-angle-left; } |
||||
|
.#{$fa-css-prefix}-angle-right:before { content: $fa-var-angle-right; } |
||||
|
.#{$fa-css-prefix}-angle-up:before { content: $fa-var-angle-up; } |
||||
|
.#{$fa-css-prefix}-angle-down:before { content: $fa-var-angle-down; } |
||||
|
.#{$fa-css-prefix}-desktop:before { content: $fa-var-desktop; } |
||||
|
.#{$fa-css-prefix}-laptop:before { content: $fa-var-laptop; } |
||||
|
.#{$fa-css-prefix}-tablet:before { content: $fa-var-tablet; } |
||||
|
.#{$fa-css-prefix}-mobile-phone:before, |
||||
|
.#{$fa-css-prefix}-mobile:before { content: $fa-var-mobile; } |
||||
|
.#{$fa-css-prefix}-circle-o:before { content: $fa-var-circle-o; } |
||||
|
.#{$fa-css-prefix}-quote-left:before { content: $fa-var-quote-left; } |
||||
|
.#{$fa-css-prefix}-quote-right:before { content: $fa-var-quote-right; } |
||||
|
.#{$fa-css-prefix}-spinner:before { content: $fa-var-spinner; } |
||||
|
.#{$fa-css-prefix}-circle:before { content: $fa-var-circle; } |
||||
|
.#{$fa-css-prefix}-mail-reply:before, |
||||
|
.#{$fa-css-prefix}-reply:before { content: $fa-var-reply; } |
||||
|
.#{$fa-css-prefix}-github-alt:before { content: $fa-var-github-alt; } |
||||
|
.#{$fa-css-prefix}-folder-o:before { content: $fa-var-folder-o; } |
||||
|
.#{$fa-css-prefix}-folder-open-o:before { content: $fa-var-folder-open-o; } |
||||
|
.#{$fa-css-prefix}-smile-o:before { content: $fa-var-smile-o; } |
||||
|
.#{$fa-css-prefix}-frown-o:before { content: $fa-var-frown-o; } |
||||
|
.#{$fa-css-prefix}-meh-o:before { content: $fa-var-meh-o; } |
||||
|
.#{$fa-css-prefix}-gamepad:before { content: $fa-var-gamepad; } |
||||
|
.#{$fa-css-prefix}-keyboard-o:before { content: $fa-var-keyboard-o; } |
||||
|
.#{$fa-css-prefix}-flag-o:before { content: $fa-var-flag-o; } |
||||
|
.#{$fa-css-prefix}-flag-checkered:before { content: $fa-var-flag-checkered; } |
||||
|
.#{$fa-css-prefix}-terminal:before { content: $fa-var-terminal; } |
||||
|
.#{$fa-css-prefix}-code:before { content: $fa-var-code; } |
||||
|
.#{$fa-css-prefix}-mail-reply-all:before, |
||||
|
.#{$fa-css-prefix}-reply-all:before { content: $fa-var-reply-all; } |
||||
|
.#{$fa-css-prefix}-star-half-empty:before, |
||||
|
.#{$fa-css-prefix}-star-half-full:before, |
||||
|
.#{$fa-css-prefix}-star-half-o:before { content: $fa-var-star-half-o; } |
||||
|
.#{$fa-css-prefix}-location-arrow:before { content: $fa-var-location-arrow; } |
||||
|
.#{$fa-css-prefix}-crop:before { content: $fa-var-crop; } |
||||
|
.#{$fa-css-prefix}-code-fork:before { content: $fa-var-code-fork; } |
||||
|
.#{$fa-css-prefix}-unlink:before, |
||||
|
.#{$fa-css-prefix}-chain-broken:before { content: $fa-var-chain-broken; } |
||||
|
.#{$fa-css-prefix}-question:before { content: $fa-var-question; } |
||||
|
.#{$fa-css-prefix}-info:before { content: $fa-var-info; } |
||||
|
.#{$fa-css-prefix}-exclamation:before { content: $fa-var-exclamation; } |
||||
|
.#{$fa-css-prefix}-superscript:before { content: $fa-var-superscript; } |
||||
|
.#{$fa-css-prefix}-subscript:before { content: $fa-var-subscript; } |
||||
|
.#{$fa-css-prefix}-eraser:before { content: $fa-var-eraser; } |
||||
|
.#{$fa-css-prefix}-puzzle-piece:before { content: $fa-var-puzzle-piece; } |
||||
|
.#{$fa-css-prefix}-microphone:before { content: $fa-var-microphone; } |
||||
|
.#{$fa-css-prefix}-microphone-slash:before { content: $fa-var-microphone-slash; } |
||||
|
.#{$fa-css-prefix}-shield:before { content: $fa-var-shield; } |
||||
|
.#{$fa-css-prefix}-calendar-o:before { content: $fa-var-calendar-o; } |
||||
|
.#{$fa-css-prefix}-fire-extinguisher:before { content: $fa-var-fire-extinguisher; } |
||||
|
.#{$fa-css-prefix}-rocket:before { content: $fa-var-rocket; } |
||||
|
.#{$fa-css-prefix}-maxcdn:before { content: $fa-var-maxcdn; } |
||||
|
.#{$fa-css-prefix}-chevron-circle-left:before { content: $fa-var-chevron-circle-left; } |
||||
|
.#{$fa-css-prefix}-chevron-circle-right:before { content: $fa-var-chevron-circle-right; } |
||||
|
.#{$fa-css-prefix}-chevron-circle-up:before { content: $fa-var-chevron-circle-up; } |
||||
|
.#{$fa-css-prefix}-chevron-circle-down:before { content: $fa-var-chevron-circle-down; } |
||||
|
.#{$fa-css-prefix}-html5:before { content: $fa-var-html5; } |
||||
|
.#{$fa-css-prefix}-css3:before { content: $fa-var-css3; } |
||||
|
.#{$fa-css-prefix}-anchor:before { content: $fa-var-anchor; } |
||||
|
.#{$fa-css-prefix}-unlock-alt:before { content: $fa-var-unlock-alt; } |
||||
|
.#{$fa-css-prefix}-bullseye:before { content: $fa-var-bullseye; } |
||||
|
.#{$fa-css-prefix}-ellipsis-h:before { content: $fa-var-ellipsis-h; } |
||||
|
.#{$fa-css-prefix}-ellipsis-v:before { content: $fa-var-ellipsis-v; } |
||||
|
.#{$fa-css-prefix}-rss-square:before { content: $fa-var-rss-square; } |
||||
|
.#{$fa-css-prefix}-play-circle:before { content: $fa-var-play-circle; } |
||||
|
.#{$fa-css-prefix}-ticket:before { content: $fa-var-ticket; } |
||||
|
.#{$fa-css-prefix}-minus-square:before { content: $fa-var-minus-square; } |
||||
|
.#{$fa-css-prefix}-minus-square-o:before { content: $fa-var-minus-square-o; } |
||||
|
.#{$fa-css-prefix}-level-up:before { content: $fa-var-level-up; } |
||||
|
.#{$fa-css-prefix}-level-down:before { content: $fa-var-level-down; } |
||||
|
.#{$fa-css-prefix}-check-square:before { content: $fa-var-check-square; } |
||||
|
.#{$fa-css-prefix}-pencil-square:before { content: $fa-var-pencil-square; } |
||||
|
.#{$fa-css-prefix}-external-link-square:before { content: $fa-var-external-link-square; } |
||||
|
.#{$fa-css-prefix}-share-square:before { content: $fa-var-share-square; } |
||||
|
.#{$fa-css-prefix}-compass:before { content: $fa-var-compass; } |
||||
|
.#{$fa-css-prefix}-toggle-down:before, |
||||
|
.#{$fa-css-prefix}-caret-square-o-down:before { content: $fa-var-caret-square-o-down; } |
||||
|
.#{$fa-css-prefix}-toggle-up:before, |
||||
|
.#{$fa-css-prefix}-caret-square-o-up:before { content: $fa-var-caret-square-o-up; } |
||||
|
.#{$fa-css-prefix}-toggle-right:before, |
||||
|
.#{$fa-css-prefix}-caret-square-o-right:before { content: $fa-var-caret-square-o-right; } |
||||
|
.#{$fa-css-prefix}-euro:before, |
||||
|
.#{$fa-css-prefix}-eur:before { content: $fa-var-eur; } |
||||
|
.#{$fa-css-prefix}-gbp:before { content: $fa-var-gbp; } |
||||
|
.#{$fa-css-prefix}-dollar:before, |
||||
|
.#{$fa-css-prefix}-usd:before { content: $fa-var-usd; } |
||||
|
.#{$fa-css-prefix}-rupee:before, |
||||
|
.#{$fa-css-prefix}-inr:before { content: $fa-var-inr; } |
||||
|
.#{$fa-css-prefix}-cny:before, |
||||
|
.#{$fa-css-prefix}-rmb:before, |
||||
|
.#{$fa-css-prefix}-yen:before, |
||||
|
.#{$fa-css-prefix}-jpy:before { content: $fa-var-jpy; } |
||||
|
.#{$fa-css-prefix}-ruble:before, |
||||
|
.#{$fa-css-prefix}-rouble:before, |
||||
|
.#{$fa-css-prefix}-rub:before { content: $fa-var-rub; } |
||||
|
.#{$fa-css-prefix}-won:before, |
||||
|
.#{$fa-css-prefix}-krw:before { content: $fa-var-krw; } |
||||
|
.#{$fa-css-prefix}-bitcoin:before, |
||||
|
.#{$fa-css-prefix}-btc:before { content: $fa-var-btc; } |
||||
|
.#{$fa-css-prefix}-file:before { content: $fa-var-file; } |
||||
|
.#{$fa-css-prefix}-file-text:before { content: $fa-var-file-text; } |
||||
|
.#{$fa-css-prefix}-sort-alpha-asc:before { content: $fa-var-sort-alpha-asc; } |
||||
|
.#{$fa-css-prefix}-sort-alpha-desc:before { content: $fa-var-sort-alpha-desc; } |
||||
|
.#{$fa-css-prefix}-sort-amount-asc:before { content: $fa-var-sort-amount-asc; } |
||||
|
.#{$fa-css-prefix}-sort-amount-desc:before { content: $fa-var-sort-amount-desc; } |
||||
|
.#{$fa-css-prefix}-sort-numeric-asc:before { content: $fa-var-sort-numeric-asc; } |
||||
|
.#{$fa-css-prefix}-sort-numeric-desc:before { content: $fa-var-sort-numeric-desc; } |
||||
|
.#{$fa-css-prefix}-thumbs-up:before { content: $fa-var-thumbs-up; } |
||||
|
.#{$fa-css-prefix}-thumbs-down:before { content: $fa-var-thumbs-down; } |
||||
|
.#{$fa-css-prefix}-youtube-square:before { content: $fa-var-youtube-square; } |
||||
|
.#{$fa-css-prefix}-youtube:before { content: $fa-var-youtube; } |
||||
|
.#{$fa-css-prefix}-xing:before { content: $fa-var-xing; } |
||||
|
.#{$fa-css-prefix}-xing-square:before { content: $fa-var-xing-square; } |
||||
|
.#{$fa-css-prefix}-youtube-play:before { content: $fa-var-youtube-play; } |
||||
|
.#{$fa-css-prefix}-dropbox:before { content: $fa-var-dropbox; } |
||||
|
.#{$fa-css-prefix}-stack-overflow:before { content: $fa-var-stack-overflow; } |
||||
|
.#{$fa-css-prefix}-instagram:before { content: $fa-var-instagram; } |
||||
|
.#{$fa-css-prefix}-flickr:before { content: $fa-var-flickr; } |
||||
|
.#{$fa-css-prefix}-adn:before { content: $fa-var-adn; } |
||||
|
.#{$fa-css-prefix}-bitbucket:before { content: $fa-var-bitbucket; } |
||||
|
.#{$fa-css-prefix}-bitbucket-square:before { content: $fa-var-bitbucket-square; } |
||||
|
.#{$fa-css-prefix}-tumblr:before { content: $fa-var-tumblr; } |
||||
|
.#{$fa-css-prefix}-tumblr-square:before { content: $fa-var-tumblr-square; } |
||||
|
.#{$fa-css-prefix}-long-arrow-down:before { content: $fa-var-long-arrow-down; } |
||||
|
.#{$fa-css-prefix}-long-arrow-up:before { content: $fa-var-long-arrow-up; } |
||||
|
.#{$fa-css-prefix}-long-arrow-left:before { content: $fa-var-long-arrow-left; } |
||||
|
.#{$fa-css-prefix}-long-arrow-right:before { content: $fa-var-long-arrow-right; } |
||||
|
.#{$fa-css-prefix}-apple:before { content: $fa-var-apple; } |
||||
|
.#{$fa-css-prefix}-windows:before { content: $fa-var-windows; } |
||||
|
.#{$fa-css-prefix}-android:before { content: $fa-var-android; } |
||||
|
.#{$fa-css-prefix}-linux:before { content: $fa-var-linux; } |
||||
|
.#{$fa-css-prefix}-dribbble:before { content: $fa-var-dribbble; } |
||||
|
.#{$fa-css-prefix}-skype:before { content: $fa-var-skype; } |
||||
|
.#{$fa-css-prefix}-foursquare:before { content: $fa-var-foursquare; } |
||||
|
.#{$fa-css-prefix}-trello:before { content: $fa-var-trello; } |
||||
|
.#{$fa-css-prefix}-female:before { content: $fa-var-female; } |
||||
|
.#{$fa-css-prefix}-male:before { content: $fa-var-male; } |
||||
|
.#{$fa-css-prefix}-gittip:before, |
||||
|
.#{$fa-css-prefix}-gratipay:before { content: $fa-var-gratipay; } |
||||
|
.#{$fa-css-prefix}-sun-o:before { content: $fa-var-sun-o; } |
||||
|
.#{$fa-css-prefix}-moon-o:before { content: $fa-var-moon-o; } |
||||
|
.#{$fa-css-prefix}-archive:before { content: $fa-var-archive; } |
||||
|
.#{$fa-css-prefix}-bug:before { content: $fa-var-bug; } |
||||
|
.#{$fa-css-prefix}-vk:before { content: $fa-var-vk; } |
||||
|
.#{$fa-css-prefix}-weibo:before { content: $fa-var-weibo; } |
||||
|
.#{$fa-css-prefix}-renren:before { content: $fa-var-renren; } |
||||
|
.#{$fa-css-prefix}-pagelines:before { content: $fa-var-pagelines; } |
||||
|
.#{$fa-css-prefix}-stack-exchange:before { content: $fa-var-stack-exchange; } |
||||
|
.#{$fa-css-prefix}-arrow-circle-o-right:before { content: $fa-var-arrow-circle-o-right; } |
||||
|
.#{$fa-css-prefix}-arrow-circle-o-left:before { content: $fa-var-arrow-circle-o-left; } |
||||
|
.#{$fa-css-prefix}-toggle-left:before, |
||||
|
.#{$fa-css-prefix}-caret-square-o-left:before { content: $fa-var-caret-square-o-left; } |
||||
|
.#{$fa-css-prefix}-dot-circle-o:before { content: $fa-var-dot-circle-o; } |
||||
|
.#{$fa-css-prefix}-wheelchair:before { content: $fa-var-wheelchair; } |
||||
|
.#{$fa-css-prefix}-vimeo-square:before { content: $fa-var-vimeo-square; } |
||||
|
.#{$fa-css-prefix}-turkish-lira:before, |
||||
|
.#{$fa-css-prefix}-try:before { content: $fa-var-try; } |
||||
|
.#{$fa-css-prefix}-plus-square-o:before { content: $fa-var-plus-square-o; } |
||||
|
.#{$fa-css-prefix}-space-shuttle:before { content: $fa-var-space-shuttle; } |
||||
|
.#{$fa-css-prefix}-slack:before { content: $fa-var-slack; } |
||||
|
.#{$fa-css-prefix}-envelope-square:before { content: $fa-var-envelope-square; } |
||||
|
.#{$fa-css-prefix}-wordpress:before { content: $fa-var-wordpress; } |
||||
|
.#{$fa-css-prefix}-openid:before { content: $fa-var-openid; } |
||||
|
.#{$fa-css-prefix}-institution:before, |
||||
|
.#{$fa-css-prefix}-bank:before, |
||||
|
.#{$fa-css-prefix}-university:before { content: $fa-var-university; } |
||||
|
.#{$fa-css-prefix}-mortar-board:before, |
||||
|
.#{$fa-css-prefix}-graduation-cap:before { content: $fa-var-graduation-cap; } |
||||
|
.#{$fa-css-prefix}-yahoo:before { content: $fa-var-yahoo; } |
||||
|
.#{$fa-css-prefix}-google:before { content: $fa-var-google; } |
||||
|
.#{$fa-css-prefix}-reddit:before { content: $fa-var-reddit; } |
||||
|
.#{$fa-css-prefix}-reddit-square:before { content: $fa-var-reddit-square; } |
||||
|
.#{$fa-css-prefix}-stumbleupon-circle:before { content: $fa-var-stumbleupon-circle; } |
||||
|
.#{$fa-css-prefix}-stumbleupon:before { content: $fa-var-stumbleupon; } |
||||
|
.#{$fa-css-prefix}-delicious:before { content: $fa-var-delicious; } |
||||
|
.#{$fa-css-prefix}-digg:before { content: $fa-var-digg; } |
||||
|
.#{$fa-css-prefix}-pied-piper-pp:before { content: $fa-var-pied-piper-pp; } |
||||
|
.#{$fa-css-prefix}-pied-piper-alt:before { content: $fa-var-pied-piper-alt; } |
||||
|
.#{$fa-css-prefix}-drupal:before { content: $fa-var-drupal; } |
||||
|
.#{$fa-css-prefix}-joomla:before { content: $fa-var-joomla; } |
||||
|
.#{$fa-css-prefix}-language:before { content: $fa-var-language; } |
||||
|
.#{$fa-css-prefix}-fax:before { content: $fa-var-fax; } |
||||
|
.#{$fa-css-prefix}-building:before { content: $fa-var-building; } |
||||
|
.#{$fa-css-prefix}-child:before { content: $fa-var-child; } |
||||
|
.#{$fa-css-prefix}-paw:before { content: $fa-var-paw; } |
||||
|
.#{$fa-css-prefix}-spoon:before { content: $fa-var-spoon; } |
||||
|
.#{$fa-css-prefix}-cube:before { content: $fa-var-cube; } |
||||
|
.#{$fa-css-prefix}-cubes:before { content: $fa-var-cubes; } |
||||
|
.#{$fa-css-prefix}-behance:before { content: $fa-var-behance; } |
||||
|
.#{$fa-css-prefix}-behance-square:before { content: $fa-var-behance-square; } |
||||
|
.#{$fa-css-prefix}-steam:before { content: $fa-var-steam; } |
||||
|
.#{$fa-css-prefix}-steam-square:before { content: $fa-var-steam-square; } |
||||
|
.#{$fa-css-prefix}-recycle:before { content: $fa-var-recycle; } |
||||
|
.#{$fa-css-prefix}-automobile:before, |
||||
|
.#{$fa-css-prefix}-car:before { content: $fa-var-car; } |
||||
|
.#{$fa-css-prefix}-cab:before, |
||||
|
.#{$fa-css-prefix}-taxi:before { content: $fa-var-taxi; } |
||||
|
.#{$fa-css-prefix}-tree:before { content: $fa-var-tree; } |
||||
|
.#{$fa-css-prefix}-spotify:before { content: $fa-var-spotify; } |
||||
|
.#{$fa-css-prefix}-deviantart:before { content: $fa-var-deviantart; } |
||||
|
.#{$fa-css-prefix}-soundcloud:before { content: $fa-var-soundcloud; } |
||||
|
.#{$fa-css-prefix}-database:before { content: $fa-var-database; } |
||||
|
.#{$fa-css-prefix}-file-pdf-o:before { content: $fa-var-file-pdf-o; } |
||||
|
.#{$fa-css-prefix}-file-word-o:before { content: $fa-var-file-word-o; } |
||||
|
.#{$fa-css-prefix}-file-excel-o:before { content: $fa-var-file-excel-o; } |
||||
|
.#{$fa-css-prefix}-file-powerpoint-o:before { content: $fa-var-file-powerpoint-o; } |
||||
|
.#{$fa-css-prefix}-file-photo-o:before, |
||||
|
.#{$fa-css-prefix}-file-picture-o:before, |
||||
|
.#{$fa-css-prefix}-file-image-o:before { content: $fa-var-file-image-o; } |
||||
|
.#{$fa-css-prefix}-file-zip-o:before, |
||||
|
.#{$fa-css-prefix}-file-archive-o:before { content: $fa-var-file-archive-o; } |
||||
|
.#{$fa-css-prefix}-file-sound-o:before, |
||||
|
.#{$fa-css-prefix}-file-audio-o:before { content: $fa-var-file-audio-o; } |
||||
|
.#{$fa-css-prefix}-file-movie-o:before, |
||||
|
.#{$fa-css-prefix}-file-video-o:before { content: $fa-var-file-video-o; } |
||||
|
.#{$fa-css-prefix}-file-code-o:before { content: $fa-var-file-code-o; } |
||||
|
.#{$fa-css-prefix}-vine:before { content: $fa-var-vine; } |
||||
|
.#{$fa-css-prefix}-codepen:before { content: $fa-var-codepen; } |
||||
|
.#{$fa-css-prefix}-jsfiddle:before { content: $fa-var-jsfiddle; } |
||||
|
.#{$fa-css-prefix}-life-bouy:before, |
||||
|
.#{$fa-css-prefix}-life-buoy:before, |
||||
|
.#{$fa-css-prefix}-life-saver:before, |
||||
|
.#{$fa-css-prefix}-support:before, |
||||
|
.#{$fa-css-prefix}-life-ring:before { content: $fa-var-life-ring; } |
||||
|
.#{$fa-css-prefix}-circle-o-notch:before { content: $fa-var-circle-o-notch; } |
||||
|
.#{$fa-css-prefix}-ra:before, |
||||
|
.#{$fa-css-prefix}-resistance:before, |
||||
|
.#{$fa-css-prefix}-rebel:before { content: $fa-var-rebel; } |
||||
|
.#{$fa-css-prefix}-ge:before, |
||||
|
.#{$fa-css-prefix}-empire:before { content: $fa-var-empire; } |
||||
|
.#{$fa-css-prefix}-git-square:before { content: $fa-var-git-square; } |
||||
|
.#{$fa-css-prefix}-git:before { content: $fa-var-git; } |
||||
|
.#{$fa-css-prefix}-y-combinator-square:before, |
||||
|
.#{$fa-css-prefix}-yc-square:before, |
||||
|
.#{$fa-css-prefix}-hacker-news:before { content: $fa-var-hacker-news; } |
||||
|
.#{$fa-css-prefix}-tencent-weibo:before { content: $fa-var-tencent-weibo; } |
||||
|
.#{$fa-css-prefix}-qq:before { content: $fa-var-qq; } |
||||
|
.#{$fa-css-prefix}-wechat:before, |
||||
|
.#{$fa-css-prefix}-weixin:before { content: $fa-var-weixin; } |
||||
|
.#{$fa-css-prefix}-send:before, |
||||
|
.#{$fa-css-prefix}-paper-plane:before { content: $fa-var-paper-plane; } |
||||
|
.#{$fa-css-prefix}-send-o:before, |
||||
|
.#{$fa-css-prefix}-paper-plane-o:before { content: $fa-var-paper-plane-o; } |
||||
|
.#{$fa-css-prefix}-history:before { content: $fa-var-history; } |
||||
|
.#{$fa-css-prefix}-circle-thin:before { content: $fa-var-circle-thin; } |
||||
|
.#{$fa-css-prefix}-header:before { content: $fa-var-header; } |
||||
|
.#{$fa-css-prefix}-paragraph:before { content: $fa-var-paragraph; } |
||||
|
.#{$fa-css-prefix}-sliders:before { content: $fa-var-sliders; } |
||||
|
.#{$fa-css-prefix}-share-alt:before { content: $fa-var-share-alt; } |
||||
|
.#{$fa-css-prefix}-share-alt-square:before { content: $fa-var-share-alt-square; } |
||||
|
.#{$fa-css-prefix}-bomb:before { content: $fa-var-bomb; } |
||||
|
.#{$fa-css-prefix}-soccer-ball-o:before, |
||||
|
.#{$fa-css-prefix}-futbol-o:before { content: $fa-var-futbol-o; } |
||||
|
.#{$fa-css-prefix}-tty:before { content: $fa-var-tty; } |
||||
|
.#{$fa-css-prefix}-binoculars:before { content: $fa-var-binoculars; } |
||||
|
.#{$fa-css-prefix}-plug:before { content: $fa-var-plug; } |
||||
|
.#{$fa-css-prefix}-slideshare:before { content: $fa-var-slideshare; } |
||||
|
.#{$fa-css-prefix}-twitch:before { content: $fa-var-twitch; } |
||||
|
.#{$fa-css-prefix}-yelp:before { content: $fa-var-yelp; } |
||||
|
.#{$fa-css-prefix}-newspaper-o:before { content: $fa-var-newspaper-o; } |
||||
|
.#{$fa-css-prefix}-wifi:before { content: $fa-var-wifi; } |
||||
|
.#{$fa-css-prefix}-calculator:before { content: $fa-var-calculator; } |
||||
|
.#{$fa-css-prefix}-paypal:before { content: $fa-var-paypal; } |
||||
|
.#{$fa-css-prefix}-google-wallet:before { content: $fa-var-google-wallet; } |
||||
|
.#{$fa-css-prefix}-cc-visa:before { content: $fa-var-cc-visa; } |
||||
|
.#{$fa-css-prefix}-cc-mastercard:before { content: $fa-var-cc-mastercard; } |
||||
|
.#{$fa-css-prefix}-cc-discover:before { content: $fa-var-cc-discover; } |
||||
|
.#{$fa-css-prefix}-cc-amex:before { content: $fa-var-cc-amex; } |
||||
|
.#{$fa-css-prefix}-cc-paypal:before { content: $fa-var-cc-paypal; } |
||||
|
.#{$fa-css-prefix}-cc-stripe:before { content: $fa-var-cc-stripe; } |
||||
|
.#{$fa-css-prefix}-bell-slash:before { content: $fa-var-bell-slash; } |
||||
|
.#{$fa-css-prefix}-bell-slash-o:before { content: $fa-var-bell-slash-o; } |
||||
|
.#{$fa-css-prefix}-trash:before { content: $fa-var-trash; } |
||||
|
.#{$fa-css-prefix}-copyright:before { content: $fa-var-copyright; } |
||||
|
.#{$fa-css-prefix}-at:before { content: $fa-var-at; } |
||||
|
.#{$fa-css-prefix}-eyedropper:before { content: $fa-var-eyedropper; } |
||||
|
.#{$fa-css-prefix}-paint-brush:before { content: $fa-var-paint-brush; } |
||||
|
.#{$fa-css-prefix}-birthday-cake:before { content: $fa-var-birthday-cake; } |
||||
|
.#{$fa-css-prefix}-area-chart:before { content: $fa-var-area-chart; } |
||||
|
.#{$fa-css-prefix}-pie-chart:before { content: $fa-var-pie-chart; } |
||||
|
.#{$fa-css-prefix}-line-chart:before { content: $fa-var-line-chart; } |
||||
|
.#{$fa-css-prefix}-lastfm:before { content: $fa-var-lastfm; } |
||||
|
.#{$fa-css-prefix}-lastfm-square:before { content: $fa-var-lastfm-square; } |
||||
|
.#{$fa-css-prefix}-toggle-off:before { content: $fa-var-toggle-off; } |
||||
|
.#{$fa-css-prefix}-toggle-on:before { content: $fa-var-toggle-on; } |
||||
|
.#{$fa-css-prefix}-bicycle:before { content: $fa-var-bicycle; } |
||||
|
.#{$fa-css-prefix}-bus:before { content: $fa-var-bus; } |
||||
|
.#{$fa-css-prefix}-ioxhost:before { content: $fa-var-ioxhost; } |
||||
|
.#{$fa-css-prefix}-angellist:before { content: $fa-var-angellist; } |
||||
|
.#{$fa-css-prefix}-cc:before { content: $fa-var-cc; } |
||||
|
.#{$fa-css-prefix}-shekel:before, |
||||
|
.#{$fa-css-prefix}-sheqel:before, |
||||
|
.#{$fa-css-prefix}-ils:before { content: $fa-var-ils; } |
||||
|
.#{$fa-css-prefix}-meanpath:before { content: $fa-var-meanpath; } |
||||
|
.#{$fa-css-prefix}-buysellads:before { content: $fa-var-buysellads; } |
||||
|
.#{$fa-css-prefix}-connectdevelop:before { content: $fa-var-connectdevelop; } |
||||
|
.#{$fa-css-prefix}-dashcube:before { content: $fa-var-dashcube; } |
||||
|
.#{$fa-css-prefix}-forumbee:before { content: $fa-var-forumbee; } |
||||
|
.#{$fa-css-prefix}-leanpub:before { content: $fa-var-leanpub; } |
||||
|
.#{$fa-css-prefix}-sellsy:before { content: $fa-var-sellsy; } |
||||
|
.#{$fa-css-prefix}-shirtsinbulk:before { content: $fa-var-shirtsinbulk; } |
||||
|
.#{$fa-css-prefix}-simplybuilt:before { content: $fa-var-simplybuilt; } |
||||
|
.#{$fa-css-prefix}-skyatlas:before { content: $fa-var-skyatlas; } |
||||
|
.#{$fa-css-prefix}-cart-plus:before { content: $fa-var-cart-plus; } |
||||
|
.#{$fa-css-prefix}-cart-arrow-down:before { content: $fa-var-cart-arrow-down; } |
||||
|
.#{$fa-css-prefix}-diamond:before { content: $fa-var-diamond; } |
||||
|
.#{$fa-css-prefix}-ship:before { content: $fa-var-ship; } |
||||
|
.#{$fa-css-prefix}-user-secret:before { content: $fa-var-user-secret; } |
||||
|
.#{$fa-css-prefix}-motorcycle:before { content: $fa-var-motorcycle; } |
||||
|
.#{$fa-css-prefix}-street-view:before { content: $fa-var-street-view; } |
||||
|
.#{$fa-css-prefix}-heartbeat:before { content: $fa-var-heartbeat; } |
||||
|
.#{$fa-css-prefix}-venus:before { content: $fa-var-venus; } |
||||
|
.#{$fa-css-prefix}-mars:before { content: $fa-var-mars; } |
||||
|
.#{$fa-css-prefix}-mercury:before { content: $fa-var-mercury; } |
||||
|
.#{$fa-css-prefix}-intersex:before, |
||||
|
.#{$fa-css-prefix}-transgender:before { content: $fa-var-transgender; } |
||||
|
.#{$fa-css-prefix}-transgender-alt:before { content: $fa-var-transgender-alt; } |
||||
|
.#{$fa-css-prefix}-venus-double:before { content: $fa-var-venus-double; } |
||||
|
.#{$fa-css-prefix}-mars-double:before { content: $fa-var-mars-double; } |
||||
|
.#{$fa-css-prefix}-venus-mars:before { content: $fa-var-venus-mars; } |
||||
|
.#{$fa-css-prefix}-mars-stroke:before { content: $fa-var-mars-stroke; } |
||||
|
.#{$fa-css-prefix}-mars-stroke-v:before { content: $fa-var-mars-stroke-v; } |
||||
|
.#{$fa-css-prefix}-mars-stroke-h:before { content: $fa-var-mars-stroke-h; } |
||||
|
.#{$fa-css-prefix}-neuter:before { content: $fa-var-neuter; } |
||||
|
.#{$fa-css-prefix}-genderless:before { content: $fa-var-genderless; } |
||||
|
.#{$fa-css-prefix}-facebook-official:before { content: $fa-var-facebook-official; } |
||||
|
.#{$fa-css-prefix}-pinterest-p:before { content: $fa-var-pinterest-p; } |
||||
|
.#{$fa-css-prefix}-whatsapp:before { content: $fa-var-whatsapp; } |
||||
|
.#{$fa-css-prefix}-server:before { content: $fa-var-server; } |
||||
|
.#{$fa-css-prefix}-user-plus:before { content: $fa-var-user-plus; } |
||||
|
.#{$fa-css-prefix}-user-times:before { content: $fa-var-user-times; } |
||||
|
.#{$fa-css-prefix}-hotel:before, |
||||
|
.#{$fa-css-prefix}-bed:before { content: $fa-var-bed; } |
||||
|
.#{$fa-css-prefix}-viacoin:before { content: $fa-var-viacoin; } |
||||
|
.#{$fa-css-prefix}-train:before { content: $fa-var-train; } |
||||
|
.#{$fa-css-prefix}-subway:before { content: $fa-var-subway; } |
||||
|
.#{$fa-css-prefix}-medium:before { content: $fa-var-medium; } |
||||
|
.#{$fa-css-prefix}-yc:before, |
||||
|
.#{$fa-css-prefix}-y-combinator:before { content: $fa-var-y-combinator; } |
||||
|
.#{$fa-css-prefix}-optin-monster:before { content: $fa-var-optin-monster; } |
||||
|
.#{$fa-css-prefix}-opencart:before { content: $fa-var-opencart; } |
||||
|
.#{$fa-css-prefix}-expeditedssl:before { content: $fa-var-expeditedssl; } |
||||
|
.#{$fa-css-prefix}-battery-4:before, |
||||
|
.#{$fa-css-prefix}-battery:before, |
||||
|
.#{$fa-css-prefix}-battery-full:before { content: $fa-var-battery-full; } |
||||
|
.#{$fa-css-prefix}-battery-3:before, |
||||
|
.#{$fa-css-prefix}-battery-three-quarters:before { content: $fa-var-battery-three-quarters; } |
||||
|
.#{$fa-css-prefix}-battery-2:before, |
||||
|
.#{$fa-css-prefix}-battery-half:before { content: $fa-var-battery-half; } |
||||
|
.#{$fa-css-prefix}-battery-1:before, |
||||
|
.#{$fa-css-prefix}-battery-quarter:before { content: $fa-var-battery-quarter; } |
||||
|
.#{$fa-css-prefix}-battery-0:before, |
||||
|
.#{$fa-css-prefix}-battery-empty:before { content: $fa-var-battery-empty; } |
||||
|
.#{$fa-css-prefix}-mouse-pointer:before { content: $fa-var-mouse-pointer; } |
||||
|
.#{$fa-css-prefix}-i-cursor:before { content: $fa-var-i-cursor; } |
||||
|
.#{$fa-css-prefix}-object-group:before { content: $fa-var-object-group; } |
||||
|
.#{$fa-css-prefix}-object-ungroup:before { content: $fa-var-object-ungroup; } |
||||
|
.#{$fa-css-prefix}-sticky-note:before { content: $fa-var-sticky-note; } |
||||
|
.#{$fa-css-prefix}-sticky-note-o:before { content: $fa-var-sticky-note-o; } |
||||
|
.#{$fa-css-prefix}-cc-jcb:before { content: $fa-var-cc-jcb; } |
||||
|
.#{$fa-css-prefix}-cc-diners-club:before { content: $fa-var-cc-diners-club; } |
||||
|
.#{$fa-css-prefix}-clone:before { content: $fa-var-clone; } |
||||
|
.#{$fa-css-prefix}-balance-scale:before { content: $fa-var-balance-scale; } |
||||
|
.#{$fa-css-prefix}-hourglass-o:before { content: $fa-var-hourglass-o; } |
||||
|
.#{$fa-css-prefix}-hourglass-1:before, |
||||
|
.#{$fa-css-prefix}-hourglass-start:before { content: $fa-var-hourglass-start; } |
||||
|
.#{$fa-css-prefix}-hourglass-2:before, |
||||
|
.#{$fa-css-prefix}-hourglass-half:before { content: $fa-var-hourglass-half; } |
||||
|
.#{$fa-css-prefix}-hourglass-3:before, |
||||
|
.#{$fa-css-prefix}-hourglass-end:before { content: $fa-var-hourglass-end; } |
||||
|
.#{$fa-css-prefix}-hourglass:before { content: $fa-var-hourglass; } |
||||
|
.#{$fa-css-prefix}-hand-grab-o:before, |
||||
|
.#{$fa-css-prefix}-hand-rock-o:before { content: $fa-var-hand-rock-o; } |
||||
|
.#{$fa-css-prefix}-hand-stop-o:before, |
||||
|
.#{$fa-css-prefix}-hand-paper-o:before { content: $fa-var-hand-paper-o; } |
||||
|
.#{$fa-css-prefix}-hand-scissors-o:before { content: $fa-var-hand-scissors-o; } |
||||
|
.#{$fa-css-prefix}-hand-lizard-o:before { content: $fa-var-hand-lizard-o; } |
||||
|
.#{$fa-css-prefix}-hand-spock-o:before { content: $fa-var-hand-spock-o; } |
||||
|
.#{$fa-css-prefix}-hand-pointer-o:before { content: $fa-var-hand-pointer-o; } |
||||
|
.#{$fa-css-prefix}-hand-peace-o:before { content: $fa-var-hand-peace-o; } |
||||
|
.#{$fa-css-prefix}-trademark:before { content: $fa-var-trademark; } |
||||
|
.#{$fa-css-prefix}-registered:before { content: $fa-var-registered; } |
||||
|
.#{$fa-css-prefix}-creative-commons:before { content: $fa-var-creative-commons; } |
||||
|
.#{$fa-css-prefix}-gg:before { content: $fa-var-gg; } |
||||
|
.#{$fa-css-prefix}-gg-circle:before { content: $fa-var-gg-circle; } |
||||
|
.#{$fa-css-prefix}-tripadvisor:before { content: $fa-var-tripadvisor; } |
||||
|
.#{$fa-css-prefix}-odnoklassniki:before { content: $fa-var-odnoklassniki; } |
||||
|
.#{$fa-css-prefix}-odnoklassniki-square:before { content: $fa-var-odnoklassniki-square; } |
||||
|
.#{$fa-css-prefix}-get-pocket:before { content: $fa-var-get-pocket; } |
||||
|
.#{$fa-css-prefix}-wikipedia-w:before { content: $fa-var-wikipedia-w; } |
||||
|
.#{$fa-css-prefix}-safari:before { content: $fa-var-safari; } |
||||
|
.#{$fa-css-prefix}-chrome:before { content: $fa-var-chrome; } |
||||
|
.#{$fa-css-prefix}-firefox:before { content: $fa-var-firefox; } |
||||
|
.#{$fa-css-prefix}-opera:before { content: $fa-var-opera; } |
||||
|
.#{$fa-css-prefix}-internet-explorer:before { content: $fa-var-internet-explorer; } |
||||
|
.#{$fa-css-prefix}-tv:before, |
||||
|
.#{$fa-css-prefix}-television:before { content: $fa-var-television; } |
||||
|
.#{$fa-css-prefix}-contao:before { content: $fa-var-contao; } |
||||
|
.#{$fa-css-prefix}-500px:before { content: $fa-var-500px; } |
||||
|
.#{$fa-css-prefix}-amazon:before { content: $fa-var-amazon; } |
||||
|
.#{$fa-css-prefix}-calendar-plus-o:before { content: $fa-var-calendar-plus-o; } |
||||
|
.#{$fa-css-prefix}-calendar-minus-o:before { content: $fa-var-calendar-minus-o; } |
||||
|
.#{$fa-css-prefix}-calendar-times-o:before { content: $fa-var-calendar-times-o; } |
||||
|
.#{$fa-css-prefix}-calendar-check-o:before { content: $fa-var-calendar-check-o; } |
||||
|
.#{$fa-css-prefix}-industry:before { content: $fa-var-industry; } |
||||
|
.#{$fa-css-prefix}-map-pin:before { content: $fa-var-map-pin; } |
||||
|
.#{$fa-css-prefix}-map-signs:before { content: $fa-var-map-signs; } |
||||
|
.#{$fa-css-prefix}-map-o:before { content: $fa-var-map-o; } |
||||
|
.#{$fa-css-prefix}-map:before { content: $fa-var-map; } |
||||
|
.#{$fa-css-prefix}-commenting:before { content: $fa-var-commenting; } |
||||
|
.#{$fa-css-prefix}-commenting-o:before { content: $fa-var-commenting-o; } |
||||
|
.#{$fa-css-prefix}-houzz:before { content: $fa-var-houzz; } |
||||
|
.#{$fa-css-prefix}-vimeo:before { content: $fa-var-vimeo; } |
||||
|
.#{$fa-css-prefix}-black-tie:before { content: $fa-var-black-tie; } |
||||
|
.#{$fa-css-prefix}-fonticons:before { content: $fa-var-fonticons; } |
||||
|
.#{$fa-css-prefix}-reddit-alien:before { content: $fa-var-reddit-alien; } |
||||
|
.#{$fa-css-prefix}-edge:before { content: $fa-var-edge; } |
||||
|
.#{$fa-css-prefix}-credit-card-alt:before { content: $fa-var-credit-card-alt; } |
||||
|
.#{$fa-css-prefix}-codiepie:before { content: $fa-var-codiepie; } |
||||
|
.#{$fa-css-prefix}-modx:before { content: $fa-var-modx; } |
||||
|
.#{$fa-css-prefix}-fort-awesome:before { content: $fa-var-fort-awesome; } |
||||
|
.#{$fa-css-prefix}-usb:before { content: $fa-var-usb; } |
||||
|
.#{$fa-css-prefix}-product-hunt:before { content: $fa-var-product-hunt; } |
||||
|
.#{$fa-css-prefix}-mixcloud:before { content: $fa-var-mixcloud; } |
||||
|
.#{$fa-css-prefix}-scribd:before { content: $fa-var-scribd; } |
||||
|
.#{$fa-css-prefix}-pause-circle:before { content: $fa-var-pause-circle; } |
||||
|
.#{$fa-css-prefix}-pause-circle-o:before { content: $fa-var-pause-circle-o; } |
||||
|
.#{$fa-css-prefix}-stop-circle:before { content: $fa-var-stop-circle; } |
||||
|
.#{$fa-css-prefix}-stop-circle-o:before { content: $fa-var-stop-circle-o; } |
||||
|
.#{$fa-css-prefix}-shopping-bag:before { content: $fa-var-shopping-bag; } |
||||
|
.#{$fa-css-prefix}-shopping-basket:before { content: $fa-var-shopping-basket; } |
||||
|
.#{$fa-css-prefix}-hashtag:before { content: $fa-var-hashtag; } |
||||
|
.#{$fa-css-prefix}-bluetooth:before { content: $fa-var-bluetooth; } |
||||
|
.#{$fa-css-prefix}-bluetooth-b:before { content: $fa-var-bluetooth-b; } |
||||
|
.#{$fa-css-prefix}-percent:before { content: $fa-var-percent; } |
||||
|
.#{$fa-css-prefix}-gitlab:before { content: $fa-var-gitlab; } |
||||
|
.#{$fa-css-prefix}-wpbeginner:before { content: $fa-var-wpbeginner; } |
||||
|
.#{$fa-css-prefix}-wpforms:before { content: $fa-var-wpforms; } |
||||
|
.#{$fa-css-prefix}-envira:before { content: $fa-var-envira; } |
||||
|
.#{$fa-css-prefix}-universal-access:before { content: $fa-var-universal-access; } |
||||
|
.#{$fa-css-prefix}-wheelchair-alt:before { content: $fa-var-wheelchair-alt; } |
||||
|
.#{$fa-css-prefix}-question-circle-o:before { content: $fa-var-question-circle-o; } |
||||
|
.#{$fa-css-prefix}-blind:before { content: $fa-var-blind; } |
||||
|
.#{$fa-css-prefix}-audio-description:before { content: $fa-var-audio-description; } |
||||
|
.#{$fa-css-prefix}-volume-control-phone:before { content: $fa-var-volume-control-phone; } |
||||
|
.#{$fa-css-prefix}-braille:before { content: $fa-var-braille; } |
||||
|
.#{$fa-css-prefix}-assistive-listening-systems:before { content: $fa-var-assistive-listening-systems; } |
||||
|
.#{$fa-css-prefix}-asl-interpreting:before, |
||||
|
.#{$fa-css-prefix}-american-sign-language-interpreting:before { content: $fa-var-american-sign-language-interpreting; } |
||||
|
.#{$fa-css-prefix}-deafness:before, |
||||
|
.#{$fa-css-prefix}-hard-of-hearing:before, |
||||
|
.#{$fa-css-prefix}-deaf:before { content: $fa-var-deaf; } |
||||
|
.#{$fa-css-prefix}-glide:before { content: $fa-var-glide; } |
||||
|
.#{$fa-css-prefix}-glide-g:before { content: $fa-var-glide-g; } |
||||
|
.#{$fa-css-prefix}-signing:before, |
||||
|
.#{$fa-css-prefix}-sign-language:before { content: $fa-var-sign-language; } |
||||
|
.#{$fa-css-prefix}-low-vision:before { content: $fa-var-low-vision; } |
||||
|
.#{$fa-css-prefix}-viadeo:before { content: $fa-var-viadeo; } |
||||
|
.#{$fa-css-prefix}-viadeo-square:before { content: $fa-var-viadeo-square; } |
||||
|
.#{$fa-css-prefix}-snapchat:before { content: $fa-var-snapchat; } |
||||
|
.#{$fa-css-prefix}-snapchat-ghost:before { content: $fa-var-snapchat-ghost; } |
||||
|
.#{$fa-css-prefix}-snapchat-square:before { content: $fa-var-snapchat-square; } |
||||
|
.#{$fa-css-prefix}-pied-piper:before { content: $fa-var-pied-piper; } |
||||
|
.#{$fa-css-prefix}-first-order:before { content: $fa-var-first-order; } |
||||
|
.#{$fa-css-prefix}-yoast:before { content: $fa-var-yoast; } |
||||
|
.#{$fa-css-prefix}-themeisle:before { content: $fa-var-themeisle; } |
||||
|
.#{$fa-css-prefix}-google-plus-circle:before, |
||||
|
.#{$fa-css-prefix}-google-plus-official:before { content: $fa-var-google-plus-official; } |
||||
|
.#{$fa-css-prefix}-fa:before, |
||||
|
.#{$fa-css-prefix}-font-awesome:before { content: $fa-var-font-awesome; } |
||||
|
.#{$fa-css-prefix}-handshake-o:before { content: $fa-var-handshake-o; } |
||||
|
.#{$fa-css-prefix}-envelope-open:before { content: $fa-var-envelope-open; } |
||||
|
.#{$fa-css-prefix}-envelope-open-o:before { content: $fa-var-envelope-open-o; } |
||||
|
.#{$fa-css-prefix}-linode:before { content: $fa-var-linode; } |
||||
|
.#{$fa-css-prefix}-address-book:before { content: $fa-var-address-book; } |
||||
|
.#{$fa-css-prefix}-address-book-o:before { content: $fa-var-address-book-o; } |
||||
|
.#{$fa-css-prefix}-vcard:before, |
||||
|
.#{$fa-css-prefix}-address-card:before { content: $fa-var-address-card; } |
||||
|
.#{$fa-css-prefix}-vcard-o:before, |
||||
|
.#{$fa-css-prefix}-address-card-o:before { content: $fa-var-address-card-o; } |
||||
|
.#{$fa-css-prefix}-user-circle:before { content: $fa-var-user-circle; } |
||||
|
.#{$fa-css-prefix}-user-circle-o:before { content: $fa-var-user-circle-o; } |
||||
|
.#{$fa-css-prefix}-user-o:before { content: $fa-var-user-o; } |
||||
|
.#{$fa-css-prefix}-id-badge:before { content: $fa-var-id-badge; } |
||||
|
.#{$fa-css-prefix}-drivers-license:before, |
||||
|
.#{$fa-css-prefix}-id-card:before { content: $fa-var-id-card; } |
||||
|
.#{$fa-css-prefix}-drivers-license-o:before, |
||||
|
.#{$fa-css-prefix}-id-card-o:before { content: $fa-var-id-card-o; } |
||||
|
.#{$fa-css-prefix}-quora:before { content: $fa-var-quora; } |
||||
|
.#{$fa-css-prefix}-free-code-camp:before { content: $fa-var-free-code-camp; } |
||||
|
.#{$fa-css-prefix}-telegram:before { content: $fa-var-telegram; } |
||||
|
.#{$fa-css-prefix}-thermometer-4:before, |
||||
|
.#{$fa-css-prefix}-thermometer:before, |
||||
|
.#{$fa-css-prefix}-thermometer-full:before { content: $fa-var-thermometer-full; } |
||||
|
.#{$fa-css-prefix}-thermometer-3:before, |
||||
|
.#{$fa-css-prefix}-thermometer-three-quarters:before { content: $fa-var-thermometer-three-quarters; } |
||||
|
.#{$fa-css-prefix}-thermometer-2:before, |
||||
|
.#{$fa-css-prefix}-thermometer-half:before { content: $fa-var-thermometer-half; } |
||||
|
.#{$fa-css-prefix}-thermometer-1:before, |
||||
|
.#{$fa-css-prefix}-thermometer-quarter:before { content: $fa-var-thermometer-quarter; } |
||||
|
.#{$fa-css-prefix}-thermometer-0:before, |
||||
|
.#{$fa-css-prefix}-thermometer-empty:before { content: $fa-var-thermometer-empty; } |
||||
|
.#{$fa-css-prefix}-shower:before { content: $fa-var-shower; } |
||||
|
.#{$fa-css-prefix}-bathtub:before, |
||||
|
.#{$fa-css-prefix}-s15:before, |
||||
|
.#{$fa-css-prefix}-bath:before { content: $fa-var-bath; } |
||||
|
.#{$fa-css-prefix}-podcast:before { content: $fa-var-podcast; } |
||||
|
.#{$fa-css-prefix}-window-maximize:before { content: $fa-var-window-maximize; } |
||||
|
.#{$fa-css-prefix}-window-minimize:before { content: $fa-var-window-minimize; } |
||||
|
.#{$fa-css-prefix}-window-restore:before { content: $fa-var-window-restore; } |
||||
|
.#{$fa-css-prefix}-times-rectangle:before, |
||||
|
.#{$fa-css-prefix}-window-close:before { content: $fa-var-window-close; } |
||||
|
.#{$fa-css-prefix}-times-rectangle-o:before, |
||||
|
.#{$fa-css-prefix}-window-close-o:before { content: $fa-var-window-close-o; } |
||||
|
.#{$fa-css-prefix}-bandcamp:before { content: $fa-var-bandcamp; } |
||||
|
.#{$fa-css-prefix}-grav:before { content: $fa-var-grav; } |
||||
|
.#{$fa-css-prefix}-etsy:before { content: $fa-var-etsy; } |
||||
|
.#{$fa-css-prefix}-imdb:before { content: $fa-var-imdb; } |
||||
|
.#{$fa-css-prefix}-ravelry:before { content: $fa-var-ravelry; } |
||||
|
.#{$fa-css-prefix}-eercast:before { content: $fa-var-eercast; } |
||||
|
.#{$fa-css-prefix}-microchip:before { content: $fa-var-microchip; } |
||||
|
.#{$fa-css-prefix}-snowflake-o:before { content: $fa-var-snowflake-o; } |
||||
|
.#{$fa-css-prefix}-superpowers:before { content: $fa-var-superpowers; } |
||||
|
.#{$fa-css-prefix}-wpexplorer:before { content: $fa-var-wpexplorer; } |
||||
|
.#{$fa-css-prefix}-meetup:before { content: $fa-var-meetup; } |
@ -0,0 +1,13 @@ |
|||||
|
// Icon Sizes |
||||
|
// ------------------------- |
||||
|
|
||||
|
/* makes the font 33% larger relative to the icon container */ |
||||
|
.#{$fa-css-prefix}-lg { |
||||
|
font-size: (4em / 3); |
||||
|
line-height: (3em / 4); |
||||
|
vertical-align: -15%; |
||||
|
} |
||||
|
.#{$fa-css-prefix}-2x { font-size: 2em; } |
||||
|
.#{$fa-css-prefix}-3x { font-size: 3em; } |
||||
|
.#{$fa-css-prefix}-4x { font-size: 4em; } |
||||
|
.#{$fa-css-prefix}-5x { font-size: 5em; } |
@ -0,0 +1,19 @@ |
|||||
|
// List Icons |
||||
|
// ------------------------- |
||||
|
|
||||
|
.#{$fa-css-prefix}-ul { |
||||
|
padding-left: 0; |
||||
|
margin-left: $fa-li-width; |
||||
|
list-style-type: none; |
||||
|
> li { position: relative; } |
||||
|
} |
||||
|
.#{$fa-css-prefix}-li { |
||||
|
position: absolute; |
||||
|
left: -$fa-li-width; |
||||
|
width: $fa-li-width; |
||||
|
top: (2em / 14); |
||||
|
text-align: center; |
||||
|
&.#{$fa-css-prefix}-lg { |
||||
|
left: -$fa-li-width + (4em / 14); |
||||
|
} |
||||
|
} |
@ -0,0 +1,60 @@ |
|||||
|
// Mixins |
||||
|
// -------------------------- |
||||
|
|
||||
|
@mixin fa-icon() { |
||||
|
display: inline-block; |
||||
|
font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration |
||||
|
font-size: inherit; // can't have font-size inherit on line above, so need to override |
||||
|
text-rendering: auto; // optimizelegibility throws things off #1094 |
||||
|
-webkit-font-smoothing: antialiased; |
||||
|
-moz-osx-font-smoothing: grayscale; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@mixin fa-icon-rotate($degrees, $rotation) { |
||||
|
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation})"; |
||||
|
-webkit-transform: rotate($degrees); |
||||
|
-ms-transform: rotate($degrees); |
||||
|
transform: rotate($degrees); |
||||
|
} |
||||
|
|
||||
|
@mixin fa-icon-flip($horiz, $vert, $rotation) { |
||||
|
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}, mirror=1)"; |
||||
|
-webkit-transform: scale($horiz, $vert); |
||||
|
-ms-transform: scale($horiz, $vert); |
||||
|
transform: scale($horiz, $vert); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
// Only display content to screen readers. A la Bootstrap 4. |
||||
|
// |
||||
|
// See: http://a11yproject.com/posts/how-to-hide-content/ |
||||
|
|
||||
|
@mixin sr-only { |
||||
|
position: absolute; |
||||
|
width: 1px; |
||||
|
height: 1px; |
||||
|
padding: 0; |
||||
|
margin: -1px; |
||||
|
overflow: hidden; |
||||
|
clip: rect(0,0,0,0); |
||||
|
border: 0; |
||||
|
} |
||||
|
|
||||
|
// Use in conjunction with .sr-only to only display content when it's focused. |
||||
|
// |
||||
|
// Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1 |
||||
|
// |
||||
|
// Credit: HTML5 Boilerplate |
||||
|
|
||||
|
@mixin sr-only-focusable { |
||||
|
&:active, |
||||
|
&:focus { |
||||
|
position: static; |
||||
|
width: auto; |
||||
|
height: auto; |
||||
|
margin: 0; |
||||
|
overflow: visible; |
||||
|
clip: auto; |
||||
|
} |
||||
|
} |