Remove lazyload functionality entirely

It was merely a stopgap solution to the problem of the dialog taking
forever to load. With that problem solved all of this awful code is no
longer needed.
This commit is contained in:
MatmaRex
2013-06-14 01:44:50 +02:00
committed by Santhosh Thottingal
parent 8341bb8e21
commit 8a1e3eb18e
3 changed files with 3 additions and 47 deletions

View File

@@ -22,7 +22,7 @@
/* RegionSelector plugin definition */
var RegionSelector, delay;
var RegionSelector;
/**
* Region selector is a language selector based on regions.
@@ -138,32 +138,8 @@
$target.append( langCode, region );
},
next: function () {
var regionSelector = this;
if ( !this.$element.hasClass( 'active' ) ) {
return true;
}
// Do not respond to all scroll end events, but only after a short interval
delay( function () {
var nextRegionGroupNumber = regionSelector.$element.data( 'regiongroup' ) + 1,
$nextRegion = $( '#uls-region-' + nextRegionGroupNumber ),
nextRegionSelector = $nextRegion.length && $nextRegion.data( 'regionselector' );
// If cache is defined, then it is already rendered and there's no need
// to re-render it.
if ( nextRegionSelector && nextRegionSelector.cache === null ) {
nextRegionSelector.show();
}
}, 100 );
return false;
},
listen: function () {
this.$element.on( 'click', $.proxy( this.click, this ) );
this.options.$target.$element.bind( 'scrollend', $.proxy( this.next, this ) );
},
click: function () {
@@ -212,12 +188,4 @@
$.fn.regionselector.Constructor = RegionSelector;
delay = ( function () {
var timer = 0;
return function ( callback, milliseconds ) {
clearTimeout( timer );
timer = setTimeout( callback, milliseconds );
};
} () );
} ( jQuery ) );