summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--LICENSE.txt2
-rw-r--r--api/post.go6
-rw-r--r--config/config.json4
-rw-r--r--doc/developer/tests/test-attachments.md144
-rw-r--r--doc/developer/tests/test-markdown-lists.md53
-rw-r--r--doc/developer/tests/test-syntax-highlighting.md231
-rw-r--r--doc/developer/tests/test-tables.md80
-rw-r--r--doc/help/Sign-in.md14
-rw-r--r--doc/install/Requirements.md6
-rw-r--r--docker/dev/config_docker.json4
-rw-r--r--docker/local/config_docker.json4
-rw-r--r--model/config.go4
-rw-r--r--web/react/components/search_results_item.jsx22
-rw-r--r--web/react/components/team_signup_with_email.jsx19
-rw-r--r--web/react/dispatcher/event_helpers.jsx25
-rw-r--r--web/sass-files/sass/partials/_search.scss7
16 files changed, 593 insertions, 32 deletions
diff --git a/LICENSE.txt b/LICENSE.txt
index 88200cdba..b05ccb408 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -4,7 +4,7 @@ SOFTWARE LICENSING
You are licensed to use compiled versions of the Mattermost platform produced by Mattermost, Inc. under an MIT LICENSE
-- See MIT-COMPILED-LICENSE.md included in compiled versions for details.
+- See MIT-COMPILED-LICENSE.md included in compiled versions for details
You may be licensed to use source code to create compiled versions not produced by Mattermost, Inc. in one of two ways:
diff --git a/api/post.go b/api/post.go
index e1adc1d98..6736d75e2 100644
--- a/api/post.go
+++ b/api/post.go
@@ -565,7 +565,11 @@ func sendNotificationsAndForget(c *Context, post *model.Post, team *model.Team,
msg.DeviceId = strings.TrimPrefix(session.DeviceId, "apple:")
msg.ServerId = utils.CfgDiagnosticId
- msg.Message = profileMap[id].FirstName + " mentioned you in " + channel.DisplayName
+ if channel.Type == model.CHANNEL_DIRECT {
+ msg.Message = channelName + " sent you a direct message"
+ } else {
+ msg.Message = profileMap[id].FirstName + " mentioned you in " + channelName
+ }
httpClient := http.Client{}
request, _ := http.NewRequest("POST", *utils.Cfg.EmailSettings.PushNotificationServer+"/api/v1/send_push", strings.NewReader(msg.ToJson()))
diff --git a/config/config.json b/config/config.json
index 999ea8a83..4220d1055 100644
--- a/config/config.json
+++ b/config/config.json
@@ -68,8 +68,8 @@
"ConnectionSecurity": "",
"InviteSalt": "bjlSR4QqkXFBr7TP4oDzlfZmcNuH9YoS",
"PasswordResetSalt": "vZ4DcKyVVRlKHHJpexcuXzojkE5PZ5eL",
- "SendPushNotifications": true,
- "PushNotificationServer": "https://push.mattermost.com"
+ "SendPushNotifications": false,
+ "PushNotificationServer": ""
},
"RateLimitSettings": {
"EnableRateLimiter": true,
diff --git a/doc/developer/tests/test-attachments.md b/doc/developer/tests/test-attachments.md
new file mode 100644
index 000000000..71cc496ce
--- /dev/null
+++ b/doc/developer/tests/test-attachments.md
@@ -0,0 +1,144 @@
+# Testing Files and Attachments
+This test contains instructions for the core team to manually test common attachment types. All files for testing are stored in the [mm_file_testing](https://www.dropbox.com/sh/i7ft8is5hbhk8ii/AAAyM-WG-X2jiQOgg6-E3MmLa?dl=0) dropbox folder. Follow these instructions:
+
+1. Download the entire [mm_file_testing](https://www.dropbox.com/sh/i7ft8is5hbhk8ii/AAAyM-WG-X2jiQOgg6-E3MmLa?dl=0) folder.
+2. Drag and drop each file type into Mattermost to upload it.
+3. Post the file attachment
+
+**Notes:**
+- All file types should upload and post.
+- Read the expected for details on the behavior of the thumbnail and preview window.
+- The expected behavior of video and audio formats depends on the operating system, browser and plugins. View the permalinks to the Public Test Channel on Pre-Release Core to see the expected cases.
+
+
+### Images
+**JPG**
+`Images/JPG.jpg`
+Expected: Scaled thumbnail & preview window
+[Permalink](https://pre-release.mattermost.com/core/pl/bgx3wcd9ppdo7fz9zqokofg7sc)
+
+**PNG**
+`Images/PNG.png`
+Expected: Scaled thumbnail & preview window
+[Permalink](https://pre-release.mattermost.com/core/pl/zra4yhm69j8ij81iy5hw7983qe)
+
+**BMP**
+`Images/BMP.bmp`
+Expected: Scaled thumbnail & preview window
+[Permalink](https://pre-release.mattermost.com/core/pl/1hx7x7t1npn4jqyr5rb1qhbj3h)
+
+**GIF**
+`Images/GIF.gif`
+Expected: Scaled thumbnail & preview window. Click to play GIF.
+[Permalink](https://pre-release.mattermost.com/core/pl/j49fowdkstr57g3ed9bgpfoo5w)
+
+**TIFF**
+`Images/TIFF.tiff`
+Expected: Generic attachment thumbnail & preview window
+[Permalink](https://pre-release.mattermost.com/core/pl/6yad4jydaidr3pc3tihp8n8bge)
+
+**PSD**
+`Images/PSD.psd`
+Expected: Generic attachment thumbnail & preview window
+[Permalink](https://pre-release.mattermost.com/core/pl/4kitwk7pi78c9ck4i98f9xnzoe)
+
+
+### Documents
+
+**PDF Files**
+`Documents/PDF.pdf`
+Expected: Generic PDF thumbnail & preview window.
+[Permalink](https://pre-release.mattermost.com/core/pl/o1dg6menetdszrhyxmtoqjfi8h)
+
+
+**Excel**
+`Documents/Excel.xlsx`
+Expected: Generic Excel thumbnail & preview window.
+[Permalink](https://pre-release.mattermost.com/core/pl/71wwezy3f7drze6ipundscb17y)
+
+
+**PPT**
+`Documents/PPT.pptx`
+Expected: Generic Powerpoint thumbnail & preview window.
+[Permalink](https://pre-release.mattermost.com/core/pl/mx37h4znwb8f5ffuoajusqhiew)
+
+**Word**
+`Documents/Word.docx`
+Expected: Generic Word thumbnail & preview window.
+[Permalink](https://pre-release.mattermost.com/core/pl/d7s76wp6kjdwfp4hgrwpijsnyy)
+
+
+### Videos
+
+**MP4**
+`Videos/MP4.mp4`
+Expected: Generic video thumbnail & playable preview window
+[Permalink](https://pre-release.mattermost.com/core/pl/5dx5qx9t9brqfnhohccxjynx7c)
+
+**AVI**
+`Videos/AVI.avi`
+Expected: View Permalink. Expected depends on the operating system, browser and plugins.
+[Permalink](https://pre-release.mattermost.com/core/pl/qwn9eiy7j3rkjyruxhcugpogdw)
+
+**MKV**
+`Videos/MKV.mkv`
+Expected: View Permalink. Expected depends on the operating system, browser and plugins.
+[Permalink](https://pre-release.mattermost.com/core/pl/tszyjkr1cidhxjgiusa4mde3ja)
+
+**MOV**
+`Videos/MOV.mov`
+Expected: View Permalink. Expected depends on the operating system, browser and plugins.
+[Permalink](https://pre-release.mattermost.com/core/pl/ienzppz5i3f7tbt5jiujn8uuir)
+
+**MPG**
+`Videos/MPG.mpg`
+Expected: View Permalink. Expected depends on the operating system, browser and plugins.
+[Permalink](https://pre-release.mattermost.com/core/pl/skggdq1hfpritc6c88bi481p5a)
+
+**Webm**
+`Videos/WEBM.webm`
+Expected: View Permalink. Expected depends on the operating system, browser and plugins.
+[Permalink](https://pre-release.mattermost.com/core/pl/7h8tysuxgfgsxeht3sbn7e4h6y)
+
+**WMV**
+`Videos/WMV.wmv`
+Expected: View Permalink. Expected depends on the operating system, browser and plugins.
+[Permalink](https://pre-release.mattermost.com/core/pl/kaom7j7uyjra7bzhrre6qwdrbw)
+
+### Audio
+
+**MP3**
+`Audio/MP3.mp3`
+Expected: Generic audio thumbnail & playable preview window
+[Permalink](https://pre-release.mattermost.com/core/pl/if4gn8dbrjgx8fmqmkukzefyme)
+
+
+**M4A**
+`Audio/M4a.m4a`
+Expected: Generic audio thumbnail & playable preview window
+[Permalink](https://pre-release.mattermost.com/core/pl/6c7qsw48ybd88bktgeykodsrrc)
+
+**AAC**
+`Audio/AAC.aac`
+Expected: View Permalink. Expected depends on the operating system, browser and plugins.
+[Permalink](https://pre-release.mattermost.com/core/pl/3naoy5pr5tydbk1m6yo1ast9ny)
+
+**FLAC**
+`Audio/FLAC.flac`
+Expected: View Permalink. Expected depends on the operating system, browser and plugins.
+[Permalink](https://pre-release.mattermost.com/core/pl/kf4cmy44dfya5efmse7rg43eih)
+
+**OGG**
+`Audio/OGG.ogg`
+Expected: View Permalink. Expected depends on the operating system, browser and plugins.
+[Permalink](https://pre-release.mattermost.com/core/pl/dezrcpbxapyexe77rjuzkrp63r)
+
+**WAV**
+`Audio/WAV.wav`
+Expected: View Permalink. Expected depends on the operating system, browser and plugins.
+[Permalink](https://pre-release.mattermost.com/core/pl/pdkxx1udepdnbmi9j8kyas5xbh)
+
+**WMA**
+`Audio/WMA.wma`
+Expected: View Permalink. Expected depends on the operating system, browser and plugins.
+[Permalink](https://pre-release.mattermost.com/core/pl/756wrmdd57dcig3m4emypp6i1h)
diff --git a/doc/developer/tests/test-markdown-lists.md b/doc/developer/tests/test-markdown-lists.md
index 905350d31..d5bbd82ac 100644
--- a/doc/developer/tests/test-markdown-lists.md
+++ b/doc/developer/tests/test-markdown-lists.md
@@ -21,6 +21,7 @@ Verify that all list types render as expected.
```
**Actual:**
+
3. One
2. Two
1. Three
@@ -38,12 +39,13 @@ Verify that all list types render as expected.
```
**Actual:**
-1. Alpha
- 1. Bravo
+
+1. Alpha
+ 1. Bravo
1. Charlie
1. Delta
- 1. Echo
- 1. Foxtrot
+ 1. Echo
+ 1. Foxtrot
### Single-item Unordered List
@@ -99,6 +101,7 @@ Verify that all list types render as expected.
```
**Actual:**
+
1. One
+ Two
- Three
@@ -169,10 +172,11 @@ Verify that all list types render as expected.
```
**Actual:**
+
1. One
- - Two
-
-
+ - Two
+
+
1. One
2. Two
@@ -186,7 +190,42 @@ This text should be on a new line.
```
**Actual:**
+
1. One
- Two
This text should be on a new line.
+### Task Lists
+
+**Expected:**
+```
+[ ] One
+ [ ] Subpoint one
+ - Normal Bullet
+[ ] Two
+[x] Completed item
+```
+
+**Actual:**
+
+- [ ] One
+ - [ ] Subpoint one
+ - Normal Bullet
+- [ ] Two
+- [x] Completed item
+
+### Numbered Task Lists
+
+**Expected:**
+```
+1. [ ] One
+2. [ ] Two
+3. [x] Completed item
+```
+
+**Actual:**
+
+1. [ ] One
+2. [ ] Two
+3. [x] Completed item
+
diff --git a/doc/developer/tests/test-syntax-highlighting.md b/doc/developer/tests/test-syntax-highlighting.md
new file mode 100644
index 000000000..7f8f4cdaa
--- /dev/null
+++ b/doc/developer/tests/test-syntax-highlighting.md
@@ -0,0 +1,231 @@
+# Code Syntax Highlighting
+
+Verify the following code blocks render as code blocks and highlight properly.
+
+### Diff
+
+``` diff
+*** /path/to/original ''timestamp''
+--- /path/to/new ''timestamp''
+***************
+*** 1 ****
+! This is a line.
+--- 1 ---
+! This is a replacement line.
+It is important to spell
+-removed line
++new line
+```
+
+### Apache
+
+``` apache
+<VirtualHost *:80>
+DocumentRoot /www/example1
+ServerName www.example.com
+</VirtualHost>
+```
+
+### Makefile
+
+``` makefile
+CC=gcc
+CFLAGS=-I.
+
+hellomake: hellomake.o hellofunc.o
+ $(CC) -o hellomake hellomake.o hellofunc.o -I.
+```
+
+### HTTP
+
+``` http
+HTTP/1.1 200 OK
+Date: Sun, 28 Dec 2014 08:56:53 GMT
+Content-Length: 44
+Content-Type: text/html
+
+<html><body><h1>It works!</h1></body></html>
+```
+
+### JSON
+
+``` json
+{"employees":[
+ {"firstName":"John", "lastName":"Doe"},
+]}
+```
+
+### Markdown
+
+``` markdown
+**bold**
+*italics*
+[link](www.example.com)
+```
+
+### JavaScript
+
+``` javascript
+document.write('Hello, world!');
+```
+
+### CSS
+
+``` css
+body {
+ background-color: red;
+}
+```
+
+### NGINX
+
+``` nginx
+server { # simple reverse-proxy
+ listen 80;
+ server_name domain2.com www.domain2.com;
+ access_log logs/domain2.access.log main;
+```
+
+### Objective C
+
+``` objectivec
+#import <stdio.h>
+
+int main (void)
+{
+ printf ("Hello world!\n");
+}
+```
+
+### Python
+
+``` python
+print "Hello, world!"
+```
+
+### XML
+
+``` xml
+<employees>
+ <employee>
+ <firstName>John</firstName> <lastName>Doe</lastName>
+ </employee>
+</employees>
+```
+
+### Perl
+
+``` perl
+print "Hello, World!\n";
+```
+
+### Bash
+
+``` bash
+echo "Hello World"
+```
+
+### PHP
+
+``` php
+ <?php echo '<p>Hello World</p>'; ?>
+```
+
+### CoffeeScript
+
+``` coffee
+console.log(“Hello world!”);
+```
+
+### C#
+
+``` cs
+using System;
+class Program
+{
+ public static void Main(string[] args)
+ {
+ Console.WriteLine("Hello, world!");
+ }
+}
+```
+
+### C++
+
+``` cpp
+#include <iostream.h>
+
+main()
+{
+ cout << "Hello World!";
+ return 0;
+}
+```
+
+### SQL
+
+``` sql
+SELECT column_name,column_name
+FROM table_name;
+```
+
+### Go
+
+``` go
+package main
+import "fmt"
+func main() {
+ fmt.Println("Hello, 世界")
+}
+```
+
+### Ruby
+
+``` ruby
+puts "Hello, world!"
+```
+
+### Java
+
+``` java
+import javax.swing.JFrame; //Importing class JFrame
+import javax.swing.JLabel; //Importing class JLabel
+public class HelloWorld {
+ public static void main(String[] args) {
+ JFrame frame = new JFrame(); //Creating frame
+ frame.setTitle("Hi!"); //Setting title frame
+ frame.add(new JLabel("Hello, world!"));//Adding text to frame
+ frame.pack(); //Setting size to smallest
+ frame.setLocationRelativeTo(null); //Centering frame
+ frame.setVisible(true); //Showing frame
+ }
+}
+```
+
+### INI
+
+``` ini
+; last modified 1 April 2011 by John Doe
+[owner]
+name=John Doe
+organization=Mattermost
+```
+
+### Latex Equation
+
+``` latex
+\frac{d}{dx}\left( \int_{0}^{x} f(u)\,du\right)=f(x).
+```
+
+### Latex Document
+
+``` latex
+\documentclass{article}
+\begin{document}
+\noindent
+Are $a, b \in \mathbb{R}, then applies (a+b)^{2} = a^{2} + ab + b^{2} $ \\
+better \\
+are $a, b \in \mathbb{R}, \textrm{then applies} \, (a+b)^{2 } = a^{2 } + ab + b^{2}$\\
+\end{document}
+```
+
diff --git a/doc/developer/tests/test-tables.md b/doc/developer/tests/test-tables.md
new file mode 100644
index 000000000..87d8af856
--- /dev/null
+++ b/doc/developer/tests/test-tables.md
@@ -0,0 +1,80 @@
+# Markdown Tables
+
+Verify that all tables render as described.
+
+### Normal Tables
+
+These tables use different raw text as inputs, but all three should render as the same table.
+
+#### Table 1
+
+Raw text:
+
+```
+First Header | Second Header
+------------- | -------------
+Content Cell | Content Cell
+Content Cell | Content Cell
+```
+
+Renders as:
+
+First Header | Second Header
+------------- | -------------
+Content Cell | Content Cell
+Content Cell | Content Cell
+
+#### Table 2
+
+Raw Text:
+
+```
+| First Header | Second Header |
+| ------------- | ------------- |
+| Content Cell | Content Cell |
+| Content Cell | Content Cell |
+```
+
+Renders as:
+
+| First Header | Second Header |
+| ------------- | ------------- |
+| Content Cell | Content Cell |
+| Content Cell | Content Cell |
+
+#### Table 3
+
+Raw Text:
+
+```
+| First Header | Second Header |
+| ------------- | ----------- |
+| Content Cell | Content Cell|
+| Content Cell | Content Cell |
+```
+
+Renders as:
+
+| First Header | Second Header |
+| ------------- | ----------- |
+| Content Cell | Content Cell|
+| Content Cell | Content Cell |
+
+### Tables Containing Markdown
+
+This table should contain A1: Strikethrough, A2: Bold, B1: Italics, B2: Dolphin emoticon.
+
+| Column\Row | 1 | 2 |
+| ------------- | ------------- |------------- |
+| A | ~~Strikethrough~~ | **Bold** |
+| B | _italics_ | :dolphin: |
+
+### Table with Left, Center, and Right Aligned Columns
+
+The left column should be left aligned, the center column centered and the right column should be right aligned.
+
+| Left-Aligned | Center Aligned | Right Aligned |
+| :------------ |:---------------:| -----:|
+| 1 | this text | $100 |
+| 2 | is | $10 |
+| 3 | centered | $1 |
diff --git a/doc/help/Sign-in.md b/doc/help/Sign-in.md
index f8e353cce..5b7b375c7 100644
--- a/doc/help/Sign-in.md
+++ b/doc/help/Sign-in.md
@@ -2,22 +2,26 @@
You can sign-in to your team from the web address of `https://domain.com/teamname`.
-There are several options for signing in depending on how your System Administrator has configured your server.
+There are several options for signing in to your team depending on how your System Administrator has configured your server.
#### Email address and password sign-in
-If available, you can sign in using the combination of email address and password used to create your account.
+When enabled by your System Administrator, you can sign in using the combination of email address and password used to create your account.
If you have forgotten your password, you should be able to reset it from the "I forgot my password" option on the sign-in screen, or contact your System Administrator if you need help resetting your password.
#### GitLab Single-Sign-On (SSO) option
-If available, you can sign in using your GitLab account using a one-click sign-in option. GitLab SSO lets you create teams, create accounts on teams, and sign-in to teams using one username, email address, and password that works across everything on the server.
+When enabled by your System Administrator, you can sign-in using your GitLab account using a one-click sign-in option. GitLab SSO lets you create teams, create accounts on teams, and sign-in to teams using one username, email address, and password that works across everything on the server.
#### Switching Teams
-You can switch among teams you've recently signed into using the main menu in any team site on the server. By default, devices remember which teams you have signed into for 30 days, and this duration is configurable by the System Administrator.
+When you've used the same email address to sign-up and sign-in to multiple teams, you can switch among those teams using the main menu in any team site on the server. By default, devices remember which teams you have signed into for 30 days.
+
+#### System Adminstrator Role
+
+If your account in a given team has been given the System Administrator role, it has access to the System Console. The System Administrator role does not apply to accounts created in other teams using the same email address, since user accounts are unique to teams.
#### Logging Out
-You can log out from the main menu, which is accessed by clicking the three dots in the top header on the left side of the screen. Clicking "Logout" logs you out of all the teams you are signed into on the site.
+You can log out from the main menu, which is accessed by clicking the three dots in the top header on the left side of the screen. Clicking "Logout" logs you out of all the teams you are signed-in to that share the same email address.
diff --git a/doc/install/Requirements.md b/doc/install/Requirements.md
index b877b6dc0..162caf90d 100644
--- a/doc/install/Requirements.md
+++ b/doc/install/Requirements.md
@@ -4,10 +4,10 @@
Supported Operating Systems and Browsers for the Mattermost Web Client include:
-- PC: Windows 7, Windows 8 (Chrome 43+, Firefox 38+, Internet Explorer 10+)
-- Mac: OS 10 (Safari 7, Chrome 43+)
+- PC: Windows 7, Windows 8, Windows 10 (Chrome 43+, Firefox 38+, Internet Explorer 11, Edge)
+- Mac: OS 10 (Safari 9, Chrome 43+)
- Linux: Arch 4.0.0 (Chrome 43+)
-- iPhone 4s and higher (Safari on iOS 8.3+, Chrome 43+)
+- iPhone 4s and higher (Safari on iOS 9+, Chrome 43+)
- Android 5 and higher (Chrome 43+)
### Email Client
diff --git a/docker/dev/config_docker.json b/docker/dev/config_docker.json
index 4c5502ddd..a35abb9da 100644
--- a/docker/dev/config_docker.json
+++ b/docker/dev/config_docker.json
@@ -68,8 +68,8 @@
"ConnectionSecurity": "",
"InviteSalt": "bjlSR4QqkXFBr7TP4oDzlfZmcNuH9YoS",
"PasswordResetSalt": "vZ4DcKyVVRlKHHJpexcuXzojkE5PZ5eL",
- "SendPushNotifications": true,
- "PushNotificationServer": "https://push.mattermost.com"
+ "SendPushNotifications": false,
+ "PushNotificationServer": ""
},
"RateLimitSettings": {
"EnableRateLimiter": true,
diff --git a/docker/local/config_docker.json b/docker/local/config_docker.json
index 4c5502ddd..a35abb9da 100644
--- a/docker/local/config_docker.json
+++ b/docker/local/config_docker.json
@@ -68,8 +68,8 @@
"ConnectionSecurity": "",
"InviteSalt": "bjlSR4QqkXFBr7TP4oDzlfZmcNuH9YoS",
"PasswordResetSalt": "vZ4DcKyVVRlKHHJpexcuXzojkE5PZ5eL",
- "SendPushNotifications": true,
- "PushNotificationServer": "https://push.mattermost.com"
+ "SendPushNotifications": false,
+ "PushNotificationServer": ""
},
"RateLimitSettings": {
"EnableRateLimiter": true,
diff --git a/model/config.go b/model/config.go
index 869f975e6..14ce444c5 100644
--- a/model/config.go
+++ b/model/config.go
@@ -181,12 +181,12 @@ func (o *Config) SetDefaults() {
if o.EmailSettings.SendPushNotifications == nil {
o.EmailSettings.SendPushNotifications = new(bool)
- *o.EmailSettings.SendPushNotifications = true
+ *o.EmailSettings.SendPushNotifications = false
}
if o.EmailSettings.PushNotificationServer == nil {
o.EmailSettings.PushNotificationServer = new(string)
- *o.EmailSettings.PushNotificationServer = "https://push.mattermost.com"
+ *o.EmailSettings.PushNotificationServer = ""
}
}
diff --git a/web/react/components/search_results_item.jsx b/web/react/components/search_results_item.jsx
index cd8359df5..f71abf971 100644
--- a/web/react/components/search_results_item.jsx
+++ b/web/react/components/search_results_item.jsx
@@ -8,11 +8,14 @@ import * as EventHelpers from '../dispatcher/event_helpers.jsx';
import * as utils from '../utils/utils.jsx';
import * as TextFormatting from '../utils/text_formatting.jsx';
+import Constants from '../utils/constants.jsx';
+
export default class SearchResultsItem extends React.Component {
constructor(props) {
super(props);
this.handleClick = this.handleClick.bind(this);
+ this.handleFocusRHSClick = this.handleFocusRHSClick.bind(this);
}
handleClick(e) {
@@ -26,6 +29,12 @@ export default class SearchResultsItem extends React.Component {
}
}
+ handleFocusRHSClick(e) {
+ e.preventDefault();
+
+ EventHelpers.emitPostFocusRightHandSideEvent(this.props.post);
+ }
+
render() {
var channelName = '';
var channel = ChannelStore.get(this.props.post.channel_id);
@@ -73,10 +82,21 @@ export default class SearchResultsItem extends React.Component {
{'Jump'}
</a>
</li>
+ <li>
+ <a
+ href='#'
+ className='comment-icon__container search-item__comment'
+ onClick={this.handleFocusRHSClick}
+ >
+ <span
+ className='comment-icon'
+ dangerouslySetInnerHTML={{__html: Constants.COMMENT_ICON}}
+ />
+ </a>
+ </li>
</ul>
<div className='search-item-snippet'>
<span
- onClick={this.handleClick}
dangerouslySetInnerHTML={{__html: TextFormatting.formatText(this.props.post.message, formattingOptions)}}
/>
</div>
diff --git a/web/react/components/team_signup_with_email.jsx b/web/react/components/team_signup_with_email.jsx
index 06d6e3934..4150a0013 100644
--- a/web/react/components/team_signup_with_email.jsx
+++ b/web/react/components/team_signup_with_email.jsx
@@ -14,18 +14,19 @@ export default class EmailSignUpPage extends React.Component {
}
handleSubmit(e) {
e.preventDefault();
- var team = {};
- var state = {serverError: ''};
+ const team = {};
+ const state = {serverError: null};
+ let isValid = true;
team.email = ReactDOM.findDOMNode(this.refs.email).value.trim().toLowerCase();
if (!team.email || !Utils.isEmail(team.email)) {
state.emailError = 'Please enter a valid email address';
- state.inValid = true;
+ isValid = false;
} else {
- state.emailError = '';
+ state.emailError = null;
}
- if (state.inValid) {
+ if (!isValid) {
this.setState(state);
return;
}
@@ -45,11 +46,16 @@ export default class EmailSignUpPage extends React.Component {
);
}
render() {
- var serverError = null;
+ let serverError = null;
if (this.state.serverError) {
serverError = <div className='form-group has-error'><label className='control-label'>{this.state.serverError}</label></div>;
}
+ let emailError = null;
+ if (this.state.emailError) {
+ emailError = <div className='form-group has-error'><label className='control-label'>{this.state.emailError}</label></div>;
+ }
+
return (
<form
role='form'
@@ -65,6 +71,7 @@ export default class EmailSignUpPage extends React.Component {
maxLength='128'
spellCheck='false'
/>
+ {emailError}
</div>
<div className='form-group'>
<button
diff --git a/web/react/dispatcher/event_helpers.jsx b/web/react/dispatcher/event_helpers.jsx
index 306c59e8b..bc1132765 100644
--- a/web/react/dispatcher/event_helpers.jsx
+++ b/web/react/dispatcher/event_helpers.jsx
@@ -8,6 +8,7 @@ import Constants from '../utils/constants.jsx';
const ActionTypes = Constants.ActionTypes;
import * as AsyncClient from '../utils/async_client.jsx';
import * as Client from '../utils/client.jsx';
+import * as Utils from '../utils/utils.jsx';
export function emitChannelClickEvent(channel) {
AsyncClient.getChannels(true);
@@ -38,6 +39,30 @@ export function emitPostFocusEvent(postId) {
);
}
+export function emitPostFocusRightHandSideEvent(post) {
+ Client.getPost(
+ post.channel_id,
+ post.id,
+ (data) => {
+ AppDispatcher.handleServerAction({
+ type: ActionTypes.RECIEVED_POST_SELECTED,
+ post_list: data
+ });
+
+ AppDispatcher.handleServerAction({
+ type: ActionTypes.RECIEVED_SEARCH,
+ results: null
+ });
+ },
+ (err) => {
+ AsyncClient.dispatchError(err, 'getPost');
+ }
+ );
+
+ var postChannel = ChannelStore.get(post.channel_id);
+ Utils.switchChannel(postChannel);
+}
+
export function emitLoadMorePostsEvent() {
const id = ChannelStore.getCurrentId();
loadMorePostsTop(id);
diff --git a/web/sass-files/sass/partials/_search.scss b/web/sass-files/sass/partials/_search.scss
index a5b2a78dd..eceeb9a8c 100644
--- a/web/sass-files/sass/partials/_search.scss
+++ b/web/sass-files/sass/partials/_search.scss
@@ -121,6 +121,13 @@
}
+.search-item__comment {
+ position: absolute;
+ right: 0;
+ margin-right: 35px;
+ top: 0;
+}
+
.search-item-time {
color: #a8adb7;
}