Browse Source

BI-25602 && BI-25604

es6
windy 6 years ago
parent
commit
6e537deefe
  1. 3
      src/base/layer/layer.popup.js
  2. 2
      src/case/calendar/calendar.year.js
  3. 4
      src/css/base/calendar/calendar.css
  4. 4
      src/css/base/view/popupview.css
  5. 4
      src/css/widget/date/calendar/popup.css
  6. 6
      src/less/base/calendar/calendar.year.less
  7. 4
      src/less/base/view/popupview.less
  8. 2
      src/widget/date/calendar/combo.year.date.js
  9. 2
      src/widget/date/calendar/picker.date.js
  10. 2
      src/widget/date/calendar/picker.year.js
  11. 20
      src/widget/date/calendar/popup.calendar.date.js
  12. 5
      src/widget/date/calendar/trigger.triangle.date.js
  13. 34
      src/widget/datepane/card.static.datepane.js
  14. 29
      src/widget/datetimepane/card.static.datetimepane.js
  15. 2
      src/widget/downlist/popup.downlist.js
  16. 58
      src/widget/dynamicdate/dynamicdate.card.js
  17. 1
      src/widget/yearmonth/card.static.yearmonth.js
  18. 2
      src/widget/yearmonth/combo.yearmonth.js

3
src/base/layer/layer.popup.js

@ -17,6 +17,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
bgap: 0,
vgap: 0,
hgap: 0,
innerVGap: 0,
direction: BI.Direction.Top, // 工具栏的方向
stopEvent: false, // 是否停止mousedown、mouseup事件
stopPropagation: false, // 是否停止mousedown、mouseup向上冒泡
@ -94,7 +95,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
_createView: function () {
var o = this.options;
this.button_group = BI.createWidget(o.el, {type: "bi.button_group", value: o.value});
this.button_group.element.css({"min-height": o.minHeight + "px"});
this.button_group.element.css({"min-height": o.minHeight + "px", "padding-top": o.innerVGap + "px", "padding-bottom": o.innerVGap + "px"});
return this.button_group;
},

2
src/case/calendar/calendar.year.js

@ -65,7 +65,7 @@ BI.YearCalendar = BI.inherit(BI.Widget, {
once: false,
forceSelected: true,
height: 24,
width: 38,
width: 45,
value: td.text,
disabled: td.disabled
});

4
src/css/base/calendar/calendar.css

@ -0,0 +1,4 @@
.bi-year-calendar {
padding-top: 5px;
padding-bottom: 5px;
}

4
src/css/base/view/popupview.css

@ -11,6 +11,10 @@
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-popup-view .padding-outer {
padding-top: 5px;
padding-bottom: 5px;
}
.bi-popup-view .list-view-shadow {
-webkit-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
-moz-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);

4
src/css/widget/date/calendar/popup.css

@ -0,0 +1,4 @@
.bi-date-calendar-popup .navigation-header {
padding-left: 10px;
padding-right: 10px;
}

6
src/less/base/calendar/calendar.year.less

@ -0,0 +1,6 @@
@import "../../index";
.bi-year-calendar {
padding-top: 5px;
padding-bottom: 5px;
}

4
src/less/base/view/popupview.less

@ -10,6 +10,10 @@
& .list-view-outer {
.border-radius(2px);
}
& .padding-outer{
padding-top: 5px;
padding-bottom: 5px;
}
& .list-view-shadow {
.box-shadow(0 1px 5px 0, fade(@color-bi-background-black, 20));
}

2
src/widget/date/calendar/combo.year.date.js

