summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorReed Garmsen <rgarmsen2295@gmail.com>2015-06-15 11:22:53 -0700
committerReed Garmsen <rgarmsen2295@gmail.com>2015-06-15 11:22:53 -0700
commit6883f691ef3b33ceee6bc525830675245aaf508a (patch)
tree4693838432e0c544944b137ab246fbcc4583d848 /web
parentc94883e0dfc0c7cbcf86a78f9134d1e3283a07cd (diff)
parent08e02c3dad4d2fa765b11ae58313b3f3e375e447 (diff)
downloadchat-6883f691ef3b33ceee6bc525830675245aaf508a.tar.gz
chat-6883f691ef3b33ceee6bc525830675245aaf508a.tar.bz2
chat-6883f691ef3b33ceee6bc525830675245aaf508a.zip
Merge pull request #1 from mattermost/master
to me
Diffstat (limited to 'web')
-rw-r--r--web/react/components/create_comment.jsx7
-rw-r--r--web/react/components/find_team.jsx2
-rw-r--r--web/react/components/post_deleted_modal.jsx2
-rw-r--r--web/react/components/settings_sidebar.jsx6
-rw-r--r--web/react/components/user_settings.jsx5
-rw-r--r--web/react/components/view_image.jsx2
-rw-r--r--web/react/utils/client.jsx4
-rw-r--r--web/templates/head.html33
8 files changed, 40 insertions, 21 deletions
diff --git a/web/react/components/create_comment.jsx b/web/react/components/create_comment.jsx
index 3534c7573..9bcbad079 100644
--- a/web/react/components/create_comment.jsx
+++ b/web/react/components/create_comment.jsx
@@ -55,12 +55,15 @@ module.exports = React.createClass({
}.bind(this),
function(err) {
- var state = {}
+ var state = {};
state.server_error = err.message;
- this.setState(state);
+
if (err.message === "Invalid RootId parameter") {
if ($('#post_deleted').length > 0) $('#post_deleted').modal('show');
}
+ else {
+ this.setState(state);
+ }
}.bind(this)
);
},
diff --git a/web/react/components/find_team.jsx b/web/react/components/find_team.jsx
index 329592a73..91a842ffc 100644
--- a/web/react/components/find_team.jsx
+++ b/web/react/components/find_team.jsx
@@ -56,7 +56,7 @@ module.exports = React.createClass({
<div>
<h4>Find Your Team</h4>
<form onSubmit={this.handleSubmit}>
- <p>{"An email will be sent to this address with links to any " + strings.TeamPlural}</p>
+ <p>{"We'll send you an email with links to your " + strings.TeamPlural + "."}</p>
<div className="form-group">
<label className='control-label'>Email</label>
<div className={ email_error ? "form-group has-error" : "form-group" }>
diff --git a/web/react/components/post_deleted_modal.jsx b/web/react/components/post_deleted_modal.jsx
index 307120df3..83b007bad 100644
--- a/web/react/components/post_deleted_modal.jsx
+++ b/web/react/components/post_deleted_modal.jsx
@@ -23,7 +23,7 @@ module.exports = React.createClass({
<p>Someone deleted the message on which you tried to post a comment.</p>
</div>
<div className="modal-footer">
- <button type="button" className="btn btn-primary" data-dismiss="modal">Agree</button>
+ <button type="button" className="btn btn-primary" data-dismiss="modal">Okay</button>
</div>
</div>
</div>
diff --git a/web/react/components/settings_sidebar.jsx b/web/react/components/settings_sidebar.jsx
index 34e3c9203..a1546890f 100644
--- a/web/react/components/settings_sidebar.jsx
+++ b/web/react/components/settings_sidebar.jsx
@@ -14,11 +14,13 @@ module.exports = React.createClass({
<li className={this.props.activeTab == 'general' ? 'active' : ''}><a href="#" onClick={function(){self.updateTab("general");}}><i className="glyphicon glyphicon-cog"></i>General</a></li>
<li className={this.props.activeTab == 'security' ? 'active' : ''}><a href="#" onClick={function(){self.updateTab("security");}}><i className="glyphicon glyphicon-lock"></i>Security</a></li>
<li className={this.props.activeTab == 'notifications' ? 'active' : ''}><a href="#" onClick={function(){self.updateTab("notifications");}}><i className="glyphicon glyphicon-exclamation-sign"></i>Notifications</a></li>
- <li className={this.props.activeTab == 'sessions' ? 'active' : ''}><a href="#" onClick={function(){self.updateTab("sessions");}}><i className="glyphicon glyphicon-globe"></i>Sessions</a></li>
- <li className={this.props.activeTab == 'activity_log' ? 'active' : ''}><a href="#" onClick={function(){self.updateTab("activity_log");}}><i className="glyphicon glyphicon-time"></i>Activity Log</a></li>
<li className={this.props.activeTab == 'appearance' ? 'active' : ''}><a href="#" onClick={function(){self.updateTab("appearance");}}><i className="glyphicon glyphicon-wrench"></i>Appearance</a></li>
</ul>
</div>
);
+ /* Temporarily removing sessions and activity logs
+ <li className={this.props.activeTab == 'sessions' ? 'active' : ''}><a href="#" onClick={function(){self.updateTab("sessions");}}><i className="glyphicon glyphicon-globe"></i>Sessions</a></li>
+ <li className={this.props.activeTab == 'activity_log' ? 'active' : ''}><a href="#" onClick={function(){self.updateTab("activity_log");}}><i className="glyphicon glyphicon-time"></i>Activity Log</a></li>
+ */
}
});
diff --git a/web/react/components/user_settings.jsx b/web/react/components/user_settings.jsx
index b165a59ad..a9c2433f2 100644
--- a/web/react/components/user_settings.jsx
+++ b/web/react/components/user_settings.jsx
@@ -1126,6 +1126,9 @@ module.exports = React.createClass({
<NotificationsTab user={this.state.user} activeSection={this.props.activeSection} updateSection={this.props.updateSection} />
</div>
);
+
+ /* Temporarily removing sessions and activity_log tabs
+
} else if (this.props.activeTab === 'sessions') {
return (
<div>
@@ -1138,6 +1141,8 @@ module.exports = React.createClass({
<AuditTab activeSection={this.props.activeSection} updateSection={this.props.updateSection} />
</div>
);
+ */
+
} else if (this.props.activeTab === 'appearance') {
return (
<div>
diff --git a/web/react/components/view_image.jsx b/web/react/components/view_image.jsx
index 7d0f0d8a9..4cb30e1d3 100644
--- a/web/react/components/view_image.jsx
+++ b/web/react/components/view_image.jsx
@@ -165,7 +165,7 @@ module.exports = React.createClass({
<span className="text"> | </span>
</div>
: "" }
- <a href={this.props.filenames[id]} download={name} className="text">Download</a>
+ <a href={this.props.filenames[id]} download={decodeURIComponent(name)} className="text">Download</a>
</div>
</div>
{loading}
diff --git a/web/react/utils/client.jsx b/web/react/utils/client.jsx
index b83ee22e7..786e6dcea 100644
--- a/web/react/utils/client.jsx
+++ b/web/react/utils/client.jsx
@@ -4,12 +4,12 @@
module.exports.track = function(category, action, label, prop, val) {
global.window.snowplow('trackStructEvent', category, action, label, prop, val);
- if (global.window.analytics != null) global.window.analytics.track(action, {category: category, label: label, property: prop, value: val});
+ global.window.analytics.track(action, {category: category, label: label, property: prop, value: val});
};
module.exports.trackPage = function() {
global.window.snowplow('trackPageView');
- if (global.window.analytics != null) global.window.analytics.page();
+ global.window.analytics.page();
};
function handleError(method_name, xhr, status, err) {
diff --git a/web/templates/head.html b/web/templates/head.html
index 5fd3ee104..5eb7a7333 100644
--- a/web/templates/head.html
+++ b/web/templates/head.html
@@ -36,6 +36,7 @@
window._LTracker = _LTracker;
_LTracker.push({'logglyKey': config.LogglyWriteKey, 'sendConsoleErrors' : config.LogglyConsoleErrors });
} else {
+ window._LTracker = [];
console.warn("config.js missing LogglyWriteKey, Loggly analytics is not reporting");
}
</script>
@@ -58,26 +59,34 @@
analytics.page();
}}();
} else {
+ analytics = {};
+ analytics.page = function(){};
+ analytics.track = function(){};
console.warn("config.js missing SegmentWriteKey, SegmentIO analytics is not tracking");
}
</script>
<!-- Snowplow starts plowing -->
<script type="text/javascript">
- ;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[];
- p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments)
- };p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1;
- n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//d1fc8wv8zag5ca.cloudfront.net/2.4.2/sp.js","snowplow"));
+ if ('{{ .Props.AnalyticsUrl }}'.trim() !== '') {
+ ;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[];
+ p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments)
+ };p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1;
+ n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//d1fc8wv8zag5ca.cloudfront.net/2.4.2/sp.js","snowplow"));
- window.snowplow('newTracker', 'cf', '{{ .Props.AnalyticsUrl }}', {
- appId: '{{ .SiteName }}'
- });
+ window.snowplow('newTracker', 'cf', '{{ .Props.AnalyticsUrl }}', {
+ appId: '{{ .SiteName }}'
+ });
- var user = window.UserStore.getCurrentUser(true);
- if (user) {
- window.snowplow('setUserId', user.id);
- }
+ var user = window.UserStore.getCurrentUser(true);
+ if (user) {
+ window.snowplow('setUserId', user.id);
+ }
- window.snowplow('trackPageView');
+ window.snowplow('trackPageView');
+ } else {
+ window.snowplow = function(){};
+ console.warn("config.json missing AnalyticsUrl, Snowplow analytics is not tracking");
+ }
</script>
<!-- Snowplow stops plowing -->
</head>