summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-09-10 08:23:31 -0400
committerChristopher Speller <crspeller@gmail.com>2015-09-10 08:23:31 -0400
commit74155b3dfaaa65e6468f912c2ce5f62b81f4b8e6 (patch)
tree21c96ea7f07d1868e6a388ae99d8066b8f29dc67 /web
parentd0c8b3d656618f6efeea11d680c532381fcb81f0 (diff)
parent1f5e43b38817b8c6a3b121d6bd4447411e135f5d (diff)
downloadchat-74155b3dfaaa65e6468f912c2ce5f62b81f4b8e6.tar.gz
chat-74155b3dfaaa65e6468f912c2ce5f62b81f4b8e6.tar.bz2
chat-74155b3dfaaa65e6468f912c2ce5f62b81f4b8e6.zip
Merge pull request #631 from asaadmahmoodspin/mm-1866
MM-1866 - Adding download icon and adding download links
Diffstat (limited to 'web')
-rw-r--r--web/react/components/file_attachment.jsx16
-rw-r--r--web/react/components/setting_item_min.jsx8
-rw-r--r--web/react/components/team_export_tab.jsx16
-rw-r--r--web/react/components/user_settings_general.jsx26
-rw-r--r--web/sass-files/sass/partials/_files.scss12
-rw-r--r--web/sass-files/sass/partials/_settings.scss17
6 files changed, 66 insertions, 29 deletions
diff --git a/web/react/components/file_attachment.jsx b/web/react/components/file_attachment.jsx
index 78693df98..c9aa06a97 100644
--- a/web/react/components/file_attachment.jsx
+++ b/web/react/components/file_attachment.jsx
@@ -97,6 +97,7 @@ export default class FileAttachment extends React.Component {
var filename = this.props.filename;
var fileInfo = utils.splitFileLocation(filename);
+ var fileUrl = utils.getFileUrl(filename);
var type = utils.getFileType(fileInfo.ext);
var thumbnail;
@@ -150,14 +151,25 @@ export default class FileAttachment extends React.Component {
{thumbnail}
</a>
<div className='post-image__details'>
- <div
+ <a
+ href={fileUrl}
+ download={filenameString}
data-toggle='tooltip'
title={filenameString}
className='post-image__name'
>
{trimmedFilename}
- </div>
+ </a>
<div>
+ <a
+ href={fileUrl}
+ download={filenameString}
+ className='post-image__download'
+ >
+ <span
+ className='fa fa-download'
+ />
+ </a>
<span className='post-image__type'>{fileInfo.ext.toUpperCase()}</span>
<span className='post-image__size'>{fileSizeString}</span>
</div>
diff --git a/web/react/components/setting_item_min.jsx b/web/react/components/setting_item_min.jsx
index 098729a4f..2c0fdf2f4 100644
--- a/web/react/components/setting_item_min.jsx
+++ b/web/react/components/setting_item_min.jsx
@@ -12,14 +12,18 @@ export default class SettingItemMin extends React.Component {
href='#'
onClick={this.props.updateSection}
>
- Edit
+ <i className='fa fa-pencil'/>
+ {'Edit'}
</a>
</li>
);
}
return (
- <ul className='section-min'>
+ <ul
+ className='section-min'
+ onClick={this.props.updateSection}
+ >
<li className='col-sm-10 section-title'>{this.props.title}</li>
{editButton}
<li className='col-sm-7 section-describe'>{this.props.describe}</li>
diff --git a/web/react/components/team_export_tab.jsx b/web/react/components/team_export_tab.jsx
index 1bc5abdb1..2914904ad 100644
--- a/web/react/components/team_export_tab.jsx
+++ b/web/react/components/team_export_tab.jsx
@@ -75,15 +75,13 @@ export default class TeamExportTab extends React.Component {
<li className='col-xs-offset-3 col-xs-8'>
<ul className='setting-list'>
<li className='setting-list-item'>
- <span className='btn btn-sm btn-primary btn-file sel-btn'>
- <a
- className='btn btn-sm btn-primary'
- href='#'
- onClick={this.doExport}
- >
- {'Export'}
- </a>
- </span>
+ <a
+ className='btn btn-sm btn-primary btn-file sel-btn'
+ href='#'
+ onClick={this.doExport}
+ >
+ {'Export'}
+ </a>
</li>
</ul>
</li>
diff --git a/web/react/components/user_settings_general.jsx b/web/react/components/user_settings_general.jsx
index f2127ce0c..184534a9a 100644
--- a/web/react/components/user_settings_general.jsx
+++ b/web/react/components/user_settings_general.jsx
@@ -238,7 +238,7 @@ export default class UserSettingsGeneralTab extends React.Component {
key='firstNameSetting'
className='form-group'
>
- <label className='col-sm-5 control-label'>First Name</label>
+ <label className='col-sm-5 control-label'>{'First Name'}</label>
<div className='col-sm-7'>
<input
className='form-control'
@@ -255,7 +255,7 @@ export default class UserSettingsGeneralTab extends React.Component {
key='lastNameSetting'
className='form-group'
>
- <label className='col-sm-5 control-label'>Last Name</label>
+ <label className='col-sm-5 control-label'>{'Last Name'}</label>
<div className='col-sm-7'>
<input
className='form-control'
@@ -278,14 +278,14 @@ export default class UserSettingsGeneralTab extends React.Component {
href='#'
onClick={notifClick.bind(this)}
>
- Notifications
+ {'Notifications'}
</a>
);
const extraInfo = (
<span>
- By default, you will receive mention notifications when someone types your first name.
- Go to {notifLink} settings to change this default.
+ {'By default, you will receive mention notifications when someone types your first name. '}
+ {'Go to '} {notifLink} {'settings to change this default.'}
</span>
);
@@ -351,8 +351,8 @@ export default class UserSettingsGeneralTab extends React.Component {
const extraInfo = (
<span>
- Use Nickname for a name you might be called that is different from your first name and user name.
- This is most often used when two or more people have similar sounding names and usernames.
+ {'Use Nickname for a name you might be called that is different from your first name and user name.'}
+ {'This is most often used when two or more people have similar sounding names and usernames.'}
</span>
);
@@ -406,7 +406,7 @@ export default class UserSettingsGeneralTab extends React.Component {
</div>
);
- const extraInfo = (<span>Pick something easy for teammates to recognize and recall.</span>);
+ const extraInfo = (<span>{'Pick something easy for teammates to recognize and recall.'}</span>);
usernameSection = (
<SettingItemMax
@@ -438,13 +438,13 @@ export default class UserSettingsGeneralTab extends React.Component {
let helpText = <div>Email is used for notifications, and requires verification if changed.</div>;
if (!this.state.emailEnabled) {
- helpText = <div className='text-danger'><br />Email has been disabled by your system administrator. No notification emails will be sent until it is enabled.</div>;
+ helpText = <div className='setting-list__hint text-danger'>{'Email has been disabled by your system administrator. No notification emails will be sent until it is enabled.'}</div>;
}
inputs.push(
<div key='emailSetting'>
<div className='form-group'>
- <label className='col-sm-5 control-label'>Primary Email</label>
+ <label className='col-sm-5 control-label'>{'Primary Email'}</label>
<div className='col-sm-7'>
<input
className='form-control'
@@ -526,18 +526,18 @@ export default class UserSettingsGeneralTab extends React.Component {
data-dismiss='modal'
aria-label='Close'
>
- <span aria-hidden='true'>&times;</span>
+ <span aria-hidden='true'>{'×'}</span>
</button>
<h4
className='modal-title'
ref='title'
>
<i className='modal-back'></i>
- General Settings
+ {'General Settings'}
</h4>
</div>
<div className='user-settings'>
- <h3 className='tab-header'>General Settings</h3>
+ <h3 className='tab-header'>{'General Settings'}</h3>
<div className='divider-dark first'/>
{nameSection}
<div className='divider-light'/>
diff --git a/web/sass-files/sass/partials/_files.scss b/web/sass-files/sass/partials/_files.scss
index 70f440989..405265f92 100644
--- a/web/sass-files/sass/partials/_files.scss
+++ b/web/sass-files/sass/partials/_files.scss
@@ -61,8 +61,8 @@
cursor: pointer;
z-index: 5;
opacity: inherit;
- text-shadow: 0 0px 3px #444;
- text-shadow: 0 0px 3px rgba(0, 0, 0, 0.7);
+ text-shadow: 0 0px 3px #444;
+ text-shadow: 0 0px 3px rgba(0, 0, 0, 0.7);
}
}
}
@@ -159,6 +159,14 @@
padding: 7px;
.post-image__name {
margin-bottom: 3px;
+ display: block;
+ color: #333;
+ }
+ .post-image__download {
+ display: inline-block;
+ padding-right: 7px;
+ cursor: pointer;
+ color: #555;
}
.post-image__type {
color: grey;
diff --git a/web/sass-files/sass/partials/_settings.scss b/web/sass-files/sass/partials/_settings.scss
index 25c093957..2b59a943b 100644
--- a/web/sass-files/sass/partials/_settings.scss
+++ b/web/sass-files/sass/partials/_settings.scss
@@ -56,7 +56,17 @@
.section-min {
padding: 1em 0;
margin-bottom: 0;
+ cursor: pointer;
@include clearfix;
+ &:hover {
+ background: #f9f9f9;
+ }
+ &:hover .fa {
+ display: inline-block;
+ }
+ &:hover .section-edit {
+ text-decoration: underline;
+ }
}
.section-max {
@@ -77,6 +87,12 @@
.section-edit {
text-align: right;
margin-bottom: 5px;
+ .fa {
+ margin-right: 7px;
+ font-size: 12px;
+ color: #aaa;
+ display: none;
+ }
}
.section-describe {
@@ -97,7 +113,6 @@
}
.setting-list__hint {
- color: #555;
margin-top: 20px;
}