Этот коммит содержится в:
Asaad Mahmood
2015-08-04 19:12:20 +05:00
родитель 2c46ee8420
Коммит 77f52da255
12 изменённых файлов: 99 добавлений и 41 удалений

Просмотреть файл

@@ -59,7 +59,7 @@ var PopoverListMembers = React.createClass({
return ( return (
<div id="member_popover" data-toggle="popover" data-content={popoverHtml} data-original-title="Members" > <div id="member_popover" data-toggle="popover" data-content={popoverHtml} data-original-title="Members" >
<div id="member_tooltip" data-toggle="tooltip" title="View Channel Members"> <div id="member_tooltip" title="View Channel Members">
{count} <span className="glyphicon glyphicon-user" aria-hidden="true"></span> {count} <span className="glyphicon glyphicon-user" aria-hidden="true"></span>
</div> </div>
</div> </div>

Просмотреть файл

@@ -20,6 +20,10 @@ module.exports = React.createClass({
PostStore.addMentionDataChangeListener(this._onChange); PostStore.addMentionDataChangeListener(this._onChange);
var self = this; var self = this;
$('.post-right__scroll').scroll(function(){
self.forceUpdate();
});
$('body').on('keydown.mentionlist', '#'+this.props.id, $('body').on('keydown.mentionlist', '#'+this.props.id,
function(e) { function(e) {
if (!self.isEmpty() && self.state.mentionText != '-1' && (e.which === 13 || e.which === 9)) { if (!self.isEmpty() && self.state.mentionText != '-1' && (e.which === 13 || e.which === 9)) {
@@ -32,7 +36,7 @@ module.exports = React.createClass({
e.preventDefault(); e.preventDefault();
var tempSelectedMention = -1; var tempSelectedMention = -1;
if (e.which === 38) { if (e.which === 38) {
if (self.getSelection(self.state.selectedMention - 1)) if (self.getSelection(self.state.selectedMention - 1))
self.setState({ selectedMention: self.state.selectedMention - 1, selectedUsername: self.refs['mention' + (self.state.selectedMention - 1)].props.username }); self.setState({ selectedMention: self.state.selectedMention - 1, selectedUsername: self.refs['mention' + (self.state.selectedMention - 1)].props.username });
else { else {
@@ -106,13 +110,13 @@ module.exports = React.createClass({
this.setState({ selectedMention: listId, selectedUsername: this.refs['mention' + listId].props.username }); this.setState({ selectedMention: listId, selectedUsername: this.refs['mention' + listId].props.username });
}, },
getSelection: function(listId) { getSelection: function(listId) {
if (!this.refs['mention' + listId]) if (!this.refs['mention' + listId])
return false; return false;
else else
return true; return true;
}, },
addCurrentMention: function() { addCurrentMention: function() {
if (!this.getSelection(this.state.selectedMention)) if (!this.getSelection(this.state.selectedMention))
this.addFirstMention(); this.addFirstMention();
else else
this.refs['mention' + this.state.selectedMention].handleClick(); this.refs['mention' + this.state.selectedMention].handleClick();
@@ -132,7 +136,7 @@ module.exports = React.createClass({
scrollAmount = $("#mentionsbox").height() * 100; //Makes sure that it scrolls all the way to the bottom scrollAmount = $("#mentionsbox").height() * 100; //Makes sure that it scrolls all the way to the bottom
else if (direction === "down" && this.state.selectedMention === 0) else if (direction === "down" && this.state.selectedMention === 0)
scrollAmount = 0; scrollAmount = 0;
else if (direction === "up") else if (direction === "up")
scrollAmount = "-=" + ($('#'+this.refs['mention' + this.state.selectedMention].props.id +"_mentions").innerHeight() - 5); scrollAmount = "-=" + ($('#'+this.refs['mention' + this.state.selectedMention].props.id +"_mentions").innerHeight() - 5);
else if (direction === "down") else if (direction === "down")
scrollAmount = "+=" + ($('#'+this.refs['mention' + this.state.selectedMention].props.id +"_mentions").innerHeight() - 5); scrollAmount = "+=" + ($('#'+this.refs['mention' + this.state.selectedMention].props.id +"_mentions").innerHeight() - 5);

Просмотреть файл

@@ -37,15 +37,25 @@ module.exports = React.createClass({
componentDidMount: function() { componentDidMount: function() {
var user = UserStore.getCurrentUser(); var user = UserStore.getCurrentUser();
if (user.props && user.props.theme) { if (user.props && user.props.theme) {
utils.changeCss('a.theme', 'color:'+user.props.theme+'; fill:'+user.props.theme+'!important;');
utils.changeCss('div.theme', 'background-color:'+user.props.theme+';'); utils.changeCss('div.theme', 'background-color:'+user.props.theme+';');
utils.changeCss('.btn.btn-primary', 'background: ' + user.props.theme+';'); utils.changeCss('.btn.btn-primary', 'background: ' + user.props.theme+';');
utils.changeCss('.btn.btn-primary:hover, .btn.btn-primary:active, .btn.btn-primary:focus', 'background: ' + utils.changeColor(user.props.theme, -10) +';');
utils.changeCss('.modal .modal-header', 'background: ' + user.props.theme+';'); utils.changeCss('.modal .modal-header', 'background: ' + user.props.theme+';');
utils.changeCss('.mention', 'background: ' + user.props.theme+';'); utils.changeCss('.mention', 'background: ' + user.props.theme+';');
utils.changeCss('.mention-link', 'color: ' + user.props.theme+';'); utils.changeCss('.mention-link', 'color: ' + user.props.theme+';');
utils.changeCss('@media(max-width: 768px){.search-bar__container', 'background: ' + user.props.theme+';}'); utils.changeCss('@media(max-width: 768px){.search-bar__container', 'background: ' + user.props.theme+';}');
} }
if (user.props.theme != "#000000" && user.props.theme != "#585858"){
utils.changeCss('.btn.btn-primary:hover, .btn.btn-primary:active, .btn.btn-primary:focus', 'background: ' + utils.changeColor(user.props.theme, -10) +';');
utils.changeCss('a.theme', 'color:'+user.props.theme+'; fill:'+user.props.theme+'!important;');
}
else if (user.props.theme == "#000000"){
utils.changeCss('.btn.btn-primary:hover, .btn.btn-primary:active, .btn.btn-primary:focus', 'background: ' + utils.changeColor(user.props.theme, +50) +';');
$('.team__header').addClass('theme--black');
}
else if (user.props.theme == "#585858"){
utils.changeCss('.btn.btn-primary:hover, .btn.btn-primary:active, .btn.btn-primary:focus', 'background: ' + utils.changeColor(user.props.theme, +10) +';');
$('.team__header').addClass('theme--gray');
}
PostStore.addChangeListener(this._onChange); PostStore.addChangeListener(this._onChange);
ChannelStore.addChangeListener(this._onChange); ChannelStore.addChangeListener(this._onChange);

Просмотреть файл

@@ -57,7 +57,7 @@ module.exports = React.createClass({
if (!config.ShowEmail) { if (!config.ShowEmail) {
data_content += "<div class='text-nowrap'>Email not shared</div>"; data_content += "<div class='text-nowrap'>Email not shared</div>";
} else { } else {
data_content += "<div><a href='mailto:" + this.state.profile.email + "' class='text-nowrap text-lowercase'>" + this.state.profile.email + "</a></div>"; data_content += "<div data-toggle='tooltip' title= '" + this.state.profile.email + "'><a href='mailto:" + this.state.profile.email + "' class='text-nowrap text-lowercase user-popover__email'>" + this.state.profile.email + "</a></div>";
} }
return ( return (

Просмотреть файл

@@ -61,6 +61,10 @@ div.theme {
} }
} }
.form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control {
cursor: auto;
}
.form-group { .form-group {
&.form-group--small { &.form-group--small {
margin-bottom: 10px; margin-bottom: 10px;

Просмотреть файл

@@ -4,7 +4,8 @@
max-height: 110px; max-height: 110px;
height: 110px; height: 110px;
white-space: nowrap; white-space: nowrap;
overflow: auto; overflow-x: auto;
overflow-y: hidden;
.preview-div { .preview-div {
display: inline-block; display: inline-block;
width: 120px; width: 120px;
@@ -28,9 +29,9 @@
} }
} }
.preview-img { .preview-img {
display: block; display: block;
height: auto; height: auto;
max-width: 100%; max-width: 100%;
} }
.remove-preview { .remove-preview {
position: absolute; position: absolute;
@@ -130,15 +131,17 @@
background-color: #FFF; background-color: #FFF;
background-repeat: no-repeat; background-repeat: no-repeat;
&.small { &.small {
background-position: center; background-position: center;
} }
&.normal { &.normal {
background-position: top left; background-position: top left;
} }
} }
.post-image__thumbnail { .post-image__thumbnail {
width: 50%; width: 50%;
height: 100%; height: 100%;
cursor: zoom-in;
cursor: -webkit-zoom-in;
} }
.post-image__details { .post-image__details {
width: 50%; width: 50%;
@@ -165,34 +168,34 @@
} }
.file-details__container { .file-details__container {
@include display-flex; @include display-flex;
display: -ms-flexbox; display: -ms-flexbox;
.file-details { .file-details {
width: 320px; width: 320px;
height: 270px; height: 270px;
padding: 14px; padding: 14px;
text-align: left; text-align: left;
vertical-align: top; vertical-align: top;
.file-details__name { .file-details__name {
font-size: 16px; font-size: 16px;
}
.file-details__info {
color: grey;
}
} }
.file-details__preview { .file-details__info {
width: 320px; color: grey;
height: 270px; }
border-right: 1px solid #ddd; }
vertical-align: center; .file-details__preview {
width: 320px;
height: 270px;
border-right: 1px solid #ddd;
vertical-align: center;
// helper to center the image icon in the preview window // helper to center the image icon in the preview window
.file-details__preview-helper { .file-details__preview-helper {
height: 100%; height: 100%;
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
} }
}
} }
}

Просмотреть файл

@@ -110,6 +110,20 @@
} }
} }
} }
&.theme--black {
&:hover {
&:before {
background: rgba(white, 0.2);
}
}
}
&.theme--gray {
&:hover {
&:before {
background: rgba(white, 0.1);
}
}
}
a { a {
color: #fff; color: #fff;
} }

Просмотреть файл

@@ -15,10 +15,13 @@
} }
.remove__member { .remove__member {
float: right; float: right;
color: #E56565; color: #999;
font-size: 20px; font-size: 20px;
line-height: 0; line-height: 0;
padding: 6px; padding: 6px;
&:hover {
color: #E56565;
}
} }
.modal-dialog { .modal-dialog {
max-width: 95%; max-width: 95%;
@@ -151,10 +154,9 @@
height: 100%; height: 100%;
margin: 0 auto; margin: 0 auto;
.image-wrapper { .image-wrapper {
background: #FFF;
position: relative; position: relative;
max-width: 90%; max-width: 90%;
min-height: 50px; min-height: 100px;
min-width: 320px; min-width: 320px;
@include border-radius(3px); @include border-radius(3px);
display: table; display: table;
@@ -182,6 +184,7 @@
z-index: 9999; z-index: 9999;
} }
> a { > a {
background: #FFF;
display: table-cell; display: table-cell;
vertical-align: middle; vertical-align: middle;
} }

Просмотреть файл

@@ -19,6 +19,7 @@
} }
} }
.navbar-toggle { .navbar-toggle {
width: 43px;
float: left; float: left;
border-color: transparent; border-color: transparent;
border-radius: 0; border-radius: 0;

Просмотреть файл

@@ -6,4 +6,11 @@
.user-popover__image { .user-popover__image {
margin: 0 0 10px; margin: 0 0 10px;
@include border-radius(128px); @include border-radius(128px);
}
.user-popover__email {
max-width: 200px;
overflow: hidden;
text-overflow: ellipsis;
display: block;
} }

Просмотреть файл

@@ -229,6 +229,16 @@
} }
} }
@media screen and (max-height: 640px) {
.signup-team__container {
padding: 30px 0;
margin-bottom: 30px;
font-size: 0.9em;
.signup-team__name {
font-size: 2em;
}
}
}
@media screen and (max-width: 768px) { @media screen and (max-width: 768px) {
.date-separator, .new-separator { .date-separator, .new-separator {
&.hovered--after { &.hovered--after {

Просмотреть файл

@@ -49,7 +49,9 @@
<div id="activity_log_modal"></div> <div id="activity_log_modal"></div>
<div id="removed_from_channel_modal"></div> <div id="removed_from_channel_modal"></div>
<script> <script>
window.setup_channel_page('{{ .Props.TeamDisplayName }}', '{{ .Props.TeamType }}', '{{ .Props.TeamId }}', '{{ .Props.ChannelName }}', '{{ .Props.ChannelId }}'); window.setup_channel_page('{{ .Props.TeamDisplayName }}', '{{ .Props.TeamType }}', '{{ .Props.TeamId }}', '{{ .Props.ChannelName }}', '{{ .Props.ChannelId }}');
$('body').tooltip( {selector: '[data-toggle=tooltip]'} );
$('.modal-body').perfectScrollbar();
</script> </script>
</body> </body>
</html> </html>