Skip to content

Commit

Permalink
New baseline
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelhoefer committed Feb 20, 2018
1 parent 926cd27 commit f5f703d
Show file tree
Hide file tree
Showing 56 changed files with 1,064 additions and 13,209 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ npm-debug.log
node_modules
.idea/
.env
*.iml
*.iml
temp.*
63 changes: 0 additions & 63 deletions client/js/activities/ActivityCard.js

This file was deleted.

99 changes: 0 additions & 99 deletions client/js/activities/ActivityTimeline.js

This file was deleted.

23 changes: 0 additions & 23 deletions client/js/activities/ActivityTypePickList.js

This file was deleted.

38 changes: 9 additions & 29 deletions client/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,10 @@ import PackageHome from './packages/PackageHome';
import PackageRecord from './packages/PackageRecord';
import PackageView from './packages/PackageView';

import PropertyHome from './properties/PropertyHome';
import PropertyRecord from './properties/PropertyRecord';
import PropertyForm from './properties/PropertyForm';
import PropertyView from './properties/PropertyView';

import ContactHome from './contacts/ContactHome';
import ContactRecord from './contacts/ContactRecord';
import ContactForm from './contacts/ContactForm';
import ContactView from './contacts/ContactView';

import BrokerHome from './brokers/BrokerHome';
import BrokerRecord from './brokers/BrokerRecord';
import BrokerForm from './brokers/BrokerForm';
import BrokerView from './brokers/BrokerView';
import PackageOrgHome from './packageorgs/PackageOrgHome';
import PackageOrgRecord from './packageorgs/PackageOrgRecord';
import PackageOrgForm from './packageorgs/PackageOrgForm';
import PackageOrgView from './packageorgs/PackageOrgView';

let App = React.createClass({
render: function () {
Expand All @@ -41,6 +31,7 @@ let App = React.createClass({
<li className="slds-list__item"><IndexLink to="/"><Icon name="account" theme={null}/>Orgs</IndexLink></li>
<li className="slds-list__item"><Link to="/licenses"><Icon name="drafts" theme={null}/>Licenses</Link></li>
<li className="slds-list__item"><Link to="/packages"><Icon name="thanks" theme={null}/>Packages</Link></li>
<li className="slds-list__item"><Link to="/packageorgs"><Icon name="people" theme={null}/>Package Orgs</Link></li>
</ul>
</header>
{this.props.children}
Expand All @@ -64,21 +55,10 @@ render((
<Route path="package" component={PackageRecord}>
<Route path=":packageId" component={PackageView}/>
</Route>

<Route path="properties" component={PropertyHome}/>
<Route path="property" component={PropertyRecord}>
<Route path=":propertyId" component={PropertyView}/>
<Route path=":propertyId/edit" component={PropertyForm}/>
</Route>
<Route path="contacts" component={ContactHome}/>
<Route path="contact" component={ContactRecord}>
<Route path=":contactId" component={ContactView}/>
<Route path=":contactId/edit" component={ContactForm}/>
</Route>
<Route path="brokers" component={BrokerHome}/>
<Route path="broker" component={BrokerRecord}>
<Route path=":brokerId" component={BrokerView}/>
<Route path=":brokerId/edit" component={BrokerForm}/>
<Route path="packageorgs" component={PackageOrgHome}/>
<Route path="packageorg" component={PackageOrgRecord}>
<Route path=":orgId" component={PackageOrgView}/>
<Route path=":orgId/edit" component={PackageOrgForm}/>
</Route>
<IndexRoute component={OrgHome}/>
</Route>
Expand Down
18 changes: 18 additions & 0 deletions client/js/auth/AuthorizeOrg.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from 'react';
import * as authService from "../services/AuthService";

export default React.createClass({
getInitialState() {
return { url: "" };
},

componentDidMount() {
authService.oauthOrgURL().then(url => this.setState({url}));
},

render() {
return (
<a href={this.state.url}>Connect Org</a>
);
}
});
30 changes: 30 additions & 0 deletions client/js/auth/AuthorizeWindow.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import React from 'react';

export default class PortalWindow extends React.Component {
constructor(props) {
super(props);
// STEP 1: create a container <div>
this.containerEl = document.createElement('div');
this.externalWindow = null;
}

render() {
return (
<div/>
);
}

componentDidMount() {
// STEP 3: open a new browser window and store a reference to it
this.externalWindow = window.open(this.props.url, '', 'width=700,height=700,left=200,top=200');

// STEP 4: append the container <div> (that has props.children appended to it) to the body of the new window
// this.externalWindow.document.body.appendChild(this.containerEl);
}

componentWillUnmount() {
// STEP 5: This will fire when this.state.showWindowPortal in the parent component becomes false
// So we tidy up by closing the window
this.externalWindow.close();
}
}
68 changes: 0 additions & 68 deletions client/js/brokers/BrokerCard.js

This file was deleted.

Loading

0 comments on commit f5f703d

Please sign in to comment.