Commit 9c2edecb authored by Jean-Noël Rouchon's avatar Jean-Noël Rouchon

Passage de javascript à coffeescript

parent 94cde2a7
......@@ -77,18 +77,17 @@
%a{"data-dismiss"=>"modal"}
Annuler
:javascript
jQuery(document).ready(function() {
$('#myModal').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
var modal = $(this);
modal.find('.modal-title').text(button.data('title'));
$('#userId').val(button.data('id'));
$('#userName').val(button.data('name'));
$('#userLogin').val(button.data('login'));
$('#userEmail').val(button.data('email'));
$('#userAdmin').prop('checked',button.data('admin'));
$('#userActif').prop('checked',button.data('actif'));
$('#userPassword').val("");
});
});
:coffeescript
$ ->
$('#myModal').on('show.bs.modal', (event) ->
button = $(event.relatedTarget)
modal = $(this)
modal.find('.modal-title').text(button.data('title'))
$('#userId').val(button.data('id'))
$('#userName').val(button.data('name'))
$('#userLogin').val(button.data('login'))
$('#userEmail').val(button.data('email'))
$('#userAdmin').prop('checked',button.data('admin'))
$('#userActif').prop('checked',button.data('actif'))
$('#userPassword').val("")
)
Markdown is supported
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