Browse Source

Merge pull request #838 in VISUAL/fineui from ~WINDY/fineui:master to master

* commit 'c29467d2a8aad37d0fa64aafb0d6d6701d26b079':
  test:test
  refactor: 目录接口改一改, 文件移一移
master
windy 6 years ago
parent
commit
e24caf71a0
  1. 2
      demo/config.js
  2. 47
      demo/js/category/largeTable/cell.js
  3. 38
      demo/js/category/largeTable/header.js
  4. 40
      demo/js/category/largeTable/sequenceheadercell.normal.js
  5. 2
      demo/js/category/largeTable/table.js
  6. 138
      demo/js/category/sortTree/demo.sortTree.js
  7. 82
      demo/js/config/fix.js
  8. 195
      demo/js/fix-1.0/change.js
  9. 173
      demo/js/fix-1.0/local.js
  10. 129
      demo/js/fix-1.0/setget.js
  11. 267
      demo/js/fix-1.0/skipto.js
  12. 158
      demo/js/fix-1.0/spliceduplicate.js
  13. 286
      demo/js/fix-1.0/tmp.js
  14. 3
      demo/js/widget/downlist/demo.downlist.js
  15. 8
      dist/base.css
  16. 8
      dist/bundle.css
  17. 2
      dist/bundle.ie.min.js
  18. 2
      dist/bundle.min.css
  19. 2
      dist/bundle.min.js
  20. 1703
      dist/demo.js
  21. 8
      dist/fineui.css
  22. 2
      dist/fineui.ie.min.js
  23. 2
      dist/fineui.min.css
  24. 2
      dist/fineui.min.js
  25. 2785
      dist/fix/fix-1.0.js
  26. 2
      dist/utils.min.js
  27. 2
      index.html
  28. 8
      src/css/base/editor/editor.css
  29. 4
      src/less/base/editor/editor.search.less
  30. 4
      src/less/base/editor/editor.search.small.less
  31. 1
      src/less/lib/constant.less

2
demo/config.js

@ -1,4 +1,4 @@
Demo.CONFIG = Demo.CORE_CONFIG.concat(Demo.BASE_CONFIG).concat(Demo.CASE_CONFIG).concat(Demo.WIDGET_CONFIG).concat(Demo.COMPONENT_CONFIG).concat(Demo.FIX_CONFIG).concat(Demo.CATEGORY_CONFIG); Demo.CONFIG = Demo.CORE_CONFIG.concat(Demo.BASE_CONFIG).concat(Demo.CASE_CONFIG).concat(Demo.WIDGET_CONFIG).concat(Demo.COMPONENT_CONFIG).concat(Demo.FIX_CONFIG);
Demo.CONSTANTS = { Demo.CONSTANTS = {
SIMPLE_ITEMS: BI.map("柳州市城贸金属材料有限责任公司 柳州市建福房屋租赁有限公司 柳州市迅昌数码办公设备有限责任公司 柳州市河海贸易有限责任公司 柳州市花篮制衣厂 柳州市兴溪物资有限公司 柳州市针织总厂 柳州市衡管物资有限公司 柳州市琪成机电设备有限公司 柳州市松林工程机械修理厂".match(/[^\s]+/g), function (i, v) { SIMPLE_ITEMS: BI.map("柳州市城贸金属材料有限责任公司 柳州市建福房屋租赁有限公司 柳州市迅昌数码办公设备有限责任公司 柳州市河海贸易有限责任公司 柳州市花篮制衣厂 柳州市兴溪物资有限公司 柳州市针织总厂 柳州市衡管物资有限公司 柳州市琪成机电设备有限公司 柳州市松林工程机械修理厂".match(/[^\s]+/g), function (i, v) {

47
demo/js/category/largeTable/cell.js

@ -1,47 +0,0 @@
/**
* Created by roy on 16/5/23.
*/
BI.DetailTableCell = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.DetailTableCell.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-detail-table-cell",
dId: "",
text: ""
});
},
_init: function () {
BI.DetailTableCell.superclass._init.apply(this, arguments);
this._createItem();
},
_createItem: function () {
var self = this, o = this.options;
var type = this.options.dimensionType;
var item = BI.createWidget({
type: "bi.label",
height: o.height,
text: o.text,
title: o.text,
lgap: 5,
rgap: 5
});
if (BI.isNotEmptyString(o.color)) {
this.element.css("color", o.color);
}
BI.createWidget({
type: "bi.vertical",
element: this,
items: [item]
});
// 表格样式
if (BI.isNotNull(o.styles) && BI.isObject(o.styles)) {
this.element.css(o.styles);
}
}
});
BI.shortcut("bi.detail_table_cell", BI.DetailTableCell);

38
demo/js/category/largeTable/header.js

@ -1,38 +0,0 @@
/**
* Created by Young's on 2016/4/15.
*/
BI.DetailTableHeader = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.DetailTableHeader.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-detail-table-header"
});
},
_init: function () {
BI.DetailTableHeader.superclass._init.apply(this, arguments);
var self = this, o = this.options;
var dId = o.dId;
var name = o.text;
BI.createWidget({
type: "bi.htape",
element: this,
items: [{
el: {
type: "bi.label",
text: name,
title: name,
whiteSpace: "nowrap",
textAlign: "center",
lgap: 5,
height: o.height
}
}]
});
// 表格样式
if (BI.isNotNull(o.styles) && BI.isObject(o.styles)) {
this.element.css(o.styles);
}
}
});
BI.shortcut("bi.detail_table_header", BI.DetailTableHeader);

