Skip to content

Commit

Permalink
Fix possition of chart menu in C&U when clicking close to right edge
Browse files Browse the repository at this point in the history
  • Loading branch information
PanSpagetka committed Dec 2, 2016
1 parent 20b1661 commit a99e4f9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/assets/javascripts/miq_application.js
Expand Up @@ -656,7 +656,9 @@ function miqBuildChartMenuEx(col, row, _value, category, series, chart_set, char
$("#" + pid).append("<li><a id='"+btoa(JSON.stringify(row_col_chart_index))+"' href='#' onclick='miqChartMenuClick(this.id)'>" + menu_title + "</a></li>");
}

chartmenu_el.css({'left': ManageIQ.mouse.x, 'top': ManageIQ.mouse.y});
//chart menu has min-width: 160 a has two levels
var x_position = (ManageIQ.mouse.x > $(window).width() - 320) ? $(window).width() - 320 : ManageIQ.mouse.x;
chartmenu_el.css({'left': x_position, 'top': ManageIQ.mouse.y});
chartmenu_el.dropdown('toggle');
chart_el.find('.overlay').show();
}
Expand Down

0 comments on commit a99e4f9

Please sign in to comment.