Extjs4 似bug非bug的东西修改
/** hzm modify
* method: Ext.panel.Table.hasLockedColumns: function(columns) {}
* function:支持extjs grid colums三元表达式,tbar支持三元表示
eg: user.users_type == 2 ? {text: "创建日期", flex: 1, dataIndex: 'create_time'} : null,
var grid = Ext.create('Ext.grid.Panel', {
columns: [
new Ext.grid.RowNumberer(),
user.users_type == 1 ? {text: "创建日期", flex: 1, dataIndex: 'create_time'} : null,
{text: "备注", flex: 1, sortable: true, dataIndex: 'remark'}
]
}); user.users_type == 1 ? {
text:'添加会员',
iconCls:'add',
handler:function() {
MyDesktop.MemberWindow.member.addOrUpdateMember();
}
} : null,
user.users_type == 1 ? '-' : null
* note: 添加if判断column是否为空 //源代码:
if (!column.processed && column.locked) {
return true;
}
*/
Ext.override(Ext.panel.Table, {
hasLockedColumns: function(columns) {
var i,
len,
column; if (Ext.isObject(columns)) {
columns = columns.items;
}
for (i = 0, len = columns.length; i < len; i++) {
column = columns[i]; if (column && !column.processed && column.locked) {
return true;
}
}
}
}); /**
* hzm modify
* method: Ext.data.Connection.onComplete : function(request, xdrResult)
* function: gridpanel数据加载出错时(服务器内部错误),支持返回错误原因
*/
Ext.override(Ext.data.Connection, {
onComplete : function(request, xdrResult) {
var me = this,
options = request.options,
result,
success,
response; try {
result = me.parseStatus(request.xhr.status);
} catch (e) {
// in some browsers we can't access the status if the readyState is not 4, so the request has failed
result = {
success : false,
isException : false
}; }
success = me.isXdr ? xdrResult : result.success; if (success) {
response = me.createResponse(request);
me.fireEvent('requestcomplete', me, response, options);
Ext.callback(options.success, options.scope, [response, options]);
/**
* hzm modify start
* method: Ext.data.Connection.onComplete : function(request, xdrResult)
* function: gridpanel数据加载出错时(服务器内部错误),支持返回错误原因
* note: 原生系统,无以下段代码
*/
if(response && options.operation && !options.operation.response) {
options.operation.response = response;
}
/*
* modify end
*/
} else {
if (result.isException || request.aborted || request.timedout) {
response = me.createException(request);
} else {
response = me.createResponse(request);
}
me.fireEvent('requestexception', me, response, options);
Ext.callback(options.failure, options.scope, [response, options]);
} Ext.callback(options.callback, options.scope, [options, success, response]);
delete me.requests[request.id];
return response;
}
}); /**
* hzm modify
* method: Ext.selection.Model.getSelection : function()
* function: 当修改并reload后未更新当前grid selected range中的record
*/
Ext.override(Ext.selection.Model, {
getSelection: function() {
var me = this,
store = me.store,
arr = this.selected.getRange(); for(var i = 0; arr && i < arr.length; i++) {
try {
var record = arr[i];
var newRecord = store.getById(record.get(record.idProperty));
if(newRecord) {
arr[i] = newRecord;
}
} catch(e) {
alert('ext_override getSelection出现异常,详细信息:' + e);
}
}
return arr;
}
});
Extjs4 似bug非bug的东西修改的更多相关文章
- FIREDAC(DELPHI10 or 10.1)提交数据给ORACLE数据库的一个不是BUG的BUG
发现FIREDAC(DELPHI10 or 10.1)提交数据给ORACLE数据库的一个不是BUG的BUG,提交的表名大小写是敏感的. 只要有一个表名字母的大小写不匹配,ORACLE就会认为是一个不认 ...
- ORA-01791: not a SELECTed expression 一种是不 bug 的 bug!
[ora11@lixora ~]$ !sql sqlplus / as sysdba SQL*Plus: Release 11.2.0.1.0 Production on Wed Aug 27 09: ...
- oracle已知会导致错误结果的bug列表(Bug Issues Known to cause Wrong Results)
LAST UPDATE: 1 Dec 15, 2016 APPLIES TO: 1 2 3 4 Oracle Database - Enterprise Edition - Versi ...
- 禅道项目管理软件 为提交Bug页面设置bug必填字段
为提交Bug页面设置bug必填字段 by:授客 QQ:1033553122 测试环境: 禅道项目管理软件7.1.stable版本 注:仅适合windows版 步骤1.找到xampp\zentao\mo ...
- 如何在修改bug时切换分支保留修改又不提交
使用git的时候,我们往往使用branch解决任务切换问题,例如,我们往往会建一个自己的分支去修改和调试代码, 如果别人或者自己发现原有的分支上有个不得不修改的bug,我们往往会把完成一半的代码 co ...
- 疑似easyui本身bug:easyui时间控件问题,试了几个版本都不行
最近发现easyui时间控件的值格式不支持带斜杠的日期(2016/10/31),必须是2016-10-31这类的才能正常使用,否则默认初始化为当前时间 <input id="Retur ...
- 【转】小议Bug敏感度---Bug敏感度的故事(一)
在测试圈中,相信大家对“Bug敏感度”这一词并不陌生,但是Bug敏感度具体是指什么呢,本文对此关键词进行解读的基础上,对其与软件质量的关系,影响的关键因素,如何提高测试人员的bug敏感度进行分享.(- ...
- 关于起点中文网的一个我自认为是BUG的BUG(花了我一毛三分钱才实验出来的)
因为最近在学关于网页的东西,所以便有了每看一个网页,总得先看看这个网页的源码的习惯. 突然我就想到了,起点中文网在看小说的界面是不允许复制粘贴,甚至连点右键都不会有反应, 那么如果我查看源码,能否复制 ...
- 浏览器css bug及bug解决方法
Bugs及解决方案列表(以下实例默认运行环境都为Standard mode): 如何在IE6及更早浏览器中定义小高度的容器? 方法: #test{overflow:hidden;height:1px; ...
随机推荐
- 20130324 LBP CSLBP 全局存储区 局部存储区 char c[]=”hello world”和char *str=”hello world”的区别
1.LBP and CSLBP 2.再论char c[]=”hello world”和char *str=”hello world”的区别 /**************代码1************ ...
- jq页面换肤效果
<!DOCTYPE html> <html lang="en"> <head> <script src="http://code ...
- String 字符串对象
String是什么 String字符串,是一种引用数据类型,并不是基础数据类型. 对于基础数据类型和引用数据类型的区别: 基础数据类型,在创建时直接将值存放在栈内存中. 引用数据类型,在创建时栈内存中 ...
- window下apache2.2配置多个tomcat使用不同二级域名,共用80端口
思路:分3步, 1,安装apache服务器httpd-2.2.25-win32-x86-no_ssl.msi,安装tomcat 2,配置tomcat默认访问的项目,配置apache服务器 3,测试 第 ...
- Vue.js小游戏:测试CF打狙速度
此项目只测试反应速度,即手点击鼠标的反应速度 html代码 <div id="top">请等待图片变颜色,颜色便的那一刻即可点击测手速</div> < ...
- 服务启动脚本start_boot.sh
vim start_boot.sh #!/bin/bash usage(){ echo "$0 [start|stop|usage]" } status_springboot(){ ...
- python日常使用
os.path.splitext('C:\py\wxPython.gif') 得到扩展名的函数 os.remove(删除文件) os.listdir(显示该目录下的文件) os.getcwd(获取当 ...
- 通讯录查询(Profile Lookup)——freeCodeCamp
- leetcood学习笔记-38-报数
---恢复内容开始--- 题目描述: 第一次提交: class Solution: def countAndSay(self, n: int) -> str: f = " for i ...
- 关于SecureCRT不能显示输入、换行不正常
网上绿色破解版的SecureCRT会碰到这种问题,即输入字符不显示在终端.换行后下一行的行首有很大一段退格: 如上,输入的指令不显示:回车后下一行的起始位置不对. 碰到这种问题,在波特率.奇偶校验.停 ...