From 2bb004d2fb1abcd880f2e8869ec9f75fa23f2830 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Fri, 12 Jun 2015 15:00:26 +0200 Subject: [PATCH] remove edition list count in table --- gulpfile.js | 2 +- .../ascribe_accordion_list/accordion_list_item.js | 3 --- .../accordion_list_item_table_editions.js | 9 ++------- .../accordion_list_item_table_toggle.js | 5 ++--- js/components/ascribe_table/table.js | 1 - js/components/ascribe_table/table_item_wrapper.js | 5 +---- js/components/header.js | 4 ++-- js/components/piece_list.js | 3 +-- js/stores/edition_list_store.js | 9 ++++----- js/stores/piece_list_store.js | 11 +++++++++++ 10 files changed, 24 insertions(+), 28 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 3e7f9c1e..9efe54a3 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -53,7 +53,7 @@ gulp.task('js:build', function() { bundle(false); }); -gulp.task('serve', ['browser-sync', 'run-server', 'sass:build', 'sass:watch', 'copy'], function() { +gulp.task('serve', ['browser-sync', 'run-server', 'lint:watch', 'sass:build', 'sass:watch', 'copy'], function() { bundle(true); }); diff --git a/js/components/ascribe_accordion_list/accordion_list_item.js b/js/components/ascribe_accordion_list/accordion_list_item.js index e822b5c6..57c16435 100644 --- a/js/components/ascribe_accordion_list/accordion_list_item.js +++ b/js/components/ascribe_accordion_list/accordion_list_item.js @@ -1,12 +1,9 @@ 'use strict'; import React from 'react'; -import Router from 'react-router'; import { getLangText } from '../../utils/lang_utils'; -let Link = Router.Link; - let AccordionListItem = React.createClass({ propTypes: { className: React.PropTypes.string, diff --git a/js/components/ascribe_accordion_list/accordion_list_item_table_editions.js b/js/components/ascribe_accordion_list/accordion_list_item_table_editions.js index c98e632d..67bec486 100644 --- a/js/components/ascribe_accordion_list/accordion_list_item_table_editions.js +++ b/js/components/ascribe_accordion_list/accordion_list_item_table_editions.js @@ -1,7 +1,6 @@ 'use strict'; import React from 'react'; -import Router from 'react-router'; import EditionListStore from '../../stores/edition_list_store'; import EditionListActions from '../../actions/edition_list_actions'; @@ -19,14 +18,11 @@ import TableItemAclFiltered from '../ascribe_table/table_item_acl_filtered'; import { getLangText } from '../../utils/lang_utils'; -let Link = Router.Link; - let AccordionListItemTableEditions = React.createClass({ propTypes: { className: React.PropTypes.string, parentId: React.PropTypes.number, - numOfEditions: React.PropTypes.number, show: React.PropTypes.bool }, @@ -88,7 +84,7 @@ let AccordionListItemTableEditions = React.createClass({ orderAsc = this.state.editionList[this.props.parentId].orderAsc; } - let transition = new TransitionModel('edition', 'editionId', 'bitcoin_id', PieceListActions.closeAllEditionLists); + let transition = new TransitionModel('edition', 'editionId', 'bitcoin_id'); let columnList = [ new ColumnModel( @@ -161,8 +157,7 @@ let AccordionListItemTableEditions = React.createClass({ + show={this.props.show} /> diff --git a/js/components/ascribe_accordion_list/accordion_list_item_table_toggle.js b/js/components/ascribe_accordion_list/accordion_list_item_table_toggle.js index 1f05de4b..542027cd 100644 --- a/js/components/ascribe_accordion_list/accordion_list_item_table_toggle.js +++ b/js/components/ascribe_accordion_list/accordion_list_item_table_toggle.js @@ -6,8 +6,7 @@ let AccordionListItemTableToggle = React.createClass({ propTypes: { className: React.PropTypes.string, onClick: React.PropTypes.func, - show: React.PropTypes.bool, - numOfTableItems: React.PropTypes.number + show: React.PropTypes.bool }, render() { @@ -15,7 +14,7 @@ let AccordionListItemTableToggle = React.createClass({ - {this.props.show ? 'Hide all ' + this.props.numOfTableItems + ' Editions' : 'Show all ' + this.props.numOfTableItems + ' Editions'} + {this.props.show ? 'Hide all Editions' : 'Show all Editions'} ); } diff --git a/js/components/ascribe_table/table.js b/js/components/ascribe_table/table.js index 44ba5d61..fa040a0b 100644 --- a/js/components/ascribe_table/table.js +++ b/js/components/ascribe_table/table.js @@ -20,7 +20,6 @@ let Table = React.createClass({ }, renderChildren() { - var that = this; return ReactAddons.Children.map(this.props.children, (child, i) => { return ReactAddons.addons.cloneWithProps(child, { columnList: this.props.columnList, diff --git a/js/components/ascribe_table/table_item_wrapper.js b/js/components/ascribe_table/table_item_wrapper.js index 9e1696f4..32b8df8f 100644 --- a/js/components/ascribe_table/table_item_wrapper.js +++ b/js/components/ascribe_table/table_item_wrapper.js @@ -4,7 +4,6 @@ import React from 'react'; import Router from 'react-router'; import { ColumnModel } from './models/table_models'; -import TableColumnMixin from '../../mixins/table_column_mixin'; let Link = Router.Link; @@ -15,7 +14,7 @@ let TableItemWrapper = React.createClass({ columnWidth: React.PropTypes.number.isRequired }, - mixins: [TableColumnMixin, Router.Navigation], + mixins: [Router.Navigation], render() { return ( @@ -25,8 +24,6 @@ let TableItemWrapper = React.createClass({ let TypeElement = column.displayType; let typeElementProps = column.transformFn(this.props.columnContent); - let columnClass = this.calcColumnClasses(this.props.columnList, i, this.props.columnWidth); - if(!column.transition) { return (