xi/selector-bundle

There is no license information available for the latest version (dev-master) of this package.

A handy selector UI compoment to use with a Symfony 2 project

Installs: 453

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 2

Open Issues: 0

Language:CoffeeScript

Type:symfony-bundle

dev-master 2013-04-17 07:56 UTC

This package is not auto-updated.

Last update: 2024-11-09 14:23:06 UTC


README

Selector bundle provides a handy selector UI compoment to use with a Symfony 2 project.

Dependencies

xi-bundle-tag

Installing

deps -file

[XiSelectorBundle]
    git=http://github.com/xi-project/xi-bundle-selector.git
    target=/bundles/Xi/Bundle/SelectorBundle

autoload.php file

<?php
'Xi\\Bundle'       => __DIR__.'/../vendor/bundles',
?>

appKernel.php -file

<?php
            new Xi\Bundle\SelectorBundle\XiSelectorBundle(),
 ?>

Usage:

You need to initialize selector in your main script file.

    options = {
        mainElement:            '.tag_item_selector',
        autoCompleteElement:    '.item_field', 
        containerElement:       '.items ul', 
        source:                 'URL TO SEARCH ACTION',     
        saveUrl:                'URL TO ADD ACTION',    
        selected:               selected,
        canAddNew:              true        # CAN YOU ADD NEW ITEM, OR JUST SELECT WHAT YOU HAVE SEARCHED.
        minLength:              3           # MIN TEXT LENGTH BEFORE SEARCH KICKS IN
    }
    yourSelector = new App.Selector(options)