mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 17:33:14 +01:00
code styling
This commit is contained in:
parent
82d14b30fc
commit
b4076aeef7
@ -5,7 +5,6 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<title>ascribe</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="node_modules/react-datepicker/dist/react-datepicker.css">
|
||||
<link rel="stylesheet" href="//brick.a.ssl.fastly.net/Source+Sans+Pro:400,600,700,900">
|
||||
<link rel="stylesheet" href="build/css/main.css">
|
||||
</head>
|
||||
|
@ -53,10 +53,53 @@ let AccordionListItemTableEditions = React.createClass({
|
||||
|
||||
render() {
|
||||
let columnList = [
|
||||
new TableColumnContentModel((item) => { return { 'editionId': item.id, 'pieceId': this.props.parentId, 'selectItem': this.selectItem, 'selected': item.selected }}, '', '', TableItemCheckbox, 1, false),
|
||||
new TableColumnContentModel((item) => { return { 'content': item.edition_number }}, 'num_editions', '#', TableItemText, 1, false),
|
||||
new TableColumnContentModel((item) => { return { 'content': item.bitcoin_id }}, 'bitcoin_id', getLangText('Bitcoin Address'), TableItemText, 5, false),
|
||||
new TableColumnContentModel((item) => { return { 'content': item.acl }}, 'acl', getLangText('Actions'), TableItemAclFiltered, 4, false)
|
||||
new TableColumnContentModel(
|
||||
(item) => {
|
||||
return {
|
||||
'editionId': item.id,
|
||||
'pieceId': this.props.parentId,
|
||||
'selectItem': this.selectItem,
|
||||
'selected': item.selected
|
||||
}},
|
||||
'',
|
||||
'',
|
||||
TableItemCheckbox,
|
||||
1,
|
||||
false
|
||||
),
|
||||
new TableColumnContentModel(
|
||||
(item) => {
|
||||
return {
|
||||
'content': item.edition_number
|
||||
}},
|
||||
'num_editions',
|
||||
'#',
|
||||
TableItemText,
|
||||
1,
|
||||
false
|
||||
),
|
||||
new TableColumnContentModel(
|
||||
(item) => {
|
||||
return {
|
||||
'content': item.bitcoin_id
|
||||
}},
|
||||
'bitcoin_id',
|
||||
getLangText('Bitcoin Address'),
|
||||
TableItemText,
|
||||
5,
|
||||
false
|
||||
),
|
||||
new TableColumnContentModel(
|
||||
(item) => {
|
||||
return {
|
||||
'content': item.acl
|
||||
}},
|
||||
'acl',
|
||||
getLangText('Actions'),
|
||||
TableItemAclFiltered,
|
||||
4,
|
||||
false
|
||||
)
|
||||
];
|
||||
|
||||
return (
|
||||
|
@ -33,17 +33,13 @@ let PieceListBulkModal = React.createClass({
|
||||
UserStore.unlisten(this.onChange);
|
||||
},
|
||||
|
||||
filterForSelected(edition) {
|
||||
return edition.selected;
|
||||
},
|
||||
|
||||
fetchSelectedEditionList() {
|
||||
let selectedEditionList = [];
|
||||
|
||||
Object
|
||||
.keys(this.state.editionList)
|
||||
.forEach((key) => {
|
||||
let filteredEditionsForPiece = this.state.editionList[key].filter(this.filterForSelected);
|
||||
let filteredEditionsForPiece = this.state.editionList[key].filter((edition) => edition.selected);
|
||||
selectedEditionList = selectedEditionList.concat(filteredEditionsForPiece);
|
||||
});
|
||||
|
||||
@ -54,10 +50,6 @@ let PieceListBulkModal = React.createClass({
|
||||
return a.filter((val) => b.indexOf(val) > -1);
|
||||
},
|
||||
|
||||
bulk(action) {
|
||||
console.log(action);
|
||||
},
|
||||
|
||||
getAvailableAcls() {
|
||||
let availableAcls = [];
|
||||
let selectedEditionList = this.fetchSelectedEditionList();
|
||||
|
@ -7,8 +7,10 @@ let TableItemAclFiltered = React.createClass({
|
||||
},
|
||||
|
||||
render() {
|
||||
var availableAcls = ['consign', 'loan', 'transfer', 'view'];
|
||||
|
||||
let filteredAcls = this.props.content.filter((v) => {
|
||||
return v === 'consign' || v === 'loan' || v === 'transfer' || v === 'view';
|
||||
return availableAcls.indexOf(v) > -1;
|
||||
});
|
||||
|
||||
return (
|
||||
|
@ -3,6 +3,7 @@
|
||||
@import 'variables';
|
||||
@import 'ascribe_variables';
|
||||
@import '../node_modules/bootstrap-sass/assets/stylesheets/bootstrap';
|
||||
@import '../node_modules/react-datepicker/dist/react-datepicker';
|
||||
@import './ascribe-fonts/style';
|
||||
@import './ascribe-fonts/ascribe-fonts';
|
||||
@import 'ascribe_accordion_list';
|
||||
|
Loading…
Reference in New Issue
Block a user