guy 7 years ago
parent
commit
0721c5e269
  1. 18
      dist/base.css
  2. 117
      dist/base.js
  3. 236
      dist/case.js
  4. 118
      src/base/layer/layer.scroll.js
  5. 0
      src/case/tree/expander/expander.branch.handstand.js
  6. 0
      src/case/tree/expander/expander.branch.js
  7. 18
      src/css/base/view/scrollview.css
  8. 30
      src/less/base/logintimeout/login.timeout.less
  9. 20
      src/less/base/reqloading/loading.request.less
  10. 25
      src/less/base/timeouttoast/widget.timeouttoast.less
  11. 19
      src/less/base/view/scrollview.less

18
dist/base.css vendored

@ -2287,24 +2287,6 @@ ul.ztree.zTreeDragUL {
.bi-list-view .list-view-toolbar > .first-element {
border-left: none;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-scroll-view .scroll-container {
border-left: 1px solid #d4dadd;
border-right: 1px solid #d4dadd;
border-bottom: 1px solid #d4dadd;
}
.bi-scroll-view .scroll-drop-down-icon {
font-size: 14px;
border-bottom: 1px solid #d4dadd;
border-left: 1px solid #d4dadd;
border-right: 1px solid #d4dadd;
background: #f4f4f4;
}
.bi-scroll-view .scroll-drop-down-icon:active {
background: #d4dadd;
}
.bi-flex-center-layout {
display: box;
/* OLD - Android 4.4- */

117
dist/base.js vendored

@ -15178,123 +15178,6 @@ BI.PopupView = BI.inherit(BI.Widget, {
});
BI.PopupView.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.popup_view", BI.PopupView);/**
* guy
* @class BI.ScrollView
* @extends BI.Widget
*/
BI.ScrollView = BI.inherit(BI.Widget, {
_const: {
dropDownHeight: 15,
expandIcon: "column-next-page-h-font",
collapseIcon: "column-pre-page-h-font"
},
_defaultConfig: function() {
return BI.extend(BI.ScrollView.superclass._defaultConfig.apply(this, arguments), {
baseCls:"bi-scroll-view",
scrollHeight: 50,
maxHeight: 300
})
},
_init : function() {
BI.ScrollView.superclass._init.apply(this, arguments);
this.scrollUp = false;
this.scroll = BI.createWidget({
type: "bi.vertical",
cls: "scroll-container",
scrolly: true
})
BI.createWidget({
type: "bi.vertical",
element: this,
scrolly: false,
items: [this.scroll]
})
this.dropdown = BI.createWidget({
type: "bi.icon_button",
height: this._const.dropDownHeight,
cls: "scroll-drop-down-icon " + this._const.expandIcon,
handler: BI.bind(this._dropDownOrUp, this)
})
BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: this.dropdown,
left: 0,
right: 0,
bottom: -1 * this._const.dropDownHeight
}]
})
this.populate(this.options.items);
},
_dropDownOrUp: function(){
if(!this.scrollUp){
var height = this.element.height();
height += this.options.scrollHeight;
height = Math.min(height, this.scroll.element[0].scrollHeight, this.options.maxHeight);
this.element.height(height);
this._checkDropDownState();
} else {
var height = this.element.height();
height -= this.options.scrollHeight;
height = Math.max(height, this.options.height);
this.element.height(height);
this._checkDropDownState();
}
},
_checkDropDownState: function(){
var height = this.element.height();
if(!this._checkScroll() || height >= this.options.maxHeight){
this.scrollUp = true;
this.dropdown.element.removeClass(this._const.expandIcon).addClass(this._const.collapseIcon);
} else if(height <= this.options.height){
this.scrollUp = false;
this.dropdown.element.addClass(this._const.expandIcon);
} else {
this.dropdown.element.addClass(this.scrollUp ? this._const.collapseIcon : this._const.expandIcon);
}
},
_checkScroll: function(){
this.scroll.element.height(this.element.height());
return this.scroll.element[0].scrollHeight > this.scroll.element[0].clientHeight;
},
_checkDropDown: function(){
if(this._checkScroll()){
this.dropdown.visible();
//this.scrollUp = false;
this._checkDropDownState();
} else {
this.dropdown.invisible();
}
},
populate: function(){
this.scroll.populate.apply(this.scroll, arguments);
this.resize();
},
resize: function(){
this.element.height(this.options.height);
BI.nextTick(BI.bind(this._checkDropDown, this));
},
addItem: function(){
this.scroll.addItem.apply(this.scroll, arguments);
BI.nextTick(BI.bind(this._checkDropDown, this));
}
});
$.shortcut("bi.scroll_view", BI.ScrollView);/**
* 搜索面板
*
* Created by GUY on 2015/9/28.

236
dist/case.js vendored

@ -6165,124 +6165,6 @@ BI.SimpleStateEditor.EVENT_SPACE = "EVENT_SPACE";
BI.SimpleStateEditor.EVENT_EMPTY = "EVENT_EMPTY";
$.shortcut("bi.simple_state_editor", BI.SimpleStateEditor);/**
* 倒立的Branch
* @class BI.HandStandBranchExpander
* @extend BI.Widget
* create by young
*/
BI.HandStandBranchExpander = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.HandStandBranchExpander.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-handstand-branch-expander",
direction: BI.Direction.Top,
logic: {
dynamic: true
},
el: {type: "bi.label"},
popup: {}
})
},
_init: function () {
BI.HandStandBranchExpander.superclass._init.apply(this, arguments);
var o = this.options;
this._initExpander();
this._initBranchView();
BI.createWidget(BI.extend({
element: this
}, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, {
items: BI.LogicFactory.createLogicItemsByDirection(o.direction, {
type: "bi.center_adapt",
items: [this.expander]
}, this.branchView)
}))));
},
_initExpander: function () {
var self = this, o = this.options;
this.expander = BI.createWidget(o.el);
this.expander.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
});
},
_initBranchView: function () {
var self = this, o = this.options;
this.branchView = BI.createWidget(o.popup, {});
this.branchView.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
});
},
populate: function (items) {
this.branchView.populate.apply(this.branchView, arguments);
},
getValue: function () {
return this.branchView.getValue();
}
});
BI.HandStandBranchExpander.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.handstand_branch_expander", BI.HandStandBranchExpander);/**
* @class BI.BranchExpander
* @extend BI.Widget
* create by young
*/
BI.BranchExpander = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.BranchExpander.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-branch-expander",
direction: BI.Direction.Left,
logic: {
dynamic: true
},
el: {},
popup: {}
})
},
_init: function () {
BI.BranchExpander.superclass._init.apply(this, arguments);
var o = this.options;
this._initExpander();
this._initBranchView();
BI.createWidget(BI.extend({
element: this
}, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, {
items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.expander, this.branchView)
}))));
},
_initExpander: function () {
var self = this, o = this.options;
this.expander = BI.createWidget(o.el, {
type: "bi.label",
width: 30,
height: "100%"
});
this.expander.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
});
},
_initBranchView: function () {
var self = this, o = this.options;
this.branchView = BI.createWidget(o.popup, {});
this.branchView.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
});
},
populate: function (items) {
this.branchView.populate.apply(this.branchView, arguments);
},
getValue: function () {
return this.branchView.getValue();
}
});
BI.BranchExpander.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.branch_expander", BI.BranchExpander);/**
* 有确定取消按钮的弹出层
* @class BI.BarFloatSection
* @extends BI.FloatSection
@ -10024,6 +9906,124 @@ BI.MultiSelectBar = BI.inherit(BI.BasicButton, {
});
BI.MultiSelectBar.EVENT_CHANGE = "MultiSelectBar.EVENT_CHANGE";
$.shortcut("bi.multi_select_bar", BI.MultiSelectBar);/**
* 倒立的Branch
* @class BI.HandStandBranchExpander
* @extend BI.Widget
* create by young
*/
BI.HandStandBranchExpander = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.HandStandBranchExpander.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-handstand-branch-expander",
direction: BI.Direction.Top,
logic: {
dynamic: true
},
el: {type: "bi.label"},
popup: {}
})
},
_init: function () {
BI.HandStandBranchExpander.superclass._init.apply(this, arguments);
var o = this.options;
this._initExpander();
this._initBranchView();
BI.createWidget(BI.extend({
element: this
}, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, {
items: BI.LogicFactory.createLogicItemsByDirection(o.direction, {
type: "bi.center_adapt",
items: [this.expander]
}, this.branchView)
}))));
},
_initExpander: function () {
var self = this, o = this.options;
this.expander = BI.createWidget(o.el);
this.expander.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
});
},
_initBranchView: function () {
var self = this, o = this.options;
this.branchView = BI.createWidget(o.popup, {});
this.branchView.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
});
},
populate: function (items) {
this.branchView.populate.apply(this.branchView, arguments);
},
getValue: function () {
return this.branchView.getValue();
}
});
BI.HandStandBranchExpander.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.handstand_branch_expander", BI.HandStandBranchExpander);/**
* @class BI.BranchExpander
* @extend BI.Widget
* create by young
*/
BI.BranchExpander = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.BranchExpander.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-branch-expander",
direction: BI.Direction.Left,
logic: {
dynamic: true
},
el: {},
popup: {}
})
},
_init: function () {
BI.BranchExpander.superclass._init.apply(this, arguments);
var o = this.options;
this._initExpander();
this._initBranchView();
BI.createWidget(BI.extend({
element: this
}, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, {
items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.expander, this.branchView)
}))));
},
_initExpander: function () {
var self = this, o = this.options;
this.expander = BI.createWidget(o.el, {
type: "bi.label",
width: 30,
height: "100%"
});
this.expander.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
});
},
_initBranchView: function () {
var self = this, o = this.options;
this.branchView = BI.createWidget(o.popup, {});
this.branchView.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
});
},
populate: function (items) {
this.branchView.populate.apply(this.branchView, arguments);
},
getValue: function () {
return this.branchView.getValue();
}
});
BI.BranchExpander.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.branch_expander", BI.BranchExpander);/**
* @class BI.HandStandBranchTree
* @extends BI.Widget
* create by young

