diff --git a/src/assetindex/assetIndex.es6 b/src/assetindex/assetIndex.es6 index a2dd6e5950..754db20275 100644 --- a/src/assetindex/assetIndex.es6 +++ b/src/assetindex/assetIndex.es6 @@ -4,7 +4,7 @@ import liveapi from '../websockets/binary_websockets'; import rv from 'common/rivetsExtra'; import 'jquery-growl'; import 'css!./assetIndex.css'; -import { getMarketsSubmarkets, getOrderedMarkets } from '../common/marketUtils'; +import { getObjectMarketSubmarkets, getSortedMarkets, getSortedSubmarkets } from '../common/marketUtils'; let table_el = null; let asset_win_el = null; @@ -85,8 +85,8 @@ const initTable = () => { if($.isEmptyObject(active_symbols_data) && $.isEmptyObject(asset_index_data)) return; - state.dropdown.market_submarkets = getMarketsSubmarkets(active_symbols_data); - state.dropdown.sorted_markets = getOrderedMarkets(active_symbols_data); + state.dropdown.market_submarkets = getObjectMarketSubmarkets(active_symbols_data); + state.dropdown.sorted_markets = getSortedMarkets(active_symbols_data); state.table.asset_data = asset_index_data; header_el = asset_win_el.parent().find('.ui-dialog-title').addClass('with-content'); @@ -167,7 +167,7 @@ const initTable = () => { list: markets_sorted_list, inx: 0, changed: (val) => { - const submarket_list = Object.keys(market_submarkets[val]); + const submarket_list = getSortedSubmarkets(Object.keys(market_submarkets[val])); state.dropdown.display_submarkets.update_list(submarket_list); updateTable(state.dropdown.display_markets.val(), state.dropdown.display_submarkets.val()); }, @@ -180,10 +180,13 @@ const initTable = () => { } function submarketsDropdown(market_submarkets) { + const submarkets = Object.keys(market_submarkets[state.dropdown.display_markets.val()]); + const sorted_submarkets = getSortedSubmarkets(submarkets); + if (!state.dropdown.display_submarkets) { state.dropdown.display_submarkets = windows .makeSelectmenu($(''); sub_select.appendTo(subheader); submarket_names = windows.makeSelectmenu(sub_select, { - list: Object.keys(header[market_names.val()]), + list: getSortedSubmarkets(Object.keys(header[market_names.val()])), inx: 0, changed: changedFn, }); submarket_names.off('selectmenuchange', changed); submarket_names.on('selectmenuchange', changed); } else { - submarket_names.update_list(Object.keys(header[market_names.val()])); + submarket_names.update_list(getSortedSubmarkets(Object.keys(header[market_names.val()]))); submarket_names.off('selectmenuchange', changed); submarket_names.on('selectmenuchange', changed); } diff --git a/src/workspace/workspace-menu.html b/src/workspace/workspace-menu.html index e39062ca78..4b1342e78b 100644 --- a/src/workspace/workspace-menu.html +++ b/src/workspace/workspace-menu.html @@ -1,20 +1,20 @@ diff --git a/src/workspace/workspace-menu.scss b/src/workspace/workspace-menu.scss index 59a00fa85f..39a3b01058 100644 --- a/src/workspace/workspace-menu.scss +++ b/src/workspace/workspace-menu.scss @@ -3,6 +3,7 @@ ul.workspace-ul { > a { &:hover { opacity: 1; } color: white; + font-size: 14px; padding: 0; line-height: 34px; padding: 0 10px 0 36px !important;