Browse Source

Merge branch 'master' of ssh://cloud.finedevelop.com:7999/~windy/fui

# Conflicts:
#	dist/_fineui.min.js
#	dist/bundle.min.js
#	dist/fineui.min.js
es6
windy 7 years ago
parent
commit
95f88f44da
  1. 24
      Gruntfile.js
  2. 64
      dist/bundle.js
  3. 64
      dist/core.js
  4. 766
      package-lock.json
  5. 1
      package.json
  6. 16
      src/core/config.js
  7. 16
      src/core/wrapper/layout/adapt/inline.center.js
  8. 16
      src/core/wrapper/layout/adapt/inline.vertical.js
  9. 16
      src/core/wrapper/layout/layout.inline.js

24
Gruntfile.js

@ -257,6 +257,27 @@ module.exports = function (grunt) {
spanw: true, spanw: true,
interrupt: true interrupt: true
} }
},
livereload: {
options: {
livereload: "<%= connect.options.livereload %>"
},
files: ["src/**/*.js", "src/**/*.less"]
}
},
connect: {
options: {
port: 9000,
open: true,
livereload: 35729,
// Change this to '0.0.0.0' to access the server from outside
hostname: "localhost"
},
server: {
options: {
port: 9001,
base: "./dist"
}
} }
} }
}); });
@ -267,8 +288,9 @@ module.exports = function (grunt) {
grunt.loadNpmTasks("grunt-contrib-watch"); grunt.loadNpmTasks("grunt-contrib-watch");
grunt.loadNpmTasks("grunt-contrib-concat"); grunt.loadNpmTasks("grunt-contrib-concat");
grunt.loadNpmTasks("grunt-contrib-cssmin"); grunt.loadNpmTasks("grunt-contrib-cssmin");
grunt.loadNpmTasks("grunt-contrib-connect");
grunt.registerTask("default", ["less", "concat", "watch"]); grunt.registerTask("default", ["less", "concat", "connect", "watch"]);
grunt.registerTask("min", ["less", "concat", "uglify", "cssmin"]); grunt.registerTask("min", ["less", "concat", "uglify", "cssmin"]);
grunt.registerTask("build", ["less", "concat", "uglify", "cssmin", "uglify", "concat"]); grunt.registerTask("build", ["less", "concat", "uglify", "cssmin", "uglify", "concat"]);
}; };

64
dist/bundle.js vendored

