1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- "use strict";
- /**
- * Licensed Materials - Property of IBM
- * IBM Cognos Products: Cognos Analytics
- * Copyright IBM Corp. 2017
- * US Government Users Restricted Rights - Use, duplication or disclosure
- * restricted by GSA ADP Schedule Contract with IBM Corp.
- */
- define(['bi/admin/datasource/slideout/ConnectionStringEditorPane', 'bi/admin/nls/StringResource', 'jquery'], function (ConnectionStringEditorPane, StringResource, $) {
- var ExtCatalogConnectionStringPane = ConnectionStringEditorPane.extend({
- _helpLink: 'https://www.ibm.com/support/knowledgecenter/SSEP7J_11.1.0/com.ibm.swg.ba.cognos.ag_manage.doc/c_manage_wkc.html',
- init: function init(options) {
- ExtCatalogConnectionStringPane.inherited('init', this, arguments);
- $.extend(this, options);
- },
- renderBody: function renderBody($body) {
- var items = [{
- 'id': 'adminJdbcUrl',
- 'name': 'jdbcUrl',
- 'label': StringResource.get('serverUrl'),
- 'value': this.parseInfo.serverUrl,
- 'type': 'TextArea',
- 'multiline': true,
- 'ellipses': true,
- 'editable': this.isEditable(),
- 'onChange': function (name, value) {
- this.parseInfo.serverUrl = value;
- }.bind(this)
- }, {
- 'id': 'adminConnectionParameters',
- 'name': 'connectionParameters',
- 'label': StringResource.get('connectionParameters'),
- 'type': 'TextArea',
- 'multiline': true,
- 'editable': this.isEditable(),
- 'onChange': function (name, value) {
- this.parseInfo.connectionProperties = value;
- }.bind(this),
- 'value': this.parseInfo.connectionProperties
- }];
- return this._renderBody({
- 'el': this.$el.find(".bi-admin-pane-body"),
- 'glassContext': this.glassContext,
- 'name': 'ExtCatalogConnectionSettings',
- 'items': items
- });
- },
- _addHelp: function _addHelp() {
- var $help = $(this.$el.find('.l_jdbcUrl'));
- $help.css('display', 'inline-flex');
- var $helpEl = $('<div tabindex="0" style="padding-left: 10px;" role="img" title="' + StringResource.get('learnMore') + '"><svg style="fill: #4178BE" class="svgIcon" role="presentation"><text>' + StringResource.get('learnMore') + '</text><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#common-titan_help"></use></svg></div>');
- $helpEl.on('primaryaction', function () {
- window.open(this._helpLink, '_blank');
- }.bind(this));
- $help.append($helpEl);
- },
- _postRender: function _postRender() {
- this._addHelp();
- return this.$el;
- },
- setFocus: function setFocus() {
- $('textarea.v_serverUrl').focus();
- }
- });
- return ExtCatalogConnectionStringPane;
- });
|