123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- 'use strict';
- /**
- * Licensed Materials - Property of IBM
- * IBM Cognos Products: BI Cloud (C) Copyright IBM Corp. 2018
- * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- */
- define(['../../lib/@waca/dashboard-common/dist/ui/dialogs/BaseDialog', 'ca-modeller/shaping', '../nls/StringResources', 'jquery'], function (BaseDialog, Shaping, StringResources, $) {
- 'use strict';
- var Dialog = BaseDialog.extend({
- _buttons: ['close'],
- _showCloseX: true,
- init: function init(options) {
- this.context = options.context;
- this.selection = options.selection;
- Dialog.inherited('init', this, arguments);
- },
- renderContent: function renderContent(n) {
- var maxHeight = window.innerHeight - 250; //Prevent the dialog from exceeding the current window bounds.
- this.$container = $('<div>', { 'class': 'dataSources paneContainer' }).css({ 'max-height': maxHeight }).appendTo(n);
- if (this.context) {
- try {
- var dashboardApi = this.context.glassContext.appController.getCurrentContentView().getDashboardApi();
- var showEditLabel = dashboardApi.getAppConfig('editPropertiesLabel');
- this.context.shapingHelper.render(Shaping.ShapingProperties, { moserObjects: this.selection, showEditLabel: showEditLabel }, this.$container[0]);
- } catch (e) {
- /* Swallow exceptions for now as they don't always prevent the pane from rendering. */
- }
- }
- return n;
- },
- renderTitle: function renderTitle(n) {
- n.text(StringResources.get('propertiesDialogTitle'));
- return n;
- },
- cancel: function cancel() {
- this.context.shapingHelper.unmountComponentAtNode(this.$container[0]);
- Dialog.inherited('cancel', this, arguments);
- }
- });
- return Dialog;
- });
- //# sourceMappingURL=SourceMemberPropertiesDialog.js.map
|