Changeset 3454

Show
Ignore:
Timestamp:
12/13/06 02:34:48 (2 years ago)
Author:
timothy
Message:

Fixes a couple of topic bar issues. Long links in the topic no longer cause the horizontal scrollbar to appear. #937 Resizing the window will now cause the topic bar to shrink and grow if the topic was toggled taller than one line. #583

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Resources/base.html

    r3435 r3454  
    44<head> 
    55        <meta http-equiv="content-type" content="text/html; charset=utf-8" /> 
    6         <script type="text/ecmascript" defer="defer" encoding="utf-8" src="roomTopicBanner.js" /
     6        <script type="text/ecmascript" defer="defer" encoding="utf-8" src="roomTopicBanner.js"></script
    77        <style type="text/css"> 
    88        html { 
  • trunk/Resources/roomTopicBanner.html

    r3247 r3454  
    1111                background-repeat: repeat-x; 
    1212                background-position: top; 
     13                border-bottom: 1px solid rgb( 154, 154, 154 ); 
     14                overflow: hidden; 
     15                min-height: 17px; 
    1316                height: 17px; 
     17        } 
     18 
     19        #topicMessage { 
     20                position: absolute; 
     21                top: 0; 
     22                left: 0; 
     23                right: 0; 
     24                min-height: 15px; 
     25                padding: 0 20px 0 8px; 
    1426                font-size: 11px; 
    1527                font-family: Lucida Grande, sans-serif; 
    1628                line-height: 15px; 
    1729                text-align: center; 
    18                 padding: 0 20px 0 8px
     30                color: black !important
    1931                word-wrap: break-word; 
    2032                -khtml-line-break: after-white-space; 
    2133                -khtml-nbsp-mode: space; 
    22                 overflow: hidden; 
    23                 color: black !important; 
    24                 border-bottom: 1px solid rgb( 154, 154, 154 ); 
    2534        } 
    2635 
     
    3645                width: 17px; 
    3746                height: 16px; 
     47                z-index: 10; 
     48                cursor: default; 
    3849        } 
    3950 
     
    4758        </style> 
    4859        <div id="toggleButton" onclick="toggleTopic( event )" style="display: none"></div> 
    49         <span id="topicMessage"></span
     60        <div id="topicMessage"></div
    5061</div> 
    5162</div> 
  • trunk/Resources/roomTopicBanner.js

    r3152 r3454  
    1111        } else { 
    1212                if( ! topicToggled && topicSize < 3 ) { 
    13                         topicAreaSize = document.getElementById( 'topicMessage' ).clientHeight + 4
     13                        topicAreaSize = document.getElementById( 'topicMessage' ).clientHeight + 2
    1414                        if( topicAreaSize > 62 ) topicAreaSize = 62; 
    1515                        else if( topicAreaSize < 17 ) topicAreaSize = 17; 
     
    3131        topicMessage.innerHTML = topic; 
    3232        topicMessage.title = topicMessage.innerText + ' set by ' + author; 
    33         if( topicMessage.clientHeight > 13 ) 
     33        refreshTopicSize(); 
     34
     35 
     36function refreshTopicSize() { 
     37        topicMessage = document.getElementById( 'topicMessage' ); 
     38        if( topicMessage.clientHeight > 17 ) 
    3439                document.getElementById( 'toggleButton' ).style.setProperty( 'display', 'block', null ); 
    35         else if( ! topicSize ) document.getElementById( 'toggleButton' ).style.setProperty( 'display', 'none', null ); 
     40        else document.getElementById( 'toggleButton' ).style.setProperty( 'display', 'none', null ); 
    3641        if( topicToggled ) { 
    37                 topicAreaSize = topicMessage.clientHeight + 4
     42                topicAreaSize = topicMessage.clientHeight + 2
    3843                if( topicAreaSize > 62 ) topicAreaSize = 62; 
    3944                else if( topicAreaSize < 17 ) topicAreaSize = 17; 
     
    4146        } 
    4247} 
     48 
     49window.addEventListener( 'resize', refreshTopicSize );