diff options
author | Phil Hughes <me@iamphill.com> | 2016-11-09 09:23:48 +0000 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2016-11-10 17:53:34 +0300 |
commit | e9c66be12bf4c6e10f46dfed8f32c3fe7f093122 (patch) | |
tree | 90105bc8b1535716d610ffc1d380f2d36e2f3db0 | |
parent | 948b4828ce75b56ddc71ac08c5e3a8a08b405fcc (diff) | |
download | gitlab-ce-e9c66be12bf4c6e10f46dfed8f32c3fe7f093122.tar.gz |
Changed how lists get sorted
3 files changed, 6 insertions, 2 deletions
diff --git a/app/assets/javascripts/boards/boards_bundle.js.es6 b/app/assets/javascripts/boards/boards_bundle.js.es6 index 8ca7e13bb50..7ba918a05f8 100644 --- a/app/assets/javascripts/boards/boards_bundle.js.es6 +++ b/app/assets/javascripts/boards/boards_bundle.js.es6 @@ -61,6 +61,8 @@ $(() => { } }); + this.state.lists = _.sortBy(this.state.lists, 'position'); + Store.addBlankState(); this.loading = false; }); diff --git a/app/assets/javascripts/boards/components/new_list_dropdown.js.es6 b/app/assets/javascripts/boards/components/new_list_dropdown.js.es6 index 9f71b9abdab..10ce746deb5 100644 --- a/app/assets/javascripts/boards/components/new_list_dropdown.js.es6 +++ b/app/assets/javascripts/boards/components/new_list_dropdown.js.es6 @@ -65,6 +65,8 @@ color: label.color } }); + + Store.state.lists = _.sortBy(Store.state.lists, 'position'); } } }); diff --git a/app/assets/javascripts/boards/stores/boards_store.js.es6 b/app/assets/javascripts/boards/stores/boards_store.js.es6 index 3af71fcc081..6bc95aa60f2 100644 --- a/app/assets/javascripts/boards/stores/boards_store.js.es6 +++ b/app/assets/javascripts/boards/stores/boards_store.js.es6 @@ -27,8 +27,6 @@ const list = new List(listObj); this.state.lists.push(list); - this.state.lists = _.sortBy(this.state.lists, 'position'); - return list; }, new (listObj) { @@ -62,6 +60,8 @@ title: 'Welcome to your Issue Board!', position: 0 }); + + this.state.lists = _.sortBy(this.state.lists, 'position'); }, removeBlankState () { this.removeList('blank'); |