forked from tykayn/funky-framadate-front
responsive calendar squares
This commit is contained in:
parent
18d8fd7b00
commit
23bb4cde3a
@ -30,7 +30,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<app-nav-steps
|
<app-nav-steps
|
||||||
[actionBeforeNextStep]="changeDateInputMode"
|
[actionBeforeNextStep]="convertDateInputs"
|
||||||
[next_step_number]="pollService.step_current + 1"
|
[next_step_number]="pollService.step_current + 1"
|
||||||
[previous_step_number]="pollService.step_current - 1"
|
[previous_step_number]="pollService.step_current - 1"
|
||||||
></app-nav-steps>
|
></app-nav-steps>
|
||||||
|
@ -22,12 +22,14 @@ export class StepThreeComponent implements OnInit {
|
|||||||
drop(event: CdkDragDrop<string[]>) {
|
drop(event: CdkDragDrop<string[]>) {
|
||||||
// moveItemInArray(this.pollService.choices, event.previousIndex, event.currentIndex);
|
// moveItemInArray(this.pollService.choices, event.previousIndex, event.currentIndex);
|
||||||
}
|
}
|
||||||
|
convertDateInputs() {
|
||||||
changeDateInputMode() {
|
|
||||||
this.pollService.mode_calendar
|
this.pollService.mode_calendar
|
||||||
? this.pollService.convertCalendarToText()
|
? this.pollService.convertCalendarToText()
|
||||||
: this.pollService.convertTextToCalendar();
|
: this.pollService.convertTextToCalendar();
|
||||||
|
}
|
||||||
|
|
||||||
|
changeDateInputMode() {
|
||||||
|
this.convertDateInputs();
|
||||||
this.pollService.mode_calendar = !this.pollService.mode_calendar;
|
this.pollService.mode_calendar = !this.pollService.mode_calendar;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
class="button button-previous is-secondary pull-left"
|
class="button button-previous is-secondary pull-left"
|
||||||
[routerLink]="['/administration/step/' + previous_step_number]"
|
[routerLink]="['/administration/step/' + previous_step_number]"
|
||||||
>
|
>
|
||||||
Précédent
|
{{ 'nav.previous' | translate }}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
@ -16,10 +16,10 @@
|
|||||||
(click)="runNextAction()"
|
(click)="runNextAction()"
|
||||||
>
|
>
|
||||||
<span *ngIf="is_finish_step">
|
<span *ngIf="is_finish_step">
|
||||||
Enregistrer
|
{{ 'nav.save' | translate }}
|
||||||
</span>
|
</span>
|
||||||
<span *ngIf="!is_finish_step">
|
<span *ngIf="!is_finish_step">
|
||||||
Suivant
|
{{ 'nav.next' | translate }}
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -79,9 +79,9 @@
|
|||||||
<h3 class="step-counter-text">Étape {{ step_current }} sur {{ step_max }}</h3>
|
<h3 class="step-counter-text">Étape {{ step_current }} sur {{ step_max }}</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="column has-text-right">
|
<div class="column has-text-right">
|
||||||
<app-language-selector class="nav-button is-hidden-mobile"></app-language-selector>
|
<app-language-selector class="nav-button"></app-language-selector>
|
||||||
<a class="nav-button cancel-button" (click)="showCancelDialog()">
|
<a class="nav-button cancel-button" (click)="showCancelDialog()">
|
||||||
Annuler <i class="fa fa-times"></i>
|
{{ 'nav.leave' | translate }} <i class="fa fa-times"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -91,7 +91,7 @@
|
|||||||
|
|
||||||
<!-- modale pour quitter la création-->
|
<!-- modale pour quitter la création-->
|
||||||
<p-dialog
|
<p-dialog
|
||||||
header="Quitter?"
|
header="{{ 'nav.leave' | translate }}?"
|
||||||
[modal]="true"
|
[modal]="true"
|
||||||
[(visible)]="display_cancel_dialog"
|
[(visible)]="display_cancel_dialog"
|
||||||
[breakpoints]="{ '960px': '75vw' }"
|
[breakpoints]="{ '960px': '75vw' }"
|
||||||
|
@ -54,8 +54,8 @@
|
|||||||
|
|
||||||
.nav-button {
|
.nav-button {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
line-height: 5rem;
|
line-height: 4.5rem;
|
||||||
height: 5rem;
|
height: 4.5rem;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding-left: 1em;
|
padding-left: 1em;
|
||||||
&app-language-selector {
|
&app-language-selector {
|
||||||
@ -63,8 +63,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.cancel-button {
|
.cancel-button {
|
||||||
line-height: 4rem;
|
line-height: 4.5rem;
|
||||||
height: 4rem;
|
height: 4.5rem;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: $font_color;
|
color: $font_color;
|
||||||
|
@ -1,13 +1,20 @@
|
|||||||
<div class="selector">
|
<div class="selector language-selector-container">
|
||||||
<span class="lang-button" (click)="nextLang()">
|
<span class="lang-button" (click)="nextLang()">
|
||||||
{{ 'LANGUAGES.' + currentLang | translate }}
|
{{ 'LANGUAGES.' + currentLang | translate }}
|
||||||
<i class="fa fa-language lang-selector-icon clickable" title="sélection de langue"></i>
|
<!-- <i class="fa fa-language lang-selector-icon clickable" title="sélection de langue"></i>-->
|
||||||
|
<i class="fa fa-chevron-down"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<div class="buttons has-addons">
|
<div class="buttons has-addons">
|
||||||
<label for="lang_selector" class="hidden"
|
<label for="lang_selector" class="hidden">
|
||||||
>{{ 'selector.lang' | translate }} {{ 'LANGUAGES.' + language | translate }}</label
|
{{ 'selector.lang' | translate }}
|
||||||
>
|
<span class="lang-title-long is-hidden-mobile">
|
||||||
|
{{ 'LANGUAGES.' + language | translate }}
|
||||||
|
</span>
|
||||||
|
<span class="lang-title-short is-visible-mobile">
|
||||||
|
{{ 'LANGUAGES_SHORT.' + language | translate }}
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
<select class="is-hidden" id="lang_selector" (change)="setLang()" [(ngModel)]="currentLang">
|
<select class="is-hidden" id="lang_selector" (change)="setLang()" [(ngModel)]="currentLang">
|
||||||
<option *ngFor="let language of availableLanguages" value="{{ language }}">
|
<option *ngFor="let language of availableLanguages" value="{{ language }}">
|
||||||
<!-- {{ language }} - -->
|
<!-- {{ language }} - -->
|
||||||
|
@ -1,5 +1,18 @@
|
|||||||
|
@import './../../../../../styles/variables';
|
||||||
|
|
||||||
#lang_selector {
|
#lang_selector {
|
||||||
background: white;
|
background: white;
|
||||||
max-width: 15em;
|
max-width: 15em;
|
||||||
width: 15em !important;
|
width: 15em !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.language-selector-container {
|
||||||
|
cursor: pointer;
|
||||||
|
color: $primary-color;
|
||||||
|
&:hover {
|
||||||
|
color: $secondary_color;
|
||||||
|
}
|
||||||
|
i {
|
||||||
|
color: $primary-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -9,6 +9,12 @@
|
|||||||
"create_button": "Create a new poll",
|
"create_button": "Create a new poll",
|
||||||
"search_button": "Search"
|
"search_button": "Search"
|
||||||
},
|
},
|
||||||
|
"nav": {
|
||||||
|
"leave": "Leave",
|
||||||
|
"previous": "Previous",
|
||||||
|
"next": "Next",
|
||||||
|
"save": "Save"
|
||||||
|
},
|
||||||
"PAGE_NOT_FOUND": {
|
"PAGE_NOT_FOUND": {
|
||||||
"DEFAULT": "This page doesn’t exist.",
|
"DEFAULT": "This page doesn’t exist.",
|
||||||
"POLL": "This poll doesn’t exist."
|
"POLL": "This poll doesn’t exist."
|
||||||
|
@ -11,6 +11,12 @@
|
|||||||
"create_button": "Créer un nouveau sondage ",
|
"create_button": "Créer un nouveau sondage ",
|
||||||
"search_button": "Rechercher"
|
"search_button": "Rechercher"
|
||||||
},
|
},
|
||||||
|
"nav": {
|
||||||
|
"leave": "Quitter",
|
||||||
|
"previous": "Précédent",
|
||||||
|
"next": "Suivant",
|
||||||
|
"save": "Enregistrer"
|
||||||
|
},
|
||||||
"PAGE_NOT_FOUND": {
|
"PAGE_NOT_FOUND": {
|
||||||
"DEFAULT": "Cette page n’existe pas.",
|
"DEFAULT": "Cette page n’existe pas.",
|
||||||
"POLL": "Ce sondage n’existe pas."
|
"POLL": "Ce sondage n’existe pas."
|
||||||
@ -600,12 +606,27 @@
|
|||||||
"ES": "Espagnol",
|
"ES": "Espagnol",
|
||||||
"EN": "English",
|
"EN": "English",
|
||||||
"GL": "gl",
|
"GL": "gl",
|
||||||
"HU": "hu",
|
"HU": "Hungarian",
|
||||||
"IT": "Italien",
|
"IT": "Italien",
|
||||||
"NL": "Néérlandais",
|
"NL": "Néérlandais",
|
||||||
"OC": "oc",
|
"OC": "oc",
|
||||||
"SV": "sv"
|
"SV": "sv"
|
||||||
},
|
},
|
||||||
|
"LANGUAGES_SHORT": {
|
||||||
|
"DE": "De",
|
||||||
|
"FR": "Fr",
|
||||||
|
"BR": "Br",
|
||||||
|
"CA": "Ca",
|
||||||
|
"EL": "el",
|
||||||
|
"ES": "Es",
|
||||||
|
"EN": "En",
|
||||||
|
"GL": "gl",
|
||||||
|
"HU": "hu",
|
||||||
|
"IT": "It",
|
||||||
|
"NL": "Nl",
|
||||||
|
"OC": "oc",
|
||||||
|
"SV": "sv"
|
||||||
|
},
|
||||||
"calendar_widget": {
|
"calendar_widget": {
|
||||||
"startsWith": "Commence par",
|
"startsWith": "Commence par",
|
||||||
"contains": "Contains",
|
"contains": "Contains",
|
||||||
|
@ -68,7 +68,7 @@ p-calendar,
|
|||||||
.p-datepicker-calendar {
|
.p-datepicker-calendar {
|
||||||
td {
|
td {
|
||||||
width: $cell-size;
|
width: $cell-size;
|
||||||
padding: 0.15rem;
|
padding: 0.15rem 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
td span,
|
td span,
|
||||||
|
@ -1,8 +1,21 @@
|
|||||||
// small screens
|
// small screens
|
||||||
@media (min-width: 600px) {
|
@media (min-width: 380px) {
|
||||||
.feedback-container {
|
.feedback-container {
|
||||||
//position: fixed;
|
//position: fixed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.p-datepicker {
|
||||||
|
.p-datepicker-calendar {
|
||||||
|
td {
|
||||||
|
width: $cell-size-desktop;
|
||||||
|
}
|
||||||
|
td span,
|
||||||
|
.p-ripple {
|
||||||
|
width: $cell-size-desktop;
|
||||||
|
height: $cell-size-desktop;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// wide screen like desktop
|
// wide screen like desktop
|
||||||
@media (min-width: $widescreen) {
|
@media (min-width: $widescreen) {
|
||||||
|
@ -76,7 +76,8 @@ $header-nav-inner-height: 4rem;
|
|||||||
$widescreen-width-main-column: 75rem;
|
$widescreen-width-main-column: 75rem;
|
||||||
|
|
||||||
// datepicker
|
// datepicker
|
||||||
$cell-size: 40px;
|
$cell-size: 30px;
|
||||||
|
$cell-size-desktop: 40px;
|
||||||
|
|
||||||
// css vars
|
// css vars
|
||||||
:root {
|
:root {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user