diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 66f42676..d448b962 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -1,5 +1,5 @@ import {BrowserModule} from '@angular/platform-browser'; -import {LOCALE_ID, NgModule} from '@angular/core'; +import {NgModule} from '@angular/core'; import {AppRoutingModule} from './app-routing.module'; import {AppComponent} from './app.component'; @@ -19,7 +19,6 @@ import {PicturesComponent} from './pages/pictures/pictures.component'; import {AnswersComponent} from './pages/answers/answers.component'; import {EndConfirmationComponent} from './pages/end-confirmation/end-confirmation.component'; import {CreateOrRetrieveComponent} from './pages/create-or-retrieve/create-or-retrieve.component'; -import {CalendarComponent} from './calendar/calendar.component'; import localeFr from '@angular/common/locales/fr'; import localeEn from '@angular/common/locales/en'; import {VotingSummaryComponent} from './pages/voting-summary/voting-summary.component'; @@ -29,7 +28,7 @@ import {PasswordComponent} from './pages/password/password.component'; import {HomeComponent} from './pages/home/home.component'; import {VoteChoiceComponent} from './vote-choice/vote-choice.component'; import {HttpClient, HttpClientModule} from '@angular/common/http'; -import { MarkdownModule } from 'ngx-markdown'; +import {MarkdownModule} from 'ngx-markdown'; import { MissingTranslationHandler, MissingTranslationHandlerParams, @@ -38,9 +37,10 @@ import { TranslateService } from '@ngx-translate/core'; import {TranslateHttpLoader} from '@ngx-translate/http-loader'; -import { PollGraphicComponent } from './poll-graphic/poll-graphic.component'; +import {PollGraphicComponent} from './poll-graphic/poll-graphic.component'; -import { AdminComponent } from './pages/admin/admin.component'; +import {AdminComponent} from './pages/admin/admin.component'; +import {SelectorComponent} from './ui/selector/selector.component'; export class MyMissingTranslationHandler implements MissingTranslationHandler { handle(params: MissingTranslationHandlerParams) { @@ -70,7 +70,6 @@ export function HttpLoaderFactory(http: HttpClient) { AnswersComponent, EndConfirmationComponent, CreateOrRetrieveComponent, - CalendarComponent, VotingSummaryComponent, VotingGraphComponent, VotingChoiceComponent, @@ -79,6 +78,7 @@ export function HttpLoaderFactory(http: HttpClient) { PollGraphicComponent, VoteChoiceComponent, AdminComponent, + SelectorComponent, ], imports: [ diff --git a/src/app/calendar/calendar.component.html b/src/app/calendar/calendar.component.html deleted file mode 100644 index 6d8082c2..00000000 --- a/src/app/calendar/calendar.component.html +++ /dev/null @@ -1 +0,0 @@ -
calendar works!
diff --git a/src/app/calendar/calendar.component.html.save b/src/app/calendar/calendar.component.html.save deleted file mode 100644 index 8b137891..00000000 --- a/src/app/calendar/calendar.component.html.save +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/app/calendar/calendar.component.ts b/src/app/calendar/calendar.component.ts deleted file mode 100644 index a16dd09f..00000000 --- a/src/app/calendar/calendar.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'framadate-calendar', - templateUrl: './calendar.component.html', - styleUrls: ['./calendar.component.scss'] -}) -export class CalendarComponent implements OnInit { - - constructor() { } - - ngOnInit() { - } - -} diff --git a/src/app/config/PollConfig.ts b/src/app/config/PollConfig.ts index 3b504118..3cd871e0 100644 --- a/src/app/config/PollConfig.ts +++ b/src/app/config/PollConfig.ts @@ -27,6 +27,18 @@ export const defaultDates = [ timeList: [{literal: 'matin'}, {literal: 'midi'}, {literal: 'soir'}] } ]; +export const defaultAnswers = [{ + id: 0, + text: 'réponse de démo 1' +}, + { + id: 1, + text: 'réponse 2' + }, + { + id: 2, + text: 'la réponse D' + }]; /** * configuration of the poll, add new fields at will @@ -43,23 +55,14 @@ export class PollConfig { allowSeveralHours = 'false'; // access visibility = 'link_only'; // visible to anyone with the link: + voteChoices = 'only_yes'; // possible answers to a vote choice: only "yes", "yes, maybe, no" password = ''; customUrl = ''; whoCanChangeAnswers = 'everybody';// everybody, self, nobody (= just admin) dateList: DateOption[] = defaultDates; // sets of days as strings, config to set identical time for days in a special days poll timeList: DateOption[] = timeOfDay; // ranges of time expressed as strings - answers: any = [{ - id: 0, - text: 'réponse de démo 1' - }, - { - id: 1, - text: 'réponse 2' - }, - { - id: 2, - text: 'la réponse D' - }]; + + answers: any = defaultAnswers; } diff --git a/src/app/pages/visibility/visibility.component.html b/src/app/pages/visibility/visibility.component.html index d2d794fd..e87e7972 100644 --- a/src/app/pages/visibility/visibility.component.html +++ b/src/app/pages/visibility/visibility.component.html @@ -1,30 +1,60 @@