Source
384
384
$('#' + data.parentId).val(data.values[0].name);
385
385
}
386
386
});
387
387
388
388
// redirect buttons
389
389
$('button[data-url]').click(function() {
390
390
var button = $(this);
391
391
var confirmation = button.attr('data-confirmation');
392
392
393
393
if (typeof confirmation === 'undefined' || (typeof confirmation !== 'undefined' && confirm(confirmation))) {
394
+
if (button.attr('data-post')) {
395
+
return redirect(button.attr('data-url'), 'post', '_csrf_token', true);
396
+
}
397
+
394
398
window.location = button.attr('data-url');
395
399
}
396
400
});
397
401
398
402
// Initialize hintBox event handlers.
399
403
hintBox.bindEvents();
400
404
401
405
// Simulate Safari behaviour when text in a text field with autofocus becomes selected after page has loaded.
402
406
if (!SF) {
403
407
$('input[type=text][autofocus=autofocus]').filter(':visible').select();