From dcd770ab5fa302323706ab082730481ab2ba9e55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Fri, 12 Jun 2015 13:36:55 +0200 Subject: [PATCH 01/11] readd sourcemaps --- gulpfile.js | 2 +- index.html | 1 + js/components/ascribe_buttons/delete_button.js | 2 +- js/components/ascribe_table/table_item_checkbox.js | 4 +++- js/constants/application_constants.js | 4 ++-- sass/main.scss | 6 ++++++ 6 files changed, 14 insertions(+), 5 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 80b57550..3e7f9c1e 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -94,7 +94,7 @@ gulp.task('sass:build', function () { }); gulp.task('sass:watch', function () { - gulp.watch('./sass/**/*.scss', ['sass']); + gulp.watch('./sass/**/*.scss', ['sass:build']); }); gulp.task('copy', function () { diff --git a/index.html b/index.html index 852f9027..6c7681c4 100644 --- a/index.html +++ b/index.html @@ -7,6 +7,7 @@ +
diff --git a/js/components/ascribe_buttons/delete_button.js b/js/components/ascribe_buttons/delete_button.js index 0d37a236..e52ff119 100644 --- a/js/components/ascribe_buttons/delete_button.js +++ b/js/components/ascribe_buttons/delete_button.js @@ -45,7 +45,7 @@ let DeleteButton = React.createClass({ } else if (availableAcls.indexOf('del_from_collection') > -1){ content = ; - btnDelete = ; + btnDelete = ; } else{ return
; diff --git a/js/components/ascribe_table/table_item_checkbox.js b/js/components/ascribe_table/table_item_checkbox.js index 131f7427..cb368369 100644 --- a/js/components/ascribe_table/table_item_checkbox.js +++ b/js/components/ascribe_table/table_item_checkbox.js @@ -17,7 +17,9 @@ let TableItemCheckbox = React.createClass({ render() { return ( - + + + ); } }); diff --git a/js/constants/application_constants.js b/js/constants/application_constants.js index 81eadc26..7b23a41f 100644 --- a/js/constants/application_constants.js +++ b/js/constants/application_constants.js @@ -1,8 +1,8 @@ 'use strict'; let constants = { - 'baseUrl': 'http://localhost:8000/api/', - //'baseUrl': 'http://staging.ascribe.io/api/', + //'baseUrl': 'http://localhost:8000/api/', + 'baseUrl': 'http://staging.ascribe.io/api/', 'debugCredentialBase64': 'ZGltaUBtYWlsaW5hdG9yLmNvbTowMDAwMDAwMDAw', // dimi@mailinator:0000000000 'aclList': ['edit', 'consign', 'consign_request', 'unconsign', 'unconsign_request', 'transfer', 'loan', 'loan_request', 'share', 'download', 'view', 'delete', 'del_from_collection', 'add_to_collection'] diff --git a/sass/main.scss b/sass/main.scss index 877c594c..587884eb 100644 --- a/sass/main.scss +++ b/sass/main.scss @@ -46,6 +46,12 @@ margin-bottom:0; } +/*This is aligning the first checkbox in pieclist detail with all the other ones*/ +.table > thead:first-child > tr:first-child > th { + padding-left:0; +} + + .ascribe-table-header-column > span { display: table-cell; vertical-align: middle; From 87bc6b3559fa6ad4655356dd33207116efbd8d7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Fri, 12 Jun 2015 13:41:15 +0200 Subject: [PATCH 02/11] fix checkbox in edition list --- sass/main.scss | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sass/main.scss b/sass/main.scss index 587884eb..8db3e7a0 100644 --- a/sass/main.scss +++ b/sass/main.scss @@ -60,10 +60,6 @@ color: #424242; } -.ascribe-table-header-column > span > .glyphicon { - font-size: .5em; -} - .ascribe-table-item-column { display: table; font-family: 'Source Sans Pro'; @@ -79,6 +75,10 @@ text-overflow: ellipsis; } +.ascribe-table-item-column > span > input { + margin-top:14px; +} + .ascribe-table-item-selected { background-color: rgba(2, 182, 163, 0.5); } 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 03/11] 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 (