Skip to content

chkorn/FilterList

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

FilterList

jQuery Plugin for search boxes to provide special actions. These actions are either shown when a regular expression matches, or always.

You should specify the actions from most specific to least specific to get the most relevant actions on top.

Requirements

Sample Usage

$('#search').filterlist({
	'actions':[{'test':null, 'title':'Search (default)', 'action':'TODO'},
				{'test':/^test/, 'title':'Checks for test at beginning', 'action':'TODO'}]
		});

Options

actions: [							// Actions to provide?
	{'test':[Regex or Null], 	
	'title':'Text to display',		// You use {0} to display the current search string.
	'help':'Help text',				// This setting is optional. If specified it is displayed instead of the test Regex. 
	'action':function(item, val)}	// Function to execute, the item parameter contains the list-item, 
									// the val parameter contains the input elements value
], 
delay: int, 						// Delay in milliseconds until the popup is shown.
help: bool,							// Display help at the end of the box? default: true 
strings: dict						// See "Localizable strings"
markfrist: bool						// Automatically mark the first item in list?

Localizable strings

List of localizable strings with default values...

'default_text':'Always available: ', 
'help':'Available shortcuts',
'default_action':''

About

Add filter buttons to a html input to speed up quick search tasks.

Resources

Stars

Watchers

Forks

Packages

No packages published