summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/install/dev-setup.md8
-rw-r--r--web/react/components/post.jsx2
-rw-r--r--web/react/components/post_list.jsx12
-rw-r--r--web/react/package.json28
4 files changed, 28 insertions, 22 deletions
diff --git a/doc/install/dev-setup.md b/doc/install/dev-setup.md
index a088bbbc2..6d26cbd33 100644
--- a/doc/install/dev-setup.md
+++ b/doc/install/dev-setup.md
@@ -10,7 +10,7 @@ Developer Machine Setup
2. Get your Docker IP address with `boot2docker ip`
3. Add a line to your /etc/hosts that goes `<Docker IP> dockerhost`
4. Run `boot2docker shellinit` and copy the export statements to your ~/.bash_profile
-2. Download Go from http://golang.org/dl/
+2. Download Go (version 1.4.2) from http://golang.org/dl/
3. Set up your Go workspace
1. `mkdir ~/go`
2. Add the following to your ~/.bash_profile
@@ -28,7 +28,7 @@ Developer Machine Setup
`cd ~/go`
`mkdir -p src/github.com/mattermost`
`cd src/github.com/mattermost`
- `git clone github.com/mattermost/platform.git`
+ `git clone https://github.com/mattermost/platform.git`
`cd platform`
7. Run unit tests on Mattermost using `make test` to make sure the installation was successful
8. If tests passed, you can now run Mattermost using `make run`
@@ -50,7 +50,7 @@ Any issues? Please let us know on our forums at: http://forum.mattermost.org
`127.0.0.1 dockerhost`
3. Install build essentials
1. `apt-get install build-essential`
-4. Download Go from http://golang.org/dl/
+4. Download Go (version 1.4.2) from http://golang.org/dl/
5. Set up your Go workspace and add Go to the PATH
1. `mkdir ~/go`
2. Add the following to your ~/.bashrc
@@ -74,7 +74,7 @@ Any issues? Please let us know on our forums at: http://forum.mattermost.org
`cd ~/go`
`mkdir -p src/github.com/mattermost`
`cd src/github.com/mattermost`
- `git clone github.com/mattermost/platform.git`
+ `git clone https://github.com/mattermost/platform.git`
`cd platform`
9. Run unit tests on Mattermost using `make test` to make sure the installation was successful
10. If tests passed, you can now run Mattermost using `make run`
diff --git a/web/react/components/post.jsx b/web/react/components/post.jsx
index 37de4ecc0..d3c6befd0 100644
--- a/web/react/components/post.jsx
+++ b/web/react/components/post.jsx
@@ -152,7 +152,7 @@ export default class Post extends React.Component {
return (
<div>
<div
- id={post.id}
+ id={'post_' + post.id}
className={'post ' + sameUserClass + ' ' + rootUser + ' ' + postType + ' ' + currentUserCss}
>
{profilePic}
diff --git a/web/react/components/post_list.jsx b/web/react/components/post_list.jsx
index 9d95887d9..e6aa3f8df 100644
--- a/web/react/components/post_list.jsx
+++ b/web/react/components/post_list.jsx
@@ -189,9 +189,15 @@ export default class PostList extends React.Component {
this.scrollToBottom(true);
// the user clicked 'load more messages'
- } else if (this.gotMorePosts) {
- var lastPost = oldPosts[oldOrder[prevState.numToDisplay]];
- $('#' + lastPost.id)[0].scrollIntoView();
+ } else if (this.gotMorePosts && oldOrder.length > 0) {
+ let index;
+ if (prevState.numToDisplay >= oldOrder.length) {
+ index = oldOrder.length - 1;
+ } else {
+ index = prevState.numToDisplay;
+ }
+ const lastPost = oldPosts[oldOrder[index]];
+ $('#post_' + lastPost.id)[0].scrollIntoView();
this.gotMorePosts = false;
} else {
this.scrollTo(this.prevScrollTop);
diff --git a/web/react/package.json b/web/react/package.json
index da55dc2b8..e55722152 100644
--- a/web/react/package.json
+++ b/web/react/package.json
@@ -3,22 +3,22 @@
"version": "0.0.1",
"private": true,
"dependencies": {
- "autolinker": "^0.18.1",
- "flux": "^2.1.1",
- "keymirror": "^0.1.1",
- "object-assign": "^3.0.0",
- "react": "^0.13.3",
- "react-zeroclipboard-mixin": "^0.1.0",
- "twemoji": "^1.4.1"
+ "autolinker": "0.18.1",
+ "flux": "2.1.1",
+ "keymirror": "0.1.1",
+ "object-assign": "3.0.0",
+ "react": "0.13.3",
+ "react-zeroclipboard-mixin": "0.1.0",
+ "twemoji": "1.4.1"
},
"devDependencies": {
- "browserify": "^11.0.1",
- "envify": "^3.4.0",
- "babelify": "^6.1.3",
- "uglify-js": "^2.4.24",
- "watchify": "^3.3.1",
- "eslint": "^1.3.1",
- "eslint-plugin-react": "^3.3.1"
+ "browserify": "11.0.1",
+ "envify": "3.4.0",
+ "babelify": "6.1.3",
+ "uglify-js": "2.4.24",
+ "watchify": "3.3.1",
+ "eslint": "1.3.1",
+ "eslint-plugin-react": "3.3.1"
},
"scripts": {
"start": "watchify --extension=jsx -o ../static/js/bundle.js -v -d ./**/*.jsx",