118
src/base/layer/layer.scroll.js

@ -1,118 +0,0 @@
/**
* guy
* @class BI.ScrollView
* @extends BI.Widget
*/
BI.ScrollView = BI.inherit(BI.Widget, {
_const: {
dropDownHeight: 15,
expandIcon: "column-next-page-h-font",
collapseIcon: "column-pre-page-h-font"
},
_defaultConfig: function() {
return BI.extend(BI.ScrollView.superclass._defaultConfig.apply(this, arguments), {
baseCls:"bi-scroll-view",
scrollHeight: 50,
maxHeight: 300
})
},
_init : function() {
BI.ScrollView.superclass._init.apply(this, arguments);
this.scrollUp = false;
this.scroll = BI.createWidget({
type: "bi.vertical",
cls: "scroll-container",
scrolly: true
})
BI.createWidget({
type: "bi.vertical",
element: this,
scrolly: false,
items: [this.scroll]
})
this.dropdown = BI.createWidget({
type: "bi.icon_button",
height: this._const.dropDownHeight,
cls: "scroll-drop-down-icon " + this._const.expandIcon,
handler: BI.bind(this._dropDownOrUp, this)
})
BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: this.dropdown,
left: 0,
right: 0,
bottom: -1 * this._const.dropDownHeight
}]
})
this.populate(this.options.items);
},
_dropDownOrUp: function(){
if(!this.scrollUp){
var height = this.element.height();
height += this.options.scrollHeight;
height = Math.min(height, this.scroll.element[0].scrollHeight, this.options.maxHeight);
this.element.height(height);
this._checkDropDownState();
} else {
var height = this.element.height();
height -= this.options.scrollHeight;
height = Math.max(height, this.options.height);
this.element.height(height);
this._checkDropDownState();
}
},
_checkDropDownState: function(){
var height = this.element.height();
if(!this._checkScroll() || height >= this.options.maxHeight){
this.scrollUp = true;
this.dropdown.element.removeClass(this._const.expandIcon).addClass(this._const.collapseIcon);
} else if(height <= this.options.height){
this.scrollUp = false;
this.dropdown.element.addClass(this._const.expandIcon);
} else {
this.dropdown.element.addClass(this.scrollUp ? this._const.collapseIcon : this._const.expandIcon);
}
},
_checkScroll: function(){
this.scroll.element.height(this.element.height());
return this.scroll.element[0].scrollHeight > this.scroll.element[0].clientHeight;
},
_checkDropDown: function(){
if(this._checkScroll()){
this.dropdown.visible();
//this.scrollUp = false;
this._checkDropDownState();
} else {
this.dropdown.invisible();
}
},
populate: function(){
this.scroll.populate.apply(this.scroll, arguments);
this.resize();
},
resize: function(){
this.element.height(this.options.height);
BI.nextTick(BI.bind(this._checkDropDown, this));
},
addItem: function(){
this.scroll.addItem.apply(this.scroll, arguments);
BI.nextTick(BI.bind(this._checkDropDown, this));
}
});
$.shortcut("bi.scroll_view", BI.ScrollView);

