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
 
97
 
98
 // Overrides default settings to send a message to the webview when clicking on an event
98
 // Overrides default settings to send a message to the webview when clicking on an event
99
 const FULL_CALENDAR_SETTINGS = `
99
 const FULL_CALENDAR_SETTINGS = `
100
-var calendar = $('#calendar').fullCalendar('getCalendar');
100
+let calendar = $('#calendar').fullCalendar('getCalendar');
101
 calendar.option({
101
 calendar.option({
102
   eventClick: function (data, event, view) {
102
   eventClick: function (data, event, view) {
103
-      var message = {
103
+      let message = {
104
       title: data.title,
104
       title: data.title,
105
       color: data.color,
105
       color: data.color,
106
       start: data.start._d,
106
       start: data.start._d,
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
 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}";
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
 const INJECT_STYLE = `
116
 const INJECT_STYLE = `
117
-$('head').append('<meta name="viewport" content="width=device-width, initial-scale=0.9">');
118
 $('head').append('<style>` + CUSTOM_CSS + `</style>');
117
 $('head').append('<style>` + CUSTOM_CSS + `</style>');
119
 `;
118
 `;
120
 
119
 
288
 
287
 
289
         let msg = DateManager.getInstance().getTranslatedDate(startDate) + "\n";
288
         let msg = DateManager.getInstance().getTranslatedDate(startDate) + "\n";
290
         if (startString != null && endString != null)
289
         if (startString != null && endString != null)
291
-            msg += startString + ' - ' + endDate;
290
+            msg += startString + ' - ' + endString;
292
         this.showDialog(data.title, msg)
291
         this.showDialog(data.title, msg)
293
     };
292
     };
294
 
293
 

Loading…
Cancel
Save