mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-01 12:24:28 +01:00
fix colors in ics imports
This commit is contained in:
parent
5215d0643d
commit
122ff54cd8
@ -770,10 +770,10 @@ Application.Controllers.controller('AdminICalendarController', ['$scope', 'iCale
|
||||
// configuration of a new ICS source
|
||||
$scope.newCalendar = {
|
||||
color: undefined,
|
||||
textColor: undefined,
|
||||
text_color: undefined,
|
||||
url: undefined,
|
||||
name: undefined,
|
||||
textHidden: false
|
||||
text_hidden: false
|
||||
};
|
||||
|
||||
/**
|
||||
@ -786,8 +786,8 @@ Application.Controllers.controller('AdminICalendarController', ['$scope', 'iCale
|
||||
$scope.newCalendar.url = undefined;
|
||||
$scope.newCalendar.name = undefined;
|
||||
$scope.newCalendar.color = null;
|
||||
$scope.newCalendar.textColor = null;
|
||||
$scope.newCalendar.textHidden = false;
|
||||
$scope.newCalendar.text_color = null;
|
||||
$scope.newCalendar.text_hidden = false;
|
||||
}, function (error) {
|
||||
// failed
|
||||
growl.error(_t('icalendar.create_error'));
|
||||
@ -802,9 +802,9 @@ Application.Controllers.controller('AdminICalendarController', ['$scope', 'iCale
|
||||
$scope.calendarStyle = function (calendar) {
|
||||
return {
|
||||
'border-color': calendar.color,
|
||||
'color': calendar.textColor,
|
||||
'width': calendar.textHidden ? '50px' : 'auto',
|
||||
'height': calendar.textHidden ? '21px' : 'auto'
|
||||
'color': calendar.text_color,
|
||||
'width': calendar.text_hidden ? '50px' : 'auto',
|
||||
'height': calendar.text_hidden ? '21px' : 'auto'
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,7 @@ Application.Controllers.controller('CalendarController', ['$scope', '$state', '$
|
||||
$scope.externals.filter(e => e.checked).forEach(e => {
|
||||
$scope.eventSources.push({
|
||||
url: `/api/i_calendar/${e.id}/events`,
|
||||
textColor: e.textColor,
|
||||
textColor: e.text_color,
|
||||
color: e.color
|
||||
});
|
||||
});
|
||||
|
@ -33,7 +33,7 @@
|
||||
<th style="width: 35%;" translate>{{ 'icalendar.name' }}</th>
|
||||
<th style="width: 35%;" translate>{{ 'icalendar.url' }}</th>
|
||||
<th translate>{{ 'icalendar.display' }}</th>
|
||||
<th style="width: 10%;"></th>
|
||||
<th style="width: 20%;"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -72,12 +72,12 @@
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-paint-brush"></i>
|
||||
</div>
|
||||
<input type="text" minicolors ng-model="newCalendar.textColor" class="form-control" placeholder="{{ 'icalendar.text_color' | translate}}" required/>
|
||||
<input type="text" minicolors ng-model="newCalendar.text_color" class="form-control" placeholder="{{ 'icalendar.text_color' | translate}}" required/>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<label for="hideText" class="control-label m-r" translate>{{ 'icalendar.hide_text' }}</label>
|
||||
<input bs-switch
|
||||
ng-model="newCalendar.textHidden"
|
||||
ng-model="newCalendar.text_hidden"
|
||||
id="hideText"
|
||||
type="checkbox"
|
||||
class="form-control"
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
# iCalendar (RFC 5545) files, stored by URL and kept with their display configuration
|
||||
class ICalendar < ActiveRecord::Base
|
||||
has_many :i_calendar_events
|
||||
has_many :i_calendar_events, dependent: :destroy
|
||||
|
||||
after_create :sync_events
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user