Skip to content
Snippets Groups Projects
Commit e1870633 authored by Ghislain Loas's avatar Ghislain Loas
Browse files

dev #64573 rating input

parent ce8efc8f
Branches
Tags
3 merge requests!3297WIP: Master,!3037Master,!2988Dev#64573 templates pour l interface publique libraire bootstrap
Pipeline #6214 failed with stage
in 29 minutes and 9 seconds
......@@ -24,11 +24,30 @@ class ZendAfi_Form_Review extends ZendAfi_Form {
public function init() {
parent::init();
$id = 'review_' . uniqid();
Class_ScriptLoader::getInstance()
->addJQueryReady(sprintf('
$("#%1$s input[name=note]:checked").parent().addClass("checked");
$("#%1$s input[name=note]").click(function() {
$("#%1$s input[name=note]").parent().removeClass("checked");
if (!$(this).is("checked"))
return $(this).parent().addClass("checked");
});',
$id));
$this
->addElement('text',
->setAttrib('id', $id)
->addElement('radio',
'note',
['label' => $this->_('Note')])
['label' => $this->_('Note'),
'multiOptions' => ['5' => '',
'4' => '',
'3' => '',
'2' => '',
'1' => '']])
->addElement('text',
'entete',
......
......@@ -78,6 +78,7 @@ abstract class ZendAfi_View_Helper_ListeNotices_Abstract extends ZendAfi_View_He
public function loadScript(){
Class_ScriptLoader::getInstance()
->addOPACScript('recherche')
->addInlineScript("var resumeAjaxBaseUrl='".$this->view->url(['controller' => 'noticeajax', 'action' => 'resumenotice'],null,true)."';")
->addOPACScript('liste_notices_mur')
->addJQueryReady("scrollToSelectedNoticeInResult(); vignetteHover($('.resultat_recherche .liste_mur .notice[data-id]'));");
......
......@@ -299,4 +299,54 @@ pre {
textarea {
width: 100%;
}
label[for=note] ~ div {
display: flex;
flex-direction: row-reverse;
overflow: hidden;
}
input[name="note"] {
display: none;
}
label.multi-element-label {
color: var(--orange);
display: inline-block;
flex: auto;
font-size: 1.25em;
font-weight: 200;
margin: 0;
padding: 0 3px 0 0;
transition: all .2s;
}
label.multi-element-label:hover {
cursor: pointer;
color: var(--teal);
font-weight: 900;
}
label.multi-element-label:hover ~ label {
font-weight: 900;
color: var(--teal);
}
label.multi-element-label:before {
content: '\f005';
font-family: "Font Awesome 5 Free";
}
label.multi-element-label.checked,
label.multi-element-label.checked ~ label {
font-weight: 900;
}
label.multi-element-label + br {
display: none;
}
.card .boutons .bouton.back {
display: none;
}
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment