Update docs
This commit is contained in:
@@ -192,7 +192,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* callback for no results found context.
|
* callback for no results found context.
|
||||||
* @param String search the search term
|
* @param search string The search term
|
||||||
*/
|
*/
|
||||||
noresults: function( search ) {
|
noresults: function( search ) {
|
||||||
this.$resultsView.lcd( 'noResults' );
|
this.$resultsView.lcd( 'noResults' );
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Is this language a redirect to another language?
|
* Is this language a redirect to another language?
|
||||||
* @param string language code
|
* @param language string Language code
|
||||||
* @return Target language code if it's a redirect or false if it's not
|
* @return Target language code if it's a redirect or false if it's not
|
||||||
*/
|
*/
|
||||||
$.uls.data.isRedirect = function( language ) {
|
$.uls.data.isRedirect = function( language ) {
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the script of the language.
|
* Returns the script of the language.
|
||||||
* @param string language code
|
* @param language string Language code
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
$.uls.data.getScript = function( language ) {
|
$.uls.data.getScript = function( language ) {
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the regions in which a language is spoken.
|
* Returns the regions in which a language is spoken.
|
||||||
* @param string language code
|
* @param language string Language code
|
||||||
* @return array|string 'UNKNOWN'
|
* @return array|string 'UNKNOWN'
|
||||||
*/
|
*/
|
||||||
$.uls.data.getRegions = function( language ) {
|
$.uls.data.getRegions = function( language ) {
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the autonym of the language.
|
* Returns the autonym of the language.
|
||||||
* @param string language code
|
* @param language string Language code
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
$.uls.data.getAutonym = function( language ) {
|
$.uls.data.getAutonym = function( language ) {
|
||||||
@@ -152,7 +152,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns all languages in given regions.
|
* Returns all languages in given regions.
|
||||||
* @param region array of strings.
|
* @param regions array of strings.
|
||||||
* @return array of strings (languages codes)
|
* @return array of strings (languages codes)
|
||||||
*/
|
*/
|
||||||
$.uls.data.getLanguagesInRegions = function( regions ) {
|
$.uls.data.getLanguagesInRegions = function( regions ) {
|
||||||
@@ -186,7 +186,7 @@
|
|||||||
/**
|
/**
|
||||||
* Returns an associative array of languages in a region,
|
* Returns an associative array of languages in a region,
|
||||||
* grouped by script.
|
* grouped by script.
|
||||||
* @param string region code
|
* @param region string Region code
|
||||||
* @return associative array
|
* @return associative array
|
||||||
*/
|
*/
|
||||||
$.uls.data.getLanguagesByScriptInRegion = function( region ) {
|
$.uls.data.getLanguagesByScriptInRegion = function( region ) {
|
||||||
@@ -212,7 +212,7 @@
|
|||||||
/**
|
/**
|
||||||
* Returns an associative array of languages in a region,
|
* Returns an associative array of languages in a region,
|
||||||
* grouped by script group.
|
* grouped by script group.
|
||||||
* @param string region code
|
* @param region string Region code
|
||||||
* @return associative array
|
* @return associative array
|
||||||
*/
|
*/
|
||||||
$.uls.data.getLanguagesByScriptGroupInRegion = function( region ) {
|
$.uls.data.getLanguagesByScriptGroupInRegion = function( region ) {
|
||||||
@@ -259,7 +259,7 @@
|
|||||||
/**
|
/**
|
||||||
* Returns an associative array of languages in several regions,
|
* Returns an associative array of languages in several regions,
|
||||||
* grouped by script group.
|
* grouped by script group.
|
||||||
* @param array of strings - region codes
|
* @param regions array of strings - region codes
|
||||||
* @return associative array
|
* @return associative array
|
||||||
*/
|
*/
|
||||||
$.uls.data.getLanguagesByScriptGroupInRegions = function( regions ) {
|
$.uls.data.getLanguagesByScriptGroupInRegions = function( regions ) {
|
||||||
@@ -337,7 +337,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns all regions in a region group.
|
* Returns all regions in a region group.
|
||||||
* @param number groupNum
|
* @param groupNum int
|
||||||
* @return array of strings
|
* @return array of strings
|
||||||
*/
|
*/
|
||||||
$.uls.data.getRegionsInGroup = function( groupNum ) {
|
$.uls.data.getRegionsInGroup = function( groupNum ) {
|
||||||
@@ -356,7 +356,7 @@
|
|||||||
/**
|
/**
|
||||||
* Returns the script group of a script or 'Other' if it doesn't
|
* Returns the script group of a script or 'Other' if it doesn't
|
||||||
* belong to any group.
|
* belong to any group.
|
||||||
* @param string script code
|
* @param script string Script code
|
||||||
* @return string script group name
|
* @return string script group name
|
||||||
*/
|
*/
|
||||||
$.uls.data.getGroupOfScript = function( script ) {
|
$.uls.data.getGroupOfScript = function( script ) {
|
||||||
@@ -371,7 +371,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the script group of a language.
|
* Returns the script group of a language.
|
||||||
* @param string language code
|
* @param language string Language code
|
||||||
* @return string script group name
|
* @return string script group name
|
||||||
*/
|
*/
|
||||||
$.uls.data.getScriptGroupOfLanguage = function( language ) {
|
$.uls.data.getScriptGroupOfLanguage = function( language ) {
|
||||||
@@ -381,7 +381,8 @@
|
|||||||
/**
|
/**
|
||||||
* A callback for sorting languages by autonym.
|
* A callback for sorting languages by autonym.
|
||||||
* Can be used as an argument to a sort function.
|
* Can be used as an argument to a sort function.
|
||||||
* @param two language codes
|
* @param a string Language code
|
||||||
|
* @param b string Language code
|
||||||
*/
|
*/
|
||||||
$.uls.data.sortByAutonym = function( a, b ) {
|
$.uls.data.sortByAutonym = function( a, b ) {
|
||||||
var autonymA = $.uls.data.getAutonym( a ) || a,
|
var autonymA = $.uls.data.getAutonym( a ) || a,
|
||||||
@@ -391,7 +392,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if a language is right-to-left.
|
* Check if a language is right-to-left.
|
||||||
* @param string language code
|
* @param language string Language code
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
$.uls.data.isRtl = function( language ) {
|
$.uls.data.isRtl = function( language ) {
|
||||||
@@ -400,7 +401,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the direction of the language
|
* Return the direction of the language
|
||||||
* @param string language code
|
* @param language string Language code
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
$.uls.data.getDir = function( language ) {
|
$.uls.data.getDir = function( language ) {
|
||||||
@@ -409,7 +410,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the languages spoken in a territory.
|
* Returns the languages spoken in a territory.
|
||||||
* @param string Territory code
|
* @param territory string Territory code
|
||||||
* @return list of language codes
|
* @return list of language codes
|
||||||
*/
|
*/
|
||||||
$.uls.data.getLanguagesInTerritory = function( territory ) {
|
$.uls.data.getLanguagesInTerritory = function( territory ) {
|
||||||
|
|||||||
@@ -22,7 +22,6 @@
|
|||||||
* The values for autocompletion is from the options.languages.
|
* The values for autocompletion is from the options.languages.
|
||||||
* The data is in the format of languagecode:languagename.
|
* The data is in the format of languagecode:languagename.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function ( $ ) {
|
(function ( $ ) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@@ -48,7 +47,6 @@
|
|||||||
} () );
|
} () );
|
||||||
|
|
||||||
LanguageFilter.prototype = {
|
LanguageFilter.prototype = {
|
||||||
|
|
||||||
listen: function() {
|
listen: function() {
|
||||||
this.$element.on( 'keypress', $.proxy( this.keyup, this ) )
|
this.$element.on( 'keypress', $.proxy( this.keyup, this ) )
|
||||||
.on( 'keyup', $.proxy( this.keyup, this ) );
|
.on( 'keyup', $.proxy( this.keyup, this ) );
|
||||||
@@ -212,7 +210,7 @@
|
|||||||
/**
|
/**
|
||||||
* Handler method to be called once search is over.
|
* Handler method to be called once search is over.
|
||||||
* Based on search result call success or noresults callbacks
|
* Based on search result call success or noresults callbacks
|
||||||
* @param String query
|
* @param query string
|
||||||
*/
|
*/
|
||||||
resultHandler: function( query ) {
|
resultHandler: function( query ) {
|
||||||
if ( this.resultCount === 0 && this.options.noresults ) {
|
if ( this.resultCount === 0 && this.options.noresults ) {
|
||||||
@@ -301,7 +299,6 @@
|
|||||||
|
|
||||||
return isSupported;
|
return isSupported;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$.fn.languagefilter = function( option ) {
|
$.fn.languagefilter = function( option ) {
|
||||||
@@ -333,8 +330,8 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if a prefix is visually prefix of a string
|
* Check if a prefix is visually prefix of a string
|
||||||
* @param String prefix
|
* @param prefix string
|
||||||
* @param String string
|
* @param string string
|
||||||
*/
|
*/
|
||||||
function isVisualPrefix( prefix, string ) {
|
function isVisualPrefix( prefix, string ) {
|
||||||
// Pre-base vowel signs of Indic languages. A vowel sign is called pre-base if
|
// Pre-base vowel signs of Indic languages. A vowel sign is called pre-base if
|
||||||
@@ -342,5 +339,4 @@
|
|||||||
var prebases = "െേൈൊോൌெேைொோௌେୈୋୌિਿिিেৈোৌෙේෛොෝෞ";
|
var prebases = "െേൈൊോൌெேைொோௌେୈୋୌિਿिিেৈোৌෙේෛොෝෞ";
|
||||||
return prebases.indexOf( string[prefix.length] ) <= 0;
|
return prebases.indexOf( string[prefix.length] ) <= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
} ( jQuery ) );
|
} ( jQuery ) );
|
||||||
|
|||||||
@@ -122,8 +122,8 @@
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Get a column to add language.
|
* Get a column to add language.
|
||||||
* @param String regionCode The region code
|
* @param regionCode string The region code
|
||||||
* @param boolean forceNew whether a new column must be created or not
|
* @param forceNew bool whether a new column must be created or not
|
||||||
*/
|
*/
|
||||||
getColumn: function( regionCode, forceNew ) {
|
getColumn: function( regionCode, forceNew ) {
|
||||||
var $divRegionCode, $rowDiv, $ul;
|
var $divRegionCode, $rowDiv, $ul;
|
||||||
|
|||||||
Reference in New Issue
Block a user