mirror of
https://github.com/lxsang/antos-frontend.git
synced 2024-12-26 01:18:21 +01:00
improve: allow changing year in calendar widget
All checks were successful
AntOS front-end / Build-AntOS-Frontend (push) Successful in 34s
All checks were successful
AntOS front-end / Build-AntOS-Frontend (push) Successful in 34s
This commit is contained in:
parent
a554a678d8
commit
bfeef223a8
4
Makefile
4
Makefile
@ -8,11 +8,11 @@ TSC=./node_modules/typescript/bin/tsc
|
||||
UGLIFYJS=./node_modules/terser/bin/terser
|
||||
UGLIFYCSS=./node_modules/uglifycss/uglifycss
|
||||
|
||||
VERSION?=2.0.0-b
|
||||
VERSION?=2.0.1-b
|
||||
BUILDID?=master
|
||||
|
||||
GSED=sed
|
||||
UNAME_S := $(shell uname -s)
|
||||
UNAME_S := $(shell uname -s)cd
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
GSED=gsed
|
||||
endif
|
||||
|
18348
d.ts/antos.d.ts
vendored
18348
d.ts/antos.d.ts
vendored
File diff suppressed because it is too large
Load Diff
@ -115,8 +115,18 @@ namespace OS {
|
||||
protected mount(): void {
|
||||
(this.refs.prev as ButtonTag).iconclass = "fa fa-angle-left";
|
||||
(this.refs.next as ButtonTag).iconclass = "fa fa-angle-right";
|
||||
(this.refs.prev_year as ButtonTag).iconclass = "fa fa-angle-left";
|
||||
(this.refs.next_year as ButtonTag).iconclass = "fa fa-angle-right";
|
||||
(this.refs.prev as ButtonTag).onbtclick = (e) => this.prevmonth();
|
||||
(this.refs.next as ButtonTag).onbtclick = (e) => this.nextmonth();
|
||||
(this.refs.next_year as ButtonTag).onbtclick = (e) => {
|
||||
this._year++;
|
||||
this.calendar(new Date(this._year, this._month, 1));
|
||||
}
|
||||
(this.refs.prev_year as ButtonTag).onbtclick = (e) => {
|
||||
this._year--;
|
||||
this.calendar(new Date(this._year, this._month, 1));
|
||||
}
|
||||
const grid = this.refs.grid as GridViewTag;
|
||||
grid.header = [
|
||||
{ text: "__(Sun)" },
|
||||
@ -304,7 +314,8 @@ namespace OS {
|
||||
grid.rows = rows;
|
||||
(this.refs.mlbl as LabelTag).text = `${
|
||||
months[this._month]
|
||||
} ${this._year}`;
|
||||
}`;
|
||||
(this.refs.ylbl as LabelTag).text = `${this._year}`;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -320,9 +331,13 @@ namespace OS {
|
||||
el: "div",
|
||||
ref: "ctrl",
|
||||
children: [
|
||||
{ el: "afx-button", class: "prevmonth", ref: "prev" },
|
||||
{ el: "afx-button", ref: "prev" },
|
||||
{ el: "afx-label", ref: "mlbl" },
|
||||
{ el: "afx-button", class: "nextmonth", ref: "next" },
|
||||
{ el: "afx-button", ref: "next" },
|
||||
{ el: "div"},
|
||||
{ el: "afx-button", ref: "prev_year" },
|
||||
{ el: "afx-label", ref: "ylbl" },
|
||||
{ el: "afx-button", ref: "next_year" },
|
||||
],
|
||||
},
|
||||
{ el: "afx-grid-view", ref: "grid" },
|
||||
|
@ -6,6 +6,19 @@ afx-calendar-view > div afx-label i{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
afx-calendar-view afx-button button,
|
||||
afx-calendar-view afx-button button:active,
|
||||
afx-calendar-view afx-button button.btactive
|
||||
{
|
||||
border: 0;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
afx-calendar-view afx-button button:active,
|
||||
afx-calendar-view afx-button button.btactive
|
||||
{
|
||||
color: var(--item-bg-active);
|
||||
}
|
||||
|
||||
afx-calendar-view afx-grid-view afx-grid-row.afx-grid-row-selected afx-grid-cell
|
||||
{
|
||||
|
@ -6,7 +6,7 @@ afx-calendar-view afx-grid-view afx-grid-row:nth-child(even) afx-grid-cell
|
||||
afx-calendar-view afx-grid-view .grid_row_header afx-grid-cell{
|
||||
border-right: 0;
|
||||
}
|
||||
afx-calendar-view afx-label {
|
||||
afx-calendar-view afx-label, afx-calendar-view > div > div {
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
}
|
||||
@ -15,7 +15,7 @@ afx-calendar-view > div {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
afx-calendar-view > div > afx-label
|
||||
afx-calendar-view > div > div
|
||||
{
|
||||
flex:1;
|
||||
}
|
Loading…
Reference in New Issue
Block a user