Browse Source

Improved planex to match new website version

Arnaud Vergnet 3 years ago
parent
commit
63b02cd83c
1 changed files with 4 additions and 5 deletions
  1. 4
    5
      src/screens/Planex/PlanexScreen.js

+ 4
- 5
src/screens/Planex/PlanexScreen.js View File

@@ -97,10 +97,10 @@ const OBSERVE_MUTATIONS_INJECTED =
97 97
 
98 98
 // Overrides default settings to send a message to the webview when clicking on an event
99 99
 const FULL_CALENDAR_SETTINGS = `
100
-var calendar = $('#calendar').fullCalendar('getCalendar');
100
+let calendar = $('#calendar').fullCalendar('getCalendar');
101 101
 calendar.option({
102 102
   eventClick: function (data, event, view) {
103
-      var message = {
103
+      let message = {
104 104
       title: data.title,
105 105
       color: data.color,
106 106
       start: data.start._d,
@@ -110,11 +110,10 @@ calendar.option({
110 110
   }
111 111
 });`;
112 112
 
113
-const CUSTOM_CSS = "body>.container{padding-top:20px; padding-bottom: 50px}header,#entite,#groupe_visibility,#calendar .fc-left,#calendar .fc-right{display:none}.fc-toolbar .fc-center{width:100%}.fc-toolbar .fc-center>*{float:none;width:100%;margin:0}#entite{margin-bottom:5px!important}#entite,#groupe{width:calc(100% - 20px);margin:0 10px}#groupe_visibility{width:100%}#calendar .fc-agendaWeek-view .fc-content-skeleton .fc-title{font-size:.6rem}#calendar .fc-agendaWeek-view .fc-content-skeleton .fc-time{font-size:.5rem}#calendar .fc-month-view .fc-content-skeleton .fc-title{font-size:.6rem}#calendar .fc-month-view .fc-content-skeleton .fc-time{font-size:.7rem}.fc-axis{font-size:.8rem;width:15px!important}.fc-day-header{font-size:.8rem}.fc-unthemed td.fc-today{background:#be1522; opacity:0.4}";
113
+const CUSTOM_CSS = "body>.container{padding-top:20px; padding-bottom: 50px}header,#entite,#groupe_visibility,#calendar .fc-left,#calendar .fc-right{display:none}#calendar .fc-agendaWeek-view .fc-content-skeleton .fc-title{font-size:.6rem}#calendar .fc-agendaWeek-view .fc-content-skeleton .fc-time{font-size:.5rem}#calendar .fc-month-view .fc-content-skeleton .fc-title{font-size:.6rem}#calendar .fc-month-view .fc-content-skeleton .fc-time{font-size:.7rem}.fc-axis{font-size:.8rem;width:15px!important}.fc-day-header{font-size:.8rem}.fc-unthemed td.fc-today{background:#be1522; opacity:0.4}";
114 114
 const CUSTOM_CSS_DARK = "body{background-color:#121212}.fc-unthemed .fc-content,.fc-unthemed .fc-divider,.fc-unthemed .fc-list-heading td,.fc-unthemed .fc-list-view,.fc-unthemed .fc-popover,.fc-unthemed .fc-row,.fc-unthemed tbody,.fc-unthemed td,.fc-unthemed th,.fc-unthemed thead{border-color:#222}.fc-toolbar .fc-center>*,h2,table{color:#fff}.fc-event-container{color:#121212}.fc-event-container .fc-bg{opacity:0.2;background-color:#000}.fc-unthemed td.fc-today{background:#be1522; opacity:0.4}";
115 115
 
116 116
 const INJECT_STYLE = `
117
-$('head').append('<meta name="viewport" content="width=device-width, initial-scale=0.9">');
118 117
 $('head').append('<style>` + CUSTOM_CSS + `</style>');
119 118
 `;
120 119
 
@@ -288,7 +287,7 @@ class PlanexScreen extends React.Component<Props, State> {
288 287
 
289 288
         let msg = DateManager.getInstance().getTranslatedDate(startDate) + "\n";
290 289
         if (startString != null && endString != null)
291
-            msg += startString + ' - ' + endDate;
290
+            msg += startString + ' - ' + endString;
292 291
         this.showDialog(data.title, msg)
293 292
     };
294 293
 

Loading…
Cancel
Save