?? iconlist.js
字號:
Class("linb.UI.IconList", "linb.UI.List",{
Instance:{
getStatus:function(id){
var item=this.get(0).getItemByItemId(id);
return (item && item._status)||'ini';
}
},
Initialize:function(){
//modify default template fro shell
var t = this.getTemplate();
t.$dynamic={
items:{
ITEM:{
className:'{itemClass}',
style:'padding:{itemPadding}px;margin:{itemMargin}px;{itemStyle}',
//for firefox2 image in -moz-inline-box cant change height bug
IBWRAP:{
tagName:'div',
IMAGE:{
tagName:'img',
src:'{image}',
width:'{itemWidth}',
height:'{itemHeight}'
}
}
}
}
};
this.setTemplate(t);
},
Static:{
Appearances:{
KEY:{
overflow:'auto',
'overflow-x': (linb.browser.ie || linb.browser.gek)?'hidden':''
},
ITEMS:{
overflow:'auto',
'overflow-x': (linb.browser.ie || linb.browser.gek)?'hidden':'',
position:'relative',
'line-height':'14px',
zoom:linb.browser.ie6?1:null,
background: 'url('+linb.ini.file_bg+') no-repeat left top'
},
ITEM:{
display:linb.$inlineBlock,
zoom:linb.browser.ie6?1:null,
position:'relative',
overflow:'hidden',
cursor:'pointer',
'vertical-align':'top'
},
IMAGE:{
border:'1px solid #CDCDCD'
}
},
Behaviors:{
IMAGE:{
onLoad:function(profile,e,src){
var item=profile.getItemByDom(src);
item._status='loaded';
},
onError:function(profile,e,src){
var item=profile.getItemByDom(src);
item._status='error';
}
}
},
DataModel:({
itemMargin:{
ini:6,
action:function(v){
if(typeof v!='object')
this.getSubNode('ITEM',true).css('margin',(''+parseFloat(v))==(''+v)?v+'px':v);
else
this.getSubNode('ITEM',true).css(v);
}
},
itemPadding:{
ini:2,
action:function(v){
if(typeof v!='object')
this.getSubNode('ITEM',true).css('padding',(''+parseFloat(v))==(''+v)?v+'px':v);
else
this.getSubNode('ITEM',true).css(v);
}
},
itemWidth:{
ini:16,
action:function(v){
this.getSubNode('IMAGE',true).width(v);
}
},
itemHeight:{
ini:16,
action:function(v){
this.getSubNode('IMAGE',true).height(v);
}
},
tabindex:{
action:function(value){
if(this.domNode)
this.getSubNode('ITEM',true).attr('tabIndex',value);
}
},
width:200,
height:200
}),
_prepareItem:function(profile, item){
var p = profile.properties;
_.arr.each(_.toArr('itemWidth,itemHeight,itemPadding,itemMargin'),function(i){
item[i] = item[i] || p[i];
});
item._tabindex = p.tabindex;
},
_onresize:function(){}
}
});
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -