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