40
demo/js/category/largeTable/sequenceheadercell.normal.js

@ -1,40 +0,0 @@
/**
* created by young
* 默认风格表格表头
*/
BI.NormalSequenceHeaderCell = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.NormalSequenceHeaderCell.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-normal-sequence-header-cell"
});
},
_init: function () {
BI.NormalSequenceHeaderCell.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.text = BI.createWidget({
type: "bi.label",
element: this,
textAlign: "left",
height: o.height,
forceCenter: true,
hgap: 5,
text: BI.i18nText("BI-Number_Index")
});
this._digestStyle();
},
_digestStyle: function () {
var o = this.options;
var style = o.styleGetter();
if (style) {
this.element.css(style);
}
},
populate: function () {
this._digestStyle();
}
});
BI.NormalSequenceHeaderCell.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.normal_sequence_header_cell", BI.NormalSequenceHeaderCell);

2
demo/js/category/largeTable/table.js

File diff suppressed because one or more lines are too long

138
demo/js/category/sortTree/demo.sortTree.js

@ -1,138 +0,0 @@
Demo.Expander = BI.inherit(BI.Widget, {
render: function () {
var self = this, o = this.options;
return {
type: "bi.expander",
ref: function () {
self.expander = this;
},
el: o.el,
popup: o.popup
};
},
update: function (opt) {
this.expander.populate(opt.items);
return true;
}
});
BI.shortcut("demo.sort_tree_expander", Demo.Expander);
/**
* guy
* 二级树
* @class Demo.SortTree
* @extends BI.Widget
*/
Demo.SortTree = BI.inherit(BI.Widget, {
render: function () {
BI.$import("https://coding.net/u/fanruan/p/bi-components/git/raw/master/dist/jqueryui.js");
var self = this, o = this.options;
var tree = new BI.Tree();
tree.initTree(BI.Tree.transformToTreeFormat(Demo.CONSTANTS.TREEITEMS));
this.tree = BI.createWidget({
type: "bi.custom_tree",
element: this,
expander: {
type: "demo.sort_tree_expander"
},
items: this._formatItems(0, tree.toJSON()),
el: {
type: "bi.virtual_group",
layouts: [{
type: "bi.vertical",
scrolly: false
}]
}
});
BI.delay(function () {
self.tree.element.sortable({
items: ".sort-item",
placeholder: {
element: function ($currentItem) {
var holder = BI.createWidget({
type: "bi.layout",
cls: "bi-sortable-holder",
height: $currentItem.outerHeight()
});
holder.element.css({
"margin-left": $currentItem.css("margin-left"),
"margin-right": $currentItem.css("margin-right"),
"margin-top": $currentItem.css("margin-top"),
"margin-bottom": $currentItem.css("margin-bottom"),
margin: $currentItem.css("margin")
});
return holder.element;
},
update: function () {
}
},
update: function (event, ui) {
var node = ui.item.data("node");
var findTheNode = tree.search(node.id);
// 这里简单处理下找到它的父节点
var currentIndex = 0, parentNode;
if (ui.item.next().length > 0) {
var n = ui.item.next().data("node");
var nextId = n.id;
var nextNode = tree.search(nextId);
parentNode = nextNode.getParent();
var nextIndex = parentNode.getChildIndex(nextId);
currentIndex = nextIndex > 0 && (nextIndex - 1);
} else if (ui.item.prev().length > 0) {
var n = ui.item.prev().data("node");
var prevId = n.id;
var prevNode = tree.search(prevId);
parentNode = prevNode.getParent();
var prevIndex = parentNode.getChildIndex(prevId);
currentIndex = prevIndex + 1;
}
findTheNode.getParent().removeChild(node.id);
parentNode.addChild(findTheNode, currentIndex);
console.log(tree.toJSON());
self.tree.populate(self._formatItems(0, tree.toJSON()));
},
start: function (event, ui) {
},
stop: function (event, ui) {
},
over: function (event, ui) {
}
});
}, 2000);
},
_formatItems: function (layer, nodes) {
var self = this;
BI.each(nodes, function (i, node) {
if (node.isParent === true || BI.isNotEmptyArray(node.children)) {
BI.defaults(node, {
type: "bi.multilayer_icon_arrow_node",
height: 30,
layer: layer
});
self._formatItems(layer + 1, node.children);
} else {
BI.defaults(node, {
type: "bi.multilayer_icon_tree_leaf_item",
cls: "sort-item",
height: 30,
key: node.id,
layer: layer,
data: {
node: node
}
});
}
});
return nodes;
}
});
BI.shortcut("demo.sort_tree", Demo.SortTree);

82
demo/js/config/fix.js

