123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- 'use strict';
- /*
- *+------------------------------------------------------------------------+
- *| Licensed Materials - Property of IBM
- *| IBM Cognos Products: Content Explorer
- *| (C) Copyright IBM Corp. 2016, 2018
- *|
- *| US Government Users Restricted Rights - Use, duplication or disclosure
- *| restricted by GSA ADP Schedule Contract with IBM Corp.
- *+------------------------------------------------------------------------+
- */
- define(['../../lib/@waca/core-client/js/core-client/ui/core/Class', '../../lib/@waca/core-client/js/core-client/utils/Utils'], function (Class, Utils) {
- 'use strict';
- var EditDataSourceActionHandler = Class.extend({
- _activeObject: null,
- isItemVisible: function isItemVisible(options) {
- this._activeObject = options.target.activeObject;
- var _selectedContext = options.target.activeObject.aSelectedContext[0];
- if (!_selectedContext) {
- return false;
- }
- if (_selectedContext.type !== 'dataSet2') {
- return false;
- }
- this.glassContext = options.glassContext;
- return options.glassContext.getCoreSvc('.UserProfile').capabilities.indexOf('canUseMyDataSets') !== -1 && _selectedContext.permissions.indexOf('read') !== -1 && _selectedContext.permissions.indexOf('write') !== -1 && !Utils.isIpad();
- },
- onSelectItem: function onSelectItem() {
- var context = {
- isDataset: true,
- startingTemplate: 'DatasetList',
- isTemplate: true,
- UIProfile: 'TitanDataset',
- id: this._activeObject.aSelectedContext[0].id,
- cmProperties: this._activeObject.aSelectedContext[0]
- };
- this.glassContext.appController.openAppView('datasets', {
- id: 'editDataset',
- content: context
- });
- }
- });
- return EditDataSourceActionHandler;
- });
- //# sourceMappingURL=EditDataSourceActionHandler.js.map
|