@ -45,7 +45,7 @@ BI.YearDateCombo = BI.inherit(BI.Trigger, {
isNeedAdjustWidth: false,
el: this.trigger,
popup: {
minWidth: 85,
minWidth: 100,
stopPropagation: false,
el: this.popup
}

2
src/widget/date/calendar/picker.date.js

@ -7,7 +7,7 @@ BI.DatePicker = BI.inherit(BI.Widget, {
_defaultConfig: function () {
var conf = BI.DatePicker.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: "bi-date-picker bi-background",
baseCls: "bi-date-picker",
height: 40,
min: "1900-01-01", // 最小日期
max: "2099-12-31" // 最大日期

2
src/widget/date/calendar/picker.year.js

@ -7,7 +7,7 @@ BI.YearPicker = BI.inherit(BI.Widget, {
_defaultConfig: function () {
var conf = BI.YearPicker.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: "bi-year-picker bi-background",
baseCls: "bi-year-picker",
behaviors: {},
height: 40,
min: "1900-01-01", // 最小日期

20
src/widget/date/calendar/popup.calendar.date.js

@ -53,7 +53,6 @@ BI.DateCalendarPopup = BI.inherit(BI.Widget, {
this.calendar = BI.createWidget({
direction: "top",
element: this,
logic: {
dynamic: true
},
@ -81,6 +80,25 @@ BI.DateCalendarPopup = BI.inherit(BI.Widget, {
self.setValue(self.selectedTime);
self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE);
});
BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: this.calendar,
left: 10,
right: 10
}, {
el: {
type: "bi.layout",
cls: "bi-border-top"
},
height: 1,
top: 40,
left: 0,
right: 0
}]
});
},
setValue: function (timeOb) {

5
src/widget/date/calendar/trigger.triangle.date.js

@ -42,7 +42,10 @@ BI.DateTriangleTrigger = BI.inherit(BI.Trigger, {
type: "bi.center_adapt",
width: 50,
height: c.height,
items: [this.text, this.icon]
items: [{
el: this.text,
rgap: 10
}, this.icon]
}]
});
},

34
src/widget/datepane/card.static.datepane.js

@ -48,11 +48,10 @@ BI.StaticDatePaneCard = BI.inherit(BI.Widget, {
});
this.calendar = BI.createWidget({
direction: "top",
element: this,
logic: {
dynamic: false
},
direction: "custom",
// logic: {
// dynamic: false
// },
type: "bi.navigation",
tab: this.datePicker,
cardCreator: BI.bind(this._createNav, this)
@ -65,6 +64,31 @@ BI.StaticDatePaneCard = BI.inherit(BI.Widget, {
});
this.setValue(o.selectedTime);
BI.createWidget({
type: "bi.vtape",
element: this,
items: [{
el: this.datePicker,
height: 40
}, this.calendar],
hgap: 10
});
BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.layout",
cls: "bi-border-top"
},
height: 1,
top: 40,
left: 0,
right: 0
}]
});
},
_createNav: function (v) {

29
src/widget/datetimepane/card.static.datetimepane.js

@ -46,10 +46,10 @@ BI.StaticDateTimePaneCard = BI.inherit(BI.Widget, {
});
this.calendar = BI.createWidget({
direction: "top",
logic: {
dynamic: false
},
direction: "custom",
// logic: {
// dynamic: false
// },
type: "bi.navigation",
tab: this.datePicker,
cardCreator: BI.bind(this._createNav, this)
@ -64,7 +64,11 @@ BI.StaticDateTimePaneCard = BI.inherit(BI.Widget, {
BI.createWidget({
type: "bi.vtape",
element: this,
items: [this.calendar, {
hgap: 10,
items: [{
el: this.datePicker,
height: 40
}, this.calendar, {
el: {
type: "bi.dynamic_date_time_select",
ref: function () {
@ -81,6 +85,21 @@ BI.StaticDateTimePaneCard = BI.inherit(BI.Widget, {
height: 40
}]
});
BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.layout",
cls: "bi-border-top"
},
height: 1,
top: 40,
left: 0,
right: 0
}]
});
this.setValue(o.selectedTime);
},

2
src/widget/downlist/popup.downlist.js

@ -106,7 +106,7 @@ BI.DownListPopup = BI.inherit(BI.Pane, {
}]
},
vgap: 5,
innerVGap: 5,
maxHeight: 378
};
item.el.childValues = [];

58
src/widget/dynamicdate/dynamicdate.card.js

@ -14,15 +14,18 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
type: "bi.label",
text: BI.i18nText("BI-Multi_Date_Relative_Current_Time"),
textAlign: "left",
height: 24,
height: 12,
lgap: 10
}
},
tgap: 10,
bgap: 5
}, {
type: "bi.button_group",
ref: function () {
self.checkgroup = this;
},
chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI,
lgap: 4,
value: [BI.DynamicDateCard.TYPE.YEAR],
items: BI.createItems([{
text: BI.i18nText("BI-Basic_Year"),
@ -46,7 +49,8 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
}
}),
layouts: [{
type: "bi.left"
type: "bi.left",
rgap: 4
}],
listeners: [{
eventName: BI.ButtonGroup.EVENT_CHANGE,
@ -82,29 +86,33 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.vertical_adapt",
lgap: 2,
items: [{
type: "bi.multi_select_item",
ref: function () {
self.workDayBox = this;
},
logic: {
dynamic: true
},
text: BI.i18nText("BI-Basic_Work_Day"),
value: BI.DynamicDateCard.TYPE.WORK_DAY,
listeners: [{
eventName: BI.MultiSelectItem.EVENT_CHANGE,
action: function () {
if(this.isSelected()) {
self.checkgroup.setValue();
el: {
type: "bi.multi_select_item",
ref: function () {
self.workDayBox = this;
},
logic: {
dynamic: true
},
text: BI.i18nText("BI-Basic_Work_Day"),
value: BI.DynamicDateCard.TYPE.WORK_DAY,
listeners: [{
eventName: BI.MultiSelectItem.EVENT_CHANGE,
action: function () {
if(this.isSelected()) {
self.checkgroup.setValue();
}
self.resultPane.populate(this.isSelected() ? self._getParamJson([{
dateType: BI.DynamicDateCard.TYPE.WORK_DAY
}]) : []);
self.position = BI.DynamicDateCard.OFFSET.CURRENT;
self.fireEvent("EVENT_CHANGE");
}
self.resultPane.populate(this.isSelected() ? self._getParamJson([{
dateType: BI.DynamicDateCard.TYPE.WORK_DAY
}]) : []);
self.position = BI.DynamicDateCard.OFFSET.CURRENT;
self.fireEvent("EVENT_CHANGE");
}
}]
}]
},
bgap: 5
}],
ref: function () {
self.workDay = this;
@ -119,7 +127,7 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
},
layouts: [{
type: "bi.vertical",
vgap: 10,
bgap: 10,
hgap: 10
}]
}]

1
src/widget/yearmonth/card.static.yearmonth.js

@ -56,6 +56,7 @@ BI.StaticYearMonthCard = BI.inherit(BI.Widget, {
}]
}, {
type: "bi.button_group",
cls: "bi-border-top",
behaviors: o.behaviors,
ref: function () {
self.month = this;

2
src/widget/yearmonth/combo.yearmonth.js

@ -60,7 +60,7 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, {
isNeedAdjustWidth: false,
el: this.trigger,
popup: {
minWidth: 85,
minWidth: 100,
stopPropagation: false,
el: {
type: "bi.dynamic_year_month_popup",

Loading…
Cancel
Save