本文介绍了可过滤的多选组合框穿梭/传输小部件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

背景

我正在寻找一个基于 jQuery 或 JavaScript 的组合框穿梭小部件,它允许用户过滤源列表.源列表是一个组合框(左侧),目标列表是第二个组合框(右侧).

模型

小部件应该类似于:

现有的 jQuery - 没有过滤器

  • http://quasipartikel.at/multiselect/ - 不允许多选
  • http://blog.jeremymartin.name/2008/02/easy-multi-select-transfer-with-jquery.html - 无过滤器
  • http://davidwalsh.name/demo/multi-select.php- 使用 MooTools;无过滤器
  • http://devblog.jasonhuck.com/assets/comboselect/ - 否过滤器
  • http://www.dhtmlgoodies.com/index.html?whichScript=multiple_select - 无过滤器
  • http://blog.cbolson.com/扩展多选列表和搜索过滤器/ - MooTools
  • 这些几乎完美:

    我希望为 3000 到 5000 个项目批量分配类别,并认为这将是完成这样一项壮举的快速方法.(日本公司名称纯属虚构;实际上,这些名称通常有一个共同的词或短语.)

    问题

    什么是满足这些要求的免费开源小部件(jQuery 或纯 JavaScript)?

    相关

    相关链接:

    解决方案

    一个不错的 jquery/bootstrap 插件(多选,两个窗格,使用正则表达式过滤):

    Bootstrap Dual Listbox:http://www.virtuosoft.eu/code/bootstrap-duallistbox/

    Background

    I am looking for a jQuery- or JavaScript-based combobox shuttle widget that allows the user to filter the source list. The source list is a combobox (on the left) and the destination list is a second combobox (on the right).

    Mockup

    The widget should resemble:

    An existing jQuery widget:

    Usage

    The user can:

    1. Type a regex to filter the source list (e.g., Toy.*).
      • The widget hides all items that do not match the filter expression.
    2. Select one or more items in the source list (using click, control-click, and shift-click selections).
    3. Click the >> to transfer the items from the source list to the destination list.
    4. Clear the filter to reveal the full source list.

    Technical

    Ideally, the comboboxes would use a multiselect HTML combobox and the markup would be trivial:

    <select name="sourceList" id="sourceList" size="20" multiple="multiple">
      <option value="1">Toyota</option>
      <option value="2">Mitsubishi</option>
      <option value="3">Nintendo</option>
      <option value="4">Samsung</option>
      <option value="5">Bank of Kyoto</option>
    </select>
    
    <select name="destinationList" id="destinationList" size="20" multiple="multiple">
      <option value="6">Mazda</option>
      <option value="7">Fuji</option>
      <option value="8">Honda</option>
    </select>
    
    <script>
      $('#sourceList').shuttle();
    </script>
    

    Findings

    These are close:

    These are nearly perfect:

    I'm looking to batch up the assignment of categories for 3000 - 5000 items and thought this would be a quick way to accomplish such a feat. (The Japanese company names are purely fictional; in reality, the names will typically have a word or phrase in common.)

    Question

    What is a free and open source widget (jQuery or pure JavaScript) that meets these requirements?

    Related

    Related links:

    解决方案

    A nice jquery/bootstrap plugin (multiple select, two pane, filter with regex):

    Bootstrap Dual Listbox: http://www.virtuosoft.eu/code/bootstrap-duallistbox/

    这篇关于可过滤的多选组合框穿梭/传输小部件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

    09-05 01:28