UNPKG

comindware.ui

Version:

Comindware Core UI provides the basic components like editors, lists, dropdowns, popups that we so desperately need while creating Marionette-based single-page applications.

30 lines (23 loc) 716 B
/** * Developer: Stepan Burguchev * Date: 11/17/2016 * Copyright: 2009-2016 Comindware® * All Rights Reserved * Published under the MIT license */ import { $, Handlebars } from 'lib'; import { helpers } from 'utils'; export default Marionette.ItemView.extend({ initialize(options) { helpers.ensureOption(options, 'view'); this.regionManager = new Marionette.RegionManager(); }, template: Handlebars.compile(''), onShow() { this.regionManager.addRegion('viewRegion', { el: this.$el }); this.regionManager.get('viewRegion').show(this.options.view); }, onDestroy() { this.regionManager.destroy(); } });