行一恒  
上一页 1 ··· 7 8 9 10 11 12 下一页

2013年9月9日

摘要: 用了Extjs 这么久,还未用到图标图形,没有图表的软件总是不完整,今天随便看了下书,就记录一下几个常用的ext chart常规配置作用:1.theme:'Category1' //配置图表主题 legend:{ position:'right' //配置图例显示的位置 }axes:[...] //配置坐标轴的位置series:[...] //配置图表序列数值轴:(Ext.chart.axis.Numeric)时间轴:(Ext.chart.axis.Time)分类轴:(Ext.chart.axis.Category)仪表轴:(Ext.chart.axis.Gau 阅读全文
posted @ 2013-09-09 09:25 行一恒 阅读(1318) 评论(0) 推荐(0)

2013年9月5日

摘要: 对于window对象,这个对象确实很复杂。对于每个页面都会有个window对象,对于开取子页面时,更要注意此时的window对象的指代。当一个页面open()一个子页面时,parent.window对象指的是父级的window对象,如果在父级对象存储了方法:父级: window["add"]=function(x){...} (注册一个函数,存取在window对象内)在子级页面调用父级页面的add方法子级调用: parent.window["add"].call(this,x);(x为传入参数)这类似于jsonp的形式!希望对其理解window对象有帮助 阅读全文
posted @ 2013-09-05 15:14 行一恒 阅读(156) 评论(0) 推荐(0)

2013年9月4日

摘要: extjs checkbox全选问题,有一个很让人头疼的地方:就是使用它的handler,只要给checkbox 调用setValue()的话,就会触发handler的句柄函数,这不是我们想要的。这会导致单独点击view中某一项,回全选按钮一样的操作 。所以只能注册 它的"click"事件此时,this的指代也不同。所以不得不花力气找它:var isAllchecked=toolbar.getComponent("allCheck").getValue();其次:extjs checkbox并不是我们想象的checkbox组合而成的,而是一个button 阅读全文
posted @ 2013-09-04 12:25 行一恒 阅读(1609) 评论(0) 推荐(0)

2013年9月3日

摘要: 今天早上,想在自定义组件中展示数据的个数,用了n久,data.Store 的getCount方法,总是返回为0,但是用console.log()该store,却有数据,如此让人抓狂!后来终于明白了,因为在在自定义组件构造函数中,此时store并没有加载完,故无法此时操作store,而console.log()方法执行于渲染之后,原来是执行周期搞了鬼!才导致被欺骗,真是浪费时间。不过我们可以这样操作store: me.store.load({ callback:function(records,opeartion,success){ if(success){ me.buttombar.getC. 阅读全文
posted @ 2013-09-03 13:45 行一恒 阅读(244) 评论(0) 推荐(0)

2013年9月2日

摘要: 项目要求完成一个特定功能,即toolbar在封装的组件配置中已存,然后还支持外部自定义配置:在外部的表现形式:,items:{ xtype: 'templatemultiview' , store: me.productStore , id: 'productTemplate' , listeners: { itemselected: function (s, item) { me.basket.addItem(item); } } ,tbarconfig:[ { text:"创建报价单" ,iconCls:"icon_create 阅读全文
posted @ 2013-09-02 18:29 行一恒 阅读(847) 评论(0) 推荐(0)

2013年8月31日

摘要: var nodes=treestore.getRootNode().childNodes; function addFirstCls(nodes){ if(nodes.length){ Ext.Array.forEach(nodes,function(item,index,array){ if(!item.isLeaf()){ addFirstCls(item.childNodes,"approve"); }else{ if(item.data["ApproveState"]=="Y"){ console.log(item); } } 阅读全文
posted @ 2013-08-31 12:23 行一恒 阅读(411) 评论(0) 推荐(0)

2013年8月30日

摘要: makeTreeData:function(root){ var me=this,recordName=this.record,data=[],node,length,i ; function getTree(records,id){ var c=[]; Ext.Array.forEach(records,function(item,index,array){ if(item["ParentId"]==id){ item[me.root]=getTree(records,item["TemplateId"]); c.push(item); } }); r 阅读全文
posted @ 2013-08-30 14:50 行一恒 阅读(209) 评论(0) 推荐(0)

2013年8月29日

摘要: 1.写extjs plugin插件关键是知道它的的父块是谁,在插件里this.cmp就能获取载入的父级容器2.插件init()是继承于observable ,这个方法必不可少,执行于initComponent()之后,可以在此处注册父级容器的事件句柄以达到关联的作用。木想到插件还是挺容易写的.Ext.define("Ext.ux.ContextMenu",{ extend:"Ext.AbstractPlugin" ,alias:"plugin.contextMenu" ,mixins:["Ext.util.Observabl 阅读全文
posted @ 2013-08-29 14:57 行一恒 阅读(210) 评论(0) 推荐(0)

2013年8月27日

摘要: 之前学习extjs Xtmeplate受一些书籍的误导,说Xtemplate不支持else ,今天仔细看了官网的示例,才恍然大悟,卧槽!不仅支持if-elseif-else结构 连switch都能够支持,不能不说Xtemplate越来越强大,导致之前写的Xtemplate太过于臃肿,不得不重新修改!var tpl =new Ext.XTemplate('Name: {name}','Kids: ','','{name} is a ','','teenager','','kid 阅读全文
posted @ 2013-08-27 12:15 行一恒 阅读(336) 评论(0) 推荐(0)

2013年8月20日

摘要: function changePlace(store,index,record,indicate){ var keys=store.data.keys; var items=store.data.items; var tempKey; if(indicate=="up"){ if(index>0){ items[index]=items[index-1]; items[index-1]=record; tempKey=keys[index]; keys[index]=keys[index-1]; keys[index-1]=tempKey; console.log(r 阅读全文
posted @ 2013-08-20 15:35 行一恒 阅读(350) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11 12 下一页