-
+
{this.state.piece.num_editions > 0 ? : null}
diff --git a/js/components/ascribe_forms/form.js b/js/components/ascribe_forms/form.js
index c5f60b76..fe15f537 100644
--- a/js/components/ascribe_forms/form.js
+++ b/js/components/ascribe_forms/form.js
@@ -288,10 +288,8 @@ let Form = React.createClass({
{this.renderChildren()}
{this.getButtons()}
-
);
}
});
-
export default Form;
diff --git a/js/components/ascribe_forms/form_consign.js b/js/components/ascribe_forms/form_consign.js
index 9617acd4..db18ba4f 100644
--- a/js/components/ascribe_forms/form_consign.js
+++ b/js/components/ascribe_forms/form_consign.js
@@ -9,6 +9,9 @@ import Property from './property';
import InputTextAreaToggable from './input_textarea_toggable';
import AscribeSpinner from '../ascribe_spinner';
+
+import AclInformation from '../ascribe_buttons/acl_information';
+
import { getLangText } from '../../utils/lang_utils.js';
let ConsignForm = React.createClass({
@@ -47,6 +50,7 @@ let ConsignForm = React.createClass({
}>
+
}>
+
{getLangText('Are you sure you would like to permanently delete this edition')}?
{getLangText('This is an irrevocable action%s', '.')}
diff --git a/js/components/ascribe_forms/form_delete_piece.js b/js/components/ascribe_forms/form_delete_piece.js
index 4b0c9e39..ee066d3f 100644
--- a/js/components/ascribe_forms/form_delete_piece.js
+++ b/js/components/ascribe_forms/form_delete_piece.js
@@ -4,6 +4,8 @@ import React from 'react';
import Form from '../ascribe_forms/form';
+import AclInformation from '../ascribe_buttons/acl_information';
+
import ApiUrls from '../../constants/api_urls';
import AscribeSpinner from '../ascribe_spinner';
@@ -51,6 +53,7 @@ let PieceDeleteForm = React.createClass({
}>
+
{getLangText('Are you sure you would like to permanently delete this piece')}?
{getLangText('This is an irrevocable action%s', '.')}
diff --git a/js/components/ascribe_forms/form_loan.js b/js/components/ascribe_forms/form_loan.js
index 919b6118..d6102f14 100644
--- a/js/components/ascribe_forms/form_loan.js
+++ b/js/components/ascribe_forms/form_loan.js
@@ -19,7 +19,7 @@ import AscribeSpinner from '../ascribe_spinner';
import { mergeOptions } from '../../utils/general_utils';
import { getLangText } from '../../utils/lang_utils';
-
+import AclInformation from '../ascribe_buttons/acl_information';
let LoanForm = React.createClass({
propTypes: {
@@ -232,6 +232,7 @@ let LoanForm = React.createClass({
{this.props.loanHeading}
+
}>
+
diff --git a/js/components/ascribe_forms/form_transfer.js b/js/components/ascribe_forms/form_transfer.js
index 010c4829..3fb95ff6 100644
--- a/js/components/ascribe_forms/form_transfer.js
+++ b/js/components/ascribe_forms/form_transfer.js
@@ -9,6 +9,8 @@ import Form from './form';
import Property from './property';
import InputTextAreaToggable from './input_textarea_toggable';
+import AclInformation from '../ascribe_buttons/acl_information';
+
import AscribeSpinner from '../ascribe_spinner';
import { getLangText } from '../../utils/lang_utils.js';
@@ -52,6 +54,7 @@ let TransferForm = React.createClass({
}>
+
diff --git a/js/components/ascribe_modal/modal_wrapper.js b/js/components/ascribe_modal/modal_wrapper.js
index f00eee9e..5c3ce742 100644
--- a/js/components/ascribe_modal/modal_wrapper.js
+++ b/js/components/ascribe_modal/modal_wrapper.js
@@ -65,7 +65,7 @@ let ModalWrapper = React.createClass({
{this.props.title}
-
+
{this.renderChildren()}
diff --git a/js/components/ascribe_piece_list_toolbar/piece_list_toolbar_filter_widget.js b/js/components/ascribe_piece_list_toolbar/piece_list_toolbar_filter_widget.js
index 16886def..38de2af6 100644
--- a/js/components/ascribe_piece_list_toolbar/piece_list_toolbar_filter_widget.js
+++ b/js/components/ascribe_piece_list_toolbar/piece_list_toolbar_filter_widget.js
@@ -7,7 +7,7 @@ import DropdownButton from 'react-bootstrap/lib/DropdownButton';
import { getLangText } from '../../utils/lang_utils.js';
-let PieceListToolbarFilterWidgetFilter = React.createClass({
+let PieceListToolbarFilterWidget = React.createClass({
propTypes: {
filterParams: React.PropTypes.arrayOf(
React.PropTypes.shape({
@@ -83,6 +83,7 @@ let PieceListToolbarFilterWidgetFilter = React.createClass({
return (
{/* We iterate over filterParams, to receive the label and then for each
@@ -139,4 +140,4 @@ let PieceListToolbarFilterWidgetFilter = React.createClass({
}
});
-export default PieceListToolbarFilterWidgetFilter;
\ No newline at end of file
+export default PieceListToolbarFilterWidget;
\ No newline at end of file
diff --git a/js/components/ascribe_piece_list_toolbar/piece_list_toolbar_order_widget.js b/js/components/ascribe_piece_list_toolbar/piece_list_toolbar_order_widget.js
index a3615aec..c38144b0 100644
--- a/js/components/ascribe_piece_list_toolbar/piece_list_toolbar_order_widget.js
+++ b/js/components/ascribe_piece_list_toolbar/piece_list_toolbar_order_widget.js
@@ -54,6 +54,7 @@ let PieceListToolbarOrderWidget = React.createClass({
return (
@@ -72,7 +73,7 @@ let PieceListToolbarOrderWidget = React.createClass({
-1} />
}
buttons={this.getSubmitButtons()}>
{this.props.children}
diff --git a/js/constants/information_text.js b/js/constants/information_text.js
new file mode 100644
index 00000000..442e481e
--- /dev/null
+++ b/js/constants/information_text.js
@@ -0,0 +1,33 @@
+'use strict';
+
+export const InformationTexts = {
+ 'titles': {
+ 'acl_consign': 'CONSIGN',
+ 'acl_loan': 'LOAN',
+ 'acl_share': 'SHARE',
+ 'acl_delete': 'DELETE',
+ 'acl_create_editions': 'CREATE EDITIONS',
+ 'acl_unconsign': 'UNCONSIGN',
+ 'acl_request_unconsign': 'REQUEST UNCONSIGN'
+ },
+ 'informationSentences': {
+ 'acl_consign': ' - Lets someone represent you in dealing with the work, under the terms you agree to.',
+ 'acl_loan': ' - Lets someone use or put the Work on display for a limited amount of time.',
+ 'acl_share': ' - Lets someone view the Work or Edition, but does not give rights to publish or display it.',
+ 'acl_delete': ' - Removes the Work from your Wallet. Note that the previous registration and transfer ' +
+ 'history will still exist on the blockchain and cannot be deleted.',
+ 'acl_create_editions': ' Lets the artist set a fixed number of editions of a work which can then be transferred, guaranteeing each edition is authentic and from the artist.',
+ 'acl_unconsign': 'Ends the consignment agreement between the owner and a consignee.',
+ 'acl_request_unconsign': 'Lets the owner ask the consignee to confirm that they will no longer manage the work.'
+ },
+ 'exampleSentences': {
+ 'acl_consign': '(e.g. an artist Consigns 10 Editions of her new Work to a gallery ' +
+ 'so the gallery can sell them on her behalf, under the terms the artist and the gallery have agreed to)',
+ 'acl_loan': '(e.g. a collector Loans a Work to a gallery for one month for display in the gallery\'s show)',
+ 'acl_share': '(e.g. a photographer Shares proofs of a graduation photo with the graduate\'s grandparents)',
+ 'acl_delete': '(e.g. an artist uploaded the wrong file and doesn\'t want it cluttering his Wallet, so he Deletes it)',
+ 'acl_create_editions': '(e.g. A company commissions a visual artists to create three limited edition prints for a giveaway)',
+ 'acl_unconsign': '(e.g. An artist regains full control over their work and releases the consignee of any rights or responsibilities)',
+ 'acl_request_unconsign': '(e.g. An artist submits an unconsign request to a gallery after his exhibition ends, as per their agreement)'
+ }
+};
\ No newline at end of file
diff --git a/js/utils/acl_utils.js b/js/utils/acl_utils.js
index 170d7aec..dd39a380 100644
--- a/js/utils/acl_utils.js
+++ b/js/utils/acl_utils.js
@@ -1,10 +1,6 @@
'use strict';
-import { sanitize } from './general_utils';
-
-function intersectAcls(a, b) {
- return a.filter((val) => b.indexOf(val) > -1);
-}
+import { sanitize, intersectLists } from './general_utils';
export function getAvailableAcls(editions, filterFn) {
let availableAcls = [];
@@ -37,13 +33,15 @@ export function getAvailableAcls(editions, filterFn) {
});
// If no edition has been selected, availableActions is empty
- // If only one edition has been selected, their actions are available
- // If more than one editions have been selected, their acl properties are intersected
+ // If only one edition has been selected, its actions are available
+ // If more than one editions have been selected, intersect all their acl properties
if (editionsCopy.length >= 1) {
availableAcls = editionsCopy[0].acl;
- } else if (editionsCopy.length >= 2) {
- for (let i = 1; i < editionsCopy.length; i++) {
- availableAcls = intersectAcls(availableAcls, editionsCopy[i].acl);
+
+ if (editionsCopy.length >= 2) {
+ for (let i = 1; i < editionsCopy.length; i++) {
+ availableAcls = intersectLists(availableAcls, editionsCopy[i].acl);
+ }
}
}
@@ -53,6 +51,5 @@ export function getAvailableAcls(editions, filterFn) {
availableAclsObj[availableAcls[i]] = true;
}
-
return availableAclsObj;
}
diff --git a/js/utils/dom_utils.js b/js/utils/dom_utils.js
index c20e1009..d009f90f 100644
--- a/js/utils/dom_utils.js
+++ b/js/utils/dom_utils.js
@@ -1,9 +1,45 @@
'use strict';
-
/**
* Set the title in the browser window.
*/
export function setDocumentTitle(title) {
document.title = title;
}
+
+/**
+ * @param {string} elementType: string, is the type of the element, such as link, meta, etc.
+ * @param {string} elementId id of the element
+ * @param {object} elementAttributes: hash table containing the attributes of the relevant element
+ */
+function constructHeadElement(elementType, elementId, elementAttributes) {
+ let head = (document.head || document.getElementsByTagName('head')[0]);
+ let element = document.createElement(elementType);
+ let oldElement = document.getElementById(elementId);
+ element.setAttribute('id', elementId);
+ for (let k in elementAttributes){
+ try {
+ element.setAttribute(k, elementAttributes[k]);
+ }
+ catch(e){
+ console.warn(e.message);
+ }
+ }
+ if (oldElement) {
+ head.removeChild(oldElement);
+ }
+ head.appendChild(element);
+}
+
+/**
+ * Accepts a dictionary of dictionaries which comprises a part or all of html head part
+ * @param {object} headObject {link : {id1: {rel: ... }}}
+ */
+export function constructHead(headObject){
+ for (let k in headObject){
+ let favicons = headObject[k];
+ for (let f in favicons){
+ constructHeadElement(k, f, favicons[f]);
+ }
+ }
+}
\ No newline at end of file
diff --git a/js/utils/general_utils.js b/js/utils/general_utils.js
index cc1d22dd..1aea3cd9 100644
--- a/js/utils/general_utils.js
+++ b/js/utils/general_utils.js
@@ -222,6 +222,16 @@ export function truncateTextAtCharIndex(text, charIndex, replacement = '...') {
return truncatedText;
}
+/**
+ * @param index, int, the starting index of the substring to be replaced
+ * @param character, substring to be replaced
+ * @returns {string}
+ */
+export function replaceSubstringAtIndex(baseString, substrToReplace, stringToBePut) {
+ let index = baseString.indexOf(substrToReplace);
+ return baseString.substr(0, index) + stringToBePut + baseString.substr(index + substrToReplace.length);
+}
+
/**
* Extracts the user's subdomain from the browser's window.
* If no subdomain is found (for example on a naked domain), the default "www" is just assumed.
@@ -232,3 +242,13 @@ export function getSubdomain() {
let tokens = host.split('.');
return tokens.length > 2 ? tokens[0] : 'www';
}
+
+/**
+ * Takes two lists and returns their intersection as a list
+ * @param {Array} a
+ * @param {Array} b
+ * @return {[Array]} Intersected list of a and b
+ */
+export function intersectLists(a, b) {
+ return a.filter((val) => b.indexOf(val) > -1);
+}
diff --git a/js/utils/head_setter.js b/js/utils/head_setter.js
deleted file mode 100644
index 6ca2c9b0..00000000
--- a/js/utils/head_setter.js
+++ /dev/null
@@ -1,37 +0,0 @@
-'use strict';
-
-// elementType: string, is the type of the element, such as link, meta, etc.
-// elementId id of the element
-// elementAttributes: hash table containing the attributes of the relevant element
-
-function constructHeadElement(elementType, elementId, elementAttributes) {
- let head = (document.head || document.getElementsByTagName('head')[0]);
- let element = document.createElement(elementType);
- let oldElement = document.getElementById(elementId);
- element.setAttribute('id', elementId);
- for (let k in elementAttributes){
- try {
- element.setAttribute(k, elementAttributes[k]);
- }
- catch(e){
- console.warn(e.message);
- continue;
- }
- }
- if (oldElement) {
- head.removeChild(oldElement);
- }
- head.appendChild(element);
-}
-
-// Accepts a dictionary of dictionaries which comprises a part or all of html head part
-// {link : {id1: {rel: ... }}}
-// traverses a tree of depth 3 (no backtracking)
-export function constructHead(headObject){
- for (let k in headObject){
- let favicons = headObject[k];
- for (let f in favicons){
- constructHeadElement(k, f, favicons[f]);
- }
- }
-}
diff --git a/sass/ascribe_acl_information.scss b/sass/ascribe_acl_information.scss
new file mode 100644
index 00000000..063c8ae6
--- /dev/null
+++ b/sass/ascribe_acl_information.scss
@@ -0,0 +1,25 @@
+.acl-information-dropdown-list {
+ text-align: justify;
+ padding: .5em .5em .5em 0;
+
+ p {
+ margin: 0 .5em 1em 0;
+ line-height: 1.2;
+ }
+
+ span {
+ font-size: 13px;
+ }
+
+ .title {
+ color: $ascribe-dark-blue;
+ }
+
+ .info {
+ color: #212121;
+ }
+
+ .example {
+ color: #616161;
+ }
+}
\ No newline at end of file
diff --git a/sass/ascribe_custom_style.scss b/sass/ascribe_custom_style.scss
index 51281d91..05d39027 100644
--- a/sass/ascribe_custom_style.scss
+++ b/sass/ascribe_custom_style.scss
@@ -91,12 +91,27 @@ hr {
}
}
- .navbar-brand,
- .navbar-brand:hover {
+ .navbar-brand {
font-size: 23px;
padding: 12px 15px;
- color: $ascribe--nav-fg-prim-color;
+
+ .icon-ascribe-logo {
+ color: $ascribe--nav-fg-prim-color;
+
+ &:hover {
+ color: $ascribe--nav-fg-sec-color;
+ text-decoration: none;
+ }
+ &:focus {
+ text-decoration: none;
+ }
+ }
+
+ .img-brand {
+ height: 100%;
+ }
}
+
.img-brand .navbar-brand {
width: 0;
height: 0;
@@ -327,6 +342,29 @@ fieldset[disabled] .btn-secondary.active {
}
}
+.btn-tertiary {
+ background-color: transparent;
+ border-color: transparent;
+ color: $ascribe-dark-blue;
+
+ &:focus,
+ &:active:focus,
+ &:active.focus {
+ background-color: transparent;
+ border-color: transparent;
+ color: $ascribe-dark-blue;
+ }
+
+ &:hover,
+ &:active,
+ &:active:hover,
+ &.active:hover{
+ background-color: $ascribe-pink;
+ border-color: $ascribe-pink;
+ color: $ascribe-white;
+ }
+}
+
.ascribe-piece-list-toolbar-filter-widget button {
background-color: transparent;
border: 1px solid transparent;
diff --git a/sass/ascribe_edition.scss b/sass/ascribe_edition.scss
index 9fa30387..195e79e0 100644
--- a/sass/ascribe_edition.scss
+++ b/sass/ascribe_edition.scss
@@ -17,8 +17,4 @@
border: 1px solid #CCC;
display: table-cell;
vertical-align: middle;
-}
-
-.ascribe-button-list {
- margin-top: 1em;
-}
+}
\ No newline at end of file
diff --git a/sass/lib/buttons.scss b/sass/lib/buttons.scss
index e69de29b..68a124f9 100644
--- a/sass/lib/buttons.scss
+++ b/sass/lib/buttons.scss
@@ -0,0 +1,9 @@
+.btn-transparent {
+ color: black;
+ background-color: transparent;
+
+ &:hover, &:active, &:focus {
+ color:#424242;
+ outline: none;
+ }
+}
\ No newline at end of file
diff --git a/sass/lib/modals.scss b/sass/lib/modals.scss
new file mode 100644
index 00000000..20a720c1
--- /dev/null
+++ b/sass/lib/modals.scss
@@ -0,0 +1,8 @@
+.modal-body {
+ padding-top:0;
+}
+
+.modal-header {
+ padding: 15px 15px 0 15px;
+ border-bottom: none;
+}
\ No newline at end of file
diff --git a/sass/main.scss b/sass/main.scss
index 4b9e0f71..337dd32e 100644
--- a/sass/main.scss
+++ b/sass/main.scss
@@ -35,6 +35,9 @@ $BASE_URL: '<%= BASE_URL %>';
@import 'ascribe_form';
@import 'ascribe_panel';
@import 'ascribe_collapsible';
+@import 'ascribe_acl_information';
+@import 'lib/buttons';
+@import 'lib/modals';
@import 'ascribe_custom_style';
@import 'ascribe_spinner';
@@ -155,6 +158,7 @@ hr {
}
.ascribe-detail-property-label {
+ vertical-align: top;
font-size: .8em;
}
diff --git a/sass/variables.scss b/sass/variables.scss
index ccd48864..ac93a2fb 100644
--- a/sass/variables.scss
+++ b/sass/variables.scss
@@ -613,7 +613,7 @@ $modal-header-border-color: #e5e5e5 !default;
$modal-footer-border-color: $modal-header-border-color !default;
$modal-lg: 900px !default;
-$modal-md: 600px !default;
+$modal-md: 500px !default;
$modal-sm: 300px !default;
diff --git a/sass/whitelabel/prize/sluice/sluice_custom_style.scss b/sass/whitelabel/prize/sluice/sluice_custom_style.scss
index e2ceeeb3..4cfb7c82 100644
--- a/sass/whitelabel/prize/sluice/sluice_custom_style.scss
+++ b/sass/whitelabel/prize/sluice/sluice_custom_style.scss
@@ -251,3 +251,7 @@ $sluice--button-color: $sluice--nav-fg-prim-color;
.client--sluice .ascribe-progress-bar > .progress-bar {
background-color: $sluice--button-color;
}
+
+.client--sluice .acl-information-dropdown-list .title {
+ color: $sluice--button-color;
+}
\ No newline at end of file
diff --git a/sass/whitelabel/wallet/cc/cc_custom_style.scss b/sass/whitelabel/wallet/cc/cc_custom_style.scss
index 238937e7..44cb0dd1 100644
--- a/sass/whitelabel/wallet/cc/cc_custom_style.scss
+++ b/sass/whitelabel/wallet/cc/cc_custom_style.scss
@@ -204,3 +204,7 @@ $cc--button-color: $cc--nav-fg-prim-color;
.client--cc .ascribe-progress-bar > .progress-bar {
background-color: $cc--button-color;
}
+
+.client--cc .acl-information-dropdown-list .title {
+ color: $cc--button-color;
+}
\ No newline at end of file
diff --git a/sass/whitelabel/wallet/cyland/cyland_custom_style.scss b/sass/whitelabel/wallet/cyland/cyland_custom_style.scss
index c33e247b..eaf45621 100644
--- a/sass/whitelabel/wallet/cyland/cyland_custom_style.scss
+++ b/sass/whitelabel/wallet/cyland/cyland_custom_style.scss
@@ -179,3 +179,7 @@ $cyland--button-color: $cyland--nav-fg-prim-color;
.client--cyland .ascribe-progress-bar > .progress-bar {
background-color: $cyland--button-color;
}
+
+.client--cyland .acl-information-dropdown-list .title {
+ color: $cyland--button-color;
+}
\ No newline at end of file
diff --git a/sass/whitelabel/wallet/ikonotv/ikonotv_custom_style.scss b/sass/whitelabel/wallet/ikonotv/ikonotv_custom_style.scss
index 5fc9220b..52affdaf 100644
--- a/sass/whitelabel/wallet/ikonotv/ikonotv_custom_style.scss
+++ b/sass/whitelabel/wallet/ikonotv/ikonotv_custom_style.scss
@@ -521,3 +521,7 @@ $ikono--font: 'Helvetica Neue', 'Helvetica', sans-serif !important;
.client--ikonotv .ascribe-progress-bar > .progress-bar {
background-color: $ikono--button-color;
}
+
+.client--ikonotv .acl-information-dropdown-list .title {
+ color: $ikono--button-color;
+}
\ No newline at end of file