// fallback to default theme when file does not exist in configured theme
newMessageSoundURL = newMessageSoundURL.replace("/themes/" + guiTheme.getIdentifyer(), "/themes/default");
}
newMsgIcon.contextPut("newMessageSoundURL", newMessageSoundURL);
notifieNewMsgPanel = new Panel("newMsgPanel");
notifieNewMsgPanel.setContent(newMsgIcon);
statusChanger = LinkFactory.createCustomLink("statusChanger", "cmd.status", "", Link.NONTRANSLATED, statusChangerLink, this);
statusChanger.setCustomEnabledLinkCSS("b_small_icon o_instantmessaging_"+clientManager.getInstantMessagingClient(username).getDefaultRosterStatus()+"_icon");
statusChanger.registerForMousePositionEvent(true);
statusChanger.setTooltip(getTranslator().translate("im.status.change.long"), false);
statusChangerPanel = new Panel("statusChangerPanel");
statusChangerPanel.setContent(statusChanger);
statusPanel = new Panel("statusPanel");
//set defaults
buddiesSummaryPanel = new Panel("buddiesSummaryPanel");
buddiesSummaryPanel.setContent(buddiesSummary);
rosterPanel = new Panel("rosterPanel");
onlineOfflineCount = LinkFactory.createCustomLink("onlineOfflineCount", "cmd.roster", "", Link.NONTRANSLATED, buddiesSummary, this);
onlineOfflineCount.setCustomDisplayText("(0/0)");
onlineOfflineCount.setTooltip(getTranslator().translate("im.roster.intro"), false);
onlineOfflineCount.registerForMousePositionEvent(true);
/**
* status changer links
*/
available = LinkFactory.createLink("presence.available", statusChangerContent, this);
available.setCustomEnabledLinkCSS("o_instantmessaging_available_icon");
chat = LinkFactory.createLink("presence.chat", statusChangerContent, this);
chat.setCustomEnabledLinkCSS("o_instantmessaging_chat_icon");
away = LinkFactory.createLink("presence.away", statusChangerContent, this);
away.setCustomEnabledLinkCSS("o_instantmessaging_away_icon");
xa = LinkFactory.createLink("presence.xa", statusChangerContent, this);
xa.setCustomEnabledLinkCSS("o_instantmessaging_xa_icon");
dnd = LinkFactory.createLink("presence.dnd", statusChangerContent, this);
dnd.setCustomEnabledLinkCSS("o_instantmessaging_dnd_icon");
unavailable = LinkFactory.createLink("presence.unavailable", statusChangerContent, this);
unavailable.setCustomEnabledLinkCSS("o_instantmessaging_unavailable_icon");
statusChangerContent.contextPut("contextpath", WebappHelper.getServletContextPath());
statusChangerContent.contextPut("lang", ureq.getLocale().toString());
/**
* buddies list links
*/
toggleOffline = LinkFactory.createCustomLink("toggleOffline", "cmd.offline", "", Link.NONTRANSLATED, buddiesList, this);
toggleOffline.setCustomDisplayText(getTranslator().translate("im.show.offline.buddies"));
toggleOffline.setCustomEnabledLinkCSS("o_instantmessaging_showofflineswitch");
toggleGroups = LinkFactory.createCustomLink("toggleGroups", "cmd.groups", "", Link.NONTRANSLATED, buddiesList, this);
toggleGroups.setCustomDisplayText(getTranslator().translate("im.show.groups"));
toggleGroups.setCustomEnabledLinkCSS("o_instantmessaging_showgroupswitch");
showOtherUsers = LinkFactory.createLink("im.others.connected", buddiesList, this);
showOtherUsers.setCustomEnabledLinkCSS("o_instantmessaging_footerlinks");
showOtherUsers.setAjaxEnabled(false); //opens new window -> disable background post!
showOtherUsers.setTarget("_blank");
buddiesList.contextPut("othersConnected", new ConncectedUsersHelper());
buddiesList.contextPut("contextpath", WebappHelper.getServletContextPath());
buddiesList.contextPut("lang", ureq.getLocale().toString());
buddiesList.contextPut("othersConnected", new ConncectedUsersHelper());
buddiesListContent.contextPut("imclient", clientHelper);
buddiesListContentPanel = new Panel("buddiesListContent");
buddiesListContentPanel.setContent(buddiesListContent);
buddiesList.put("buddiesListContent", buddiesListContentPanel);
main.put("newMsgPanel", notifieNewMsgPanel);
main.put("statusChangerPanel", statusChangerPanel);