Этот коммит содержится в:
Asaad Mahmood
2016-01-07 13:07:22 +05:00
родитель 5bcb9f1c50
Коммит d9f5e0097b
5 изменённых файлов: 13 добавлений и 5 удалений

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

@@ -266,7 +266,7 @@ export default class FileAttachment extends React.Component {
href={fileUrl} href={fileUrl}
download={filenameString} download={filenameString}
data-toggle='tooltip' data-toggle='tooltip'
title={'Download ' + filenameString} title={'Download \"' + filenameString + '\"'}
className='post-image__name' className='post-image__name'
> >
{trimmedFilename} {trimmedFilename}

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

@@ -223,13 +223,13 @@ export default class PostInfo extends React.Component {
/> />
</li> </li>
<li className='col col__reply'> <li className='col col__reply'>
{comments}
<div <div
className='dropdown' className='dropdown'
ref='dotMenu' ref='dotMenu'
> >
{dropdown} {dropdown}
</div> </div>
{comments}
<Overlay <Overlay
show={this.state.show} show={this.state.show}
target={() => ReactDOM.findDOMNode(this.refs.dotMenu)} target={() => ReactDOM.findDOMNode(this.refs.dotMenu)}

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

@@ -24,6 +24,7 @@ export default class PostsView extends React.Component {
this.updateScrolling = this.updateScrolling.bind(this); this.updateScrolling = this.updateScrolling.bind(this);
this.handleResize = this.handleResize.bind(this); this.handleResize = this.handleResize.bind(this);
this.scrollToBottom = this.scrollToBottom.bind(this); this.scrollToBottom = this.scrollToBottom.bind(this);
this.scrollToBottomAnimated = this.scrollToBottomAnimated.bind(this);
this.jumpToPostNode = null; this.jumpToPostNode = null;
this.wasAtBottom = true; this.wasAtBottom = true;
@@ -339,6 +340,10 @@ export default class PostsView extends React.Component {
this.refs.postlist.scrollTop = this.refs.postlist.scrollHeight; this.refs.postlist.scrollTop = this.refs.postlist.scrollHeight;
}); });
} }
scrollToBottomAnimated() {
var postList = $(this.refs.postlist);
postList.animate({scrollTop:this.refs.postlist.scrollHeight}, '500');
}
componentDidMount() { componentDidMount() {
if (this.props.postList != null) { if (this.props.postList != null) {
this.updateScrolling(); this.updateScrolling();
@@ -458,7 +463,7 @@ export default class PostsView extends React.Component {
<ScrollToBottomArrows <ScrollToBottomArrows
isScrolling={this.state.isScrolling} isScrolling={this.state.isScrolling}
atBottom={this.wasAtBottom} atBottom={this.wasAtBottom}
onClick={this.scrollToBottom} onClick={this.scrollToBottomAnimated}
/> />
<div <div
ref='postlist' ref='postlist'

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

@@ -286,8 +286,10 @@ body.ios {
z-index: 50; z-index: 50;
@include opacity(0); @include opacity(0);
@include single-transition(all, 0.3s); @include single-transition(all, 0.3s);
display: none;
&.scrolling { &.scrolling {
display: block;
@include opacity(1); @include opacity(1);
} }
} }
@@ -601,6 +603,7 @@ body.ios {
right: 0; right: 0;
top: 30px; top: 30px;
width: 65px; width: 65px;
white-space: nowrap;
} }
.permalink-popover { .permalink-popover {
@@ -634,8 +637,7 @@ body.ios {
.dropdown { .dropdown {
display: inline-block; display: inline-block;
visibility: hidden; visibility: hidden;
position: absolute; margin-right: 5px;
right: 0;
top: -1px; top: -1px;
.dropdown-menu { .dropdown-menu {

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

@@ -25,6 +25,7 @@
.col__reply { .col__reply {
top: 0; top: 0;
text-align: right;
} }
} }