@@ -22,11 +22,7 @@ require(['prefetchManifest']);
22
22
23
23
initMoreAppInfo ( ) ;
24
24
25
- if ( $ ( '.theme-search' ) . length ) {
26
- initSearch ( true ) ;
27
- } else {
28
- initSearch ( ) ;
29
- }
25
+ initSearch ( ) ;
30
26
31
27
if ( $ ( '.comm-dashboard-switch' ) . length ) {
32
28
require ( [ 'reviewersCommbadge' ] ) ;
@@ -49,7 +45,7 @@ function initClearSearch() {
49
45
}
50
46
51
47
52
- function initSearch ( isTheme ) {
48
+ function initSearch ( ) {
53
49
var search_results = getTemplate ( $ ( '#queue-search-template' ) ) ;
54
50
var no_results = getTemplate ( $ ( '#queue-search-empty-template' ) ) ;
55
51
@@ -78,13 +74,7 @@ function initSearch(isTheme) {
78
74
} else {
79
75
var results = [ ] ;
80
76
$ . 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 ) ;
88
78
results . push ( search_result_row ( item ) ) ;
89
79
} ) ;
90
80
$searchIsland . html (
@@ -126,25 +116,13 @@ function buildAppResultRow(app, review_url, statuses) {
126
116
app . flags = flags ;
127
117
128
118
if ( app . price === null ) {
129
- app . price = gettext ( 'Free' ) ;
119
+ app . price = 'null' ;
130
120
}
131
121
132
122
return app ;
133
123
}
134
124
135
125
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
-
148
126
function initMobileMenus ( ) {
149
127
// Nav action menu overlays for queues and logs.
150
128
var $logTabOverlay = $ ( '#log-tab-overlay' ) ;
0 commit comments