LicenseByUserPane.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. "use strict";
  2. /**
  3. * Licensed Materials - Property of IBM
  4. * IBM Cognos Products: admin
  5. * Copyright IBM Corp. 2015, 2018
  6. * US Government Users Restricted Rights - Use, duplication or disclosure
  7. * restricted by GSA ADP Schedule Contract with IBM Corp.
  8. */
  9. define(['bi/admin/common/slideout/BasePane', 'bi/admin/license/ui/LicenseByUserView'], function (BasePane, LicenseByUserView) {
  10. 'use strict'; //NOSONAR: meant to be strict
  11. var LicenseByUserPane = BasePane.extend({
  12. init: function init(options) {
  13. LicenseByUserPane.inherited('init', this, arguments);
  14. $.extend(this, options);
  15. },
  16. renderBody: function renderBody($body) {
  17. var $div = $('<div/>');
  18. $body.append($div);
  19. this.licByUserView = this._getNewLicenseByUserView({
  20. 'el': $div,
  21. 'slideout': this.slideout,
  22. 'glassContext': this.glassContext,
  23. 'licenseInfo': this.licenseInfo,
  24. 'parentPane': this
  25. });
  26. return this.licByUserView.render().then(function () {
  27. this.licByUserView.setFocus();
  28. this.$el.addClass('lbu-parameters-container');
  29. }.bind(this));
  30. },
  31. _getNewLicenseByUserView: function _getNewLicenseByUserView(options) {
  32. return new LicenseByUserView(options);
  33. }
  34. });
  35. return LicenseByUserPane;
  36. });