Update jquery.uls from upstream
Changes:
* Hebrew localization update
* Send full event for lcd click events (to allow Ctrl-Click, etc., in CLL)
* Send a single argument for no resuts event trigger
Updating to
798e200b56
Bug: T179402
Bug: T189582
Change-Id: Ib86fd5c6ae77f4f69ba1f7dc43143a77fe399fad
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
"uls-region-ME": "המזרח התיכון",
|
"uls-region-ME": "המזרח התיכון",
|
||||||
"uls-region-PA": "האוקיינוס השקט",
|
"uls-region-PA": "האוקיינוס השקט",
|
||||||
"uls-region-all": "כל השפות",
|
"uls-region-all": "כל השפות",
|
||||||
"uls-no-results-found": "לא נמצאו שפות",
|
"uls-no-results-found": "לא נמצאו תוצאות",
|
||||||
"uls-common-languages": "שפות מוצעות",
|
"uls-common-languages": "שפות מוצעות",
|
||||||
"uls-no-results-suggestion-title": "אולי זה יעניין אותך:",
|
"uls-no-results-suggestion-title": "אולי זה יעניין אותך:",
|
||||||
"uls-search-help": "אפשר לחפש לפי שם שפה, שם שיטת הכתב, קוד ISO של השפה, או ניתן לעיין לפי אזור.",
|
"uls-search-help": "אפשר לחפש לפי שם שפה, שם שיטת הכתב, קוד ISO של השפה, או ניתן לעיין לפי אזור.",
|
||||||
|
|||||||
@@ -235,8 +235,10 @@
|
|||||||
this.$suggestion.val( '' );
|
this.$suggestion.val( '' );
|
||||||
this.$element.trigger(
|
this.$element.trigger(
|
||||||
'noresults.uls',
|
'noresults.uls',
|
||||||
query,
|
{
|
||||||
this.options.ulsPurpose
|
query: query,
|
||||||
|
ulsPurpose: this.options.ulsPurpose
|
||||||
|
}
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -382,9 +382,9 @@
|
|||||||
/**
|
/**
|
||||||
* No-results event handler
|
* No-results event handler
|
||||||
* @param {Event} event
|
* @param {Event} event
|
||||||
* @param {string} [currentSearchQuery] Current search query that gave mp results
|
* @param {Object} data Information about the failed search query
|
||||||
*/
|
*/
|
||||||
noResults: function ( event, currentSearchQuery ) {
|
noResults: function ( event, data ) {
|
||||||
var $noResults;
|
var $noResults;
|
||||||
|
|
||||||
this.$element.addClass( 'uls-no-results' );
|
this.$element.addClass( 'uls-no-results' );
|
||||||
@@ -393,7 +393,7 @@
|
|||||||
|
|
||||||
if ( typeof this.options.noResultsTemplate === 'function' ) {
|
if ( typeof this.options.noResultsTemplate === 'function' ) {
|
||||||
$noResults =
|
$noResults =
|
||||||
this.options.noResultsTemplate.call( this, currentSearchQuery );
|
this.options.noResultsTemplate.call( this, data.query );
|
||||||
} else if ( this.options.noResultsTemplate instanceof jQuery ) {
|
} else if ( this.options.noResultsTemplate instanceof jQuery ) {
|
||||||
$noResults = this.options.noResultsTemplate;
|
$noResults = this.options.noResultsTemplate;
|
||||||
} else {
|
} else {
|
||||||
@@ -408,8 +408,8 @@
|
|||||||
var lcd = this;
|
var lcd = this;
|
||||||
|
|
||||||
if ( this.options.clickhandler ) {
|
if ( this.options.clickhandler ) {
|
||||||
this.$element.on( 'click', '.row li', function () {
|
this.$element.on( 'click', '.row li', function ( event ) {
|
||||||
lcd.options.clickhandler.call( this, $( this ).data( 'code' ) );
|
lcd.options.clickhandler.call( this, $( this ).data( 'code' ), event );
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -448,7 +448,8 @@
|
|||||||
quickList: [],
|
quickList: [],
|
||||||
// Callback function for language selection
|
// Callback function for language selection
|
||||||
clickhandler: undefined,
|
clickhandler: undefined,
|
||||||
// Callback function when no search results
|
// Callback function when no search results.
|
||||||
|
// If overloaded, it can accept the search string as an argument.
|
||||||
noResultsTemplate: function () {
|
noResultsTemplate: function () {
|
||||||
var $suggestionsContainer, $suggestions,
|
var $suggestionsContainer, $suggestions,
|
||||||
$noResultsTemplate = $( noResultsTemplate );
|
$noResultsTemplate = $( noResultsTemplate );
|
||||||
|
|||||||
Reference in New Issue
Block a user