@ -1,86 +1,4 @@
// 定义Model路由
var modelRouter = new (BI.inherit(BI.WRouter, {
routes: {
"": "index"
},
index: function () {
return {};
}
}));
// 定义View路由
var viewRouter = new (BI.inherit(BI.WRouter, {
routes: {
"": "TestView",
"/setget": "SetGetView",
"/local": "LocalView",
"/skipTo": "SkipToView",
"/skipTo/:child": "getSkipToView",
"/change": "ChangeView",
"/change/inner": "ChangeInnerView",
"/static": "StaticView",
"/event": "EventView",
"/layer": "LayerView",
"/masker": "MaskerView",
"/floatbox": "FloatBoxView",
"/spliceDuplicate": "SpliceDuplicateView",
"/spliceDuplicate/sdSub": "SDSubView",
"/tmp": "TmpView",
"/tmp/child": "TmpChildView",
"/tmp/child/child": "TmpChildChildView"
},
getSkipToView: function (v) {
switch (v) {
case "red":
return "SkipToRedView";
case "blue":
return "SkipToBlueView";
case "green":
return "SkipToGreenView";
case "yellow":
return "SkipToYellowView";
default :
return "SkipToRedView";
}
}
}));
// 注册路由
BI.View.registerVMRouter(viewRouter, modelRouter);
Demo.FIX_CONFIG = [{ Demo.FIX_CONFIG = [{
id: 6,
text: "数据流框架fix-1.0"
}, {
pId: 6,
text: "set,get方法",
value: "demo.setget"
}, {
pId: 6,
text: "local函数",
value: "demo.local"
}, {
pId: 6,
text: "skipTo函数",
value: "demo.skipTo"
}, {
pId: 6,
text: "change函数",
value: "demo.change"
}, {
pId: 6,
text: "splice和duplicate函数",
value: "demo.spliceDuplicate"
}, {
pId: 6,
text: "tmp方法",
value: "demo.tmp"
}, {
id: 7, id: 7,
text: "数据流框架fix-2.0" text: "数据流框架fix-2.0"
}, { }, {

195
demo/js/fix-1.0/change.js

@ -1,195 +0,0 @@
// change函数
ChangeView = BI.inherit(BI.View, {
_defaultConfig: function () {
return BI.extend(ChangeView.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-change"
});
},
_init: function () {
ChangeView.superclass._init.apply(this, arguments);
},
change: function (changed) {
if(changed.child) {
this._showModelData();
}
if(changed.superiors) {
this._showModelData();
}
},
_showModelData: function () {
this.outerText.setText("父级Model层数据: " + JSON.stringify(this.model.toJSON()));
},
_createOuter: function () {
this.outerText = BI.createWidget({
type: "bi.label",
cls: "outer-text",
whiteSpace: "normal"
});
return BI.createWidget({
type: "bi.border",
items: {
north: {
el: this.outerText,
height: 50
},
center: this._createInner()
}
});
},
_createInner: function () {
var innerPane = BI.createWidget({
type: "bi.absolute",
cls: "inner"
});
this.addSubVessel("innerPane", innerPane, {
defaultShowName: "inner"
});
return innerPane;
},
render: function (vessel) {
BI.createWidget({
type: "bi.center",
element: vessel,
items: [this._createOuter()],
hgap: 100,
vgap: 100
});
this._showModelData();
},
refresh: function () {
this.skipTo("inner", "innerPane", "superiors");
}
});
ChangeModel = BI.inherit(BI.Model, {
_defaultConfig: function () {
return BI.extend(ChangeModel.superclass._defaultConfig.apply(this, arguments), {
superiors: {
child: "default"
},
child: "default"
});
},
_init: function () {
ChangeModel.superclass._init.apply(this, arguments);
},
change: function (changed) {
if(changed.superiors) {
this.set("child", changed.superiors.child);
}
}
});
// ChangeView 的子级
ChangeInnerView = BI.inherit(BI.View, {
_init: function () {
ChangeInnerView.superclass._init.apply(this, arguments);
},
change: function (changed) {
if(changed.child) {
this._showModelData();
}
},
_createOuter: function () {
var self = this;
this.text = BI.createWidget({
type: "bi.label",
height: 26
});
this.buttons = BI.createWidget({
type: "bi.button_group",
items: BI.createItems(this.model.get("items"), {
type: "bi.text_button",
height: 30,
textAlign: "center",
hgap: 20
})
});
this.buttons.on(BI.ButtonGroup.EVENT_CHANGE, function () {
self.model.set("child", this.getValue()[0]);
});
return BI.createWidget({
type: "bi.vertical",
vgap: 20,
items: [{
type: "bi.center",
items: [this.buttons],
height: 30
}, this.text]
});
},
_showModelData: function () {
this.text.setText("子级Model层数据: " + JSON.stringify(this.model.toJSON()));
},
render: function (vessel) {
BI.createWidget({
type: "bi.center",
element: vessel,
items: [this._createOuter()]
});
this._showModelData();
}
});
ChangeInnerModel = BI.inherit(BI.Model, {
_defaultConfig: function () {
return BI.extend(ChangeInnerModel.superclass._defaultConfig.apply(this, arguments), {
});
},
_static: function () {
return {
items: [{
text: "Type-1",
value: "First",
cls: "type-first mvc-button"
}, {
text: "Type-2",
value: "Second",
cls: "type-second mvc-button"
}, {
text: "Type-3",
value: "third",
cls: "type-third mvc-button"
}]
};
},
_init: function () {
ChangeInnerModel.superclass._init.apply(this, arguments);
}
});
Demo.Func = BI.inherit(BI.Widget, {
render: function () {
var view = BI.View.createView("/change", {}, {
element: this
});
view.populate();
},
mounted: function () {
}
});
BI.shortcut("demo.change", Demo.Func);

173
demo/js/fix-1.0/local.js

@ -1,173 +0,0 @@
// local函数
LocalView = BI.inherit(BI.View, {
_defaultConfig: function () {
return BI.extend(LocalView.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-local"
});
},
_init: function () {
LocalView.superclass._init.apply(this, arguments);
this.buttons = {};
},
_addElement2Vessel: function (id) {
var self = this;
this.buttons[id] = this.elementVessel.addItem({
type: "bi.text_button",
text: "Button:" + id,
width: 180,
height: 22,
cls: "delete-button button",
handler: function () {
self.set("delete", id);
}
});
},
_deleteElement: function (id) {
this.buttons[id] && this.buttons[id].destroy();
delete this.buttons[id];
},
_createTop: function () {
var self = this;
this.elementVessel = BI.createWidget({
type: "bi.left",
height: 200,
cls: "vessel-border",
scrollable: true,
vgap: 10,
hgap: 10
});
return BI.createWidget({
type: "bi.vertical",
items: [
{
el: {
type: "bi.text_button",
text: "点击添加元素",
cls: "top-button",
handler: function () {
self.model.set("add", true);
},
height: 30
}
},
this.elementVessel
]
});
},
_showModelData: function () {
this.text.setText(JSON.stringify(this.model.toJSON()));
},
_createCenter: function () {
var modelData = BI.createWidget({
type: "bi.center",
vgap: 10,
hgap: 10,
cls: "vessel-border",
height: 200,
items: [{
el: this.text = BI.createWidget({
type: "bi.label",
hgap: 30,
textHeight: 30,
whiteSpace: "normal"
})
}]
});
return BI.createWidget({
type: "bi.vertical",
items: [
{
el: {
type: "bi.label",
cls: "bottom-label",
text: "Model层数据",
height: 30
}
},
modelData
]
});
},
render: function (vessel) {
BI.createWidget({
type: "bi.vertical",
element: vessel,
items: [{
el: this._createTop()
}, {
el: this._createCenter()
}],
hgap: 50,
vgap: 20
});
this._showModelData();
},
local: function () {
if(this.model.has("add")) {
var add = this.model.get("add");
this._addElement2Vessel(this.model.getEditing());
this._showModelData();
return true;
}
if(this.model.has("delete")) {
var id = this.model.get("delete");
this._deleteElement(id);
this._showModelData();
return true;
}
return false;
}
});
LocalModel = BI.inherit(BI.Model, {
_defaultConfig: function () {
return BI.extend(LocalModel.superclass._defaultConfig.apply(this, arguments), {
});
},
_init: function () {
LocalModel.superclass._init.apply(this, arguments);
},
local: function () {
if(this.has("add")) {
this.get("add");
var id = BI.UUID();
this.set(id, "这是新增的属性:" + id);
this.setEditing(id);
return true;
}
if(this.has("delete")) {
var id = this.get("delete");
this.unset(id);
return true;
}
return false;
}
});
Demo.Func = BI.inherit(BI.Widget, {
render: function () {
var view = BI.View.createView("/local", {}, {
element: this
});
view.populate();
},
mounted: function () {
}
});
BI.shortcut("demo.local", Demo.Func);

129
demo/js/fix-1.0/setget.js

@ -1,129 +0,0 @@
// set、get函数
SetGetView = BI.inherit(BI.View, {
_defaultConfig: function () {
return BI.extend(SetGetView.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-set-get"
});
},
_init: function () {
SetGetView.superclass._init.apply(this, arguments);
},
change: function (changed) {
this._showModelData();
},
_createLeft: function () {
var self = this;
return (this.left = BI.createWidget({
type: "bi.border",
items: {
north: {
el: {
type: "bi.label",
cls: "left-title",
text: "get、set用法:",
height: 30
},
height: 30
},
center: {
el: {
type: "bi.button_group",
items: BI.createItems(this.model.get("arr"), {
type: "bi.text_button",
cls: "left-nav",
height: 30,
handler: function (v) {
self.model.set("click", v);
}
}),
layouts: [{
type: "bi.vertical"
}]
}
}
}
}));
},
_showModelData: function () {
this.text.setText(JSON.stringify(this.model.toJSON()));
},
_createRight: function () {
return (this.right = BI.createWidget({
type: "bi.border",
items: {
north: {
el: {
type: "bi.label",
cls: "right-title",
text: "Model层数据",
height: 30
},
height: 30
},
center: {
el: this.text = BI.createWidget({
type: "bi.label",
whiteSpace: "normal",
textHeight: 50
})
}
}
}));
},
render: function (vessel) {
BI.createWidget({
type: "bi.center",
element: vessel,
items: [{
el: this._createLeft()
}, {
el: this._createRight()
}],
hgap: 50,
vgap: 100
});
this._showModelData();
}
});
SetGetModel = BI.inherit(BI.Model, {
_defaultConfig: function () {
return BI.extend(SetGetModel.superclass._defaultConfig.apply(this, arguments), {
arr: [
{text: "item1", value: 1},
{text: "item2", value: 2},
{text: "item3", value: 3},
{text: "item4", value: 4},
{text: "item5", value: 5},
{text: "item6", value: 6},
{text: "item7", value: 7},
{text: "item8", value: 8}
]
});
},
_init: function () {
SetGetModel.superclass._init.apply(this, arguments);
}
});
Demo.Func = BI.inherit(BI.Widget, {
render: function () {
var view = BI.View.createView("/setget", {}, {
element: this
});
view.populate();
},
mounted: function () {
}
});
BI.shortcut("demo.setget", Demo.Func);

267
demo/js/fix-1.0/skipto.js

@ -1,267 +0,0 @@
// skipTo 函数
SkipToView = BI.inherit(BI.View, {
_defaultConfig: function () {
return BI.extend(SkipToView.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-skip-to"
});
},
_init: function () {
SkipToView.superclass._init.apply(this, arguments);
},
_createNav: function () {
var self = this;
var nav = BI.createWidget({
type: "bi.button_group",
cls: "top-nav",
items: BI.createItems(this.model.get("items"), {
type: "bi.text_button",
height: 30,
textAlign: "center",
hgap: 20
}),
layouts: [{
type: "bi.left",
height: 40,
vgap: 5,
hgap: 3
}]
});
nav.on(BI.ButtonGroup.EVENT_CHANGE, function () {
self.skipTo(this.getValue()[0], "pane", this.getValue()[0]);
});
return nav;
},
_createPane: function () {
var pane = BI.createWidget({
type: "bi.center",
cls: "center-pane",
height: 200
});
this.addSubVessel("pane", pane, {
defaultShowName: "green"
});
return pane;
},
render: function (vessel) {
BI.createWidget({
type: "bi.vertical",
element: vessel,
items: [this._createNav(), this._createPane()],
vgap: 10,
hgap: 10
});
},
refresh: function () {
this.skipTo("green", "pane", "green");
}
});
SkipToModel = BI.inherit(BI.Model, {
_defaultConfig: function () {
return BI.extend(SkipToModel.superclass._defaultConfig.apply(this, arguments), {
red: {
text: "hotpink"
}, blue: {
text: "cornflowerblue"
}, green: {
text: "darkcyan"
}, yellow: {
text: "darkgoldenrod"
}
});
},
_static: function () {
return {
items: [{
text: "hotpink",
value: "red",
cls: "red-pane mvc-button"
}, {
text: "cornflowerblue",
value: "blue",
cls: "blue-pane mvc-button"
}, {
text: "darkcyan",
value: "green",
cls: "green-pane mvc-button",
selected: true
}, {
text: "darkgoldenrod",
value: "yellow",
cls: "yellow-pane mvc-button"
}]
};
},
_init: function () {
SkipToModel.superclass._init.apply(this, arguments);
}
});
// Red pane #FF69B4
SkipToRedView = BI.inherit(BI.View, {
_init: function () {
SkipToRedView.superclass._init.apply(this, arguments);
},
render: function (vessel) {
BI.createWidget({
type: "bi.absolute",
element: vessel,
cls: "red-pane",
items: [{
el: {
type: "bi.label",
text: "Model Data: " + JSON.stringify(this.model.toJSON()),
hgap: 20,
height: 26
}
}]
});
}
});
SkipToRedModel = BI.inherit(BI.Model, {
_defaultConfig: function () {
return BI.extend(SetGetModel.superclass._defaultConfig.apply(this, arguments), {
});
},
_init: function () {
SkipToRedModel.superclass._init.apply(this, arguments);
}
});
// Blue pane #6495ED
SkipToBlueView = BI.inherit(BI.View, {
_init: function () {
SkipToBlueView.superclass._init.apply(this, arguments);
},
render: function (vessel) {
BI.createWidget({
type: "bi.absolute",
element: vessel,
cls: "blue-pane",
items: [{
el: {
type: "bi.label",
text: "Model Data: " + JSON.stringify(this.model.toJSON()),
hgap: 20,
height: 26
},
left: 0,
right: 0,
top: 0,
bottom: 0
}]
});
}
});
SkipToBlueModel = BI.inherit(BI.Model, {
_defaultConfig: function () {
return BI.extend(SetGetModel.superclass._defaultConfig.apply(this, arguments), {
});
},
_init: function () {
SkipToGreenModel.superclass._init.apply(this, arguments);
}
});
// Dark green pane #008B8B
SkipToGreenView = BI.inherit(BI.View, {
_init: function () {
SkipToGreenView.superclass._init.apply(this, arguments);
},
render: function (vessel) {
BI.createWidget({
type: "bi.absolute",
element: vessel,
cls: "green-pane",
items: [{
el: {
type: "bi.label",
text: "Model Data: " + JSON.stringify(this.model.toJSON()),
hgap: 20,
height: 26
},
left: 0,
right: 0,
top: 0,
bottom: 0
}]
});
}
});
SkipToGreenModel = BI.inherit(BI.Model, {
_defaultConfig: function () {
return BI.extend(SetGetModel.superclass._defaultConfig.apply(this, arguments), {
});
},
_init: function () {
SkipToGreenModel.superclass._init.apply(this, arguments);
}
});
// Dark yellow pane #B8860B
SkipToYellowView = BI.inherit(BI.View, {
_init: function () {
SkipToYellowView.superclass._init.apply(this, arguments);
},
render: function (vessel) {
BI.createWidget({
type: "bi.absolute",
element: vessel,
cls: "yellow-pane",
items: [{
el: {
type: "bi.label",
text: "Model Data: " + JSON.stringify(this.model.toJSON()),
hgap: 20,
height: 26
},
left: 0,
right: 0,
top: 0,
bottom: 0
}]
});
}
});
SkipToYellowModel = BI.inherit(BI.Model, {
_defaultConfig: function () {
return BI.extend(SetGetModel.superclass._defaultConfig.apply(this, arguments), {
});
},
_init: function () {
SkipToYellowModel.superclass._init.apply(this, arguments);
}
});
Demo.Func = BI.inherit(BI.Widget, {
render: function () {
var view = BI.View.createView("/skipTo", {}, {
element: this
});
view.populate();
},
mounted: function () {
}
});
BI.shortcut("demo.skipTo", Demo.Func);

