Merge tag '0.14' into develop

0.14
This commit is contained in:
Mateus Machado Luna 2019-11-22 10:58:15 -03:00
commit f22209e47f
75 changed files with 469 additions and 313 deletions

67
package-lock.json generated
View File

@ -1951,9 +1951,9 @@
}
},
"buefy": {
"version": "0.8.6",
"resolved": "https://registry.npmjs.org/buefy/-/buefy-0.8.6.tgz",
"integrity": "sha512-7woxrdwANcnJbe7lofPxkJLGRRGIVwFXOo0kzEpiNB6alQj18NV6UrdAKse+LWCOADz+AeHe5gyc6qdgRjG5mw==",
"version": "0.8.7",
"resolved": "https://registry.npmjs.org/buefy/-/buefy-0.8.7.tgz",
"integrity": "sha512-Nmd6yuNPTQkwGXflLeRCINnLQWvDZcDqbw+7sy+LjX0n5kP5kcJ4DFc43koO+yPd4MpB7ZheHhLk5Sn00NnToA==",
"requires": {
"bulma": "0.7.5"
}
@ -4767,9 +4767,9 @@
}
},
"he": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz",
"integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=",
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
"integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
"dev": true
},
"hmac-drbg": {
@ -5682,11 +5682,6 @@
"integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=",
"dev": true
},
"lodash.merge": {
"version": "4.6.2",
"resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
"integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ=="
},
"lodash.tail": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/lodash.tail/-/lodash.tail-4.1.1.tgz",
@ -6714,9 +6709,9 @@
}
},
"popper.js": {
"version": "1.14.3",
"resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.14.3.tgz",
"integrity": "sha1-FDj5jQRqz3tNeM1QK/QYrGTU8JU="
"version": "1.16.0",
"resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.0.tgz",
"integrity": "sha512-+G+EkOPoE5S/zChTpmBSSDYmhXJ5PsW8eMhH8cP/CQHMFPBG/kC9Y5IIw6qNYgdJ+/COf0ddY2li28iHaZRSjw=="
},
"portfinder": {
"version": "1.0.17",
@ -8081,9 +8076,9 @@
}
},
"sortablejs": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.7.0.tgz",
"integrity": "sha1-gKKyNwq9Vo4c7IwnETHvMKkE+ig="
"version": "1.10.1",
"resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.10.1.tgz",
"integrity": "sha512-N6r7GrVmO8RW1rn0cTdvK3JR0BcqecAJ0PmYMCL3ZuqTH3pY+9QyqkmJSkkLyyDvd+AJnwaxTP22Ybr/83V9hQ=="
},
"source-list-map": {
"version": "2.0.0",
@ -9072,13 +9067,13 @@
"dev": true
},
"v-tooltip": {
"version": "2.0.0-rc.33",
"resolved": "https://registry.npmjs.org/v-tooltip/-/v-tooltip-2.0.0-rc.33.tgz",
"integrity": "sha1-ePfY6cNCZWIr5lup3HjGfx3AK3M=",
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/v-tooltip/-/v-tooltip-2.0.2.tgz",
"integrity": "sha512-xQ+qzOFfywkLdjHknRPgMMupQNS8yJtf9Utd5Dxiu/0n4HtrxqsgDtN2MLZ0LKbburtSAQgyypuE/snM8bBZhw==",
"requires": {
"lodash.merge": "^4.6.0",
"popper.js": "^1.12.9",
"vue-resize": "^0.4.3"
"lodash": "^4.17.11",
"popper.js": "^1.15.0",
"vue-resize": "^0.4.5"
}
},
"v8-compile-cache": {
@ -9122,9 +9117,9 @@
}
},
"vue": {
"version": "2.5.17",
"resolved": "https://registry.npmjs.org/vue/-/vue-2.5.17.tgz",
"integrity": "sha512-mFbcWoDIJi0w0Za4emyLiW72Jae0yjANHbCVquMKijcavBGypqlF7zHRgMa5k4sesdv7hv2rB4JPdZfR+TPfhQ=="
"version": "2.6.10",
"resolved": "https://registry.npmjs.org/vue/-/vue-2.6.10.tgz",
"integrity": "sha512-ImThpeNU9HbdZL3utgMCq0oiMzAkt1mcgy3/E6zWC/G6AaQoeuFdsl9nDhTDU3X1R6FK7nsIUuRACVcjI+A2GQ=="
},
"vue-awesome-swiper": {
"version": "3.1.3",
@ -9222,9 +9217,9 @@
"integrity": "sha512-viecHQiHVLez7HlYUQsv1wJb2MT/RDSzkDp6m3In41vPrk6OsBmT2qRE8LZqYIA4daIwrnx/Xm8h4fjOpuE3hw=="
},
"vue-resize": {
"version": "0.4.4",
"resolved": "https://registry.npmjs.org/vue-resize/-/vue-resize-0.4.4.tgz",
"integrity": "sha512-Lb/cnE2N9Y42ZJPw8wpjkpuX5a9ReerWNGcQRcbNCwfCnkHG6++FurNNmLIdU8dcCTH4c5rtTPdxBqFoRMK2cQ=="
"version": "0.4.5",
"resolved": "https://registry.npmjs.org/vue-resize/-/vue-resize-0.4.5.tgz",
"integrity": "sha512-bhP7MlgJQ8TIkZJXAfDf78uJO+mEI3CaLABLjv0WNzr4CcGRGPIAItyWYnP6LsPA4Oq0WE+suidNs6dgpO4RHg=="
},
"vue-router": {
"version": "3.0.1",
@ -9242,9 +9237,9 @@
}
},
"vue-template-compiler": {
"version": "2.5.17",
"resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.5.17.tgz",
"integrity": "sha512-63uI4syCwtGR5IJvZM0LN5tVsahrelomHtCxvRkZPJ/Tf3ADm1U1wG6KWycK3qCfqR+ygM5vewUvmJ0REAYksg==",
"version": "2.6.10",
"resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.6.10.tgz",
"integrity": "sha512-jVZkw4/I/HT5ZMvRnhv78okGusqe0+qH2A0Em0Cp8aq78+NK9TII263CDVz2QXZsIT+yyV/gZc/j/vlwa+Epyg==",
"dev": true,
"requires": {
"de-indent": "^1.0.2",
@ -9263,11 +9258,11 @@
"integrity": "sha512-UquSfnSWejD0zAfcD+3jJ1chUAkOAyoxya9Lxh9acCRtrlmGcAIvd0cQYraWqKenbuZJUdum+S174atv2AuEHQ=="
},
"vuedraggable": {
"version": "2.16.0",
"resolved": "https://registry.npmjs.org/vuedraggable/-/vuedraggable-2.16.0.tgz",
"integrity": "sha512-fr9gcWKXMJlzbbtJcrQs4kU7qdOZqd4SEpAcx+r0nykbW8AygZN0aKVpadEtI53T8A2azhzCdXMvEqrLuKE2fA==",
"version": "2.23.2",
"resolved": "https://registry.npmjs.org/vuedraggable/-/vuedraggable-2.23.2.tgz",
"integrity": "sha512-PgHCjUpxEAEZJq36ys49HfQmXglattf/7ofOzUrW2/rRdG7tu6fK84ir14t1jYv4kdXewTEa2ieKEAhhEMdwkQ==",
"requires": {
"sortablejs": "^1.7.0"
"sortablejs": "^1.10.1"
}
},
"vuex": {

View File

@ -8,7 +8,7 @@
},
"dependencies": {
"axios": "^0.19.0",
"buefy": "^0.8.6",
"buefy": "^0.8.7",
"bulma": "^0.7.5",
"mdi": "^2.2.43",
"moment": "^2.22.2",
@ -17,13 +17,13 @@
"react": "^16.8.3",
"react-dom": "^16.8.3",
"t": "^0.5.1",
"v-tooltip": "^2.0.0-rc.33",
"vue": "^2.5.17",
"v-tooltip": "^2.0.2",
"vue": "^2.5.22",
"vue-awesome-swiper": "^3.1.3",
"vue-masonry-css": "^1.0.3",
"vue-router": "^3.0.1",
"vue-the-mask": "^0.11.1",
"vuedraggable": "^2.16.0",
"vuedraggable": "^2.23.2",
"vuex": "^3.0.1"
},
"devDependencies": {
@ -43,7 +43,7 @@
"style-loader": "^0.23.1",
"terser-webpack-plugin": "^1.1.0",
"vue-loader": "^15.4.2",
"vue-template-compiler": "^2.5.17",
"vue-template-compiler": "^2.5.22",
"webpack": "^4.22.0",
"webpack-bundle-analyzer": "^3.3.2",
"webpack-cli": "^3.1.2",

View File

@ -39,15 +39,13 @@
class="active-filters-area"
@change="handleChangeOnFilter"
:class="{'filters-area-receive': isDraggingFromAvailable}"
v-model="activeFilterList"
:options="{
group: { name:'filters', pull: false, put: true },
sort: (openedFilterId == '' || openedFilterId == undefined) && !isRepositoryLevel,
//disabled: openedFilterId != '' && openedFilterId != undefined,
handle: '.handle',
ghostClass: 'sortable-ghost',
filter: 'not-sortable-item',
animation: '250'}">
v-model="activeFilterList"
:group="{ name:'filters', pull: false, put: true }"
:sort="(openedFilterId == '' || openedFilterId == undefined) && !isRepositoryLevel"
:handle="'.handle'"
ghost-class="sortable-ghost"
filter="not-sortable-item"
:animation="250">
<div
class="active-filter-item"
:class="{
@ -166,11 +164,9 @@
@change="handleChangeOnMetadata"
v-if="availableMetadata.length > 0 && !isLoadingMetadatumTypes"
v-model="availableMetadata"
:options="{
sort: false,
group: { name:'filters', pull: !isSelectingFilterType, put: false, revertClone: true },
dragClass: 'sortable-drag'
}">
:sort="false"
:group="{ name:'filters', pull: !isSelectingFilterType, put: false, revertClone: true }"
drag-class="sortable-drag">
<div
class="available-metadatum-item"
:class="{

