12345678910111213141516171819202122232425262728 |
- define([ "require", "backbone", "hbs!tmpl/business_metadata/BusinessMetadataDetailLayoutView_tmpl", "utils/Utils" ], function(require, Backbone, BusinessMetadataDetailLayoutViewTmpl, Utils) {
- "use strict";
- var BusinessMetadataDetailLayoutView = Backbone.Marionette.LayoutView.extend({
- template: BusinessMetadataDetailLayoutViewTmpl,
- regions: {},
- ui: {
- title: '[data-id="title"]',
- description: '[data-id="description"]',
- backButton: '[data-id="backButton"]'
- },
- events: function() {
- var events = {};
- return events["click " + this.ui.backButton] = function() {
- Utils.backButtonClick();
- }, events;
- },
- initialize: function(options) {
- _.extend(this, _.pick(options, "model"));
- },
- onRender: function() {
- this.renderDetail();
- },
- renderDetail: function() {
- this.ui.title.html("<span>" + this.model.get("name") + "</span>"), this.model.get("description") && this.ui.description.text(this.model.get("description"));
- }
- });
- return BusinessMetadataDetailLayoutView;
- });
|