Skip to content
This repository was archived by the owner on Mar 15, 2018. It is now read-only.

Commit 5888716

Browse files
committed
Don't assume null price is Free (bug 1005904)
1 parent b568afc commit 5888716

File tree

1 file changed

+4
-26
lines changed

1 file changed

+4
-26
lines changed

media/js/devreg/reviewers/reviewers.js

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@ require(['prefetchManifest']);
2222

2323
initMoreAppInfo();
2424

25-
if ($('.theme-search').length) {
26-
initSearch(true);
27-
} else {
28-
initSearch();
29-
}
25+
initSearch();
3026

3127
if ($('.comm-dashboard-switch').length) {
3228
require(['reviewersCommbadge']);
@@ -49,7 +45,7 @@ function initClearSearch() {
4945
}
5046

5147

52-
function initSearch(isTheme) {
48+
function initSearch() {
5349
var search_results = getTemplate($('#queue-search-template'));
5450
var no_results = getTemplate($('#queue-search-empty-template'));
5551

@@ -78,13 +74,7 @@ function initSearch(isTheme) {
7874
} else {
7975
var results = [];
8076
$.each(data.objects, function(i, item) {
81-
if (isTheme) {
82-
item = buildThemeResultRow(item, review_url,
83-
statuses);
84-
} else {
85-
item = buildAppResultRow(item, review_url,
86-
statuses);
87-
}
77+
item = buildAppResultRow(item, review_url, statuses);
8878
results.push(search_result_row(item));
8979
});
9080
$searchIsland.html(
@@ -126,25 +116,13 @@ function buildAppResultRow(app, review_url, statuses) {
126116
app.flags = flags;
127117

128118
if (app.price === null) {
129-
app.price = gettext('Free');
119+
app.price = 'null';
130120
}
131121

132122
return app;
133123
}
134124

135125

136-
function buildThemeResultRow(theme, review_url, statuses) {
137-
// Add some extra pretty attrs for the template.
138-
theme.name = theme.name[0];
139-
140-
// Rather resolve URLs in backend, infer from slug.
141-
theme.review_url = review_url.replace(
142-
'__slug__', theme.slug);
143-
theme.status = statuses[theme.status];
144-
return theme;
145-
}
146-
147-
148126
function initMobileMenus() {
149127
// Nav action menu overlays for queues and logs.
150128
var $logTabOverlay = $('#log-tab-overlay');

0 commit comments

Comments
 (0)