Updated dockbar to reflect selected application (Dashboard, Workspace etc.)
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portal/liferay62-plugins/social-dockbar-hook@178494 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
fcaa7e324c
commit
73968a8311
|
@ -1,4 +1,8 @@
|
||||||
<ReleaseNotes>
|
<ReleaseNotes>
|
||||||
|
|
||||||
|
<Changeset component="org.gcube.portal.plugins-social-dockbar-hook-6.5.0" date="2019-03-06">
|
||||||
|
<Change>Updated dockbar to reflect selected application (Dashboard, Workspace etc.)</Change>
|
||||||
|
</Changeset>
|
||||||
<Changeset component="org.gcube.portal.plugins-social-dockbar-hook-6.3.0" date="2015-10-06">
|
<Changeset component="org.gcube.portal.plugins-social-dockbar-hook-6.3.0" date="2015-10-06">
|
||||||
<Change>First Version</Change>
|
<Change>First Version</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -12,7 +12,7 @@
|
||||||
<artifactId>social-dockbar-hook</artifactId>
|
<artifactId>social-dockbar-hook</artifactId>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
<name>social-dockbar-hook Hook</name>
|
<name>social-dockbar-hook Hook</name>
|
||||||
<version>6.4.0-SNAPSHOT</version>
|
<version>6.5.0-SNAPSHOT</version>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
name=social-dockbar-hook
|
name=social-dockbar-hook
|
||||||
module-group-id=liferay
|
module-group-id=liferay
|
||||||
module-incremental-version=6
|
module-incremental-version=7
|
||||||
tags=
|
tags=
|
||||||
short-description=
|
short-description=
|
||||||
change-log=
|
change-log=
|
||||||
|
|
|
@ -8,10 +8,32 @@ if (themeDisplay.isSignedIn()) {
|
||||||
String groupName = context.getGatewayName(request);
|
String groupName = context.getGatewayName(request);
|
||||||
String mySiteURL = context.getSiteLandingPagePath(request);
|
String mySiteURL = context.getSiteLandingPagePath(request);
|
||||||
String myGatewayURL = context.getGatewayURL(request);
|
String myGatewayURL = context.getGatewayURL(request);
|
||||||
|
pageContext.setAttribute("myDashboardUrl", mySiteURL);
|
||||||
|
String iconBGColor = "#999";
|
||||||
|
if (themeDisplay.getThemeSetting("dockbar-selected-icon-bgcolor") != null)
|
||||||
|
iconBGColor = themeDisplay.getThemeSetting("dockbar-selected-icon-bgcolor");
|
||||||
|
pageContext.setAttribute("iconBGColor", iconBGColor);
|
||||||
%>
|
%>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
jQuery(document).ready(function() {
|
jQuery(document).ready(function() {
|
||||||
|
var pathname = window.location.pathname;
|
||||||
|
var backgroundColorSetting = '${iconBGColor}';
|
||||||
|
if (pathname == '${myDashboardUrl}' || pathname == '${myDashboardUrl}'+ '/' || pathname == '${myDashboardUrl}'+ '/home') {
|
||||||
|
$('#homeIcon').css("background-color", backgroundColorSetting);
|
||||||
|
$('#homeIcon').css("color", "#FFF");
|
||||||
|
}
|
||||||
|
if (pathname == '${myDashboardUrl}'+ '/workspace') {
|
||||||
|
$('#wsIcon').css("background-color", backgroundColorSetting);
|
||||||
|
$('#wsIcon').css("color", "#FFF");
|
||||||
|
}
|
||||||
|
if (pathname == '${myDashboardUrl}'+ '/data-catalogue') {
|
||||||
|
$('#catalougueIcon').css("background-color", backgroundColorSetting);
|
||||||
|
$('#catalougueIcon').css("color", "#FFF");
|
||||||
|
}
|
||||||
|
if (pathname == '${myDashboardUrl}'+ '/messages') {
|
||||||
|
$('#messagesIcon').css("background-color", backgroundColorSetting);
|
||||||
|
$('#messagesIcon').css("color", "#FFF");
|
||||||
|
}
|
||||||
|
|
||||||
//check for notifications on load after 3 seconds
|
//check for notifications on load after 3 seconds
|
||||||
var username = "<%=themeDisplay.getUser().getScreenName()%>";
|
var username = "<%=themeDisplay.getUser().getScreenName()%>";
|
||||||
|
@ -112,6 +134,7 @@ if (themeDisplay.isSignedIn()) {
|
||||||
$('#searchIcon').click(function() {
|
$('#searchIcon').click(function() {
|
||||||
$('#searchbox').show();
|
$('#searchbox').show();
|
||||||
$('#searchIcon').hide();
|
$('#searchIcon').hide();
|
||||||
|
$("#searchbox").focus();
|
||||||
});
|
});
|
||||||
|
|
||||||
//search box keyboard handlers
|
//search box keyboard handlers
|
||||||
|
@ -186,8 +209,8 @@ if (themeDisplay.isSignedIn()) {
|
||||||
<ul class="nav nav-add-controls">
|
<ul class="nav nav-add-controls">
|
||||||
<li class="dockbar-item"><a class=""
|
<li class="dockbar-item"><a class=""
|
||||||
href="<%=mySiteURL%>" id="homeIcon"
|
href="<%=mySiteURL%>" id="homeIcon"
|
||||||
title="<%=groupName%> Home"> <i
|
title="<%=groupName%> Dashboard"> <i
|
||||||
class="icon-home" style="font-size: 24px;"></i>
|
class="icon-dashboard" style="font-size: 24px;"></i>
|
||||||
</a></li>
|
</a></li>
|
||||||
<li class="dockbar-item" id="lab-li-sbd" style="display: none;"><a class=""
|
<li class="dockbar-item" id="lab-li-sbd" style="display: none;"><a class=""
|
||||||
href="<%=myGatewayURL + "/group/sobigdata-gateway/explore?siteId=20371853"%>" id="labIcon"
|
href="<%=myGatewayURL + "/group/sobigdata-gateway/explore?siteId=20371853"%>" id="labIcon"
|
||||||
|
|
Loading…
Reference in New Issue