Last active
October 3, 2016 20:34
-
-
Save AjayKumar01/cd45a5f64ac0e4eaa6bc994af473b929 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
extendsFrom: 'RelateField', | |
initialize: function(options) { | |
this._super('initialize', [options]); | |
}, | |
getFilterOptions: function(force) { | |
if (this._filterOptions && !force) { | |
return this._filterOptions; | |
} | |
//Defining our filter definitions | |
var custom_FilterOptions = new app.utils.FilterOptions().config({ | |
'initial_filter': 'FilterAccountTemplate', | |
'initial_filter_label': 'LBL_FILTER_ACCOUNT_TEMPLATE', | |
'filter_populate': { | |
'name': [this.model.get('name')], | |
} | |
}).populateRelate(this.model).format(); | |
//Assigning our filter definitions | |
this._filterOptions = custom_FilterOptions; | |
return this._filterOptions; | |
}, | |
openSelectDrawer: function() { | |
app.drawer.open({ | |
layout: 'selection-list', | |
context: { | |
module: this.getSearchModule(), | |
fields: this.getSearchFields(), | |
filterOptions: this.getFilterOptions() | |
} | |
}, _.bind(this.setValue, this)); | |
}, | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment