- 浏览: 452912 次
- 性别:
- 来自: 广州
-
文章分类
最新评论
-
ubuntu的疯狂:
推荐一份完整的教程:http://blog.ddlisting ...
Emberjs学习 -
ptz19:
请问,如果把合并前的文件,不要dest 目标目录来。如: js ...
gulp下静态资源的合并、压缩、MD5后缀 -
zhouzq1008:
楼主,还有个问题,<a href="" ...
gulp下静态资源的合并、压缩、MD5后缀 -
zhouzq1008:
感谢楼主,用到了您的代码, 但现在好像有改动 否则会报错:修改 ...
gulp下静态资源的合并、压缩、MD5后缀 -
denverj:
感谢分享~
Emberjs学习
改造自MultiselectItemSelector(http://extjs.com/learn/Extension:Multiselect)。
原有代码在关闭该控件以后,会遗留大量无效代码,因此,自己用一个 panel + 2个grid来实现,暂不支持拖拽。
Ext.namespace('Ext.ux') Ext.ux.IconPanel = function(config){ Ext.apply(this,config); Ext.ux.IconPanel.superclass.constructor.call(this,config); } Ext.extend(Ext.ux.IconPanel,Ext.Panel,{ imagePath:'', drawUpIcon:true, drawDownIcon:true, drawLeftIcon:true, drawRightIcon:true, drawTopIcon:true, drawBotIcon:true, //style: 'padding-left:5px;padding-right:5px', initComponent: function(){ Ext.ux.IconPanel.superclass.initComponent.call(this); this.addEvents( '' ) }, onRender: function(ct, position){ Ext.ux.IconPanel.superclass.onRender.call(this,ct,position); if (this.imagePath!="" && this.imagePath.charAt(this.imagePath.length-1)!="/") this.imagePath+="/"; this.iconUp = this.imagePath + (this.iconUp || 'up2.gif'); this.iconDown = this.imagePath + (this.iconDown || 'down2.gif'); this.iconLeft = this.imagePath + (this.iconLeft || 'left2.gif'); this.iconRight = this.imagePath + (this.iconRight || 'right2.gif'); this.iconTop = this.imagePath + (this.iconTop || 'top2.gif'); this.iconBottom = this.imagePath + (this.iconBottom || 'bottom2.gif'); var el= this.getEl(); if (!this.toSortField) { this.toTopIcon = el.createChild({tag:'img', src:this.iconTop, style:{cursor:'pointer', margin:'2px'}}); el.createChild({tag: 'br'}); this.upIcon = el.createChild({tag:'img', src:this.iconUp, style:{cursor:'pointer', margin:'2px'}}); el.createChild({tag: 'br'}); } this.addIcon = el.createChild({tag:'img', src:this.switchToFrom?this.iconLeft:this.iconRight, style:{cursor:'pointer', margin:'2px'}}); el.createChild({tag: 'br'}); this.removeIcon = el.createChild({tag:'img', src:this.switchToFrom?this.iconRight:this.iconLeft, style:{cursor:'pointer', margin:'2px'}}); el.createChild({tag: 'br'}); if (!this.toSortField) { this.downIcon = el.createChild({tag:'img', src:this.iconDown, style:{cursor:'pointer', margin:'2px'}}); el.createChild({tag: 'br'}); this.toBottomIcon = el.createChild({tag:'img', src:this.iconBottom, style:{cursor:'pointer', margin:'2px'}}); } if (!this.readOnly) { if (!this.toSortField) { this.toTopIcon.on('click', this.toTop, this); this.upIcon.on('click', this.up, this); this.downIcon.on('click', this.down, this); this.toBottomIcon.on('click', this.toBottom, this); } this.addIcon.on('click', this.fromTo, this); this.removeIcon.on('click', this.toFrom, this); } if (!this.drawUpIcon || this.hideNavIcons) { this.upIcon.dom.style.display='none'; } if (!this.drawDownIcon || this.hideNavIcons) { this.downIcon.dom.style.display='none'; } if (!this.drawLeftIcon || this.hideNavIcons) { this.addIcon.dom.style.display='none'; } if (!this.drawRightIcon || this.hideNavIcons) { this.removeIcon.dom.style.display='none'; } if (!this.drawTopIcon || this.hideNavIcons) { this.toTopIcon.dom.style.display='none'; } if (!this.drawBotIcon || this.hideNavIcons) { this.toBottomIcon.dom.style.display='none'; } }, toTop:function(){ this.gridsHolder.fireEvent('toTop'); }, toBottom: function(){ this.gridsHolder.fireEvent('toBottom'); }, up: function(){ this.gridsHolder.fireEvent('up'); }, down: function(){ this.gridsHolder.fireEvent('down'); }, fromTo: function(){ this.gridsHolder.fireEvent('fromTo'); }, toFrom: function(){ this.gridsHolder.fireEvent('toFrom'); }, setGridsHoder: function(gridsHolder){ this.gridsHolder = gridsHolder; } }); Ext.ux.MultiSelectWin = function(config){ Ext.apply(this,config); Ext.ux.MultiSelectWin.superclass.constructor.call(this, config); this.init(); }; Ext.extend(Ext.ux.MultiSelectWin, Ext.util.Observable,{ title : '选择窗口', from_legend:'可选', to_legend: '已选', valueField: 'id', displayField: 'name', warningTitle: '提示', minLength:0, maxLength:Number.MAX_VALUE, minLengthText:'至少应选择{0}项', maxLengthText:'最多只能选择 {0}项', /** * 图标面板的config * @type {} */ iconConfig:{}, targetItem: null, localData:[], selectedData: [], saveFn: Ext.emptyFn, searchFn: Ext.emptyFn, baseParams: null, fieldName: null, toSortField:null, fromSortField:null, toSortDir:'ASC', fromSortDir:'ASC', allowDup: false, switchToFrom:false, openHeight:320, openWidth:460, ms_height:220, ms_width:200, init: function(){ this.initDataStore(); this.initComponent(); }, initDataStore: function(){ var record = Ext.data.Record.create([ { name: this.valueField, type: 'string' },{ name: this.displayField, type: 'string' }]); if (this.localMode == true){ this.fromStore = new Ext.data.SimpleStore({ fields:[this.valueField, this.displayField] }); } else{ var baseParams = { dir : 'asc', start : 0, limit : 0 }; if (this.baseParams) baseParams = this.baseParams; this.fromStore = new Ext.data.Store({ proxy: new Ext.data.DWRProxy(this.searchFn, true), reader: new Ext.data.ListRangeReader({ totalProperty : 'total', id : 'id' },record), sortInfo:{field:this.displayField,direction:'ASC'}, baseParams : baseParams }); } this.selectedData = this.targetItem.getArrayValue(); this.toStore = new Ext.data.SimpleStore({ fields:[this.valueField, this.displayField], data: this.selectedData }); if(this.allowDup == false){ this.fromStore.on('load',function(){ this.fromStore.filterBy(function(record){ for (var i=0;i < this.selectedData.length;i++){ if(this.selectedData[i][0] == record.get(this.valueField)) return false; } return true; },this); },this); } if(this.localMode == true) this.fromStore.loadData(this.localData); else this.fromStore.load(); }, reComputeWH: function(){ this.openHeight = this.openHeight; this.openWidth = this.openWidth; this.ms_height = this.openHeight - 100; this.ms_width = (this.openWidth-60)/2; }, createIconsPanel: function(){ this.iconsPanel = new Ext.ux.IconPanel(this.iconConfig); this.iconsPanel.setGridsHoder(this); }, initComponent: function(){ if(this.openHeight || this.openWidth){ this.reComputeWH(); } this.addEvents( /** * @event */ 'destroy', /** * @event */ 'toTop', /** * @event */ 'toBottom', /** * @event */ 'up', /** * @event */ 'down', /** * @event */ 'fromTo', /** * @event */ 'toFrom'); this.on('destroy', this.onDestroy, this); this.on('up', this.onUp, this); this.on('down', this.onDown, this); this.on('toTop', this.onToTop, this); this.on('toBottom', this.onToBottom, this); this.on('fromTo', this.onFromTo, this); this.on('toFrom', this.onToFrom, this); this.fromGrid = new Ext.grid.GridPanel({ title : '可选', hideHeaders:true, width : this.ms_width, height: this.ms_height, autoExpandColumn:'name', layout : 'fit', sm : new Ext.grid.RowSelectionModel(), ds : this.fromStore, cm : new Ext.grid.ColumnModel([{ header : "header", sortable : true, dataIndex : this.displayField }]), viewConfig:{forceFit:true} }) this.fromGrid.on('rowdblclick', this.onFromGriddblclick, this); this.toGrid = new Ext.grid.GridPanel({ title : '已选', hideHeaders:true, width : this.ms_width, height: this.ms_height, autoExpandColumn:'name', layout : 'fit', sm : new Ext.grid.RowSelectionModel(), ds : this.toStore, cm : new Ext.grid.ColumnModel([{ header : "header", sortable : true, dataIndex : this.displayField }]), viewConfig:{forceFit:true} }) this.toGrid.on('rowdblclick', this.onToGriddblclick, this); this.createIconsPanel(); this.parentPanel = new Ext.Panel({ layout:"table", layoutConfig:{columns:3}, items: [this.fromGrid,this.iconsPanel,this.toGrid], frame: true }); this.selectorWin = new Ext.Window({ frame: true, resizable:false, title : this.title, layout:'fit', modal: true, items : [this.parentPanel], width: this.openWidth, height: this.openHeight, buttonAlign:'center', buttons:[{ text: '确定', handler: function(){ var records = this.toStore.getRange(); if(this.validateValue(records) == false) return; var values = []; var selectedValue = ''; var selectedText = ''; for (var i=0; i < records.length; i++){ var temp = []; var v = records[i].get(this.valueField); var t = records[i].get(this.displayField); temp.push(v); temp.push(t); values.push(temp); if(selectedValue == ''){ selectedValue = v; selectedText = t; } else{ selectedValue = selectedValue + ',' + v; selectedText = selectedText + ',' + t; } } this.targetItem.setValue(values); var formValues = queryPanel.getFormValues(); Ext.apply(formValues,this.baseParams); formValues.selectedValue = selectedValue; formValues.selectedText = selectedText; var fn = this.saveFn.createSequence(function(returnData){}); fn(formValues); this.selectorWin.close(); }, scope:this },{ text:'取消', handler: function(){ this.selectorWin.close(); }, scope: this }] }) this.selectorWin.show(); }, validateValue : function(value){ if (value.length < this.minLength) { Ext.Msg.show({ title: this.warningTitle, msg: String.format(this.minLengthText, this.minLength), buttons: Ext.Msg.OK, icon: Ext.MessageBox.INFO }); return false; } if (value.length > this.maxLength) { Ext.Msg.show({ title: this.warningTitle, msg: String.format(this.maxLengthText, this.maxLength), buttons: Ext.Msg.OK, icon: Ext.MessageBox.INFO }); return false; } return true; }, onFromGriddblclick: function(){ this.fireEvent('fromTo'); }, onToGriddblclick: function(){ this.fireEvent('toFrom'); }, onUp:function(){ var store = this.toStore; var sm = this.toGrid.getSelectionModel(); var data = sm.getSelections(); var selectionsArray = []; for (var i=0; i < data.length; i++){ selectionsArray.push(store.indexOf(data[i])); } var record = null; selectionsArray.sort(); var newSelectionsArray = []; if (selectionsArray.length > 0) { for (var i=0; i<selectionsArray.length; i++) { record = store.getAt(selectionsArray[i]); if ((selectionsArray[i] - 1) >= 0) { store.remove(record); store.insert(selectionsArray[i] - 1, record); newSelectionsArray.push(selectionsArray[i] - 1); } } this.toGrid.getView().refresh(); sm.selectRows(newSelectionsArray); } }, onDown: function(){ var store = this.toStore; var sm = this.toGrid.getSelectionModel(); var data = sm.getSelections(); var selectionsArray = []; for (var i=0; i < data.length; i++){ selectionsArray.push(store.indexOf(data[i])); } var record = null; selectionsArray.sort(); selectionsArray.reverse(); var newSelectionsArray = []; if (selectionsArray.length > 0) { for (var i=0; i<selectionsArray.length; i++) { record = store.getAt(selectionsArray[i]); if ((selectionsArray[i] + 1) < store.getCount()) { store.remove(record); store.insert(selectionsArray[i] + 1, record); newSelectionsArray.push(selectionsArray[i] + 1); } } this.toGrid.getView().refresh(); sm.selectRows(newSelectionsArray); } }, onToTop: function(){ var store = this.toStore; var sm = this.toGrid.getSelectionModel(); var data = sm.getSelections(); var selectionsArray = []; for (var i=0; i < data.length; i++){ selectionsArray.push(store.indexOf(data[i])); } var records = []; if (selectionsArray.length > 0) { selectionsArray.sort(); for (var i=0; i<selectionsArray.length; i++) { record = store.getAt(selectionsArray[i]); records.push(record); } selectionsArray = []; for (var i=records.length-1; i>-1; i--) { record = records[i]; store.remove(record); store.insert(0, record); selectionsArray.push(((records.length - 1) - i)); } } this.toGrid.getView().refresh(); sm.selectRows(selectionsArray); }, onToBottom: function(){ var store = this.toStore; var sm = this.toGrid.getSelectionModel(); var data = sm.getSelections(); var selectionsArray = []; for (var i=0; i < data.length; i++){ selectionsArray.push(store.indexOf(data[i])); } var records = []; if (selectionsArray.length > 0) { selectionsArray.sort(); for (var i=0; i<selectionsArray.length; i++) { record = store.getAt(selectionsArray[i]); records.push(record); } selectionsArray = []; for (var i=0; i<records.length; i++) { record = records[i]; store.remove(record); store.add(record); selectionsArray.push((store.getCount()) - (records.length - i)); } } this.toGrid.getView().refresh(); sm.selectRows(selectionsArray); }, onFromTo: function(){ var records = this.fromGrid.getSelectionModel().getSelections(); var selectionsArray = []; for (var i=0; i < records.length; i++){ selectionsArray.push(this.fromStore.indexOf(records[i])); } if (selectionsArray.length > 0) { if(!this.allowDup) selectionsArray = []; for (var i=0; i<records.length; i++) { record = records[i]; if(this.allowDup){ var x=new Ext.data.Record(); record.id=x.id; delete x; this.toStore.add([record]); }else{ this.fromStore.remove(record); this.toStore.add([record]); selectionsArray.push((this.toStore.getCount() - 1)); } } } this.toGrid.getView().refresh(); this.fromGrid.getView().refresh(); if(this.toSortField) this.toStore.sort(this.toSortField, this.toSortDir); if(this.allowDup) this.fromGrid.getSelectionModel().selectRows(selectionsArray); else this.toGrid.getSelectionModel().selectRows(selectionsArray); }, onToFrom: function(){ var records = this.toGrid.getSelectionModel().getSelections(); var selectionsArray = []; if (records.length > 0) { for (var i=0; i<records.length; i++) { record = records[i]; this.toStore.remove(record); if(!this.allowDup){ this.fromStore.add([record]); selectionsArray.push((this.fromStore.getCount() - 1)); } } } this.fromGrid.getView().refresh(); this.toGrid.getView().refresh(); if(this.fromSortField) this.fromStore.sort(this.fromSortField, this.fromSortDir); this.fromGrid.getSelectionModel().selectRows(selectionsArray); }, onDestroy:function(){ this.toStore = null; this.toGrid = null; this.fromStore = null; this.fromGrid = null; } }); Ext.reg('multiSelectWin',Ext.ux.MultiSelectWin);
截图

发表评论
-
EXT零零碎碎
2011-06-01 15:09 01.Grid里面可以对多个字段映射为一个字段: " ... -
给Grid行添加Tip信息:
2011-06-01 14:53 1441在EXT3中,可以使用以下方法添加Tip信息: 1.给Grid ... -
窗口随页面滚动漂浮在同一位置
2010-06-25 09:03 1513var win = new Ext.Window( ... -
FF下字体小问题
2010-06-23 16:46 1159网络上有一份patch代码,不够实际应用中有点小问题。 于是自 ... -
强制combobox每次从后台获取数据
2010-06-22 15:50 2212combobox在第一次加载数据以后,就不再往后台获取数据了, ... -
使用图片创建简单的button
2010-06-22 15:42 1207代码: //具体样式的更改可以修改 style元素 ... -
阻止退格键导致页面跳转
2010-06-22 15:27 1621阻止退格键导致页面跳转,在程序中加入以下代码: ... -
default属性的应用
2010-06-22 15:25 1122关于default属性在container容器中(panle, ... -
Grid “操作”列的plugin
2010-06-19 11:06 1268尽管EXT的常用设计是把对GRID记录的操作放在tbar或者b ... -
Ext.ux.Upload.Dialog使用
2010-06-18 10:38 1304反正网络上都很多了。就上张PP吧。 -
自定义图片按钮
2010-06-07 17:15 1431/** * 定义图片按钮 * * @para ... -
设置Grid row 的高度
2010-06-07 09:04 1894对GridPanel 的GridView添加以下配置 v ...
相关推荐
首先,`MultiselectItemSelector` 提供了一个用户友好的界面,通常会显示一个可滚动的列表,用户可以通过勾选复选框来选择多个项目。这种组件的交互设计考虑了易用性和效率,使得用户可以快速地在大量数据中进行多选...
hhhhh安卓开发教程大全
avem-labs_Avem_1740990015.zip
微信群机器人管理系统源码 微信群机器人管理系统源码 支持同登陆多个微信 源码类型: C/S 开发环境: VS2010 SQL2008R2 菜单功能 1、支持同时登录多个微信 2、支持机器人聊天(笑话,成语接龙、故事会、智力等等) 3、支持签到 4、可自定义回复 5、可自定义红包语 6、支持定期发送公告(如群规,广告)等 1、WeChatRobots后台配置web版 2、数据库在WeiChartGroup.Net/app_data中,附加即可
https://upload.csdn.net/creation/uploadResources?spm=1003.2018.3001.4314
名字微控制器_STM32_课程_DeepBlue_1740989720.zip
S7-200Smart恒压供水程序示例与485通讯实践:操作指南与案例解析,S7-200 Smart可编程控制器恒压供水程序设计与实现,附带485通讯范例,S7-200Smart 恒压供水程序样例+485通讯样例 ,S7-200Smart; 恒压供水程序样例; 485通讯样例,S7-200Smart程序样例:恒压供水及485通讯应用示例
Java使用JNA、JNI两种不同方式调用DLL、SO动态库方式读写M1卡源码,支持读写M1卡扇区数据、修改IC卡扇区密钥、改写UID卡卡号等功能,支持Windows系统,同时支持龙芯Mips、LoongArch、海思麒麟鲲鹏飞腾Arm、海光兆芯x86_Amd64等架构平台的国产统信、麒麟等Linux系统,内有jna-4.5.0.jar包,vx13822155058 qq954486673
UDP协议接收和发送数据示例JAVA
本文介绍了范德堡大学深脑刺激器(DBS)项目,该项目旨在开发和临床评估一个系统,以辅助从规划到编程的整个过程。DBS是一种高频刺激治疗,用于治疗运动障碍,如帕金森病。由于目标区域在现有成像技术中可见性差,因此DBS电极的植入和编程过程复杂且耗时。项目涉及使用计算机辅助手术技术,以及一个定制的微定位平台(StarFix),该平台允许在术前进行图像采集和目标规划,提高了手术的精确性和效率。此外,文章还讨论了系统架构和各个模块的功能,以及如何通过中央数据库和网络接口实现信息共享。
图像识别”项目源码资源(Python和C++)
虚拟同步电机与并电网模型的Simulink仿真参数配置与直接使用指南,虚拟同步电机与并电网模型的Simulink仿真:参数齐全,直接使用,同步电机simulink仿真 并电网模型仿真 参数设置好了,可直接使用 ,虚拟同步电机; simulink仿真; 并电网模型仿真; 参数设置; 使用,虚拟同步电机Simulink仿真与并电网模型参数化应用
三菱FX3U与力士乐VFC-x610变频器通讯案例详解:PLC控制下的变频器操作与设置程序,含接线方式及昆仑通态触摸屏操作指南,三菱FX3U与力士乐VFC-x610变频器通讯案例详解:接线、设置与程序注解,实现频率设定、启停控制与实时数据读取功能。,三菱FX3U与力士乐VFC-x610变频器通讯程序三菱FX3U与力士乐VFC-x610变频器通讯案例程序,有注释。 并附送程序,有接线方式,设置。 器件:三菱FX3U的PLC,力士乐VFCx610变频器,昆仑通态,威纶通触摸屏。 功能:实现频率设定,启停控制,实际频率读取等。 ,三菱FX3U;力士乐VFC-x610变频器;通讯程序;案例程序;注释;接线方式;设置;频率设定;启停控制;实际频率读取;昆仑通态;威纶通触摸屏。,三菱FX3U与力士乐VFC-x610变频器通讯程序及案例:频率控制与读取实践
xmselect测试用例~~~~~~~~~~~~~~
总共包含 32 款 AAA 级科幻武器。四种武器类型,每种有 8 种不同的纹理变化! 所有内容均采用 PBR 材质,可直接用于开发游戏!
python词云生成器,将txt文本自动分割生成词云图
智慧园区,作为现代城市发展的新形态,旨在通过高度集成的信息化系统,实现园区的智能化管理与服务。该方案提出,利用智能手环、定制APP、园区管理系统及物联网技术,将园区的各类设施与设备紧密相连,形成一个高效、便捷、安全的智能网络。从智慧社区到智慧酒店,从智慧景区到智慧康养,再到智慧生态,五大应用板块覆盖了园区的每一个角落,为居民、游客及工作人员提供了全方位、个性化的服务体验。例如,智能手环不仅能实现定位、支付、求助等功能,还能监测用户健康状况,让科技真正服务于生活。而智慧景区的建设,更是通过大数据分析、智能票务、电子围栏等先进技术,提升了游客的游玩体验,确保了景区的安全有序。 尤为值得一提的是,方案中的智慧康养服务,展现了科技对人文关怀的深刻体现。通过智慧手环与传感器,自动感知老人身体状态,及时通知家属或医疗机构,有效解决了“空巢老人”的照护难题。同时,智慧生态管理系统的应用,实现了对大气、水、植被等环境要素的实时监测与智能调控,为园区的绿色发展提供了有力保障。此外,方案还提出了建立全域旅游营销平台,整合区域旅游资源,推动旅游业与其他产业的深度融合,为区域经济的转型升级注入了新的活力。 总而言之,这份智慧园区建设方案以其前瞻性的理念、创新性的技术和人性化的服务设计,为我们展示了一个充满智慧与活力的未来园区图景。它不仅提升了园区的运营效率和服务质量,更让科技真正融入了人们的生活,带来了前所未有的便捷与舒适。对于正在规划或实施智慧园区建设的决策者而言,这份方案无疑提供了一份宝贵的参考与启示,激发了他们对于未来智慧生活的无限遐想与憧憬。
使用 SignalR 在 .NET Core 8 最小 API 中构建实时通知,构建实时应用程序已成为现代 Web 开发中必不可少的部分,尤其是对于通知、聊天系统和实时更新等功能。SignalR 是 ASP.NET 的一个强大库,可实现服务器端代码和客户端 Web 应用程序之间的无缝实时通信。 参考文章:https://blog.csdn.net/hefeng_aspnet/article/details/145990801
自适应网址导航网站发布页单页网页模板html源码,超级好看自适应清新网址导航网站发布页单页网页模板html源码!无论电脑还是手机,这是一个网页单页源码!! 模板无后台模板,无需数据库,上传服务器直接能用。
不用花钱,不拐弯抹角。