158
demo/js/fix-1.0/spliceduplicate.js

@ -1,158 +0,0 @@
// splice和duplicate函数
SpliceDuplicateView = BI.inherit(BI.View, {
_defaultConfig: function () {
return BI.extend(SpliceDuplicateView.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-splice-duplicate"
});
},
_init: function () {
SpliceDuplicateView.superclass._init.apply(this, arguments);
this.children = {};
},
splice: function (old, key1, key2) {
this.children[key1].destroy();
delete this.children[key1];
this._showModelData();
},
duplicate: function (copy, key1, key2) {
this.add(copy);
this._showModelData();
},
_showModelData: function () {
// 这里只是为了输出this.model.data 原则上是不允许这么调用的
this.text.setText("父级数据:" + JSON.stringify(this.model.data));
},
render: function (vessel) {
this.text = BI.createWidget({
type: "bi.label",
height: 50,
cls: "superiors-label"
});
this.container = BI.createWidget({
type: "bi.vertical",
element: vessel,
items: [this.text],
hgap: 100,
vgap: 10
});
this._showModelData();
},
add: function (id) {
this.children[id] = BI.createWidget({
type: "bi.center",
hgap: 10,
vgap: 10
});
this.addSubVessel(id, this.children[id], {
defaultShowName: "sdSub"
});
this.skipTo("sdSub", id, id);
this.container.addItem(this.children[id]);
},
refresh: function () {
var self = this;
BI.each(this.model.toJSON(), function (key, value) {
if (!self.children[key]) {
self.add(key);
}
});
}
});
SpliceDuplicateModel = BI.inherit(BI.Model, {
_defaultConfig: function () {
return BI.extend(SpliceDuplicateModel.superclass._defaultConfig.apply(this, arguments), {
1: {
name: "名字"
}
});
},
splice: function (key1) {
delete this.data[key1];
},
similar: function (value, key1) {
value.name = BI.Func.createDistinctName(this.data, this.get(key1).name);
return value;
},
duplicate: function (copy, key1) {
this.data[copy] = this.get(copy);
},
_init: function () {
SpliceDuplicateModel.superclass._init.apply(this, arguments);
},
refresh: function () {
this.data = BI.deepClone(this.toJSON());
}
});
SDSubView = BI.inherit(BI.View, {
_defaultConfig: function () {
return SDSubView.superclass._defaultConfig.apply(this, arguments);
},
_init: function () {
SDSubView.superclass._init.apply(this, arguments);
},
render: function (vessel) {
var self = this;
BI.createWidget({
type: "bi.center",
element: vessel,
cls: "sd-child",
height: 30,
items: [{
type: "bi.text_button",
height: 30,
text: "复制 " + this.model.get("name") + " , 数据:" + JSON.stringify(this.model.toJSON()),
cls: "right-button-add",
handler: function () {
self.model.copy();
}
}, {
type: "bi.text_button",
height: 30,
text: "删除",
cls: "right-button-del",
handler: function () {
self.model.destroy();
}
}]
});
}
});
SDSubModel = BI.inherit(BI.Model, {
_defaultConfig: function () {
return BI.extend(SDSubModel.superclass._defaultConfig.apply(this, arguments), {});
},
_init: function () {
SDSubModel.superclass._init.apply(this, arguments);
}
});
Demo.Func = BI.inherit(BI.Widget, {
render: function () {
var view = BI.View.createView("/spliceDuplicate", {}, {
element: this
});
view.populate();
},
mounted: function () {
}
});
BI.shortcut("demo.spliceDuplicate", Demo.Func);

