diff --git a/README.md b/README.md index 131e7a8e2..57058915e 100644 --- a/README.md +++ b/README.md @@ -71,23 +71,23 @@ Things might work in Edge 15-18, Firefox 47-62 and Chrome 54-68 due to one polyf |js/* |1.14.0 |native |gzip 1.14 |gzip | |----------- |--------: |--------: |--------: |--------: | -|admin.js |2.130.942 |1.218.984 | 485.481 | 298.296 | -|app.js |4.184.455 |2.967.562 | 932.725 | 692.269 | +|admin.js |2.130.942 |1.216.846 | 485.481 | 298.402 | +|app.js |4.184.455 |2.962.814 | 932.725 | 691.920 | |boot.js | 671.522 | 94.230 | 169.502 | 28.385 | -|libs.js | 647.614 | 507.015 | 194.728 | 153.918 | +|libs.js | 647.614 | 505.981 | 194.728 | 153.718 | |polyfills.js | 325.834 | 0 | 71.825 | 0 | -|TOTAL js |7.960.367 |4.787.791 |1.854.261 |1.172.868 | +|TOTAL js |7.960.367 |4.779.871 |1.854.261 |1.172.425 | |js/min/* |1.14.0 |native |gzip 1.14 |gzip | |--------------- |--------: |--------: |--------: |--------: | -|admin.min.js | 252.147 | 157.158 | 73.657 | 45.007 | -|app.min.js | 511.202 | 385.507 |140.462 |101.762 | +|admin.min.js | 252.147 | 156.875 | 73.657 | 44.814 | +|app.min.js | 511.202 | 384.939 |140.462 |101.744 | |boot.min.js | 66.007 | 11.575 | 22.567 | 4.463 | -|libs.min.js | 572.545 | 464.161 |176.720 |143.916 | +|libs.min.js | 572.545 | 463.408 |176.720 |143.754 | |polyfills.min.js | 32.452 | 0 | 11.312 | 0 | -|TOTAL js/min |1.434.353 |1.018.401 |424.718 |295.148 | +|TOTAL js/min |1.434.353 |1.016.797 |424.718 |294.775 | -411.755 bytes (128.260 gzip) is not much, but it feels faster. +417.556 bytes (129.943 gzip) is not much, but it feels faster. |css/* |1.14.0 |native | diff --git a/vendors/bootstrap/js/bootstrap.js b/vendors/bootstrap/js/bootstrap.js index 72c104276..67e094e18 100644 --- a/vendors/bootstrap/js/bootstrap.js +++ b/vendors/bootstrap/js/bootstrap.js @@ -1,63 +1,4 @@ -/* =================================================== - * bootstrap-transition.js v2.3.2 - * http://getbootstrap.com/2.3.2/javascript.html#transitions - * =================================================== - * Copyright 2013 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================== */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* CSS TRANSITION SUPPORT (http://www.modernizr.com/) - * ======================================================= */ - - $(function () { - - $.support.transition = (function () { - - var transitionEnd = (function () { - - var el = document.createElement('bootstrap') - , transEndEventNames = { - 'WebkitTransition' : 'webkitTransitionEnd' - , 'MozTransition' : 'transitionend' - , 'OTransition' : 'oTransitionEnd otransitionend' - , 'transition' : 'transitionend' - } - , name - - for (name in transEndEventNames){ - if (el.style[name] !== undefined) { - return transEndEventNames[name] - } - } - - }()) - - return transitionEnd && { - end: transitionEnd - } - - })() - - }) - -}(window.jQuery);/* ========================================================== +/* ========================================================== * bootstrap-alert.js v2.3.2 * http://getbootstrap.com/2.3.2/javascript.html#alerts * ========================================================== @@ -118,8 +59,8 @@ .remove() } - $.support.transition && $parent.hasClass('fade') ? - $parent.on($.support.transition.end, removeElement) : + $parent.hasClass('fade') ? + $parent.on('transitionend', removeElement) : removeElement() } @@ -334,8 +275,8 @@ , pause: function (e) { if (!e) this.paused = true - if (this.$element.find('.next, .prev').length && $.support.transition.end) { - this.$element.trigger($.support.transition.end) + if (this.$element.find('.next, .prev').length) { + this.$element.trigger('transitionend') this.cycle(true) } clearInterval(this.interval) @@ -383,14 +324,14 @@ }) } - if ($.support.transition && this.$element.hasClass('slide')) { + if (this.$element.hasClass('slide')) { this.$element.trigger(e) if (e.isDefaultPrevented()) return $next.addClass(type) $next[0].offsetWidth // force reflow $active.addClass(direction) $next.addClass(direction) - this.$element.one($.support.transition.end, function () { + this.$element.one('transitionend', function () { $next.removeClass([type, direction].join(' ')).addClass('active') $active.removeClass(['active', direction].join(' ')) that.sliding = false @@ -534,7 +475,7 @@ this.$element[dimension](0) this.transition('addClass', $.Event('show'), 'shown') - $.support.transition && this.$element[dimension](this.$element[0][scroll]) + this.$element[dimension](this.$element[0][scroll]) } , hide: function () { @@ -575,8 +516,8 @@ this.$element[method]('in') - $.support.transition && this.$element.hasClass('collapse') ? - this.$element.one($.support.transition.end, complete) : + this.$element.hasClass('collapse') ? + this.$element.one('transitionend', complete) : complete() } @@ -832,7 +773,7 @@ this.options = options this.$element = $(element) .on('click.dismiss.modal', '[data-dismiss="modal"]', this.hide.bind(this)) - this.options.remote && this.$element.find('.modal-body').load(this.options.remote) + this.options.remote && this.$element.find('.modal-body').on('load', this.options.remote) } Modal.prototype = { @@ -856,7 +797,7 @@ this.escape() this.backdrop(function () { - var transition = $.support.transition && that.$element.hasClass('fade') + var transition = that.$element.hasClass('fade') if (!that.$element.parent().length) { that.$element.appendTo(document.body) //don't move modals dom position @@ -875,7 +816,7 @@ that.enforceFocus() transition ? - that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) : + that.$element.one('transitionend', function () { that.$element.focus().trigger('shown') }) : that.$element.focus().trigger('shown') }) @@ -902,7 +843,7 @@ .removeClass('in') .attr('aria-hidden', true) - $.support.transition && this.$element.hasClass('fade') ? + this.$element.hasClass('fade') ? this.hideWithTransition() : this.hideModal() } @@ -930,11 +871,11 @@ , hideWithTransition: function () { var that = this , timeout = setTimeout(function () { - that.$element.off($.support.transition.end) + that.$element.off('transitionend') that.hideModal() }, 500) - this.$element.one($.support.transition.end, function () { + this.$element.one('transitionend', function () { clearTimeout(timeout) that.hideModal() }) @@ -959,7 +900,7 @@ , animate = this.$element.hasClass('fade') ? 'fade' : '' if (this.isShown && this.options.backdrop) { - var doAnimate = $.support.transition && animate + var doAnimate = animate this.$backdrop = $('
') .appendTo(document.body) @@ -977,14 +918,14 @@ if (!callback) return doAnimate ? - this.$backdrop.one($.support.transition.end, callback) : + this.$backdrop.one('transitionend', callback) : callback() } else if (!this.isShown && this.$backdrop) { this.$backdrop.removeClass('in') - $.support.transition && this.$element.hasClass('fade')? - this.$backdrop.one($.support.transition.end, callback) : + this.$element.hasClass('fade')? + this.$backdrop.one('transitionend', callback) : callback() } else if (callback) { @@ -1281,16 +1222,16 @@ function removeWithAnimation() { var timeout = setTimeout(function () { - $tip.off($.support.transition.end).detach() + $tip.off('transitionend').detach() }, 500) - $tip.one($.support.transition.end, function () { + $tip.one('transitionend', function () { clearTimeout(timeout) $tip.detach() }) } - $.support.transition && this.$tip.hasClass('fade') ? + this.$tip.hasClass('fade') ? removeWithAnimation() : $tip.detach() @@ -1758,7 +1699,6 @@ , activate: function ( element, container, callback) { var $active = container.find('> .active') , transition = callback - && $.support.transition && $active.hasClass('fade') function next() { @@ -1784,7 +1724,7 @@ } transition ? - $active.one($.support.transition.end, next) : + $active.one('transitionend', next) : next() $active.removeClass('in') @@ -2049,7 +1989,7 @@ } , keydown: function (e) { - this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40,38,9,13,27]) + this.suppressKeyPressRepeat = ~[40,38,9,13,27].indexOf(e.keyCode) this.move(e) } diff --git a/vendors/bootstrap/js/bootstrap.min.js b/vendors/bootstrap/js/bootstrap.min.js index 76569cd27..255b26cb6 100644 --- a/vendors/bootstrap/js/bootstrap.min.js +++ b/vendors/bootstrap/js/bootstrap.min.js @@ -3,4 +3,4 @@ * Copyright 2013 Twitter, Inc. * http://www.apache.org/licenses/LICENSE-2.0.txt */ -!function(t){"use strict";t(function(){var e;t.support.transition=(e=function(){var t,e=document.createElement("bootstrap"),i={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(t in i)if(void 0!==e.style[t])return i[t]}())&&{end:e}})}(window.jQuery),function(t){"use strict";var e='[data-dismiss="alert"]',i=function(i){t(i).on("click",e,this.close)};i.prototype.close=function(e){var i,n=t(this),s=n.attr("data-target");function o(){i.trigger("closed").remove()}s||(s=(s=n.attr("href"))&&s.replace(/.*(?=#[^\s]*$)/,"")),i=t(s),e&&e.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(e=t.Event("close")),e.isDefaultPrevented()||(i.removeClass("in"),t.support.transition&&i.hasClass("fade")?i.on(t.support.transition.end,o):o())};var n=t.fn.alert;t.fn.alert=function(e){return this.each(function(){var n=t(this),s=n.data("alert");s||n.data("alert",s=new i(this)),"string"==typeof e&&s[e].call(n)})},t.fn.alert.Constructor=i,t.fn.alert.noConflict=function(){return t.fn.alert=n,this},t(document).on("click.alert.data-api",e,i.prototype.close)}(window.jQuery),function(t){"use strict";var e=function(e,i){this.$element=t(e),this.options=t.extend({},t.fn.button.defaults,i)};e.prototype.setState=function(t){var e="disabled",i=this.$element,n=i.data(),s=i.is("input")?"val":"html";t+="Text",n.resetText||i.data("resetText",i[s]()),i[s](n[t]||this.options[t]),setTimeout(function(){"loadingText"==t?i.addClass(e).attr(e,e):i.removeClass(e).removeAttr(e)},0)},e.prototype.toggle=function(){var t=this.$element.closest('[data-toggle="buttons-radio"]');t&&t.find(".active").removeClass("active"),this.$element.toggleClass("active")};var i=t.fn.button;t.fn.button=function(i){return this.each(function(){var n=t(this),s=n.data("button"),o="object"==typeof i&&i;s||n.data("button",s=new e(this,o)),"toggle"==i?s.toggle():i&&s.setState(i)})},t.fn.button.defaults={loadingText:"loading..."},t.fn.button.Constructor=e,t.fn.button.noConflict=function(){return t.fn.button=i,this},t(document).on("click.button.data-api","[data-toggle^=button]",function(e){var i=t(e.target);i.hasClass("btn")||(i=i.closest(".btn")),i.button("toggle")})}(window.jQuery),function(t){"use strict";var e=function(e,i){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=i,"hover"==this.options.pause&&this.$element.on("mouseenter",this.pause.bind(this)).on("mouseleave",this.cycle.bind(this))};e.prototype={cycle:function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(this.next.bind(this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(e){var i=this.getActiveIndex(),n=this;if(!(e>this.$items.length-1||e<0))return this.sliding?this.$element.one("slid",function(){n.to(e)}):i==e?this.pause().cycle():this.slide(e>i?"next":"prev",t(this.$items[e]))},pause:function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition.end&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this},next:function(){if(!this.sliding)return this.slide("next")},prev:function(){if(!this.sliding)return this.slide("prev")},slide:function(e,i){var n,s=this.$element.find(".item.active"),o=i||s[e](),a=this.interval,r="next"==e?"left":"right",h="next"==e?"first":"last",l=this;if(this.sliding=!0,a&&this.pause(),o=o.length?o:this.$element.find(".item")[h](),n=t.Event("slide",{relatedTarget:o[0],direction:r}),!o.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var e=t(l.$indicators.children()[l.getActiveIndex()]);e&&e.addClass("active")})),t.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(n),n.isDefaultPrevented())return;o.addClass(e),o[0].offsetWidth,s.addClass(r),o.addClass(r),this.$element.one(t.support.transition.end,function(){o.removeClass([e,r].join(" ")).addClass("active"),s.removeClass(["active",r].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger("slid")},0)})}else{if(this.$element.trigger(n),n.isDefaultPrevented())return;s.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return a&&this.cycle(),this}}};var i=t.fn.carousel;t.fn.carousel=function(i){return this.each(function(){var n=t(this),s=n.data("carousel"),o=t.extend({},t.fn.carousel.defaults,"object"==typeof i&&i),a="string"==typeof i?i:o.slide;s||n.data("carousel",s=new e(this,o)),"number"==typeof i?s.to(i):a?s[a]():o.interval&&s.pause().cycle()})},t.fn.carousel.defaults={interval:5e3,pause:"hover"},t.fn.carousel.Constructor=e,t.fn.carousel.noConflict=function(){return t.fn.carousel=i,this},t(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(e){var i,n,s=t(this),o=t(s.attr("data-target")||(i=s.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"")),a=t.extend({},o.data(),s.data());o.carousel(a),(n=s.attr("data-slide-to"))&&o.data("carousel").pause().to(n).cycle(),e.preventDefault()})}(window.jQuery),function(t){"use strict";var e=function(e,i){this.$element=t(e),this.options=t.extend({},t.fn.collapse.defaults,i),this.options.parent&&(this.$parent=t(this.options.parent)),this.options.toggle&&this.toggle()};e.prototype={constructor:e,dimension:function(){return this.$element.hasClass("width")?"width":"height"},show:function(){var e,i,n,s;if(!this.transitioning&&!this.$element.hasClass("in")){if(e=this.dimension(),i=t.camelCase(["scroll",e].join("-")),(n=this.$parent&&this.$parent.find("> .accordion-group > .in"))&&n.length){if((s=n.data("collapse"))&&s.transitioning)return;n.collapse("hide"),s||n.data("collapse",null)}this.$element[e](0),this.transition("addClass",t.Event("show"),"shown"),t.support.transition&&this.$element[e](this.$element[0][i])}},hide:function(){var e;!this.transitioning&&this.$element.hasClass("in")&&(e=this.dimension(),this.reset(this.$element[e]()),this.transition("removeClass",t.Event("hide"),"hidden"),this.$element[e](0))},reset:function(t){var e=this.dimension();return this.$element.removeClass("collapse")[e](t||"auto")[0].offsetWidth,this.$element[null!==t?"addClass":"removeClass"]("collapse"),this},transition:function(e,i,n){var s=this,o=function(){"show"==i.type&&s.reset(),s.transitioning=0,s.$element.trigger(n)};this.$element.trigger(i),i.isDefaultPrevented()||(this.transitioning=1,this.$element[e]("in"),t.support.transition&&this.$element.hasClass("collapse")?this.$element.one(t.support.transition.end,o):o())},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var i=t.fn.collapse;t.fn.collapse=function(i){return this.each(function(){var n=t(this),s=n.data("collapse"),o=t.extend({},t.fn.collapse.defaults,n.data(),"object"==typeof i&&i);s||n.data("collapse",s=new e(this,o)),"string"==typeof i&&s[i]()})},t.fn.collapse.defaults={toggle:!0},t.fn.collapse.Constructor=e,t.fn.collapse.noConflict=function(){return t.fn.collapse=i,this},t(document).on("click.collapse.data-api","[data-toggle=collapse]",function(e){var i,n=t(this),s=n.attr("data-target")||e.preventDefault()||(i=n.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,""),o=t(s).data("collapse")?"toggle":n.data();n[t(s).hasClass("in")?"addClass":"removeClass"]("collapsed"),t(s).collapse(o)})}(window.jQuery),function(t){"use strict";var e="[data-toggle=dropdown]",i=function(e){var i=t(e).on("click.dropdown.data-api",this.toggle);t("html").on("click.dropdown.data-api",function(){i.parent().removeClass("open")})};function n(){t(".dropdown-backdrop").remove(),t(e).each(function(){s(t(this)).removeClass("open")})}function s(e){var i,n=e.attr("data-target");return n||(n=(n=e.attr("href"))&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")),(i=n&&1