@ -26508,7 +26508,7 @@ BI.RedMarkBehavior = BI.inherit(BI.Behavior, {
return BI.extend(ob, {type: "bi.flex_horizontal"}); return BI.extend(ob, {type: "bi.flex_horizontal"});
} }
return ob; return ob;
}); });
BI.Plugin.registerWidget("bi.center_adapt", function (ob) { BI.Plugin.registerWidget("bi.center_adapt", function (ob) {
if (!BI.isIE() && isSupportFlex && ob.items && ob.items.length <= 1) { if (!BI.isIE() && isSupportFlex && ob.items && ob.items.length <= 1) {
@ -26520,7 +26520,7 @@ BI.RedMarkBehavior = BI.inherit(BI.Behavior, {
return BI.extend(ob, {type: "bi.flex_center"}); return BI.extend(ob, {type: "bi.flex_center"});
} }
return ob; return ob;
}); });
BI.Plugin.registerWidget("bi.vertical_adapt", function (ob) { BI.Plugin.registerWidget("bi.vertical_adapt", function (ob) {
if (!BI.isIE() && isSupportFlex) { if (!BI.isIE() && isSupportFlex) {
@ -26532,7 +26532,7 @@ BI.RedMarkBehavior = BI.inherit(BI.Behavior, {
return BI.extend(ob, {type: "bi.flex_vertical_center"}); return BI.extend(ob, {type: "bi.flex_vertical_center"});
} }
return ob; return ob;
}); });
BI.Plugin.registerWidget("bi.float_center_adapt", function (ob) { BI.Plugin.registerWidget("bi.float_center_adapt", function (ob) {
if (!BI.isIE() && isSupportFlex) { if (!BI.isIE() && isSupportFlex) {
@ -26544,7 +26544,7 @@ BI.RedMarkBehavior = BI.inherit(BI.Behavior, {
return BI.extend(ob, {type: "bi.flex_center"}); return BI.extend(ob, {type: "bi.flex_center"});
} }
return ob; return ob;
}); });
// 注册滚动条 // 注册滚动条
BI.Plugin.registerWidget("bi.grid_table_scrollbar", function (ob) { BI.Plugin.registerWidget("bi.grid_table_scrollbar", function (ob) {
@ -26552,14 +26552,14 @@ BI.RedMarkBehavior = BI.inherit(BI.Behavior, {
return BI.extend(ob, {type: "bi.native_table_scrollbar"}); return BI.extend(ob, {type: "bi.native_table_scrollbar"});
} }
return ob; return ob;
}); });
BI.Plugin.registerWidget("bi.grid_table_horizontal_scrollbar", function (ob) { BI.Plugin.registerWidget("bi.grid_table_horizontal_scrollbar", function (ob) {
if (BI.isIE9Below()) { if (BI.isIE9Below()) {
return BI.extend(ob, {type: "bi.native_table_horizontal_scrollbar"}); return BI.extend(ob, {type: "bi.native_table_horizontal_scrollbar"});
} }
return ob; return ob;
}); });
// 注册控件 // 注册控件
@ -26569,7 +26569,7 @@ BI.RedMarkBehavior = BI.inherit(BI.Behavior, {
return BI.extend(ob, {type: "bi.quick_grid_table"}); return BI.extend(ob, {type: "bi.quick_grid_table"});
} }
return ob; return ob;
}); });
BI.Plugin.registerWidget("bi.collection_table", function (ob) { BI.Plugin.registerWidget("bi.collection_table", function (ob) {
// 非chrome下滚动条滑动效果不好,禁止掉 // 非chrome下滚动条滑动效果不好,禁止掉
@ -26577,7 +26577,7 @@ BI.RedMarkBehavior = BI.inherit(BI.Behavior, {
return BI.extend(ob, {type: "bi.quick_collection_table"}); return BI.extend(ob, {type: "bi.quick_collection_table"});
} }
return ob; return ob;
}); });
// IE8下滚动条用原生的 // IE8下滚动条用原生的
$(function () { $(function () {
@ -31465,24 +31465,24 @@ BI.InlineCenterAdaptLayout = BI.inherit(BI.Layout, {
"*zoom": 1, "*zoom": 1,
"min-width": 100 / length + "%" "min-width": 100 / length + "%"
}); });
if (o.hgap + o.lgap + (item.lgap || 0) > 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) > 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) > 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) > 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return w; return w;
@ -31551,24 +31551,24 @@ BI.InlineVerticalAdaptLayout = BI.inherit(BI.Layout, {
"*display": "inline", "*display": "inline",
"*zoom": 1 "*zoom": 1
}); });
if (o.hgap + o.lgap + (item.lgap || 0) > 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) > 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) > 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) > 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return w; return w;
@ -33209,24 +33209,24 @@ BI.InlineLayout = BI.inherit(BI.Layout, {
var o = this.options; var o = this.options;
var w = BI.InlineLayout.superclass._addElement.apply(this, arguments); var w = BI.InlineLayout.superclass._addElement.apply(this, arguments);
w.element.css({"position": "relative", display: "inline-block", "*display": "inline", "*zoom": 1}); w.element.css({"position": "relative", display: "inline-block", "*display": "inline", "*zoom": 1});
if (o.hgap + o.lgap + (item.lgap || 0) > 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) > 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) > 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) > 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return w; return w;

64
dist/core.js vendored

