summaryrefslogtreecommitdiffstats
path: root/web/react
diff options
context:
space:
mode:
Diffstat (limited to 'web/react')
-rw-r--r--web/react/components/channel_notifications.jsx6
-rw-r--r--web/react/components/post.jsx6
-rw-r--r--web/react/utils/utils.jsx24
3 files changed, 19 insertions, 17 deletions
diff --git a/web/react/components/channel_notifications.jsx b/web/react/components/channel_notifications.jsx
index fa9ab42ae..638d16576 100644
--- a/web/react/components/channel_notifications.jsx
+++ b/web/react/components/channel_notifications.jsx
@@ -97,7 +97,7 @@ module.exports = React.createClass({
var inputs = [];
inputs.push(
- <div className="col-sm-12">
+ <div>
<div className="radio">
<label>
<input type="radio" checked={notifyActive[0]} onClick={function(){self.handleRadioClick("all")}}>For all activity</input>
@@ -158,7 +158,7 @@ module.exports = React.createClass({
var inputs = [];
inputs.push(
- <div className="col-sm-12">
+ <div>
<div className="btn-group" data-toggle="buttons-radio">
<button className={"btn btn-default "+quietActive[0]} onClick={function(){self.handleQuietToggle(true)}}>On</button>
<button className={"btn btn-default "+quietActive[1]} onClick={function(){self.handleQuietToggle(false)}}>Off</button>
@@ -167,7 +167,7 @@ module.exports = React.createClass({
);
inputs.push(
- <div className="col-sm-12">
+ <div>
<br/>
Enabling quiet mode will turn off desktop notifications and only mark the channel as unread if you have been mentioned.
</div>
diff --git a/web/react/components/post.jsx b/web/react/components/post.jsx
index e877a2213..ab5d70f12 100644
--- a/web/react/components/post.jsx
+++ b/web/react/components/post.jsx
@@ -11,9 +11,9 @@ var ActionTypes = Constants.ActionTypes;
module.exports = React.createClass({
componentDidMount: function() {
- $('.edit-modal').on('show.bs.modal', function () {
- $('.edit-modal .edit-modal-body').css('overflow-y', 'auto');
- $('.edit-modal .edit-modal-body').css('max-height', $(window).height() * 0.7);
+ $('.modal').on('show.bs.modal', function () {
+ $('.modal-body').css('overflow-y', 'auto');
+ $('.modal-body').css('max-height', $(window).height() * 0.7);
});
},
handleCommentClick: function(e) {
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx
index 530166f04..f8a7d6450 100644
--- a/web/react/utils/utils.jsx
+++ b/web/react/utils/utils.jsx
@@ -728,20 +728,22 @@ module.exports.isComment = function(post) {
}
module.exports.getDirectTeammate = function(channel_id) {
- var userIds = ChannelStore.get(channel_id).name.split('__');
+ var userIds = ChannelStore.get(channel_id).name.split('__');
+ var curUserId = UserStore.getCurrentId();
+ var teammate = {};
- if(userIds.length != 2) {
- return;
- }
-
- var curUser = UserStore.getCurrentId();
+ if(userIds.length != 2 || userIds.indexOf(curUserId) === -1) {
+ return teammate;
+ }
- for(var idx in userIds) {
- if(userIds[idx] === curUser)
- delete userIds[idx];
- }
+ for (var idx in userIds) {
+ if(userIds[idx] !== curUserId) {
+ teammate = UserStore.getProfile(userIds[idx]);
+ break;
+ }
+ }
- return UserStore.getProfile(userIds[0])
+ return teammate;
}
Image.prototype.load = function(url, progressCallback) {