Sfoglia il codice sorgente

menu permessi hover

master
Mattia MWG 4 anni fa
parent
commit
3ab29101b5
  1. 26
      liferay-plugins-sdk-6.2/themes/portos-private-theme/docroot/_diffs/css/component/header.scss
  2. 8
      liferay-plugins-sdk-6.2/themes/portos-private-theme/docroot/_diffs/js/custom.js
  3. 6
      liferay-plugins-sdk-6.2/themes/portos-private-theme/docroot/_diffs/templates/navigation.ftl
  4. 26
      liferay-plugins-sdk-6.2/themes/portos-private-theme/docroot/css/component/header.scss
  5. 8
      liferay-plugins-sdk-6.2/themes/portos-private-theme/docroot/js/custom.js
  6. 6
      liferay-plugins-sdk-6.2/themes/portos-private-theme/docroot/templates/navigation.ftl

26
liferay-plugins-sdk-6.2/themes/portos-private-theme/docroot/_diffs/css/component/header.scss

@ -98,9 +98,6 @@
} }
} }
.info-user{
display:none;
}
.subheader-right { .subheader-right {
@include display-flex(); @include display-flex();
@ -114,21 +111,38 @@
@include display-flex(); @include display-flex();
flex: 0 0 auto; flex: 0 0 auto;
@include align-items(center); @include align-items(center);
position:relative;
.fa-user-circle { .fa-user-circle {
padding-right: 5px; padding-right: 5px;
} }
.div_permessi{
padding-left:10px;
text-decoration:underline;
font-size:11px;
cursor:pointer;
}
} }
.info-user { .info-user {
padding-right: 1.25em; display:none;
position: absolute;
background-color: #fff;
top: 30px;
color: #000;
width: 250px;
box-shadow: 0px 0px 5px 1px #aaa;
left: calc(50% - 125px);
padding: 5px;
.info-user__location { .info-user__location {
color: $w; color: $b;
font-size: 10px; font-size: 10px;
} }
.info-user__occupazione { .info-user__occupazione {
color: $w; color: $b;
font-size: 10px; font-size: 10px;
} }
} }

8
liferay-plugins-sdk-6.2/themes/portos-private-theme/docroot/_diffs/js/custom.js

@ -29,6 +29,14 @@ $(document).ready(function () {
$(this).find( "li" ).toggle(); $(this).find( "li" ).toggle();
});*/ });*/
$('.div_permessi').hover(
function() {
$( this ).find('.info-user').show();
}, function() {
$('.div_permessi .info-user').hide();
}
);
}); });

6
liferay-plugins-sdk-6.2/themes/portos-private-theme/docroot/_diffs/templates/navigation.ftl

@ -33,9 +33,12 @@
<div class="subheader-right"> <div class="subheader-right">
<#if user_name != "" > <#if user_name != "" >
<div class="name-user"> <div class="name-user">
<div>
<span class="fa fa-user-circle"></span> <span class="fa fa-user-circle"></span>
${user_name} ${user_name}
</div> </div>
<div class="div_permessi">
Permessi
<div class="info-user"> <div class="info-user">
<#assign organizationservice = serviceLocator.findService('com.liferay.portal.service.OrganizationLocalService') /> <#assign organizationservice = serviceLocator.findService('com.liferay.portal.service.OrganizationLocalService') />
<#assign organizations = organizationservice.getUserOrganizations(user_id) > <#assign organizations = organizationservice.getUserOrganizations(user_id) >
@ -67,6 +70,9 @@
<p class="info-user__occupazione">${role_names?substring(2)}</p> <p class="info-user__occupazione">${role_names?substring(2)}</p>
</#if> </#if>
</div> </div>
</div>
</div>
<div class="header-separator"></div> <div class="header-separator"></div>
</#if> </#if>

26
liferay-plugins-sdk-6.2/themes/portos-private-theme/docroot/css/component/header.scss

@ -98,9 +98,6 @@
} }
} }
.info-user{
display:none;
}
.subheader-right { .subheader-right {
@include display-flex(); @include display-flex();
@ -114,21 +111,38 @@
@include display-flex(); @include display-flex();
flex: 0 0 auto; flex: 0 0 auto;
@include align-items(center); @include align-items(center);
position:relative;
.fa-user-circle { .fa-user-circle {
padding-right: 5px; padding-right: 5px;
} }
.div_permessi{
padding-left:10px;
text-decoration:underline;
font-size:11px;
cursor:pointer;
}
} }
.info-user { .info-user {
padding-right: 1.25em; display:none;
position: absolute;
background-color: #fff;
top: 30px;
color: #000;
width: 250px;
box-shadow: 0px 0px 5px 1px #aaa;
left: calc(50% - 125px);
padding: 5px;
.info-user__location { .info-user__location {
color: $w; color: $b;
font-size: 10px; font-size: 10px;
} }
.info-user__occupazione { .info-user__occupazione {
color: $w; color: $b;
font-size: 10px; font-size: 10px;
} }
} }

8
liferay-plugins-sdk-6.2/themes/portos-private-theme/docroot/js/custom.js

@ -29,6 +29,14 @@ $(document).ready(function () {
$(this).find( "li" ).toggle(); $(this).find( "li" ).toggle();
});*/ });*/
$('.div_permessi').hover(
function() {
$( this ).find('.info-user').show();
}, function() {
$('.div_permessi .info-user').hide();
}
);
}); });

6
liferay-plugins-sdk-6.2/themes/portos-private-theme/docroot/templates/navigation.ftl

@ -33,9 +33,12 @@
<div class="subheader-right"> <div class="subheader-right">
<#if user_name != "" > <#if user_name != "" >
<div class="name-user"> <div class="name-user">
<div>
<span class="fa fa-user-circle"></span> <span class="fa fa-user-circle"></span>
${user_name} ${user_name}
</div> </div>
<div class="div_permessi">
Permessi
<div class="info-user"> <div class="info-user">
<#assign organizationservice = serviceLocator.findService('com.liferay.portal.service.OrganizationLocalService') /> <#assign organizationservice = serviceLocator.findService('com.liferay.portal.service.OrganizationLocalService') />
<#assign organizations = organizationservice.getUserOrganizations(user_id) > <#assign organizations = organizationservice.getUserOrganizations(user_id) >
@ -67,6 +70,9 @@
<p class="info-user__occupazione">${role_names?substring(2)}</p> <p class="info-user__occupazione">${role_names?substring(2)}</p>
</#if> </#if>
</div> </div>
</div>
</div>
<div class="header-separator"></div> <div class="header-separator"></div>
</#if> </#if>

Caricamento…
Annulla
Salva