From 8c03c0b930c3b4dc1d75393d1ab305cb1b08dc83 Mon Sep 17 00:00:00 2001
From: Reed Garmsen <rgarmsen2295@gmail.com>
Date: Wed, 5 Aug 2015 20:58:22 -0700
Subject: Correct sign up link now displays on ie10 in the 'Team Invite Link'
 modal; replaces location.origin with utils function

---
 web/react/components/sidebar_right_menu.jsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'web/react/components/sidebar_right_menu.jsx')

diff --git a/web/react/components/sidebar_right_menu.jsx b/web/react/components/sidebar_right_menu.jsx
index 15306a499..4e12401de 100644
--- a/web/react/components/sidebar_right_menu.jsx
+++ b/web/react/components/sidebar_right_menu.jsx
@@ -3,6 +3,7 @@
 
 var UserStore = require('../stores/user_store.jsx');
 var client = require('../utils/client.jsx');
+var utils = require('../utils/utils.jsx');
 
 module.exports = React.createClass({
     handleLogoutClick: function(e) {
@@ -29,7 +30,7 @@ module.exports = React.createClass({
             if (this.props.teamType == "O") {
                 team_link = (
                     <li>
-                        <a href="#" data-toggle="modal" data-target="#get_link" data-title="Team Invite" data-value={location.origin+"/signup_user_complete/?id="+currentUser.team_id}><i className="glyphicon glyphicon-link"></i>Get Team Invite Link</a>
+                        <a href="#" data-toggle="modal" data-target="#get_link" data-title="Team Invite" data-value={utils.getWindowLocationOrigin()+"/signup_user_complete/?id="+currentUser.team_id}><i className="glyphicon glyphicon-link"></i>Get Team Invite Link</a>
                     </li>
                 );
             }
-- 
cgit v1.2.3-1-g7c22


From dd39a53208acdc6b74f0adc5a2b8a6a0c456d92a Mon Sep 17 00:00:00 2001
From: Reed Garmsen <rgarmsen2295@gmail.com>
Date: Thu, 6 Aug 2015 14:14:10 -0700
Subject: Cosmetic refactoring

---
 web/react/components/sidebar_right_menu.jsx | 74 +++++++++++++++++------------
 1 file changed, 43 insertions(+), 31 deletions(-)

(limited to 'web/react/components/sidebar_right_menu.jsx')

diff --git a/web/react/components/sidebar_right_menu.jsx b/web/react/components/sidebar_right_menu.jsx
index 4e12401de..2439719a1 100644
--- a/web/react/components/sidebar_right_menu.jsx
+++ b/web/react/components/sidebar_right_menu.jsx
@@ -11,65 +11,77 @@ module.exports = React.createClass({
         client.logout();
     },
     render: function() {
-        var team_link = "";
-        var invite_link = "";
-        var manage_link = "";
-        var rename_link = "";
-        var currentUser = UserStore.getCurrentUser()
+        var teamLink = '';
+        var inviteLink = '';
+        var teamSettingsLink = '';
+        var manageLink = '';
+        var renameLink = '';
+        var currentUser = UserStore.getCurrentUser();
         var isAdmin = false;
 
         if (currentUser != null) {
-            isAdmin = currentUser.roles.indexOf("admin") > -1;
+            isAdmin = currentUser.roles.indexOf('admin') > -1;
 
-            invite_link = (
+            inviteLink = (
                 <li>
-                    <a href="#" data-toggle="modal" data-target="#invite_member"><i className="glyphicon glyphicon-user"></i>Invite New Member</a>
+                    <a href='#' data-toggle='modal' data-target='#invite_member'><i className='glyphicon glyphicon-user'></i>Invite New Member</a>
                 </li>
             );
 
-            if (this.props.teamType == "O") {
-                team_link = (
+            if (this.props.teamType === 'O') {
+                teamLink = (
                     <li>
-                        <a href="#" data-toggle="modal" data-target="#get_link" data-title="Team Invite" data-value={utils.getWindowLocationOrigin()+"/signup_user_complete/?id="+currentUser.team_id}><i className="glyphicon glyphicon-link"></i>Get Team Invite Link</a>
+                        <a href='#' data-toggle='modal' data-target='#get_link' data-title='Team Invite' data-value={utils.getWindowLocationOrigin()+'/signup_user_complete/?id='+currentUser.team_id}><i className='glyphicon glyphicon-link'></i>Get Team Invite Link</a>
                     </li>
                 );
             }
         }
 
         if (isAdmin) {
-            manage_link = (
+            teamSettingsLink = (
                 <li>
-                    <a href="#" data-toggle="modal" data-target="#team_members"><i className="glyphicon glyphicon-wrench"></i>Manage Team</a>
+                    <a href='#' data-toggle='modal' data-target='#team_settings'><i className='glyphicon glyphicon-globe'></i>Team Settings</a>
                 </li>
             );
-            rename_link = (
+            manageLink = (
                 <li>
-                    <a href="#" data-toggle="modal" data-target="#rename_team_link"><i className="glyphicon glyphicon-pencil"></i>Rename</a>
+                    <a href='#' data-toggle='modal' data-target='#team_members'><i className='glyphicon glyphicon-wrench'></i>Manage Team</a>
+                </li>
+            );
+            renameLink = (
+                <li>
+                    <a href='#' data-toggle='modal' data-target='#rename_team_link'><i className='glyphicon glyphicon-pencil'></i>Rename</a>
                 </li>
             );
         }
 
-        var siteName = config.SiteName != null ? config.SiteName : "";
-        var teamDisplayName = this.props.teamDisplayName ? this.props.teamDisplayName : siteName;
+        var siteName = '';
+        if (config.SiteName != null) {
+            siteName = config.SiteName;
+        }
+        var teamDisplayName = siteName;
+        if (this.props.teamDisplayName) {
+            teamDisplayName = this.props.teamDisplayName;
+        }
 
         return (
             <div>
-                <div className="team__header theme">
-                    <a className="team__name" href="/channels/town-square">{ teamDisplayName }</a>
+                <div className='team__header theme'>
+                    <a className='team__name' href='/channels/town-square'>{teamDisplayName}</a>
                 </div>
 
-                <div className="nav-pills__container">
-                    <ul className="nav nav-pills nav-stacked">
-                        <li><a href="#" data-toggle="modal" data-target="#user_settings1"><i className="glyphicon glyphicon-cog"></i>Account Settings</a></li>
-                        { isAdmin ? <li><a href="#" data-toggle="modal" data-target="#team_settings"><i className="glyphicon glyphicon-globe"></i>Team Settings</a></li> : "" }
-                        { invite_link }
-                        { team_link }
-                        { manage_link }
-                        { rename_link }
-                        <li><a href="#" onClick={this.handleLogoutClick}><i className="glyphicon glyphicon-log-out"></i>Logout</a></li>
-                        <li className="divider"></li>
-                        <li><a target="_blank" href="/static/help/configure_links.html"><i className="glyphicon glyphicon-question-sign"></i>Help</a></li>
-                        <li><a target="_blank" href="/static/help/configure_links.html"><i className="glyphicon glyphicon-earphone"></i>Report a Problem</a></li>
+                <div className='nav-pills__container'>
+                    <ul className='nav nav-pills nav-stacked'>
+                        <li><a href='#' data-toggle='modal' data-target='#user_settings1'><i className='glyphicon glyphicon-cog'></i>Account Settings</a></li>
+                        {teamSettingsLink}
+                        {inviteLink}
+                        {teamLink}
+                        {manageLink}
+                        {renameLink}
+                        <li><a href='#' onClick={this.handleLogoutClick}><i className='glyphicon glyphicon-log-out'></i>Logout</a></li>
+                        <li className='divider'></li>
+                        <li><a target='_blank' href='/static/help/configure_links.html'><i className='glyphicon glyphicon-question-sign'></i>Help</a></li>
+                        <li><a target='_blank' href='/static/help/configure_links.html'><i className='glyphicon glyphicon-earphone'></i>Report a Problem</a></li>
                     </ul>
                 </div>
             </div>
-- 
cgit v1.2.3-1-g7c22