View File

@ -43,16 +43,14 @@
class="active-metadata-area"
@change="handleChange"
:class="{'metadata-area-receive': isDraggingFromAvailable}"
:options="{
group: { name:'metadata', pull: false, put: true },
sort: (openedMetadatumId == '' || openedMetadatumId == undefined) && !isRepositoryLevel,
//disabled: openedMetadatumId != '' && openedMetadatumId != undefined,
handle: '.handle',
ghostClass: 'sortable-ghost',
chosenClass: 'sortable-chosen',
filter: 'not-sortable-item',
animation: '250'}">
<div
:group="{ name:'metadata', pull: false, put: true }"
:sort="(openedMetadatumId == '' || openedMetadatumId == undefined) && !isRepositoryLevel"
:handle="'.handle'"
ghost-class="sortable-ghost"
chosen-class="sortable-chosen"
filter="not-sortable-item"
:animation="250">
<div
class="active-metadatum-item"
:class="{
'not-sortable-item': isRepositoryLevel || metadatum.id == undefined || openedMetadatumId != '' || isUpdatingMetadataOrder,
@ -190,11 +188,9 @@
<h3 class="label has-text-secondary">{{ $i18n.get('label_available_metadata_types') }}</h3>
<draggable
v-model="availableMetadatumList"
:options="{
sort: false,
group: { name:'metadata', pull: 'clone', put: false, revertClone: true },
dragClass: 'sortable-drag'
}">
:sort="false"
:group="{ name:'metadata', pull: 'clone', put: false, revertClone: true }"
drag-class="sortable-drag">
<div
@click.prevent="addMetadatumViaButton(metadatum)"
class="available-metadatum-item"

View File

@ -472,23 +472,27 @@
}
},
created(){
jQuery( document ).on( 'heartbeat-tick-list', ( event, data ) => {
let updatedProcesses = data.bg_process_feedback;
if (jQuery && jQuery( document )) {
jQuery( document ).on( 'heartbeat-tick-list', ( event, data ) => {
let updatedProcesses = data.bg_process_feedback;
for (let updatedProcess of updatedProcesses) {
let updatedProcessIndex = this.processes.findIndex((aProcess) => aProcess.ID == updatedProcess.ID);
if (updatedProcessIndex >= 0) {
this.heartBitUpdateProcess(updatedProcess);
for (let updatedProcess of updatedProcesses) {
let updatedProcessIndex = this.processes.findIndex((aProcess) => aProcess.ID == updatedProcess.ID);
if (updatedProcessIndex >= 0) {
this.heartBitUpdateProcess(updatedProcess);
}
}
}
});
});
jQuery( document ).on( 'heartbeat-tick', ( event, data ) => {
jQuery( document ).trigger('heartbeat-tick-list', data);
});
jQuery( document ).on( 'heartbeat-tick', ( event, data ) => {
jQuery( document ).trigger('heartbeat-tick-list', data);
});
}
},
beforeDestroy() {
jQuery( document ).unbind( 'heartbeat-tick-list')
if (jQuery && jQuery( document )) {
jQuery( document ).unbind( 'heartbeat-tick-list')
}
}
}
</script>

View File

@ -530,7 +530,7 @@ export default {
color: $blue5;
height: 27px;
font-size: 18px !important;
height: 2rem !important;
height: auto !important;
}
}
a {

View File

@ -236,18 +236,19 @@ export default {
this.showProcessesList = false;
jQuery( document ).on( 'heartbeat-tick-popup', ( event, data ) => {
this.setProcesses(data.bg_process_feedback);
});
jQuery( document ).on( 'heartbeat-tick', ( event, data ) => {
jQuery( document ).trigger('heartbeat-tick-popup',data);
});
if (jQuery && jQuery( document )) {
jQuery( document ).on( 'heartbeat-tick-popup', ( event, data ) => {
this.setProcesses(data.bg_process_feedback);
});
jQuery( document ).on( 'heartbeat-tick', ( event, data ) => {
jQuery( document ).trigger('heartbeat-tick-popup',data);
});
}
},
beforeDestroy() {
jQuery( document ).unbind( 'heartbeat-tick-popup')
if (jQuery && jQuery( document ))
jQuery( document ).unbind( 'heartbeat-tick-popup')
}
}
</script>

View File

@ -118,7 +118,8 @@ function listen(evnt, elem, func) {
return r;
}
else {
jQuery('head').append('<style>.tainacan-icon{ opacity: 1 !important; }</style>');
if (jQuery && jQuery('head'))
jQuery('head').append('<style>.tainacan-icon{ opacity: 1 !important; }</style>');
}
}
listen("load", window, function() {

View File

@ -1524,7 +1524,9 @@
this.$nextTick(() => {
if (this.$refs['search-control'] != undefined)
this.searchControlHeight = this.$refs['search-control'] ? this.$refs['search-control'].clientHeight + this.$refs['search-control'].offsetTop : 0;
this.isFiltersMenuCompressed = jQuery(window).width() <= 768;
if (jQuery && jQuery(window))
this.isFiltersMenuCompressed = jQuery(window).width() <= 768;
});
}, 500),
removeEventListeners() {
@ -1773,7 +1775,6 @@
.filters-menu {
position: relative;
z-index: 10;
background-color: white;
width: $filter-menu-width;
min-width: 180px;
min-height: 100%;
@ -1815,7 +1816,7 @@
color: $blue5;
height: 27px;
font-size: 1.125rem !important;
height: 2rem !important;
height: auto !important;
}
margin-bottom: 5px;
}
@ -1983,7 +1984,7 @@
color: $blue5;
height: 27px;
font-size: 1.125rem !important;
height: 2rem !important;
height: auto !important;
}
}
a {

View File

@ -1447,9 +1447,11 @@
},
adjustSearchControlHeight: _.debounce( function() {
this.$nextTick(() => {
if (this.$refs['search-control'] != undefined)
if (this.$refs['search-control'] != undefined)
this.searchControlHeight = this.$refs['search-control'] ? this.$refs['search-control'].clientHeight + this.$refs['search-control'].offsetTop : 0;
this.isFiltersMenuCompressed = jQuery(window).width() <= 768;
if (jQuery && jQuery(window))
this.isFiltersMenuCompressed = jQuery(window).width() <= 768;
});
}, 500),
removeEventListeners() {
@ -1688,7 +1690,6 @@
.filters-menu {
position: relative;
z-index: 10;
background-color: white;
width: $filter-menu-width;
min-width: 180px;
min-height: 100%;
@ -1730,7 +1731,7 @@
color: $blue5;
height: 27px;
font-size: 1.125rem !important;
height: 2rem !important;
height: auto !important;
}
margin-bottom: 5px;
}
@ -1899,7 +1900,7 @@
color: $blue5;
height: 27px;
font-size: 1.125rem !important;
height: 2rem !important;
height: auto !important;
}
}
a {

View File

@ -37,8 +37,8 @@ button.link-style:active {
&.is-success:hover, &.is-success:focus {
background: $success !important;
}
&.is-white:hover, &.is-white:focus, &.is-outlined:hover, &.is-outlined:focus {
background: $white !important;
&.is-white, &.is-white:hover, &.is-white:focus, &.is-outlined:hover, &.is-outlined:focus {
background-color: transparent !important;
}
&:active {
-webkit-transform: none !important;
@ -68,7 +68,8 @@ button.link-style:active {
background-color: white !important;
}
&.is-white[disabled] {
background-color: white !important;
background-color: transparent !important;
opacity: 0.85;
}
}
.button.is-small {

View File

@ -109,11 +109,12 @@
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-size: 20px;
text-transform: none !important;
}
.taginput-container {
padding: 0px !important;
background-color: white !important;
background-color: transparent !important;
&:focus, &:active {
border: none !important;
@ -216,6 +217,8 @@
// -webkit-font-smoothing: antialiased;
// -moz-osx-font-smoothing: grayscale;
// content: 'calendar';
// text-transform: none !important;
// letter-spacing: normal !important;
// }
// }
@ -239,6 +242,8 @@
line-height: inherit;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-transform: none !important;
letter-spacing: normal !important;
color: $secondary;
}

View File

@ -1,4 +1,5 @@
#filters-mobile-modal {
#filters-mobile-modal {
background-color: white;
.modal-close {
right: calc(8.3333333% + 20px);

View File

@ -115,6 +115,8 @@
line-height: inherit;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-transform: none !important;
letter-spacing: normal !important;
}
.mdi-chevron-left::before {
content: "arrowleft" !important;

View File

@ -39,6 +39,8 @@
display: flex !important;
align-items: initial;
margin-top: -10px !important;
text-transform: none !important;
letter-spacing: normal !important;
}
&.is-loading.is-small::after {
font-size: 0.875rem;

View File

@ -85,6 +85,8 @@
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
transform: none !important;
text-transform: none !important;
letter-spacing: normal !important;
font-size: 20px;
margin-top: -2px;
}

View File

@ -136,6 +136,7 @@
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
margin-top: 0;
margin-bottom: 0;
}
}

View File

@ -113,6 +113,7 @@
text-align: left !important;
margin-bottom: 0 !important;
word-break: break-word;
margin: 0;
}
}

View File

@ -109,6 +109,7 @@
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
margin: 0;
transition: background-color 0.3s;
}
}

