Skip to content

Commit

Permalink
Merge Margins management & cleanup Meeds-io/MIPs#103 (#3206)
Browse files Browse the repository at this point in the history
  • Loading branch information
SaraBoutej authored Nov 22, 2023
2 parents be0422a + 105a729 commit 97b554d
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
}
%>
<div class="VuetifyApp">
<div style="" id="GettingStartedPortlet">
<div style="" id="GettingStartedPortlet" data-can-close="<%=canClose%>">
<div data-app="true"
class="v-application v-application--is-ltr theme--light" id="app">
<div class="v-application--wrap">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,15 +237,6 @@
padding-left: 10px ~'; /** orientation=lt */ ';
padding-right: 10px ~'; /** orientation=rt */ ';

.v-application {
&:not(.hiddenable-widget) {
margin-bottom: 20px;
}
&.hiddenable-widget > .v-application--wrap > div {
margin-bottom: 20px;
}
}

/* Added for sticky container */
.UIContainer, .NormalContainerBlock, .VIEW-CONTAINER, .UIIntermediateContainer, .UIRowContainer {
display: inline;
Expand Down Expand Up @@ -281,6 +272,7 @@
top: 13px;
height: auto;
display: block;
padding-bottom: @applicationSpaceBottom !important;
z-index: @zindexStickyContainer;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ export function hideGettingStarted() {
const parentAppElement = document.querySelector('#GettingStartedPortlet .btClose');
if (parentAppElement) {
parentAppElement.onclick = () => {
hideGettingStarted().then(() => document.querySelector('#GettingStartedPortlet').parentElement.remove());
hideGettingStarted().then(() => {
const parentElementToHide = parentAppElement.closest('.PORTLET-FRAGMENT');
hideGettingStarted().then(() => parentElementToHide.classList.add('hidden'));
});
};
}
const parentElementToHide = document.querySelector('#GettingStartedPortlet');
if (parentElementToHide && parentElementToHide.dataset.canClose === 'true') {
parentElementToHide.closest('.PORTLET-FRAGMENT').classList.add('hidden');
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,15 @@ export default {
return !this.previewMode && this.$root.canEdit;
},
},
watch: {
canView() {
if (this.canView) {
this.$el.parentElement.closest('.PORTLET-FRAGMENT').classList.remove('hidden');
} else {
this.$el.parentElement.closest('.PORTLET-FRAGMENT').classList.add('hidden');
}
}
},
created() {
document.addEventListener('cms-preview-mode', this.switchToPreview);
document.addEventListener('cms-edit-mode', this.switchToEdit);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@back="closeDetail" />
<v-card
v-else
class="my-3 card-border-radius"
class="card-border-radius"
flat>
<v-list @click="openNotificationSettingDetail">
<v-list-item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<v-app :class="hasNavigations && 'hasNavigations' | ''">
<v-card
color="transparent"
class="mb-6 card-border-radius overflow-hidden"
class="card-border-radius overflow-hidden"
flat>
<v-hover>
<v-img
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ export default {
this.$nextTick().then(() => this.$root.$applicationLoaded());
}
},
isVisible() {
if (this.isVisible) {
this.$el.closest('.PORTLET-FRAGMENT').classList.remove('hidden');
} else {
this.$el.closest('.PORTLET-FRAGMENT').classList.add('hidden');
}
}
},
created() {
if (this.displayPeopleSuggestions) {
Expand All @@ -81,6 +88,11 @@ export default {
this.loading--;
}
},
mounted() {
if (!this.isVisible) {
this.$el.closest('.PORTLET-FRAGMENT').classList.add('hidden');
}
},
methods: {
initPeopleSuggestionsList() {
return this.$userService.getUserSuggestions()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@back="closeSecurityDetail" />
<v-card
v-else
class="my-3 card-border-radius"
class="card-border-radius"
flat>
<v-list>
<v-list-item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ export default {
return this.users && this.users.length;
},
},
watch: {
display() {
if (this.display) {
this.$el.closest('.PORTLET-FRAGMENT').classList.remove('hidden');
} else {
this.$el.closest('.PORTLET-FRAGMENT').classList.add('hidden');
}
}
},
mounted() {
this.$root.$applicationLoaded();
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ export function init() {
exoi18n.loadLanguageAsync(lang, url)
.then(() => {
const onlineUsers = JSON.parse(document.getElementById('whoIsOnlineDefaultValue').value);
if (!onlineUsers.length) {
document.querySelector('#OnlinePortlet').closest('.PORTLET-FRAGMENT').classList.add('hidden');
}
if (onlineUsers && onlineUsers.length) {
const avatars = JSON.parse(document.getElementById('whoIsOnlineAvatarsDefaultValue').value);
onlineUsers.forEach(user => {
Expand Down

0 comments on commit 97b554d

Please sign in to comment.