This repository was archived by the owner on May 16, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 85
85
< %= polyglot.t('StoreModeratorsOptional') %>
86
86
< span class ="textOpacity75 fontSize14 floatRight "> < %= polyglot.t('pageXofY', {currentPage: 2, totalPages: 2}) %> </ span >
87
87
</ div >
88
- < div class ="flexContainer flex-border homeModal-settings homeModal-settings-noSearch scrollOverflow custCol-primary customThemeScrollbar ">
88
+ < div id =" modSearch " class ="flexContainer flex-border homeModal-settings homeModal-settings-noSearch scrollOverflow custCol-primary customThemeScrollbar ">
89
89
< div class ="flexRow ">
90
90
< div class ="txtFieldWrapper txtFieldWrapper-bar searchWrapper custCol-primary custCol-border ">
91
91
< input type ="text " class ="txtField txtField-bar search " placeholder ="<%= polyglot.t('Searchformoderators') %> " />
92
92
</ div >
93
93
</ div >
94
- < div class ="flexRow js-storeWizardModeratorList ">
94
+ < div class ="flexRow list js-storeWizardModeratorList ">
95
95
</ div >
96
96
</ div >
97
97
< div class ="bar barFlush custCol-secondary borderBottomLeftRaidus3 borderBottomRightRaidus3 custCol-text ">
Original file line number Diff line number Diff line change 70
70
</ div >
71
71
< div class ="marginLeft15 marginRight15 marginTop2 <% if(ob.micro){ %>textSize10<% }else{ %>fontSize14<% } %> txt-fade textWeightNormal ">
72
72
< % if(ob.short_description) { %>
73
- < div class ="clamp2 "> < %= ob.short_description %> </ div >
73
+ < div class ="clamp2 js-userDescription "> < %= ob.short_description %> </ div >
74
74
< % } else { %>
75
75
< div > < %= polyglot.t('NoDescriptionAdded') %> </ div >
76
76
< % } %>
Original file line number Diff line number Diff line change @@ -144,12 +144,15 @@ module.exports = baseModal.extend({
144
144
145
145
handleSocketMessage : function ( response ) {
146
146
var data = JSON . parse ( response . data ) ;
147
+
147
148
if ( data . id == this . socketModeratorID && data . moderator . guid != this . model . get ( 'user' ) . guid && this . model . get ( 'user' ) . blocked_guids . indexOf ( data . moderator . guid ) == - 1 ) {
148
149
this . renderModerator ( data . moderator ) ;
149
150
}
150
151
} ,
151
152
152
153
renderModerator : function ( moderator ) {
154
+ const searchOptions = { valueNames : [ 'js-searchName' , 'js-userDescription' ] , page : 1000 } ;
155
+
153
156
//make sure this moderator is not a duplicate
154
157
if ( this . shownMods . indexOf ( moderator . guid ) > - 1 ) {
155
158
return ;
@@ -168,6 +171,13 @@ module.exports = baseModal.extend({
168
171
169
172
this . $el . find ( '.js-storeWizardModeratorList' ) . append ( modShort . el ) ;
170
173
this . moderatorCount ++ ;
174
+
175
+ // create or update the search
176
+ if ( ! this . modSearch ) {
177
+ this . modSearch = new window . List ( 'modSearch' , searchOptions ) ;
178
+ } else {
179
+ this . modSearch . reIndex ( ) ;
180
+ }
171
181
} ,
172
182
173
183
blockClicks : function ( e ) {
You can’t perform that action at this time.
0 commit comments