X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FUI.git;a=blobdiff_plain;f=skyquake%2Fplugins%2Fcomposer%2Fsrc%2Fsrc%2Fcomponents%2FComposerApp.js;h=b5cfa75288cfd00542a65c14ff9a2bbace54fe4a;hp=9e6daa4b4bbe2b45ca556a46d2a6085b0e9daa15;hb=b06607173b5bafa999594cdc1e60a825f578e8e6;hpb=3b6a64f8e61794b1283d707e60c2b698c988d3fb diff --git a/skyquake/plugins/composer/src/src/components/ComposerApp.js b/skyquake/plugins/composer/src/src/components/ComposerApp.js index 9e6daa4b4..b5cfa7528 100644 --- a/skyquake/plugins/composer/src/src/components/ComposerApp.js +++ b/skyquake/plugins/composer/src/src/components/ComposerApp.js @@ -1,5 +1,5 @@ /* - * + * * Copyright 2016 RIFT.IO Inc * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -47,11 +47,12 @@ import CatalogDataStore from '../stores/CatalogDataStore' import TooltipManager from '../libraries/TooltipManager' import CatalogItemsActions from '../actions/CatalogItemsActions' import CommonUtils from 'utils/utils.js' - +import FileManagerActions from './filemanager/FileManagerActions'; import 'normalize.css' import '../styles/AppRoot.scss' import 'style/layout.scss' + const resizeManager = new ResizableManager(window); const clearLocalStorage = utils.getSearchParams(window.location).hasOwnProperty('clearLocalStorage'); @@ -59,6 +60,7 @@ const clearLocalStorage = utils.getSearchParams(window.location).hasOwnProperty( const preventDefault = e => e.preventDefault(); const clearDragState = () => ComposerAppActions.setDragState(null); + const ComposerApp = React.createClass({ mixins: [PureRenderMixin], getInitialState() { @@ -71,6 +73,9 @@ const ComposerApp = React.createClass({ if (clearLocalStorage) { window.localStorage.clear(); } + if(this.item) { + FileManagerActions.openFileManagerSockets(); + } this.state.isLoading = CatalogDataStore.getState().isLoading; ComposerAppStore.listen(this.onChange); CatalogDataStore.listen(this.onCatalogDataChanged); @@ -88,6 +93,7 @@ const ComposerApp = React.createClass({ window.removeEventListener('dragover', preventDefault); window.removeEventListener('drop', preventDefault); window.removeEventListener('drop', clearDragState); + FileManagerActions.closeFileManagerSockets(); // resizeManager automatically registered its event handlers resizeManager.removeAllEventListeners(); ComposerAppStore.unlisten(this.onChange); @@ -178,14 +184,17 @@ const ComposerApp = React.createClass({ const hasNoCatalogs = CatalogDataStore.getState().catalogs.length === 0; const isLoading = self.state.isLoading; + //Bridge element for Crouton fix. Should eventually put Composer on same flux context + const Bridge = this.state.ComponentBridgeElement; + html = (
+ {AppHeader} -
- + { + (self.state.panelTabShown == 'descriptor') ? + + : null + } + event.stopPropagation()}/> + onClick={event => event.stopPropagation()} + panelTabShown={self.state.panelTabShown}/>