@@ -52,6 +52,7 @@ Ext.define('PartKeepr.PartFilterPanel', {
5252 statusFilter : null ,
5353 conditionFilter : null ,
5454 internalPartNumberFilter : null ,
55+ commentFilter : null ,
5556
5657 /**
5758 * Initializes the component
@@ -96,7 +97,8 @@ Ext.define('PartKeepr.PartFilterPanel', {
9697 this . footprintFilter ,
9798 this . statusFilter ,
9899 this . conditionFilter ,
99- this . internalPartNumberFilter
100+ this . internalPartNumberFilter ,
101+ this . commentFilter
100102 ]
101103 } ;
102104
@@ -184,6 +186,7 @@ Ext.define('PartKeepr.PartFilterPanel', {
184186
185187 this . conditionFilter . setValue ( "" ) ;
186188 this . internalPartNumberFilter . setValue ( "" ) ;
189+ this . commentFilter . setValue ( "" ) ;
187190
188191 this . onApply ( ) ;
189192 } ,
@@ -442,6 +445,11 @@ Ext.define('PartKeepr.PartFilterPanel', {
442445 anchor : '100%'
443446 } ) ;
444447
448+ this . commentFilter = Ext . create ( "Ext.form.field.Text" , {
449+ fieldLabel : i18n ( "Comment" ) ,
450+ anchor : '100%'
451+ } ) ;
452+
445453 } ,
446454 /**
447455 * Applies the filter parameters to the passed extraParams object.
@@ -601,6 +609,14 @@ Ext.define('PartKeepr.PartFilterPanel', {
601609 value : "%" + this . internalPartNumberFilter . getValue ( ) + "%"
602610 } ) ) ;
603611 }
612+
613+ if ( this . commentFilter . getValue ( ) !== "" ) {
614+ filters . push ( Ext . create ( "Ext.util.Filter" , {
615+ property : 'comment' ,
616+ operator : "LIKE" ,
617+ value : "%" + this . commentFilter . getValue ( ) + "%"
618+ } ) ) ;
619+ }
604620 return filters ;
605621 }
606622} ) ;
0 commit comments