286
demo/js/fix-1.0/tmp.js

@ -1,286 +0,0 @@
TmpView = BI.inherit(BI.View, {
_defaultConfig: function () {
return BI.extend(TmpView.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-tmp"
});
},
_init: function () {
TmpView.superclass._init.apply(this, arguments);
},
change: function (changed) {
if(changed.data1) {
this._showModelData();
}
},
_showModelData: function () {
this.text.setText("父级Model层数据为:" + JSON.stringify(this.model.toJSON()));
},
_createMain: function () {
var self = this;
return BI.createWidget({
type: "bi.border",
items: {
west: {
el: {
type: "bi.vertical",
vgap: 10,
items: [{
el: (this.text = BI.createWidget({
type: "bi.label",
whiteSpace: "normal"
}))
}, {
el: {
type: "bi.text_button",
cls: "tmp-button mvc-button",
text: "点击触发事件tmp('data1', {child: {type: {value: \"临时数据\"}}})",
height: 30,
handler: function () {
self.model.tmp("data1", {
child: {
type: {
value: "临时数据"
}
}
});
}
}
}, {
el: {
type: "bi.text_button",
cls: "tmp-button mvc-button",
text: "点击触发事件submit",
height: 30,
handler: function () {
self.model.submit();
}
}
}, {
el: {
type: "bi.text_button",
cls: "tmp-button mvc-button",
text: "点击跳转到右方",
height: 30,
handler: function () {
self.addSubVessel("test", self.center).skipTo("child", "test", "data1");
}
}
}]
},
width: 200
},
center: {
el: (this.center = BI.createWidget())
}
}
});
},
render: function (vessel) {
BI.createWidget({
type: "bi.center",
element: vessel,
items: [{
el: this._createMain()
}],
hgap: 50,
vgap: 100
});
},
refresh: function () {
this._showModelData();
}
});
TmpModel = BI.inherit(BI.Model, {
_defaultConfig: function () {
return BI.extend(TmpModel.superclass._defaultConfig.apply(this, arguments), {
data1: {
child: {
type: {
value: "这是一个测试数据"
}
}
},
data2: "test"
});
},
_init: function () {
TmpModel.superclass._init.apply(this, arguments);
}
});
TmpChildView = BI.inherit(BI.View, {
_defaultConfig: function () {
return BI.extend(TmpChildView.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-tmp-child"
});
},
_init: function () {
TmpChildView.superclass._init.apply(this, arguments);
},
change: function (changed) {
if(changed.child) {
this._showModelData();
}
},
_showModelData: function () {
this.text.setText("子级Model层数据为:" + JSON.stringify(this.model.toJSON()));
},
_createMain: function () {
var self = this;
return BI.createWidget({
type: "bi.border",
items: {
west: {
el: {
type: "bi.vertical",
vgap: 10,
items: [{
el: (this.text = BI.createWidget({
type: "bi.label",
whiteSpace: "normal"
}))
}, {
el: {
type: "bi.text_button",
cls: "tmp-button mvc-button",
text: "点击触发事件set",
height: 30,
handler: function () {
self.set("child", {
type: {
value: "值改变了"
}
});
}
}
}, {
el: {
type: "bi.text_button",
cls: "tmp-button mvc-button",
text: "点击跳转到右方",
height: 30,
handler: function () {
self.addSubVessel("test", self.center).skipTo("child", "test", "child");
}
}
}]
},
width: 200
},
center: {
el: (this.center = BI.createWidget())
}
}
});
},
render: function (vessel) {
BI.createWidget({
type: "bi.center",
element: vessel,
items: [{
el: this._createMain()
}],
hgap: 50
});
},
refresh: function () {
this._showModelData();
}
});
TmpChildModel = BI.inherit(BI.Model, {
_defaultConfig: function () {
return BI.extend(TmpChildModel.superclass._defaultConfig.apply(this, arguments), {
});
},
_init: function () {
TmpChildModel.superclass._init.apply(this, arguments);
}
});
TmpChildChildView = BI.inherit(BI.View, {
_defaultConfig: function () {
return BI.extend(TmpChildChildView.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-tmp-child-child"
});
},
_init: function () {
TmpChildChildView.superclass._init.apply(this, arguments);
},
change: function (changed) {
if(changed.type) {
this._showModelData();
}
},
_showModelData: function () {
this.text.setText("叶节点数据为:" + JSON.stringify(this.model.toJSON()));
},
_createMain: function () {
return (this.text = BI.createWidget({
type: "bi.label",
whiteSpace: "normal"
}));
},
render: function (vessel) {
BI.createWidget({
type: "bi.center",
element: vessel,
items: [{
el: this._createMain()
}],
hgap: 50
});
},
refresh: function () {
this._showModelData();
}
});
TmpChildChildModel = BI.inherit(BI.Model, {
_defaultConfig: function () {
return BI.extend(TmpChildChildModel.superclass._defaultConfig.apply(this, arguments), {
});
},
_init: function () {
TmpChildChildModel.superclass._init.apply(this, arguments);
}
});
Demo.Func = BI.inherit(BI.Widget, {
render: function () {
var view = BI.View.createView("/tmp", {}, {
element: this
});
view.populate();
},
mounted: function () {
}
});
BI.shortcut("demo.tmp", Demo.Func);

