extjs的一些问题
1 下载的皮肤中有个silverCherry(银樱桃),使用后有些问题,见下图http://fourfire.iteye.com/upload/picture/pic/32403/a0fe7773-0dd7-3901-b938-39aad7bfa12d.jpg
解决方法:
修改xtheme-silverCherry.css中的573行为
.x-menu a.x-menu-item{display:block;line-height:16px;padding:3px 21px 3px 27px;white-space:nowrap;text-decoration:none;color:#222;-moz-outline:0 none;outline:0 none;cursor:pointer;}
即可
2 htmleditor控件使用时,会出现第一次打开正常,第二次打开时,焦点不能获取的问题。
解决方法:
在第一次关闭时,将焦点移动到一个非htmleditor的控件上。
如:
{
text : '取消',
handler : function() {
noticeForm.find("name",'title').focus();
win.destroy();
}
}
3 gridpanel中的日期格式化显示问题
方法1:http://fourfire.iteye.com/blog/357388
方法2:方法1中的日期为空时会出现问题,也可以采用以下renderer的方法,日期字段在render中不用像方法1中说明
renderer :function(v){if(v!=null)return new Date(v.time).format('Y-m-d H:i:s');return '';}
4 树形控件treepanel不能加载节点
有一个原因是后台json结构中不能包含nodeType属性名,tree代码里用到了该名称。
5 radiogroup 放在form中
load后控件值不能随之改变,是个bug。3.1还存在!郁闷
增加以下代码,覆盖原代码
Ext.override(Ext.form.RadioGroup, {getName: function(){return this.items.first().name;},getValue: function(){var v;if (this.rendered) {this.items.each(function(item){if (!item.getValue()) return true;v = item.getRawValue();return false;});}else {for (var k in this.items) {if (this.items.checked) {v = this.items.inputValue;break;}}}return v;},setValue: function(v){if (this.rendered) this.items.each(function(item){item.setValue(item.getRawValue() == v);});else {for (var k in this.items) {this.items.checked = this.items.inputValue == v;}}}});
页:
[1]