"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 = $('
' + StringResource.get('learnMore') + '
'); $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; });