@ -26508,7 +26508,7 @@ BI.RedMarkBehavior = BI.inherit(BI.Behavior, {
return BI.extend(ob, {type: "bi.flex_horizontal"}); return BI.extend(ob, {type: "bi.flex_horizontal"});
} }
return ob; return ob;
}); });
BI.Plugin.registerWidget("bi.center_adapt", function (ob) { BI.Plugin.registerWidget("bi.center_adapt", function (ob) {
if (!BI.isIE() && isSupportFlex && ob.items && ob.items.length <= 1) { if (!BI.isIE() && isSupportFlex && ob.items && ob.items.length <= 1) {
@ -26520,7 +26520,7 @@ BI.RedMarkBehavior = BI.inherit(BI.Behavior, {
return BI.extend(ob, {type: "bi.flex_center"}); return BI.extend(ob, {type: "bi.flex_center"});
} }
return ob; return ob;
}); });
BI.Plugin.registerWidget("bi.vertical_adapt", function (ob) { BI.Plugin.registerWidget("bi.vertical_adapt", function (ob) {
if (!BI.isIE() && isSupportFlex) { if (!BI.isIE() && isSupportFlex) {
@ -26532,7 +26532,7 @@ BI.RedMarkBehavior = BI.inherit(BI.Behavior, {
return BI.extend(ob, {type: "bi.flex_vertical_center"}); return BI.extend(ob, {type: "bi.flex_vertical_center"});
} }
return ob; return ob;
}); });
BI.Plugin.registerWidget("bi.float_center_adapt", function (ob) { BI.Plugin.registerWidget("bi.float_center_adapt", function (ob) {
if (!BI.isIE() && isSupportFlex) { if (!BI.isIE() && isSupportFlex) {
@ -26544,7 +26544,7 @@ BI.RedMarkBehavior = BI.inherit(BI.Behavior, {
return BI.extend(ob, {type: "bi.flex_center"}); return BI.extend(ob, {type: "bi.flex_center"});
} }
return ob; return ob;
}); });
// 注册滚动条 // 注册滚动条
BI.Plugin.registerWidget("bi.grid_table_scrollbar", function (ob) { BI.Plugin.registerWidget("bi.grid_table_scrollbar", function (ob) {
@ -26552,14 +26552,14 @@ BI.RedMarkBehavior = BI.inherit(BI.Behavior, {
return BI.extend(ob, {type: "bi.native_table_scrollbar"}); return BI.extend(ob, {type: "bi.native_table_scrollbar"});
} }
return ob; return ob;
}); });
BI.Plugin.registerWidget("bi.grid_table_horizontal_scrollbar", function (ob) { BI.Plugin.registerWidget("bi.grid_table_horizontal_scrollbar", function (ob) {
if (BI.isIE9Below()) { if (BI.isIE9Below()) {
return BI.extend(ob, {type: "bi.native_table_horizontal_scrollbar"}); return BI.extend(ob, {type: "bi.native_table_horizontal_scrollbar"});
} }
return ob; return ob;
}); });
// 注册控件 // 注册控件
@ -26569,7 +26569,7 @@ BI.RedMarkBehavior = BI.inherit(BI.Behavior, {
return BI.extend(ob, {type: "bi.quick_grid_table"}); return BI.extend(ob, {type: "bi.quick_grid_table"});
} }
return ob; return ob;
}); });
BI.Plugin.registerWidget("bi.collection_table", function (ob) { BI.Plugin.registerWidget("bi.collection_table", function (ob) {
// 非chrome下滚动条滑动效果不好,禁止掉 // 非chrome下滚动条滑动效果不好,禁止掉
@ -26577,7 +26577,7 @@ BI.RedMarkBehavior = BI.inherit(BI.Behavior, {
return BI.extend(ob, {type: "bi.quick_collection_table"}); return BI.extend(ob, {type: "bi.quick_collection_table"});
} }
return ob; return ob;
}); });
// IE8下滚动条用原生的 // IE8下滚动条用原生的
$(function () { $(function () {
@ -31465,24 +31465,24 @@ BI.InlineCenterAdaptLayout = BI.inherit(BI.Layout, {
"*zoom": 1, "*zoom": 1,
"min-width": 100 / length + "%" "min-width": 100 / length + "%"
}); });
if (o.hgap + o.lgap + (item.lgap || 0) > 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) > 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) > 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) > 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return w; return w;
@ -31551,24 +31551,24 @@ BI.InlineVerticalAdaptLayout = BI.inherit(BI.Layout, {
"*display": "inline", "*display": "inline",
"*zoom": 1 "*zoom": 1
}); });
if (o.hgap + o.lgap + (item.lgap || 0) > 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) > 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) > 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) > 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return w; return w;
@ -33209,24 +33209,24 @@ BI.InlineLayout = BI.inherit(BI.Layout, {
var o = this.options; var o = this.options;
var w = BI.InlineLayout.superclass._addElement.apply(this, arguments); var w = BI.InlineLayout.superclass._addElement.apply(this, arguments);
w.element.css({"position": "relative", display: "inline-block", "*display": "inline", "*zoom": 1}); w.element.css({"position": "relative", display: "inline-block", "*display": "inline", "*zoom": 1});
if (o.hgap + o.lgap + (item.lgap || 0) > 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) > 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) > 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) > 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return w; return w;

766
package-lock.json generated

File diff suppressed because it is too large Load Diff

1
package.json

@ -8,6 +8,7 @@
"express": "^4.15.2", "express": "^4.15.2",
"grunt": "^1.0.1", "grunt": "^1.0.1",
"grunt-contrib-concat": "^1.0.1", "grunt-contrib-concat": "^1.0.1",
"grunt-contrib-connect": "^1.0.2",
"grunt-contrib-cssmin": "^1.0.1", "grunt-contrib-cssmin": "^1.0.1",
"grunt-contrib-jshint": "^1.0.0", "grunt-contrib-jshint": "^1.0.0",
"grunt-contrib-less": "^1.4.1", "grunt-contrib-less": "^1.4.1",

16
src/core/config.js

