From b81cd76d10058cc8b37541ae4385c9755917bf84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Thu, 21 Jan 2016 15:17:19 +0100 Subject: [PATCH 1/6] Change language in detail pages: - "BY" => "CREATED BY" - "REGISTREE" => "ASCRIBED BY" --- js/components/ascribe_detail/edition.js | 2 +- js/components/ascribe_detail/piece_container.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/components/ascribe_detail/edition.js b/js/components/ascribe_detail/edition.js index 803d73bb..df9d41a0 100644 --- a/js/components/ascribe_detail/edition.js +++ b/js/components/ascribe_detail/edition.js @@ -70,7 +70,7 @@ let Edition = React.createClass({

{edition.title}

- +
diff --git a/js/components/ascribe_detail/piece_container.js b/js/components/ascribe_detail/piece_container.js index f7ef024f..8ee3111f 100644 --- a/js/components/ascribe_detail/piece_container.js +++ b/js/components/ascribe_detail/piece_container.js @@ -269,7 +269,7 @@ let PieceContainer = React.createClass({

{piece.title}

- + {piece.num_editions > 0 ? : null}
@@ -277,7 +277,7 @@ let PieceContainer = React.createClass({ } subheader={
- +
From d9755f35636eaaead32b37253c6aa7f9e7ced33a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Thu, 21 Jan 2016 16:24:17 +0100 Subject: [PATCH 2/6] Extract file extension from amazon S3 link --- js/components/ascribe_detail/media_container.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/js/components/ascribe_detail/media_container.js b/js/components/ascribe_detail/media_container.js index e4270132..cb86e558 100644 --- a/js/components/ascribe_detail/media_container.js +++ b/js/components/ascribe_detail/media_container.js @@ -14,7 +14,9 @@ import CollapsibleButton from './../ascribe_collapsible/collapsible_button'; import AclProxy from '../acl_proxy'; -import { getLangText } from '../../utils/lang_utils.js'; +import { getLangText } from '../../utils/lang_utils'; +import { extractFileExtensionFromString } from '../../utils/file_utils'; + const EMBED_IFRAME_HEIGHT = { video: 315, @@ -63,6 +65,7 @@ let MediaContainer = React.createClass({ // We also force uniqueness of usernames, so this check is safe to dtermine if the // content was registered by the current user. const didUserRegisterContent = currentUser && (currentUser.username === content.user_registered); + const fileExtension = extractFileExtensionFromString(content.digital_work.url); let thumbnail = content.thumbnail.thumbnail_sizes && content.thumbnail.thumbnail_sizes['600x600'] ? content.thumbnail.thumbnail_sizes['600x600'] : content.thumbnail.url_safe; @@ -120,7 +123,7 @@ let MediaContainer = React.createClass({ className="ascribe-margin-1px" href={content.digital_work.url} target="_blank"> - {getLangText('Download')} .{mimetype} + {getLangText('Download')} .{fileExtension} {embed} From aef3bf5094c2a40d1c225f39737c63c6332af3f1 Mon Sep 17 00:00:00 2001 From: Brett Sun Date: Thu, 21 Jan 2016 17:20:45 +0100 Subject: [PATCH 4/6] Remove hash option for thumbnail --- js/components/ascribe_forms/form_register_piece.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/js/components/ascribe_forms/form_register_piece.js b/js/components/ascribe_forms/form_register_piece.js index 596f8a56..10fb54d3 100644 --- a/js/components/ascribe_forms/form_register_piece.js +++ b/js/components/ascribe_forms/form_register_piece.js @@ -216,9 +216,7 @@ let RegisterPieceForm = React.createClass({ plural: getLangText('Select representative images') }} isFineUploaderActive={isFineUploaderActive} - disabled={!isFineUploaderEditable} - enableLocalHashing={enableLocalHashing} - uploadMethod={location.query.method} /> + disabled={!isFineUploaderEditable} /> Date: Fri, 22 Jan 2016 00:03:49 +0100 Subject: [PATCH 5/6] Remove duplicate 'name' propType in PieceExtraDataForm You would not believe how much pain this has caused me with PhantomJS... --- js/components/ascribe_forms/form_piece_extradata.js | 1 - 1 file changed, 1 deletion(-) diff --git a/js/components/ascribe_forms/form_piece_extradata.js b/js/components/ascribe_forms/form_piece_extradata.js index 9ba53f3b..6a475fb6 100644 --- a/js/components/ascribe_forms/form_piece_extradata.js +++ b/js/components/ascribe_forms/form_piece_extradata.js @@ -20,7 +20,6 @@ let PieceExtraDataForm = React.createClass({ editable: React.PropTypes.bool, extraData: React.PropTypes.object, handleSuccess: React.PropTypes.func, - name: React.PropTypes.string, title: React.PropTypes.string }, From 4088857d67eb3e187de50c3a4336b7f5fef95309 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Mon, 25 Jan 2016 10:23:20 +0100 Subject: [PATCH 6/6] Fix property naming for Fetcher to fix "Show more" dialog Closes #131 --- js/actions/edition_list_actions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/actions/edition_list_actions.js b/js/actions/edition_list_actions.js index a52e32b9..9474a418 100644 --- a/js/actions/edition_list_actions.js +++ b/js/actions/edition_list_actions.js @@ -39,7 +39,7 @@ class EditionListActions { return Q.Promise((resolve, reject) => { EditionListFetcher - .fetch({ pieceId, page, itemsToFetch, orderBy, orderAsc, filterBy }) + .fetch({ pieceId, page, orderBy, orderAsc, filterBy, pageSize: itemsToFetch }) .then((res) => { if (res && !res.editions) { throw new Error('Piece has no editions to fetch.');