SortSlideout.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. "use strict";
  2. /**
  3. * Licensed Materials - Property of IBM
  4. * IBM Cognos Products: Cognos Analytics
  5. * Copyright IBM Corp. 2018, 2018
  6. * US Government Users Restricted Rights - Use, duplication or disclosure
  7. * restricted by GSA ADP Schedule Contract with IBM Corp.
  8. */
  9. define(['react', 'react-dom', 'ba-react-admin/ba-react-admin.min', 'underscore', 'bi/glass/app/ContentView', 'bi/admin/nls/StringResource'], function (React, ReactDOM, AdminReact, _, ContentView, StringResource, DateTimeUtils, GlassContextHelper) {
  10. 'use strict'; //NOSONAR: meant to be strict
  11. var SortSlideout = ContentView.extend({
  12. init: function init(options) {
  13. SortSlideout.inherited('init', this, arguments);
  14. _.extend(this, options);
  15. },
  16. render: function render() {
  17. ReactDOM.unmountComponentAtNode(this.$el[0]);
  18. var addMembersPane = React.createElement(AdminReact.SortSlideout, {
  19. glassContext: this.glassContext,
  20. StringResource: StringResource,
  21. dialog: this,
  22. title: this.title,
  23. controllerStore: this.controllerStore,
  24. sortContent: this.sortContent,
  25. isPanel: true
  26. });
  27. ReactDOM.render(addMembersPane, this.$el[0]);
  28. return Promise.resolve();
  29. },
  30. remove: function remove() {
  31. if (this.$el) {
  32. ReactDOM.unmountComponentAtNode(this.$el[0]);
  33. }
  34. this.viewState = null;
  35. return SortSlideout.inherited('remove', this, arguments);
  36. }
  37. });
  38. return SortSlideout;
  39. });