Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenQuizz
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
10
Issues
10
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Weber Rodolphe
OpenQuizz
Commits
603e2113
Commit
603e2113
authored
Jul 07, 2021
by
Jérémie Passerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrections 'vague 2' ok
parent
a7b1c6cf
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
7 deletions
+54
-7
Maj.vue
src/Maj.vue
+1
-1
Menu.vue
src/Menu.vue
+30
-3
Consulter_Contenu.vue
src/components/Consulter_Contenu.vue
+10
-1
Volet_Base.vue
src/components/Volet_Base.vue
+13
-2
No files found.
src/Maj.vue
View file @
603e2113
...
...
@@ -186,7 +186,7 @@ export default {
// item._id -> id de la demande de publication
data
=
{
id_publication
:
JSON
.
stringify
(
item
.
_id
),
reponse
:
reponse
,
auteur
:
item
.
auteurDemande
}
this
.
contenusRecu
=
[]
//
this.contenusRecu = []
Service
.
gererDemandePublication
(
data
).
then
(
function
()
{
that
.
contenusRecu
=
that
.
contenusRecu
.
filter
(
contenu
=>
contenu
.
_id
!==
item
.
_id
)
if
(
that
.
isContenuMajVide
())
...
...
src/Menu.vue
View file @
603e2113
...
...
@@ -2,8 +2,8 @@
<div
id=
"menuHaut"
>
<Choix
_Mode_Variante
class=
"menuVariante"
v-show=
"variante"
></Choix
_Mode_Variante
>
<div
class=
"notif"
v-on:click=
"choixIconeNotification"
v-show=
"isNotif === true"
v-bind:style=
"[!variante ?
{'margin-left': '90%'} : {'margin-left': '3
1.78
%'}]">
</div>
<div
class=
"circle"
id=
"menuAuteur"
v-on:click=
"isAffiche = !isAffiche"
v-bind:style=
"[!isNotif ?
{'margin-left': '94.75%'} : {'margin-left': '3%'}]
">
<div
class=
"notif"
v-on:click=
"choixIconeNotification"
v-show=
"isNotif === true"
v-bind:style=
"[!variante ?
{'margin-left': '90%'} : {'margin-left': '3
2
%'}]">
</div>
<div
class=
"circle"
id=
"menuAuteur"
v-on:click=
"isAffiche = !isAffiche"
v-bind:style=
"styleCircle
"
>
{{
auteur
}}
</div>
<div
class=
"menu"
v-show=
"isAffiche"
>
...
...
@@ -18,6 +18,7 @@
</
template
>
<
script
>
//[!isNotif ? {'margin-left': '94.75%'} : {'margin-left': '3%'}
import
Choix_Mode_Variante
from
"./components/Choix_Mode_Variante"
;
import
Service
from
"./service/Service"
;
export
default
{
...
...
@@ -27,7 +28,8 @@ export default {
isAffiche
:
false
,
isNotif
:
false
,
isRecu
:
false
,
isPropose
:
false
isPropose
:
false
,
styleCircle
:
{}
}
},
props
:
{
...
...
@@ -84,6 +86,7 @@ export default {
}
}
that
.
majTiers
()
that
.
changerStyle
()
})
},
/**
...
...
@@ -103,6 +106,8 @@ export default {
that
.
isPropose
=
that
.
isNotif
}
}
that
.
changerStyle
()
})
},
/**
...
...
@@ -118,6 +123,19 @@ export default {
that
.
isRecu
=
that
.
isNotif
}
})
},
changerStyle
:
function
()
{
if
(
this
.
isNotif
){
this
.
styleCircle
[
"margin-left"
]
=
"3%"
}
else
if
(
this
.
variante
){
this
.
styleCircle
[
"margin-left"
]
=
"10%"
}
else
{
this
.
styleCircle
[
"margin-left"
]
=
"94.75%"
}
}
},
components
:
{
...
...
@@ -132,6 +150,12 @@ export default {
this
.
isNotif
=
false
this
.
publicationsRecues
()
this
.
publicationsProposees
()
//v-bind:style="[!variante ? {'margin-left': '90%'} : {'margin-left': '31.78%'}]">
<
/div
>
//
<
div
class
=
"circle"
id
=
"menuAuteur"
v
-
on
:
click
=
"isAffiche = !isAffiche"
v
-
bind
:
style
=
"[!isNotif ? {'margin-left': '94.75%'} : {'margin-left': '3%'}
},
/**
* @vuese
...
...
@@ -141,6 +165,9 @@ export default {
// alert(this.isNotif)
this.isNotif = false
this.publicationsRecues()
},
variante: function () {
this.changerStyle()
}
}
}
...
...
src/components/Consulter_Contenu.vue
View file @
603e2113
...
...
@@ -11,6 +11,10 @@
<button
v-show=
"contenuCliqueProvenance !== 'maj' && contenuCliqueProvenance === 'en-cours' && (contenuClique.origine === 'perso' || contenuClique.anonyme === 'oui')"
v-on:click=
"actionContenu('validerModification')"
>
valider la modification
</button>
<button
v-show=
"contenuCliqueProvenance !== 'maj' && contenuCliqueProvenance === 'banque'"
v-on:click=
"actionContenu('mettreFavori')"
>
mettre le contenu en tiers
</button>
<br>
<p>
{{
contenuCliqueProvenance
}}
</p>
<p>
{{
versionMax
}}
</p>
<select
v-show=
"(contenuCliqueProvenance === 'banque'
|| contenuCliqueProvenance === 'perso')
&& versionMax > 1"
v-model=
"versionChoisie"
v-on:change=
"changerVersion"
>
...
...
@@ -58,6 +62,11 @@ export default {
// @arg action l'action choisie
// @arg contenu le contenu cliqué
// @arg le texte associé au contenu (sert potentiellement à rien)
if
(
action
===
"mettreFavori"
){
this
.
$emit
(
"actionContenu"
,
{
action
:
action
,
contenu
:
this
.
contenuClique
,
texte
:
this
.
contenu
,
version
:
this
.
versionChoisie
})
}
else
this
.
$emit
(
"actionContenu"
,
{
action
:
action
,
contenu
:
this
.
contenuClique
,
texte
:
this
.
contenu
})
},
/**
...
...
@@ -126,7 +135,7 @@ export default {
)
}
else
{
if
(
this
.
contenuCliqueProvenance
===
'perso'
){
if
(
this
.
contenuCliqueProvenance
===
'perso'
||
this
.
contenuCliqueProvenance
===
'banque'
){
this
.
versionMax
=
this
.
contenuClique
.
versionEnCours
.
numero
this
.
versionChoisie
=
this
.
versionMax
}
...
...
src/components/Volet_Base.vue
View file @
603e2113
...
...
@@ -289,7 +289,6 @@ export default {
function
(
response
)
{
let
contenuSupprime
=
that
.
contenus
.
filter
(
contenu
=>
contenu
.
_id
===
id
)
that
.
contenus
=
that
.
contenus
.
filter
(
contenu
=>
contenu
.
_id
!==
id
)
//console.log("Response Data : " + response.data)
if
(
response
.
data
!==
'0'
)
that
.
contenusbanque
.
push
(
contenuSupprime
[
0
])
}
...
...
@@ -309,10 +308,12 @@ export default {
for
(
let
i
=
0
;
i
<
this
.
checkes
.
length
;
i
++
)
{
let
id
=
this
.
checkes
[
i
][
0
]
let
data
=
{
auteur
:
this
.
auteur
,
id_tiers
:
JSON
.
stringify
(
id
)
,
version
:
this
.
checkes
[
i
][
1
][
"numero"
]}
Service
.
creerContenuTiers
(
data
).
then
(
function
(
response
)
{
let
nouveauTiers
=
response
.
data
nouveauTiers
.
provenance
=
"tiers"
nouveauTiers
.
version
=
nouveauTiers
.
versionEnCours
[
"numero"
]
that
.
contenus
.
push
(
nouveauTiers
)
that
.
contenusbanque
=
that
.
contenusbanque
.
filter
(
contenu
=>
contenu
.
_id
!==
id
)
}
...
...
@@ -358,15 +359,25 @@ export default {
let
data
=
{}
let
that
=
this
let
auteur
=
""
let
version
=
0
;
switch
(
event
.
action
)
{
case
"mettreFavori"
:
if
(
event
.
version
===
undefined
){
version
=
event
.
contenu
.
versionEnCours
[
"numero"
]
}
else
{
version
=
parseInt
(
event
.
version
)
}
data
=
{
auteur
:
this
.
auteur
,
id_tiers
:
JSON
.
stringify
(
event
.
contenu
.
_id
)
,
version
:
event
.
contenu
.
versionEnCours
[
"numero"
]
}
data
=
{
auteur
:
this
.
auteur
,
id_tiers
:
JSON
.
stringify
(
event
.
contenu
.
_id
)
,
version
:
version
}
Service
.
creerContenuTiers
(
data
).
then
(
function
(
response
)
{
let
nouveauTiers
=
response
.
data
nouveauTiers
.
provenance
=
"tiers"
nouveauTiers
.
version
=
version
that
.
contenus
.
push
(
nouveauTiers
)
that
.
contenusbanque
=
that
.
contenusbanque
.
filter
(
contenu
=>
contenu
.
_id
!==
event
.
contenu
.
_id
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment