1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-15 01:25:17 +01:00

merged master

This commit is contained in:
ddejongh 2015-06-15 11:02:49 +02:00
parent 4e1ef9fc72
commit aac8ae2a9e
3 changed files with 7 additions and 3 deletions

View File

@ -19,7 +19,8 @@ fetch.defaults({
urlMap: ApiUrls, urlMap: ApiUrls,
http: { http: {
headers: headers, headers: headers,
credentials: 'cors' credentials: 'cors',
mode: 'cors-with-forced-preflight'
}, },
fatalErrorHandler: (err) => { fatalErrorHandler: (err) => {
console.log(err); console.log(err);

View File

@ -6,6 +6,8 @@ import Router from 'react-router';
import UserActions from '../actions/user_actions'; import UserActions from '../actions/user_actions';
import UserStore from '../stores/user_store'; import UserStore from '../stores/user_store';
import PieceListActions from '../actions/piece_list_actions';
import Nav from 'react-bootstrap/lib/Nav'; import Nav from 'react-bootstrap/lib/Nav';
import Navbar from 'react-bootstrap/lib/Navbar'; import Navbar from 'react-bootstrap/lib/Navbar';
import DropdownButton from 'react-bootstrap/lib/DropdownButton'; import DropdownButton from 'react-bootstrap/lib/DropdownButton';
@ -38,6 +40,7 @@ let Header = React.createClass({
}, },
handleLoginSuccess(){ handleLoginSuccess(){
UserActions.fetchCurrentUser(); UserActions.fetchCurrentUser();
PieceListActions.fetchPieceList(1, 10);
}, },
render() { render() {
@ -51,7 +54,7 @@ let Header = React.createClass({
</Nav> </Nav>
<Nav right> <Nav right>
<ModalWrapper <ModalWrapper
button={<div className='btn btn-default btn-sm'>LOGIN</div>} button={<Link className='btn btn-default btn-sm' to="pieces">LOGIN</Link>}
title='Log in to ascribe' title='Log in to ascribe'
handleSuccess={this.handleLoginSuccess} handleSuccess={this.handleLoginSuccess}
tooltip='Log in to ascribe'> tooltip='Log in to ascribe'>

View File

@ -8,7 +8,7 @@ let constants = {
//'baseUrl': window.BASE_URL, //'baseUrl': window.BASE_URL,
'apiEndpoint': window.API_ENDPOINT, 'apiEndpoint': window.API_ENDPOINT,
'baseUrl': window.BASE_URL, 'baseUrl': window.BASE_URL,
'debugCredentialBase64': 'ZGltaUBtYWlsaW5hdG9yLmNvbTowMDAwMDAwMDAw', // dimi@mailinator:0000000000 //'debugCredentialBase64': 'ZGltaUBtYWlsaW5hdG9yLmNvbTowMDAwMDAwMDAw', // dimi@mailinator:0000000000
'aclList': ['edit', 'consign', 'consign_request', 'unconsign', 'unconsign_request', 'transfer', 'aclList': ['edit', 'consign', 'consign_request', 'unconsign', 'unconsign_request', 'transfer',
'loan', 'loan_request', 'share', 'download', 'view', 'delete', 'del_from_collection', 'add_to_collection'] 'loan', 'loan_request', 'share', 'download', 'view', 'delete', 'del_from_collection', 'add_to_collection']
}; };