Fix filter popup place

This commit is contained in:
Xavier J 2016-11-28 15:21:16 +01:00
parent fbfbe68295
commit b4fc5a6019
2 changed files with 9 additions and 4 deletions

View file

@ -35,6 +35,11 @@ function framed_id(event) {
function filter_framed_show(event) {
dom_object = $(framed_id(event));
dom_object.css('top', (event.pageY + 7) + 'px');
dom_object.css('left', (event.pageX + 7) + 'px');
var offset = $('#main-container').offset();
var y = event.pageY - offset.top;
var x = event.pageX - offset.left;
dom_object.css('top', (y + 7) + 'px');
dom_object.css('left', (x + 7) + 'px');
}

View file

@ -7,8 +7,8 @@
-else
= smart_listing.sortable preference.libelle, preference.table_attr
- if @dossiers_list_facade.active_filter? preference
%i.filter.fa.fa-filter{style: "cursor: pointer; margin-left:3px; font-size: 1.1em; color:#{(preference.filter.blank? ? 'grey' : 'orange')}", id: "filter_"+preference.table_attr.sub('.', '_')}
= render partial: 'backoffice/dossiers/filter_framed', locals:{preference: preference, filter_framed_id: "framed_filter_"+preference.table_attr.sub('.', '_')}
%i.filter.fa.fa-filter{style: "cursor: pointer; margin-left:3px; font-size: 1.1em; color:#{(preference.filter.blank? ? 'grey' : 'orange')}", id: "filter_#{smart_listing.name.to_s}_#{preference.table_attr.sub('.', '_')}"}
= render partial: 'backoffice/dossiers/filter_framed', locals:{preference: preference, filter_framed_id: "framed_filter_#{smart_listing.name.to_s}_#{preference.table_attr.sub('.', '_')}"}
%th.col-md-1.col-lg-1.center Actions
%th.col-md-1.col-lg-1.center Abonnés