File tree Expand file tree Collapse file tree 1 file changed +10
-29
lines changed
LDK/resources/web/LDK/panel Expand file tree Collapse file tree 1 file changed +10
-29
lines changed Original file line number Diff line number Diff line change @@ -197,39 +197,20 @@ Ext4.define('LDK.panel.SingleSubjectFilterType', {
197197 var updatedResults = [ ] ;
198198
199199 Ext4 . each ( results . rows , function ( row ) {
200- if ( hasAlias ) {
201- var rowAlias = row [ this . aliasTable . aliasColumn ] ;
202-
203- var aliasIndex = this . subjects . indexOf ( rowAlias ) ;
204- if ( aliasIndex === - 1 ) {
205- for ( var i = 0 ; i < this . subjects . length ; i ++ ) {
206- if ( rowAlias . toLowerCase ( ) === this . subjects [ i ] . toString ( ) . toLowerCase ( ) ) {
207- aliasIndex = i ;
208- break ;
209- }
200+ var rowValue = hasAlias ? row [ this . aliasTable . aliasColumn ] : row [ this . aliasTable . idColumn ] ;
201+ var index = this . subjects . indexOf ( rowValue ) ;
202+
203+ if ( index === - 1 ) {
204+ for ( var i = 0 ; i < this . subjects . length ; i ++ ) {
205+ if ( rowValue . toLowerCase ( ) === this . subjects [ i ] . toString ( ) . toLowerCase ( ) ) {
206+ index = i ;
207+ break ;
210208 }
211209 }
212-
213- if ( aliasIndex !== - 1 ) {
214- updatedResults . push ( row ) ;
215- }
216210 }
217- else {
218- var rowId = row [ this . aliasTable . idColumn ] ;
219211
220- var rowIndex = this . subjects . indexOf ( rowId ) ;
221- if ( rowIndex === - 1 ) {
222- for ( var i = 0 ; i < this . subjects . length ; i ++ ) {
223- if ( rowId . toLowerCase ( ) === this . subjects [ i ] . toString ( ) . toLowerCase ( ) ) {
224- rowIndex = i ;
225- break ;
226- }
227- }
228- }
229-
230- if ( rowIndex !== - 1 ) {
231- updatedResults . push ( row ) ;
232- }
212+ if ( index !== - 1 ) {
213+ updatedResults . push ( row ) ;
233214 }
234215 } , this )
235216 return updatedResults ;
You can’t perform that action at this time.
0 commit comments