Browse Source

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

* commit 'a87c0c1b15b517a21d3bd6656d7222c4b3320a9a':
  update
  update
  update
  BI-25547 && BI-24611 && BI-25389
es6
Teller 6 years ago
parent
commit
12955caeb1
  1. 16
      dist/_fineui.min.js
  2. 5
      dist/base.js
  3. 25
      dist/bundle.css
  4. 55
      dist/bundle.js
  5. 2
      dist/bundle.min.css
  6. 24
      dist/bundle.min.js
  7. 25
      dist/fineui.css
  8. 55
      dist/fineui.js
  9. 2
      dist/fineui.min.css
  10. 13
      dist/fineui.min.js
  11. 25
      dist/widget.css
  12. 50
      dist/widget.js
  13. 1
      src/base/formula/formulaeditor.js
  14. 2
      src/base/layer/layer.popup.js
  15. 2
      src/base/sql/codemirrior/sql-hint.js
  16. 25
      src/css/widget/singleslider/slider/widget.css
  17. 16
      src/less/widget/singleslider/slider/widget.slider.less
  18. 49
      src/widget/singleslider/button/iconbutton.slider.js
  19. 1
      src/widget/singleslider/singleslider.js

16
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

5
dist/base.js vendored

@ -14660,7 +14660,6 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
className = "error-field";
}
this.editor.markText(from, to, {className: className, atomic: true, startStyle: "start", endStyle: "end", value: value});
this.editor.replaceSelection(" ");
this.editor.focus();
},
@ -15609,7 +15608,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
BI.PopupView.superclass._init.apply(this, arguments);
var self = this, o = this.options;
var fn = function (e) {
e.stopEvent();
e.stopPropagation();
}, stop = function (e) {
e.stopEvent();
return false;
@ -20879,7 +20878,7 @@ BI.Trigger = BI.inherit(BI.Single, {
if (wordlist.hasOwnProperty(word)) {
var val = wordlist[word];
if (!val || val === true) {val = word;} else {val = val.displayText ? {text: val.text, displayText: val.displayText} : val.text;}
if (match(search, val)) result.push(formatter(val));
if (match(search, val)) result.push(formatter(val, -1));
}
}
}

25
dist/bundle.css vendored

@ -4117,12 +4117,25 @@ ul.ztree.zTreeDragUL {
}
.bi-single-slider-button .slider-button {
cursor: ew-resize;
-webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
-webkit-border-radius: 7px;
-moz-border-radius: 7px;
border-radius: 7px;
border: 2px solid #3685f2;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
border-radius: 8px;
background-color: #ffffff;
height: 16px;
width: 16px;
top: 6px;
left: -8px;
}
.bi-single-slider-button .slider-button:hover,
.bi-single-slider-button .slider-button.hover {
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
width: 20px;
height: 20px;
top: 4px;
left: -10px;
}
.bi-slider-track .gray-track {
background-color: #F2F4F7;

55
dist/bundle.js vendored

@ -50431,7 +50431,6 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
className = "error-field";
}
this.editor.markText(from, to, {className: className, atomic: true, startStyle: "start", endStyle: "end", value: value});
this.editor.replaceSelection(" ");
this.editor.focus();
},
@ -51380,7 +51379,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
BI.PopupView.superclass._init.apply(this, arguments);
var self = this, o = this.options;
var fn = function (e) {
e.stopEvent();
e.stopPropagation();
}, stop = function (e) {
e.stopEvent();
return false;
@ -56650,7 +56649,7 @@ BI.Trigger = BI.inherit(BI.Single, {
if (wordlist.hasOwnProperty(word)) {
var val = wordlist[word];
if (!val || val === true) {val = word;} else {val = val.displayText ? {text: val.text, displayText: val.displayText} : val.text;}
if (match(search, val)) result.push(formatter(val));
if (match(search, val)) result.push(formatter(val, -1));
}
}
}
@ -108524,32 +108523,35 @@ BI.shortcut("bi.sign_text_editor", BI.SignTextEditor);/**
* Created by zcf on 2016/9/22.
*/
BI.SliderIconButton = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.SliderIconButton.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-slider-button"
});
props: {
baseCls: "bi-single-slider-button"
},
_init: function () {
BI.extend(BI.SliderIconButton.superclass._init.apply(this, arguments));
this.slider = BI.createWidget({
type: "bi.icon_button",
cls: "slider-icon slider-button",
iconWidth: 14,
iconHeight: 14,
height: 14,
width: 14
});
BI.createWidget({
constants: {
LARGE_SIZE: 16,
NORMAL_SIZE: 12,
LARGE_OFFSET: 4,
NORMAL_OFFSET: 6
},
render: function () {
var self = this;
return {
type: "bi.absolute",
element: this,
ref: function () {
self.wrapper = this;
},
items: [{
el: this.slider,
top: 7,
left: -7
}],
width: 0,
height: 14
});
el: {
type: "bi.text_button",
cls: "slider-button",
ref: function () {
self.slider = this;
}
}
}]
};
}
});
BI.shortcut("bi.single_slider_button", BI.SliderIconButton);/**
@ -108602,6 +108604,7 @@ BI.SingleSlider = BI.inherit(BI.Widget, {
hgap: c.SLIDER_WIDTH_HALF,
height: c.SLIDER_HEIGHT
});
// 这边其实是有问题的,拖拽区域是个圆,在圆的边缘拖拽后放开,这边计算出来的蓝条宽度实际上会比放开时长一点或者短一点
sliderVertical.element.click(function (e) {
if (self.enable && self.isEnabled()) {
var offset = e.clientX - self.element.offset().left - c.SLIDER_WIDTH_HALF;

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

24
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

25
dist/fineui.css vendored

@ -4117,12 +4117,25 @@ ul.ztree.zTreeDragUL {
}
.bi-single-slider-button .slider-button {
cursor: ew-resize;
-webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
-webkit-border-radius: 7px;
-moz-border-radius: 7px;
border-radius: 7px;
border: 2px solid #3685f2;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
border-radius: 8px;
background-color: #ffffff;
height: 16px;
width: 16px;
top: 6px;
left: -8px;
}
.bi-single-slider-button .slider-button:hover,
.bi-single-slider-button .slider-button.hover {
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
width: 20px;
height: 20px;
top: 4px;
left: -10px;
}
.bi-slider-track .gray-track {
background-color: #F2F4F7;

55
dist/fineui.js vendored

@ -50680,7 +50680,6 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
className = "error-field";
}
this.editor.markText(from, to, {className: className, atomic: true, startStyle: "start", endStyle: "end", value: value});
this.editor.replaceSelection(" ");
this.editor.focus();
},
@ -51629,7 +51628,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
BI.PopupView.superclass._init.apply(this, arguments);
var self = this, o = this.options;
var fn = function (e) {
e.stopEvent();
e.stopPropagation();
}, stop = function (e) {
e.stopEvent();
return false;
@ -56899,7 +56898,7 @@ BI.Trigger = BI.inherit(BI.Single, {
if (wordlist.hasOwnProperty(word)) {
var val = wordlist[word];
if (!val || val === true) {val = word;} else {val = val.displayText ? {text: val.text, displayText: val.displayText} : val.text;}
if (match(search, val)) result.push(formatter(val));
if (match(search, val)) result.push(formatter(val, -1));
}
}
}
@ -108773,32 +108772,35 @@ BI.shortcut("bi.sign_text_editor", BI.SignTextEditor);/**
* Created by zcf on 2016/9/22.
*/
BI.SliderIconButton = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.SliderIconButton.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-slider-button"
});
props: {
baseCls: "bi-single-slider-button"
},
_init: function () {
BI.extend(BI.SliderIconButton.superclass._init.apply(this, arguments));
this.slider = BI.createWidget({
type: "bi.icon_button",
cls: "slider-icon slider-button",
iconWidth: 14,
iconHeight: 14,
height: 14,
width: 14
});
BI.createWidget({
constants: {
LARGE_SIZE: 16,
NORMAL_SIZE: 12,
LARGE_OFFSET: 4,
NORMAL_OFFSET: 6
},
render: function () {
var self = this;
return {
type: "bi.absolute",
element: this,
ref: function () {
self.wrapper = this;
},
items: [{
el: this.slider,
top: 7,
left: -7
}],
width: 0,
height: 14
});
el: {
type: "bi.text_button",
cls: "slider-button",
ref: function () {
self.slider = this;
}
}
}]
};
}
});
BI.shortcut("bi.single_slider_button", BI.SliderIconButton);/**
@ -108851,6 +108853,7 @@ BI.SingleSlider = BI.inherit(BI.Widget, {
hgap: c.SLIDER_WIDTH_HALF,
height: c.SLIDER_HEIGHT
});
// 这边其实是有问题的,拖拽区域是个圆,在圆的边缘拖拽后放开,这边计算出来的蓝条宽度实际上会比放开时长一点或者短一点
sliderVertical.element.click(function (e) {
if (self.enable && self.isEnabled()) {
var offset = e.clientX - self.element.offset().left - c.SLIDER_WIDTH_HALF;

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

13
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

25
dist/widget.css vendored

@ -412,12 +412,25 @@
}
.bi-single-slider-button .slider-button {
cursor: ew-resize;
-webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
-webkit-border-radius: 7px;
-moz-border-radius: 7px;
border-radius: 7px;
border: 2px solid #3685f2;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
border-radius: 8px;
background-color: #ffffff;
height: 16px;
width: 16px;
top: 6px;
left: -8px;
}
.bi-single-slider-button .slider-button:hover,
.bi-single-slider-button .slider-button.hover {
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
width: 20px;
height: 20px;
top: 4px;
left: -10px;
}
.bi-slider-track .gray-track {
background-color: #F2F4F7;

50
dist/widget.js vendored

@ -20869,32 +20869,35 @@ BI.shortcut("bi.sign_text_editor", BI.SignTextEditor);/**
* Created by zcf on 2016/9/22.
*/
BI.SliderIconButton = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.SliderIconButton.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-slider-button"
});
props: {
baseCls: "bi-single-slider-button"
},
_init: function () {
BI.extend(BI.SliderIconButton.superclass._init.apply(this, arguments));
this.slider = BI.createWidget({
type: "bi.icon_button",
cls: "slider-icon slider-button",
iconWidth: 14,
iconHeight: 14,
height: 14,
width: 14
});
BI.createWidget({
constants: {
LARGE_SIZE: 16,
NORMAL_SIZE: 12,
LARGE_OFFSET: 4,
NORMAL_OFFSET: 6
},
render: function () {
var self = this;
return {
type: "bi.absolute",
element: this,
ref: function () {
self.wrapper = this;
},
items: [{
el: this.slider,
top: 7,
left: -7
}],
width: 0,
height: 14
});
el: {
type: "bi.text_button",
cls: "slider-button",
ref: function () {
self.slider = this;
}
}
}]
};
}
});
BI.shortcut("bi.single_slider_button", BI.SliderIconButton);/**
@ -20947,6 +20950,7 @@ BI.SingleSlider = BI.inherit(BI.Widget, {
hgap: c.SLIDER_WIDTH_HALF,
height: c.SLIDER_HEIGHT
});
// 这边其实是有问题的,拖拽区域是个圆,在圆的边缘拖拽后放开,这边计算出来的蓝条宽度实际上会比放开时长一点或者短一点
sliderVertical.element.click(function (e) {
if (self.enable && self.isEnabled()) {
var offset = e.clientX - self.element.offset().left - c.SLIDER_WIDTH_HALF;

1
src/base/formula/formulaeditor.js

@ -137,7 +137,6 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
className = "error-field";
}
this.editor.markText(from, to, {className: className, atomic: true, startStyle: "start", endStyle: "end", value: value});
this.editor.replaceSelection(" ");
this.editor.focus();
},

2
src/base/layer/layer.popup.js

@ -44,7 +44,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
BI.PopupView.superclass._init.apply(this, arguments);
var self = this, o = this.options;
var fn = function (e) {
e.stopEvent();
e.stopPropagation();
}, stop = function (e) {
e.stopEvent();
return false;

2
src/base/sql/codemirrior/sql-hint.js

@ -80,7 +80,7 @@
if (wordlist.hasOwnProperty(word)) {
var val = wordlist[word];
if (!val || val === true) {val = word;} else {val = val.displayText ? {text: val.text, displayText: val.displayText} : val.text;}
if (match(search, val)) result.push(formatter(val));
if (match(search, val)) result.push(formatter(val, -1));
}
}
}

25
src/css/widget/singleslider/slider/widget.css

@ -1,9 +1,22 @@
.bi-single-slider-button .slider-button {
cursor: ew-resize;
-webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
-webkit-border-radius: 7px;
-moz-border-radius: 7px;
border-radius: 7px;
border: 2px solid #3685f2;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
border-radius: 8px;
background-color: #ffffff;
height: 16px;
width: 16px;
top: 6px;
left: -8px;
}
.bi-single-slider-button .slider-button:hover,
.bi-single-slider-button .slider-button.hover {
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
width: 20px;
height: 20px;
top: 4px;
left: -10px;
}

16
src/less/widget/singleslider/slider/widget.slider.less

@ -3,7 +3,19 @@
.bi-single-slider-button {
& .slider-button {
cursor: ew-resize;
.box-shadow(0 0 10px, rgba(0, 0, 0, 0.2));
.border-radius(7px);
border: 2px solid @color-bi-border-highlight;
.border-radius(8px);
background-color: @color-bi-background-default;
height: 16px;
width: 16px;
top: 6px;
left: -8px;
&:hover, &.hover {
.border-radius(10px);
width: 20px;
height: 20px;
top: 4px;
left: -10px;
}
}
}

49
src/widget/singleslider/button/iconbutton.slider.js

@ -2,32 +2,35 @@
* Created by zcf on 2016/9/22.
*/
BI.SliderIconButton = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.SliderIconButton.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-slider-button"
});
props: {
baseCls: "bi-single-slider-button"
},
_init: function () {
BI.extend(BI.SliderIconButton.superclass._init.apply(this, arguments));
this.slider = BI.createWidget({
type: "bi.icon_button",
cls: "slider-icon slider-button",
iconWidth: 14,
iconHeight: 14,
height: 14,
width: 14
});
BI.createWidget({
constants: {
LARGE_SIZE: 16,
NORMAL_SIZE: 12,
LARGE_OFFSET: 4,
NORMAL_OFFSET: 6
},
render: function () {
var self = this;
return {
type: "bi.absolute",
element: this,
ref: function () {
self.wrapper = this;
},
items: [{
el: this.slider,
top: 7,
left: -7
}],
width: 0,
height: 14
});
el: {
type: "bi.text_button",
cls: "slider-button",
ref: function () {
self.slider = this;
}
}
}]
};
}
});
BI.shortcut("bi.single_slider_button", BI.SliderIconButton);

1
src/widget/singleslider/singleslider.js

@ -48,6 +48,7 @@ BI.SingleSlider = BI.inherit(BI.Widget, {
hgap: c.SLIDER_WIDTH_HALF,
height: c.SLIDER_HEIGHT
});
// 这边其实是有问题的,拖拽区域是个圆,在圆的边缘拖拽后放开,这边计算出来的蓝条宽度实际上会比放开时长一点或者短一点
sliderVertical.element.click(function (e) {
if (self.enable && self.isEnabled()) {
var offset = e.clientX - self.element.offset().left - c.SLIDER_WIDTH_HALF;

Loading…
Cancel
Save