Code coverage report for api/hotkey/HotKey.js

Statements: 100% (11 / 11)      Branches: 50% (1 / 2)      Functions: 66.67% (2 / 3)      Lines: 100% (11 / 11)      Ignored: none     

All files » api/hotkey/ » HotKey.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 441                     1 1 1   1 1     1                               1 1 1         1  
var FieldDBObject = require("./../FieldDBObject").FieldDBObject;
 
/**
 * @class A HotKey is a keyboard shortcut that uses one key (or a
 *        combination thereof) which allows users to execute a command
 *        without using a mouse, a menu, etc.
 *
 * @name  HotKey
 * @extends FieldDBObject
 * @constructs
 */
var HotKey = function HotKey(options) {
  Eif (!this._fieldDBtype) {
    this._fieldDBtype = "HotKey";
  }
  this.debug("Constructing HotKey", options);
  FieldDBObject.apply(this, arguments);
};
 
HotKey.prototype = Object.create(FieldDBObject.prototype, /** @lends HotKey.prototype */ {
  constructor: {
    value: HotKey
  },
 
  defaults: {
    value: {
      firstKey: "",
      secondKey: "",
      functiontocall: function() {},
      description: ""
    }
  },
 
  keySequence: {
    get: function() {
      var value = this.firstKey + "+" + this.secondKey;
      this.debug("Getting keySequence " + value);
      return value;
    }
  }
 
});
exports.HotKey = HotKey;