Index: lams_learning/web/includes/presenceChat.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_learning/web/includes/Attic/presenceChat.jsp,v diff -u -r1.4 -r1.5 --- lams_learning/web/includes/presenceChat.jsp 24 Apr 2009 02:43:28 -0000 1.4 +++ lams_learning/web/includes/presenceChat.jsp 7 May 2009 06:15:38 -0000 1.5 @@ -25,36 +25,61 @@ // labels var presenceLabel = ""; - + + // on startup $(document).ready(function (){ - // if presence im is enabled - - // create chat tabs - $("#presenceChatTabs").tabs({ scrollable: true }); + // if browser is ie6 + if($.browser.msie && parseInt($.browser.version) == 6){ + // make warningvisible + $("#presenceChatWarning").removeClass("startHidden"); + } + // otherwise enable presence chat + else{ + // if presence im is enabled + + // make visible + $("#presenceChat").removeClass("startHidden"); - // bind the select function which resets label to non-bold when clicked - $("#presenceChatTabs").bind('tabsselect', function(event, ui) { - var nick = getUserFromTag(ui.panel.id).nick; - $('#' + ui.panel.id + '_tabLabel').html(nick); - $("#presenceChatTabs").tabs('scrollTo', ui.tab.offsetLeft); - }); - - - // create roster tab - $("#presenceChatRoster").tabs({ scrollable: false }); - - - // correct room name - roomName = correctPresenceRoomName(roomName); - - // attempt to login once the window is loaded - doLogin(presenceUrl, userId, userId, userId, roomName, nickname, false); + // create chat tabs + $("#presenceChatTabs").tabs({ scrollable: true }); + + // bind the select function to do extra stuff + $("#presenceChatTabs").bind('tabsselect', function(event, ui) { + // remove visual indicators of new message + var tag = ui.panel.id; + $("#" + tagToTabLabel(tag)).removeClass('presenceTabNewMessage'); + $("#" + tagToListing(tag)).removeClass('presenceListingNewMessage'); + + // scroll to the clicked tab + $("#presenceChatTabs").tabs('scrollTo', ui.tab.offsetLeft); + }); + + // bind the show function to do extra stuff + $("#presenceChatTabs").bind('tabsshow', function(event, ui) { + // get the tag + var tag = ui.panel.id; + + // scroll to the bottom of the given message area + var messageArea = $("#" + tagToMessageArea(tag)); + messageArea.attr("scrollTop", messageArea.attr("scrollHeight")); + }); + + + // create roster tab + $("#presenceChatRoster").tabs({ scrollable: false }); + + // correct room name + roomName = correctPresenceRoomName(roomName); + + // attempt to login once the window is loaded + doLogin(presenceUrl, userId, userId, userId, roomName, nickname, false); + } }); <%-- initial html / presence.js adds on html into here --%> -
+
<%-- only pop the message box if im is enabled --%>
@@ -93,6 +118,7 @@
+ <%-- always pop the roster --%>
+ + <%-- div reserved for storing context menus --%>
+
+ + <%-- floating div shown when IE6 is being used --%> +
+ Sorry, Internet Explorer 6 is not compatible with Presence Chat
\ No newline at end of file