partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

Action.js (994B)


      1 /**
      2  * A barcode scanner action is an action which is executed when a barcode was scanned.
      3  *
      4  * The barcode manager decides which action(s) will be called based upon the configuration done in the system
      5  * preferences.
      6  */
      7 Ext.define("PartKeepr.BarcodeScanner.Action", {
      8     statics: {
      9         /**
     10          * @var {String} The name of the action
     11          */
     12         actionName: "",
     13 
     14         /**
     15          * @var {String} The description of the action
     16          */
     17         actionDescription: ""
     18     },
     19 
     20     /**
     21      * @var {String} Contains the data returned by the barcode manager
     22      */
     23     data: "",
     24 
     25     /**
     26      * @var {String} Contains the configuration
     27      */
     28     config: {},
     29 
     30 
     31     constructor: function (config, data)
     32     {
     33         this.config = config;
     34         this.data = data;
     35     },
     36 
     37     /**
     38      * Executes an action
     39      */
     40     execute: function ()
     41     {
     42         console.error("The execute function of any PartKeepr.BarcodeScanner.Action subclass must be overridden!");
     43     }
     44 });