Place for some configs

Li Europan lingues es membres del sam familie. Lor separat existentie es un myth. Por scientie, musica, sport etc, litot Europa usa li sam vocabular. Li lingues differe solmen in li grammatica, li pronunciation e li plu commun vocabules. Omnicos directe al desirabilite de un nov lingua franca: On refusa continuar payar custosi traductores.

Number v 1.0

Converts an input field into a rich featured numbers-only field

If you define decimals = 2:

Options read more about inline data attributes

optiondefaultpossible valuesdescriptionsinceinfo
step1integer defines the steps used on a mousewheel action1.0only for mousewheel
decimals0integer number of decmials that are displayed1.0
start0integer defines the starting value on a mousewheel action1.0only for mousewheel
minnullnumber define a minimum1.0
maxnullnumber define a maximum1.0
mousewheeltruetrue | false use mousewheel feature1.0
onChangefunction(){}function(value) callback if the value has changed. value is the current value1.0
onErrorfunction(){}function(value) callback if no valid value (no number) is entered. value is the current value1.0

Methods

Usage

$(selector).wl_Number([options]);

Markup

<input type="number" class="integer"> //for integers
<input type="number" class="decimal"> //for decimals

Example


Date v 1.0

Converts an input field into a rich featured date field. Uses the jQuery datepicker

Options read more about inline data attributes

optiondefaultpossible valuesdescriptionsinceinfo
mousewheeltruetrue | false use mousewheel feature1.0
valuenull'now', 'today', 'yesterday', 'tomorrow' | +n | -n sets the value for the element. 'now', 'today' gets converted in the current date, 'yesterday' and 'tomorrow' adds or substract a day and +n|-n is for an offset time in days (e.g. value= -30 displayes the date one month ago)1.0don't use the normal 'value' attribute for this placeholders, use data-value instead!

Check out the jQuery datepicker options for the other options

Methods

Check out the jQuery datepicker methods

Usage

$(selector).wl_Date([options]);

Markup

<input type="text" class="date">
<div class="date"></div> //for inline datefield

Example


Time v 1.1

Converts an input field into a rich featured time field.

You can type a valid time (e.g. 10:30) or following:

If you use 12h timeformat 23:00 gets converted to 11:00pm

Options read more about inline data attributes

optiondefaultpossible valuesdescriptionsinceinfo
step5integer defines the steps used on a mousewheel action1.0only for mousewheel
timeformat2412 | 24 defines the used timeformat1.0The form will always submit a 24h timeformat
valuenull'now' | +n | -n sets the value for the element. 'now' gets converted in the current time +n|-n is for an offset time in minutes (e.g. value= -60 displayes the time one hour ago)1.0don't use the normal 'value' attribute for this placeholders, use data-value instead!
roundtimetruetrue | false round the time to the next "nice" step (e.g. 00:08 => 00:15 => 00:30)1.0only for mousewheel
connectnullid of a datefield connects the time to a datefield1.0effects the date field when reaching a new date
mousewheeltruetrue | false use mousewheel feature1.0
onDateChangefunction(){}function(offset) callback if the date has changed. offset can be +1 or -11.0only for mousewheel
onHourChangefunction(){}function(offset) callback if the hour has changed. offset can be +1 or -11.0only for mousewheel
onChangefunction(){}function(value) callback if the value has changed. value is the current value (format hh:mm)1.0
onErrorfunction(){}function(value) callback if no valid value is entered. value is the current value1.0the field gets the value of '00:00'

Methods

Usage

$(selector).wl_Time([options]);

Markup

<input type="text" class="time">

Example


Multiselect v 1.3

Converts an multi select dropdown field into a Combo box

Options read more about inline data attributes

optiondefaultpossible valuesdescriptionsinceinfo
height200integer defines the height of the field in pixel1.0
items[]Array with item objects defines additional items to add for the list.
[{
  name:'Item Name',
  value:'item_value'
},{
  name:'Item Name 2',
  value:'item_value_2'
}]			
1.0Elements will get append to the native options
selected[]String | Array defines values which are selected on initialisation. More values must be defined in an array
['item_value','item_value_2']
1.0Doesn't affect the native selected options
showUsedfalsetrue | false remove used elements from the list (hide them). Used elements get a 'used' class in any case1.0
searchfieldtruetrue | false adds a searchfield to the option pool which search for values and names1.3
onAddfunction(){}function(values) callback if an item is added to the list. values is an array with added values1.0
onRemovefunction(){}function(values) callback if an item is remove from the list. values is an array with removed values1.0
onSelectfunction(){}function(values) callback if an item get selected. values is an array with the selected values1.0
onUnselectfunction(){}function(values) callback if an item get unselected. values is an array with the unselected values1.0
onSortfunction(){}function(values) callback if the list gets sorted. values is an array with all values in the new order1.0

