From 100a595dcaeec903548e821251fbb44dcef49473 Mon Sep 17 00:00:00 2001 From: Mauro Bartolomeoli Date: Fri, 17 Feb 2017 12:18:21 +0100 Subject: [PATCH 1/2] Fixes #1484: cleanup of plugins configuration --- .../TOC/background/BackgroundSwitcher.jsx | 8 +- .../buttons/ZoomToMaxExtentButton.jsx | 3 +- web/client/components/catalog/Catalog.jsx | 4 +- .../components/data/identify/Identify.jsx | 20 +- web/client/components/help/HelpTextPanel.jsx | 4 +- .../mapcontrols/Snapshot/SnapshotPanel.jsx | 6 +- .../mapcontrols/locate/LocateBtn.jsx | 5 +- .../mapcontrols/measure/MeasureComponent.jsx | 5 +- .../mapcontrols/measure/MeasureResults.jsx | 4 +- .../navigationhistory/RedoButton.jsx | 7 +- .../navigationhistory/UndoButton.jsx | 7 +- .../spinners/GlobalSpinner/GlobalSpinner.jsx | 2 +- web/client/components/security/UserMenu.jsx | 22 +- web/client/components/share/SharePanel.jsx | 3 +- web/client/containers/Page.jsx | 10 +- .../examples/3dviewer/containers/Viewer.jsx | 10 +- .../components/mouseposition.css | 2 +- .../examples/plugins/assets/css/plugins.css | 4 + .../plugins/components/PluginConfigurator.jsx | 6 +- .../plugins/components/PluginCreator.jsx | 4 +- .../plugins/components/SaveAndLoad.jsx | 4 +- web/client/examples/plugins/index.html | 3 + web/client/examples/plugins/plugins.js | 4 + .../examples/queryform/actions/query.js | 4 +- web/client/localConfig.json | 615 ++---------------- web/client/plugins/BackgroundSwitcher.jsx | 5 +- web/client/plugins/DrawerMenu.jsx | 8 +- web/client/plugins/Identify.jsx | 2 +- web/client/plugins/Map.jsx | 10 +- web/client/plugins/Measure.jsx | 4 + web/client/plugins/MetadataExplorer.jsx | 8 +- web/client/plugins/Print.jsx | 22 +- web/client/plugins/Settings.jsx | 7 +- web/client/plugins/TOC.jsx | 13 +- web/client/plugins/Toolbar.jsx | 11 +- .../plugins/containers/ToolsContainer.jsx | 15 +- web/client/plugins/manager/GroupManager.jsx | 1 + web/client/plugins/manager/Manager.jsx | 5 +- web/client/plugins/manager/ManagerMenu.jsx | 6 +- web/client/plugins/manager/UserManager.jsx | 1 + web/client/plugins/shapefile/ShapeFile.jsx | 6 +- .../product/components/viewer/about/About.jsx | 5 +- web/client/product/pages/Manager.jsx | 4 +- web/client/product/pages/Maps.jsx | 4 +- web/client/product/plugins/About.jsx | 13 +- web/client/product/plugins/Attribution.jsx | 3 +- 46 files changed, 239 insertions(+), 680 deletions(-) diff --git a/web/client/components/TOC/background/BackgroundSwitcher.jsx b/web/client/components/TOC/background/BackgroundSwitcher.jsx index 3b2aca9908..b6275759a0 100644 --- a/web/client/components/TOC/background/BackgroundSwitcher.jsx +++ b/web/client/components/TOC/background/BackgroundSwitcher.jsx @@ -62,11 +62,11 @@ let BackgroundSwitcher = React.createClass({ return { id: "background-switcher", icon: , - fluid: false, + fluid: true, columnProperties: { - xs: 6, - sm: 4, - md: 2 + xs: 12, + sm: 12, + md: 12 } }; }, diff --git a/web/client/components/buttons/ZoomToMaxExtentButton.jsx b/web/client/components/buttons/ZoomToMaxExtentButton.jsx index f095de0844..46b411a541 100644 --- a/web/client/components/buttons/ZoomToMaxExtentButton.jsx +++ b/web/client/components/buttons/ZoomToMaxExtentButton.jsx @@ -51,7 +51,8 @@ var ZoomToMaxExtentButton = React.createClass({ btnType: 'normal', useInitialExtent: false, tooltipPlace: "left", - bsStyle: "default" + bsStyle: "default", + className: "square-button" }; }, render() { diff --git a/web/client/components/catalog/Catalog.jsx b/web/client/components/catalog/Catalog.jsx index 73933c3415..2f917dffdc 100644 --- a/web/client/components/catalog/Catalog.jsx +++ b/web/client/components/catalog/Catalog.jsx @@ -20,7 +20,7 @@ const Catalog = React.createClass({ active: React.PropTypes.bool, formats: React.PropTypes.array, format: React.PropTypes.string, - searchOnStarup: React.PropTypes.bool, + searchOnStartup: React.PropTypes.bool, onSearch: React.PropTypes.func, onReset: React.PropTypes.func, onChangeFormat: React.PropTypes.func, @@ -77,7 +77,7 @@ const Catalog = React.createClass({ }; }, componentDidMount() { - if (this.props.searchOnStarup) { + if (this.props.searchOnStartup) { this.props.onSearch(this.props.format, this.getCatalogUrl(), 1, this.props.pageSize, ""); } }, diff --git a/web/client/components/data/identify/Identify.jsx b/web/client/components/data/identify/Identify.jsx index 5d6309dabb..5eacceb77a 100644 --- a/web/client/components/data/identify/Identify.jsx +++ b/web/client/components/data/identify/Identify.jsx @@ -81,10 +81,13 @@ const Identify = React.createClass({ changeMousePointer: () => {}, showRevGeocode: () => {}, hideRevGeocode: () => {}, + containerProps: { + continuous: false + }, showModalReverse: false, reverseGeocodeData: {}, - enableRevGeocode: false, - wrapRevGeocode: true, + enableRevGeocode: true, + wrapRevGeocode: false, queryableLayersFilter: MapInfoUtils.defaultQueryableFilter, style: { position: "absolute", @@ -105,12 +108,13 @@ const Identify = React.createClass({ "filter", "propertyName" ], - panelClassName: "panel default-panel", - headerClassName: "panel-heading", - bodyClassName: "panel-body", - asPanel: true, - headerGlyph: "info-sign", - closeGlyph: "", + panelClassName: "modal-dialog info-panel modal-content", + headerClassName: "modal-header", + bodyClassName: "modal-body info-wrap", + asPanel: false, + headerGlyph: "", + closeGlyph: "1-close", + className: "square-button", allowMultiselection: false }; }, diff --git a/web/client/components/help/HelpTextPanel.jsx b/web/client/components/help/HelpTextPanel.jsx index 127b402f9a..04e7a484b7 100644 --- a/web/client/components/help/HelpTextPanel.jsx +++ b/web/client/components/help/HelpTextPanel.jsx @@ -39,8 +39,8 @@ const HelpTextPanel = React.createClass({ isVisible: false, title: 'HELP', onClose: () => {}, - asPanel: true, - closeGlyph: "" + asPanel: false, + closeGlyph: "1-close" }; }, render() { diff --git a/web/client/components/mapcontrols/Snapshot/SnapshotPanel.jsx b/web/client/components/mapcontrols/Snapshot/SnapshotPanel.jsx index eaafcb993c..da315031d3 100644 --- a/web/client/components/mapcontrols/Snapshot/SnapshotPanel.jsx +++ b/web/client/components/mapcontrols/Snapshot/SnapshotPanel.jsx @@ -83,7 +83,7 @@ let SnapshotPanel = React.createClass({ timeout: 1000, mapType: 'leaflet', wrap: false, - wrapWithPanel: true, + wrapWithPanel: false, panelStyle: { minWidth: "720px", zIndex: 100, @@ -93,8 +93,8 @@ let SnapshotPanel = React.createClass({ right: "100px" }, panelClassName: "snapshot-panel", - closeGlyph: "", - buttonStyle: "default" + closeGlyph: "1-close", + buttonStyle: "primary" }; }, shouldComponentUpdate(nextProps) { diff --git a/web/client/components/mapcontrols/locate/LocateBtn.jsx b/web/client/components/mapcontrols/locate/LocateBtn.jsx index c86505cc1d..63e6031969 100644 --- a/web/client/components/mapcontrols/locate/LocateBtn.jsx +++ b/web/client/components/mapcontrols/locate/LocateBtn.jsx @@ -34,7 +34,10 @@ const LocateBtn = React.createClass({ locate: "DISABLED", tooltipPlace: "left", bsStyle: "default", - glyph: "screenshot" + glyph: "1-position-1", + btnConfig: { + className: "square-button" + } }; }, onClick() { diff --git a/web/client/components/mapcontrols/measure/MeasureComponent.jsx b/web/client/components/mapcontrols/measure/MeasureComponent.jsx index af81d884e8..fdb186b33e 100644 --- a/web/client/components/mapcontrols/measure/MeasureComponent.jsx +++ b/web/client/components/mapcontrols/measure/MeasureComponent.jsx @@ -77,8 +77,11 @@ const MeasureComponent = React.createClass({ area: {unit: 'sqm', label: 'm²'} }, showResults: true, - useButtonGroup: true, + useButtonGroup: false, withReset: false, + lineGlyph: "1-measure-lenght", + areaGlyph: "1-measure-area", + bearingGlyph: "1-bearing", formatLength: (uom, value) => measureUtils.getFormattedLength(uom, value), formatArea: (uom, value) => measureUtils.getFormattedArea(uom, value), formatBearing: (value) => measureUtils.getFormattedBearingValue(round(value || 0, 6)) diff --git a/web/client/components/mapcontrols/measure/MeasureResults.jsx b/web/client/components/mapcontrols/measure/MeasureResults.jsx index 3bdeedd09e..750a86ee49 100644 --- a/web/client/components/mapcontrols/measure/MeasureResults.jsx +++ b/web/client/components/mapcontrols/measure/MeasureResults.jsx @@ -72,8 +72,8 @@ const MeasureResults = React.createClass({ overflow: "auto" }, panelClassName: "drawer-menu-panel", - withPanelAsContainer: true, - closeGlyph: "" + withPanelAsContainer: false, + closeGlyph: "1-close" }; }, shouldComponentUpdate(nextProps) { diff --git a/web/client/components/mapcontrols/navigationhistory/RedoButton.jsx b/web/client/components/mapcontrols/navigationhistory/RedoButton.jsx index 80e4a1e250..b78b2b3b85 100644 --- a/web/client/components/mapcontrols/navigationhistory/RedoButton.jsx +++ b/web/client/components/mapcontrols/navigationhistory/RedoButton.jsx @@ -28,8 +28,11 @@ var RedoBtn = React.createClass({ id: "redo-btn", onClick: () => {}, tooltipPlace: "left", - glyph: "step-forward", - buttonStyle: "default" + glyph: "1-screen-forward", + buttonStyle: "primary", + btnConfig: { + className: "square-button" + } }; }, onClick() { diff --git a/web/client/components/mapcontrols/navigationhistory/UndoButton.jsx b/web/client/components/mapcontrols/navigationhistory/UndoButton.jsx index effb2bd509..1623f46ae5 100644 --- a/web/client/components/mapcontrols/navigationhistory/UndoButton.jsx +++ b/web/client/components/mapcontrols/navigationhistory/UndoButton.jsx @@ -28,8 +28,11 @@ var UndoBtn = React.createClass({ id: "undo-btn", onClick: () => {}, tooltipPlace: "left", - glyph: "step-backward", - buttonStyle: "default" + glyph: "1-screen-backward", + buttonStyle: "primary", + btnConfig: { + className: "square-button" + } }; }, onClick() { diff --git a/web/client/components/misc/spinners/GlobalSpinner/GlobalSpinner.jsx b/web/client/components/misc/spinners/GlobalSpinner/GlobalSpinner.jsx index 4aff0b587a..932d1a7073 100644 --- a/web/client/components/misc/spinners/GlobalSpinner/GlobalSpinner.jsx +++ b/web/client/components/misc/spinners/GlobalSpinner/GlobalSpinner.jsx @@ -20,7 +20,7 @@ const GlobalSpinner = React.createClass({ return { id: "mapstore-globalspinner", loading: false, - className: "mapstore-globalspinner", + className: "ms2-loading", spinner: "circle" }; }, diff --git a/web/client/components/security/UserMenu.jsx b/web/client/components/security/UserMenu.jsx index 93316baaa6..67203b913d 100644 --- a/web/client/components/security/UserMenu.jsx +++ b/web/client/components/security/UserMenu.jsx @@ -53,9 +53,29 @@ const UserMenu = React.createClass({ displayAttributes: (attr) => { return attr.name === "email"; }, - className: "user-menu" + className: "user-menu", + menuProps: { + noCaret: true + }, + toolsCfg: [{ + buttonSize: "small", + includeCloseButton: false, + useModal: false, + closeGlyph: "1-close" + }, { + buttonSize: "small", + includeCloseButton: false, + useModal: false, + closeGlyph: "1-close" + }, { + buttonSize: "small", + includeCloseButton: false, + useModal: false, + closeGlyph: "1-close" + }] }; }, + renderGuestTools() { let DropDown = this.props.nav ? NavDropdown : DropdownButton; return ( diff --git a/web/client/components/share/SharePanel.jsx b/web/client/components/share/SharePanel.jsx index febdb23df4..dee067d788 100644 --- a/web/client/components/share/SharePanel.jsx +++ b/web/client/components/share/SharePanel.jsx @@ -37,7 +37,8 @@ let SharePanel = React.createClass({ getDefaultProps() { return { title: , - onClose: () => {} + onClose: () => {}, + closeGlyph: "1-close" }; }, render() { diff --git a/web/client/containers/Page.jsx b/web/client/containers/Page.jsx index 1f969ddaab..f6b270d7ea 100644 --- a/web/client/containers/Page.jsx +++ b/web/client/containers/Page.jsx @@ -47,20 +47,14 @@ const Page = React.createClass({ }, render() { let pluginsConfig = { - desktop: [...(this.props.pagePluginsConfig.desktop).filter((tool) => !this.isBottom(tool)), ...this.props.pluginsConfig.desktop, ...(this.props.pagePluginsConfig.desktop).filter(this.isBottom)], - mobile: [...(this.props.pagePluginsConfig.mobile).filter((tool) => !this.isBottom(tool)), ...this.props.pluginsConfig.mobile, ...(this.props.pagePluginsConfig.desktop).filter(this.isBottom)] + desktop: [...this.props.pagePluginsConfig.desktop, ...this.props.pluginsConfig.desktop], + mobile: [...this.props.pagePluginsConfig.mobile, ...this.props.pluginsConfig.mobile] }; return (); - }, - isBottom(tool) { - if ( tool.cfg ) { - return tool.cfg.bottom; - } - return false; } }); diff --git a/web/client/examples/3dviewer/containers/Viewer.jsx b/web/client/examples/3dviewer/containers/Viewer.jsx index ab87e4ac84..aa5d00b831 100644 --- a/web/client/examples/3dviewer/containers/Viewer.jsx +++ b/web/client/examples/3dviewer/containers/Viewer.jsx @@ -9,7 +9,7 @@ const MousePosition = require("../../../components/mapcontrols/mouseposition/Mou const {changeMapView} = require('../../../actions/map'); const {changeMousePosition} = require('../../../actions/mousePosition'); -const {textSearch, resultsPurge} = require("../../../actions/search"); +const {textSearch, resultsPurge, searchTextChanged} = require("../../../actions/search"); const {toggleGraticule, updateMarker} = require('../actions/controls'); const Localized = require('../../../components/I18N/Localized'); @@ -22,6 +22,7 @@ const Viewer = React.createClass({ // redux store dispatch func dispatch: React.PropTypes.func, textSearch: React.PropTypes.func, + searchTextChanged: React.PropTypes.func, resultsPurge: React.PropTypes.func, changeMapView: React.PropTypes.func, changeMousePosition: React.PropTypes.func, @@ -34,7 +35,8 @@ const Viewer = React.createClass({ searchResults: React.PropTypes.array, mapStateSource: React.PropTypes.string, showGraticule: React.PropTypes.bool, - marker: React.PropTypes.object + marker: React.PropTypes.object, + searchText: React.PropTypes.string }, onSearchClick: function(center) { this.props.updateMarker({lng: center.x, lat: center.y}); @@ -79,7 +81,7 @@ const Viewer = React.createClass({ }}> - + { locale: state.locale ? state.locale.current : null, localeError: state.locale && state.locale.loadingError ? state.locale.loadingError : undefined, searchResults: state.searchResults && state.searchResults.results ? state.searchResults.results : null, + searchText: state.searchResults && state.searchResults.searchText, mousePosition: state.mousePosition && state.mousePosition.position || null, showGraticule: state.controls && state.controls.graticule || false, marker: state.controls && state.controls.marker || null }; }, { textSearch, + searchTextChanged, resultsPurge, changeMapView, changeMousePosition, diff --git a/web/client/examples/mouseposition/components/mouseposition.css b/web/client/examples/mouseposition/components/mouseposition.css index 76ce963e25..258978abae 100644 --- a/web/client/examples/mouseposition/components/mouseposition.css +++ b/web/client/examples/mouseposition/components/mouseposition.css @@ -39,7 +39,7 @@ text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; - height: 30px; + height: 53px; font-size: 1.5em; } #wgs84 .label-info { diff --git a/web/client/examples/plugins/assets/css/plugins.css b/web/client/examples/plugins/assets/css/plugins.css index 57ccb42b79..2332f90ebe 100644 --- a/web/client/examples/plugins/assets/css/plugins.css +++ b/web/client/examples/plugins/assets/css/plugins.css @@ -72,3 +72,7 @@ html, body, #container, #map { .fade.in.modal { z-index: 10000; } + +.checkbox { + padding-left: 5px; +} diff --git a/web/client/examples/plugins/components/PluginConfigurator.jsx b/web/client/examples/plugins/components/PluginConfigurator.jsx index 39b5b17cde..3cdb7850a7 100644 --- a/web/client/examples/plugins/components/PluginConfigurator.jsx +++ b/web/client/examples/plugins/components/PluginConfigurator.jsx @@ -67,13 +67,13 @@ const PluginConfigurator = React.createClass({ mode: {name: "javascript", json: true}, lineNumbers: true }}/>, - , - + , + ] : null; }, render() { return (
  • - + - + - +
    {this.props.error}
    diff --git a/web/client/examples/plugins/components/SaveAndLoad.jsx b/web/client/examples/plugins/components/SaveAndLoad.jsx index b9f26174f4..e0505e4d56 100644 --- a/web/client/examples/plugins/components/SaveAndLoad.jsx +++ b/web/client/examples/plugins/components/SaveAndLoad.jsx @@ -39,9 +39,9 @@ const SaveButton = React.createClass({ }, render() { return (
    - + - + {this.renderSaved()} diff --git a/web/client/examples/plugins/index.html b/web/client/examples/plugins/index.html index 7654ee48f5..6dbc40934f 100644 --- a/web/client/examples/plugins/index.html +++ b/web/client/examples/plugins/index.html @@ -8,6 +8,9 @@ + + + diff --git a/web/client/examples/plugins/plugins.js b/web/client/examples/plugins/plugins.js index 316b3d22fa..6bc8c20d50 100644 --- a/web/client/examples/plugins/plugins.js +++ b/web/client/examples/plugins/plugins.js @@ -23,16 +23,20 @@ module.exports = { LocatePlugin: require('../../plugins/Locate'), IdentifyPlugin: require('../../plugins/Identify'), TOCPlugin: require('../../plugins/TOC'), + FeatureGridPlugin: require('../../plugins/FeatureGrid'), RasterStylerPlugin: require('../../plugins/RasterStyler'), BackgroundSwitcherPlugin: require('../../plugins/BackgroundSwitcher'), MeasurePlugin: require('../../plugins/Measure'), + MeasureResultsPlugin: require('../../plugins/MeasureResults'), PrintPlugin: require('../../plugins/Print'), SnapshotPlugin: require('../../plugins/Snapshot'), ShapeFilePlugin: require('../../plugins/ShapeFile'), MetadataExplorerPlugin: require('../../plugins/MetadataExplorer'), SettingsPlugin: require('../../plugins/Settings'), + TutorialPlugin: require('../../plugins/Tutorial'), ExpanderPlugin: require('../../plugins/Expander'), HelpPlugin: require('../../plugins/Help'), + SharePlugin: require('../../plugins/Share'), HomePlugin: require('../../plugins/Home'), LoginPlugin: require('../../plugins/Login') }, diff --git a/web/client/examples/queryform/actions/query.js b/web/client/examples/queryform/actions/query.js index b913f52ab9..8a1e87709f 100644 --- a/web/client/examples/queryform/actions/query.js +++ b/web/client/examples/queryform/actions/query.js @@ -14,6 +14,7 @@ const QUERY_ERROR = 'QUERY_ERROR'; const RESET_QUERY = 'RESET_QUERY'; const axios = require('../../../libs/ajax'); +const FilterUtils = require('../../../utils/FilterUtils'); function featureTypeLoaded(typeName, featureType) { return { @@ -102,8 +103,9 @@ function loadFeature(baseUrl, typeName) { } function query(seachURL, data) { + const ogcQuery = FilterUtils.toOGCFilter(data.featureTypeName, data, data.ogcVersion, data.sortOptions, data.hits); return (dispatch) => { - return axios.post(seachURL + '&outputFormat=json', data, { + return axios.post(seachURL + '&outputFormat=json', ogcQuery, { timeout: 60000, headers: {'Accept': 'application/json', 'Content-Type': 'application/json'} }).then((response) => { diff --git a/web/client/localConfig.json b/web/client/localConfig.json index 979ffc1030..b09607f474 100644 --- a/web/client/localConfig.json +++ b/web/client/localConfig.json @@ -21,32 +21,13 @@ { "name": "Map", "cfg": { - "zoomControl": false, "tools": ["locate"] } - }, - { - "name": "DrawerMenu", - "cfg": { - "glyph": "1-stilo", - "buttonStyle": "primary", - "buttonClassName": "square-button", - "singleSection": true - } - }, + }, "DrawerMenu", { "name": "Identify", "showIn": ["Settings"], "cfg": { - "enableRevGeocode": true, - "wrapRevGeocode": false, - "panelClassName": "modal-dialog info-panel modal-content", - "headerClassName": "modal-header", - "bodyClassName": "modal-body info-wrap", - "headerGlyph": "", - "glyph": "map-marker", - "className": "square-button", - "closeGlyph": "1-close", "style": { "position": "absolute", "width": "100%", @@ -67,81 +48,22 @@ }, { "name": "Locate", - "cfg": { - "glyph": "1-position-1", - "btnConfig": { - "className": "square-button" - } - }, "override": { "Toolbar": { "alwaysVisible": true } } - }, { - "name": "Home" - }, { - "name": "TOC", - "cfg": { - "visibilityCheckType": "glyph", - "settingsOptions": { - "includeCloseButton": false, - "closeGlyph": "1-close", - "asModal": false, - "buttonSize": "small" - } - }, - "override": { - "DrawerMenu": { - "glyph": "1-layer", - "buttonConfig": { - "buttonClassName": "square-button no-border" - } - } - } - }, { + }, "Home", "TOC", { "name": "Tutorial", "cfg": { "preset": "mapMobile" } - }, { - "name": "BackgroundSwitcher", - "cfg": { - "fluid": true, - "columnProperties": { - "xs": 12, - "sm": 12, - "md": 12 - } - }, - "override": { - "DrawerMenu": { - "glyph": "1-map", - "buttonConfig": { - "buttonClassName": "square-button no-border" - } - } - } - }, { - "name": "Settings", - "cfg": { - "wrapWithPanel": false, - "closeGlyph": "1-close", - "overrideSettings": { - "history": false - }, - "wrap": true - } - }, { - "name": "About", - "hideFrom": "DrawerMenu", - "cfg": { - "modalConfig": { - "useModal": false, - "closeGlyph": "1-close" - } + }, "BackgroundSwitcher", { + "name": "Settings", + "cfg": { + "wrap": true } - }, + }, "About", { "name": "MousePosition", "cfg": { @@ -156,9 +78,7 @@ }, { "name": "Toolbar", "id": "NavigationBar", - "stateSelector": "toolbar", "cfg": { - "buttonStyle": "primary", "id": "navigationBar" } }, { @@ -166,281 +86,68 @@ "id": "IdentifyBar", "stateSelector": "identify", "cfg": { - "buttonStyle": "primary", - "pressedButtonStyle": "success", "id": "identifyBar" }, "isDefault": false - }, - { - "name": "ZoomAll", - "hide": true, - "cfg":{ - "className": "square-button" - } - }, + }, "ZoomAll", { "name": "MapLoading", - "hide": true, - "cfg": { - "className": "ms2-loading" - }, "override": { "Toolbar": { "alwaysVisible": true } } - }, { - "name": "Login", - "hide": true, - "cfg": { - "nav": false, - "menuProps": { - "noCaret": true - }, - "toolsCfg": [{ - "buttonSize": "small", - "includeCloseButton": false, - "useModal": false, - "closeGlyph": "1-close" - }, { - "buttonSize": "small", - "includeCloseButton": false, - "useModal": false, - "closeGlyph": "1-close" - }, { - "buttonSize": "small", - "includeCloseButton": false, - "useModal": false, - "closeGlyph": "1-close" - }] - } - }, - "OmniBar", - "FeatureGrid", - { - "name": "BurgerMenu", - "hide": true - }, { - "name": "Expander", - "hide": true, - "cfg":{ - "className": "square-button" - } - } + }, "Login", + "OmniBar", "BurgerMenu", "Expander" ], - "desktop": [{ - "name": "Map", - "cfg": { - "tools": ["measurement", "locate", "overview", "scalebar", "draw", "highlight"], - "toolsOptions": { - "scalebar": { - "leaflet": { - "position": "bottomright" - } - } - }, - "zoomControl": false - } - }, { - "name": "Help", - "cfg": { - "asPanel": false, - "closeGlyph": "1-close" - } - }, { - "name" : "Share", - "cfg": { - "closeGlyph" : "1-close" - } - }, { - "name": "DrawerMenu", - "cfg": { - "glyph": "1-stilo", - "buttonStyle": "primary", - "buttonClassName": "square-button", - "singleSection": true - } - }, + "desktop": ["Map", "Help", "Share", "DrawerMenu", { "name": "Identify", "showIn": ["IdentifyBar", "Settings"], "cfg": { - "panelClassName": "modal-dialog info-panel modal-content", - "headerClassName": "modal-header", - "bodyClassName": "modal-body info-wrap", - "asPanel": false, - "headerGlyph": "", - "glyph": "map-marker", - "className": "square-button", - "closeGlyph": "1-close", - "wrapRevGeocode": false, - "enableRevGeocode": true, "viewerOptions": { - "container": "{context.ReactSwipe}", - "header": "{context.SwipeHeader}", - "headerOptions": { - "useButtons": true - }, - "containerProps": { - "continuous": false - }, - "collapsible": false + "container": "{context.ReactSwipe}", + "header": "{context.SwipeHeader}", + "headerOptions": { + "useButtons": true + } } } }, "MadeWithLove", { "name": "Locate", - "cfg": { - "glyph": "1-position-1", - "btnConfig": { - "className": "square-button" - } - }, "override": { "Toolbar": { "alwaysVisible": true } } - }, { - "name": "Home" - },{ - "name": "FeatureGrid", - "cfg": { - "pagination": true, - "minDockSize": 0.1, - "maxDockSize":1.0 - } - }, { + }, "Home", "FeatureGrid", { "name": "TOC", "cfg": { - "activateQueryTool": true, - "visibilityCheckType": "glyph", - "settingsOptions": { - "includeCloseButton": false, - "closeGlyph": "1-close", - "asModal": false, - "buttonSize": "small" - } - }, - "override": { - "DrawerMenu": { - "glyph": "1-layer", - "buttonConfig": { - "buttonClassName": "square-button no-border" - } - } - } - }, { - "name": "Tutorial" - }, { - "name": "BackgroundSwitcher", - "cfg": { - "fluid": true, - "columnProperties": { - "xs": 12, - "sm": 12, - "md": 12 - } - }, - "override": { - "DrawerMenu": { - "glyph": "1-map", - "buttonConfig": { - "buttonClassName": "square-button no-border" - } - } + "activateQueryTool": true } - }, { + }, "Tutorial", "BackgroundSwitcher", { "name": "Measure", - "cfg":{ - "showResults": false, - "lineGlyph": "1-measure-lenght", - "areaGlyph": "1-measure-area", - "bearingGlyph": "1-bearing", - "useButtonGroup": false - }, - "override": { - "DrawerMenu": { - "glyph": "1-stilo", - "buttonConfig": { - "buttonClassName": "square-button no-border" - } - } - } - }, { - "name": "MeasureResults", - "cfg":{ - "closeGlyph": "1-close", - "withPanelAsContainer": false - } - }, { - "name": "Print", "cfg": { - "useFixedScales": false, - "syncMapPreview": true, - "mapPreviewOptions": { - "enableScalebox": false, - "enableRefresh": false - }, - "closeGlyph": "1-close", - "submitConfig": { - "buttonConfig": { - "bsSize": "small", - "bsStyle": "primary" - }, - "glyph": "" - }, - "previewOptions": { - "buttonStyle": "primary" - }, - "withPanelAsContainer": false - } - }, { - "name": "ShapeFile", - "cfg": { - "wrap": true, - "wrapWithPanel": false, - "closeGlyph": "1-close", - "buttonSize": "small" - } - }, { - "name": "Settings", - "hideFrom": ["Toolbar", "DrawerMenu"], - "cfg": { - "wrapWithPanel": false, - "closeGlyph": "1-close", - "overrideSettings": { - "history": false - }, - "wrap": true + "showResults": false } + }, "MeasureResults", "Print", "ShapeFile", { + "name": "Settings", + "cfg": { + "wrap": true + } }, { "name": "MetadataExplorer", "cfg": { - "showGetCapLinks": false, - "addAuthentication": false, "wrap": true, - "searchOnStarup": false, - "wrapWithPanel": false, - "closeGlyph": "1-close", "initialCatalogURL": { "csw": "http://demo.geo-solutions.it/geoserver/csw", "wms": "http://demo.geo-solutions.it/geoserver/wms", "wmts": "http://demo.geo-solutions.it/geoserver/gwc/service/wmts" } } - }, { - "name": "About", - "hideFrom": ["DrawerMenu"], - "cfg": { - "modalConfig": { - "useModal": false, - "closeGlyph": "1-close" - } - } - }, "MousePosition", { + }, "About", "MousePosition", { "name": "Search", "cfg": { "withToggle": ["max-width: 768px", "min-width: 768px"] @@ -448,9 +155,7 @@ }, { "name": "Toolbar", "id": "NavigationBar", - "stateSelector": "toolbar", "cfg": { - "buttonStyle": "primary", "id": "navigationBar" } }, { @@ -458,24 +163,13 @@ "id": "IdentifyBar", "stateSelector": "identify", "cfg": { - "buttonStyle": "primary", - "pressedButtonStyle": "success", "id": "identifyBar" }, "isDefault": false }, - "ScaleBox", - { - "name": "ZoomAll", - "cfg":{ - "className": "square-button" - } - }, + "ScaleBox", "ZoomAll", { "name": "MapLoading", - "cfg": { - "className": "ms2-loading" - }, "override": { "Toolbar": { "alwaysVisible": true @@ -485,10 +179,7 @@ { "name": "Snapshot", "cfg": { - "wrap": true, - "wrapWithPanel": false, - "closeGlyph": "1-close", - "buttonStyle": "primary" + "wrap": true } }, { @@ -507,100 +198,19 @@ } } }, - "OmniBar", - { - "name": "Login", - "cfg": { - "nav": false, - "menuProps": { - "noCaret": true - }, - "toolsCfg": [{ - "buttonSize": "small", - "includeCloseButton": false, - "useModal": false, - "closeGlyph": "1-close" - }, { - "buttonSize": "small", - "includeCloseButton": false, - "useModal": false, - "closeGlyph": "1-close" - }, { - "buttonSize": "small", - "includeCloseButton": false, - "useModal": false, - "closeGlyph": "1-close" - }] - } - }, - { - "name" : "Save", - "cfg": { - "closeGlyph" : "1-close" - } - },{ - "name" : "SaveAs", - "cfg": { - "closeGlyph" : "1-close" - } - }, - { - "name": "BurgerMenu" - }, { - "name": "Expander", - "cfg":{ - "className": "square-button" - } - }, { - "name": "Undo", - "cfg": { - "glyph": "1-screen-backward", - "buttonStyle": "primary", - "btnConfig": { - "className": "square-button" - } - } - }, { - "name": "Redo", - "cfg": { - "glyph": "1-screen-forward", - "buttonStyle": "primary", - "btnConfig": { - "className": "square-button" - } - } - }], + "OmniBar", "Login", "Save", "SaveAs", "BurgerMenu", "Expander", "Undo", "Redo" + ], "embedded": [ { "name": "Map", "cfg": { - "zoomControl": false, "tools": ["locate"] } - }, { - "name": "Help" - }, { - "name": "DrawerMenu", - "cfg": { - "glyph": "1-stilo", - "buttonStyle": "primary", - "buttonClassName": "square-button", - "singleSection": true - } - }, + }, "Help", "DrawerMenu", { "name": "Identify", "showIn": ["Settings"], "cfg": { - "enableRevGeocode": true, - "wrapRevGeocode": false, - "panelClassName": "modal-dialog info-panel modal-content", - "headerClassName": "modal-header", - "bodyClassName": "modal-body info-wrap", - "headerGlyph": "", - "glyph": "map-marker", - "className": "square-button", - "closeGlyph": "1-close", "style": { "position": "absolute", "width": "100%", @@ -621,81 +231,24 @@ }, { "name": "Locate", - "cfg": { - "glyph": "1-position-1", - "btnConfig": { - "className": "square-button" - } - }, "override": { "Toolbar": { "alwaysVisible": true } } - }, { - "name": "TOC", - "cfg": { - "visibilityCheckType": "glyph", - "settingsOptions": { - "includeCloseButton": false, - "closeGlyph": "1-close", - "asModal": false, - "buttonSize": "small" - } - }, - "override": { - "DrawerMenu": { - "glyph": "1-layer", - "buttonConfig": { - "buttonClassName": "square-button no-border" - } - } - } - }, { - "name": "BackgroundSwitcher", - "cfg": { - "fluid": true, - "columnProperties": { - "xs": 12, - "sm": 12, - "md": 12 - } - }, - "override": { - "DrawerMenu": { - "glyph": "1-map", - "buttonConfig": { - "buttonClassName": "square-button no-border" - } - } - } - }, { + }, "TOC", "BackgroundSwitcher", { "name": "Settings", "cfg": { - "wrapWithPanel": false, - "closeGlyph": "1-close", - "overrideSettings": { - "history": false - }, "wrap": true } - }, { - "name": "About", - "hideFrom": "DrawerMenu", - "cfg": { - "modalConfig": { - "useModal": false, - "closeGlyph": "1-close" - } - } - }, + }, "About", { "name": "MousePosition", "cfg": { "id": "mapstore-mouseposition-mobile" } }, - { + { "name": "Search", "cfg": { "withToggle": ["max-width: 768px", "min-width: 768px"] @@ -703,9 +256,7 @@ }, { "name": "Toolbar", "id": "NavigationBar", - "stateSelector": "toolbar", "cfg": { - "buttonStyle": "primary", "id": "navigationBar" } }, { @@ -713,115 +264,27 @@ "id": "IdentifyBar", "stateSelector": "identify", "cfg": { - "buttonStyle": "primary", - "pressedButtonStyle": "success", "id": "identifyBar" }, "isDefault": false }, { "name": "MapLoading", - "hide": true, - "cfg": { - "className": "ms2-loading" - }, "override": { "Toolbar": { "alwaysVisible": true } } }, - "OmniBar", - { - "name": "BurgerMenu", - "hide": true - } + "OmniBar", "BurgerMenu" ], - "page": [{ + "common": [{ "name": "OmniBar", "cfg": { "className": "navbar shadow navbar-home" } - }, { - "name":"ManagerMenu", - "hide": true, - "cfg": { - "entries": [{ - "msgId": "users.title", - "glyph": "1-group-mod", - "path": "/manager/usermanager" - }] - } - }, { - "name": "Login", - "hide": true, - "cfg": { - "nav": false, - "menuProps": { - "noCaret": true - }, - "toolsCfg": [{ - "buttonSize": "small", - "includeCloseButton": false, - "useModal": false, - "closeGlyph": "1-close" - }, { - "buttonSize": "small", - "includeCloseButton": false, - "useModal": false, - "closeGlyph": "1-close" - }, { - "buttonSize": "small", - "includeCloseButton": false, - "useModal": false, - "closeGlyph": "1-close" - }] - - } - }, {"name": "Language"}, { - "name" : "Attribution", - "hide": true - }, { - "name": "Footer", - "cfg": { - "bottom": true - } - }], - - "maps": [ - {"name": "Header"}, - {"name": "Fork"}, - {"name": "MapSearch"}, - {"name": "HomeDescription"}, - {"name": "MapType"}, - {"name": "CreateNewMap"}, - {"name": "Maps"}, - {"name": "Examples"} - ], - "manager": [{ - "name": "Header" - }, "Redirect",{ - "name": "Manager", - "cfg": { - "navStyle": { - "flex": "inherit" - } - } - }, { - "name": "Home", - "hide": true - }, { - "name": "UserManager", - "hide": true, - "cfg": { - "id": "usermanager" - } - },{ - "name": "GroupManager", - "hide": true, - "cfg": { - "id": "GroupManager" - } - }] + }, "ManagerMenu", "Login", "Language", "Attribution"], + "maps": ["Header", "Fork", "MapSearch", "HomeDescription", "MapType", "CreateNewMap", "Maps", "Examples", "Footer"], + "manager": ["Header", "Redirect", "Manager", "Home", "UserManager", "GroupManager", "Footer"] } } diff --git a/web/client/plugins/BackgroundSwitcher.jsx b/web/client/plugins/BackgroundSwitcher.jsx index 79eebeebaf..734794f5a9 100644 --- a/web/client/plugins/BackgroundSwitcher.jsx +++ b/web/client/plugins/BackgroundSwitcher.jsx @@ -39,8 +39,11 @@ module.exports = { DrawerMenu: { name: 'backgroundswitcher', position: 2, - icon: , + icon: , title: 'background', + buttonConfig: { + buttonClassName: "square-button no-border" + }, priority: 2 } }), diff --git a/web/client/plugins/DrawerMenu.jsx b/web/client/plugins/DrawerMenu.jsx index f5b2d4731a..50468bae4d 100644 --- a/web/client/plugins/DrawerMenu.jsx +++ b/web/client/plugins/DrawerMenu.jsx @@ -56,11 +56,11 @@ const DrawerMenu = React.createClass({ id: "mapstore-drawermenu", items: [], toggleMenu: () => {}, - glyph: "menu-hamburger", - buttonStyle: "default", + glyph: "1-stilo", + buttonStyle: "primary", menuOptions: {}, - singleSection: false, - buttonClassName: "drawer-menu-button", + singleSection: true, + buttonClassName: "square-button", disabled: false }; }, diff --git a/web/client/plugins/Identify.jsx b/web/client/plugins/Identify.jsx index 054f507420..0003720183 100644 --- a/web/client/plugins/Identify.jsx +++ b/web/client/plugins/Identify.jsx @@ -63,7 +63,7 @@ module.exports = { name: 'info', position: 6, tooltip: "info.tooltip", - icon: , + icon: , help: , toggle: true }, diff --git a/web/client/plugins/Map.jsx b/web/client/plugins/Map.jsx index d7e41f9ced..83e8cee1bd 100644 --- a/web/client/plugins/Map.jsx +++ b/web/client/plugins/Map.jsx @@ -36,15 +36,19 @@ const MapPlugin = React.createClass({ return { mapType: 'leaflet', actions: {}, - zoomControl: true, + zoomControl: false, mapLoadingMessage: "map.loading", loadingSpinner: true, - tools: ['measurement', 'locate', 'overview', 'scalebar'], + tools: ["measurement", "locate", "overview", "scalebar", "draw", "highlight"], options: {}, toolsOptions: { measurement: {}, locate: {}, - scalebar: {}, + scalebar: { + leaflet: { + position: "bottomright" + } + }, overview: { overviewOpt: { position: 'bottomright', diff --git a/web/client/plugins/Measure.jsx b/web/client/plugins/Measure.jsx index 519be6f420..f375e9b35a 100644 --- a/web/client/plugins/Measure.jsx +++ b/web/client/plugins/Measure.jsx @@ -60,9 +60,13 @@ module.exports = { DrawerMenu: { name: 'measurement', position: 3, + glyph: "1-stilo", icon: , title: 'measureComponent.title', showPanel: false, + buttonConfig: { + buttonClassName: "square-button no-border" + }, priority: 2 } }), diff --git a/web/client/plugins/MetadataExplorer.jsx b/web/client/plugins/MetadataExplorer.jsx index a514fe301b..40c1caa268 100644 --- a/web/client/plugins/MetadataExplorer.jsx +++ b/web/client/plugins/MetadataExplorer.jsx @@ -47,7 +47,7 @@ const MetadataExplorerComponent = React.createClass({ propTypes: { id: React.PropTypes.string, active: React.PropTypes.bool, - searchOnStarup: React.PropTypes.bool, + searchOnStartup: React.PropTypes.bool, formats: React.PropTypes.array, wrap: React.PropTypes.bool, wrapWithPanel: React.PropTypes.bool, @@ -64,18 +64,18 @@ const MetadataExplorerComponent = React.createClass({ active: false, wrap: false, modal: true, - wrapWithPanel: true, + wrapWithPanel: false, panelStyle: { zIndex: 100, overflow: "auto" }, panelClassName: "toolbar-panel", toggleControl: () => {}, - closeGlyph: "" + closeGlyph: "1-close" }; }, render() { - const panel =
    ; + const panel =
    ; if (this.props.wrap) { if (this.props.active) { if (this.props.wrapWithPanel) { diff --git a/web/client/plugins/Print.jsx b/web/client/plugins/Print.jsx index 8f9e02dcc1..1fdabdb66d 100644 --- a/web/client/plugins/Print.jsx +++ b/web/client/plugins/Print.jsx @@ -96,9 +96,10 @@ const Print = React.createClass({ messages: React.PropTypes.object }, getDefaultProps() { + return { withContainer: true, - withPanelAsContainer: true, + withPanelAsContainer: false, title: 'print.paneltitle', toggleControl: () => {}, onBeforePrint: () => {}, @@ -128,18 +129,25 @@ const Print = React.createClass({ regex: /landscape/ }], usePreview: true, - mapPreviewOptions: {}, - syncMapPreview: false, - useFixedScales: true, + mapPreviewOptions: { + enableScalebox: false, + enableRefresh: false + }, + syncMapPreview: true, + useFixedScales: false, scales: [], ignoreLayers: ["google", "bing"], defaultBackground: "osm", - closeGlyph: "", + closeGlyph: "1-close", submitConfig: { buttonConfig: { - bsSize: "large" + bsSize: "small", + bsStyle: "primary" }, - glyph: "print" + glyph: "" + }, + previewOptions: { + buttonStyle: "primary" }, style: {} }; diff --git a/web/client/plugins/Settings.jsx b/web/client/plugins/Settings.jsx index 563830d6b4..7422485fa2 100644 --- a/web/client/plugins/Settings.jsx +++ b/web/client/plugins/Settings.jsx @@ -59,12 +59,15 @@ const SettingsButton = React.createClass({ language: true, history: true }, + overrideSettings: { + history: false + }, items: [], style: { width: "300px" }, wrap: false, - wrapWithPanel: true, + wrapWithPanel: false, panelStyle: { minWidth: "300px", zIndex: 100, @@ -77,7 +80,7 @@ const SettingsButton = React.createClass({ panelClassName: "toolbar-panel", visible: false, toggleControl: () => {}, - closeGlyph: "" + closeGlyph: "1-close" }; }, renderSettings() { diff --git a/web/client/plugins/TOC.jsx b/web/client/plugins/TOC.jsx index 0fca906f74..92bfca92ab 100644 --- a/web/client/plugins/TOC.jsx +++ b/web/client/plugins/TOC.jsx @@ -186,8 +186,13 @@ const LayerTree = React.createClass({ activateSettingsTool: true, activateRemoveLayer: true, activateQueryTool: false, - visibilityCheckType: "checkbox", - settingsOptions: {}, + visibilityCheckType: "glyph", + settingsOptions: { + includeCloseButton: false, + closeGlyph: "1-close", + asModal: false, + buttonSize: "small" + }, querypanelEnabled: false }; }, @@ -287,8 +292,12 @@ module.exports = { DrawerMenu: { name: 'toc', position: 1, + glyph: "1-layer", icon: , title: 'layers', + buttonConfig: { + buttonClassName: "square-button no-border" + }, priority: 2 } }), diff --git a/web/client/plugins/Toolbar.jsx b/web/client/plugins/Toolbar.jsx index b47bc430c6..697e3a0837 100644 --- a/web/client/plugins/Toolbar.jsx +++ b/web/client/plugins/Toolbar.jsx @@ -38,7 +38,8 @@ const Toolbar = React.createClass({ stateSelector: React.PropTypes.string, buttonStyle: React.PropTypes.string, buttonSize: React.PropTypes.string, - pressedButtonStyle: React.PropTypes.string + pressedButtonStyle: React.PropTypes.string, + btnConfig: React.PropTypes.object }, contextTypes: { messages: React.PropTypes.object, @@ -61,9 +62,12 @@ const Toolbar = React.createClass({ allVisible: true, layout: "vertical", stateSelector: "toolbar", - buttonStyle: 'default', + buttonStyle: 'primary', buttonSize: null, - pressedButtonStyle: 'primary' + pressedButtonStyle: 'success', + btnConfig: { + className: "square-button" + } }; }, getPanel(tool) { @@ -85,6 +89,7 @@ const Toolbar = React.createClass({ }, render() { return ( : null; const Tool = this.getTool(tool); + const toolCfg = this.getToolConfig(tool); return this.addTooltip( - {(tool.cfg && tool.cfg.glyph) ? : tool.icon}{help} {tool.text} , diff --git a/web/client/plugins/manager/GroupManager.jsx b/web/client/plugins/manager/GroupManager.jsx index 6f741f302a..2fc2efc9a1 100644 --- a/web/client/plugins/manager/GroupManager.jsx +++ b/web/client/plugins/manager/GroupManager.jsx @@ -108,6 +108,7 @@ module.exports = { id: "groupmanager", name: 'groupmanager', position: 1, + priority: 1, title: , glyph: "1-group-mod" }}), diff --git a/web/client/plugins/manager/Manager.jsx b/web/client/plugins/manager/Manager.jsx index 20292fd870..0132f471cc 100644 --- a/web/client/plugins/manager/Manager.jsx +++ b/web/client/plugins/manager/Manager.jsx @@ -27,7 +27,10 @@ const Manager = React.createClass({ items: [], mapType: "openlayers", selectedTool: "importer", - itemSelected: () => {} + itemSelected: () => {}, + navStyle: { + flex: "inherit" + } }; }, renderToolIcon(tool) { diff --git a/web/client/plugins/manager/ManagerMenu.jsx b/web/client/plugins/manager/ManagerMenu.jsx index f8b9f1dee7..7aed864de5 100644 --- a/web/client/plugins/manager/ManagerMenu.jsx +++ b/web/client/plugins/manager/ManagerMenu.jsx @@ -46,7 +46,11 @@ const ManagerMenu = React.createClass({ getDefaultProps() { return { id: "mapstore-burger-menu", - entries: [], + entries: [{ + "msgId": "users.title", + "glyph": "1-group-mod", + "path": "/manager/usermanager" + }], role: "", onItemClick: () => {}, itemSelected: () => {}, diff --git a/web/client/plugins/manager/UserManager.jsx b/web/client/plugins/manager/UserManager.jsx index 433dcf0c10..9a1f1d7cce 100644 --- a/web/client/plugins/manager/UserManager.jsx +++ b/web/client/plugins/manager/UserManager.jsx @@ -107,6 +107,7 @@ module.exports = { id: "usermanager", name: 'usermanager', position: 1, + priority: 1, title: , glyph: "1-user-mod" }}), diff --git a/web/client/plugins/shapefile/ShapeFile.jsx b/web/client/plugins/shapefile/ShapeFile.jsx index 9c020c7971..a391ace403 100644 --- a/web/client/plugins/shapefile/ShapeFile.jsx +++ b/web/client/plugins/shapefile/ShapeFile.jsx @@ -44,8 +44,8 @@ const ShapeFile = React.createClass({ getDefaultProps() { return { id: "mapstore-shapefile-upload", - wrap: false, - wrapWithPanel: true, + wrap: true, + wrapWithPanel: false, panelStyle: { minWidth: "360px", zIndex: 100, @@ -57,7 +57,7 @@ const ShapeFile = React.createClass({ panelClassName: "toolbar-panel", visible: false, toggleControl: () => {}, - closeGlyph: "", + closeGlyph: "1-close", buttonSize: "small" }; }, diff --git a/web/client/product/components/viewer/about/About.jsx b/web/client/product/components/viewer/about/About.jsx index ae42b6d5d5..b66e266b17 100644 --- a/web/client/product/components/viewer/about/About.jsx +++ b/web/client/product/components/viewer/about/About.jsx @@ -25,7 +25,10 @@ var About = React.createClass({ right: "0px", margin: "8px" }, - modalConfig: {} + modalConfig: { + useModal: false, + closeGlyph: "1-close" + } }; }, render() { diff --git a/web/client/product/pages/Manager.jsx b/web/client/product/pages/Manager.jsx index 2aee297f5e..e9a8265fad 100644 --- a/web/client/product/pages/Manager.jsx +++ b/web/client/product/pages/Manager.jsx @@ -45,8 +45,8 @@ const Home = React.createClass({ render() { let plugins = ConfigUtils.getConfigProp("plugins") || {}; let pagePlugins = { - "desktop": plugins.page || [],// TODO mesh page plugins with other plugins - "mobile": plugins.page || [] + "desktop": plugins.common || [],// TODO mesh page plugins with other plugins + "mobile": plugins.common || [] }; let pluginsConfig = { "desktop": plugins[this.props.name] || [],// TODO mesh page plugins with other plugins diff --git a/web/client/product/pages/Maps.jsx b/web/client/product/pages/Maps.jsx index b1bccede11..b1c7a1d50d 100644 --- a/web/client/product/pages/Maps.jsx +++ b/web/client/product/pages/Maps.jsx @@ -50,8 +50,8 @@ const MapsPage = React.createClass({ render() { let plugins = ConfigUtils.getConfigProp("plugins") || {}; let pagePlugins = { - "desktop": plugins.page || [],// TODO mesh page plugins with other plugins - "mobile": plugins.page || [] + "desktop": plugins.common || [],// TODO mesh page plugins with other plugins + "mobile": plugins.common || [] }; let pluginsConfig = { "desktop": plugins[this.props.name] || [],// TODO mesh page plugins with other plugins diff --git a/web/client/product/plugins/About.jsx b/web/client/product/plugins/About.jsx index 8076536622..3edef8484f 100644 --- a/web/client/product/plugins/About.jsx +++ b/web/client/product/plugins/About.jsx @@ -5,20 +5,9 @@ * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ -const assign = require('object-assign'); - const About = require('../components/viewer/about/About'); -const AboutContent = require('../components/viewer/about/AboutContent'); module.exports = { - AboutPlugin: assign(About, { - DrawerMenu: { - name: 'about', - position: 4, - title: 'aboutLbl', - renderInModal: true, - panel: AboutContent - } - }), + AboutPlugin: About, reducers: {} }; diff --git a/web/client/product/plugins/Attribution.jsx b/web/client/product/plugins/Attribution.jsx index 85b978f48f..772295f070 100644 --- a/web/client/product/plugins/Attribution.jsx +++ b/web/client/product/plugins/Attribution.jsx @@ -38,7 +38,8 @@ module.exports = { AttributionPlugin: assign(Attribution, { OmniBar: { position: 1, - tool: () =>
    + tool: () =>
    , + priority: 1 } }) }; From c1e4ca7f0c46cde87dbfac6042c0c58496c6775d Mon Sep 17 00:00:00 2001 From: Mauro Bartolomeoli Date: Fri, 17 Feb 2017 12:47:32 +0100 Subject: [PATCH 2/2] Fixed tests --- .../data/identify/GeocodeViewer.jsx | 61 ++++++++++--------- .../data/identify/__tests__/Identify-test.jsx | 2 +- .../help/__tests__/HelpTextPanel-test.jsx | 3 +- 3 files changed, 35 insertions(+), 31 deletions(-) diff --git a/web/client/components/data/identify/GeocodeViewer.jsx b/web/client/components/data/identify/GeocodeViewer.jsx index eeb4067e34..78d542c2d2 100644 --- a/web/client/components/data/identify/GeocodeViewer.jsx +++ b/web/client/components/data/identify/GeocodeViewer.jsx @@ -11,35 +11,38 @@ const PropTypes = React.PropTypes; const {Modal, Button} = require('react-bootstrap'); const GeocodeViewer = (props) => { - /* lngCorrected is the converted longitude in order to have the value between - the range (-180 / +180). - */ - let lngCorrected = Math.round(props.latlng.lng * 100000) / 100000; - /* the following formula apply the converion */ - lngCorrected = lngCorrected - (360) * Math.floor(lngCorrected / (360) + 0.5); - return ( -
    - Lat: {Math.round(props.latlng.lat * 100000) / 100000 } - Long: { lngCorrected } - - - - {props.identifyRevGeocodeModalTitle} - - -

    {props.revGeocodeDisplayName}

    -
    - - - -
    -
    - ); + if (props.latlng) { + /* lngCorrected is the converted longitude in order to have the value between + the range (-180 / +180). + */ + let lngCorrected = Math.round(props.latlng.lng * 100000) / 100000; + /* the following formula apply the converion */ + lngCorrected = lngCorrected - (360) * Math.floor(lngCorrected / (360) + 0.5); + return ( +
    + Lat: {Math.round(props.latlng.lat * 100000) / 100000 } - Long: { lngCorrected } + + + + {props.identifyRevGeocodeModalTitle} + + +

    {props.revGeocodeDisplayName}

    +
    + + + +
    +
    + ); + } + return ; }; GeocodeViewer.propTypes = { diff --git a/web/client/components/data/identify/__tests__/Identify-test.jsx b/web/client/components/data/identify/__tests__/Identify-test.jsx index 0f701cf3be..9f1a647ba6 100644 --- a/web/client/components/data/identify/__tests__/Identify-test.jsx +++ b/web/client/components/data/identify/__tests__/Identify-test.jsx @@ -42,7 +42,7 @@ describe('Identify', () => { expect(identify).toExist(); const dom = ReactDOM.findDOMNode(identify); - expect(dom.parentNode.getElementsByClassName('panel').length).toBe(1); + expect(dom.parentNode.getElementsByClassName('info-panel').length).toBe(1); }); it('creates the Identify component with missing responses', () => { diff --git a/web/client/components/help/__tests__/HelpTextPanel-test.jsx b/web/client/components/help/__tests__/HelpTextPanel-test.jsx index 6269fdb6eb..e2b23d368d 100644 --- a/web/client/components/help/__tests__/HelpTextPanel-test.jsx +++ b/web/client/components/help/__tests__/HelpTextPanel-test.jsx @@ -24,7 +24,7 @@ describe('Test for HelpTextPanel', () => { // test DEFAULTS it('creates the component with defaults', () => { - const helpPanel = ReactDOM.render(, document.getElementById("container")); + const helpPanel = ReactDOM.render(, document.getElementById("container")); expect(helpPanel).toExist(); const helpPanelDom = ReactDOM.findDOMNode(helpPanel); @@ -45,6 +45,7 @@ describe('Test for HelpTextPanel', () => { it('creates the component with custom props', () => { const helpPanel = ReactDOM.render(