mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-12-25 00:21:29 +08:00
$.isArray() is deprecated
$.bind() is deprecated $.parseJSON is deprecated $.unique is deprecated jQuery .bind() is deprecated jQuery .unbind() is deprecated jQuery .load() is deprecated removed $.support.transition
This commit is contained in:
parent
bbd9f49dcd
commit
656fd72319
8 changed files with 51 additions and 111 deletions
18
README.md
18
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 |
|
||||
|
|
110
vendors/bootstrap/js/bootstrap.js
vendored
110
vendors/bootstrap/js/bootstrap.js
vendored
|
@ -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 = $('<div class="modal-backdrop ' + animate + '" />')
|
||||
.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)
|
||||
}
|
||||
|
||||
|
|
2
vendors/bootstrap/js/bootstrap.min.js
vendored
2
vendors/bootstrap/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
4
vendors/inputosaurus/inputosaurus.js
vendored
4
vendors/inputosaurus/inputosaurus.js
vendored
|
@ -451,7 +451,7 @@
|
|||
_setChosen : function(valArr) {
|
||||
var self = this;
|
||||
|
||||
if(!$.isArray(valArr)){
|
||||
if(!Array.isArray(valArr)){
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -692,7 +692,7 @@
|
|||
_destroy: function() {
|
||||
var els = this.elements;
|
||||
if (els) {
|
||||
els.input.unbind('.inputosaurus');
|
||||
els.input.off('.inputosaurus');
|
||||
els.ul.replaceWith(this.element);
|
||||
}
|
||||
}
|
||||
|
|
12
vendors/jquery-ui/js/jquery-ui-1.12.1.custom.js
vendored
12
vendors/jquery-ui/js/jquery-ui-1.12.1.custom.js
vendored
|
@ -89,7 +89,7 @@ $.widget = function( name, base, prototype ) {
|
|||
base = $.Widget;
|
||||
}
|
||||
|
||||
if ( $.isArray( prototype ) ) {
|
||||
if ( Array.isArray( prototype ) ) {
|
||||
prototype = $.extend.apply( null, [ {} ].concat( prototype ) );
|
||||
}
|
||||
|
||||
|
@ -528,7 +528,7 @@ $.Widget.prototype = {
|
|||
for ( i = 0; i < classes.length; i++ ) {
|
||||
current = that.classesElementLookup[ classes[ i ] ] || $();
|
||||
if ( options.add ) {
|
||||
current = $( $.unique( current.get().concat( options.element.get() ) ) );
|
||||
current = $( $.uniqueSort( current.get().concat( options.element.get() ) ) );
|
||||
} else {
|
||||
current = $( current.not( options.element ).get() );
|
||||
}
|
||||
|
@ -557,7 +557,7 @@ $.Widget.prototype = {
|
|||
_untrackClassesElement: function( event ) {
|
||||
var that = this;
|
||||
$.each( that.classesElementLookup, function( key, value ) {
|
||||
if ( $.inArray( event.target, value ) !== -1 ) {
|
||||
if ( value.includes(event.target) ) {
|
||||
that.classesElementLookup[ key ] = $( value.not( event.target ).get() );
|
||||
}
|
||||
} );
|
||||
|
@ -2333,7 +2333,7 @@ $.widget( "ui.autocomplete", {
|
|||
_initSource: function() {
|
||||
var array, url,
|
||||
that = this;
|
||||
if ( $.isArray( this.options.source ) ) {
|
||||
if ( Array.isArray( this.options.source ) ) {
|
||||
array = this.options.source;
|
||||
this.source = function( request, response ) {
|
||||
response( $.ui.autocomplete.filter( array, request.term ) );
|
||||
|
@ -3201,7 +3201,7 @@ $.widget( "ui.draggable", $.ui.mouse, {
|
|||
if ( typeof obj === "string" ) {
|
||||
obj = obj.split( " " );
|
||||
}
|
||||
if ( $.isArray( obj ) ) {
|
||||
if ( Array.isArray( obj ) ) {
|
||||
obj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 };
|
||||
}
|
||||
if ( "left" in obj ) {
|
||||
|
@ -5375,7 +5375,7 @@ $.widget( "ui.sortable", $.ui.mouse, {
|
|||
if ( typeof obj === "string" ) {
|
||||
obj = obj.split( " " );
|
||||
}
|
||||
if ( $.isArray( obj ) ) {
|
||||
if ( Array.isArray( obj ) ) {
|
||||
obj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 };
|
||||
}
|
||||
if ( "left" in obj ) {
|
||||
|
|
File diff suppressed because one or more lines are too long
12
vendors/jua/jua.js
vendored
12
vendors/jua/jua.js
vendored
|
@ -371,7 +371,7 @@
|
|||
Utils.getStringOrCallFunction = function (mStringOrFunction, aFunctionParams)
|
||||
{
|
||||
return $.isFunction(mStringOrFunction) ?
|
||||
mStringOrFunction.apply(null, $.isArray(aFunctionParams) ? aFunctionParams : []).toString() :
|
||||
mStringOrFunction.apply(null, Array.isArray(aFunctionParams) ? aFunctionParams : []).toString() :
|
||||
mStringOrFunction.toString();
|
||||
};
|
||||
|
||||
|
@ -472,7 +472,7 @@
|
|||
|
||||
try
|
||||
{
|
||||
oResult = $.parseJSON(oXhr.responseText);
|
||||
oResult = JSON.parse(oXhr.responseText);
|
||||
bResult = true;
|
||||
}
|
||||
catch (oException)
|
||||
|
@ -858,10 +858,10 @@
|
|||
}
|
||||
|
||||
$(oDragAndDropElement)
|
||||
.bind('dragenter', fHandleDragEnter)
|
||||
.bind('dragover', fHandleDragOver)
|
||||
.bind('dragleave', fHandleDragLeave)
|
||||
.bind('drop', fHandleDrop)
|
||||
.on('dragenter', fHandleDragEnter)
|
||||
.on('dragover', fHandleDragOver)
|
||||
.on('dragleave', fHandleDragLeave)
|
||||
.on('drop', fHandleDrop)
|
||||
;
|
||||
}
|
||||
|
||||
|
|
2
vendors/jua/jua.min.js
vendored
2
vendors/jua/jua.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue