Remove use of $.error in jquery-ui

This commit is contained in:
djmaze 2020-08-06 16:24:19 +02:00
parent e1b274fcb4
commit ae1b7610fd
3 changed files with 12 additions and 13 deletions

View file

@ -71,29 +71,29 @@ 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 | |js/* |1.14.0 |native |gzip 1.14 |gzip |
|----------- |--------: |--------: |--------: |--------: | |----------- |--------: |--------: |--------: |--------: |
|admin.js |2.130.942 |1.220.345 | 485.481 | 299.073 | |admin.js |2.130.942 |1.218.984 | 485.481 | 298.296 |
|app.js |4.184.455 |2.984.455 | 932.725 | 697.869 | |app.js |4.184.455 |2.967.562 | 932.725 | 692.269 |
|boot.js | 671.522 | 94.230 | 169.502 | 28.386 | |boot.js | 671.522 | 94.230 | 169.502 | 28.385 |
|libs.js | 647.614 | 507.015 | 194.728 | 153.918 | |libs.js | 647.614 | 507.015 | 194.728 | 153.918 |
|polyfills.js | 325.834 | 0 | 71.825 | 0 | |polyfills.js | 325.834 | 0 | 71.825 | 0 |
|TOTAL js |7.960.367 |4.806.045 |1.854.261 |1.179.246 | |TOTAL js |7.960.367 |4.787.791 |1.854.261 |1.172.868 |
|js/min/* |1.14.0 |native |gzip 1.14 |gzip | |js/min/* |1.14.0 |native |gzip 1.14 |gzip |
|--------------- |--------: |--------: |--------: |--------: | |--------------- |--------: |--------: |--------: |--------: |
|admin.min.js | 252.147 | 157.387 | 73.657 | 45.136 | |admin.min.js | 252.147 | 157.158 | 73.657 | 45.007 |
|app.min.js | 511.202 | 389.269 |140.462 |102.945 | |app.min.js | 511.202 | 385.507 |140.462 |101.762 |
|boot.min.js | 66.007 | 11.575 | 22.567 | 4.461 | |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 | 464.161 |176.720 |143.916 |
|polyfills.min.js | 32.452 | 0 | 11.312 | 0 | |polyfills.min.js | 32.452 | 0 | 11.312 | 0 |
|TOTAL js/min |1.434.353 |1.022.392 |424.718 |296.458 | |TOTAL js/min |1.434.353 |1.018.401 |424.718 |295.148 |
411.755 bytes (128.260 gzip) is not much, but it feels faster. 411.755 bytes (128.260 gzip) is not much, but it feels faster.
|css/* |1.14.0 |native | |css/* |1.14.0 |native |
|-------------- |--------: |--------: | |-------------- |--------: |--------: |
|app.css | 340.334 | 292.608 | |app.css | 340.334 | 292.716 |
|app.min.css | 274.791 | 231.864 | |app.min.css | 274.791 | 231.956 |
### PHP73 branch ### PHP73 branch

View file

@ -121,7 +121,6 @@ class AdvancedSearchPopupView extends AbstractViewNext {
if (-1 < this.selectedDateValue()) { if (-1 < this.selectedDateValue()) {
let d = new Date(), pad2 = v => 10 > v ? '0' + v : v; let d = new Date(), pad2 = v => 10 > v ? '0' + v : v;
d.setDate(d.getDate() - this.selectedDateValue()); d.setDate(d.getDate() - this.selectedDateValue());
// d.format('Y.m.d');
result.push('date:' + d.getFullYear()+'.'+pad2(d.getMonth()+1)+'.'+pad2(d.getDate()) + '/'); result.push('date:' + d.getFullYear()+'.'+pad2(d.getMonth()+1)+'.'+pad2(d.getDate()) + '/');
} }

View file

@ -257,13 +257,13 @@ $.widget.bridge = function( name, object ) {
} }
if ( !instance ) { if ( !instance ) {
return $.error( "cannot call methods on " + name + throw new Error( "cannot call methods on " + name +
" prior to initialization; " + " prior to initialization; " +
"attempted to call method '" + options + "'" ); "attempted to call method '" + options + "'" );
} }
if ( !$.isFunction( instance[ options ] ) || options.charAt( 0 ) === "_" ) { if ( !$.isFunction( instance[ options ] ) || options.charAt( 0 ) === "_" ) {
return $.error( "no such method '" + options + "' for " + name + throw new Error( "no such method '" + options + "' for " + name +
" widget instance" ); " widget instance" );
} }