From 705e17384fa6512817747705d743c0dd263ee78d Mon Sep 17 00:00:00 2001 From: llj Date: Mon, 11 May 2015 14:54:10 +0800 Subject: [PATCH 1/2] [dir view] bugfix for 'sort' --- static/scripts/app/views/dir.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/static/scripts/app/views/dir.js b/static/scripts/app/views/dir.js index de49590f4c..b7c57abc5f 100644 --- a/static/scripts/app/views/dir.js +++ b/static/scripts/app/views/dir.js @@ -465,6 +465,7 @@ define([ this.$dirent_list.empty(); dirents.each(this.addOne, this); el.toggleClass('icon-caret-up icon-caret-down'); + dirents.comparator = null; }, sortByTime: function () { @@ -484,6 +485,7 @@ define([ this.$dirent_list.empty(); dirents.each(this.addOne, this); el.toggleClass('icon-caret-up icon-caret-down'); + dirents.comparator = null; }, select: function () { From ac2ab177713ef7f3a2609de101d6887fa4f6e1d1 Mon Sep 17 00:00:00 2001 From: lian Date: Mon, 11 May 2015 15:31:03 +0800 Subject: [PATCH 2/2] fix bug when sort repo --- static/scripts/app/views/group.js | 3 +++ static/scripts/app/views/myhome-repos.js | 2 ++ static/scripts/app/views/myhome-shared-repos.js | 2 ++ static/scripts/app/views/organization.js | 2 ++ 4 files changed, 9 insertions(+) diff --git a/static/scripts/app/views/group.js b/static/scripts/app/views/group.js index 068954341a..75095b1f45 100644 --- a/static/scripts/app/views/group.js +++ b/static/scripts/app/views/group.js @@ -115,6 +115,8 @@ define([ this.$tableBody.empty(); repos.each(this.addOne, this); el.toggleClass('icon-caret-up icon-caret-down'); + repos.comparator = null; + }, sortByTime: function() { @@ -131,6 +133,7 @@ define([ this.$tableBody.empty(); repos.each(this.addOne, this); el.toggleClass('icon-caret-up icon-caret-down'); + repos.comparator = null; }, hide: function() { diff --git a/static/scripts/app/views/myhome-repos.js b/static/scripts/app/views/myhome-repos.js index 9dad2bcfe1..87090f8e08 100644 --- a/static/scripts/app/views/myhome-repos.js +++ b/static/scripts/app/views/myhome-repos.js @@ -99,6 +99,7 @@ define([ this.$tableBody.empty(); repos.each(this.addOne, this); el.toggleClass('icon-caret-up icon-caret-down'); + repos.comparator = null; }, sortByTime: function() { @@ -115,6 +116,7 @@ define([ this.$tableBody.empty(); repos.each(this.addOne, this); el.toggleClass('icon-caret-up icon-caret-down'); + repos.comparator = null; } }); diff --git a/static/scripts/app/views/myhome-shared-repos.js b/static/scripts/app/views/myhome-shared-repos.js index 3b8421edc9..3c3dc59e4f 100644 --- a/static/scripts/app/views/myhome-shared-repos.js +++ b/static/scripts/app/views/myhome-shared-repos.js @@ -90,6 +90,7 @@ define([ this.$tableBody.empty(); repos.each(this.addOne, this); el.toggleClass('icon-caret-up icon-caret-down'); + repos.comparator = null; }, sortByTime: function() { @@ -106,6 +107,7 @@ define([ this.$tableBody.empty(); repos.each(this.addOne, this); el.toggleClass('icon-caret-up icon-caret-down'); + repos.comparator = null; } }); diff --git a/static/scripts/app/views/organization.js b/static/scripts/app/views/organization.js index 4269c1a07b..be04303107 100644 --- a/static/scripts/app/views/organization.js +++ b/static/scripts/app/views/organization.js @@ -95,6 +95,7 @@ define([ this.$tableBody.empty(); repos.each(this.addOne, this); el.toggleClass('icon-caret-up icon-caret-down'); + repos.comparator = null; }, sortByTime: function() { @@ -111,6 +112,7 @@ define([ this.$tableBody.empty(); repos.each(this.addOne, this); el.toggleClass('icon-caret-up icon-caret-down'); + repos.comparator = null; }, hide: function() {