Skip to content

Commit

Permalink
Fix scrolling of selector targets [again]
Browse files Browse the repository at this point in the history
  • Loading branch information
steveblamey committed Jul 14, 2017
1 parent 393a03f commit b74d0fa
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 2 additions & 0 deletions assets/js/lib/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ function check_if_table_needs_scroll_bar() {
}
}

// Scroll selected targets in modules/common/templates/elements/selected_targets.tpl
$('#targets').height($('#view_page').height() - $('#selected-items-header').height() - 5);
}

function refresh_current_page (url) {
Expand Down
8 changes: 5 additions & 3 deletions modules/common/templates/elements/selector_list_targets.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@
{include file='elements/cancelForm.tpl' cancel_action='cancel'}
</dl>
<dl id="view_data_right">
{view_section heading="Selected Items"}
<div id="selected-items-header">
{view_section heading="Selected Items"}
<div id="view_data_bottom">
<table class="datagrid" id="datagrid1" cellspacing="0" cellpadding="0">
<thead>
Expand All @@ -88,12 +89,13 @@
</tbody>
</table>
</div>
{/view_section}
{/view_section}
{view_section dont_prettify="true" heading="Selected $title [<a href='#' class='remove_all'>Remove All</a>]"}
<input type="hidden" id="target_link" value="{$link}" />
<input type="hidden" id="targets_text">
</div>
<div id="view_data_bottom">
<div id="targets" style="overflow: auto;">
<div id="targets" style="overflow-y: auto;">
{include file="elements/selected_targets.tpl"}
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,9 @@ select.tax_rate {
#SOrder_status.cancelled {
background-color: yellow;
border-radius: 5px;
}
}

/* soproductselectors > select_targets */
#selected-items-header {
display:inline-block; width:100%;
}

0 comments on commit b74d0fa

Please sign in to comment.