New: Show calendar title above buttons on small screens (phones)
This commit is contained in:
parent
4ad28bb6f6
commit
1586743df2
|
@ -33,6 +33,18 @@ define(
|
|||
},
|
||||
|
||||
_viewRender: function (view) {
|
||||
|
||||
if ($(window).width() < 768) {
|
||||
this.$('.fc-header-title').show();
|
||||
this.$('.calendar-title').remove();
|
||||
|
||||
var title = this.$('.fc-header-title').text();
|
||||
var titleDiv = '<div class="calendar-title"><h2>{0}</h2></div>'.format(title);
|
||||
|
||||
this.$('.fc-header').before(titleDiv);
|
||||
this.$('.fc-header-title').hide();
|
||||
}
|
||||
|
||||
if (Config.getValue(this.storageKey) !== view.name) {
|
||||
Config.setValue(this.storageKey, view.name);
|
||||
}
|
||||
|
|
|
@ -185,3 +185,12 @@
|
|||
cursor : text;
|
||||
}
|
||||
}
|
||||
|
||||
.calendar-title {
|
||||
text-align : center;
|
||||
|
||||
h2 {
|
||||
margin-top : 0px;
|
||||
margin-bottom : 5px;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue