123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- "use strict";
- /**
- * Licensed Materials - Property of IBM
- * IBM Cognos Products: Cognos Analytics
- * Copyright IBM Corp. 2018
- * US Government Users Restricted Rights - Use, duplication or disclosure
- * restricted by GSA ADP Schedule Contract with IBM Corp.
- */
- define(['bi/admin/nls/StringResource', 'bi/glass/app/ContentView', 'bi/admin/common/utils/AJAXUtils', 'bi/commons/ui/properties/PropertyUIControl', 'q', 'underscore', 'bi/admin/account/ui/PersonalTab', 'bi/admin/common/ui/UserProfileSettingsView'], function (StringResource, ContentView, AJAXUtils, PropertyUIControl, Q, _, PersonalTab, UserProfileSettingsView) {
- 'use strict'; //NOSONAR: meant to be strict
- var DefaultProfileTab = ContentView.extend({
- init: function init(options) {
- DefaultProfileTab.inherited('init', this, arguments);
- _.extend(this, options);
- this.$el.addClass('defaultProfileTab');
- this.$el.attr('id', 'caDefaultProfileTab');
- },
- render: function render() {
- //NOSONAR
- var getDefaultUserProfileURL = AJAXUtils.getPath('get_default_user_profile');
- var requestOptions = {
- contentType: 'application/json; charset=utf-8',
- dataType: 'json'
- };
- var userProfilePromise = this.glassContext.services.fetch.get(getDefaultUserProfileURL, requestOptions);
- return userProfilePromise.then(function (response) {
- this.objectInfo = response.data;
- this.objectInfo.permissions = 'write';
- var userProfileSettingsView = new UserProfileSettingsView({
- objectInfo: this.objectInfo,
- $el: this.$el,
- glassContext: this.glassContext,
- options: this.objectInfo,
- slideout: this.slideout
- });
- return userProfileSettingsView.render();
- }.bind(this));
- }
- });
- return DefaultProfileTab;
- });
|