0
src/case/expander/expander.branch.handstand.js → src/case/tree/expander/expander.branch.handstand.js

0
src/case/expander/expander.branch.js → src/case/tree/expander/expander.branch.js

18
src/css/base/view/scrollview.css

@ -1,18 +0,0 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-scroll-view .scroll-container {
border-left: 1px solid #d4dadd;
border-right: 1px solid #d4dadd;
border-bottom: 1px solid #d4dadd;
}
.bi-scroll-view .scroll-drop-down-icon {
font-size: 14px;
border-bottom: 1px solid #d4dadd;
border-left: 1px solid #d4dadd;
border-right: 1px solid #d4dadd;
background: #f4f4f4;
}
.bi-scroll-view .scroll-drop-down-icon:active {
background: #d4dadd;
}

30
src/less/base/logintimeout/login.timeout.less

@ -1,30 +0,0 @@
@import "../../bibase";
.bi-login-timeout-center{
& .input-wrapper{
border-bottom: 1px solid @color-bi-border-line;
& .login-input{
font-size: @font-size-16;
}
& .error-mask{
background: @color-bi-background-black;
.opacity(0.25);
color: @color-bi-text;
font-size: @font-size-16;
}
}
& .login-button{
background: @color-bi-background-highlight;
.border-radius(25px);
font-size: @font-size-22;
color: @color-bi-text;
&:hover{
.opacity(0.8);
}
}
}
.bi-login-timeout-south{
& .keep-state{
font-size: @font-size-14;
color: @color-bi-text-gray;
}
}

