Index: ssts-web/src/main/webapp/js/extCompOperationUtil.js =================================================================== diff -u -r16893 -r17205 --- ssts-web/src/main/webapp/js/extCompOperationUtil.js (.../extCompOperationUtil.js) (revision 16893) +++ ssts-web/src/main/webapp/js/extCompOperationUtil.js (.../extCompOperationUtil.js) (revision 17205) @@ -7,6 +7,9 @@ var motionObj; + //extCompOperationUtil类中的ext对象 + var localExtObj; + //动作的常量 var constants = { UP: 'up', @@ -31,6 +34,13 @@ } return motionObj; } + /** + * 设置本地的extJs对象 + * @param extObj 需要设置的extJs对象 + */ + this.setExtObj = function (extObj) { + localExtObj = extObj; + } } //动作的类,用于获取上下最上最下的动作 @@ -61,8 +71,8 @@ * @param gridId (可选)对应grid的Id */ this.operationMove = function (motion, gridId) { - //从common.js获取对应的extJs对象版本 - var extObj = getExtObj(); + //先从当前类获取extJs对象,如果没有设置则从common.js获取对应的extJs对象版本 + var extObj = localExtObj || getExtObj(); //如果不传gridId,则使用页面中的grid对象 var grid = extObj.getCmp(gridId) || grid; var store = grid.getStore(); @@ -97,10 +107,10 @@ operation.border = size - 1; operation.pos = rowIndex + 1; } - else if (motion == 'top') { + else if (motion == motionObj.getTop()) { operation.border = operation.pos = 0; } - else if (motion == 'bottom') { + else if (motion == motionObj.getBottom()) { operation.border = operation.pos = size - 1; } else {