EssbaseConnectionStringPane.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. "use strict";
  2. /**
  3. * Licensed Materials - Property of IBM
  4. * IBM Cognos Products: Cognos Analytics
  5. * Copyright IBM Corp. 2017
  6. * US Government Users Restricted Rights - Use, duplication or disclosure
  7. * restricted by GSA ADP Schedule Contract with IBM Corp.
  8. */
  9. define(['bi/admin/datasource/slideout/ConnectionStringEditorPane', 'bi/admin/nls/StringResource'], function (ConnectionStringEditorPane, StringResource) {
  10. var EssbaseConnectionStringPane = ConnectionStringEditorPane.extend({
  11. init: function init(options) {
  12. EssbaseConnectionStringPane.inherited('init', this, arguments);
  13. $.extend(this, options);
  14. },
  15. renderBody: function renderBody($body) {
  16. var items = [{
  17. 'name': 'serverUrl',
  18. 'label': StringResource.get('serverUrl'),
  19. 'value': this.parseInfo.serverUrl,
  20. 'type': 'TextArea',
  21. 'multiline': true,
  22. 'ellipses': true,
  23. 'editable': this.isEditable(),
  24. 'onChange': function (name, value) {
  25. this.parseInfo.serverUrl = value;
  26. }.bind(this)
  27. }];
  28. return this._renderBody({
  29. 'el': this.$el.find(".bi-admin-pane-body"),
  30. 'glassContext': this.glassContext,
  31. 'name': 'EssbaseConnectionSettings',
  32. 'items': items
  33. });
  34. },
  35. setFocus: function setFocus() {
  36. $('textarea.v_serverUrl').focus();
  37. }
  38. });
  39. return EssbaseConnectionStringPane;
  40. });