Merge branch 'issue35' into 'dev'

Issue35

See merge request framasoft/framadate/funky-framadate-front!20
This commit is contained in:
Le Libre Au Quotidien 2019-12-29 18:37:40 +01:00
commit 32431c0a83
10 changed files with 345 additions and 16 deletions

54
package-lock.json generated
View File

@ -5683,7 +5683,8 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"aproba": {
"version": "1.2.0",
@ -5726,7 +5727,8 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"concat-map": {
"version": "0.0.1",
@ -5737,7 +5739,8 @@
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"core-util-is": {
"version": "1.0.2",
@ -5854,7 +5857,8 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"ini": {
"version": "1.3.5",
@ -5866,6 +5870,7 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@ -5895,6 +5900,7 @@
"version": "2.3.5",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@ -5913,6 +5919,7 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
@ -6006,6 +6013,7 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
@ -6091,7 +6099,8 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
@ -6127,6 +6136,7 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@ -6146,6 +6156,7 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@ -6189,12 +6200,14 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"yallist": {
"version": "3.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
}
}
},
@ -11281,7 +11294,8 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"aproba": {
"version": "1.2.0",
@ -11324,7 +11338,8 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"concat-map": {
"version": "0.0.1",
@ -11335,7 +11350,8 @@
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"core-util-is": {
"version": "1.0.2",
@ -11452,7 +11468,8 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"ini": {
"version": "1.3.5",
@ -11464,6 +11481,7 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@ -11493,6 +11511,7 @@
"version": "2.3.5",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@ -11511,6 +11530,7 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
@ -11604,6 +11624,7 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
@ -11689,7 +11710,8 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
@ -11725,6 +11747,7 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@ -11744,6 +11767,7 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@ -11787,12 +11811,14 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"yallist": {
"version": "3.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
}
}
},

View File

@ -41,6 +41,7 @@ import {PollGraphicComponent} from './poll-graphic/poll-graphic.component';
import {AdminComponent} from './pages/admin/admin.component';
import {SelectorComponent} from './ui/selector/selector.component';
import { VotingComponent } from './pages/voting/voting.component';
export class MyMissingTranslationHandler implements MissingTranslationHandler {
handle(params: MissingTranslationHandlerParams) {
@ -79,6 +80,7 @@ export function HttpLoaderFactory(http: HttpClient) {
VoteChoiceComponent,
AdminComponent,
SelectorComponent,
VotingComponent,
],
imports: [

View File

@ -11,7 +11,7 @@ import {BaseComponent} from '../pages/base-page/base.component';
import {HomeComponent} from "../pages/home/home.component";
import {PollGraphicComponent} from '../poll-graphic/poll-graphic.component';
import {VoteChoiceComponent} from "../vote-choice/vote-choice.component";
import {VotingComponent} from "../pages/voting/voting.component";
/**
* each step in the form is a component
*/
@ -32,5 +32,6 @@ export const Routes =
{path: 'step/end', component: EndConfirmationComponent},
{path: 'graphic/:poll', component: PollGraphicComponent},
{path: 'votechoice', component: VoteChoiceComponent},
{path: 'voting', component: VotingComponent},
]
;

View File

@ -0,0 +1,65 @@
<form>
<h1 >Nom du sondage</h1>
<p>crée par piou</p>
<p>Pokem ipsum dolor sit amet Electric Cottonee Scratch Leech Life Ice Berry Ducklett. Leaf Green Durant Zoroark Skitty Rock Luxio Surskit. Glacier Badge Fuchsia City Team Rocket Ferroseed Cranidos Exeggcute Entei. Dig Thunder Badge Exeggcute Mightyena Milotic Mantyke Drapion. Hydro Pump Silver Treecko Missingno Growlithe Wingull Registeel. </p>
<section class="row name">
<label for="name">Votre nom :</label>
<input type="text" name="name">
</section>
<framadate-vote-choice></framadate-vote-choice>
<framadate-vote-choice></framadate-vote-choice>
<framadate-vote-choice></framadate-vote-choice>
<framadate-vote-choice></framadate-vote-choice>
<framadate-vote-choice class=" margin-btm-x2"></framadate-vote-choice>
<button class="btn btn--primary btn--full" ng-model="show_popup">Valider mes réponses</button>
<p class="prefered">Pour l'instant, le choix ayant reçu le plus grand nombre de votes est :
<li>- Vendredi 6 juillet
</li><li>
- Samedi 7 août
</li>
</p>
<a class="next">Voir le graphique</a>
<input type="submit" name="modify" class="btn btn--primary btn--outline btn--full"value="Je veux modifier le vote de quelqu'un">
<h2 class="margin-top-x4">Les commentaires</h2>
<p class="comment">
<span class="cname">Pikachu </span>
<span class="date date padding-btm-x1"> le 26 novembre 2019</span>
Rock Luxio Surskit. Glacier Badge
</p>
<p class="comment">
<span class="cname">Bulbizarre </span>
<span class="date padding-btm-x1">le 23 décembre 2019</span>
Pokem ipsum dolor sit amet Electric Cottonee Scratch Leech Life Ice Berry Ducklett. Leaf Green Durant Zoroark Skitty Rock Luxio Surskit. Glacier Badge
</p>
<h2 class="margin-top-x7">Laisser un commentaire</h2>
<label for="crname">Votre nom :</label>
<input type="text" class="margin-btm-x3" name="crname">
<label for="comment">Votre commentaire :</label>
<textarea name="comment">
</textarea>
<input type="submit" name="add-comment" class="btn btn--primary btn--outline"value="Ajouter mon commentaire">
<h3 class="margin-top-x8">Partager le sondage</h3>
<label class="nobold text-14" for="copy-link">Pour partager le sondage, vous pouvez diffuser ce lien : https://framadate.org/urladmindusondage</label>
<input type="submit" name="copy-link" class=" btn btn--primary btn--outline"value="Copier le lien">
<h3 class="margin-top-x6 margin-btm-x3">Exporter/Imprimer</h3>
<input type="submit" name="export" class="margin-btm-x3 btn btn--primary btn--outline"value="Exporter en .csv">
<input type="submit" name="copy-link" class="btn btn--primary btn--outline"value="Imprimer le sondage">
</form>
<div ng-show="show_popup" class="popup">
<h4 class="margin-btm-x2">Participation validée !</h4>
<p class="margin-btm-x1">Votre vote a bien été pris en compte, mais faites attention : ce sondage n'autorise l'édition de votre vote qu'avec le lien personnalisé suivant :</p>
<p>https://framadate.org/urladmindusondage</p>
<button class="btn btn--primary btn--small btn--purple btn--black-text">Copier le lien</button>
<p class="margin-btm-x6 margin-top-x2">Conservez-le précieusement !</p>
<button class="btn btn--primary btn--default btn--purple btn--black-text">Revenir au sondage</button>
</div>
<div class="rgba-black" [hidden]="show_mask">
</div>

View File

@ -0,0 +1,71 @@
@import "../../../assets/scss/variables";
form{
display:flex;
margin:auto;
flex-direction: column;
align-items: center;
justify-content: flex-start;
}
.popup{
display:flex;
flex-direction: column;
z-index:2222222222;
}
.row{
flex-direction: row;
}
label{
font-weight: 600;
font-size: 18px;
}
.comment,.prefered{
border-left:6px solid $ugly-purple ;
padding-left: 5px;
margin-top:25px;
margin-bottom: 25px;
flex-wrap: wrap;
}
.comment{
display:flex;
}
.commeny span{
flex-direction: row;
}
.cname{
padding-left:17px;
font-weight: bold;
}
.btn{
max-width: 300px;
}
.next{
max-width:200px;
}
input[type=text],textarea{
max-width:350px;
}
li{
list-style-type: none;
}
h2{
}
.next{
align-self: flex-end;
margin-bottom:50px;
}
textarea{
height:213px;
margin-bottom:20px;
}
.name{
margin-bottom:50px;
margin-top:50px;
}
label{
align-items: flex-start;
}
.nobold{
font-weight: normal;
}

View File

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { VotingComponent } from './voting.component';
describe('VotingComponent', () => {
let component: VotingComponent;
let fixture: ComponentFixture<VotingComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ VotingComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(VotingComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,16 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'framadate-voting',
templateUrl: './voting.component.html',
styleUrls: ['./voting.component.scss']
})
export class VotingComponent implements OnInit {
show_mask=true;
constructor() {
}
ngOnInit() {
}
}

View File

@ -31,6 +31,12 @@
&--primary {
@include btnTheme($primary_color);
}
&--black-text {
color:black;
}
&--purple {
background-color:$pale-purple;
}
&--alert {
@include btnTheme($red);

View File

@ -60,4 +60,7 @@ h4,
h5,
h6 {
font-family: $title_font, "Brie Light", "Arial", "DejaVu Sans Mono";
}
}
.nobold{
font-weight: normal;
}

View File

@ -8,3 +8,117 @@
.pull-right {
float: right;
}
/*Btm paddings*/
.padding-btm-x1{
padding-bottom:10px;
}
.padding-btm-x2{
padding-bottom:20px;
}
.padding-btm-x3{
padding-bottom:30px;
}
.padding-btm-x4{
padding-bottom:40px;
}
.padding-btm-x5{
padding-bottom:50px;
}
.padding-btm-x6{
padding-bottom:60px;
}
.padding-btm-x7{
padding-bottom:70px;
}
.padding-btm-x8{
padding-bottom:80px;
}
/*Btm margins*/
.margin-btm-x1{
margin-bottom:10px;
}
.margin-btm-x2{
margin-bottom:20px;
}
.margin-btm-x3{
margin-bottom:30px;
}
.margin-btm-x4{
margin-bottom:40px;
}
.margin-btm-x5{
margin-bottom:50px;
}
.margin-btm-x6{
margin-bottom:60px;
}
.margin-btm-x7{
margin-bottom:70px;
}
.margin-btm-x8{
margin-bottom:80px;
}
/*Top paddings*/
.padding-top-x1{
padding-top:10px;
}
.padding-top-x2{
padding-top:20px;
}
.padding-top-x3{
padding-top:30px;
}
.padding-top-x4{
padding-top:40px;
}
.padding-top-x5{
padding-top:50px;
}
.padding-top-x6{
padding-top:60px;
}
.padding-top-x7{
padding-top:70px;
}
.padding-top-x8{
padding-top:80px;
}
/*Top margins*/
.margin-top-x1{
margin-top:10px;
}
.margin-top-x2{
margin-top:20px;
}
.margin-top-x3{
margin-top:30px;
}
.margin-top-x4{
margin-top:40px;
}
.margin-top-x5{
margin-top:50px;
}
.margin-top-x6{
margin-top:60px;
}
.margin-top-x7{
margin-top:70px;
}
.margin-top-x8{
margin-top:80px;
}
.text-14{
font-size: 14px;
}
/*Pour masquer la page lors de l'apparition d'une popup*/
.rgba-black{
position: fixed;
inset: 0px;
width: 100vw;
height: 100vh;
border: medium none;
z-index: 2147483647;
background-color: rgba(216, 216, 216, 0.4);
}