Skip to content

Commit 6499ac9

Browse files
authored
Merge pull request #88 from nextcloud/sidebar_details_pane
introduce details tab in sidebar
2 parents 849496c + e19f1e0 commit 6499ac9

File tree

3 files changed

+31
-22
lines changed

3 files changed

+31
-22
lines changed

css/app/eventdialog.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@
170170
}
171171

172172
.advanced .tabHeaders {
173-
margin: 20px 0 15px;
173+
margin: 0 0 15px;
174174
float: left;
175175
width: 100%;
176176
}

js/app/controllers/editorcontroller.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ app.controller('EditorController', ['$scope', 'TimezoneService', 'AutoCompletion
3636
$scope.oldCalendar = isNew ? calendar : vevent.calendar;
3737
$scope.readOnly = !vevent.calendar.isWritable();
3838
$scope.accessibleViaCalDAV = vevent.calendar.eventsAccessibleViaCalDAV();
39-
$scope.selected = 1;
39+
$scope.selected = 0;
4040
$scope.timezones = [];
4141
$scope.emailAddress = emailAddress;
4242
$scope.edittimezone = ((
@@ -50,6 +50,7 @@ app.controller('EditorController', ['$scope', 'TimezoneService', 'AutoCompletion
5050
$scope.postEditingHooks = [];
5151

5252
$scope.tabs = [
53+
{title: t('calendar', 'Details'), value: 0},
5354
{title: t('calendar', 'Attendees'), value: 1},
5455
{title: t('calendar', 'Reminders'), value: 2},
5556
{title: t('calendar', 'Repeating'), value: 3}
@@ -80,7 +81,7 @@ app.controller('EditorController', ['$scope', 'TimezoneService', 'AutoCompletion
8081
callback();
8182
});
8283

83-
$scope.tabopener(1);
84+
$scope.tabopener(0);
8485
});
8586

8687
$scope.registerPostHook = function(callback) {
@@ -158,15 +159,23 @@ app.controller('EditorController', ['$scope', 'TimezoneService', 'AutoCompletion
158159
*/
159160
$scope.tabopener = function (val) {
160161
$scope.selected = val;
161-
if (val === 1) {
162+
if (val === 0) {
163+
$scope.eventsdetailsview = true;
164+
$scope.eventsattendeeview = false;
165+
$scope.eventsalarmview = false;
166+
$scope.eventsrepeatview = false;
167+
} else if (val === 1) {
168+
$scope.eventsdetailsview = false;
162169
$scope.eventsattendeeview = true;
163170
$scope.eventsalarmview = false;
164171
$scope.eventsrepeatview = false;
165172
} else if (val === 2) {
173+
$scope.eventsdetailsview = false;
166174
$scope.eventsattendeeview = false;
167175
$scope.eventsalarmview = true;
168176
$scope.eventsrepeatview = false;
169177
} else if (val === 3) {
178+
$scope.eventsdetailsview = false;
170179
$scope.eventsattendeeview = false;
171180
$scope.eventsalarmview = false;
172181
$scope.eventsrepeatview = true;

templates/editor.sidebar.php

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -42,39 +42,39 @@ class="advanced--input h2"
4242
</div>
4343
</fieldset>
4444

45+
<ul class="tabHeaders">
46+
<li class="tabHeader" ng-repeat="tab in tabs"
47+
ng-click="tabopener(tab.value)" ng-class="{selected: tab.value == selected}">
48+
<a href="#">{{tab.title}}</a>
49+
</li>
50+
</ul>
51+
4552
<fieldset class="advanced--fieldset" ng-disabled="readOnly">
53+
<div ng-include="currentTab"></div>
54+
</fieldset>
55+
56+
<fieldset ng-show="eventsdetailsview" class="advanced--fieldset" ng-disabled="readOnly">
4657
<textarea ng-model="properties.location.value" type="text" class="advanced--input"
47-
placeholder="<?php p($l->t('Location'));?>" name="location"
58+
placeholder="<?php p($l->t('Location'));?>" name="location"
4859
uib-typeahead="location.name for location in searchLocation($viewValue)" typeahead-show-hint="true" typeahead-min-length="3"
4960
typeahead-on-select="selectLocationFromTypeahead($item)"
5061
autocomplete="off" ></textarea>
5162
<textarea ng-model="properties.description.value" type="text" class="advanced--input advanced--textarea"
52-
placeholder="<?php p($l->t('Description'));?>" name="description"></textarea>
63+
placeholder="<?php p($l->t('Description'));?>" name="description"></textarea>
5364
<select id="statusSelector"
5465
ng-options="status.type as status.displayname for status in statusSelect"
5566
ng-init="setStatusToDefault()"
5667
ng-model="properties.status.value"
5768
title="<?php p($l->t('Event status')); ?>"></select>
5869
<?php if ($_['supportsClass']): ?>
59-
<select id="classSelector"
60-
ng-options="class.type as class.displayname for class in classSelect"
61-
ng-init="setClassToDefault()"
62-
ng-model="properties.class.value"
63-
title="<?php p($l->t('Visibility when sharing')); ?>"></select>
70+
<select id="classSelector"
71+
ng-options="class.type as class.displayname for class in classSelect"
72+
ng-init="setClassToDefault()"
73+
ng-model="properties.class.value"
74+
title="<?php p($l->t('Visibility when sharing')); ?>"></select>
6475
<?php endif; ?>
6576
</fieldset>
6677

67-
<ul class="tabHeaders">
68-
<li class="tabHeader" ng-repeat="tab in tabs"
69-
ng-click="tabopener(tab.value)" ng-class="{selected: tab.value == selected}">
70-
<a href="#">{{tab.title}}</a>
71-
</li>
72-
</ul>
73-
74-
<fieldset class="advanced--fieldset" ng-disabled="readOnly">
75-
<div ng-include="currentTab"></div>
76-
</fieldset>
77-
7878
<fieldset ng-show="eventsattendeeview" class="advanced--fieldset" ng-disabled="readOnly" ng-controller="AttendeeController">
7979
<?php print_unescaped($this->inc('part.eventsattendees')); ?>
8080
</fieldset>

0 commit comments

Comments
 (0)