From 2522936d311ae13adc2f584bba5cd19c24ef37fe Mon Sep 17 00:00:00 2001 From: Matteo Velludini Date: Fri, 26 May 2017 17:19:59 +0200 Subject: [PATCH] removed duplicated component --- docs/developer-guide/maps-configuration.md | 2 - .../components/buttons/ToggleButtonV2.jsx | 101 ------------------ 2 files changed, 103 deletions(-) delete mode 100644 web/client/components/buttons/ToggleButtonV2.jsx diff --git a/docs/developer-guide/maps-configuration.md b/docs/developer-guide/maps-configuration.md index c105e5c92f..597c1c6b01 100644 --- a/docs/developer-guide/maps-configuration.md +++ b/docs/developer-guide/maps-configuration.md @@ -24,10 +24,8 @@ i.e. > ``{ "url": "http..." "format": "image/png8" - "type": "osm", "title": "Open Street Map", "name": "mapnik", - "source": "osm", "group": "background", "visibility": false }`` diff --git a/web/client/components/buttons/ToggleButtonV2.jsx b/web/client/components/buttons/ToggleButtonV2.jsx deleted file mode 100644 index 9c89718f0d..0000000000 --- a/web/client/components/buttons/ToggleButtonV2.jsx +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright 2015, GeoSolutions Sas. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. - */ - -var React = require('react'); -var {Button, Glyphicon} = require('react-bootstrap'); - -const OverlayTrigger = require('../misc/OverlayTrigger'); - -var ImageButton = require('./ImageButton'); -/** - * Toggle button with tooltip and icons or image support. - * @memberof components.buttons - * @class - * @prop {string} [id] an id for the html component - * @prop {object} [btnConfig] the configuration to pass to the bootstrap button - * @prop {object} [options] the options to send when toggle is clicked - * @prop {string|element} [text] the text to disaplay - * @prop {string|element} [help] the help text - * @prop {string} glyphicon the icon name - * @prop {bool} pressed the status of the button - * @prop {function} onClick. The method to call when clicked. the method will return as parameter the toggled `pressed` prop and the `options` object - * @prop {node} [tooltip] the tooltip to use on mouse hover - * @prop {string} [tooltipPlace] positon of the tooltip, one of: 'top', 'right', 'bottom', 'left' - * @prop {object} css style object for the component - * @prop {btnType} [btnType] one of 'normal', 'image' - * @prop {string} image if type is 'image', the src of the image - * @prop {string} pressedStyle the bootstrap style for pressedStyle - * @prop {string} defaultStyle the bootstrap style when not pressed - * - */ -var ToggleButton = React.createClass({ - propTypes: { - id: React.PropTypes.string, - btnConfig: React.PropTypes.object, - options: React.PropTypes.object, - text: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.element]), - help: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.element]), - glyphicon: React.PropTypes.string, - pressed: React.PropTypes.bool, - onClick: React.PropTypes.func, - tooltip: React.PropTypes.element, - tooltipPlace: React.PropTypes.string, - style: React.PropTypes.object, - btnType: React.PropTypes.oneOf(['normal', 'image']), - image: React.PropTypes.string, - pressedStyle: React.PropTypes.string, - defaultStyle: React.PropTypes.string - }, - getDefaultProps() { - return { - onClick: () => {}, - options: {}, - pressed: false, - tooltipPlace: "top", - style: {width: "100%"}, - btnType: 'normal', - pressedStyle: 'primary', - defaultStyle: 'default' - }; - }, - renderNormalButton() { - return ( - - ); - }, - renderImageButton() { - return ( - - ); - }, - addTooltip(btn) { - return ( - - {btn} - - ); - }, - render() { - var retval; - var btn = this.props.btnType === 'normal' ? this.renderNormalButton() : this.renderImageButton(); - if (this.props.tooltip) { - retval = this.addTooltip(btn); - } else { - retval = btn; - } - return retval; - - } -}); - -module.exports = ToggleButton;