Browse Source

added

master
guy 6 years ago
parent
commit
aba3261fbb
  1. 4
      Gruntfile.js
  2. 14
      demo/js/face.js
  3. 995
      dist/bundle.js
  4. 143
      dist/core.js
  5. 14
      dist/demo.js
  6. 995
      dist/fineui.js
  7. 13
      dist/widget.js
  8. 6
      src/core/wrapper/layout.js
  9. 17
      src/core/wrapper/layout/adapt/adapt.center.js
  10. 17
      src/core/wrapper/layout/adapt/adapt.horizontal.js
  11. 17
      src/core/wrapper/layout/adapt/adapt.vertical.js
  12. 17
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.center.js
  13. 17
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js
  14. 17
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.center.js
  15. 18
      src/core/wrapper/layout/layout.horizontal.js
  16. 17
      src/core/wrapper/layout/layout.td.js

4
Gruntfile.js

@ -250,7 +250,7 @@ module.exports = function (grunt) {
}, },
watch: { watch: {
scripts: { scripts: {
files: ["src/**/*", "demo/js/**/*.js", "demo/version.js", "demo/config.js", "demo/less/**/*.less"], files: ["src/**/*.js", "src/**/*.less", "demo/js/**/*.js", "demo/version.js", "demo/config.js", "demo/less/**/*.less"],
tasks: ["less", "concat"], tasks: ["less", "concat"],
options: { options: {
spanw: true, spanw: true,
@ -291,7 +291,7 @@ module.exports = function (grunt) {
grunt.loadNpmTasks("grunt-contrib-connect"); grunt.loadNpmTasks("grunt-contrib-connect");
grunt.loadNpmTasks('grunt-contrib-clean'); grunt.loadNpmTasks('grunt-contrib-clean');
var defaultTask = ["clean", "less", "concat", "connect", "watch"]; var defaultTask = ["less", "concat", "connect", "watch"];
grunt.registerTask("default", defaultTask); grunt.registerTask("default", defaultTask);
grunt.registerTask("compile", function () { grunt.registerTask("compile", function () {
grunt.config.set("connect.options.open", false); grunt.config.set("connect.options.open", false);

14
demo/js/face.js

@ -548,20 +548,16 @@ Demo.Face = BI.inherit(BI.Widget, {
return { return {
type: "bi.grid", type: "bi.grid",
items: [[{ items: [[{
column: 0,
row: 0,
el: {
type: "bi.layout"
}
}, {
column: 1,
row: 0,
el: { el: {
type: "bi.vertical", type: "bi.vertical",
cls: "face-config bi-border-left", cls: "face-config bi-border-right",
items: [this._createBaseConfig(), items: [this._createBaseConfig(),
this._createCommonConfig()] this._createCommonConfig()]
} }
}, {
el: {
type: "bi.layout"
}
}]] }]]
}; };
}, },

995
dist/bundle.js vendored

File diff suppressed because it is too large Load Diff

143
dist/core.js vendored

@ -24339,6 +24339,10 @@ BI.Layout = BI.inherit(BI.Widget, {
} }
}, },
appendFragment: function (frag) {
this.element.append(frag);
},
_mountChildren: function () { _mountChildren: function () {
var self = this; var self = this;
var frag = document.createDocumentFragment(); var frag = document.createDocumentFragment();
@ -24350,7 +24354,7 @@ BI.Layout = BI.inherit(BI.Widget, {
} }
}); });
if (hasChild === true) { if (hasChild === true) {
this.element.append(frag); this.appendFragment(frag);
} }
}, },
@ -30276,20 +30280,9 @@ BI.CenterAdaptLayout = BI.inherit(BI.Layout, {
return td; return td;
}, },
_mountChildren: function () { appendFragment: function (frag) {
var self = this; this.$tr.append(frag);
var frag = document.createDocumentFragment(); this.element.append(this.$table);
var hasChild = false;
BI.each(this._children, function (i, widget) {
if (widget.element !== self.element) {
frag.appendChild(widget.element[0]);
hasChild = true;
}
});
if (hasChild === true) {
this.$tr.append(frag);
this.element.append(this.$table);
}
}, },
resize: function () { resize: function () {
@ -30393,20 +30386,9 @@ BI.HorizontalAdaptLayout = BI.inherit(BI.Layout, {
return td; return td;
}, },
_mountChildren: function () { appendFragment: function (frag) {
var self = this; this.$tr.append(frag);
var frag = document.createDocumentFragment(); this.element.append(this.$table);
var hasChild = false;
BI.each(this._children, function (i, widget) {
if (widget.element !== self.element) {
frag.appendChild(widget.element[0]);
hasChild = true;
}
});
if (hasChild === true) {
this.$tr.append(frag);
this.element.append(this.$table);
}
}, },
resize: function () { resize: function () {
@ -30683,20 +30665,9 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
return td; return td;
}, },
_mountChildren: function () { appendFragment: function (frag) {
var self = this; this.$tr.append(frag);
var frag = document.createDocumentFragment(); this.element.append(this.$table);
var hasChild = false;
BI.each(this._children, function (i, widget) {
if (widget.element !== self.element) {
frag.appendChild(widget.element[0]);
hasChild = true;
}
});
if (hasChild === true) {
this.$tr.append(frag);
this.element.append(this.$table);
}
}, },
_getWrapper: function () { _getWrapper: function () {
@ -31277,20 +31248,9 @@ BI.FlexCenterLayout = BI.inherit(BI.Layout, {
return w; return w;
}, },
_mountChildren: function () { appendFragment: function (frag) {
var self = this; this.$wrapper.append(frag);
var frag = document.createDocumentFragment(); this.element.append(this.$wrapper);
var hasChild = false;
BI.each(this._children, function (i, widget) {
if (widget.element !== self.element) {
frag.appendChild(widget.element[0]);
hasChild = true;
}
});
if (hasChild === true) {
this.$wrapper.append(frag);
this.element.append(this.$wrapper);
}
}, },
_getWrapper: function () { _getWrapper: function () {
@ -31362,20 +31322,9 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, {
return w; return w;
}, },
_mountChildren: function () { appendFragment: function (frag) {
var self = this; this.$wrapper.append(frag);
var frag = document.createDocumentFragment(); this.element.append(this.$wrapper);
var hasChild = false;
BI.each(this._children, function (i, widget) {
if (widget.element !== self.element) {
frag.appendChild(widget.element[0]);
hasChild = true;
}
});
if (hasChild === true) {
this.$wrapper.append(frag);
this.element.append(this.$wrapper);
}
}, },
_getWrapper: function () { _getWrapper: function () {
@ -31447,20 +31396,9 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
return w; return w;
}, },
_mountChildren: function () { appendFragment: function (frag) {
var self = this; this.$wrapper.append(frag);
var frag = document.createDocumentFragment(); this.element.append(this.$wrapper);
var hasChild = false;
BI.each(this._children, function (i, widget) {
if (widget.element !== self.element) {
frag.appendChild(widget.element[0]);
hasChild = true;
}
});
if (hasChild === true) {
this.$wrapper.append(frag);
this.element.append(this.$wrapper);
}
}, },
_getWrapper: function () { _getWrapper: function () {
@ -32590,23 +32528,11 @@ BI.HorizontalLayout = BI.inherit(BI.Layout, {
return td; return td;
}, },
_mountChildren: function () { appendFragment: function (frag) {
var self = this; this.$tr.append(frag);
var frag = document.createDocumentFragment(); this.element.append(this.$table);
var hasChild = false;
BI.each(this._children, function (i, widget) {
if (widget.element !== self.element) {
frag.appendChild(widget.element[0]);
hasChild = true;
}
});
if (hasChild === true) {
this.$tr.append(frag);
this.element.append(this.$table);
}
}, },
resize: function () { resize: function () {
// console.log("horizontal layout do not need to resize"); // console.log("horizontal layout do not need to resize");
}, },
@ -33273,20 +33199,9 @@ BI.TdLayout = BI.inherit(BI.Layout, {
return tr; return tr;
}, },
_mountChildren: function () { appendFragment: function (frag) {
var self = this; this.$table.append(frag);
var frag = document.createDocumentFragment(); this.element.append(this.$table);
var hasChild = false;
BI.each(this._children, function (i, widget) {
if (widget.element !== self.element) {
frag.appendChild(widget.element[0]);
hasChild = true;
}
});
if (hasChild === true) {
this.$table.append(frag);
this.element.append(this.$table);
}
}, },
resize: function () { resize: function () {

14
dist/demo.js vendored

@ -7495,20 +7495,16 @@ BI.shortcut("demo.searcher_view", Demo.Func);Demo.Face = BI.inherit(BI.Widget, {
return { return {
type: "bi.grid", type: "bi.grid",
items: [[{ items: [[{
column: 0,
row: 0,
el: {
type: "bi.layout"
}
}, {
column: 1,
row: 0,
el: { el: {
type: "bi.vertical", type: "bi.vertical",
cls: "face-config bi-border-left", cls: "face-config bi-border-right",
items: [this._createBaseConfig(), items: [this._createBaseConfig(),
this._createCommonConfig()] this._createCommonConfig()]
} }
}, {
el: {
type: "bi.layout"
}
}]] }]]
}; };
}, },

995
dist/fineui.js vendored

File diff suppressed because it is too large Load Diff

13
dist/widget.js vendored

@ -9558,12 +9558,15 @@ BI.MultiSelectLoader = BI.inherit(BI.Widget, {
}, },
value: this.storeValue value: this.storeValue
}); });
BI.createWidget({
type: "bi.vertical", BI.createWidget(BI.extend({
element: this, element: this
items: [this.button_group], }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top), BI.extend({
scrolly: true,
vgap: 5 vgap: 5
}); }, opts.logic, {
items: BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Top, this.button_group)
}))));
this.button_group.on(BI.Controller.EVENT_CHANGE, function () { this.button_group.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
}); });

6
src/core/wrapper/layout.js

@ -63,6 +63,10 @@ BI.Layout = BI.inherit(BI.Widget, {
} }
}, },
appendFragment: function (frag) {
this.element.append(frag);
},
_mountChildren: function () { _mountChildren: function () {
var self = this; var self = this;
var frag = document.createDocumentFragment(); var frag = document.createDocumentFragment();
@ -74,7 +78,7 @@ BI.Layout = BI.inherit(BI.Widget, {
} }
}); });
if (hasChild === true) { if (hasChild === true) {
this.element.append(frag); this.appendFragment(frag);
} }
}, },

