updated theme for responsive home, workspace and messages buttons and search
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portal/liferay62-plugins/social-dockbar-hook@126329 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
e3bdd76be9
commit
c9ac1a8faa
|
@ -67,6 +67,73 @@
|
||||||
$(this).trigger("enterKey");
|
$(this).trigger("enterKey");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
//remove placeholder text on click
|
||||||
|
$('#searchbox').click(function() {
|
||||||
|
$('#searchbox').attr("placeholder", "");
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#searchbox-phone').keyup(function(e){
|
||||||
|
if(e.keyCode == 13)
|
||||||
|
{
|
||||||
|
$(this).trigger("enterKey");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//remove placeholder text on click
|
||||||
|
$('#searchbox-phone').click(function() {
|
||||||
|
$('#searchbox-phone').attr("placeholder", "");
|
||||||
|
});
|
||||||
|
|
||||||
|
//search box keyboard handlers
|
||||||
|
$('#searchbox-phone').bind("enterKey",function(e){
|
||||||
|
if ($('#searchbox-phone').val() != "") {
|
||||||
|
if ($('#searchbox-phone').val().indexOf("#") == 0) {
|
||||||
|
if ($('#searchbox-phone').val().indexOf(" ") >= 0) {
|
||||||
|
alert('Sorry, spaces not allowed when searching for topics!');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var base64hashtag = btoa($('#searchbox-phone').val());
|
||||||
|
var base64attr = btoa("hashtagIdentificationParameter");
|
||||||
|
if (window.location.href.indexOf("<%=mySiteURL%>") >= 0) {
|
||||||
|
window.location.href = "/group<%=mySiteURL%>?"+base64attr+"="+ base64hashtag;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
//this is when you are in a VRE and you want to search in that VRE, count the slashes to get where to point
|
||||||
|
//you always want to point to /group/vrename
|
||||||
|
var newhref = window.location.href;
|
||||||
|
if (window.location.href.indexOf("?") >= 0) {
|
||||||
|
newhref = window.location.href.split("?")[0];
|
||||||
|
}
|
||||||
|
var count = newhref.split("/").length-1;
|
||||||
|
if (count > 4)
|
||||||
|
window.location.href = newhref + "/../?"+base64attr+"="+ base64hashtag;
|
||||||
|
else
|
||||||
|
window.location.href = newhref + "?"+base64attr+"="+ base64hashtag;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var base64hashtag = btoa($('#searchbox-phone').val());
|
||||||
|
var base64attr = btoa("elasticSearchIdentificationParameter");
|
||||||
|
if (window.location.href.indexOf("<%=mySiteURL%>") >= 0) {
|
||||||
|
window.location.href = "/group<%=mySiteURL%>?"+base64attr+"="+ base64hashtag;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
//this is when you are in a VRE and you want to search in that VRE, count the slashes to get where to point
|
||||||
|
//you always want to point to /group/vrename
|
||||||
|
var newhref = window.location.href;
|
||||||
|
if (window.location.href.indexOf("?") >= 0) {
|
||||||
|
newhref = window.location.href.split("?")[0];
|
||||||
|
}
|
||||||
|
var count = newhref.split("/").length-1;
|
||||||
|
if (count > 4)
|
||||||
|
window.location.href = newhref + "/../?"+base64attr+"="+ base64hashtag;
|
||||||
|
else
|
||||||
|
window.location.href = newhref + "?"+base64attr+"="+ base64hashtag;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<!-- When desktop -->
|
<!-- When desktop -->
|
||||||
|
@ -91,7 +158,7 @@
|
||||||
<div class="collapse nav-collapse">
|
<div class="collapse nav-collapse">
|
||||||
<ul class="nav nav-add-controls">
|
<ul class="nav nav-add-controls">
|
||||||
<li class="dockbar-item">
|
<li class="dockbar-item">
|
||||||
<input id="searchbox-desktop" type="text" placeholder="Search News Feed">
|
<input id="searchbox" type="text" placeholder="Search News Feed">
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -115,7 +182,7 @@
|
||||||
<c:choose>
|
<c:choose>
|
||||||
<c:when test="<%= themeDisplay.isShowControlPanelIcon() %>">
|
<c:when test="<%= themeDisplay.isShowControlPanelIcon() %>">
|
||||||
<span class="btn btn-navbar">
|
<span class="btn btn-navbar">
|
||||||
<input id="searchbox-phone-admin" type="text" placeholder="Search ...">
|
<input id="searchbox-phone" type="text" style="width: 70px;" placeholder="Search ...">
|
||||||
</span>
|
</span>
|
||||||
</c:when>
|
</c:when>
|
||||||
<c:otherwise>
|
<c:otherwise>
|
||||||
|
|
Loading…
Reference in New Issue