GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - rabihkodeih/bootstrap-transfer: This is a two-column transfer multi-select widget inspired by Django admin module's similar widget.

BranchesTags
Open more actions menu

Latest commit

 

History

11 Commits
11 Commits

Folders and files

NameName
Last commit message
Last commit date
css
css
 
 
img
img
 
 
js
js
 
 
screenshots
screenshots
 
 
README.md
README.md
 
 
index.html
index.html
 
 
license.txt
license.txt
 
 

Repository files navigation

bootstrapTransfer

Welcome to bootstrapTransfer. This is a two-column transfer multi-select widget. It is inspired by Django admin module's similar widget. The look and feel is designed to blend with twitter bootstrap (2.0+), jQuery 1.7+ is assumed.

Usage :

First, in your html create a div and give it some id:

<div id="test"></div>

It is possible to set a width value whose bootstrapTransfer will use for the generated widget:

<div id="test" style="width:500px;"></div>

Also you can add some bootstrap classes such as 'input-xlarge' in forms:

<div id="test" class="input-xlarge"></div>

Now call bootstrapTransfer on the corresponding jquery object and add some values:

$(function() {
    ...
    var t = $('#test').bootstrapTransfer();
    t.populate([
        {value:"1", content:"Apple"},
        {value:"2", content:"Orange"},
        {value:"3", content:"Banana"},
        {value:"4", content:"Peach"},
        {value:"5", content:"Grapes"}
    ]);
    ...
});

You can get the selected values any time:

console.log(t.get_values());

Setting new values is straightforward:

t.set_values(["2", "4"]);

Alternatively, you can access the plugin object directly from the selector:

$('#test').data().bootstrapTransfer.get_values()
$('#test').data().bootstrapTransfer.set_values(["2", "4"])

Note that the order of the items at population time is allways preserved in both get_values and set_values.

Options are:

target_id : the id of the internal select element, useful for wiring events and such
height : the height of the select columns, default value is '10em'
hilite_selection: if true will hilite the moved items between the columns, default value is true

Example:

$('#test').bootstrapTransfer(
    {'target_id': 'multi-select-input'
     'height': '15em',
     'hilite_selection': false});

I hope you find this widget useful.

About

This is a two-column transfer multi-select widget inspired by Django admin module's similar widget.

Resources

Readme
License
Activity

Stars

43 stars

Watchers

4 watching

Forks

45 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.