Skip to content
  • 12 commits
  • 3 files changed
  • 0 commit comments
  • 2 contributors
Showing with 12 additions and 11 deletions.
  1. +4 −2 src/esui/Schedule.js
  2. +7 −8 src/esui/Table.js
  3. +1 −1 src/esui/util.js
View
6 src/esui/Schedule.js
@@ -101,6 +101,7 @@ esui.Schedule.prototype = {
var stateName = 'disabled';
var shortcut;
var bodyHead;
+ var i;
this.disabled = disabled;
if ( disabled ) {
@@ -114,7 +115,7 @@ esui.Schedule.prototype = {
bodyHead = baidu.g( this.__getId('BodyHead') );
bodyHead.style.display = shortcut.style.display = disabled ? 'none' : '';
- for (var i = 0; i < 7; i++) {
+ for ( i = 0; i < 7; i++ ) {
baidu.g( this.__getId('lineState' + i) ).disabled = disabled;
}
},
@@ -156,9 +157,10 @@ esui.Schedule.prototype = {
getValue: function () {
var value = [];
var valueAsArray = this.valueAsArray;
+ var i, j;
for ( i = 0; i < 7; i++ ) {
- for ( var j = 0; j < 24; j++ ) {
+ for ( j = 0; j < 24; j++ ) {
value.push( valueAsArray[ i ][ j ] );
}
}
View
15 src/esui/Table.js
@@ -355,7 +355,6 @@ esui.Table.prototype = {
*/
_initColsWidth: function () {
var me = this,
- i,
fields = me._fields,
len = fields.length,
canExpand = [],
@@ -366,7 +365,8 @@ esui.Table.prototype = {
width,
index,
maxCanExpandIdx = 0,
- minWidth;
+ minWidth,
+ i;
me._colsWidth = [];
@@ -562,9 +562,9 @@ esui.Table.prototype = {
tipClass = me.__getClass( 'hhelp' ),
i, field, title, canDragBegin, canDragEnd,
contentHtml,
- thClass,
orderClass,
alignClass,
+ thClass,
currentSort,
sortIconHtml,
sortable,
@@ -739,9 +739,9 @@ esui.Table.prototype = {
* @param {HTMLElement} cell 点击的单元格
*/
_titleClickHandler: function ( cell ) {
- var me = this;
if ( this._sortReady ) { // 避免拖拽触发排序行为
- var field = me._fields[ cell.getAttribute( 'index' ) ],
+ var me = this,
+ field = me._fields[ cell.getAttribute( 'index' ) ],
orderBy = me.orderBy,
order = me.order;
@@ -1149,7 +1149,6 @@ esui.Table.prototype = {
tdCellClass = me.__getClass( 'cell' ),
tdBreakClass = me.__getClass( 'cell-break' ),
tdTextClass = me.__getClass( 'cell-text' ),
- field,
fields = me._fields,
fieldLen = fields.length,
cellClass,
@@ -1164,6 +1163,7 @@ esui.Table.prototype = {
subentryHtml,
contentHtml,
editable,
+ field,
i;
html.push(
@@ -1385,8 +1385,7 @@ esui.Table.prototype = {
_getSubrowHtml: function ( index ) {
return '<div id="' + this._getSubrowId( index )
+ '" class="' + this.__getClass( 'subrow' ) + '"'
- + ' style="display:none; width:100%; overflow:hidden;"></div>';
- // 对subrow定义宽度,否则在resize时宽度不会改变
+ + ' style="display:none"></div>';
},
/**
View
2 src/esui/util.js
@@ -41,7 +41,7 @@ esui.util = function () {
var uiAttr = esui.config.UI_ATTRIBUTE || 'ui';
var realEls = [];
var attrs, attrStr, attrArr, attrArrLen;
- var attrSegment, attr, attrValue, attrItem, extraAttrMap;
+ var attr, attrValue, attrItem, attrSegment, extraAttrMap;
var i, len, key, el, uis = {};
// 把dom元素存储到临时数组中

No commit comments for this range

Something went wrong with that request. Please try again.