extjs的一些問題

1 下載的皮膚中有個silverCherry(銀櫻桃),使用後有些問題,見下圖
[img]http://fourfire.iteye.com/upload/picture/pic/32403/a0fe7773-0dd7-3901-b938-39aad7bfa12d.jpg[/img]
解決方法:
修改xtheme-silverCherry.css中的573行爲
.x-menu a.x-menu-item{display:block;line-height:16px;padding:3px 21px 3px [color=red]27[/color]px;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')[0].focus();
win.destroy();
}
}
3 gridpanel中的日期格式化顯示問題
方法1:[url]http://fourfire.iteye.com/blog/357388[/url]
方法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[k].checked) {
v = this.items[k].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[k].checked = this.items[k].inputValue == v;
}
}
}
});
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章