partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

FilterExpressionWindow.js (756B)


      1 Ext.define("PartKeepr.Widgets.FilterExpressionWindow", {
      2     extend: "Ext.window.Window",
      3     modal: true,
      4     layout: 'fit',
      5     title: i18n("Add Filter Expression"),
      6     sourceModel: null,
      7 
      8     minHeight: 150,
      9     minWidth: 400,
     10 
     11 
     12      /* Constrain the window to fit the viewport */
     13     constrainHeader: true,
     14 
     15     initComponent: function ()
     16     {
     17         this.items = {
     18             xtype: "partkeepr.filterexpression",
     19             sourceModel: this.sourceModel,
     20             listeners: {
     21                 "applyfilter": this.onAddFilter,
     22                 scope: this
     23             }
     24         };
     25         this.callParent(arguments);
     26     },
     27 
     28     onAddFilter: function (filter)
     29     {
     30         this.fireEvent("applyfilter", filter);
     31         this.close();
     32     }
     33 });