mm-1762 - Search improvements with some other minor Ui changes
Этот коммит содержится в:
@@ -36,6 +36,9 @@ module.exports = React.createClass({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
clearFocus: function(e) {
|
||||||
|
$('.search-bar__container').removeClass('focused');
|
||||||
|
},
|
||||||
handleClose: function(e) {
|
handleClose: function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
@@ -57,6 +60,7 @@ module.exports = React.createClass({
|
|||||||
},
|
},
|
||||||
handleUserFocus: function(e) {
|
handleUserFocus: function(e) {
|
||||||
e.target.select();
|
e.target.select();
|
||||||
|
$('.search-bar__container').addClass('focused');
|
||||||
},
|
},
|
||||||
performSearch: function(terms, isMentionSearch) {
|
performSearch: function(terms, isMentionSearch) {
|
||||||
if (terms.length) {
|
if (terms.length) {
|
||||||
@@ -92,13 +96,14 @@ module.exports = React.createClass({
|
|||||||
render: function() {
|
render: function() {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div className="sidebar__collapse" onClick={this.handleClose}>Cancel</div>
|
<div className="sidebar__collapse" onClick={this.handleClose}><span className="fa fa-angle-left"></span></div>
|
||||||
<span className="glyphicon glyphicon-search sidebar__search-icon"></span>
|
<span onClick={this.clearFocus} className="search__clear">Cancel</span>
|
||||||
<form role="form" className="search__form relative-div" onSubmit={this.handleSubmit}>
|
<form role="form" className="search__form relative-div" onSubmit={this.handleSubmit}>
|
||||||
|
<span className="glyphicon glyphicon-search sidebar__search-icon"></span>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
ref="search"
|
ref="search"
|
||||||
className="form-control search-bar-box"
|
className="form-control search-bar"
|
||||||
placeholder="Search"
|
placeholder="Search"
|
||||||
value={this.state.search_term}
|
value={this.state.search_term}
|
||||||
onFocus={this.handleUserFocus}
|
onFocus={this.handleUserFocus}
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ var NavbarDropdown = React.createClass({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<ul className="nav navbar-nav navbar-right">
|
<ul className="nav navbar-nav navbar-right">
|
||||||
<li className="dropdown">
|
<li className="dropdown" id="myDropdown">
|
||||||
<a href="#" className="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
<a href="#" className="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||||
<span className="dropdown__icon" dangerouslySetInnerHTML={{__html: Constants.MENU_ICON }} />
|
<span className="dropdown__icon" dangerouslySetInnerHTML={{__html: Constants.MENU_ICON }} />
|
||||||
</a>
|
</a>
|
||||||
@@ -107,6 +107,12 @@ module.exports = React.createClass({
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
toggleDropdown: function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
$('.team__header').find('.dropdown-toggle').trigger('click');
|
||||||
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
var me = UserStore.getCurrentUser();
|
var me = UserStore.getCurrentUser();
|
||||||
|
|
||||||
@@ -116,7 +122,7 @@ module.exports = React.createClass({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="team__header theme">
|
<div className="team__header theme">
|
||||||
<a className="settings_link" href="#" data-toggle="modal" data-target="#user_settings1">
|
<a href="#" onClick={this.toggleDropdown}>
|
||||||
{ me.last_picture_update ?
|
{ me.last_picture_update ?
|
||||||
<img className="user__picture" src={"/api/v1/users/" + me.id + "/image?time=" + me.update_at} />
|
<img className="user__picture" src={"/api/v1/users/" + me.id + "/image?time=" + me.update_at} />
|
||||||
:
|
:
|
||||||
|
|||||||
@@ -84,8 +84,31 @@
|
|||||||
// Team Header in Sidebar
|
// Team Header in Sidebar
|
||||||
.sidebar--left, .sidebar--menu {
|
.sidebar--left, .sidebar--menu {
|
||||||
.team__header {
|
.team__header {
|
||||||
padding: 10px;
|
position: relative;
|
||||||
@include legacy-pie-clearfix;
|
@include legacy-pie-clearfix;
|
||||||
|
&:before {
|
||||||
|
@include single-transition(all, 0.05s, linear);
|
||||||
|
content: "";
|
||||||
|
background: none;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
&:hover {
|
||||||
|
&:before {
|
||||||
|
background: rgba(black, 0.05);
|
||||||
|
}
|
||||||
|
.user__name {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.navbar-right {
|
||||||
|
.dropdown-toggle {
|
||||||
|
@include opacity(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
a {
|
a {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
@@ -94,12 +117,11 @@
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
top: 10px;
|
top: 10px;
|
||||||
right: 22px;
|
right: 22px;
|
||||||
|
z-index: 5;
|
||||||
.dropdown-toggle {
|
.dropdown-toggle {
|
||||||
|
@include single-transition(all, 0.1s, linear);
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
@include opacity(0.8);
|
@include opacity(0.8);
|
||||||
&:hover {
|
|
||||||
@include opacity(1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.dropdown-menu {
|
.dropdown-menu {
|
||||||
li a {
|
li a {
|
||||||
@@ -123,7 +145,9 @@
|
|||||||
}
|
}
|
||||||
.header__info {
|
.header__info {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
padding-left: 4px;
|
padding: 10px 10px 10px 14px;
|
||||||
|
z-index: 1;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
.team__name, .user__name {
|
.team__name, .user__name {
|
||||||
display: block;
|
display: block;
|
||||||
@@ -137,9 +161,11 @@
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
.user__name {
|
.user__name {
|
||||||
|
@include single-transition(all, 0.1s, linear);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #eee;
|
color: #eee;
|
||||||
|
color: rgba(#fff, 0.8);
|
||||||
}
|
}
|
||||||
> .nav {
|
> .nav {
|
||||||
> li {
|
> li {
|
||||||
@@ -250,10 +276,10 @@
|
|||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 15px;
|
width: 15px;
|
||||||
margin: 9px 4px 3px 0;
|
margin: 9px 6px 3px 0;
|
||||||
&:hover {
|
&:hover {
|
||||||
svg {
|
svg {
|
||||||
fill: #888;
|
fill: #777;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
a {
|
a {
|
||||||
@@ -263,6 +289,6 @@
|
|||||||
svg {
|
svg {
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
fill: #AAA;
|
fill: #aaa;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -448,28 +448,39 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.search-bar__container {
|
.search-bar__container {
|
||||||
padding: 10px 8px 13px;
|
padding: 0;
|
||||||
|
height: 45px;
|
||||||
background: $primary-color;
|
background: $primary-color;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
&.focused {
|
||||||
|
.sidebar__collapse {
|
||||||
|
@include translateX(-45px);
|
||||||
|
}
|
||||||
|
.search__form {
|
||||||
|
padding-left: 10px;
|
||||||
|
padding-right: 67px;
|
||||||
|
}
|
||||||
|
.search__clear {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
.search__form {
|
.search__form {
|
||||||
border: none;
|
border: none;
|
||||||
padding: 0 60px 0 35px;
|
padding: 7px 20px 0 45px;
|
||||||
|
height: 45px;
|
||||||
|
position: relative;
|
||||||
|
@include single-transition(all, 0.2s, linear);
|
||||||
.form-control {
|
.form-control {
|
||||||
line-height: normal;
|
border: none;
|
||||||
background: none;
|
padding: 0 10px 0 31px;
|
||||||
|
background: rgba(black, 0.2);
|
||||||
|
@include border-radius(3px);
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border-radius: 0;
|
|
||||||
padding: 0;
|
|
||||||
border-bottom: 1px solid #FFF;
|
|
||||||
border-bottom: 1px solid rgba(#fff, 0.4);
|
|
||||||
&:focus {
|
|
||||||
border-bottom: 1px solid rgba(#fff, 0.8);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
input[type=text] {
|
input[type=text] {
|
||||||
@include input-placeholder {
|
@include input-placeholder {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
color: rgba(#fff, 0.6);
|
color: rgba(#fff, 0.5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -550,11 +561,6 @@
|
|||||||
.sidebar--right__close {
|
.sidebar--right__close {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.search__form {
|
|
||||||
.glyphicon {
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.inner__wrap {
|
.inner__wrap {
|
||||||
&.move--right {
|
&.move--right {
|
||||||
@@ -650,7 +656,7 @@
|
|||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
.access__report {
|
.access__report {
|
||||||
margin: 0 0 15px 15px;
|
margin: 0 0 15px 15px;
|
||||||
}
|
}
|
||||||
.access__date {
|
.access__date {
|
||||||
div {
|
div {
|
||||||
|
|||||||
@@ -1,23 +1,37 @@
|
|||||||
.search-bar__container {
|
.search-bar__container {
|
||||||
padding: 8px 8px 8px 0;
|
padding: 8px 8px 8px 0;
|
||||||
}
|
}
|
||||||
.sidebar__collapse {
|
.search__clear {
|
||||||
width: auto;
|
display: none;
|
||||||
height: auto;
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 1px;
|
right: 0;
|
||||||
right: 15px;
|
line-height: 45px;
|
||||||
cursor: pointer;
|
margin-right: 13px;
|
||||||
padding: 1em 0;
|
|
||||||
z-index: 5;
|
z-index: 5;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.sidebar__collapse {
|
||||||
|
cursor: pointer;
|
||||||
|
z-index: 5;
|
||||||
|
fill: #FFF;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
font-size: 33px;
|
||||||
|
width: 45px;
|
||||||
|
@include single-transition(all, 0.2s, linear);
|
||||||
|
@include translateX(0px);
|
||||||
|
text-align: center;
|
||||||
|
padding-right: 2px;
|
||||||
|
line-height: 42px;
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.sidebar__search-icon {
|
.sidebar__search-icon {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 15px;
|
top: 15px;
|
||||||
top: 18px;
|
margin-left: 10px;
|
||||||
font-size: 16px;
|
font-size: 14px;
|
||||||
@include opacity(0.8);
|
color: #fff;
|
||||||
|
color: rgba(#fff, 0.5);
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.search__form {
|
.search__form {
|
||||||
@@ -30,9 +44,8 @@
|
|||||||
.sidebar--right & {
|
.sidebar--right & {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.search-bar-box {
|
.search-bar {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
border: 1px solid #ddd;
|
|
||||||
padding-right: 30px;
|
padding-right: 30px;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
.search-bar__container & {
|
.search-bar__container & {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user