...
Il faut ajouter dans le skin.xml un nouveau javascript a utiliser par exemple :
Bloc de code |
---|
theme | Confluence |
---|
language | bash | theme | Confluence |
---|
|
custom\uPortal\uportal-war\src\main\webapp\media\skins\universality\uportal3\skin.xml |
Bloc de code |
---|
theme | Confluence |
---|
language | bash | theme | Confluence |
---|
|
<js>../common/javascript/uportal/zimbra-unread.js</js> |
Créer le plugins javascript dans : custom\uPortal\uportal-war\src\main\webapp\media\skins\universality\common\javascript\uportal\zimbra-unread.js
Bloc de code |
---|
theme | Confluence |
---|
language | bash | theme | Confluence |
---|
|
/**********************************************************
Revision: 2012-10-16 : Julien Marchal
Ajout du nombre de message non lu dans la barre de header
**********************************************************/
(function($){
$(document).ready(function(){
var postAppendStr=" Message(s)";
var mailTitle="Voir mes messages";
var mailUrl="https://mail.univ-nancy2.fr";
var addSpan=true;
if ($('#portalWelcome').length != 0) {
var outStr='';
outStr+='<span id="portalPageBarZimbraUnread">';
outStr+=' <a title="' + mailTitle + '" href="' + mailUrl + '" target="_blank">';
outStr+=' <span id="messagesCount">0' + postAppendStr + '</span>';
outStr+=' </a>';
if (addSpan) outStr+=' <span>|</span>';
outStr+='</span>';
$("#portalPageBarHome").after(outStr);
function timerMessagesCount() {
ajaxMessageCount();
window.setTimeout(timerMessagesCount, 60000);
}
function ajaxMessageCount() {
up.jQuery.getJSON("/portlet-zimbra/ajax/getMessagesCount",
function(data) {
if (data.integer == 0)
up.jQuery("#messagesCount").html("0"+postAppendStr);
else
up.jQuery("#messagesCount").html(""+data.integer+postAppendStr);
});
}
timerMessagesCount();
}
});
})(jQuery); |