Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix date timepicker layout in events editors #407

Merged
merged 2 commits into from
Apr 9, 2017
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
76 changes: 53 additions & 23 deletions css/app/eventdialog.css
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,10 @@
float: right;
}

.advanced .start-end-container {
margin-right: 15px;
}

.advanced .advanced--checkbox {
margin: 10px 0;
}

.advanced .timezone-container {
margin: 4px -17px;
}

.advanced .timezone-select {
width: 110% !important; /* very dirty hack to fix alignment issues. */
}

.modal-open .modal.popover,
.modal-open .modal.import {
position: absolute;
Expand Down Expand Up @@ -95,24 +83,56 @@
}

.events .events--fieldset select {
width: 99.5%;
width: 100%;
margin-right: 0;
}

.advanced .event-time-interior,
.events .event-time-interior {
width: 40%;
}

@media (max-width: 1600px) {
.advanced .event-time-interior {
width: 45%;
}
}

@media (max-width: 1450px) {
.advanced .event-time-interior {
width: 48%;
}
}

@media (max-width: 1350px) {
.advanced .event-time-interior {
width: 100%;
}
}

.advanced .events--date,
.events .events--date {
width: 70px;
width: calc(100% - 70px);
border-right-width: 0;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
margin-right: 0;
}

.advanced .events--date {
width: 100%;
.advanced .events--date:focus,
.advanced .events--date:hover,
.events .events--date:focus,
.events .events--date:hover {
border-right-width: 1px;
border-right-style: solid;
}

.events .events--input__full {
width: 345px;
}

.events .h2.events--input {
width: 96%;
width: 100%;
font-size: 20px;
}

Expand All @@ -121,8 +141,22 @@
display: inline !important;
}

.advanced .events--time,
.events .events--time {
width: 60px;
width: 70px;
border-left: 0;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
margin-right: 0;
text-align: right;
}

.advanced .events--time:focus,
.advanced .events--time:hover,
.events .events--time:focus,
.events .events--time:hover {
border-left-width: 1px;
border-left-style: solid;
}

.events .events--time[disabled] {
Expand All @@ -134,12 +168,8 @@
resize: none;
}

.advanced .events--time {
width: 100%;
}

.events .events--checkbox {
padding: 3px 0;
padding: 3px 0 10px;
}

.modal-open .modal.popover .modal-content {
Expand Down
4 changes: 2 additions & 2 deletions templates/editor.popover.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ class="events--input h2 events--textarea"

<fieldset class="event-time events--fieldset" ng-disabled="readOnly">
<div class="event-time-interior pull-left">
<span><?php p($l->t('starts')); ?></span>
<span><?php p($l->t('Starts')); ?></span>
<ocdatetimepicker ng-model="properties.dtstart.value" disabletime="properties.allDay" datetabindex="103" timetabindex="104" readonly="readOnly"></ocdatetimepicker>
<span ng-show="edittimezone">{{ properties.dtstart.parameters.zone | timezoneFilter }}</span>
</div>
<div class="event-time-interior pull-right">
<span><?php p($l->t('ends')); ?></span>
<span><?php p($l->t('Ends')); ?></span>
<ocdatetimepicker ng-model="properties.dtend.value" disabletime="properties.allDay" datetabindex="105" timetabindex="106" readonly="readOnly"></ocdatetimepicker>
<span ng-show="edittimezone">{{ properties.dtend.parameters.zone | timezoneFilter }}</span>
</div>
Expand Down
8 changes: 4 additions & 4 deletions templates/editor.sidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ class="advanced--input h2 advanced--textarea"
</fieldset>

<fieldset class="advanced--fieldset start-end-container" ng-disabled="readOnly">
<div class="event-time-interior pull-left pull-half">
<span><?php p($l->t('starts')); ?></span>
<div class="event-time-interior pull-left">
<span><?php p($l->t('Starts')); ?></span>
<ocdatetimepicker ng-model="properties.dtstart.value" disabletime="properties.allDay" datetabindex="203" timetabindex="204" readonly="readOnly"></ocdatetimepicker>
<select ng-options="timezone.value as timezone.displayname | timezoneWithoutContinentFilter group by timezone.group for timezone in timezones" ng-model="properties.dtstart.parameters.zone" ng-show="edittimezone || readOnly" ng-disabled="properties.allDay"
ng-change="loadTimezone(properties.dtstart.parameters.zone)" class="timezone-select" tabindex="205"></select>
</div>
<div class="event-time-interior pull-right pull-half">
<span><?php p($l->t('ends')); ?></span>
<div class="event-time-interior pull-right">
<span><?php p($l->t('Ends')); ?></span>
<ocdatetimepicker ng-model="properties.dtend.value" disabletime="properties.allDay" datetabindex="206" timetabindex="207" readonly="readOnly"></ocdatetimepicker>
<select ng-options="timezone.value as timezone.displayname | timezoneWithoutContinentFilter group by timezone.group for timezone in timezones" ng-model="properties.dtend.parameters.zone" ng-show="edittimezone || readOnly" ng-disabled="properties.allDay"
ng-change="loadTimezone(properties.dtend.parameters.zone)" class="timezone-select" tabindex="208"></select>
Expand Down