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,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

@ -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%;

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%;

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

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

View File

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

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

@ -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)