Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layouts - always create paging_div, hidden if needed #3271

Merged
merged 4 commits into from
Jan 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,11 @@
$(pagingDiv).append(col);
col[0].appendChild(pagination[0]);
}

if (this.initObject.pages) {
$(pagingDiv).show();
}

// calculates the height of main content from toolbar and footer, needed
// to make sure the paginator is not off the screen
miqInitMainContent();
Expand Down
4 changes: 3 additions & 1 deletion app/helpers/gtl_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def render_gtl_outer(no_flash_div)
:view => @view,
:db => @db,
:parent => @parent,
:pages => @pages,

:report_data_additional_options => @report_data_additional_options,
}
Expand Down Expand Up @@ -121,7 +122,8 @@ def render_gtl_javascripts(options)
isExplorer: '#{options[:explorer]}' === 'true' ? true : false,
records: #{!options[:selected_records].nil? ? h(j_str(options[:selected_records].to_json)) : "\'\'"},
hideSelect: #{options[:selected_records].kind_of?(Array)},
showUrl: '#{gtl_show_url(options)}'
showUrl: '#{gtl_show_url(options)}',
pages: #{options[:pages].to_json},
}
}});
EOJ
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
.col-sm-12
- if @widgets_menu
= render :partial => "layouts/angular/toolbar"
.row#main-content.miq-body
.row#main-content.miq-body.miq-layout-center_div_dashboard_no_listnav
.col-md-12
.spacer
= render :partial => 'layouts/tabs'
Expand Down
5 changes: 2 additions & 3 deletions app/views/layouts/_center_div_no_listnav.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
.row.toolbar-pf#toolbar
.col-sm-12
= render :partial => "layouts/angular/toolbar"
.row#main-content{:class => @lastaction == "show_dashboard" ? 'miq-sand-paper' : ''}
.row#main-content.miq-layout-center_div_no_listnav{:class => @lastaction == "show_dashboard" ? 'miq-sand-paper' : ''}
.col-md-12
= render :partial => "layouts/breadcrumbs"
- if layout_uses_tabs?
.col-md-12
= render :partial => 'layouts/tabs'
.col-md-12
= yield
- if layout_uses_paging? && !@in_a_form
.row#paging_div
.row#paging_div{:style => (layout_uses_paging? && !@in_a_form) ? '' : 'display: none'}
5 changes: 2 additions & 3 deletions app/views/layouts/_center_div_with_listnav.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
= render :partial => "layouts/angular/toolbar"
.row.max-height
.col-sm-10.col-md-9.col-sm-push-2.col-md-push-3.max-height
#main-content.row
#main-content.row.miq-layout-center_div_with_listnav
.col-md-12
.row
.col-md-7
Expand All @@ -21,8 +21,7 @@
.row
.col-md-12
= yield
- unless @in_a_form
.row#paging_div
.row#paging_div{:style => @in_a_form ? '' : 'display: none'}

.col-sm-2.col-md-3.col-sm-pull-10.col-md-pull-9.sidebar-pf.sidebar-pf-left.max-height
-# listnav_div
Expand Down
4 changes: 2 additions & 2 deletions app/views/layouts/_content.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
= render :partial => "layouts/angular/toolbar"
.row.max-height
#right_div.resizable.max-height{:class => "col-md-#{maindiv} col-md-push-#{sidewidth}"}
#main-content.row
#main-content.row.miq-layout-content
.col-md-12
.row
.col-md-7#explorer
Expand All @@ -44,7 +44,7 @@
= yield
.col-md-12.no-padding
= render :partial => 'layouts/x_form_buttons'
.row#paging_div
.row#paging_div{:style => saved_report_paging? ? "" : "display: none"}
- if saved_report_paging?
= render(:partial => 'layouts/saved_report_paging_bar',
:locals => {:pages => @sb[:pages]})
Expand Down