BootStrap Table 重写API实现 可对列选择性的搜索
来源:互联网 发布:tourex b2b2c源码 编辑:程序博客网 时间:2024/04/30 02:11
下载地址:http://note.youdao.com/yws/public/redirect/share?id=a470bb9ede4466626edfea2946eb3553&type=false
在 bootStrap table .js修改了如下代码片段:
if (this.options.search) { html = []; html.push( '<div class="pull-' + this.options.searchAlign + ' search">', sprintf('<input class="form-control' + sprintf(' input-%s', this.options.iconSize) + '" type="text" placeholder="%s">', this.options.formatSearch()), '</div>'); this.$toolbar.append(html.join(''));/** *根据某列进行搜索 */var html_a=[];html_a.push(sprintf('<div class="search pull-right" style="margin-right:5px;"> ')+sprintf('<select id="sel_column" class="form-control"> '));$.each(this.columns, function (i, column) {if(column.searchable){html_a.push(sprintf(' <option value='+column.field+' >'+column.title+'</option> '));}});html_a.push(sprintf('</select>')+sprintf('</div>'));this.$toolbar.append(html_a.join(''));$('#sel_column').change(function ( event){var text_t=$('.search input').val();that.searchText =text_t;that.scolumnText=$('#sel_column').val();that.options.searchText = text_t;that.options.pageNumber = 1;that.initSearch();that.updatePagination();that.trigger('search', text_t);}); $search = this.$toolbar.find('.search input'); $search.off('keyup drop').on('keyup drop', function (event) { if (that.options.searchOnEnterKey) { if (event.keyCode !== 13) { return; } } clearTimeout(timeoutId); // doesn't matter if it's 0 timeoutId = setTimeout(function () { that.onSearch(event); }, that.options.searchTimeOut); }); if (isIEBrowser()) { $search.off('mouseup').on('mouseup', function (event) { clearTimeout(timeoutId); // doesn't matter if it's 0 timeoutId = setTimeout(function () { that.onSearch(event); }, that.options.searchTimeOut); }); } } };
0 0
- BootStrap Table 重写API实现 可对列选择性的搜索
- bootstrap table的实现
- 在asp.net中实现可拖动列的table
- bootstrap-table 实现单击单元格可编辑
- bootstrap table实现从后台搜索
- bootstrap-table 点击列头进行排序,搜索
- bootstrap table列属性的设置
- bootstrap table列属性的设置
- bootstrap table对每列数据进行统计汇总
- bootstrap-table的使用与条件搜索
- bootstrap Table options [API]
- Choose Statements--这个命令可对报表的每行进行选择性编辑
- bootstrap-table自定义复选框列的样式
- 关于bootstrap中table的表格固定列
- Bootstrap-table 表格计算列的和----总计
- BootStrap table 传递搜索参数
- bootstrap中table的行拖拽实现
- Bootstrap table右键功能的实现
- 2016-07-07 dojo.Deferred函数测试
- C++ explicit关键字
- 使用CollectionUtils.isNotEmpty() 判断 List Set 是否为null
- STM32F103 GU906B模块GPRS、短信收发、拨号等功能的实现
- 剑指Offer:面试题21——包含min函数的栈(java实现)
- BootStrap Table 重写API实现 可对列选择性的搜索
- Java集合类解析
- RecylerView基本使用
- js location使用范例
- Java redis demo List<User>
- 查询本次以及上次记录同时显示
- fragment使用心得
- C# Access 里如何判断字符串里是不是包含数字
- WSDL详解