Methods

optiondefaultpossible valuesdescriptionsinceinfo
addfunction(values,select=false){}String|Array|Object, true | false add items to the list. values can be a String (one item name=value), an Array (multiple items, name=value) and an object with different name and value pairs. If select is true item wil get selected too1.0
removefunction(values){}String|Array remove the item with the specific value from the list. values can be a String or an Array1.0
selectfunction(values){}String|Array select values. values can be a String or an Array1.0
unselectfunction(values){}String|Array unselect values. values can be a String or an Array1.0
clearfunction(){} clears the selection1.0

Usage

$(selector).wl_Multiselect([options]);

Calling Methods

Add Elements

$(selector).wl_Multiselect('add','Entry'); // value is equal name
$(selector).wl_Multiselect('add',['First Entry','Second Entry']); // value is equal name
$(selector).wl_Multiselect('add',{'first': 'First Entry','second': 'Second Entry'});

Select/Unselect Elements

$(selector).wl_Multiselect('[un]select','Entry');
$(selector).wl_Multiselect('[un]select',['First Entry','Second Entry']);

Remove Elements

$(selector).wl_Multiselect('remove','Entry');
$(selector).wl_Multiselect('remove',['First Entry','Second Entry']);

Markup

<select multiple>
	<option value="artichoke">Artichoke</option>
	<option value="beans" selected>Beans</option>
	<option value="broccoli">Broccoli</option>
	...
</select>

Example


Autocomplete v 1.0

Converts an input field into an autocomplete field using jQuery autocomplete

Options read more about inline data attributes

optiondefaultpossible valuesdescriptionsinceinfo
sourcenullarray, function defines the source. function must return an array1.0This field is required!
Check out jQuery autocomplete for all options

Methods

optiondefaultpossible valuesdescriptionsinceinfo
Check out jQuery autocomplete for all methods

Usage

$(selector).wl_Autocomplete([options]);

Markup

<input type="text" class="autocomplete">
<input type="text" class="autocomplete" data-source="[abc,def,ghi,jkl,mno,pqr,stu,vwx,yz]">
<input type="text" class="autocomplete" data-source="myAutocompleteFunction">

Example


the source is defined within the call $(selector).wl_Autocomplete({source:[...,...]});

inline data with data-source="[abc,def,ghi,jkl,mno,pqr,stu,vwx,yz]"

source is a user function with data-source="myAutocompleteFunction". Function must return an array

Valid v 1.0

Converts an input field ready for valid inputs

Options read more about inline data attributes

optiondefaultpossible valuesdescriptionsinceinfo
errorClass'error'string the CSS class for an error field1.0
instanttruetrue | false instant validation during typing. If false validation will triggert on blur1.0
regex/.*/regular Expression The used regular expression for validation1.0
minLength0integer minimum length before validation1.0
onChangefunction(){}function(value) callback if the value has changed. value is the current value1.0
onErrorfunction(){}function(value) callback if no valid value is entered. value is the current value1.0

Methods

Usage

$(selector).wl_Valid([options]);
$(selector).wl_Mail([options]); //shorthand for emails
$(selector).wl_URL([options]); //shorthand for urls

Markup

<input type="text" data-regex="[regex]">
<input type="email"> //for emails
<input type="url"> //for urls;

Example

Regular Expression: data-regex="^[a-zA-Z ]+$"
Regular Expression: data-regex="^[0-9 ]+$"

Instant is off for URLs. Use data-instant="true" for instant validation
An empty field is valid too! Use the 'required' property if input is mandatory

Password v 1.0

Converts an input field into a rich featured password field with strengthmeter and confirmation.

Options read more about inline data attributes

optiondefaultpossible valuesdescriptionsinceinfo
confirmtruetrue | false Shows a confirmation field1.0
showStrengthtruetrue | false Shows the strength of the password1.0
words['too short','bad','medium','good','very good','excellent']Array Words used in the strenght field. First is used if password is to short1.0
minLength3integer Defines the minimum length of a valid password. Use 0 to disable1.0
text[texts]object an object with all required texts1.0

Methods

Usage

$(selector).wl_Password([options]);

Markup

<input type="password">

Example


Color v 1.0

Converts an input field into a colorpicker using jQuery miniColors

mousewheel in combination with keys are not working in all browsers properly

Options read more about inline data attributes

optiondefaultpossible valuesdescriptionsinceinfo
mousewheeltruetrue | false use mousewheel feature1.0
onChangefunction(){}function(hsb, rgb) callback if the value has changed. hsb is an object and rgb is the color in hex value with leading '#'1.0

Methods

Usage

$(selector).wl_Color([options]);

Markup

<input type="text" class="color">

Example