(js,css) Improve keyboard shortcuts

- Defined some hotkeys in all modules;
- Added generation of cheat sheet.
This commit is contained in:
Francis Lachapelle
2016-09-27 16:16:09 -04:00
parent 13dd21bebb
commit 57a735753f
21 changed files with 630 additions and 74 deletions
@@ -212,7 +212,7 @@
this.$$cards = [];
}
this.idsMap = {};
this.$cards = []; // TODO Keep the "selected" state of cards
this.$cards = [];
// Extend instance with all attributes of data except headers
angular.forEach(data, function(value, key) {
if (key != 'headers' && key != 'cards') {
@@ -370,6 +370,16 @@
return _.find(this.$cards, function(card) { return card.id == _this.selectedCard; });
};
/**
* @function $selectedCardIndex
* @memberof AddressBook.prototype
* @desc Return the index of the currently visible card.
* @returns a number or undefined if no card is selected
*/
AddressBook.prototype.$selectedCardIndex = function() {
return _.indexOf(_.map(this.$cards, 'id'), this.selectedCard);
};
/**
* @function $selectedCards
* @memberof AddressBook.prototype