diff --git a/app/admin/lookup/controller.js b/app/admin/lookup/controller.js index c8b1120660..3dd7887065 100644 --- a/app/admin/lookup/controller.js +++ b/app/admin/lookup/controller.js @@ -6,8 +6,10 @@ import ImagingPricingTypes from 'hospitalrun/mixins/imaging-pricing-types'; import InventoryTypeList from 'hospitalrun/mixins/inventory-type-list'; import UnitTypes from 'hospitalrun/mixins/unit-types'; import VisitTypes from 'hospitalrun/mixins/visit-types'; -export default Ember.Controller.extend(BillingCategories, LabPricingTypes, - ModalHelper, ImagingPricingTypes, InventoryTypeList, UnitTypes, VisitTypes, { +import { EKMixin, keyDown } from 'ember-keyboard'; +export default Ember.Controller.extend(BillingCategories, EKMixin, + ImagingPricingTypes, InventoryTypeList, LabPricingTypes, ModalHelper, + UnitTypes, VisitTypes, { fileSystem: Ember.inject.service('filesystem'), lookupTypes: Ember.computed(function() { return [{ @@ -311,6 +313,15 @@ export default Ember.Controller.extend(BillingCategories, LabPricingTypes, return Ember.compare(a.toLowerCase(), b.toLowerCase()); }, + activateKeyboard: Ember.on('init', function() { + this.set('keyboardActivated', true); + }), + + updateListKeyboard: Ember.on(keyDown('ctrl+KeyS'), keyDown('cmd+KeyS'), function(event) { + this.send('updateList'); + event.preventDefault(); + }), + actions: { addValue: function() { this.send('openModal', 'admin.lookup.edit', Ember.Object.create({ diff --git a/package.json b/package.json index f83d6d6b2c..116f735275 100644 --- a/package.json +++ b/package.json @@ -64,6 +64,7 @@ "ember-data": "~2.6.2", "ember-export-application-global": "^1.0.5", "ember-i18n": "4.3.2", + "ember-keyboard": "2.1.3", "ember-load-initializers": "^0.5.1", "ember-pouch": "4.0.1", "ember-radio-buttons": "^4.0.1",