From 67753b790cb2a67b243b1b6dccfb47c58023c701 Mon Sep 17 00:00:00 2001 From: Marliana Lara Date: Wed, 6 Mar 2019 10:48:14 -0500 Subject: [PATCH] Move toolbar default variable above the toolbar setting funciton --- awx/ui/client/features/jobs/jobsList.controller.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/awx/ui/client/features/jobs/jobsList.controller.js b/awx/ui/client/features/jobs/jobsList.controller.js index bfc20c0f47..620173cbc4 100644 --- a/awx/ui/client/features/jobs/jobsList.controller.js +++ b/awx/ui/client/features/jobs/jobsList.controller.js @@ -45,6 +45,11 @@ function ListJobsController ( setToolbarSort(); }, true); + const toolbarSortDefault = { + label: `${strings.get('sort.FINISH_TIME')}`, + value: '-finished' + }; + function setToolbarSort () { const orderByValue = _.get($state.params, 'job_search.order_by'); const sortValue = _.find(vm.toolbarSortOptions, (option) => option.value === orderByValue); @@ -55,11 +60,6 @@ function ListJobsController ( } } - const toolbarSortDefault = { - label: `${strings.get('sort.FINISH_TIME')}`, - value: '-finished' - }; - vm.toolbarSortOptions = [ { label: `${strings.get('sort.NAME_ASCENDING')}`, value: 'name' }, { label: `${strings.get('sort.NAME_DESCENDING')}`, value: '-name' },