More third party themes compatibility and jQuery verification.

This commit is contained in:
Mateus Machado Luna 2019-11-20 16:48:19 -03:00
parent 36fa0bbf62
commit ef0564d800
13 changed files with 49 additions and 34 deletions

View File

@ -472,6 +472,7 @@
} }
}, },
created(){ created(){
if (jQuery && jQuery( document )) {
jQuery( document ).on( 'heartbeat-tick-list', ( event, data ) => { jQuery( document ).on( 'heartbeat-tick-list', ( event, data ) => {
let updatedProcesses = data.bg_process_feedback; let updatedProcesses = data.bg_process_feedback;
@ -486,11 +487,14 @@
jQuery( document ).on( 'heartbeat-tick', ( event, data ) => { jQuery( document ).on( 'heartbeat-tick', ( event, data ) => {
jQuery( document ).trigger('heartbeat-tick-list', data); jQuery( document ).trigger('heartbeat-tick-list', data);
}); });
}
}, },
beforeDestroy() { beforeDestroy() {
if (jQuery && jQuery( document )) {
jQuery( document ).unbind( 'heartbeat-tick-list') jQuery( document ).unbind( 'heartbeat-tick-list')
} }
} }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -236,6 +236,7 @@ export default {
this.showProcessesList = false; this.showProcessesList = false;
if (jQuery && jQuery( document )) {
jQuery( document ).on( 'heartbeat-tick-popup', ( event, data ) => { jQuery( document ).on( 'heartbeat-tick-popup', ( event, data ) => {
this.setProcesses(data.bg_process_feedback); this.setProcesses(data.bg_process_feedback);
}); });
@ -243,10 +244,10 @@ export default {
jQuery( document ).on( 'heartbeat-tick', ( event, data ) => { jQuery( document ).on( 'heartbeat-tick', ( event, data ) => {
jQuery( document ).trigger('heartbeat-tick-popup',data); jQuery( document ).trigger('heartbeat-tick-popup',data);
}); });
}
}, },
beforeDestroy() { beforeDestroy() {
if (jQuery && jQuery( document ))
jQuery( document ).unbind( 'heartbeat-tick-popup') jQuery( document ).unbind( 'heartbeat-tick-popup')
} }
} }

View File

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

View File

@ -1524,6 +1524,8 @@
this.$nextTick(() => { 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.searchControlHeight = this.$refs['search-control'] ? this.$refs['search-control'].clientHeight + this.$refs['search-control'].offsetTop : 0;
if (jQuery && jQuery(window))
this.isFiltersMenuCompressed = jQuery(window).width() <= 768; this.isFiltersMenuCompressed = jQuery(window).width() <= 768;
}); });
}, 500), }, 500),
@ -1773,7 +1775,6 @@
.filters-menu { .filters-menu {
position: relative; position: relative;
z-index: 10; z-index: 10;
background-color: white;
width: $filter-menu-width; width: $filter-menu-width;
min-width: 180px; min-width: 180px;
min-height: 100%; min-height: 100%;

View File

@ -1449,6 +1449,8 @@
this.$nextTick(() => { 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.searchControlHeight = this.$refs['search-control'] ? this.$refs['search-control'].clientHeight + this.$refs['search-control'].offsetTop : 0;
if (jQuery && jQuery(window))
this.isFiltersMenuCompressed = jQuery(window).width() <= 768; this.isFiltersMenuCompressed = jQuery(window).width() <= 768;
}); });
}, 500), }, 500),
@ -1688,7 +1690,6 @@
.filters-menu { .filters-menu {
position: relative; position: relative;
z-index: 10; z-index: 10;
background-color: white;
width: $filter-menu-width; width: $filter-menu-width;
min-width: 180px; min-width: 180px;
min-height: 100%; min-height: 100%;

View File

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

View File

@ -114,7 +114,7 @@
.taginput-container { .taginput-container {
padding: 0px !important; padding: 0px !important;
background-color: white !important; background-color: transparent !important;
&:focus, &:active { &:focus, &:active {
border: none !important; border: none !important;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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