3
demo/js/widget/downlist/demo.downlist.js

@ -22,6 +22,7 @@ Demo.Downlist = BI.inherit(BI.Widget, {
render: function () { render: function () {
var self = this; var self = this;
// test
return { return {
type: "bi.horizontal_adapt", type: "bi.horizontal_adapt",
items: [{ items: [{
@ -135,7 +136,7 @@ Demo.Downlist = BI.inherit(BI.Widget, {
type: "bi.label", type: "bi.label",
text: "显示选择值", text: "显示选择值",
width: 500, width: 500,
cls: "layout-bg4", cls: "layout-bg3",
ref: function (_ref) { ref: function (_ref) {
self.label = _ref; self.label = _ref;
} }

8
dist/base.css vendored

@ -599,10 +599,10 @@
border-radius: 2px; border-radius: 2px;
} }
.bi-search-editor .circle-close-font { .bi-search-editor .circle-close-font {
font-size: 16px; font-size: 18px;
} }
.bi-search-editor .search-font { .bi-search-editor .search-font {
font-size: 16px; font-size: 18px;
} }
/*************BI.SearchEditor******************/ /*************BI.SearchEditor******************/
@ -616,10 +616,10 @@
font-size: 12px; font-size: 12px;
} }
.bi-small-search-editor .close-font { .bi-small-search-editor .close-font {
font-size: 18px; font-size: 16px;
} }
.bi-small-search-editor .search-font { .bi-small-search-editor .search-font {
font-size: 18px; font-size: 16px;
} }
.bi-message-title { .bi-message-title {
font-size: 14px; font-size: 14px;

8
dist/bundle.css vendored

@ -2570,10 +2570,10 @@ textarea {
border-radius: 2px; border-radius: 2px;
} }
.bi-search-editor .circle-close-font { .bi-search-editor .circle-close-font {
font-size: 16px; font-size: 18px;
} }
.bi-search-editor .search-font { .bi-search-editor .search-font {
font-size: 16px; font-size: 18px;
} }
/*************BI.SearchEditor******************/ /*************BI.SearchEditor******************/
@ -2587,10 +2587,10 @@ textarea {
font-size: 12px; font-size: 12px;
} }
.bi-small-search-editor .close-font { .bi-small-search-editor .close-font {
font-size: 18px; font-size: 16px;
} }
.bi-small-search-editor .search-font { .bi-small-search-editor .search-font {
font-size: 18px; font-size: 16px;
} }
.bi-message-title { .bi-message-title {
font-size: 14px; font-size: 14px;

2
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

2
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

1703
dist/demo.js vendored

File diff suppressed because one or more lines are too long

8
dist/fineui.css vendored

@ -2570,10 +2570,10 @@ textarea {
border-radius: 2px; border-radius: 2px;
} }
.bi-search-editor .circle-close-font { .bi-search-editor .circle-close-font {
font-size: 16px; font-size: 18px;
} }
.bi-search-editor .search-font { .bi-search-editor .search-font {
font-size: 16px; font-size: 18px;
} }
/*************BI.SearchEditor******************/ /*************BI.SearchEditor******************/
@ -2587,10 +2587,10 @@ textarea {
font-size: 12px; font-size: 12px;
} }
.bi-small-search-editor .close-font { .bi-small-search-editor .close-font {
font-size: 18px; font-size: 16px;
} }
.bi-small-search-editor .search-font { .bi-small-search-editor .search-font {
font-size: 18px; font-size: 16px;
} }
.bi-message-title { .bi-message-title {
font-size: 14px; font-size: 14px;

2
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

2785
dist/fix/fix-1.0.js vendored

File diff suppressed because it is too large Load Diff

2
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

2
index.html

@ -21,8 +21,6 @@
<script src="dist/core.js"></script> <script src="dist/core.js"></script>
<!--BI路由js--> <!--BI路由js-->
<script src="dist/router.js"></script> <script src="dist/router.js"></script>
<!--fix1.0版本框架, 只用ui的话不用引入, fix1.0依赖于router,引入的顺序需在core.js、router.js之后, 可以和2.0版本同时使用或使用任一个均可-->
<script src="dist/fix/fix-1.0.js"></script>
<!--fix2.0版本框架, 只用ui的话不用引入, 引入的顺序需在core.js之后--> <!--fix2.0版本框架, 只用ui的话不用引入, 引入的顺序需在core.js之后-->
<script src="dist/fix/fix.js"></script> <script src="dist/fix/fix.js"></script>

8
src/css/base/editor/editor.css

@ -5,10 +5,10 @@
border-radius: 2px; border-radius: 2px;
} }
.bi-search-editor .circle-close-font { .bi-search-editor .circle-close-font {
font-size: 16px; font-size: 18px;
} }
.bi-search-editor .search-font { .bi-search-editor .search-font {
font-size: 16px; font-size: 18px;
} }
/*************BI.SearchEditor******************/ /*************BI.SearchEditor******************/
@ -22,8 +22,8 @@
font-size: 12px; font-size: 12px;
} }
.bi-small-search-editor .close-font { .bi-small-search-editor .close-font {
font-size: 18px; font-size: 16px;
} }
.bi-small-search-editor .search-font { .bi-small-search-editor .search-font {
font-size: 18px; font-size: 16px;
} }

4
src/less/base/editor/editor.search.less

@ -3,9 +3,9 @@
.bi-search-editor { .bi-search-editor {
.border-radius(2px); .border-radius(2px);
& .circle-close-font{ & .circle-close-font{
font-size: @font-size-16; font-size: @font-size-18;
} }
& .search-font{ & .search-font{
font-size: @font-size-16; font-size: @font-size-18;
} }
} }

4
src/less/base/editor/editor.search.small.less

@ -11,9 +11,9 @@
} }
} }
& .close-font{ & .close-font{
font-size: 18px; font-size: @font-size-16;
} }
& .search-font{ & .search-font{
font-size: 18px; font-size: @font-size-16;
} }
} }

1
src/less/lib/constant.less

@ -7,6 +7,7 @@
@font-size-13: 13px; @font-size-13: 13px;
@font-size-14: 14px; @font-size-14: 14px;
@font-size-16: 16px; @font-size-16: 16px;
@font-size-18: 18px;
@font-size-22: 22px; @font-size-22: 22px;
@font-size-24: 24px; @font-size-24: 24px;
@font-size-30: 30px; @font-size-30: 30px;

Loading…
Cancel
Save