[extensions-web] Switch the default sort to 'popularity'
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web] Switch the default sort to 'popularity'
- Date: Tue, 14 Feb 2012 18:14:18 +0000 (UTC)
commit 13c66a0cf38335f072e85c2fc5964ceb0f0a6710
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Feb 14 12:24:02 2012 -0500
Switch the default sort to 'popularity'
sweettooth/extensions/views.py | 2 +-
sweettooth/static/js/fsui.js | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/sweettooth/extensions/views.py b/sweettooth/extensions/views.py
index ab44ae8..0bd7084 100644
--- a/sweettooth/extensions/views.py
+++ b/sweettooth/extensions/views.py
@@ -97,7 +97,7 @@ def ajax_query_params_query(request):
queryset = models.Extension.objects.visible().filter(**query_params)
- sort = request.GET.get('sort', 'name')
+ sort = request.GET.get('sort', 'popularity')
sort = dict(recent='created').get(sort, sort)
if sort not in ('created', 'downloads', 'popularity', 'name'):
raise Http404()
diff --git a/sweettooth/static/js/fsui.js b/sweettooth/static/js/fsui.js
index fe2b3c0..3847c5d 100644
--- a/sweettooth/static/js/fsui.js
+++ b/sweettooth/static/js/fsui.js
@@ -53,7 +53,7 @@ function($, dbusProxy, hashparamutils, modal) {
var hp = hashparamutils.getHashParams();
if (hp.sort === undefined || !sortCriteria.hasOwnProperty(hp.sort))
- hp.sort = 'name';
+ hp.sort = 'popularity';
var $fsui = $('<div>', {'class': 'fsui'}).appendTo($elem);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]