Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 3947 → Rev 3948

/trunk/widget/modules/photo/squelettes/popup.tpl.html
36,7 → 36,7
<option id="gentiane_azure" value="gentiane_azure">Enquête Gentiane-azuré</option>
<option id="arbres_tetards" value="arbres_tetards">Arbres têtards</option>
</select>
<p id="message-protocole" class="message">
<p id="message-protocole" class="message mt-3">
Choisissez un protocole pour pouvoir noter la photo
<!-- le message change en fonction du protocole -->
</p>
44,18 → 44,26
<ul id="notes-protocole-fct">
<li id="plus-infos-protocole" class="row">
<div class="col-10 label">Plus d'infos sur le wiki</div>
<a class="bouton btn btn-sm btn-outline-secondary" target="_blank"><i class="fas fa-question-circle"></i></a>
<a class="bouton btn btn-sm btn-outline-secondary" href="https://www.tela-botanica.org/wikini/AideCarnetEnLigne/wakka.php?wiki=AideWidgetPhoto" target="_blank"><i
class="fas fa-question-circle"></i></a>
</li>
<li id="note">
<li id="note" class="row">
<div class="col-5 label">Notez</div>
<div class="col-5 contenu"><!-- étoiles --></div>
<a class="bouton btn btn-sm btn-outline-secondary"><i class="fas fa-backspace"></i></a>
<div class="col-5 contenu"><!-- étoiles -->
<i id="rating-star-1" class="far fa-star notation-star"></i>
<i id="rating-star-2" class="far fa-star notation-star"></i>
<i id="rating-star-3" class="far fa-star notation-star"></i>
<i id="rating-star-4" class="far fa-star notation-star"></i>
<i id="rating-star-5" class="far fa-star notation-star"></i>
</div>
<a id="note-remove"
class="bouton btn btn-sm btn-outline-secondary"><i class="fas fa-backspace"></i></a>
</li>
<li id="note-moyenne">
<li id="note-moyenne" class="row d-flex justify-content-between">
<div class="col-5 label">Note Moyenne</div>
<div class="col-5 contenu" style="text-align:right;"></div>
</li>
<li id="note">
<li id="note-count" class="row d-flex justify-content-between">
<div class="col-5 label">Nombre de votes</div>
<div class="col-5 contenu" style="text-align:right;"></div>
</li>
/trunk/widget/modules/photo/squelettes/css/popup.css
354,6 → 354,10
margin-top: 1rem;
}
 
.notation-star{
font-size: 20px;
}
 
/************************************************************************************************************/
 
#localisation-map-container {
378,6 → 382,11
}
 
/*----------------------------------------------------------------------------------------------------------*/
@media screen and (max-width: 1320px){
.notation-star{
font-size: 12px;
}
}
@media screen and ( max-width: 991px ) {
#bloc-infos-img {
top: 0;
/trunk/widget/modules/photo/squelettes/js/WidgetPhotoPopup.js
36,6 → 36,7
this.initEvtsFonctionsPhoto();
this.initEvtsRetourGalerieResponsive();
this.initEvtsTagsPF();
this.initEvtsProtocole();
};
 
WidgetPhotoPopup.prototype.mettreAJourPopup = function() {
44,6 → 45,8
this.traiterMetas();
this.regenererMiniature();
this.fournirLienIdentiplante();
this.traiterVote();
this.pivoterImage();
};
 
WidgetPhotoPopup.prototype.mettreAJourInfosImage = function() {
645,7 → 648,7
console.log( data );
}
).fail( function() {
console.log( 'La régénérétion d´image ne s´est pas faite' );
console.log( 'La régénération d´image ne s´est pas faite' );
});
});
};
674,6 → 677,114
});
};
 
WidgetPhotoPopup.prototype.initEvtsProtocole = function() {
const lthis = this;
 
$( '#protocole').on( 'change', function( event ){
event.preventDefault();
var id = $(this).children(":selected").attr("id");
 
$('#bloc-notes-protocole').removeClass('hidden');
 
const message = {
'capitalisation_image': "\"Capitalisation d'image\" est un programme de sciences participatives initié" +
" dans le cadre du projet Pl@nttNet. En attribuant une note aux photos vous nous aidez à connaître" +
" leur qualité.",
'aide_identification': "Message du protocole aide identification",
'defi_photo': "Message du protocole défi photo",
'gentiane_azure': "Message du protocole gentiane_azure",
'arbres_tetards': "Message du protocole arbres_tetards",
}
$('#message-protocole').html('<p>' + message[id] + '</p>');
});
};
 
WidgetPhotoPopup.prototype.traiterVote = function () {
// console.log(this.idImage);
// console.log(this);
// console.log(this.tagsImage);
 
$("#note").attr("value", -1);
 
$("#note-remove").click(function (){
$(".notation-star").removeClass('fa').addClass('far').css("color", "grey");
 
$("#note").attr("value", -1);
})
 
$("#rating-star-1").hover(function () {
$(".notation-star").removeClass('fa').addClass('far').css("color", "grey");
 
$("#rating-star-1").removeClass('far').addClass('fa').css("color", "#c3d45d");
 
$("#note").attr("value", 1);
});
 
$("#rating-star-2").hover(function () {
$(".notation-star").removeClass('fa').addClass('far').css("color", "grey");
 
$("#rating-star-1, #rating-star-2").removeClass('far').addClass('fa').css("color", "#c3d45d");
 
$("#note").attr("value", 2);
});
 
$("#rating-star-3").hover(function () {
$(".notation-star").removeClass('fa').addClass('far').css("color", "grey");
 
$("#rating-star-1, #rating-star-2, #rating-star-3").removeClass('far').addClass('fa').css("color", "#c3d45d");
 
$("#note").attr("value", 3);
});
 
$("#rating-star-4").hover(function () {
$(".notation-star").removeClass('fa').addClass('far').css("color", "grey");
 
$("#rating-star-1, #rating-star-2, #rating-star-3, #rating-star-4").removeClass('far').addClass('fa').css("color", "#c3d45d");
 
$("#note").attr("value", 4);
});
 
$("#rating-star-5").hover(function () {
$(".notation-star").removeClass('fa').addClass('far').css("color", "grey");
 
$("#rating-star-1, #rating-star-2, #rating-star-3, #rating-star-4, #rating-star-5").removeClass('far').addClass('fa').css("color", "#c3d45d");
 
$("#note").attr("value", 5);
});
 
// TODO Envoyer le vote
};
 
WidgetPhotoPopup.prototype.pivoterImage = function() {
let imageSelected = $('img[src="' + this.urlThisImage + '"]').attr('id');
 
$( '#pivoter-droite' ).on( 'click', function( event ) {
event.preventDefault();
 
let existingAngle = $('#' + imageSelected).data('angle');
if (existingAngle == 360 || existingAngle == (-360) || existingAngle == undefined){
existingAngle = 0
}
 
let angle = (existingAngle + 90);
$('#' + imageSelected).css("transform", "rotate(" + angle + "deg) ");
$('#' + imageSelected).data('angle', angle);
});
 
$( '#pivoter-gauche' ).on( 'click', function( event ) {
event.preventDefault();
 
let existingAngle = $('#' + imageSelected).data('angle');
if (existingAngle == 360 || existingAngle == (-360) || existingAngle == undefined){
existingAngle = 0
}
 
let angle = (existingAngle - 90);
$('#' + imageSelected).css("transform", "rotate(" + angle + "deg) ");
$('#' + imageSelected).data('angle', angle);
});
};
 
// WidgetPhotoPopup.prototype.afficherTags = function() {
// const lthis = this;
// const TAGS_BASE = [