Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
labelabeille
app
Commits
7f14472a
Commit
7f14472a
authored
Jun 19, 2016
by
lucas64500
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deconnexion/Suppression compte
parent
a354e237
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
57 additions
and
11 deletions
+57
-11
css/form.css
css/form.css
+1
-0
css/index.css
css/index.css
+15
-0
js/accueil2.js
js/accueil2.js
+6
-6
js/boutons.js
js/boutons.js
+3
-0
js/connexion.js
js/connexion.js
+7
-1
js/liste_ruchers.js
js/liste_ruchers.js
+3
-2
js/liste_ruches.js
js/liste_ruches.js
+1
-1
js/parametres.js
js/parametres.js
+16
-0
templates.html
templates.html
+5
-1
No files found.
css/form.css
View file @
7f14472a
...
...
@@ -9,6 +9,7 @@
margin-bottom
:
10px
;
width
:
50%
;
}
.formulaire
{
...
...
css/index.css
View file @
7f14472a
...
...
@@ -260,4 +260,19 @@ body {
.transition
{
-webkit-transition-duration
:
.25s
;
transition-duration
:
.25s
;
}
.bouton2
{
background-color
:
#ffd154
;
border
:
1px
solid
#c18d00
;
color
:
#302300
;
font-family
:
'open_sanslight'
;
font-size
:
10pt
;
width
:
50%
;
line-height
:
26px
;
height
:
26px
;
margin
:
auto
;
margin-top
:
10px
;
margin-bottom
:
20px
;
}
\ No newline at end of file
js/accueil2.js
View file @
7f14472a
...
...
@@ -120,7 +120,7 @@ var seuils = [
},*/
{
'
nom
'
:
"
PARAM.SEUIL_BAISSE_POIDS
"
,
'
description
'
:
"
Baisse de poids max
imale
"
,
'
description
'
:
"
Baisse de poids max
"
,
'
type
'
:
"
max
"
,
'
champ
'
:
"
PARAM.POIDS_RECOLTE
"
},
...
...
@@ -130,25 +130,25 @@ var seuils = [
},*/
{
'
nom
'
:
"
PARAM.SEUIL_HUMIDITE_MAX
"
,
'
description
'
:
"
Humidité max
imale
"
,
'
description
'
:
"
Humidité max
"
,
'
type
'
:
"
max
"
,
'
champ
'
:
"
HUM
"
},
{
'
nom
'
:
"
PARAM.SEUIL_HUMIDITE_MIN
"
,
'
description
'
:
"
Humidité min
imale
"
,
'
description
'
:
"
Humidité min
"
,
'
type
'
:
"
min
"
,
'
champ
'
:
"
HUM
"
},
{
'
nom
'
:
"
PARAM.SEUIL_TEMP_MAX
"
,
'
description
'
:
"
Température max
imale
"
,
'
description
'
:
"
Température max
"
,
'
type
'
:
"
max
"
,
'
champ
'
:
"
TMP
"
},
{
'
nom
'
:
"
PARAM.SEUIL_TEMP_MIN
"
,
'
description
'
:
"
Température min
imale
"
,
'
description
'
:
"
Température min
"
,
'
type
'
:
"
min
"
,
'
champ
'
:
"
TMP
"
}
...
...
@@ -198,7 +198,7 @@ function accueil(){
nbRuchers
=
donneesRuches
.
hivegroups
.
length
;
console
.
log
(
"
Nb de ruchers :
"
+
nbRuchers
);
setInterval
(
function
(){
actuNotifs
();},
1
0000
);
setInterval
(
function
(){
actuNotifs
();},
30
0000
);
if
(
nbRuchers
>
0
){
$
(
"
#rucher
"
+
rucher
).
appendTo
(
"
#conteneur-rucher
"
);
...
...
js/boutons.js
View file @
7f14472a
...
...
@@ -46,7 +46,10 @@ function activerBoutons(){
$
(
"
#goToSeuils
"
).
on
(
"
submit
"
,
function
(
e
)
{
e
.
preventDefault
();
goToHiveSeuils
();});
break
;
default
:
break
;
}
}
\ No newline at end of file
js/connexion.js
View file @
7f14472a
...
...
@@ -76,7 +76,6 @@ function connexion(user, passwd, success, failure) {
* get and deal with connection data
*/
function
connect
()
{
connexion
(
"
guillaume.vizier@polytechnique.edu
"
,
"
labelabeille
"
,
connexion_success
,
connexion_failure
);
$
(
"
#test
"
).
click
(
tester
);
$
(
"
#valider_connexion
"
).
click
(
function
(){
if
(
!
enCharge
){
...
...
@@ -105,6 +104,7 @@ function connexion_success() {
afficherBd
(
"
Vous êtes connecté. Vous allez être redirigé vers la liste de vos ruches dans quelques instants. Si ce n'est pas le cas, cliquez sur le bouton ci-dessous.
"
,
"
Aller
"
);
//NEW
charge
();
getCustomNotes
(
function
(
data
)
{
customNotesCreatedByUser
=
data
;
getDefaultNotes
(
function
(
data
)
{
...
...
@@ -138,6 +138,7 @@ function finCharge(){
}
function
logout
()
{
charge
();
$
.
ajax
({
type
:
'
GET
'
,
url
:
url
+
'
logout
'
,
...
...
@@ -147,16 +148,19 @@ function logout() {
},
success
:
function
(
data
)
{
//what to do on success
finCharge
();
connect
();
},
error
:
function
(
xhr
,
ajaxOptions
,
thrownError
)
{
//what to do on failure
finCharge
();
afficherBd
(
"
Un problème est survenu
"
,
"
OK
"
);
}
});
}
function
deleteAccount
()
{
charge
();
$
.
ajax
({
type
:
'
DELETE
'
,
url
:
url
+
'
pscustomer/
'
+
customer
.
id
,
...
...
@@ -165,10 +169,12 @@ function deleteAccount() {
withCredentials
:
true
},
success
:
function
(
data
)
{
finCharge
();
connect
();
//what to do on success
},
error
:
function
(
xhr
,
ajaxOptions
,
thrownError
)
{
finCharge
();
//what to do on failure
afficherBd
(
"
Un problème est survenu
"
,
"
OK
"
);
...
...
js/liste_ruchers.js
View file @
7f14472a
...
...
@@ -32,6 +32,7 @@ function getHivesForHiveGroups(retour,act) {
act
=
(
typeof
act
==
'
undefined
'
)?
function
(){}
:
act
;
if
(
idHiveGroupMaj
>=
donneesRuches
.
hivegroups
.
length
)
{
idHiveGroupMaj
=
0
;
finCharge
();
if
(
retour
>=
0
)
goToListHives
(
retour
);
else
act
();
}
...
...
@@ -63,7 +64,7 @@ function goToListHiveGroups() {
*/
var
listHiveGroups
=
null
;
var
h
=
Mustache
.
render
(
template
,
listHiveGroups
);
console
.
log
(
listHiveGroups
);
//
console.log(listHiveGroups);
//console.log(h);
document
.
getElementById
(
"
content-list-hiveGroups
"
).
innerHTML
=
h
;
/*
...
...
@@ -72,7 +73,7 @@ function goToListHiveGroups() {
transition
(
_
(
"
plist-hiveGroups
"
));
/* TODO : remplacer bouton_creer_rucher par le bon identifiant
$('#bouton_creer_rucher').click(function() {
console.log("ajouter rucher");
//
console.log("ajouter rucher");
createHiveGroup(addHives);
});*/
};
js/liste_ruches.js
View file @
7f14472a
...
...
@@ -62,7 +62,7 @@ function goToListHives(retour) {
}
}
console
.
log
(
donneesRuches
);
//
console.log(donneesRuches);
var
h
=
Mustache
.
render
(
template
,
donneesRuches
);
document
.
getElementById
(
"
content-accueil
"
).
innerHTML
=
h
;
transition
(
_
(
"
paccueil
"
),
(
retour
==
1
)?
"
retour
"
:
""
);
...
...
js/parametres.js
View file @
7f14472a
...
...
@@ -64,6 +64,22 @@ function goToGeneralParameters() {
});
//console.log("fin modif");
});
//DECONNEXION
$
(
"
#deconnexion
"
).
on
(
"
click
"
,
function
(
e
)
{
e
.
preventDefault
();
logout
();
});
//DESINSCRIPTION
$
(
"
#desinscription
"
).
on
(
"
click
"
,
function
(
e
)
{
e
.
preventDefault
();
if
(
confirm
(
"
Êtes-vous certain de vouloir supprimer votre compte ?
"
)){
deleteAccount
();}
});
}
//organiserRuches(listHives.idHives.length);
//masquerBd();
...
...
templates.html
View file @
7f14472a
...
...
@@ -1058,6 +1058,10 @@
<
/div>--
>
<
/div
>
<
div
class
=
"
bouton
"
><
span
>
MODIFIER
<
/span></
div
>
<
br
/>
<
div
id
=
"
deconnexion
"
class
=
"
bouton2
"
style
=
"
text-align:center;clear:none;
"
>
Me
déconnecter
<
/div
>
<
div
id
=
"
desinscription
"
class
=
"
bouton2
"
style
=
"
text-align:center;clear:none;background-color:black;color:white;
"
>
Me
desinscrire
<
/div
>
<
/form
>
</script>
<script
type=
"text/html"
id=
"tpl-params-rucher"
>
...
...
@@ -1401,7 +1405,7 @@
</script>
<script
type=
"text/html"
id=
"tpl-params-ruche"
>
<
form
class
=
"
formulaire
"
id
=
"
goToSeuils
"
type
=
"
custom
"
>
<
input
type
=
"
submit
"
class
=
"
histo_important
"
value
=
"
Gérer les seuils de n
otification
"
/>
<
input
type
=
"
submit
"
class
=
"
histo_important
"
value
=
"
N
otification
s
"
/>
<
/form
>
<
form
class
=
"
formulaire
"
id
=
"
form-params-hive
"
>
...
...
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