2010 年文章归档
共 6 篇文章
HtmlEditor保存到数据库的问题
{ xtype:'htmleditor', id:'bio', fieldLabel:'Biography', height:200, enableLinks :false, //这是把链接的按钮去掉. enableLists : false, // 这是把list 排序给去掉, value: Ext.util.Format.htmlDecode(' 22 '), anchor:'98%' //上述这个是编码转换.. } 就是这个编码转换...这是一个html在线编辑器,在对数据库存储时,存储也是基本的html格式代码.. Ext.util.Format.htmlDecode(),,,这个函…
2010-12-25 17:27 · ExtJS · HTML · EXT
Ext禁止编辑HtmlEditor的方法
如果我们想要使用HtmlEditor只是用于显示数据时,需要禁止编辑Ext.form.HtmlEditor。 一般的做法都是通过设置readOnly : true 和disabled : true 但是你会发现,这样的做法根本不起作用。 这里我们需要重写HtmlEditor的disabled方法。 Ext.override(Ext.form.HtmlEditor, { onDisable: function(){ if(this.rendered){ this.wrap.mask(); } Ext.form.HtmlEditor.superclass.onDisable.call(this)…
2010-12-25 17:25 · ExtJS · EXT · IE
Ext分组Grid表头统计方案
var tmpFunction = Ext.grid.GroupingView.prototype.initTemplates; Ext.grid.GroupingView.prototype.initTemplates = function(){ tmpFunction.call(this); if(this.startGroup&&this.tplFunction){ Ext.apply(this.startGroup,this.tplFunction); } }; var view = new Ext.grid.GroupingView({ forceFit : false, grou…
2010-12-25 17:23 · ExtJS · EXT · prototype · QQ
ext 表单提交的两种方式对比
ext 表单提交的两种方式对比 Ext中的表单数据提交有两种方式: Ajax提交方式 Form提交方式 Ajax提交方式 function save(){ var pid = field_PId.getValue();//必填字段 var ptid = combo_PtId.getValue(); var creator = field_creator.getValue();//必填字段 var createtime = field_createtime.getValue();//必填字段 var modifier = field_modifier.getValue();//必填字段 var…
2010-12-25 17:22 · javascript · 浏览器 · Ajax · EXT
Ext Form表单设置值
form.getForm().setValues({ fieldName : value }); 通过构建一个json对象,传递到setValues中 fieldName 为form表单元素的name属性 value为要设置的值
2010-12-25 17:21 · ExtJS · EXT · json
EditorGridPanel insert 到最后
var btn_addLayer = new Ext.Toolbar.Button({ text : '添加', iconCls : 'x-button-add', handler : function(){ var t = new Ext.data.Record({ layerPre : '', nextBi : '1', }); layerGridPanel.stopEditing(); layerGridPanel.store.insert(layerGridPanel.getStore().getCount(), t); layerGridPanel.startEditing(0, …
2010-12-25 17:20 · ExtJS · EXT