| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 | "use strict";/** * Licensed Materials - Property of IBM * IBM Cognos Products: Cognos Analytics * Copyright IBM Corp. 2018, 2018 * US Government Users Restricted Rights - Use, duplication or disclosure * restricted by GSA ADP Schedule Contract with IBM Corp. */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) {  'use strict'; //NOSONAR: meant to be strict  var AddMemberToSlideout = ContentView.extend({    init: function init(options) {      AddMemberToSlideout.inherited('init', this, arguments);      _.extend(this, options);    },    openFilterlideout: function openFilterlideout(aStore) {      var menuContentCheckbox = [{        label: StringResource.get('contact'),        value: 'contact'      }, {        label: StringResource.get('distributionList'),        value: 'distributionList'      }, {        label: StringResource.get('account'),        value: 'account'      }, {        label: StringResource.get('role'),        value: 'role'      }, {        label: StringResource.get('group'),        value: 'group'      }];      this.glassContext.appController.showSlideOut({        parent: this.slideout,        content: {          module: 'bi/admin/common/slideout/FilterSlideout',          id: 'FilterAddToContent',          glassContext: this.glassContext,          StringResource: StringResource,          controllerStore: aStore,          menuContentCheckbox: menuContentCheckbox        }      });    },    openSortSlideout: function openSortSlideout(aStore) {      var sortCols = [{        value: 'defaultName',        label: StringResource.get('name')      }, {        value: 'modificationTime',        label: StringResource.get('modified')      }, {        value: 'objectClass',        label: StringResource.get('type')      }];      this.glassContext.appController.showSlideOut({        parent: this.slideout,        content: {          module: 'bi/admin/common/slideout/SortSlideout',          id: 'SortAddToContent',          glassContext: this.glassContext,          StringResource: StringResource,          controllerStore: aStore,          sortContent: sortCols        }      });    },    render: function render() {      ReactDOM.unmountComponentAtNode(this.$el[0]);      var addMembersPane = React.createElement(AdminReact.AddMembersToPanel, {        glassContext: this.glassContext,        StringResource: StringResource,        dialog: this,        title: this.title,        selectableTypes: ['distributionList', 'contact', 'account', 'role', 'group'],        hideSearchAtRoot: true,        store: this.store,        isActive: this.activeFunction,        addMembersTo: this.addToFunction,        closePanel: function () {          this.slideout.hide();        }.bind(this)      });      ReactDOM.render(addMembersPane, this.$el[0]);      return Promise.resolve();    },    remove: function remove() {      if (this.$el) {        ReactDOM.unmountComponentAtNode(this.$el[0]);      }      this.viewState = null;      return AddMemberToSlideout.inherited('remove', this, arguments);    }  });  return AddMemberToSlideout;});
 |