This commit is contained in:
Yuri Kuznetsov
2022-06-15 16:22:04 +03:00
parent 4a5ef3c1b2
commit caeed2ab43
2 changed files with 41 additions and 3 deletions
+41 -2
View File
@@ -28,20 +28,59 @@
define('dynamic-handler', [], function () {
/**
* A dynamic handler. To be extended by a specific handler.
*
* @class
* @name Class
* @param {module:views/record/detail.Class} recordView A record view.
* @memberOf module:dynamic-handler
*/
let DynamicHandler = function (recordView) {
/**
* A record view.
*
* @protected
* @type {module:views/record/detail.Class}
*/
this.recordView = recordView;
/**
* A model.
*
* @protected
* @type {module:model.Class}
*/
this.model = recordView.model;
};
_.extend(DynamicHandler.prototype, {
_.extend(DynamicHandler.prototype, /** @lends module:dynamic-handler.Class# */{
/**
* Initialization logic. To be extended.
*
* @protected
*/
init: function () {},
/**
* Called on model change. To be extended.
*
* @protected
* @param {module:views/record/detail.Class} model A model.
* @param {Object} o Options.
*/
onChange: function (model, o) {},
/**
* Get a metadata.
*
* @protected
* @returns {module:metadata.Class}
*/
getMetadata: function () {
return this.recordView.getMetadata()
}
},
});
DynamicHandler.extend = Backbone.Router.extend;
-1
View File
@@ -418,7 +418,6 @@ define('dynamic-logic', [], function () {
this.processPanel(name, 'styled');
},
});
return DynamicLogic;