From caeed2ab43a188ab061d4e9736fc72c17ead1378 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Wed, 15 Jun 2022 16:22:04 +0300 Subject: [PATCH] jsdoc --- client/src/dynamic-handler.js | 43 +++++++++++++++++++++++++++++++++-- client/src/dynamic-logic.js | 1 - 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/client/src/dynamic-handler.js b/client/src/dynamic-handler.js index 0358fbe01f..3090c00568 100644 --- a/client/src/dynamic-handler.js +++ b/client/src/dynamic-handler.js @@ -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; diff --git a/client/src/dynamic-logic.js b/client/src/dynamic-logic.js index 45abc0cdf0..38bd36f050 100644 --- a/client/src/dynamic-logic.js +++ b/client/src/dynamic-logic.js @@ -418,7 +418,6 @@ define('dynamic-logic', [], function () { this.processPanel(name, 'styled'); }, - }); return DynamicLogic;