Browse Source

Merge pull request #663 in VISUAL/fineui from ~GUY/fineui:master to master

* commit '6fc299305a692b2b66763b311baf2e6c47f3e4dd':
  update
es6
guy 6 years ago
parent
commit
ca93819ce1
  1. 53
      dist/base.js
  2. 53
      dist/bundle.js
  3. 56
      dist/bundle.min.js
  4. 53
      dist/fineui.js
  5. 56
      dist/fineui.min.js
  6. 53
      dist/fineui_without_jquery_polyfill.js
  7. 2
      dist/utils.min.js
  8. 10
      src/base/collection/collection.js
  9. 10
      src/base/grid/grid.js
  10. 22
      src/base/single/button/button.basic.js
  11. 11
      src/base/single/button/button.node.js

53
dist/base.js vendored

@ -660,13 +660,6 @@ BI.BasicButton = BI.inherit(BI.Single, {
_init: function () { _init: function () {
BI.BasicButton.superclass._init.apply(this, arguments); BI.BasicButton.superclass._init.apply(this, arguments);
var opts = this.options; var opts = this.options;
if (opts.selected === true) {
BI.nextTick(BI.bind(function () {
this.setSelected(opts.selected);
}, this));
}
BI.nextTick(BI.bind(this.bindEvent, this));
if (opts.shadow) { if (opts.shadow) {
this._createShadow(); this._createShadow();
} }
@ -675,6 +668,17 @@ BI.BasicButton = BI.inherit(BI.Single, {
} }
}, },
_mount: function () {
var _mount = BI.BasicButton.superclass._mount.apply(this, arguments);
if(_mount === true) {
var o = this.options;
if (o.selected === true) {
this.setSelected(o.selected);
}
this.bindEvent();
}
},
_createShadow: function () { _createShadow: function () {
var self = this, o = this.options; var self = this, o = this.options;
@ -831,8 +835,8 @@ BI.BasicButton = BI.inherit(BI.Single, {
// 之后的300ms点击无效 // 之后的300ms点击无效
var onClick = BI.debounce(this._doClick, BI.EVENT_RESPONSE_TIME, { var onClick = BI.debounce(this._doClick, BI.EVENT_RESPONSE_TIME, {
"leading": true, leading: true,
"trailing": false trailing: false
}); });
function ev (e) { function ev (e) {
@ -1058,10 +1062,13 @@ BI.NodeButton = BI.inherit(BI.BasicButton, {
_init: function () { _init: function () {
BI.NodeButton.superclass._init.apply(this, arguments); BI.NodeButton.superclass._init.apply(this, arguments);
var self = this; },
BI.nextTick(function () {
self.setOpened(self.isOpened()); _mount: function () {
}); var _mount = BI.NodeButton.superclass._mount.apply(this, arguments);
if(_mount === true) {
this.setOpened(this.isOpened());
}
}, },
doClick: function () { doClick: function () {
@ -2596,11 +2603,13 @@ BI.CollectionView = BI.inherit(BI.Widget, {
this._calculateSizeAndPositionData(); this._calculateSizeAndPositionData();
this._populate(); this._populate();
} }
},
mounted: function () {
var o = this.options;
if (o.scrollLeft !== 0 || o.scrollTop !== 0) { if (o.scrollLeft !== 0 || o.scrollTop !== 0) {
BI.nextTick(function () { this.element.scrollTop(o.scrollTop);
self.element.scrollTop(o.scrollTop); this.element.scrollLeft(o.scrollLeft);
self.element.scrollLeft(o.scrollLeft);
});
} }
}, },
@ -5338,11 +5347,13 @@ BI.GridView = BI.inherit(BI.Widget, {
if (o.items.length > 0) { if (o.items.length > 0) {
this._populate(); this._populate();
} }
},
mounted: function () {
var o = this.options;
if (o.scrollLeft !== 0 || o.scrollTop !== 0) { if (o.scrollLeft !== 0 || o.scrollTop !== 0) {
BI.nextTick(function () { this.element.scrollTop(o.scrollTop);
self.element.scrollTop(o.scrollTop); this.element.scrollLeft(o.scrollLeft);
self.element.scrollLeft(o.scrollLeft);
});
} }
}, },

53
dist/bundle.js vendored

@ -36009,13 +36009,6 @@ BI.BasicButton = BI.inherit(BI.Single, {
_init: function () { _init: function () {
BI.BasicButton.superclass._init.apply(this, arguments); BI.BasicButton.superclass._init.apply(this, arguments);
var opts = this.options; var opts = this.options;
if (opts.selected === true) {
BI.nextTick(BI.bind(function () {
this.setSelected(opts.selected);
}, this));
}
BI.nextTick(BI.bind(this.bindEvent, this));
if (opts.shadow) { if (opts.shadow) {
this._createShadow(); this._createShadow();
} }
@ -36024,6 +36017,17 @@ BI.BasicButton = BI.inherit(BI.Single, {
} }
}, },
_mount: function () {
var _mount = BI.BasicButton.superclass._mount.apply(this, arguments);
if(_mount === true) {
var o = this.options;
if (o.selected === true) {
this.setSelected(o.selected);
}
this.bindEvent();
}
},
_createShadow: function () { _createShadow: function () {
var self = this, o = this.options; var self = this, o = this.options;
@ -36180,8 +36184,8 @@ BI.BasicButton = BI.inherit(BI.Single, {
// 之后的300ms点击无效 // 之后的300ms点击无效
var onClick = BI.debounce(this._doClick, BI.EVENT_RESPONSE_TIME, { var onClick = BI.debounce(this._doClick, BI.EVENT_RESPONSE_TIME, {
"leading": true, leading: true,
"trailing": false trailing: false
}); });
function ev (e) { function ev (e) {
@ -36407,10 +36411,13 @@ BI.NodeButton = BI.inherit(BI.BasicButton, {
_init: function () { _init: function () {
BI.NodeButton.superclass._init.apply(this, arguments); BI.NodeButton.superclass._init.apply(this, arguments);
var self = this; },
BI.nextTick(function () {
self.setOpened(self.isOpened()); _mount: function () {
}); var _mount = BI.NodeButton.superclass._mount.apply(this, arguments);
if(_mount === true) {
this.setOpened(this.isOpened());
}
}, },
doClick: function () { doClick: function () {
@ -37945,11 +37952,13 @@ BI.CollectionView = BI.inherit(BI.Widget, {
this._calculateSizeAndPositionData(); this._calculateSizeAndPositionData();
this._populate(); this._populate();
} }
},
mounted: function () {
var o = this.options;
if (o.scrollLeft !== 0 || o.scrollTop !== 0) { if (o.scrollLeft !== 0 || o.scrollTop !== 0) {
BI.nextTick(function () { this.element.scrollTop(o.scrollTop);
self.element.scrollTop(o.scrollTop); this.element.scrollLeft(o.scrollLeft);
self.element.scrollLeft(o.scrollLeft);
});
} }
}, },
@ -40687,11 +40696,13 @@ BI.GridView = BI.inherit(BI.Widget, {
if (o.items.length > 0) { if (o.items.length > 0) {
this._populate(); this._populate();
} }
},
mounted: function () {
var o = this.options;
if (o.scrollLeft !== 0 || o.scrollTop !== 0) { if (o.scrollLeft !== 0 || o.scrollTop !== 0) {
BI.nextTick(function () { this.element.scrollTop(o.scrollTop);
self.element.scrollTop(o.scrollTop); this.element.scrollLeft(o.scrollLeft);
self.element.scrollLeft(o.scrollLeft);
});
} }
}, },

56
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

53
dist/fineui.js vendored

@ -36251,13 +36251,6 @@ BI.BasicButton = BI.inherit(BI.Single, {
_init: function () { _init: function () {
BI.BasicButton.superclass._init.apply(this, arguments); BI.BasicButton.superclass._init.apply(this, arguments);
var opts = this.options; var opts = this.options;
if (opts.selected === true) {
BI.nextTick(BI.bind(function () {
this.setSelected(opts.selected);
}, this));
}
BI.nextTick(BI.bind(this.bindEvent, this));
if (opts.shadow) { if (opts.shadow) {
this._createShadow(); this._createShadow();
} }
@ -36266,6 +36259,17 @@ BI.BasicButton = BI.inherit(BI.Single, {
} }
}, },
_mount: function () {
var _mount = BI.BasicButton.superclass._mount.apply(this, arguments);
if(_mount === true) {
var o = this.options;
if (o.selected === true) {
this.setSelected(o.selected);
}
this.bindEvent();
}
},
_createShadow: function () { _createShadow: function () {
var self = this, o = this.options; var self = this, o = this.options;
@ -36422,8 +36426,8 @@ BI.BasicButton = BI.inherit(BI.Single, {
// 之后的300ms点击无效 // 之后的300ms点击无效
var onClick = BI.debounce(this._doClick, BI.EVENT_RESPONSE_TIME, { var onClick = BI.debounce(this._doClick, BI.EVENT_RESPONSE_TIME, {
"leading": true, leading: true,
"trailing": false trailing: false
}); });
function ev (e) { function ev (e) {
@ -36649,10 +36653,13 @@ BI.NodeButton = BI.inherit(BI.BasicButton, {
_init: function () { _init: function () {
BI.NodeButton.superclass._init.apply(this, arguments); BI.NodeButton.superclass._init.apply(this, arguments);
var self = this; },
BI.nextTick(function () {
self.setOpened(self.isOpened()); _mount: function () {
}); var _mount = BI.NodeButton.superclass._mount.apply(this, arguments);
if(_mount === true) {
this.setOpened(this.isOpened());
}
}, },
doClick: function () { doClick: function () {
@ -38187,11 +38194,13 @@ BI.CollectionView = BI.inherit(BI.Widget, {
this._calculateSizeAndPositionData(); this._calculateSizeAndPositionData();
this._populate(); this._populate();
} }
},
mounted: function () {
var o = this.options;
if (o.scrollLeft !== 0 || o.scrollTop !== 0) { if (o.scrollLeft !== 0 || o.scrollTop !== 0) {
BI.nextTick(function () { this.element.scrollTop(o.scrollTop);
self.element.scrollTop(o.scrollTop); this.element.scrollLeft(o.scrollLeft);
self.element.scrollLeft(o.scrollLeft);
});
} }
}, },
@ -40929,11 +40938,13 @@ BI.GridView = BI.inherit(BI.Widget, {
if (o.items.length > 0) { if (o.items.length > 0) {
this._populate(); this._populate();
} }
},
mounted: function () {
var o = this.options;
if (o.scrollLeft !== 0 || o.scrollTop !== 0) { if (o.scrollLeft !== 0 || o.scrollTop !== 0) {
BI.nextTick(function () { this.element.scrollTop(o.scrollTop);
self.element.scrollTop(o.scrollTop); this.element.scrollLeft(o.scrollLeft);
self.element.scrollLeft(o.scrollLeft);
});
} }
}, },

56
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

53
dist/fineui_without_jquery_polyfill.js vendored

@ -24818,13 +24818,6 @@ BI.BasicButton = BI.inherit(BI.Single, {
_init: function () { _init: function () {
BI.BasicButton.superclass._init.apply(this, arguments); BI.BasicButton.superclass._init.apply(this, arguments);
var opts = this.options; var opts = this.options;
if (opts.selected === true) {
BI.nextTick(BI.bind(function () {
this.setSelected(opts.selected);
}, this));
}
BI.nextTick(BI.bind(this.bindEvent, this));
if (opts.shadow) { if (opts.shadow) {
this._createShadow(); this._createShadow();
} }
@ -24833,6 +24826,17 @@ BI.BasicButton = BI.inherit(BI.Single, {
} }
}, },
_mount: function () {
var _mount = BI.BasicButton.superclass._mount.apply(this, arguments);
if(_mount === true) {
var o = this.options;
if (o.selected === true) {
this.setSelected(o.selected);
}
this.bindEvent();
}
},
_createShadow: function () { _createShadow: function () {
var self = this, o = this.options; var self = this, o = this.options;
@ -24989,8 +24993,8 @@ BI.BasicButton = BI.inherit(BI.Single, {
// 之后的300ms点击无效 // 之后的300ms点击无效
var onClick = BI.debounce(this._doClick, BI.EVENT_RESPONSE_TIME, { var onClick = BI.debounce(this._doClick, BI.EVENT_RESPONSE_TIME, {
"leading": true, leading: true,
"trailing": false trailing: false
}); });
function ev (e) { function ev (e) {
@ -25216,10 +25220,13 @@ BI.NodeButton = BI.inherit(BI.BasicButton, {
_init: function () { _init: function () {
BI.NodeButton.superclass._init.apply(this, arguments); BI.NodeButton.superclass._init.apply(this, arguments);
var self = this; },
BI.nextTick(function () {
self.setOpened(self.isOpened()); _mount: function () {
}); var _mount = BI.NodeButton.superclass._mount.apply(this, arguments);
if(_mount === true) {
this.setOpened(this.isOpened());
}
}, },
doClick: function () { doClick: function () {
@ -25854,11 +25861,13 @@ BI.CollectionView = BI.inherit(BI.Widget, {
this._calculateSizeAndPositionData(); this._calculateSizeAndPositionData();
this._populate(); this._populate();
} }
},
mounted: function () {
var o = this.options;
if (o.scrollLeft !== 0 || o.scrollTop !== 0) { if (o.scrollLeft !== 0 || o.scrollTop !== 0) {
BI.nextTick(function () { this.element.scrollTop(o.scrollTop);
self.element.scrollTop(o.scrollTop); this.element.scrollLeft(o.scrollLeft);
self.element.scrollLeft(o.scrollLeft);
});
} }
}, },
@ -28596,11 +28605,13 @@ BI.GridView = BI.inherit(BI.Widget, {
if (o.items.length > 0) { if (o.items.length > 0) {
this._populate(); this._populate();
} }
},
mounted: function () {
var o = this.options;
if (o.scrollLeft !== 0 || o.scrollTop !== 0) { if (o.scrollLeft !== 0 || o.scrollTop !== 0) {
BI.nextTick(function () { this.element.scrollTop(o.scrollTop);
self.element.scrollTop(o.scrollTop); this.element.scrollLeft(o.scrollLeft);
self.element.scrollLeft(o.scrollLeft);
});
} }
}, },

2
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

10
src/base/collection/collection.js

@ -59,11 +59,13 @@ BI.CollectionView = BI.inherit(BI.Widget, {
this._calculateSizeAndPositionData(); this._calculateSizeAndPositionData();
this._populate(); this._populate();
} }
},
mounted: function () {
var o = this.options;
if (o.scrollLeft !== 0 || o.scrollTop !== 0) { if (o.scrollLeft !== 0 || o.scrollTop !== 0) {
BI.nextTick(function () { this.element.scrollTop(o.scrollTop);
self.element.scrollTop(o.scrollTop); this.element.scrollLeft(o.scrollLeft);
self.element.scrollLeft(o.scrollLeft);
});
} }
}, },

10
src/base/grid/grid.js

@ -61,11 +61,13 @@ BI.GridView = BI.inherit(BI.Widget, {
if (o.items.length > 0) { if (o.items.length > 0) {
this._populate(); this._populate();
} }
},
mounted: function () {
var o = this.options;
if (o.scrollLeft !== 0 || o.scrollTop !== 0) { if (o.scrollLeft !== 0 || o.scrollTop !== 0) {
BI.nextTick(function () { this.element.scrollTop(o.scrollTop);
self.element.scrollTop(o.scrollTop); this.element.scrollLeft(o.scrollLeft);
self.element.scrollLeft(o.scrollLeft);
});
} }
}, },

22
src/base/single/button/button.basic.js

@ -30,13 +30,6 @@ BI.BasicButton = BI.inherit(BI.Single, {
_init: function () { _init: function () {
BI.BasicButton.superclass._init.apply(this, arguments); BI.BasicButton.superclass._init.apply(this, arguments);
var opts = this.options; var opts = this.options;
if (opts.selected === true) {
BI.nextTick(BI.bind(function () {
this.setSelected(opts.selected);
}, this));
}
BI.nextTick(BI.bind(this.bindEvent, this));
if (opts.shadow) { if (opts.shadow) {
this._createShadow(); this._createShadow();
} }
@ -45,6 +38,17 @@ BI.BasicButton = BI.inherit(BI.Single, {
} }
}, },
_mount: function () {
var _mount = BI.BasicButton.superclass._mount.apply(this, arguments);
if(_mount === true) {
var o = this.options;
if (o.selected === true) {
this.setSelected(o.selected);
}
this.bindEvent();
}
},
_createShadow: function () { _createShadow: function () {
var self = this, o = this.options; var self = this, o = this.options;
@ -201,8 +205,8 @@ BI.BasicButton = BI.inherit(BI.Single, {
// 之后的300ms点击无效 // 之后的300ms点击无效
var onClick = BI.debounce(this._doClick, BI.EVENT_RESPONSE_TIME, { var onClick = BI.debounce(this._doClick, BI.EVENT_RESPONSE_TIME, {
"leading": true, leading: true,
"trailing": false trailing: false
}); });
function ev (e) { function ev (e) {

11
src/base/single/button/button.node.js

@ -17,10 +17,13 @@ BI.NodeButton = BI.inherit(BI.BasicButton, {
_init: function () { _init: function () {
BI.NodeButton.superclass._init.apply(this, arguments); BI.NodeButton.superclass._init.apply(this, arguments);
var self = this; },
BI.nextTick(function () {
self.setOpened(self.isOpened()); _mount: function () {
}); var _mount = BI.NodeButton.superclass._mount.apply(this, arguments);
if(_mount === true) {
this.setOpened(this.isOpened());
}
}, },
doClick: function () { doClick: function () {

Loading…
Cancel
Save