Changeset 1425 for HelpIM3

Show
Ignore:
Timestamp:
02/27/11 22:02:09 (15 months ago)
Author:
winfried
Message:

- fixing bug showing escaped javascript code in chat queue
- fixing bug with messed up chatqueue

Location:
HelpIM3/branches/chatgroups
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • HelpIM3/branches/chatgroups/HelpIM/chat/db/services.py

    r1387 r1425  
    208208         
    209209        now = datetime.now() 
    210         maxAge = timedelta(seconds=(chatQueueLength)) 
     210        maxAge = timedelta(seconds=chatQueueLength) 
    211211        minimum_lastChatClientActivityTime = now - maxAge 
    212212        chatQueueEntryList = site.getChatQueueEntryList(site, minimum_lastChatClientActivityTime=minimum_lastChatClientActivityTime) 
     
    224224        """ - Toevoegen/Bijwerken van het SessionId.        """ 
    225225        now = datetime.now() 
    226         maxAge = timedelta(seconds=(chatQueueLength)) 
     226        maxAge = timedelta(seconds=chatQueueLength) 
    227227        minimum_lastChatClientActivityTime = now - maxAge 
    228228        chatQueueEntry = site.getChatQueueBySessionId(site=site, sessionId=him_request.sessionId) 
     
    234234            """ if the careseeker has been away too long, he/she has to re-enter the queue s"""  
    235235            if chatQueueEntry.chat_queue_lastChatClientActivityTime < minimum_lastChatClientActivityTime: 
     236                self.log.debug(".getChatQueuePostion updating chatQueueEntry, chat_queue_lastChatClientActivityTime: %s, minimum_lastChatClientActivityTime: %s" % (chatQueueEntry.chat_queue_lastChatClientActivityTime, minimum_lastChatClientActivityTime)) 
    236237                chatQueueEntry.chat_queue_time_entered = datetime.now() 
    237238            chatQueueEntry.chat_queue_lastChatClientActivityTime = datetime.now() 
  • HelpIM3/branches/chatgroups/HelpIM/chat/pages/ShowRequestOnQueue.py

    r937 r1425  
    3636                       <p><a href="javascript:window.location.replace('%(location)s');">Klik hier als de verbinding verbroken lijkt te zijn.</a></p> 
    3737                    """ % {'line': line, 'location': replaceLocation} 
     38        #setTimeout = "<script><!-- setTimeout('window.location.replace(\"%s\")',10000); // --></script>" % replaceLocation 
     39        setTimeout = "<script>setTimeout('window.location.replace(\"%s\")',10000);</script>" % replaceLocation 
     40        html_code += setTimeout 
     41 
    3842        htmlCode = {  'htmlCode': [ html_code ] } 
    39         self.panel_data = {  'panel_data': [  [ htmlCode ] ]  
     43 
     44        onloadScript = {  'onloadScript': [ setTimeout ] } 
     45 
     46        self.panel_data = {  'panel_data': [  [ htmlCode, onloadScript ] ]  
    4047                      } 
    4148         
    4249         
    43         setTimeout = "<script><!-- setTimeout('window.location.replace(\"%s\")',10000); // --></script>" % replaceLocation 
    44         onloadScript = {  'onloadScript': [ setTimeout ] } 
    4550         
    4651         
    47         htmlCode = {  'htmlCode': [ ] } 
     52        # htmlCode = {  'htmlCode': [ ] } 
    4853         
    4954        web_panel = {  'web_panel': [  {  'panelName' : 'Wachtrij' }, 
    50                                          [ htmlCode, onloadScript ] 
     55#                                         [ htmlCode, onloadScript ] 
     56                                         [ htmlCode ] 
    5157                                      ]  
    5258                      } 
  • HelpIM3/branches/chatgroups/config/sites/full.xml

    r1423 r1425  
    2121        cs_subject_id="2" 
    2222        cs_nickname_id="1" 
    23         chatQueueLength="10" 
     23        chatQueueLength="120" 
    2424        maxChats="1"> 
     25  <!-- Note: chatQueueLength is the timeout in seconds before kicking out of the queue!! --> 
     26 
    2527 
    2628