Skip to content
Extraits de code Groupes Projets
Valider ab195d28 rédigé par echarp's avatar echarp
Parcourir les fichiers

Tags selector back in place

parent 68f1a50d
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
$(document).on 'turbolinks:load', ->
# Manage the tags label so it points the proper select2 input
$('label[for=event_tags]').attr 'for', 's2id_autogen1'
$('#event_start_time').change ->
if $('#event_start_time').val() >= $('#event_end_time').val()
$('#event_end_time').val($('#event_start_time').val())
$('#event_end_time').change ->
if $('#event_start_time').val() >= $('#event_end_time').val()
$('#event_start_time').val($('#event_end_time').val())
# Quick mechanism so that the ice cube rule only appears when useful
if $('#event_repeat').val() == '0'
$('.field.rule').hide()
$('#event_repeat').each ->
if $(this).val() == '0'
$('.field.rule').hide()
$('#event_repeat').change ->
if $(this).val() > 0
$('.field.rule').show()
else
$('.field.rule').hide()
$(this).change ->
if $(this).val() > 0
$('.field.rule').show()
else
$('.field.rule').hide()
# Manage event tags edition
$('#event_tags').each ->
......@@ -18,13 +29,3 @@ $(document).on 'turbolinks:load', ->
tags = jQuery.map data, (n) -> n[0]
elt.select2 tags: tags, separator: [' '], tokenSeparators: [' ']
# Manage the tags label so it points the proper select2 input
$('label[for=event_tags]').attr 'for', 's2id_autogen1'
$('#event_start_time').change ->
if $('#event_start_time').val() >= $('#event_end_time').val()
$('#event_end_time').val($('#event_start_time').val())
$('#event_end_time').change ->
if $('#event_start_time').val() >= $('#event_end_time').val()
$('#event_start_time').val($('#event_end_time').val())
Fichier ajouté
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter