diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-09-19 13:05:04 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-09-19 13:05:04 +0200 |
| commit | 08db385d02dd67f82937e4325179dda1a82519b7 (patch) | |
| tree | 9d1be20b01650218fefa38ec3ecae9a708fa0cf3 /addons/web/static/src/js/core/class.js | |
| parent | 071b46c22786d9b0b7d1ef46387907cbfeb8980b (diff) | |
| parent | d15a31ae6d944cf04f9da8752b069b221cac0d9a (diff) | |
[MERGE] forward port branch saas-18 up to d15a31ae6d9
Diffstat (limited to 'addons/web/static/src/js/core/class.js')
| -rw-r--r-- | addons/web/static/src/js/core/class.js | 57 |
1 files changed, 29 insertions, 28 deletions
diff --git a/addons/web/static/src/js/core/class.js b/addons/web/static/src/js/core/class.js index 8e53f0ba06d..4d1e6baaa8e 100644 --- a/addons/web/static/src/js/core/class.js +++ b/addons/web/static/src/js/core/class.js @@ -12,46 +12,47 @@ odoo.define('web.Class', function () { * Defines The Class object. That object can be used to define and inherit classes using * the extend() method. * - * Example: + * Example:: * - * var Person = Class.extend({ - * init: function(isDancing){ - * this.dancing = isDancing; - * }, - * dance: function(){ - * return this.dancing; - * } - * }); + * var Person = Class.extend({ + * init: function(isDancing){ + * this.dancing = isDancing; + * }, + * dance: function(){ + * return this.dancing; + * } + * }); * - * The init() method act as a constructor. This class can be instancied this way: + * The init() method act as a constructor. This class can be instanced this way:: * - * var person = new Person(true); - * person.dance(); + * var person = new Person(true); + * person.dance(); * - * The Person class can also be extended again: + * The Person class can also be extended again: * - * var Ninja = Person.extend({ - * init: function(){ - * this._super( false ); - * }, - * dance: function(){ - * // Call the inherited version of dance() - * return this._super(); - * }, - * swingSword: function(){ - * return true; - * } - * }); + * var Ninja = Person.extend({ + * init: function(){ + * this._super( false ); + * }, + * dance: function(){ + * // Call the inherited version of dance() + * return this._super(); + * }, + * swingSword: function(){ + * return true; + * } + * }); * * When extending a class, each re-defined method can use this._super() to call the previous * implementation of that method. + * + * @class Class */ +function OdooClass(){} + var initializing = false; var fnTest = /xyz/.test(function(){xyz();}) ? /\b_super\b/ : /.*/; -// The web Class implementation (does nothing) -function OdooClass(){}; - /** * Subclass an existing class * |
