12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- "use strict";
- /**
- * Licensed Materials - Property of IBM
- * IBM Cognos Products: Cognos Analytics
- * Copyright IBM Corp. 2016, 2017
- * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- */
- define(['underscore', 'bi/admin/nls/StringResource', 'bi/admin/account/slideout/teamfolders/TeamFoldersPane', 'bi/commons/ui/ButtonBar', 'bi/admin/account/slideout/contentFilePicker/ContentFilePickerBody', 'bi/admin/account/slideout/contentFilePicker/CustomSaveLocationController'], function (_, StringResource, TeamFoldersPane, ButtonBar, ContentFilePickerBody, CustomSaveLocationController) {
- var CustomSaveLocationPane = TeamFoldersPane.extend({
- init: function init(options) {
- CustomSaveLocationPane.inherited('init', this, arguments);
- this.headerView = this._createHeader();
- this.bodyView = this._createBody();
- this.footerView = this._createFooter();
- },
- _createBody: function _createBody() {
- return new ContentFilePickerBody({
- 'glassContext': this.glassContext,
- 'className': 'setTeamFoldersView',
- 'slideout': this.slideout,
- 'onChange': this._onChange.bind(this),
- 'teamContentOnly': this.teamContentOnly,
- 'controller': new CustomSaveLocationController({
- 'currentValue': this.currentValue
- })
- });
- },
- _createFooter: function _createFooter() {
- return new ButtonBar({
- buttons: [{
- 'id': this.APPLY_BUTTON_ID,
- 'label': StringResource.get('apply'),
- 'onSelect': this._onApply.bind(this),
- 'disabled': true
- }, {
- 'id': this.RESET_BUTTON_ID,
- 'label': StringResource.get('clear'),
- 'onSelect': this._onReset.bind(this),
- 'disabled': _.isEmpty(this.currentValue) || this.currentValue == null || this.currentValue == '.my_folders'
- }]
- });
- }
- });
- return CustomSaveLocationPane;
- });
|