Updated util functions names after refactoring

jquery.uls.js is just updated from GitHub.

Change-Id: I506ab810d7136ba5d96dfdd469394a843110f8de
This commit is contained in:
Amir E. Aharoni
2012-10-08 00:13:34 +02:00
parent 93ced2526e
commit 8d31bf8c07
4 changed files with 29 additions and 20 deletions

View File

@@ -728,37 +728,42 @@
},
listen: function () {
var that = this;
var lcd = this;
if ( this.options.clickhandler ) {
this.$element.on( 'click', 'div.row li', function() {
that.options.clickhandler.call( this, $( this ).data( 'code' ) );
lcd.options.clickhandler.call( this, $( this ).data( 'code' ) );
} );
}
// The region section need to be in sync with the map filter.
that.$element.scroll( function () {
var scrollTop = $( this ).position().top;
var scrollBottom = $( this ).height();
if ( this.offsetHeight + this.scrollTop >= this.scrollHeight/2 ) {
that.$element.trigger( 'scrollend' );
lcd.$element.scroll( function () {
var $ulsLanguageList = $( this ),
scrollTop = $ulsLanguageList.position().top,
scrollBottom = $ulsLanguageList.height();
if ( this.offsetHeight + this.scrollTop >= this.scrollHeight / 2 ) {
lcd.$element.trigger( 'scrollend' );
}
// The region section need to be in sync with the map filter.
var inviewRegion = 'WW';
that.$element.find( 'div.uls-lcd-region-section' ).each( function () {
var top = $( this ).position().top;
var height = $( this ).height();
lcd.$element.find( 'div.uls-lcd-region-section' ).each( function () {
var $lcdRegionSection = $( this ),
top = $lcdRegionSection.position().top,
height = $lcdRegionSection.height();
if ( top < scrollTop && height > scrollBottom ) {
inviewRegion = $( this ).attr( 'id' );
inviewRegion = $lcdRegionSection.attr( 'id' );
return true;
}
} );
var inview = $.uls.data.regiongroups[inviewRegion];
$( '.regionselector' ).removeClass( 'active' );
$( '#uls-region-' + inview ).addClass( 'active' );
} );
}
};
$.fn.lcd = function( option ) {