View File

@ -20,8 +20,11 @@
text-rendering: auto;
vertical-align: middle;
line-height: inherit;
text-transform: none !important;
letter-spacing: normal !important;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.tainacan-icon-pdf:before {

View File

@ -22,15 +22,21 @@
position: relative;
fill: #555758; }
.components-placeholder__fieldset p {
font-size: 0.875rem !important;
margin-top: -2px;
fill: #555758; }
.components-placeholder__fieldset p svg {
margin-right: 1rem;
top: 4px;
position: relative;
.components-placeholder {
margin-bottom: 0;
background: #f6f6f6; }
.components-placeholder .components-placeholder__label {
margin-bottom: 0; }
.components-placeholder .components-placeholder__fieldset p {
font-size: 0.875rem !important;
margin: 12px 0;
color: #454647;
fill: #555758; }
.components-placeholder .components-placeholder__fieldset p svg {
margin-right: 1rem;
top: 4px;
position: relative;
fill: #555758; }
.wp-block-tainacan-modal {
width: 50%; }
@ -111,6 +117,9 @@
.wp-block-tainacan-modal .modal-checkbox-list .components-base-control,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .components-base-control {
overflow: hidden; }
.wp-block-tainacan-modal .modal-checkbox-list svg.dashicon.components-checkbox-control__checked,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field svg.dashicon.components-checkbox-control__checked {
fill: black; }
.wp-block-tainacan-modal .modal-checkbox-list .modal-checkbox-list-item,
.wp-block-tainacan-modal .modal-checkbox-list .components-radio-control__option,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .modal-checkbox-list-item,
@ -298,7 +307,8 @@
display: grid;
grid-template-columns: 33% 33% 33%;
grid-template-rows: 50% 50%;
width: 100%; }
width: 100%;
box-sizing: border-box; }
.wp-block-tainacan-carousel-collections-list .tainacan-carousel .swiper-container .swiper-slide.collection-list-item-grid .collection-items-grid img:first-of-type {
flex-basis: 100%;
-ms-grid-column: 1;

File diff suppressed because one or more lines are too long

View File

@ -22,15 +22,21 @@
position: relative;
fill: #555758; }
.components-placeholder__fieldset p {
font-size: 0.875rem !important;
margin-top: -2px;
fill: #555758; }
.components-placeholder__fieldset p svg {
margin-right: 1rem;
top: 4px;
position: relative;
.components-placeholder {
margin-bottom: 0;
background: #f6f6f6; }
.components-placeholder .components-placeholder__label {
margin-bottom: 0; }
.components-placeholder .components-placeholder__fieldset p {
font-size: 0.875rem !important;
margin: 12px 0;
color: #454647;
fill: #555758; }
.components-placeholder .components-placeholder__fieldset p svg {
margin-right: 1rem;
top: 4px;
position: relative;
fill: #555758; }
.wp-block-tainacan-modal {
width: 50%; }
@ -111,6 +117,9 @@
.wp-block-tainacan-modal .modal-checkbox-list .components-base-control,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .components-base-control {
overflow: hidden; }
.wp-block-tainacan-modal .modal-checkbox-list svg.dashicon.components-checkbox-control__checked,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field svg.dashicon.components-checkbox-control__checked {
fill: black; }
.wp-block-tainacan-modal .modal-checkbox-list .modal-checkbox-list-item,
.wp-block-tainacan-modal .modal-checkbox-list .components-radio-control__option,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .modal-checkbox-list-item,

File diff suppressed because one or more lines are too long

View File

@ -22,15 +22,21 @@
position: relative;
fill: #555758; }
.components-placeholder__fieldset p {
font-size: 0.875rem !important;
margin-top: -2px;
fill: #555758; }
.components-placeholder__fieldset p svg {
margin-right: 1rem;
top: 4px;
position: relative;
.components-placeholder {
margin-bottom: 0;
background: #f6f6f6; }
.components-placeholder .components-placeholder__label {
margin-bottom: 0; }
.components-placeholder .components-placeholder__fieldset p {
font-size: 0.875rem !important;
margin: 12px 0;
color: #454647;
fill: #555758; }
.components-placeholder .components-placeholder__fieldset p svg {
margin-right: 1rem;
top: 4px;
position: relative;
fill: #555758; }
.wp-block-tainacan-modal {
width: 50%; }
@ -111,6 +117,9 @@
.wp-block-tainacan-modal .modal-checkbox-list .components-base-control,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .components-base-control {
overflow: hidden; }
.wp-block-tainacan-modal .modal-checkbox-list svg.dashicon.components-checkbox-control__checked,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field svg.dashicon.components-checkbox-control__checked {
fill: black; }
.wp-block-tainacan-modal .modal-checkbox-list .modal-checkbox-list-item,
.wp-block-tainacan-modal .modal-checkbox-list .components-radio-control__option,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .modal-checkbox-list-item,

File diff suppressed because one or more lines are too long

View File

@ -22,15 +22,21 @@
position: relative;
fill: #555758; }
.components-placeholder__fieldset p {
font-size: 0.875rem !important;
margin-top: -2px;
fill: #555758; }
.components-placeholder__fieldset p svg {
margin-right: 1rem;
top: 4px;
position: relative;
.components-placeholder {
margin-bottom: 0;
background: #f6f6f6; }
.components-placeholder .components-placeholder__label {
margin-bottom: 0; }
.components-placeholder .components-placeholder__fieldset p {
font-size: 0.875rem !important;
margin: 12px 0;
color: #454647;
fill: #555758; }
.components-placeholder .components-placeholder__fieldset p svg {
margin-right: 1rem;
top: 4px;
position: relative;
fill: #555758; }
.wp-block-tainacan-modal {
width: 50%; }
@ -111,6 +117,9 @@
.wp-block-tainacan-modal .modal-checkbox-list .components-base-control,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .components-base-control {
overflow: hidden; }
.wp-block-tainacan-modal .modal-checkbox-list svg.dashicon.components-checkbox-control__checked,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field svg.dashicon.components-checkbox-control__checked {
fill: black; }
.wp-block-tainacan-modal .modal-checkbox-list .modal-checkbox-list-item,
.wp-block-tainacan-modal .modal-checkbox-list .components-radio-control__option,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .modal-checkbox-list-item,

File diff suppressed because one or more lines are too long

View File

@ -22,15 +22,21 @@
position: relative;
fill: #555758; }
.components-placeholder__fieldset p {
font-size: 0.875rem !important;
margin-top: -2px;
fill: #555758; }
.components-placeholder__fieldset p svg {
margin-right: 1rem;
top: 4px;
position: relative;
.components-placeholder {
margin-bottom: 0;
background: #f6f6f6; }
.components-placeholder .components-placeholder__label {
margin-bottom: 0; }
.components-placeholder .components-placeholder__fieldset p {
font-size: 0.875rem !important;
margin: 12px 0;
color: #454647;
fill: #555758; }
.components-placeholder .components-placeholder__fieldset p svg {
margin-right: 1rem;
top: 4px;
position: relative;
fill: #555758; }
.wp-block-tainacan-modal {
width: 50%; }
@ -111,6 +117,9 @@
.wp-block-tainacan-modal .modal-checkbox-list .components-base-control,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .components-base-control {
overflow: hidden; }
.wp-block-tainacan-modal .modal-checkbox-list svg.dashicon.components-checkbox-control__checked,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field svg.dashicon.components-checkbox-control__checked {
fill: black; }
.wp-block-tainacan-modal .modal-checkbox-list .modal-checkbox-list-item,
.wp-block-tainacan-modal .modal-checkbox-list .components-radio-control__option,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .modal-checkbox-list-item,

File diff suppressed because one or more lines are too long

View File

@ -22,15 +22,21 @@
position: relative;
fill: #555758; }
.components-placeholder__fieldset p {
font-size: 0.875rem !important;
margin-top: -2px;
fill: #555758; }
.components-placeholder__fieldset p svg {
margin-right: 1rem;
top: 4px;
position: relative;
.components-placeholder {
margin-bottom: 0;
background: #f6f6f6; }
.components-placeholder .components-placeholder__label {
margin-bottom: 0; }
.components-placeholder .components-placeholder__fieldset p {
font-size: 0.875rem !important;
margin: 12px 0;
color: #454647;
fill: #555758; }
.components-placeholder .components-placeholder__fieldset p svg {
margin-right: 1rem;
top: 4px;
position: relative;
fill: #555758; }
.wp-block-tainacan-modal {
width: 50%; }
@ -111,6 +117,9 @@
.wp-block-tainacan-modal .modal-checkbox-list .components-base-control,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .components-base-control {
overflow: hidden; }
.wp-block-tainacan-modal .modal-checkbox-list svg.dashicon.components-checkbox-control__checked,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field svg.dashicon.components-checkbox-control__checked {
fill: black; }
.wp-block-tainacan-modal .modal-checkbox-list .modal-checkbox-list-item,
.wp-block-tainacan-modal .modal-checkbox-list .components-radio-control__option,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .modal-checkbox-list-item,

File diff suppressed because one or more lines are too long

View File

@ -22,15 +22,21 @@
position: relative;
fill: #555758; }
.components-placeholder__fieldset p {
font-size: 0.875rem !important;
margin-top: -2px;
fill: #555758; }
.components-placeholder__fieldset p svg {
margin-right: 1rem;
top: 4px;
position: relative;
.components-placeholder {
margin-bottom: 0;
background: #f6f6f6; }
.components-placeholder .components-placeholder__label {
margin-bottom: 0; }
.components-placeholder .components-placeholder__fieldset p {
font-size: 0.875rem !important;
margin: 12px 0;
color: #454647;
fill: #555758; }
.components-placeholder .components-placeholder__fieldset p svg {
margin-right: 1rem;
top: 4px;
position: relative;
fill: #555758; }
.wp-block-tainacan-modal {
width: 50%; }
@ -111,6 +117,9 @@
.wp-block-tainacan-modal .modal-checkbox-list .components-base-control,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .components-base-control {
overflow: hidden; }
.wp-block-tainacan-modal .modal-checkbox-list svg.dashicon.components-checkbox-control__checked,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field svg.dashicon.components-checkbox-control__checked {
fill: black; }
.wp-block-tainacan-modal .modal-checkbox-list .modal-checkbox-list-item,
.wp-block-tainacan-modal .modal-checkbox-list .components-radio-control__option,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .modal-checkbox-list-item,

File diff suppressed because one or more lines are too long

View File

@ -22,15 +22,21 @@
position: relative;
fill: #555758; }
.components-placeholder__fieldset p {
font-size: 0.875rem !important;
margin-top: -2px;
fill: #555758; }
.components-placeholder__fieldset p svg {
margin-right: 1rem;
top: 4px;
position: relative;
.components-placeholder {
margin-bottom: 0;
background: #f6f6f6; }
.components-placeholder .components-placeholder__label {
margin-bottom: 0; }
.components-placeholder .components-placeholder__fieldset p {
font-size: 0.875rem !important;
margin: 12px 0;
color: #454647;
fill: #555758; }
.components-placeholder .components-placeholder__fieldset p svg {
margin-right: 1rem;
top: 4px;
position: relative;
fill: #555758; }
.wp-block-tainacan-modal {
width: 50%; }
@ -111,6 +117,9 @@
.wp-block-tainacan-modal .modal-checkbox-list .components-base-control,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .components-base-control {
overflow: hidden; }
.wp-block-tainacan-modal .modal-checkbox-list svg.dashicon.components-checkbox-control__checked,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field svg.dashicon.components-checkbox-control__checked {
fill: black; }
.wp-block-tainacan-modal .modal-checkbox-list .modal-checkbox-list-item,
.wp-block-tainacan-modal .modal-checkbox-list .components-radio-control__option,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .modal-checkbox-list-item,

File diff suppressed because one or more lines are too long

View File

@ -22,15 +22,21 @@
position: relative;
fill: #555758; }
.components-placeholder__fieldset p {
font-size: 0.875rem !important;
margin-top: -2px;
fill: #555758; }
.components-placeholder__fieldset p svg {
margin-right: 1rem;
top: 4px;
position: relative;
.components-placeholder {
margin-bottom: 0;
background: #f6f6f6; }
.components-placeholder .components-placeholder__label {
margin-bottom: 0; }
.components-placeholder .components-placeholder__fieldset p {
font-size: 0.875rem !important;
margin: 12px 0;
color: #454647;
fill: #555758; }
.components-placeholder .components-placeholder__fieldset p svg {
margin-right: 1rem;
top: 4px;
position: relative;
fill: #555758; }
.wp-block-tainacan-modal {
width: 50%; }
@ -111,6 +117,9 @@
.wp-block-tainacan-modal .modal-checkbox-list .components-base-control,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .components-base-control {
overflow: hidden; }
.wp-block-tainacan-modal .modal-checkbox-list svg.dashicon.components-checkbox-control__checked,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field svg.dashicon.components-checkbox-control__checked {
fill: black; }
.wp-block-tainacan-modal .modal-checkbox-list .modal-checkbox-list-item,
.wp-block-tainacan-modal .modal-checkbox-list .components-radio-control__option,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .modal-checkbox-list-item,

File diff suppressed because one or more lines are too long

View File

@ -28,7 +28,7 @@
<div
class="options-input"
v-for="(interval, index) of intervals"
:key="index">
:key="0 + index">
<b-field>
<b-input
expanded

View File

@ -9,6 +9,7 @@
v-mask="dateMask"
v-model="dateValue"
@input.native="onInput"
@blur="onBlur"
:placeholder="dateFormat.toLowerCase()" />
<p
v-if="isInvalidDate && dateValue"
@ -76,7 +77,10 @@
} else {
this.$emit('input', [null]);
}
}, 300)
}, 300),
onBlur() {
this.$emit('blur');
}
}
}
</script>

View File

@ -4,6 +4,7 @@
:id="metadatum.metadatum.metadata_type_object.component + '-' + metadatum.metadatum.slug"
:value="value"
@input="onInput($event)"
@blur="onBlur"
type="number"
lang="en"
:step="getStep"/>
@ -27,6 +28,9 @@
methods: {
onInput(value) {
this.$emit('input', value);
},
onBlur() {
this.$emit('blur');
}
}
}

View File

@ -8,6 +8,7 @@
size="is-small"
icon="magnify"
@input="onInput"
@blur="onBlur"
:data="options"
:maxtags="maxtags != undefined ? maxtags : (metadatum.metadatum.multiple == 'yes' || allowNew === true ? 100 : 1)"
autocomplete
@ -95,6 +96,9 @@
this.selected = newSelected;
this.$emit('input', newSelected.map((item) => item.value));
},
onBlur() {
this.$emit('blur');
},
search: _.debounce(function(query) {
if ( this.selected.length > 0 && this.metadatum.metadatum.multiple === 'no')
return '';

View File

@ -37,7 +37,7 @@
methods: {
onSelected(value) {
this.$emit('input', value);
},
}
}
}
</script>

View File

@ -45,7 +45,8 @@
:is="metadatum.metadatum.metadata_type_object.component"
v-model="inputs[0]"
:metadatum="metadatum"
@input="changeValue()"/>
@input="changeValue()"
@blur="performValueChange()"/>
<template v-if="metadatum.metadatum.multiple == 'yes' && inputs.length > 1">
<transition-group
name="filter-item"
@ -57,7 +58,8 @@
:is="metadatum.metadatum.metadata_type_object.component"
v-model="inputs[index]"
:metadatum="metadatum"
@input="changeValue()"/>
@input="changeValue()"
@blur="performValueChange()"/>
<a
v-if="index > 0"
@click="removeInput(index)"
@ -92,7 +94,8 @@
:is="metadatum.metadatum.metadata_type_object.component"
v-model="inputs"
:metadatum="metadatum"
@input="changeValue()"/>
@input="changeValue()"
@blur="performValueChange()"/>
</div>
</transition>
</b-field>
@ -135,7 +138,9 @@
},
methods: {
changeValue: _.debounce(function() {
this.performValueChange();
}, 800),
performValueChange() {
if (this.inputs && this.inputs.length > 0 && this.inputs[0] && this.inputs[0].value) {
let terms = this.inputs.map(term => term.value)
@ -150,7 +155,6 @@
if (equal.length == terms.length && this.metadatum.value.length <= equal.length)
return;
}
} else if (this.metadatum.value.constructor.name == 'Object') {
@ -170,14 +174,16 @@
if (equal.length == this.inputs.length && this.metadatum.value.length <= equal.length)
return;
} else if (this.inputs && this.inputs.length == 1 && this.inputs[0] == this.metadatum.value) {
return
}
eventBus.$emit('input', {
itemId: this.metadatum.item.id,
metadatumId: this.metadatum.metadatum.id,
values: this.inputs ? this.inputs : ''
});
}, 900),
},
createInputs() {
if (this.metadatum.value instanceof Array)
this.inputs = this.metadatum.value.slice(0);

View File

@ -86,10 +86,6 @@
this.valueComponent = values;
}
},
onInput($event) {
this.valueComponent = $event;
this.$emit('input', this.valueComponent);
},
reload($event) {
if ($event.taxonomyId == this.taxonomyId && $event.metadatumId == this.metadatum.metadatum.id) {
this.valueComponent = $event.values;

View File

@ -1,8 +1,9 @@
<template>
<div class="block">
<b-taginput
:id="metadatumComponentId"
expanded
:disabled="disabled"
:id="metadatumComponentId"
size="is-small"
icon="magnify"
:allow-new="false"
@ -19,7 +20,20 @@
:loading="isFetching"
:class="{'has-selected': selected != undefined && selected != []}"
autocomplete
@typing="autoCompleteTerm"/>
@typing="autoCompleteTerm">
<template slot-scope="props">
<div class="media">
<div class="media-content">
{{ props.option.label }}
</div>
</div>
</template>
<template
v-if="!isFetching"
slot="empty">
{{ $i18n.get('info_no_terms_found') }}
</template>
</b-taginput>
</div>
</template>
@ -31,7 +45,6 @@
return {
selected: [],
labels: [],
termList: [],
isFetching: false,
}
},
@ -65,7 +78,6 @@
'getTerms'
]),
autoCompleteTerm: _.debounce( function(value) {
this.termList = [];
this.labels = [];
this.isFetching = true;
@ -80,17 +92,19 @@
search: {
searchterm: value
},
all: true
all: true,
order: 'asc',
offset: 0,
number: 12
}).then((res) => {
this.termList = res.terms;
for (let term of this.termList)
for (let term of res.terms)
this.labels.push({label: term.name, value: term.id});
if (this.termList.length <= 0 && this.allowSelectToCreate)
if (res.terms.length <= 0 && this.allowSelectToCreate)
this.labels.push({label: `${value} (${this.$i18n.get('select_to_create')})`, value: value})
this.isFetching = false;
this.isFetching = false;
}).catch((error) => {
this.isFetching = false;
throw error;

View File

@ -3,7 +3,8 @@
:disabled="disabled"
:id="metadatum.metadatum.metadata_type_object.component + '-' + metadatum.metadatum.slug"
:value="value"
@input="onInput($event)"/>
@input="onInput($event)"
@blur="onBlur"/>
</template>
<script>
@ -16,6 +17,9 @@
methods: {
onInput(value) {
this.$emit('input', value);
},
onBlur() {
this.$emit('blur');
}
}
}

View File

@ -4,6 +4,7 @@
:id="metadatum.metadatum.metadata_type_object.component + '-' + metadatum.metadatum.slug"
:value="value"
@input="onInput($event)"
@blur="onBlur"
type="textarea" />
</template>
@ -17,6 +18,9 @@
methods: {
onInput(value) {
this.$emit('input', value);
},
onBlur() {
this.$emit('blur');
}
}
}

View File

@ -1,9 +1,9 @@
import axios from 'axios';
const tainacan = axios.create({
baseURL: tainacan_plugin.root
baseURL: tainacan_blocks.root
});
tainacan.defaults.headers.common['X-WP-Nonce'] = tainacan_plugin.nonce;
tainacan.defaults.headers.common['X-WP-Nonce'] = tainacan_blocks.nonce;
export default tainacan;

View File

@ -308,13 +308,13 @@ function tainacan_blocks_add_plugin_settings() {
$settings = tainacan_blocks_get_plugin_js_settings();
wp_localize_script( 'terms-list', 'tainacan_plugin', $settings );
wp_localize_script( 'items-list', 'tainacan_plugin', $settings );
wp_localize_script( 'dynamic-items-list', 'tainacan_plugin', $settings );
wp_localize_script( 'carousel-items-list', 'tainacan_plugin', $settings );
wp_localize_script( 'carousel-terms-list', 'tainacan_plugin', $settings );
wp_localize_script( 'search-bar', 'tainacan_plugin', $settings );
wp_localize_script( 'collections-list', 'tainacan_plugin', $settings );
wp_localize_script( 'carousel-collections-list', 'tainacan_plugin', $settings );
wp_localize_script( 'facets-list', 'tainacan_plugin', $settings );
wp_localize_script( 'terms-list', 'tainacan_blocks', $settings );
wp_localize_script( 'items-list', 'tainacan_blocks', $settings );
wp_localize_script( 'dynamic-items-list', 'tainacan_blocks', $settings );
wp_localize_script( 'carousel-items-list', 'tainacan_blocks', $settings );
wp_localize_script( 'carousel-terms-list', 'tainacan_blocks', $settings );
wp_localize_script( 'search-bar', 'tainacan_blocks', $settings );
wp_localize_script( 'collections-list', 'tainacan_blocks', $settings );
wp_localize_script( 'carousel-collections-list', 'tainacan_blocks', $settings );
wp_localize_script( 'facets-list', 'tainacan_blocks', $settings );
}

View File

@ -28,16 +28,25 @@
}
}
}
.components-placeholder__fieldset p {
font-size: 0.875rem !important;
margin-top: -2px;
fill: #555758;
.components-placeholder {
margin-bottom: 0;
background: #f6f6f6;
svg {
margin-right: 1rem;
top: 4px;
position: relative;
.components-placeholder__label {
margin-bottom: 0;
}
.components-placeholder__fieldset p {
font-size: 0.875rem !important;
margin: 12px 0;
color: #454647;
fill: #555758;
svg {
margin-right: 1rem;
top: 4px;
position: relative;
fill: #555758;
}
}
}
@ -155,6 +164,10 @@
.components-base-control {
overflow: hidden;
}
svg.dashicon.components-checkbox-control__checked {
fill: black;
}
.modal-checkbox-list-item,
.components-radio-control__option {

View File

@ -163,6 +163,7 @@
grid-template-columns: 33% 33% 33%;
grid-template-rows: 50% 50%;
width: 100%;
box-sizing: border-box;
img:first-of-type {
flex-basis: 100%;

View File

@ -224,7 +224,7 @@ export default class CollectionsModal extends React.Component {
{ collection.thumbnail ?
<img
aria-hidden
src={ collection.thumbnail && collection.thumbnail[0] && collection.thumbnail[0].src ? collection.thumbnail[0].src : `${tainacan_plugin.base_url}/admin/images/placeholder_square.png`}
src={ collection.thumbnail && collection.thumbnail[0] && collection.thumbnail[0].src ? collection.thumbnail[0].src : `${tainacan_blocks.base_url}/admin/images/placeholder_square.png`}
alt={ collection.thumbnail && collection.thumbnail[0] ? collection.thumbnail[0].alt : collection.name }/>
: null
}
@ -257,7 +257,7 @@ export default class CollectionsModal extends React.Component {
{ collection.thumbnail ?
<img
aria-hidden
src={ collection.thumbnail && collection.thumbnail[0] && collection.thumbnail[0].src ? collection.thumbnail[0].src : `${tainacan_plugin.base_url}/admin/images/placeholder_square.png`}
src={ collection.thumbnail && collection.thumbnail[0] && collection.thumbnail[0].src ? collection.thumbnail[0].src : `${tainacan_blocks.base_url}/admin/images/placeholder_square.png`}
alt={ collection.thumbnail && collection.thumbnail[0] ? collection.thumbnail[0].alt : collection.name }/>
: null
}

View File

@ -150,7 +150,7 @@ registerBlockType('tainacan/carousel-collections-list', {
?
collectionItems[0].thumbnail['thumbnail'][0]
:
`${tainacan_plugin.base_url}/admin/images/placeholder_square.png`)
`${tainacan_blocks.base_url}/admin/images/placeholder_square.png`)
}
alt={ collectionItems[0] && collectionItems[0].name ? collectionItems[0].name : __( 'Thumbnail', 'tainacan' ) }/>
<img
@ -163,7 +163,7 @@ registerBlockType('tainacan/carousel-collections-list', {
?
collectionItems[1].thumbnail['thumbnail'][0]
:
`${tainacan_plugin.base_url}/admin/images/placeholder_square.png`)
`${tainacan_blocks.base_url}/admin/images/placeholder_square.png`)
}
alt={ collectionItems[1] && collectionItems[1].name ? collectionItems[1].name : __( 'Thumbnail', 'tainacan' ) }/>
<img
@ -176,7 +176,7 @@ registerBlockType('tainacan/carousel-collections-list', {
?
collectionItems[2].thumbnail['thumbnail'][0]
:
`${tainacan_plugin.base_url}/admin/images/placeholder_square.png`)
`${tainacan_blocks.base_url}/admin/images/placeholder_square.png`)
}
alt={ collectionItems[2] && collectionItems[2].name ? collectionItems[2].name : __( 'Thumbnail', 'tainacan' ) }/>
</div>
@ -191,7 +191,7 @@ registerBlockType('tainacan/carousel-collections-list', {
?
collection.thumbnail['thumbnail'][0]
:
`${tainacan_plugin.base_url}/admin/images/placeholder_square.png`)
`${tainacan_blocks.base_url}/admin/images/placeholder_square.png`)
}
alt={ collection.name ? collection.name : __( 'Thumbnail', 'tainacan' ) }/>
}
@ -446,7 +446,7 @@ registerBlockType('tainacan/carousel-collections-list', {
icon={(
<img
width={148}
src={ `${tainacan_plugin.base_url}/admin/images/tainacan_logo_header.svg` }
src={ `${tainacan_blocks.base_url}/admin/images/tainacan_logo_header.svg` }
alt="Tainacan Logo"/>
)}>
<p>
@ -542,8 +542,8 @@ registerBlockType('tainacan/carousel-collections-list', {
loop-slides={ '' + loopSlides }
hide-name={ '' + hideName }
max-collections-number={ maxCollectionsNumber }
tainacan-api-root={ tainacan_plugin.root }
tainacan-base-url={ tainacan_plugin.base_url }
tainacan-api-root={ tainacan_blocks.root }
tainacan-base-url={ tainacan_blocks.base_url }
show-collection-thumbnail={ '' + showCollectionThumbnail }
id={ 'wp-block-tainacan-carousel-collections-list_' + blockId }>
{ content }

View File

@ -226,7 +226,7 @@ export default class CollectionsModal extends React.Component {
{ collection.thumbnail ?
<img
aria-hidden
src={ collection.thumbnail && collection.thumbnail[0] && collection.thumbnail[0].src ? collection.thumbnail[0].src : `${tainacan_plugin.base_url}/admin/images/placeholder_square.png`}
src={ collection.thumbnail && collection.thumbnail[0] && collection.thumbnail[0].src ? collection.thumbnail[0].src : `${tainacan_blocks.base_url}/admin/images/placeholder_square.png`}
alt={ collection.thumbnail && collection.thumbnail[0] ? collection.thumbnail[0].alt : collection.name }/>
: null
}
@ -259,7 +259,7 @@ export default class CollectionsModal extends React.Component {
{ collection.thumbnail ?
<img
aria-hidden
src={ collection.thumbnail && collection.thumbnail[0] && collection.thumbnail[0].src ? collection.thumbnail[0].src : `${tainacan_plugin.base_url}/admin/images/placeholder_square.png`}
src={ collection.thumbnail && collection.thumbnail[0] && collection.thumbnail[0].src ? collection.thumbnail[0].src : `${tainacan_blocks.base_url}/admin/images/placeholder_square.png`}
alt={ collection.thumbnail && collection.thumbnail[0] ? collection.thumbnail[0].alt : collection.name }/>
: null
}

View File

@ -123,7 +123,7 @@ registerBlockType('tainacan/collections-list', {
target="_blank"
className={ (!showName ? 'collection-without-name' : '') + ' ' + (!showImage ? 'collection-without-image' : '') }>
<img
src={ collection.thumbnail && collection.thumbnail[0] && collection.thumbnail[0].src ? collection.thumbnail[0].src : `${tainacan_plugin.base_url}/admin/images/placeholder_square.png`}
src={ collection.thumbnail && collection.thumbnail[0] && collection.thumbnail[0].src ? collection.thumbnail[0].src : `${tainacan_blocks.base_url}/admin/images/placeholder_square.png`}
alt={ collection.thumbnail && collection.thumbnail[0] ? collection.thumbnail[0].alt : collection.name }/>
<span>{ collection.name ? collection.name : '' }</span>
</a>
@ -304,7 +304,7 @@ registerBlockType('tainacan/collections-list', {
icon={(
<img
width={148}
src={ `${tainacan_plugin.base_url}/admin/images/tainacan_logo_header.svg` }
src={ `${tainacan_blocks.base_url}/admin/images/tainacan_logo_header.svg` }
alt="Tainacan Logo"/>
)}>
<p>

View File

@ -176,7 +176,7 @@ registerBlockType('tainacan/facets-list', {
?
facet.entity['header_image']
:
`${tainacan_plugin.base_url}/admin/images/placeholder_square.png`
`${tainacan_blocks.base_url}/admin/images/placeholder_square.png`
}
alt={ facet.label ? facet.label : __( 'Thumbnail', 'tainacan' ) }/>
: null
@ -192,7 +192,7 @@ registerBlockType('tainacan/facets-list', {
?
facet.entity.thumbnail['thumbnail'][0]
:
`${tainacan_plugin.base_url}/admin/images/placeholder_square.png`)
`${tainacan_blocks.base_url}/admin/images/placeholder_square.png`)
}
alt={ facet.label ? facet.label : __( 'Thumbnail', 'tainacan' ) }/>
: null
@ -262,13 +262,13 @@ registerBlockType('tainacan/facets-list', {
if (metadatumType == 'Taxonomy') {
for (let facet of response.data.values) {
facetsObject.push(Object.assign({
url: facet.entity && facet.entity.url ? facet.entity.url : tainacan_plugin.site_url + '/' + collectionSlug + '/#/?taxquery[0][compare]=IN&taxquery[0][taxonomy]=' + facet.taxonomy + '&taxquery[0][terms][0]=' + facet.value
url: facet.entity && facet.entity.url ? facet.entity.url : tainacan_blocks.site_url + '/' + collectionSlug + '/#/?taxquery[0][compare]=IN&taxquery[0][taxonomy]=' + facet.taxonomy + '&taxquery[0][terms][0]=' + facet.value
}, facet));
}
} else {
for (let facet of response.data.values) {
facetsObject.push(Object.assign({
url: tainacan_plugin.site_url + '/' + collectionSlug + '/#/?metaquery[0][key]=' + metadatumId + '&metaquery[0][value]=' + facet.value
url: tainacan_blocks.site_url + '/' + collectionSlug + '/#/?metaquery[0][key]=' + metadatumId + '&metaquery[0][value]=' + facet.value
}, facet));
}
}
@ -628,7 +628,7 @@ registerBlockType('tainacan/facets-list', {
icon={(
<img
width={148}
src={ `${tainacan_plugin.base_url}/admin/images/tainacan_logo_header.svg` }
src={ `${tainacan_blocks.base_url}/admin/images/tainacan_logo_header.svg` }
alt="Tainacan Logo"/>
)}>
<p>
@ -748,9 +748,9 @@ registerBlockType('tainacan/facets-list', {
cloud-rate={ cloudRate }
grid-margin={ gridMargin }
max-facets-number={ maxFacetsNumber }
tainacan-api-root={ tainacan_plugin.root }
tainacan-base-url={ tainacan_plugin.base_url }
tainacan-site-url={ tainacan_plugin.site_url }
tainacan-api-root={ tainacan_blocks.root }
tainacan-base-url={ tainacan_blocks.base_url }
tainacan-site-url={ tainacan_blocks.site_url }
id={ 'wp-block-tainacan-facets-list_' + blockId }>
{ content }
</div>

View File

@ -113,7 +113,7 @@ export default class MetadataModal extends React.Component {
let selectedCollection;
if (selectedCollectionId == 'default')
selectedCollection = { label: __('Repository items', 'tainacan'), id: 'default', slug: tainacan_plugin.theme_items_list_url.split('/')[tainacan_plugin.theme_items_list_url.split('/').length - 1] };
selectedCollection = { label: __('Repository items', 'tainacan'), id: 'default', slug: tainacan_blocks.theme_items_list_url.split('/')[tainacan_blocks.theme_items_list_url.split('/').length - 1] };
else {
selectedCollection = this.state.modalCollections.find((collection) => collection.id == selectedCollectionId)
if (selectedCollection == undefined)
@ -387,7 +387,7 @@ export default class MetadataModal extends React.Component {
<RadioControl
className={'repository-radio-option'}
selected={ this.state.temporaryCollectionId }
options={ [{ label: __('Repository items', 'tainacan'), value: 'default', slug: tainacan_plugin.theme_items_list_url.split('/')[tainacan_plugin.theme_items_list_url.split('/').length - 1] }] }
options={ [{ label: __('Repository items', 'tainacan'), value: 'default', slug: tainacan_blocks.theme_items_list_url.split('/')[tainacan_blocks.theme_items_list_url.split('/').length - 1] }] }
onChange={ ( aCollectionId ) => {
this.setState({ temporaryCollectionId: aCollectionId });
} } />

View File

@ -47,7 +47,7 @@ export default class CarouselItemsModal extends React.Component {
if (this.props.existingCollectionId != null && this.props.existingCollectionId != undefined) {
this.fetchCollection(this.props.existingCollectionId);
this.setState({
searchURL: this.props.existingSearchURL ? this.props.existingSearchURL : tainacan_plugin.admin_url + 'admin.php?page=tainacan_admin#/collections/'+ this.props.existingCollectionId + (this.props.loadStrategy == 'search' ? '/items/?iframemode=true&readmode=true' : '/items/?iframemode=true') });
searchURL: this.props.existingSearchURL ? this.props.existingSearchURL : tainacan_blocks.admin_url + 'admin.php?page=tainacan_admin#/collections/'+ this.props.existingCollectionId + (this.props.loadStrategy == 'search' ? '/items/?iframemode=true&readmode=true' : '/items/?iframemode=true') });
} else {
this.setState({ collectionPage: 1 });
this.fetchModalCollections();
@ -114,7 +114,7 @@ export default class CarouselItemsModal extends React.Component {
selectCollection(selectedCollectionId) {
this.setState({
collectionId: selectedCollectionId,
searchURL: tainacan_plugin.admin_url + 'admin.php?page=tainacan_admin#/collections/' + selectedCollectionId + (this.props.loadStrategy == 'search' ? '/items/?iframemode=true&readmode=true' : '/items/?iframemode=true')
searchURL: tainacan_blocks.admin_url + 'admin.php?page=tainacan_admin#/collections/' + selectedCollectionId + (this.props.loadStrategy == 'search' ? '/items/?iframemode=true&readmode=true' : '/items/?iframemode=true')
});
this.props.onSelectCollection(selectedCollectionId);

View File

@ -176,7 +176,7 @@ registerBlockType('tainacan/carousel-items-list', {
?
item.thumbnail['thumbnail'][0]
:
`${tainacan_plugin.base_url}/admin/images/placeholder_square.png`)
`${tainacan_blocks.base_url}/admin/images/placeholder_square.png`)
}
alt={ item.title ? item.title : __( 'Thumbnail', 'tainacan' ) }/>
{ !hideTitle ? <span>{ item.title ? item.title : '' }</span> : null }
@ -607,7 +607,7 @@ registerBlockType('tainacan/carousel-items-list', {
icon={(
<img
width={148}
src={ `${tainacan_plugin.base_url}/admin/images/tainacan_logo_header.svg` }
src={ `${tainacan_blocks.base_url}/admin/images/tainacan_logo_header.svg` }
alt="Tainacan Logo"/>
)}>
<p>
@ -727,8 +727,8 @@ registerBlockType('tainacan/carousel-items-list', {
collection-background-color={ collectionBackgroundColor }
collection-text-color={ collectionTextColor }
max-items-number={ maxItemsNumber }
tainacan-api-root={ tainacan_plugin.root }
tainacan-base-url={ tainacan_plugin.base_url }
tainacan-api-root={ tainacan_blocks.root }
tainacan-base-url={ tainacan_blocks.base_url }
id={ 'wp-block-tainacan-carousel-items-list_' + blockId }>
{ content }
</div>

View File

@ -42,7 +42,7 @@ export default class DynamicItemsModal extends React.Component {
if (this.props.existingCollectionId != null && this.props.existingCollectionId != undefined) {
this.fetchCollection(this.props.existingCollectionId);
this.setState({ searchURL: this.props.existingSearchURL ? this.props.existingSearchURL : tainacan_plugin.admin_url + 'admin.php?page=tainacan_admin#/collections/'+ this.props.existingCollectionId + '/items/?readmode=true&iframemode=true' });
this.setState({ searchURL: this.props.existingSearchURL ? this.props.existingSearchURL : tainacan_blocks.admin_url + 'admin.php?page=tainacan_admin#/collections/'+ this.props.existingCollectionId + '/items/?readmode=true&iframemode=true' });
} else {
this.setState({ collectionPage: 1 });
this.fetchModalCollections();
@ -100,7 +100,7 @@ export default class DynamicItemsModal extends React.Component {
selectCollection(selectedCollectionId) {
this.setState({
collectionId: selectedCollectionId,
searchURL: tainacan_plugin.admin_url + 'admin.php?page=tainacan_admin#/collections/' + selectedCollectionId + '/items/?readmode=true&iframemode=true'
searchURL: tainacan_blocks.admin_url + 'admin.php?page=tainacan_admin#/collections/' + selectedCollectionId + '/items/?readmode=true&iframemode=true'
});
this.props.onSelectCollection(selectedCollectionId);

View File

@ -132,7 +132,7 @@ registerBlockType('tainacan/dynamic-items-list', {
type: String,
default: ''
},
mosaicItemFocalPoint: {
osaicItemFocalPointm: {
type: Object,
default: {
x: 0.5,
@ -190,7 +190,7 @@ registerBlockType('tainacan/dynamic-items-list', {
style={ {
marginBottom: layout == 'grid' ? (showName ? gridMargin + 12 : gridMargin) + 'px' : '',
backgroundImage: layout == 'mosaic' ? `url(${getItemThumbnail(item, 'medium_large')})` : 'none',
backgroundPosition: layout == 'mosaic' ? `${ mosaicItemFocalPoint.x * 100 }% ${ mosaicItemFocalPoint.y * 100 }%` : 'none'
backgroundPosition: layout == 'mosaic' ? `${ (mosaicItemFocalPoint && mosaicItemFocalPoint.x ? mosaicItemFocalPoint.x : 0.5) * 100 }% ${ (mosaicItemFocalPoint && mosaicItemFocalPoint.y ? mosaicItemFocalPoint.y : 0.5) * 100 }%` : 'none'
}}
>
<a
@ -376,7 +376,7 @@ registerBlockType('tainacan/dynamic-items-list', {
?
item.thumbnail['thumbnail'][0]
:
`${tainacan_plugin.base_url}/admin/images/placeholder_square.png`)
`${tainacan_blocks.base_url}/admin/images/placeholder_square.png`)
)
}
@ -416,7 +416,7 @@ registerBlockType('tainacan/dynamic-items-list', {
}
function updateMosaicItemFocalPoint(focalPoint) {
if (Math.abs(focalPoint.x - mosaicItemFocalPoint.x) > 0.025 || Math.abs(focalPoint.y - mosaicItemFocalPoint.y) > 0.025) {
if (Math.abs(focalPoint.x - (mosaicItemFocalPoint && mosaicItemFocalPoint.x ? mosaicItemFocalPoint.x : 0.5)) > 0.025 || Math.abs(focalPoint.y - (mosaicItemFocalPoint && mosaicItemFocalPoint.y ? mosaicItemFocalPoint.y : 0.5)) > 0.025) {
mosaicItemFocalPoint = focalPoint;
setAttributes({ mosaicItemFocalPoint: focalPoint });
setContent();
@ -881,7 +881,7 @@ registerBlockType('tainacan/dynamic-items-list', {
icon={(
<img
width={148}
src={ `${tainacan_plugin.base_url}/admin/images/tainacan_logo_header.svg` }
src={ `${tainacan_blocks.base_url}/admin/images/tainacan_logo_header.svg` }
alt="Tainacan Logo"/>
)}>
<p>
@ -1000,15 +1000,15 @@ registerBlockType('tainacan/dynamic-items-list', {
mosaic-density={ mosaicDensity }
mosaic-grid-rows={ mosaicGridRows }
mosaic-grid-columns={ mosaicGridColumns }
mosaic-item-focal-point-x={ mosaicItemFocalPoint.x }
mosaic-item-focal-point-y={ mosaicItemFocalPoint.y }
mosaic-item-focal-point-x={ (mosaicItemFocalPoint && mosaicItemFocalPoint.x ? mosaicItemFocalPoint.x : 0.5) }
mosaic-item-focal-point-y={ (mosaicItemFocalPoint && mosaicItemFocalPoint.y ? mosaicItemFocalPoint.y : 0.5) }
collection-background-color={ collectionBackgroundColor }
collection-text-color={ collectionTextColor }
grid-margin={ gridMargin }
max-items-number={ maxItemsNumber }
order={ order }
tainacan-api-root={ tainacan_plugin.root }
tainacan-base-url={ tainacan_plugin.base_url }
tainacan-api-root={ tainacan_blocks.root }
tainacan-base-url={ tainacan_blocks.base_url }
id={ 'wp-block-tainacan-dynamic-items-list_' + blockId }>
{ content }
</div>
@ -1140,8 +1140,8 @@ registerBlockType('tainacan/dynamic-items-list', {
grid-margin={ gridMargin }
max-items-number={ maxItemsNumber }
order={ order }
tainacan-api-root={ tainacan_plugin.root }
tainacan-base-url={ tainacan_plugin.base_url }
tainacan-api-root={ tainacan_blocks.root }
tainacan-base-url={ tainacan_blocks.base_url }
id={ 'wp-block-tainacan-dynamic-items-list_' + blockId }>
{ content }
</div>

View File

@ -128,7 +128,7 @@ registerBlockType('tainacan/items-list', {
target="_blank"
className={ (!showName ? 'item-without-title' : '') + ' ' + (!showImage ? 'item-without-image' : '') }>
<img
src={ item.thumbnail && item.thumbnail[0] && item.thumbnail[0].src ? item.thumbnail[0].src : `${tainacan_plugin.base_url}/admin/images/placeholder_square.png`}
src={ item.thumbnail && item.thumbnail[0] && item.thumbnail[0].src ? item.thumbnail[0].src : `${tainacan_blocks.base_url}/admin/images/placeholder_square.png`}
alt={ item.thumbnail && item.thumbnail[0] ? item.thumbnail[0].alt : item.title }/>
<span>{ item.title ? item.title : '' }</span>
</a>
@ -313,7 +313,7 @@ registerBlockType('tainacan/items-list', {
icon={(
<img
width={148}
src={ `${tainacan_plugin.base_url}/admin/images/tainacan_logo_header.svg` }
src={ `${tainacan_blocks.base_url}/admin/images/tainacan_logo_header.svg` }
alt="Tainacan Logo"/>
)}>
<p>

View File

@ -49,7 +49,7 @@ export default class ItemsModal extends React.Component {
if (this.props.existingCollectionId != null && this.props.existingCollectionId != undefined) {
this.fetchCollection(this.props.existingCollectionId);
this.setState({
searchURL: this.props.existingSearchURL ? this.props.existingSearchURL : tainacan_plugin.admin_url + 'admin.php?page=tainacan_admin#/collections/'+ this.props.existingCollectionId + '/items/?iframemode=true' });
searchURL: this.props.existingSearchURL ? this.props.existingSearchURL : tainacan_blocks.admin_url + 'admin.php?page=tainacan_admin#/collections/'+ this.props.existingCollectionId + '/items/?iframemode=true' });
} else {
this.setState({ collectionPage: 1 });
this.fetchModalCollections();
@ -174,7 +174,7 @@ export default class ItemsModal extends React.Component {
selectCollection(selectedCollectionId) {
this.setState({
collectionId: selectedCollectionId,
searchURL: tainacan_plugin.admin_url + 'admin.php?page=tainacan_admin#/collections/' + selectedCollectionId + '/items/?iframemode=true'
searchURL: tainacan_blocks.admin_url + 'admin.php?page=tainacan_admin#/collections/' + selectedCollectionId + '/items/?iframemode=true'
});
this.props.onSelectCollection(selectedCollectionId);

View File

@ -170,7 +170,7 @@ registerBlockType('tainacan/search-bar', {
(alignment == 'right' ? ' is-aligned-right' : '')
}
id="taincan-search-bar-block"
action={ tainacan_plugin.site_url + '/' + collectionSlug + '/#/' }
action={ tainacan_blocks.site_url + '/' + collectionSlug + '/#/' }
method='get'>
<input
style={{ borderColor: showCollectionHeader && collectionBackgroundColor ? collectionBackgroundColor : '' }}
@ -215,7 +215,7 @@ registerBlockType('tainacan/search-bar', {
(alignment == 'right' ? ' is-aligned-right' : '')
}
id="taincan-search-bar-block"
action={ tainacan_plugin.site_url + '/' + collectionSlug + '/#/' }
action={ tainacan_blocks.site_url + '/' + collectionSlug + '/#/' }
method='get'>
<input
style={{ borderColor: showCollectionHeader && collectionBackgroundColor ? collectionBackgroundColor : '' }}
@ -494,7 +494,7 @@ registerBlockType('tainacan/search-bar', {
icon={(
<img
width={148}
src={ `${tainacan_plugin.base_url}/admin/images/tainacan_logo_header.svg` }
src={ `${tainacan_blocks.base_url}/admin/images/tainacan_logo_header.svg` }
alt="Tainacan Logo"/>
)}>
<p>

View File

@ -106,7 +106,7 @@ export default class SearchBarModal extends React.Component {
label: __('Repository items', 'tainacan'),
name: __('Repository items', 'tainacan'),
id: 'default',
slug: tainacan_plugin.theme_items_list_url.split('/')[tainacan_plugin.theme_items_list_url.split('/').length - 1]
slug: tainacan_blocks.theme_items_list_url.split('/')[tainacan_blocks.theme_items_list_url.split('/').length - 1]
};
else {
selectedCollection = this.state.modalCollections.find((collection) => collection.id == selectedCollectionId)
@ -269,7 +269,7 @@ export default class SearchBarModal extends React.Component {
<RadioControl
className={'repository-radio-option'}
selected={ this.state.temporaryCollectionId }
options={ [{ label: __('Repository items', 'tainacan'), value: 'default', slug: tainacan_plugin.theme_items_list_url.split('/')[tainacan_plugin.theme_items_list_url.split('/').length - 1] }] }
options={ [{ label: __('Repository items', 'tainacan'), value: 'default', slug: tainacan_blocks.theme_items_list_url.split('/')[tainacan_blocks.theme_items_list_url.split('/').length - 1] }] }
onChange={ ( aCollectionId ) => {
this.setState({ temporaryCollectionId: aCollectionId });
} } />

View File

@ -155,7 +155,7 @@ registerBlockType('tainacan/carousel-terms-list', {
?
termItems[0].thumbnail['thumbnail'][0]
:
`${tainacan_plugin.base_url}/admin/images/placeholder_square.png`)
`${tainacan_blocks.base_url}/admin/images/placeholder_square.png`)
}
alt={ termItems[0] && termItems[0].name ? termItems[0].name : __( 'Thumbnail', 'tainacan' ) }/>
<img
@ -168,7 +168,7 @@ registerBlockType('tainacan/carousel-terms-list', {
?
termItems[1].thumbnail['thumbnail'][0]
:
`${tainacan_plugin.base_url}/admin/images/placeholder_square.png`)
`${tainacan_blocks.base_url}/admin/images/placeholder_square.png`)
}
alt={ termItems[1] && termItems[1].name ? termItems[1].name : __( 'Thumbnail', 'tainacan' ) }/>
<img
@ -181,13 +181,13 @@ registerBlockType('tainacan/carousel-terms-list', {
?
termItems[2].thumbnail['thumbnail'][0]
:
`${tainacan_plugin.base_url}/admin/images/placeholder_square.png`)
`${tainacan_blocks.base_url}/admin/images/placeholder_square.png`)
}
alt={ termItems[2] && termItems[2].name ? termItems[2].name : __( 'Thumbnail', 'tainacan' ) }/>
</div>
:
<img
src={ term.header_image ? term.header_image : `${tainacan_plugin.base_url}/admin/images/placeholder_square.png`}
src={ term.header_image ? term.header_image : `${tainacan_blocks.base_url}/admin/images/placeholder_square.png`}
alt={ term.name ? term.name : __( 'Thumbnail', 'tainacan' )}/>
}
{ !hideName ? <span>{ term.name ? term.name : '' }</span> : null }
@ -447,7 +447,7 @@ registerBlockType('tainacan/carousel-terms-list', {
icon={(
<img
width={148}
src={ `${tainacan_plugin.base_url}/admin/images/tainacan_logo_header.svg` }
src={ `${tainacan_blocks.base_url}/admin/images/tainacan_logo_header.svg` }
alt="Tainacan Logo"/>
)}>
<p>
@ -545,8 +545,8 @@ registerBlockType('tainacan/carousel-terms-list', {
hide-name={ '' + hideName }
max-terms-number={ maxTermsNumber }
taxonomy-id={ taxonomyId }
tainacan-api-root={ tainacan_plugin.root }
tainacan-base-url={ tainacan_plugin.base_url }
tainacan-api-root={ tainacan_blocks.root }
tainacan-base-url={ tainacan_blocks.base_url }
show-term-thumbnail={ '' + showTermThumbnail }
id={ 'wp-block-tainacan-carousel-terms-list_' + blockId }>
{ content }

View File

@ -121,7 +121,7 @@ registerBlockType('tainacan/terms-list', {
target="_blank"
className={ (!showName ? 'term-without-name' : '') + ' ' + (!showImage ? 'term-without-image' : '') }>
<img
src={ term.header_image && term.header_image[0] && term.header_image[0].src ? term.header_image[0].src : `${tainacan_plugin.base_url}/admin/images/placeholder_square.png`}
src={ term.header_image && term.header_image[0] && term.header_image[0].src ? term.header_image[0].src : `${tainacan_blocks.base_url}/admin/images/placeholder_square.png`}
alt={ term.header_image && term.header_image[0] ? term.header_image[0].alt : term.name }/>
<span>{ term.name ? term.name : '' }</span>
</a>
@ -290,7 +290,7 @@ registerBlockType('tainacan/terms-list', {
icon={(
<img
width={148}
src={ `${tainacan_plugin.base_url}/admin/images/tainacan_logo_header.svg` }
src={ `${tainacan_blocks.base_url}/admin/images/tainacan_logo_header.svg` }
alt="Tainacan Logo"/>
)}>
<p>

View File

@ -363,7 +363,7 @@ export default class TermsModal extends React.Component {
{ term.header_image ?
<img
aria-hidden
src={ term.header_image && term.header_image[0] && term.header_image[0].src ? term.header_image[0].src : `${tainacan_plugin.base_url}/admin/images/placeholder_square.png`}
src={ term.header_image && term.header_image[0] && term.header_image[0].src ? term.header_image[0].src : `${tainacan_blocks.base_url}/admin/images/placeholder_square.png`}
alt={ term.header_image && term.header_image[0] ? term.header_image[0].alt : term.name }/>
: null
}
@ -396,7 +396,7 @@ export default class TermsModal extends React.Component {
{ term.header_image ?
<img
aria-hidden
src={ term.header_image && term.header_image[0] && term.header_image[0].src ? term.header_image[0].src : `${tainacan_plugin.base_url}/admin/images/placeholder_square.png`}
src={ term.header_image && term.header_image[0] && term.header_image[0].src ? term.header_image[0].src : `${tainacan_blocks.base_url}/admin/images/placeholder_square.png`}
alt={ term.header_image && term.header_image[0] ? term.header_image[0].alt : term.name }/>
: null
}

View File

@ -174,9 +174,9 @@ export const updateTerm = ({ commit }, { taxonomyId, id, name, description, pare
export const fetchTerms = ({ commit }, {taxonomyId, fetchOnly, search, all, order, offset, number}) => {
let query = '';
if (order == undefined) {
if (order == undefined)
order = 'asc';
}
if(fetchOnly && search && !all ){
query = `?order=${order}&${qs.stringify(fetchOnly)}&${qs.stringify(search)}`;
@ -188,9 +188,11 @@ export const fetchTerms = ({ commit }, {taxonomyId, fetchOnly, search, all, orde
query =`?hideempty=0&order=${order}`;
}
if (offset != undefined && number != undefined) {
query += '&offset=' + offset + '&number=' + number;
}
if (number != undefined)
query += '&number=' + number;
if (offset != undefined)
query += '&offset=' + offset;
return new Promise((resolve, reject) => {
axios.tainacan.get(`/taxonomy/${taxonomyId}/terms${query}`)

View File

@ -2,9 +2,9 @@
Contributors: andrebenedito, daltonmartins, fabianobn, jacsonp, leogermani, weryques, wetah, eduardohumberto, ravipassos, jessicafpx, marinagiolo, omarceloavila, vnmedeiros
Tags: museums, libraries, archives, GLAM, collections, repository
Requires at least: 4.8
Tested up to: 5.2.4
Tested up to: 5.3
Requires PHP: 5.6
Stable tag: 0.13.1
Stable tag: 0.14
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html

View File

@ -4,13 +4,13 @@ Plugin Name: Tainacan
Plugin URI: https://tainacan.org/
Description: Open source, powerfull and flexible repository platform for WordPress. Manage and publish you digital collections as easily as publishing a post to your blog, while having all the tools of a professional respository platform.
Author: Tainacan.org
Version: 0.13.1
Version: 0.14
Text Domain: tainacan
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
*/
const TAINACAN_VERSION = '0.13.1';
const TAINACAN_VERSION = '0.14';
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
$TAINACAN_BASE_URL = plugins_url('', __FILE__);

View File

@ -365,19 +365,25 @@ class Theme_Helper {
$atts
);
$default_view_mode = apply_filters( 'tainacan-default-view-mode-for-themes', 'masonry' );
$enabled_view_modes = apply_filters( 'tainacan-enabled-view-modes-for-themes', ['table', 'cards', 'masonry', 'slideshow'] );
$params = '';
if (isset($atts['collection-id'])) {
$params = "collection-id=" . $atts['collection-id'];
if (isset($atts['collection-id']) && $atts['collection-id'] != '') {
$params .= "collection-id=" . $atts['collection-id'];
$collection = new \Tainacan\Entities\Collection($atts['collection-id']);
$default_view_mode = $collection->get_default_view_mode();
$enabled_view_modes = $collection->get_enabled_view_modes();
}
if (isset($atts['term-id'])) {
$params = "term-id=" . $atts['term-id'];
if (isset($atts['term-id']) && $atts['term-id'] != '') {
$params .= "term-id=" . $atts['term-id'];
}
$params .= ' default-view-mode="' . $default_view_mode . '" ';
$params .= ' enabled-view-modes="' . implode(',', $enabled_view_modes) . '" ';
$this->enqueue_scripts(true);
return "<div id='tainacan-items-page' $params ></div>";
}
function get_items_list_slug() {

View File

@ -86,7 +86,8 @@ export default {
this.$refs.masonryWrapper.children[0] != undefined &&
this.$refs.masonryWrapper.children[0].children[0] != undefined &&
this.$refs.masonryWrapper.children[0].children[0].clientWidth != undefined) {
this.containerWidthDiscount = jQuery(window).width() - this.$refs.masonryWrapper.clientWidth;
if (jQuery && jQuery(window))
this.containerWidthDiscount = jQuery(window).width() - this.$refs.masonryWrapper.clientWidth;
}
this.$forceUpdate();
},

View File

@ -169,7 +169,8 @@ export default {
this.$refs.masonryWrapper.children[0] != undefined &&
this.$refs.masonryWrapper.children[0].children[0] != undefined &&
this.$refs.masonryWrapper.children[0].children[0].clientWidth != undefined) {
this.containerWidthDiscount = jQuery(window).width() - this.$refs.masonryWrapper.clientWidth;
if (jQuery && jQuery(window))
this.containerWidthDiscount = jQuery(window).width() - this.$refs.masonryWrapper.clientWidth;
}
this.$forceUpdate();
}, 500)