diff options
author | alexwl <alexey.a.kiryushin@gmail.com> | 2018-10-02 13:17:04 +0300 |
---|---|---|
committer | alexwl <alexey.a.kiryushin@gmail.com> | 2018-10-02 13:17:04 +0300 |
commit | cf2c56c7061b7ed40fdd3b40a352ddb9c9b7371f (patch) | |
tree | b1de9ada0f1b1cb064e3a9e0d4042d1f519085bd /javascript/app/controllers/package |
Initial commit
Diffstat (limited to 'javascript/app/controllers/package')
-rw-r--r-- | javascript/app/controllers/package/index.js | 14 | ||||
-rw-r--r-- | javascript/app/controllers/package/search.js | 15 | ||||
-rw-r--r-- | javascript/app/controllers/package/show/file.js | 9 |
3 files changed, 38 insertions, 0 deletions
diff --git a/javascript/app/controllers/package/index.js b/javascript/app/controllers/package/index.js new file mode 100644 index 0000000..cd02416 --- /dev/null +++ b/javascript/app/controllers/package/index.js @@ -0,0 +1,14 @@ +import Ember from 'ember'; +export default Ember.Controller.extend({ + modulesFiltered : Ember.computed('model','query',function () { + const query = this.get('query'); + const modules = Object.keys(this.get('model.modules')).sort(); + if(query) { + const regExp = new RegExp(query,"i"); + return modules.filter((p) => p.search(regExp) != -1); + } else { + return modules; + } + }) +}); + diff --git a/javascript/app/controllers/package/search.js b/javascript/app/controllers/package/search.js new file mode 100644 index 0000000..46f2efd --- /dev/null +++ b/javascript/app/controllers/package/search.js @@ -0,0 +1,15 @@ +import Ember from 'ember'; +import {goToDefinition} from '../../utils/go-to-definition'; + +export default Ember.Controller.extend({ + store : Ember.inject.service('store'), + actions : { + goToDefinition (locationInfo,event) { + goToDefinition(this.get('store'), + locationInfo, + event.which, + null); + return false; + } + } +}); diff --git a/javascript/app/controllers/package/show/file.js b/javascript/app/controllers/package/show/file.js new file mode 100644 index 0000000..c566e7e --- /dev/null +++ b/javascript/app/controllers/package/show/file.js @@ -0,0 +1,9 @@ +import Ember from 'ember'; +export default Ember.Controller.extend({ + settings : Ember.inject.service('settings'), + actions : { + findReferences(packageId,externalId,occName) { + this.send('updateReferences',packageId,externalId,occName); + } + } +}); |