Sfoglia il codice sorgente

menu permessi hover

master
Mattia MWG 4 anni fa
parent
commit
3ab29101b5
  1. 30
      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. 72
      liferay-plugins-sdk-6.2/themes/portos-private-theme/docroot/_diffs/templates/navigation.ftl
  4. 30
      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. 72
      liferay-plugins-sdk-6.2/themes/portos-private-theme/docroot/templates/navigation.ftl

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

@ -97,10 +97,7 @@
width: auto; width: auto;
} }
} }
.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

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

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

@ -33,40 +33,46 @@
<div class="subheader-right"> <div class="subheader-right">
<#if user_name != "" > <#if user_name != "" >
<div class="name-user"> <div class="name-user">
<span class="fa fa-user-circle"></span> <div>
${user_name} <span class="fa fa-user-circle"></span>
</div> ${user_name}
<div class="info-user"> </div>
<#assign organizationservice = serviceLocator.findService('com.liferay.portal.service.OrganizationLocalService') /> <div class="div_permessi">
<#assign organizations = organizationservice.getUserOrganizations(user_id) > Permessi
<#assign org_names = ""> <div class="info-user">
<#if organizations?has_content> <#assign organizationservice = serviceLocator.findService('com.liferay.portal.service.OrganizationLocalService') />
<#list organizations as org> <#assign organizations = organizationservice.getUserOrganizations(user_id) >
<#assign org_names = org_names+" - ${org.getName()}"> <#assign org_names = "">
</#list> <#if organizations?has_content>
</#if> <#list organizations as org>
<#if org_names?has_content> <#assign org_names = org_names+" - ${org.getName()}">
<p class="info-user__location">${org_names?substring(3)}</p> </#list>
</#if> </#if>
<#if org_names?has_content>
<#assign userGroupRoleService = serviceLocator.findService('com.liferay.portal.service.UserGroupRoleLocalService') /> <p class="info-user__location">${org_names?substring(3)}</p>
<#assign roles = userGroupRoleService.getUserGroupRoles(user_id) > </#if>
<#assign role_names = "">
<#if roles?has_content> <#assign userGroupRoleService = serviceLocator.findService('com.liferay.portal.service.UserGroupRoleLocalService') />
<#list roles as role> <#assign roles = userGroupRoleService.getUserGroupRoles(user_id) >
<#assign roleName = role.getRole().getName()> <#assign role_names = "">
<#if !roleName?matches('.*Owner') > <#if roles?has_content>
<#assign roleName = roleName?replace('portos_', '')?replace('_',' ')?capitalize> <#list roles as role>
<#if !role_names?contains(roleName) > <#assign roleName = role.getRole().getName()>
<#assign role_names = role_names+", ${roleName}"> <#if !roleName?matches('.*Owner') >
</#if> <#assign roleName = roleName?replace('portos_', '')?replace('_',' ')?capitalize>
</#if> <#if !role_names?contains(roleName) >
</#list> <#assign role_names = role_names+", ${roleName}">
</#if> </#if>
<#if role_names?has_content> </#if>
<p class="info-user__occupazione">${role_names?substring(2)}</p> </#list>
</#if> </#if>
<#if role_names?has_content>
<p class="info-user__occupazione">${role_names?substring(2)}</p>
</#if>
</div>
</div>
</div> </div>
<div class="header-separator"></div> <div class="header-separator"></div>
</#if> </#if>

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

@ -97,10 +97,7 @@
width: auto; width: auto;
} }
} }
.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

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

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

@ -33,40 +33,46 @@
<div class="subheader-right"> <div class="subheader-right">
<#if user_name != "" > <#if user_name != "" >
<div class="name-user"> <div class="name-user">
<span class="fa fa-user-circle"></span> <div>
${user_name} <span class="fa fa-user-circle"></span>
</div> ${user_name}
<div class="info-user"> </div>
<#assign organizationservice = serviceLocator.findService('com.liferay.portal.service.OrganizationLocalService') /> <div class="div_permessi">
<#assign organizations = organizationservice.getUserOrganizations(user_id) > Permessi
<#assign org_names = ""> <div class="info-user">
<#if organizations?has_content> <#assign organizationservice = serviceLocator.findService('com.liferay.portal.service.OrganizationLocalService') />
<#list organizations as org> <#assign organizations = organizationservice.getUserOrganizations(user_id) >
<#assign org_names = org_names+" - ${org.getName()}"> <#assign org_names = "">
</#list> <#if organizations?has_content>
</#if> <#list organizations as org>
<#if org_names?has_content> <#assign org_names = org_names+" - ${org.getName()}">
<p class="info-user__location">${org_names?substring(3)}</p> </#list>
</#if> </#if>
<#if org_names?has_content>
<#assign userGroupRoleService = serviceLocator.findService('com.liferay.portal.service.UserGroupRoleLocalService') /> <p class="info-user__location">${org_names?substring(3)}</p>
<#assign roles = userGroupRoleService.getUserGroupRoles(user_id) > </#if>
<#assign role_names = "">
<#if roles?has_content> <#assign userGroupRoleService = serviceLocator.findService('com.liferay.portal.service.UserGroupRoleLocalService') />
<#list roles as role> <#assign roles = userGroupRoleService.getUserGroupRoles(user_id) >
<#assign roleName = role.getRole().getName()> <#assign role_names = "">
<#if !roleName?matches('.*Owner') > <#if roles?has_content>
<#assign roleName = roleName?replace('portos_', '')?replace('_',' ')?capitalize> <#list roles as role>
<#if !role_names?contains(roleName) > <#assign roleName = role.getRole().getName()>
<#assign role_names = role_names+", ${roleName}"> <#if !roleName?matches('.*Owner') >
</#if> <#assign roleName = roleName?replace('portos_', '')?replace('_',' ')?capitalize>
</#if> <#if !role_names?contains(roleName) >
</#list> <#assign role_names = role_names+", ${roleName}">
</#if> </#if>
<#if role_names?has_content> </#if>
<p class="info-user__occupazione">${role_names?substring(2)}</p> </#list>
</#if> </#if>
<#if role_names?has_content>
<p class="info-user__occupazione">${role_names?substring(2)}</p>
</#if>
</div>
</div>
</div> </div>
<div class="header-separator"></div> <div class="header-separator"></div>
</#if> </#if>

Caricamento…
Annulla
Salva