diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2016-08-02 16:37:09 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-02 16:37:09 -0400 |
commit | c4a3118e9f885e92bb9b7d882898e9a51fc3be69 (patch) | |
tree | 7564e7aa04e7c656781b34375d6964d029755c38 /webapp/stores | |
parent | e67bbcb0ae483cc86ae3a80ace36f1e6e663b589 (diff) | |
download | chat-c4a3118e9f885e92bb9b7d882898e9a51fc3be69.tar.gz chat-c4a3118e9f885e92bb9b7d882898e9a51fc3be69.tar.bz2 chat-c4a3118e9f885e92bb9b7d882898e9a51fc3be69.zip |
PLT-3408 Add SiteURL to config.json (#3692)
* PLT-3408 Changed serverside code to get the service's URL from config.json
* PLT-3408 Changed most clientside code to use the SiteURL config setting instead of window.location
* PLT-3408 Changed default SiteURL to be autodetected
Diffstat (limited to 'webapp/stores')
-rw-r--r-- | webapp/stores/team_store.jsx | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/webapp/stores/team_store.jsx b/webapp/stores/team_store.jsx index f4383589a..a482fa3a1 100644 --- a/webapp/stores/team_store.jsx +++ b/webapp/stores/team_store.jsx @@ -11,12 +11,6 @@ const ActionTypes = Constants.ActionTypes; const CHANGE_EVENT = 'change'; var Utils; -function getWindowLocationOrigin() { - if (!Utils) { - Utils = require('utils/utils.jsx'); //eslint-disable-line global-require - } - return Utils.getWindowLocationOrigin(); -} class TeamStoreClass extends EventEmitter { constructor() { @@ -87,23 +81,23 @@ class TeamStoreClass extends EventEmitter { getCurrentTeamUrl() { if (this.getCurrent()) { - return getWindowLocationOrigin() + '/' + this.getCurrent().name; + return window.mm_config.SiteURL + '/' + this.getCurrent().name; } - return null; + return ''; } getCurrentTeamRelativeUrl() { if (this.getCurrent()) { return '/' + this.getCurrent().name; } - return null; + return ''; } getCurrentInviteLink() { const current = this.getCurrent(); if (current) { - return getWindowLocationOrigin() + '/signup_user_complete/?id=' + current.invite_id; + return window.mm_config.SiteURL + '/signup_user_complete/?id=' + current.invite_id; } return ''; @@ -112,10 +106,10 @@ class TeamStoreClass extends EventEmitter { getTeamUrl(id) { const team = this.get(id); if (team) { - return getWindowLocationOrigin() + '/' + team.name; + return window.mm_config.SiteURL + '/' + team.name; } - return null; + return ''; } saveTeam(team) { |