Improving mentions list and other UI improvements

Этот коммит содержится в:
Asaad Mahmood
2015-07-10 02:38:19 +05:00
родитель 763618ef36
Коммит 53d0420e24
7 изменённых файлов: 66 добавлений и 37 удалений

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

@@ -162,25 +162,31 @@ module.exports = React.createClass({
invite_sections[index] = ( invite_sections[index] = (
<div key={"key" + index}> <div key={"key" + index}>
<div> <div>
<button type="button" className="btn remove__member" onClick={this.removeInviteFields.bind(this, index)}>×</button> <button type="button" className="btn btn-link remove__member" onClick={this.removeInviteFields.bind(this, index)}><span className="fa fa-trash"></span></button>
</div> </div>
<div className={ email_error ? "form-group invite has-error" : "form-group invite" }> <div className={ email_error ? "form-group invite has-error" : "form-group invite" }>
<input onKeyUp={this.displayNameKeyUp} type="text" ref={"email"+index} className="form-control" placeholder="email@domain.com" maxLength="64" /> <input onKeyUp={this.displayNameKeyUp} type="text" ref={"email"+index} className="form-control" placeholder="email@domain.com" maxLength="64" />
{ email_error } { email_error }
</div> </div>
<div className="row--invite">
{ config.AllowInviteNames ? { config.AllowInviteNames ?
<div className={ first_name_error ? "form-group invite has-error" : "form-group invite" }> <div className="col-sm-6">
<input type="text" className="form-control" ref={"first_name"+index} placeholder="First name" maxLength="64" /> <div className={ first_name_error ? "form-group has-error" : "form-group" }>
{ first_name_error } <input type="text" className="form-control" ref={"first_name"+index} placeholder="First name" maxLength="64" />
{ first_name_error }
</div>
</div> </div>
: "" } : "" }
{ config.AllowInviteNames ? { config.AllowInviteNames ?
<div className={ last_name_error ? "form-group invite has-error" : "form-group invite" }> <div className="col-sm-6">
<input type="text" className="form-control" ref={"last_name"+index} placeholder="Last name" maxLength="64" /> <div className={ last_name_error ? "form-group has-error" : "form-group" }>
{ last_name_error } <input type="text" className="form-control" ref={"last_name"+index} placeholder="Last name" maxLength="64" />
{ last_name_error }
</div>
</div> </div>
: "" } : "" }
</div> </div>
</div>
); );
} }
@@ -203,7 +209,7 @@ module.exports = React.createClass({
<button type="button" className="btn btn-default" onClick={this.addInviteFields}>Add another</button> <button type="button" className="btn btn-default" onClick={this.addInviteFields}>Add another</button>
<br/> <br/>
<br/> <br/>
<label className='control-label'>People invited automatically join Town Square channel.</label> <span>People invited automatically join Town Square channel.</span>
</div> </div>
<div className="modal-footer"> <div className="modal-footer">
<button type="button" className="btn btn-default" data-dismiss="modal">Close</button> <button type="button" className="btn btn-default" data-dismiss="modal">Close</button>

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

@@ -129,7 +129,7 @@ module.exports = React.createClass({
if (numMentions < 1) return (<div/>); if (numMentions < 1) return (<div/>);
var height = (numMentions*37) + 2; var height = (numMentions*36) + 4;
var width = $('#'+this.props.id).parent().width(); var width = $('#'+this.props.id).parent().width();
var bottom = $(window).height() - $('#'+this.props.id).offset().top; var bottom = $(window).height() - $('#'+this.props.id).offset().top;
var left = $('#'+this.props.id).offset().left; var left = $('#'+this.props.id).offset().left;

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

@@ -154,9 +154,4 @@ div.theme {
text-decoration: none; text-decoration: none;
padding: 0 10px; padding: 0 10px;
} }
} }
.invite {
width: 90%;
}

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

@@ -11,12 +11,13 @@
position: absolute; position: absolute;
z-index: 1060; z-index: 1060;
.mentions-box { .mentions-box {
max-height: 303px;
position:absolute; position:absolute;
background-color:#fff; background-color:#fff;
border: $border-gray; border: $border-gray;
overflow-x: hidden; overflow-x: hidden;
overflow-y: scroll; overflow-y: scroll;
bottom:0; bottom:0;
} }
} }
@@ -24,13 +25,15 @@
position:relative; position:relative;
width:100%; width:100%;
background-color:#fff; background-color:#fff;
height:37px; height:36px;
padding:2px; padding:2px;
z-index:101; z-index:101;
cursor: pointer; line-height: 36px;
&:hover { font-size: 13px;
background-color:#e8eaed; cursor: pointer;
} &:hover {
background-color: #E6F2FA;
}
} }
.mentions-text { .mentions-text {
@@ -38,15 +41,20 @@
} }
.mention-img { .mention-img {
margin-right:10px; margin-right: 6px;
height:32px; height: 32px;
width:32px; width: 32px;
border-radius: 10%; line-height: 36px;
display: block;
font-size: 20px;
text-align: center;
color: #555;
@include border-radius(3px);
} }
.mention-fullname { .mention-fullname {
color: grey; color: grey;
padding-left: 10px; padding-left: 10px;
} }
.mention-highlight { .mention-highlight {
@@ -55,9 +63,4 @@
.mention-link { .mention-link {
color:$primary-color; color:$primary-color;
} }
.mention-align {
position:relative;
top:5px;
}

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

@@ -15,6 +15,10 @@
} }
.remove__member { .remove__member {
float: right; float: right;
color: #E56565;
font-size: 20px;
line-height: 0;
padding: 6px;
} }
.modal-dialog { .modal-dialog {
max-width: 95%; max-width: 95%;
@@ -268,3 +272,19 @@
} }
} }
} }
// Invite New Member
.invite {
margin-right: 40px;
}
.row--invite {
margin-right: 40px;
@include clearfix;
.col-sm-6 {
padding: 0 0 0 15px;
&:first-child {
padding-left: 0;
}
}
}

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

@@ -3,7 +3,7 @@
.ps-container.ps-active-x > .ps-scrollbar-x-rail, .ps-container.ps-active-y > .ps-scrollbar-y-rail { .ps-container.ps-active-x > .ps-scrollbar-x-rail, .ps-container.ps-active-y > .ps-scrollbar-y-rail {
display: block; } display: block; }
.ps-container.ps-in-scrolling { .ps-container.ps-in-scrolling {
pointer-events: none; } }
.ps-container.ps-in-scrolling.ps-x > .ps-scrollbar-x-rail { .ps-container.ps-in-scrolling.ps-x > .ps-scrollbar-x-rail {
background-color: #eee; background-color: #eee;
opacity: 0.9; opacity: 0.9;
@@ -85,7 +85,7 @@
/* there must be 'right' for ps-scrollbar-y */ /* there must be 'right' for ps-scrollbar-y */
width: 8px; } width: 8px; }
.ps-container:hover.ps-in-scrolling { .ps-container:hover.ps-in-scrolling {
pointer-events: none; } }
.ps-container:hover.ps-in-scrolling.ps-x > .ps-scrollbar-x-rail { .ps-container:hover.ps-in-scrolling.ps-x > .ps-scrollbar-x-rail {
background-color: #eee; background-color: #eee;
opacity: 0.9; opacity: 0.9;

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

@@ -276,6 +276,11 @@
} }
} }
} }
.row--invite {
.col-sm-6 {
padding: 0;
}
}
.settings-modal { .settings-modal {
&.display--content { &.display--content {
.modal-header { .modal-header {