17
src/core/wrapper/layout/adapt/adapt.center.js

@ -87,20 +87,9 @@ BI.CenterAdaptLayout = BI.inherit(BI.Layout, {
return td; return td;
}, },
_mountChildren: function () { appendFragment: function (frag) {
var self = this; this.$tr.append(frag);
var frag = document.createDocumentFragment(); this.element.append(this.$table);
var hasChild = false;
BI.each(this._children, function (i, widget) {
if (widget.element !== self.element) {
frag.appendChild(widget.element[0]);
hasChild = true;
}
});
if (hasChild === true) {
this.$tr.append(frag);
this.element.append(this.$table);
}
}, },
resize: function () { resize: function () {

17
src/core/wrapper/layout/adapt/adapt.horizontal.js

@ -86,20 +86,9 @@ BI.HorizontalAdaptLayout = BI.inherit(BI.Layout, {
return td; return td;
}, },
_mountChildren: function () { appendFragment: function (frag) {
var self = this; this.$tr.append(frag);
var frag = document.createDocumentFragment(); this.element.append(this.$table);
var hasChild = false;
BI.each(this._children, function (i, widget) {
if (widget.element !== self.element) {
frag.appendChild(widget.element[0]);
hasChild = true;
}
});
if (hasChild === true) {
this.$tr.append(frag);
this.element.append(this.$table);
}
}, },
resize: function () { resize: function () {

17
src/core/wrapper/layout/adapt/adapt.vertical.js

@ -87,20 +87,9 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
return td; return td;
}, },
_mountChildren: function () { appendFragment: function (frag) {
var self = this; this.$tr.append(frag);
var frag = document.createDocumentFragment(); this.element.append(this.$table);
var hasChild = false;
BI.each(this._children, function (i, widget) {
if (widget.element !== self.element) {
frag.appendChild(widget.element[0]);
hasChild = true;
}
});
if (hasChild === true) {
this.$tr.append(frag);
this.element.append(this.$table);
}
}, },
_getWrapper: function () { _getWrapper: function () {

17
src/core/wrapper/layout/flex/wrapper/flex.wrapper.center.js

@ -24,20 +24,9 @@ BI.FlexCenterLayout = BI.inherit(BI.Layout, {
return w; return w;
}, },
_mountChildren: function () { appendFragment: function (frag) {
var self = this; this.$wrapper.append(frag);
var frag = document.createDocumentFragment(); this.element.append(this.$wrapper);
var hasChild = false;
BI.each(this._children, function (i, widget) {
if (widget.element !== self.element) {
frag.appendChild(widget.element[0]);
hasChild = true;
}
});
if (hasChild === true) {
this.$wrapper.append(frag);
this.element.append(this.$wrapper);
}
}, },
_getWrapper: function () { _getWrapper: function () {

17
src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js

@ -54,20 +54,9 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, {
return w; return w;
}, },
_mountChildren: function () { appendFragment: function (frag) {
var self = this; this.$wrapper.append(frag);
var frag = document.createDocumentFragment(); this.element.append(this.$wrapper);
var hasChild = false;
BI.each(this._children, function (i, widget) {
if (widget.element !== self.element) {
frag.appendChild(widget.element[0]);
hasChild = true;
}
});
if (hasChild === true) {
this.$wrapper.append(frag);
this.element.append(this.$wrapper);
}
}, },
_getWrapper: function () { _getWrapper: function () {

17
src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.center.js

@ -54,20 +54,9 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
return w; return w;
}, },
_mountChildren: function () { appendFragment: function (frag) {
var self = this; this.$wrapper.append(frag);
var frag = document.createDocumentFragment(); this.element.append(this.$wrapper);
var hasChild = false;
BI.each(this._children, function (i, widget) {
if (widget.element !== self.element) {
frag.appendChild(widget.element[0]);
hasChild = true;
}
});
if (hasChild === true) {
this.$wrapper.append(frag);
this.element.append(this.$wrapper);
}
}, },
_getWrapper: function () { _getWrapper: function () {

18
src/core/wrapper/layout/layout.horizontal.js

@ -87,23 +87,11 @@ BI.HorizontalLayout = BI.inherit(BI.Layout, {
return td; return td;
}, },
_mountChildren: function () { appendFragment: function (frag) {
var self = this; this.$tr.append(frag);
var frag = document.createDocumentFragment(); this.element.append(this.$table);
var hasChild = false;
BI.each(this._children, function (i, widget) {
if (widget.element !== self.element) {
frag.appendChild(widget.element[0]);
hasChild = true;
}
});
if (hasChild === true) {
this.$tr.append(frag);
this.element.append(this.$table);
}
}, },
resize: function () { resize: function () {
// console.log("horizontal layout do not need to resize"); // console.log("horizontal layout do not need to resize");
}, },

17
src/core/wrapper/layout/layout.td.js

@ -119,20 +119,9 @@ BI.TdLayout = BI.inherit(BI.Layout, {
return tr; return tr;
}, },
_mountChildren: function () { appendFragment: function (frag) {
var self = this; this.$table.append(frag);
var frag = document.createDocumentFragment(); this.element.append(this.$table);
var hasChild = false;
BI.each(this._children, function (i, widget) {
if (widget.element !== self.element) {
frag.appendChild(widget.element[0]);
hasChild = true;
}
});
if (hasChild === true) {
this.$table.append(frag);
this.element.append(this.$table);
}
}, },
resize: function () { resize: function () {

Loading…
Cancel
Save