Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion css/app/eventdialog.css
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
}

.advanced .tabHeaders {
margin: 20px 0 15px;
margin: 0 0 15px;
float: left;
width: 100%;
}
Expand Down
15 changes: 12 additions & 3 deletions js/app/controllers/editorcontroller.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ app.controller('EditorController', ['$scope', 'TimezoneService', 'AutoCompletion
$scope.oldCalendar = isNew ? calendar : vevent.calendar;
$scope.readOnly = !vevent.calendar.isWritable();
$scope.accessibleViaCalDAV = vevent.calendar.eventsAccessibleViaCalDAV();
$scope.selected = 1;
$scope.selected = 0;
$scope.timezones = [];
$scope.emailAddress = emailAddress;
$scope.edittimezone = ((
Expand All @@ -50,6 +50,7 @@ app.controller('EditorController', ['$scope', 'TimezoneService', 'AutoCompletion
$scope.postEditingHooks = [];

$scope.tabs = [
{title: t('calendar', 'Details'), value: 0},
{title: t('calendar', 'Attendees'), value: 1},
{title: t('calendar', 'Reminders'), value: 2},
{title: t('calendar', 'Repeating'), value: 3}
Expand Down Expand Up @@ -80,7 +81,7 @@ app.controller('EditorController', ['$scope', 'TimezoneService', 'AutoCompletion
callback();
});

$scope.tabopener(1);
$scope.tabopener(0);
});

$scope.registerPostHook = function(callback) {
Expand Down Expand Up @@ -158,15 +159,23 @@ app.controller('EditorController', ['$scope', 'TimezoneService', 'AutoCompletion
*/
$scope.tabopener = function (val) {
$scope.selected = val;
if (val === 1) {
if (val === 0) {
$scope.eventsdetailsview = true;
$scope.eventsattendeeview = false;
$scope.eventsalarmview = false;
$scope.eventsrepeatview = false;
} else if (val === 1) {
$scope.eventsdetailsview = false;
$scope.eventsattendeeview = true;
$scope.eventsalarmview = false;
$scope.eventsrepeatview = false;
} else if (val === 2) {
$scope.eventsdetailsview = false;
$scope.eventsattendeeview = false;
$scope.eventsalarmview = true;
$scope.eventsrepeatview = false;
} else if (val === 3) {
$scope.eventsdetailsview = false;
$scope.eventsattendeeview = false;
$scope.eventsalarmview = false;
$scope.eventsrepeatview = true;
Expand Down
36 changes: 18 additions & 18 deletions templates/editor.sidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,39 +41,39 @@ class="advanced--input h2"
</div>
</fieldset>

<ul class="tabHeaders">
<li class="tabHeader" ng-repeat="tab in tabs"
ng-click="tabopener(tab.value)" ng-class="{selected: tab.value == selected}">
<a href="#">{{tab.title}}</a>
</li>
</ul>

<fieldset class="advanced--fieldset" ng-disabled="readOnly">
<div ng-include="currentTab"></div>
</fieldset>

<fieldset ng-show="eventsdetailsview" class="advanced--fieldset" ng-disabled="readOnly">
<textarea ng-model="properties.location.value" type="text" class="advanced--input"
placeholder="<?php p($l->t('Location'));?>" name="location"
placeholder="<?php p($l->t('Location'));?>" name="location"
uib-typeahead="location.name for location in searchLocation($viewValue)" typeahead-show-hint="true" typeahead-min-length="3"
typeahead-on-select="selectLocationFromTypeahead($item)"
autocomplete="off" ></textarea>
<textarea ng-model="properties.description.value" type="text" class="advanced--input advanced--textarea"
placeholder="<?php p($l->t('Description'));?>" name="description"></textarea>
placeholder="<?php p($l->t('Description'));?>" name="description"></textarea>
<select id="statusSelector"
ng-options="status.type as status.displayname for status in statusSelect"
ng-init="setStatusToDefault()"
ng-model="properties.status.value"
title="<?php p($l->t('Event status')); ?>"></select>
<?php if ($_['supportsClass']): ?>
<select id="classSelector"
ng-options="class.type as class.displayname for class in classSelect"
ng-init="setClassToDefault()"
ng-model="properties.class.value"
title="<?php p($l->t('Visibility when sharing')); ?>"></select>
<select id="classSelector"
ng-options="class.type as class.displayname for class in classSelect"
ng-init="setClassToDefault()"
ng-model="properties.class.value"
title="<?php p($l->t('Visibility when sharing')); ?>"></select>
<?php endif; ?>
</fieldset>

<ul class="tabHeaders">
<li class="tabHeader" ng-repeat="tab in tabs"
ng-click="tabopener(tab.value)" ng-class="{selected: tab.value == selected}">
<a href="#">{{tab.title}}</a>
</li>
</ul>

<fieldset class="advanced--fieldset" ng-disabled="readOnly">
<div ng-include="currentTab"></div>
</fieldset>

<fieldset ng-show="eventsattendeeview" class="advanced--fieldset" ng-disabled="readOnly" ng-controller="AttendeeController">
<?php print_unescaped($this->inc('part.eventsattendees')); ?>
</fieldset>
Expand Down