summaryrefslogtreecommitdiffstats
path: root/web/react/components/user_settings.jsx
diff options
context:
space:
mode:
authornickago <ngonella@calpoly.edu>2015-08-13 08:50:40 -0700
committernickago <ngonella@calpoly.edu>2015-08-13 08:50:40 -0700
commitc5ee567bacbc55372d526c668fa138c80545498e (patch)
treead7235d7618c446417c86a3ec60c57388aa8d864 /web/react/components/user_settings.jsx
parentebd7fd560e7ce87de6ebf3e94f84796eecba29ce (diff)
downloadchat-c5ee567bacbc55372d526c668fa138c80545498e.tar.gz
chat-c5ee567bacbc55372d526c668fa138c80545498e.tar.bz2
chat-c5ee567bacbc55372d526c668fa138c80545498e.zip
Refactored such that the menu doesn't open for firefox users
Diffstat (limited to 'web/react/components/user_settings.jsx')
-rw-r--r--web/react/components/user_settings.jsx45
1 files changed, 17 insertions, 28 deletions
diff --git a/web/react/components/user_settings.jsx b/web/react/components/user_settings.jsx
index fa01d62c2..0dfea6543 100644
--- a/web/react/components/user_settings.jsx
+++ b/web/react/components/user_settings.jsx
@@ -236,36 +236,24 @@ var NotificationsTab = React.createClass({
}
var soundSection;
- if (this.props.activeSection === 'sound') {
- var inputs = [];
+ if (this.props.activeSection === 'sound' && this.state.soundNeeded) {
+ var soundActive = ["",""];
+ if (this.state.enable_sound === "false") {
+ soundActive[1] = "active";
+ } else {
+ soundActive[0] = "active";
+ }
- if(this.state.soundNeeded) {
- var soundActive = ["",""];
- if (this.state.enable_sound === "false") {
- soundActive[1] = "active";
- } else {
- soundActive[0] = "active";
- }
+ var inputs = [];
- inputs.push(
- <div>
- <div className="btn-group" data-toggle="buttons-radio">
- <button className={"btn btn-default "+soundActive[0]} onClick={function(){self.handleSoundRadio("true")}}>On</button>
- <button className={"btn btn-default "+soundActive[1]} onClick={function(){self.handleSoundRadio("false")}}>Off</button>
- </div>
- </div>
- );
- } else {
- inputs.push(
- <div>
- <div className='btn-group' data-toggle='buttons-radio'>
- <button className='btn btn-default' disabled>On</button>
- <button className='btn btn-default' disabled>Off</button>
- </div>
- <div><br/>Please disable notification sounds in your browser settings</div>
+ inputs.push(
+ <div>
+ <div className="btn-group" data-toggle="buttons-radio">
+ <button className={"btn btn-default "+soundActive[0]} onClick={function(){self.handleSoundRadio("true")}}>On</button>
+ <button className={"btn btn-default "+soundActive[1]} onClick={function(){self.handleSoundRadio("false")}}>Off</button>
</div>
- )
- }
+ </div>
+ );
soundSection = (
<SettingItemMax
@@ -279,7 +267,7 @@ var NotificationsTab = React.createClass({
} else {
var describe = "";
if (!this.state.soundNeeded) {
- describe = "See Inside"
+ describe = "Please configure notification sounds in your browser settings"
} else if (this.state.enable_sound === "false") {
describe = "Off";
} else {
@@ -291,6 +279,7 @@ var NotificationsTab = React.createClass({
title="Desktop notification sounds"
describe={describe}
updateSection={function(){self.props.updateSection("sound");}}
+ disableOpen = {!this.state.soundNeeded}
/>
);
}