Giter VIP home page Giter VIP logo

b-finder's Introduction

	b-finder, javascript/jquery selector for tree structured data
	Working example: http://silkleo.ru/fun/b-finder/


	Goods:
	— Compatible with jQuery;
	— Simple to use;
	— User defined handlers support.


	Requirements:

	— HTML;
	— CSS;
	— JavaScript;
	— jQuery 1.6+.


	Code example:

	<code>
		$('.b-finder').finder(
			'id_dqd',
			{
				load : function(ext) {
					// your code that loads a data tree array from ajax or other source
					// (see array description below)
					return yourDataList;
				},
				click : function(event, int, ext) {
					// your additional code for single click
				},
				dblclick : function(event, call, int, ext) {
					// your code for double click with ajax requests and other actions
				}
			},
			{
				// your params
			}
		);
	</code>



	.finder() method params

	 param    | description
	============================================================
	 id       | Number or string ID for current Finder instance
	------------------------------------------------------------
	 handlers | Five user handlers: .load, .show, .hide, .click
	          | and .dblclick. .load and .dblclick are required
	------------------------------------------------------------
	 params   | Object with user params (ids, urls, etc)
	============================================================



	The list of arguments inside .load() handler

	 #  | value
	=======================================================================
	 1. | An object given in params attribute for .finder() method
	-----------------------------------------------------------------------
	 2. | An object which exists only if finder_async param is true.
	    | Contains Finder own functions with the following keys:
	    |
	    | — done — shows finder after data for it is loaded, gets loaded
	    |          data array as an attribute
	=======================================================================


	The list of arguments inside .show() handler

	 #  | value
	=======================================================================
	 1. | An object given in params attribute for .finder() method
	=======================================================================


	The list of arguments inside .hide() handler

	 #  | value
	=======================================================================
	 1. | An object given in params attribute for .finder() method
	=======================================================================


	The list of arguments inside .click() handler

	 #  | value
	=======================================================================
	 1. | Event object
	-----------------------------------------------------------------------
	 2. | Data object from Finder with the following keys:
	    |
	    | — id         — clicked row id
	    | — pid        — row parend id
	    | — name       — row name
	    | — next       — next column number (to put content there)
	    | — expandable — is row expandable or not
	-----------------------------------------------------------------------
	 3. | An object given in params attribute for .finder() method
	=======================================================================


	The list of arguments inside .dblclick() handler

	 #  | value
	=======================================================================
	 1. | Event object
	-----------------------------------------------------------------------
	 2. | Data object from Finder with the following keys:
	    |
	    | — id         — clicked row id
	    | — pid        — row parend id
	    | — name       — row name
	    | — next       — next column number (to put content there)
	    | — action     — has two values: approve and cancel
	    | — expandable — is row expandable or not
	-----------------------------------------------------------------------
	 3. | An object given in params attribute for .finder() method
	-----------------------------------------------------------------------
	 4. | An object contains Finder own functions with the following keys:
	    |
	    | — hide   — closes Finder
	    | — done   — for successful transaction ending
	    | — undone — for unsuccessful transaction ending
	=======================================================================



	Own Finder settings in params object for .finder() method

	 param           | value
	=======================================================================
	 finder_async    | True if you want to work with async data loading
	                 | (from ajax)
	-----------------------------------------------------------------------
	 finder_holder   | True if you don`t need additional column at the end
	-----------------------------------------------------------------------
	 finder_static   | True if you want a static displaying of finder
	                 | (inside of another block)
	-----------------------------------------------------------------------
	 finder_multiple | True if you want multiselect to be on
	-----------------------------------------------------------------------
	 finder_cols     | Number of columns per «page» from 2 to 4
	-----------------------------------------------------------------------
	 finder_selected | An array of row ids that should be selected for the
	                 | first Finder opening
	-----------------------------------------------------------------------
	 finder_lang     | An object contains texts for Finder`s design
	                 | elements with the following keys:
	                 |
	                 | — hat      — Finder`s title at the top
	                 | — hint     — hint for users at the bottom
	                 | — search   — placeholder for search field
	                 | — selected — title for selection filter button
	=======================================================================

b-finder's People

Contributors

shushik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

klimslim

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.