handsontable-chosen-editor
2015-10-20 13:54
483 查看
https://github.com/mydea/handsontable-chosen-editor
handsontable-chosen-editor是handsontable column的扩展,实现了在handsontable编辑列中下拉列表,同时支持的多选。
使用后发现,屏幕底部的行中,下拉项无法显示,因为下拉项定义的是向下展开,即使下拉项的位置超出了屏幕底部。
修改方法:
chosen.css中添加
.chosen-container.chosen-with-drop-top .chosen-drop {
left: 0;
top:-220px;
}
chosen.jquery.js中的results_show中
把原来的
this.container.addClass("chosen-with-drop");
改为
var totalheight = $(window).height();
var thistop = $($.find('div.handsontableInputHolder')[0]).offset().top;
if ((parseInt(totalheight) - parseInt(thistop)) < 200)
{
this.container.addClass("chosen-with-drop-top");
}
else
{
this.container.addClass("chosen-with-drop");
}
在results_hide函数中添加
this.container.removeClass("chosen-with-drop-top");
这样,当底部空间不足时,下拉列表将向上展开。
handsontable-chosen-editor是handsontable column的扩展,实现了在handsontable编辑列中下拉列表,同时支持的多选。
使用后发现,屏幕底部的行中,下拉项无法显示,因为下拉项定义的是向下展开,即使下拉项的位置超出了屏幕底部。
修改方法:
chosen.css中添加
.chosen-container.chosen-with-drop-top .chosen-drop {
left: 0;
top:-220px;
}
chosen.jquery.js中的results_show中
把原来的
this.container.addClass("chosen-with-drop");
改为
var totalheight = $(window).height();
var thistop = $($.find('div.handsontableInputHolder')[0]).offset().top;
if ((parseInt(totalheight) - parseInt(thistop)) < 200)
{
this.container.addClass("chosen-with-drop-top");
}
else
{
this.container.addClass("chosen-with-drop");
}
在results_hide函数中添加
this.container.removeClass("chosen-with-drop-top");
这样,当底部空间不足时,下拉列表将向上展开。
相关文章推荐
- JS日期时间类型(Y-m-d H:i:s)与时间戳互转
- Request的getParameter和getAttribute方法的区别
- 如何修改MFC的图标
- MDK Executing a function or an interrupt handler in RAM
- Window窗口布局 --- DecorView浅析
- 你应该知道的 RPC 原理
- 网址
- 接口类与抽象类的区别
- nmon的使用
- zookeeper原理(转)
- 简单的分析网易热这款产品
- Exchange 2013如何自建管理员角色
- 在ListView下面添加一个相对布局的小Dome-布局优化
- Hibernate 缓存机制
- 主线程在所有子线程结束后 在继续执行
- Toolbar中menu菜单文字颜色的修改
- 将已有的Android从Eclipse手动迁移到Android Studio(不用gradle)
- iossharesdk微信登录出错
- IIS日志存入数据库之一:ODBC
- Java中的静态变量,常量和方法