mirror of
https://github.com/ascribe/onion.git
synced 2024-11-15 01:25:17 +01:00
Merged in AD-956-clicking-browser-back-button-from (pull request #81)
Ad 956 clicking browser back button from
This commit is contained in:
commit
296680c431
@ -1,82 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import PrizeListActions from '../../actions/prize_list_actions';
|
||||
import PrizeListStore from '../../stores/prize_list_store';
|
||||
|
||||
import Table from '../ascribe_table/table';
|
||||
import TableItem from '../ascribe_table/table_item';
|
||||
import TableItemText from '../ascribe_table/table_item_text';
|
||||
|
||||
import { ColumnModel} from '../ascribe_table/models/table_models';
|
||||
import { getLangText } from '../../utils/lang_utils';
|
||||
|
||||
let PrizesDashboard = React.createClass({
|
||||
|
||||
getInitialState() {
|
||||
return PrizeListStore.getState();
|
||||
},
|
||||
|
||||
componentDidMount() {
|
||||
PrizeListStore.listen(this.onChange);
|
||||
PrizeListActions.fetchPrizeList();
|
||||
},
|
||||
|
||||
componentWillUnmount() {
|
||||
PrizeListStore.unlisten(this.onChange);
|
||||
},
|
||||
|
||||
onChange(state) {
|
||||
this.setState(state);
|
||||
},
|
||||
|
||||
getColumnList() {
|
||||
return [
|
||||
new ColumnModel(
|
||||
(item) => {
|
||||
return {
|
||||
'content': item.name
|
||||
}; },
|
||||
'name',
|
||||
getLangText('Name'),
|
||||
TableItemText,
|
||||
6,
|
||||
false,
|
||||
null
|
||||
),
|
||||
new ColumnModel(
|
||||
(item) => {
|
||||
return {
|
||||
'content': item.domain
|
||||
}; },
|
||||
'domain',
|
||||
getLangText('Domain'),
|
||||
TableItemText,
|
||||
1,
|
||||
false,
|
||||
null
|
||||
)
|
||||
];
|
||||
},
|
||||
|
||||
render() {
|
||||
return (
|
||||
<Table
|
||||
responsive
|
||||
className="ascribe-table"
|
||||
columnList={this.getColumnList()}
|
||||
itemList={this.state.prizeList}>
|
||||
{this.state.prizeList.map((item, i) => {
|
||||
return (
|
||||
<TableItem
|
||||
className="ascribe-table-item-selectable"
|
||||
key={i}/>
|
||||
);
|
||||
})}
|
||||
</Table>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
export default PrizesDashboard;
|
@ -13,6 +13,7 @@ import PrizePieceList from './components/prize_piece_list';
|
||||
import PrizePieceContainer from './components/ascribe_detail/prize_piece_container';
|
||||
import EditionContainer from '../../ascribe_detail/edition_container';
|
||||
import SettingsContainer from './components/prize_settings_container';
|
||||
import CoaVerifyContainer from '../../../components/coa_verify_container';
|
||||
|
||||
import App from './prize_app';
|
||||
import AppConstants from '../../../constants/application_constants';
|
||||
@ -34,6 +35,7 @@ function getRoutes() {
|
||||
<Route name="piece" path="pieces/:pieceId" handler={PrizePieceContainer} />
|
||||
<Route name="edition" path="editions/:editionId" handler={EditionContainer} />
|
||||
<Route name="settings" path="settings" handler={SettingsContainer} />
|
||||
<Route name="coa_verify" path="verify" handler={CoaVerifyContainer} />
|
||||
</Route>
|
||||
);
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import React from 'react';
|
||||
import Router from 'react-router';
|
||||
|
||||
// general components
|
||||
import CoaVerifyContainer from '../../../components/coa_verify_container';
|
||||
import LoginContainer from '../../../components/login_container';
|
||||
import LogoutContainer from '../../../components/logout_container';
|
||||
import SignupContainer from '../../../components/signup_container';
|
||||
@ -45,6 +46,7 @@ let ROUTES = {
|
||||
<Route name="pieces" path="collection" handler={CylandPieceList} headerTitle="COLLECTION" />
|
||||
<Route name="piece" path="pieces/:pieceId" handler={CylandPieceContainer} />
|
||||
<Route name="edition" path="editions/:editionId" handler={EditionContainer} />
|
||||
<Route name="coa_verify" path="verify" handler={CoaVerifyContainer} />
|
||||
<Route name="settings" path="settings" handler={SettingsContainer} />
|
||||
</Route>
|
||||
),
|
||||
@ -60,6 +62,7 @@ let ROUTES = {
|
||||
<Route name="pieces" path="collection" handler={PieceList} headerTitle="COLLECTION" />
|
||||
<Route name="piece" path="pieces/:pieceId" handler={PieceContainer} />
|
||||
<Route name="edition" path="editions/:editionId" handler={EditionContainer} />
|
||||
<Route name="coa_verify" path="verify" handler={CoaVerifyContainer} />
|
||||
<Route name="settings" path="settings" handler={SettingsContainer} />
|
||||
</Route>
|
||||
),
|
||||
@ -76,6 +79,7 @@ let ROUTES = {
|
||||
<Route name="pieces" path="collection" handler={IkonotvPieceList} headerTitle="COLLECTION"/>
|
||||
<Route name="piece" path="pieces/:pieceId" handler={IkonotvPieceContainer} />
|
||||
<Route name="edition" path="editions/:editionId" handler={EditionContainer} />
|
||||
<Route name="coa_verify" path="verify" handler={CoaVerifyContainer} />
|
||||
<Route name="settings" path="settings" handler={SettingsContainer} />
|
||||
</Route>
|
||||
)
|
||||
|
@ -22,8 +22,6 @@ import CoaVerifyContainer from './components/coa_verify_container';
|
||||
|
||||
import RegisterPiece from './components/register_piece';
|
||||
|
||||
import PrizesDashboard from './components/ascribe_prizes_dashboard/prizes_dashboard';
|
||||
|
||||
import AppConstants from './constants/application_constants';
|
||||
|
||||
let Route = Router.Route;
|
||||
@ -45,7 +43,6 @@ const COMMON_ROUTES = (
|
||||
<Route name="password_reset" path="password_reset" handler={PasswordResetContainer} />
|
||||
<Route name="settings" path="settings" handler={SettingsContainer} />
|
||||
<Route name="coa_verify" path="verify" handler={CoaVerifyContainer} />
|
||||
<Route name="prizes" path="prizes" handler={PrizesDashboard} />
|
||||
</Route>
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user