1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- "use strict";
- /**
- * Licensed Materials - Property of IBM
- * IBM Cognos Products: admin
- * Copyright IBM Corp. 2015, 2017
- * US Government Users Restricted Rights -
- * Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- */
- define(['react', 'react-dom', 'ba-react-admin/ba-react-admin.min', 'bi/admin/common/slideout/BasePane', 'jquery', 'bi/admin/datasource/App', 'bi/admin/nls/StringResource', 'bi/commons/utils/Utils', 'bi/admin/common/utils/CapabilityHelper'], function (React, ReactDOM, AdminReact, BasePane, $, App, StringResource, Utils, CapabilityHelper) {
- /**
- * Sample content view that extends the glass AdminPane class
- *
- */
- var AdminConsolePane = BasePane.extend({
- init: function init(options) {
- AdminConsolePane.inherited('init', this, arguments);
- $.extend(this, options);
- App.glassContext = this.glassContext;
- CapabilityHelper.glassContext = this.glassContext;
- },
- _getViewWidth: function _getViewWidth(wide) {
- var width = 450;
- if (wide) {
- width = $(window).width() < 1370 ? 576 : 900;
- }
- return width;
- },
- setFocus: function setFocus() {
- this.$el.find('.list-item').filter(':visible:first').focus();
- },
- _createReactChild: function _createReactChild(rEl, props, children) {
- return React.createElement(rEl, props, children);
- },
- _renderReact: function _renderReact(element, root) {
- ReactDOM.render(element, root);
- },
- renderBody: function renderBody($body) {
- //NOSONAR
- $body.addClass("bi-admin-entrance-pane");
- var adminConPane = React.createElement(AdminReact.AdminConsolePanel, {
- glassContext: this.glassContext,
- StringResource: StringResource,
- parent: this
- });
- ReactDOM.render(adminConPane, $body[0]);
- return Promise.resolve();
- }
- });
- return AdminConsolePane;
- });
|