Changeset 4237 for trunk/licqweb

Show
Ignore:
Timestamp:
09/30/05 07:43:06 (3 years ago)
Author:
emostar
Message:

* Add the aim images.
* Show aim icons for aim users.
* Hide the news after we login.

Location:
trunk/licqweb
Files:
3 added
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/licqweb/index.php

    r4234 r4237  
    3939    } 
    4040 
    41         echo "<div class=\"news\"><div class=\"bar\">News</div>".$str."</div>\n"; 
     41        echo "<div id=\"newsid\" class=\"news\"><div class=\"bar\">News</div>".$str."</div>\n"; 
    4242?> 
    4343    </body> 
  • trunk/licqweb/licqweb.js

    r4226 r4237  
    154154    } 
    155155    contacthtml = ""; 
     156        var aimLower = 'abcdefghijklmnopqrstuvwxyz'; 
     157        var aimUpper = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; 
    156158    for (var status in statuss) { 
    157159        j = sortedContacts[status].length; 
     
    159161            var contact = sortedContacts[status][i]; 
    160162            var uclass = contact.status; 
    161             var imgsrc = "images/" + contact.pp.toLowerCase() + "." + contact.status.toLowerCase() + ".png"; 
     163                        var pp = ""; 
     164                        if (contact.pp.toLowerCase() == "licq" && 
     165                            (aimLower.indexOf(contact.id.charAt(0), 0) != -1 || 
     166                             aimUpper.indexOf(contact.id.charAt(0), 0) != -1)){ 
     167  
     168                pp = "aim"; 
     169            } 
     170                        else { 
     171                          pp = contact.pp.toLowerCase(); 
     172            } 
     173                        
     174            var imgsrc = "images/" + pp + "." + contact.status.toLowerCase() + ".png"; 
    162175            if (parseInt(contact.nummsgs) > 0) { 
    163176                uclass = "newmessage"; 
     
    394407    xmlhttp.send(null); 
    395408    document.getElementById('login').style.display = 'none'; 
     409    document.getElementById('newsid').style.display = 'none'; 
    396410    document.getElementById('contactList').style.display = 'block'; 
    397411}