@ -7,7 +7,7 @@
return BI.extend(ob, {type: "bi.flex_horizontal"}); return BI.extend(ob, {type: "bi.flex_horizontal"});
} }
return ob; return ob;
}); });
BI.Plugin.registerWidget("bi.center_adapt", function (ob) { BI.Plugin.registerWidget("bi.center_adapt", function (ob) {
if (!BI.isIE() && isSupportFlex && ob.items && ob.items.length <= 1) { if (!BI.isIE() && isSupportFlex && ob.items && ob.items.length <= 1) {
@ -19,7 +19,7 @@
return BI.extend(ob, {type: "bi.flex_center"}); return BI.extend(ob, {type: "bi.flex_center"});
} }
return ob; return ob;
}); });
BI.Plugin.registerWidget("bi.vertical_adapt", function (ob) { BI.Plugin.registerWidget("bi.vertical_adapt", function (ob) {
if (!BI.isIE() && isSupportFlex) { if (!BI.isIE() && isSupportFlex) {
@ -31,7 +31,7 @@
return BI.extend(ob, {type: "bi.flex_vertical_center"}); return BI.extend(ob, {type: "bi.flex_vertical_center"});
} }
return ob; return ob;
}); });
BI.Plugin.registerWidget("bi.float_center_adapt", function (ob) { BI.Plugin.registerWidget("bi.float_center_adapt", function (ob) {
if (!BI.isIE() && isSupportFlex) { if (!BI.isIE() && isSupportFlex) {
@ -43,7 +43,7 @@
return BI.extend(ob, {type: "bi.flex_center"}); return BI.extend(ob, {type: "bi.flex_center"});
} }
return ob; return ob;
}); });
// 注册滚动条 // 注册滚动条
BI.Plugin.registerWidget("bi.grid_table_scrollbar", function (ob) { BI.Plugin.registerWidget("bi.grid_table_scrollbar", function (ob) {
@ -51,14 +51,14 @@
return BI.extend(ob, {type: "bi.native_table_scrollbar"}); return BI.extend(ob, {type: "bi.native_table_scrollbar"});
} }
return ob; return ob;
}); });
BI.Plugin.registerWidget("bi.grid_table_horizontal_scrollbar", function (ob) { BI.Plugin.registerWidget("bi.grid_table_horizontal_scrollbar", function (ob) {
if (BI.isIE9Below()) { if (BI.isIE9Below()) {
return BI.extend(ob, {type: "bi.native_table_horizontal_scrollbar"}); return BI.extend(ob, {type: "bi.native_table_horizontal_scrollbar"});
} }
return ob; return ob;
}); });
// 注册控件 // 注册控件
@ -68,7 +68,7 @@
return BI.extend(ob, {type: "bi.quick_grid_table"}); return BI.extend(ob, {type: "bi.quick_grid_table"});
} }
return ob; return ob;
}); });
BI.Plugin.registerWidget("bi.collection_table", function (ob) { BI.Plugin.registerWidget("bi.collection_table", function (ob) {
// 非chrome下滚动条滑动效果不好,禁止掉 // 非chrome下滚动条滑动效果不好,禁止掉
@ -76,7 +76,7 @@
return BI.extend(ob, {type: "bi.quick_collection_table"}); return BI.extend(ob, {type: "bi.quick_collection_table"});
} }
return ob; return ob;
}); });
// IE8下滚动条用原生的 // IE8下滚动条用原生的
$(function () { $(function () {

16
src/core/wrapper/layout/adapt/inline.center.js

@ -52,24 +52,24 @@ BI.InlineCenterAdaptLayout = BI.inherit(BI.Layout, {
"*zoom": 1, "*zoom": 1,
"min-width": 100 / length + "%" "min-width": 100 / length + "%"
}); });
if (o.hgap + o.lgap + (item.lgap || 0) > 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) > 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) > 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) > 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return w; return w;

16
src/core/wrapper/layout/adapt/inline.vertical.js

@ -39,24 +39,24 @@ BI.InlineVerticalAdaptLayout = BI.inherit(BI.Layout, {
"*display": "inline", "*display": "inline",
"*zoom": 1 "*zoom": 1
}); });
if (o.hgap + o.lgap + (item.lgap || 0) > 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) > 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) > 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) > 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return w; return w;

16
src/core/wrapper/layout/layout.inline.js

@ -30,24 +30,24 @@ BI.InlineLayout = BI.inherit(BI.Layout, {
var o = this.options; var o = this.options;
var w = BI.InlineLayout.superclass._addElement.apply(this, arguments); var w = BI.InlineLayout.superclass._addElement.apply(this, arguments);
w.element.css({"position": "relative", display: "inline-block", "*display": "inline", "*zoom": 1}); w.element.css({"position": "relative", display: "inline-block", "*display": "inline", "*zoom": 1});
if (o.hgap + o.lgap + (item.lgap || 0) > 0) { if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px" "margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
}); });
} }
if (o.hgap + o.rgap + (item.rgap || 0) > 0) { if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px" "margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
}); });
} }
if (o.vgap + o.tgap + (item.tgap || 0) > 0) { if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px" "margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
}); });
} }
if (o.vgap + o.bgap + (item.bgap || 0) > 0) { if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({ w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px" "margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
}); });
} }
return w; return w;

Loading…
Cancel
Save