20
src/less/base/reqloading/loading.request.less

@ -1,20 +0,0 @@
@import "../../bibase";
.bi-request-loading {
& .mask-pane {
background: @color-bi-background-default;
.opacity(0.8);
}
& .loading-comment {
font-size: 20px;
color: @color-bi-text-gray;
}
& .load-fail-comment {
font-size: 20px;
color: @color-bi-text-gray;
}
& .load-timeout-warning {
font-size: @font-size-16;
color: @color-bi-text-warning;
}
}

25
src/less/base/timeouttoast/widget.timeouttoast.less

@ -1,25 +0,0 @@
@import "../../bibase";
.bi-timeout-toast {
font-size: @font-size-14;
.border-radius(2px);
background: @color-bi-tip-warning-background;
color: @color-bi-text-warning;
& .cancel-button {
background: @color-bi-background-default;
border: 1px solid @color-bi-border-normal;
color: @color-bi-text-black;
.border-radius(2px);
&:hover {
.opacity(0.8);
}
}
& .retry-button {
background: @color-bi-background-highlight;
.border-radius(2px);
color: @color-bi-text;
&:hover {
.opacity(0.8);
}
}
}

19
src/less/base/view/scrollview.less

@ -1,19 +0,0 @@
@import "../../bibase";
.bi-scroll-view{
.scroll-container{
border-left: 1px solid @color-bi-split-dark;
border-right: 1px solid @color-bi-split-dark;
border-bottom: 1px solid @color-bi-split-dark;
}
& .scroll-drop-down-icon{
font-size: @font-size-14;
border-bottom: 1px solid @color-bi-split-dark;
border-left: 1px solid @color-bi-split-dark;
border-right: 1px solid @color-bi-split-dark;
background: @color-bi-background-gray;
&:active{
background: @color-bi-background-dark;
}
}
}
Loading…
Cancel
Save