Adding js that check oustide click from div, adding rescue LOGO_NAME causing 500
This commit is contained in:
parent
a08ded5322
commit
83ad08622f
2 changed files with 11 additions and 2 deletions
|
@ -3,9 +3,18 @@ $(document).ready(filters_init);
|
|||
|
||||
|
||||
function filters_init() {
|
||||
$('html').click(function(event) {
|
||||
var visible_filter = $('.filter_framed:visible')
|
||||
if(visible_filter.length) {
|
||||
if (!$(event.target).closest('.filter_framed').is(":visible")) {
|
||||
visible_filter.hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
$(".filter").on('click', function (event) {
|
||||
filter_framed_show(event);
|
||||
filter_framed_close_all_excepted(framed_id(event));
|
||||
event.stopPropagation();
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -24,4 +33,4 @@ function filter_framed_show(event) {
|
|||
|
||||
dom_object.css('top', (event.pageY + 7) + 'px');
|
||||
dom_object.css('left', (event.pageX + 7) + 'px');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
Env Test
|
||||
= image_tag('marianne_small.png', class: 'logo')
|
||||
%a{href: '/'}
|
||||
= image_tag(image_url(LOGO_NAME), class: 'logo')
|
||||
= image_tag(image_url(LOGO_NAME), class: 'logo') rescue nil
|
||||
|
||||
- if gestionnaire_signed_in? && user_signed_in?
|
||||
%a{href: (current_gestionnaire.procedure_filter.blank? ? backoffice_dossiers_path : backoffice_dossiers_procedure_path(current_gestionnaire.procedure_filter)), class: 'btn btn-md'}
|
||||
|
|
Loading…
Reference in a new issue