use of org.olat.instantMessaging.OpenInstantMessageEvent in project openolat by klemens.
the class HomePageDisplayController method event.
/**
* @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest, org.olat.core.gui.components.Component, org.olat.core.gui.control.Event)
*/
public void event(UserRequest ureq, Component source, Event event) {
if (imLink == source) {
Buddy buddy = (Buddy) imLink.getUserObject();
OpenInstantMessageEvent e = new OpenInstantMessageEvent(ureq, buddy);
ureq.getUserSession().getSingleUserEventCenter().fireEventToListenersOf(e, InstantMessagingService.TOWER_EVENT_ORES);
}
}
use of org.olat.instantMessaging.OpenInstantMessageEvent in project openolat by klemens.
the class ChatToolController method event.
@Override
protected void event(UserRequest ureq, Component source, Event event) {
if (openChatLink == source) {
OpenInstantMessageEvent e = new OpenInstantMessageEvent(ureq, resource, resource.getName(), isAdmin);
ureq.getUserSession().getSingleUserEventCenter().fireEventToListenersOf(e, InstantMessagingService.TOWER_EVENT_ORES);
} else if (logLink == source) {
downloadChatLog(ureq);
}
}
use of org.olat.instantMessaging.OpenInstantMessageEvent in project OpenOLAT by OpenOLAT.
the class ChatToolController method event.
@Override
protected void event(UserRequest ureq, Component source, Event event) {
if (openChatLink == source) {
OpenInstantMessageEvent e = new OpenInstantMessageEvent(ureq, resource, resource.getName(), isAdmin);
ureq.getUserSession().getSingleUserEventCenter().fireEventToListenersOf(e, InstantMessagingService.TOWER_EVENT_ORES);
} else if (logLink == source) {
downloadChatLog(ureq);
}
}
use of org.olat.instantMessaging.OpenInstantMessageEvent in project OpenOLAT by OpenOLAT.
the class IMBuddyListController method event.
@Override
protected void event(UserRequest ureq, Component source, Event event) {
// buddies list
if (source == toggleOffline) {
if (viewMode == ViewMode.onlineUsers) {
toggleOffline.setCustomDisplayText(translate("im.hide.offline.buddies"));
toggleOffline.setIconLeftCSS("o_icon o_icon-fw o_icon_status_available");
toggleOffline.setElementCssClass("o_im_hideofflineswitch");
loadRoster(ViewMode.offlineUsers);
} else {
toggleOffline.setCustomDisplayText(translate("im.show.offline.buddies"));
toggleOffline.setIconLeftCSS("o_icon o_icon-fw o_icon_status_unavailable");
toggleOffline.setElementCssClass("o_im_showofflineswitch");
loadRoster(ViewMode.onlineUsers);
}
} else if (source == toggleGroup) {
if (viewGroups) {
toggleGroup.setCustomDisplayText(translate("im.show.groups"));
toggleGroup.setElementCssClass("o_im_hidegroupswitch");
buddiesListContent.contextPut("viewGroups", Boolean.FALSE);
viewGroups = false;
} else {
toggleGroup.setCustomDisplayText(translate("im.hide.groups"));
toggleGroup.setElementCssClass("o_im_showgroupswitch");
buddiesListContent.contextPut("viewGroups", Boolean.TRUE);
viewGroups = true;
}
} else if (source instanceof Link) {
Link link = (Link) source;
if ("cmd.buddy".equals(link.getCommand())) {
Buddy buddy = (Buddy) link.getUserObject();
fireEvent(ureq, new OpenInstantMessageEvent(ureq, buddy));
}
}
}
use of org.olat.instantMessaging.OpenInstantMessageEvent in project OpenOLAT by OpenOLAT.
the class MembersTableController method doOpenChat.
private void doOpenChat(MemberView member, UserRequest ureq) {
Buddy buddy = imService.getBuddyById(member.getIdentityKey());
OpenInstantMessageEvent e = new OpenInstantMessageEvent(ureq, buddy);
ureq.getUserSession().getSingleUserEventCenter().fireEventToListenersOf(e, InstantMessagingService.TOWER_EVENT_ORES);
}
Aggregations