Browse Source

针对codemirrior的修改

es6
windy 7 years ago
parent
commit
9c932e094b
  1. 73260
      bi/base.js
  2. 25040
      bi/case.js
  3. 2
      dist/base.js
  4. 2
      dist/bundle.js
  5. 24
      dist/bundle.min.js
  6. 350
      dist/demo.js
  7. 2
      src/base/combination/combo.js

73260
bi/base.js

File diff suppressed because it is too large Load Diff

25040
bi/case.js

File diff suppressed because it is too large Load Diff

2
dist/base.js vendored

@ -3261,7 +3261,7 @@ BI.Combo = BI.inherit(BI.Widget, {
// if (this.element.__isMouseInBounds__(e) || (this.popupView && this.popupView.element.__isMouseInBounds__(e))) {
// return;
// }
if (this.element.find(e.target).length > 0 || $(e.target).closest(".CodeMirror-hints").length > 0) {//BI-9887 CodeMirror的公式弹框需要特殊处理下
if (this.element.find(e.target).length > 0 || e.target.className === "CodeMirror-cursor" || $(e.target).closest(".CodeMirror-hints").length > 0) {//BI-9887 CodeMirror的公式弹框需要特殊处理下
return;
}
var isHide = this.options.hideChecker.apply(this, [e]);

2
dist/bundle.js vendored

@ -32284,7 +32284,7 @@ BI.Combo = BI.inherit(BI.Widget, {
// if (this.element.__isMouseInBounds__(e) || (this.popupView && this.popupView.element.__isMouseInBounds__(e))) {
// return;
// }
if (this.element.find(e.target).length > 0 || $(e.target).closest(".CodeMirror-hints").length > 0) {//BI-9887 CodeMirror的公式弹框需要特殊处理下
if (this.element.find(e.target).length > 0 || e.target.className === "CodeMirror-cursor" || $(e.target).closest(".CodeMirror-hints").length > 0) {//BI-9887 CodeMirror的公式弹框需要特殊处理下
return;
}
var isHide = this.options.hideChecker.apply(this, [e]);

24
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

350
dist/demo.js vendored

@ -2141,9 +2141,8 @@ BI.shortcut("demo.clipboard", Demo.Func);Demo.Func = BI.inherit(BI.Widget, {
type: "bi.absolute",
items: [{
el: {
type: "bi.color_chooser",
width: 30,
height: 30
type: "bi.color_chooser_popup",
cls: "bi-card"
},
left: 100,
top: 250
@ -2151,7 +2150,7 @@ BI.shortcut("demo.clipboard", Demo.Func);Demo.Func = BI.inherit(BI.Widget, {
}
}
});
BI.shortcut("demo.color_chooser", Demo.Func);Demo.Func = BI.inherit(BI.Widget, {
BI.shortcut("demo.color_chooser_popup", Demo.Func);Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
@ -2161,8 +2160,9 @@ BI.shortcut("demo.color_chooser", Demo.Func);Demo.Func = BI.inherit(BI.Widget, {
type: "bi.absolute",
items: [{
el: {
type: "bi.color_chooser_popup",
cls: "bi-card"
type: "bi.color_chooser",
width: 30,
height: 30
},
left: 100,
top: 250
@ -2170,7 +2170,7 @@ BI.shortcut("demo.color_chooser", Demo.Func);Demo.Func = BI.inherit(BI.Widget, {
}
}
});
BI.shortcut("demo.color_chooser_popup", Demo.Func);Demo.Func = BI.inherit(BI.Widget, {
BI.shortcut("demo.color_chooser", Demo.Func);Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
@ -5604,6 +5604,92 @@ Demo.VM_CONFIG = [{
props: {
baseCls: "demo-func"
},
child: [{
type: "bi.combo_group",
el: {
type: "bi.icon_text_icon_item",
text: "2010年",
value: 2010,
height: 25,
iconCls: "close-ha-font"
},
children: [{
type: "bi.single_select_item",
height: 25,
text: "一月",
value: 11
}, {
type: "bi.icon_text_icon_item",
height: 25,
text: "二月",
value: 12,
children: [{type: "bi.single_select_item", text: "一号", value: 101, height: 25}]
}]
}, {
text: "2011年", value: 2011
}, {
text: "2012年", value: 2012, iconCls: "close-ha-font"
}, {
text: "2013年", value: 2013
}, {
text: "2014年", value: 2014, iconCls: "close-ha-font"
}, {
text: "2015年", value: 2015, iconCls: "close-ha-font"
}],
_createBottom: function () {
var childCombo = BI.createWidget({
type: "bi.combo",
el: {
type: "bi.text_button",
cls: "button-combo",
height: 30
},
popup: {
el: {
type: "bi.button_tree",
items: BI.createItems(BI.deepClone(this.child), {
type: "bi.single_select_item",
height: 25,
handler: function (v) {
}
}),
layouts: [{
type: "bi.vertical"
}]
}
},
width: 200
});
childCombo.setValue(BI.deepClone(this.child)[0].children[0].value);
return BI.createWidget({
type: "bi.left",
items: [childCombo],
hgap: 20,
vgap: 20
})
},
render: function () {
return {
type: "bi.grid",
columns: 1,
rows: 1,
items: [{
column: 0,
row: 0,
el: this._createBottom()
}]
}
}
});
BI.shortcut("demo.combo_group", Demo.Func);Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
years: [{
text: "2010年", value: 2010, iconCls: "close-ha-font"
}, {
@ -6258,92 +6344,6 @@ BI.shortcut("demo.combo2", Demo.Func);Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
child: [{
type: "bi.combo_group",
el: {
type: "bi.icon_text_icon_item",
text: "2010年",
value: 2010,
height: 25,
iconCls: "close-ha-font"
},
children: [{
type: "bi.single_select_item",
height: 25,
text: "一月",
value: 11
}, {
type: "bi.icon_text_icon_item",
height: 25,
text: "二月",
value: 12,
children: [{type: "bi.single_select_item", text: "一号", value: 101, height: 25}]
}]
}, {
text: "2011年", value: 2011
}, {
text: "2012年", value: 2012, iconCls: "close-ha-font"
}, {
text: "2013年", value: 2013
}, {
text: "2014年", value: 2014, iconCls: "close-ha-font"
}, {
text: "2015年", value: 2015, iconCls: "close-ha-font"
}],
_createBottom: function () {
var childCombo = BI.createWidget({
type: "bi.combo",
el: {
type: "bi.text_button",
cls: "button-combo",
height: 30
},
popup: {
el: {
type: "bi.button_tree",
items: BI.createItems(BI.deepClone(this.child), {
type: "bi.single_select_item",
height: 25,
handler: function (v) {
}
}),
layouts: [{
type: "bi.vertical"
}]
}
},
width: 200
});
childCombo.setValue(BI.deepClone(this.child)[0].children[0].value);
return BI.createWidget({
type: "bi.left",
items: [childCombo],
hgap: 20,
vgap: 20
})
},
render: function () {
return {
type: "bi.grid",
columns: 1,
rows: 1,
items: [{
column: 0,
row: 0,
el: this._createBottom()
}]
}
}
});
BI.shortcut("demo.combo_group", Demo.Func);Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
render: function () {
return {
type: "bi.vertical",
@ -7332,7 +7332,24 @@ Demo.BorderLayout = BI.inherit(BI.Widget, {
}
}
});
BI.shortcut("demo.border", Demo.BorderLayout);/**
BI.shortcut("demo.border", Demo.BorderLayout);Demo.CenterAdapt = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-absolute"
},
render: function () {
return {
type: "bi.center_adapt",
items: [{
type: "bi.label",
text: "水平垂直居中",
width: 300,
height: 200,
cls: "layout-bg1"
}]
}
},
});
BI.shortcut("demo.center_adapt", Demo.CenterAdapt);/**
* Created by User on 2017/3/22.
*/
Demo.CenterLayout = BI.inherit(BI.Widget, {
@ -7366,24 +7383,7 @@ Demo.CenterLayout = BI.inherit(BI.Widget, {
}
}
});
BI.shortcut("demo.center_layout", Demo.CenterLayout);Demo.CenterAdapt = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-absolute"
},
render: function () {
return {
type: "bi.center_adapt",
items: [{
type: "bi.label",
text: "水平垂直居中",
width: 300,
height: 200,
cls: "layout-bg1"
}]
}
},
});
BI.shortcut("demo.center_adapt", Demo.CenterAdapt);/**
BI.shortcut("demo.center_layout", Demo.CenterLayout);/**
* Created by User on 2017/3/22.
*/
Demo.FloatCenterLayout = BI.inherit(BI.Widget, {
@ -7630,45 +7630,6 @@ Demo.GridLayout = BI.inherit(BI.Widget, {
}
});
BI.shortcut("demo.grid", Demo.GridLayout);/**
* Created by User on 2017/3/21.
*/
Demo.Horizontal = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-horizontal"
},
render: function () {
return {
type: "bi.horizontal",
items: [{
type: "bi.label",
whiteSpace: "normal",
text: "因为大多数场景下都需要垂直居中,所以这个布局一般会被vertical_adapt布局设置scrollx=true取代",
cls: "layout-bg3",
width: 500,
height: 50
}, {
type: "bi.label",
text: "水平布局",
cls: "layout-bg4",
width: 300,
height: 30
}, {
type: "bi.label",
text: "水平布局",
cls: "layout-bg5",
width: 300,
height: 30
}, {
type: "bi.label",
text: "水平布局",
cls: "layout-bg6",
width: 300,
height: 30
}]
}
}
});
BI.shortcut("demo.horizontal", Demo.Horizontal);/**
* Created by User on 2017/3/22.
*/
Demo.HorizontalAdapt = BI.inherit(BI.Widget, {
@ -7785,6 +7746,45 @@ Demo.HorizontalFloat = BI.inherit(BI.Widget, {
}
});
BI.shortcut("demo.horizontal_float", Demo.HorizontalFloat);/**
* Created by User on 2017/3/21.
*/
Demo.Horizontal = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-horizontal"
},
render: function () {
return {
type: "bi.horizontal",
items: [{
type: "bi.label",
whiteSpace: "normal",
text: "因为大多数场景下都需要垂直居中,所以这个布局一般会被vertical_adapt布局设置scrollx=true取代",
cls: "layout-bg3",
width: 500,
height: 50
}, {
type: "bi.label",
text: "水平布局",
cls: "layout-bg4",
width: 300,
height: 30
}, {
type: "bi.label",
text: "水平布局",
cls: "layout-bg5",
width: 300,
height: 30
}, {
type: "bi.label",
text: "水平布局",
cls: "layout-bg6",
width: 300,
height: 30
}]
}
}
});
BI.shortcut("demo.horizontal", Demo.Horizontal);/**
* Created by User on 2017/3/22.
*/
Demo.HtapeLayout = BI.inherit(BI.Widget, {
@ -8084,30 +8084,6 @@ Demo.TdLayout = BI.inherit(BI.Widget, {
}
});
BI.shortcut("demo.td", Demo.TdLayout);/**
* Created by User on 2017/3/21.
*/
Demo.VerticalLayout = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-vertical"
},
render: function () {
return {
type: "bi.vertical",
items: [{
type: "bi.label",
cls: "layout-bg3",
text: "垂直布局",
height: 30
}, {
type: "bi.label",
cls: "layout-bg4",
text: "垂直布局",
height: 30
}]
}
}
});
BI.shortcut("demo.vertical", Demo.VerticalLayout);/**
* Created by User on 2017/3/22.
*/
Demo.VerticalAdaptLayout = BI.inherit(BI.Widget, {
@ -8149,6 +8125,30 @@ Demo.VerticalAdaptLayout = BI.inherit(BI.Widget, {
}
});
BI.shortcut("demo.vertical_adapt", Demo.VerticalAdaptLayout);/**
* Created by User on 2017/3/21.
*/
Demo.VerticalLayout = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-vertical"
},
render: function () {
return {
type: "bi.vertical",
items: [{
type: "bi.label",
cls: "layout-bg3",
text: "垂直布局",
height: 30
}, {
type: "bi.label",
cls: "layout-bg4",
text: "垂直布局",
height: 30
}]
}
}
});
BI.shortcut("demo.vertical", Demo.VerticalLayout);/**
* Created by User on 2017/3/22.
*/
Demo.VtapeLayout = BI.inherit(BI.Widget, {

2
src/base/combination/combo.js

@ -219,7 +219,7 @@ BI.Combo = BI.inherit(BI.Widget, {
// if (this.element.__isMouseInBounds__(e) || (this.popupView && this.popupView.element.__isMouseInBounds__(e))) {
// return;
// }
if (this.element.find(e.target).length > 0 || $(e.target).closest(".CodeMirror-hints").length > 0) {//BI-9887 CodeMirror的公式弹框需要特殊处理下
if (this.element.find(e.target).length > 0 || e.target.className === "CodeMirror-cursor" || $(e.target).closest(".CodeMirror-hints").length > 0) {//BI-9887 CodeMirror的公式弹框需要特殊处理下
return;
}
var isHide = this.options.hideChecker.apply(this, [e]);

Loading…
Cancel
Save