-
Notifications
You must be signed in to change notification settings - Fork 416
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This ensures that the window with the helptexts appears on the first mouseover-event on a 'HelpBadge' (not on help modus activation). To hide the helptext window the help modus has to be disabled.
- Loading branch information
1 parent
b24eb94
commit f72225c
Showing
6 changed files
with
86 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/** | ||
* 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 ToggleButton = require('../buttons/ToggleButton'); | ||
require("./help.css"); | ||
|
||
/** | ||
* A toggle button class for enabling / disabling help modus | ||
*/ | ||
let HelpToggleBtn = React.createClass({ | ||
propTypes: { | ||
key: React.PropTypes.string, | ||
isButton: React.PropTypes.bool, | ||
glyphicon: React.PropTypes.string, | ||
pressed: React.PropTypes.bool, | ||
changeHelpState: React.PropTypes.func, | ||
changeHelpwinVisibility: React.PropTypes.func | ||
}, | ||
getDefaultProps() { | ||
return { | ||
key: 'helpButton', | ||
isButton: true, | ||
glyphicon: 'question-sign' | ||
}; | ||
}, | ||
onClick: function() { | ||
this.props.changeHelpState(!this.props.pressed); | ||
this.props.changeHelpwinVisibility(false); | ||
}, | ||
render: function() { | ||
return ( | ||
<ToggleButton | ||
key={this.props.key} | ||
isButton={this.props.isButton} | ||
glyphicon={this.props.glyphicon} | ||
pressed={this.props.pressed} | ||
onClick={this.onClick}/> | ||
); | ||
} | ||
}); | ||
|
||
module.exports = HelpToggleBtn; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters