网站建设赫伟创意星空科技,怎么注销建设银行网站用户名,湖南关键词优化首选,网站建设方式可行性分析2019独角兽企业重金招聘Python工程师标准 从后台获取参数#xff0c;一次填入ext#xff1a;grid网状表格#xff0c;发现表格内的数据不能复制粘贴#xff0c;只能read...#xff0c;火狐和IE 11都不能复制。 火狐解决方案 局部定义表格复制、粘贴的样式 从后台获取参数一次填入extgrid网状表格发现表格内的数据不能复制粘贴只能read...火狐和IE 11都不能复制。 火狐解决方案 局部定义表格复制、粘贴的样式 1.在jsp、html中的head/head中添加css样式 style typetext/css .x-selectable, .x-selectable * { -moz-user-select: text!important; -khtml-user-select: text!important; } /style 2.在grid中添加 gridnew Ext.grid.GridPanel({ viewConfig: { templates: { cell: new Ext.Template( td classx-grid3-col x-grid3-cell x-grid3-td-{id} x-selectable {css} style{style} tabIndex0 {cellAttr}, div classx-grid3-cell-inner x-grid3-col-{id} {attr}{value}/div, /td ) } }, ....}) 全局定义复制、粘贴的样式 1、在*.css文件中添加样式 .x-selectable, .x-selectable * { -moz-user-select: text!important; -khtml-user-select: text!important; } 2、新建一个js文件写入如下内容 if (!Ext.grid.GridView.prototype.templates) { Ext.grid.GridView.prototype.templates {};
}
Ext.grid.GridView.prototype.templates.cell new Ext.Template( td classx-grid3-col x-grid3-cell x-grid3-td-{id} x-selectable {css} style{style} tabIndex0 {cellAttr}, div classx-grid3-cell-inner x-grid3-col-{id} {attr}{value}/div, /td
); 3、在每一个需要复制粘贴的grid的中引入此js(注必须在ext-all.js后引入) IE解决方案 直接修改ext-all.js文件将下面一个地方的unselectableon值改为unselectable即可 {c.cellnew Ext.Template(td classx-grid3-col x-grid3-cell x-grid3-td-{id} {css} style{style} tabIndex0 {cellAttr},div classx-grid3-cell-inner x-grid3-col-{id} unselectable {attr}{value}/div,/td)}for(var a in c){var bc[a];if(bExt.isFunction(b.compile)!b.compiled){b.disableFormatstrue;b.compile()}}this.templa 下面样式不确定要不要加大家测试下本人忘记了 style typetext/css.x-grid3-cell-text-visible .x-grid3-cell-inner {overflow:visible;padding:3px 3px 3px 5px;white-space:normal;word-wrap: break-word; }
/style 转载于:https://my.oschina.net/luyaolove/blog/418113