Changeset 3370

Show
Ignore:
Timestamp:
11/09/06 22:27:21 (2 years ago)
Author:
timothy
Message:

Fixes Fiat to resize images to the message width if they are large. The transcript will also scroll to the bottom once the image loads. #810 #252

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Plug-Ins/F-Script Support/F-Script Support.xcodeproj/project.pbxproj

    r3233 r3370  
    157157                        isa = PBXProject; 
    158158                        buildConfigurationList = 1C7F306F0855489300D41FB0 /* Build configuration list for PBXProject "F-Script Support" */; 
     159                        compatibilityVersion = "Xcode 2.4"; 
    159160                        hasScannedForEncodings = 1; 
    160161                        knownRegions = ( 
     
    167168                        mainGroup = 089C166AFE841209C02AAC07 /* FScript Plugin */; 
    168169                        projectDirPath = ""; 
     170                        shouldCheckCompatibility = 1; 
    169171                        targets = ( 
    170172                                8D5B49AC048680CD000E48DA /* F-Script Support Plugin */, 
  • trunk/Resources/Styles/Fiat.colloquyStyle/Contents/Resources/genericTemplate.html

    r3369 r3370  
    11<script type="text/javascript"> 
    2         function resizeImagesIfNeeded() { 
    3                 for( i = 0; i < document.images.length; i++ ) { 
    4                         if( document.images[i].realWidth > ( window.innerWidth - 65 ) ) 
    5                                 document.images[i].width = ( window.innerWidth - 65 ); 
    6                         else document.images[i].width = document.images[i].realWidth; 
    7                 } 
    8         } 
    9  
    10         window.onresize = resizeImagesIfNeeded; 
    11  
    12         function resizeIfNeeded( image ) { 
    13                 image.realWidth = image.width; 
    14                 if( image.width > ( window.innerWidth - 65 ) ) 
    15                         image.width = ( window.innerWidth - 65 ); 
    16 //              scrollToBottomIfNeeded(); 
     2        function scrollToBottom() { 
     3                document.body.scrollTop = document.body.offsetHeight; 
    174        } 
    185</script> 
  • trunk/Resources/Styles/Fiat.colloquyStyle/Contents/Resources/main.css

    r3247 r3370  
    1818        padding-bottom: 5px; 
    1919        margin: auto; 
     20        max-width: 100%; 
    2021} 
    2122 
  • trunk/Resources/Styles/Fiat.colloquyStyle/Contents/Resources/main.xsl

    r3247 r3370  
    187187                <xsl:choose> 
    188188                        <xsl:when test="$extension = '.jpg' or $extension = '.JPG' or $extensionLong = '.jpeg' or $extensionLong = '.JPEG'"> 
    189                                 <a href="{@href}" title="{@href}"><img src="{@href}" alt="Loading Image..." onload="resizeIfNeeded( this )" /></a> 
     189                                <a href="{@href}" title="{@href}"><img src="{@href}" alt="Loading Image..." onload="scrollToBottom()" /></a> 
    190190                        </xsl:when> 
    191191                        <xsl:when test="$extension = '.gif' or $extension = '.GIF'"> 
    192                                 <a href="{@href}" title="{@href}"><img src="{@href}" alt="Loading Image..." onload="resizeIfNeeded( this )" /></a> 
     192                                <a href="{@href}" title="{@href}"><img src="{@href}" alt="Loading Image..." onload="scrollToBottom()" /></a> 
    193193                        </xsl:when> 
    194194                        <xsl:when test="$extension = '.png' or $extension = '.PNG'"> 
    195                                 <a href="{@href}" title="{@href}"><img src="{@href}" alt="Loading Image..." onload="resizeIfNeeded( this )" /></a> 
     195                                <a href="{@href}" title="{@href}"><img src="{@href}" alt="Loading Image..." onload="scrollToBottom()" /></a> 
    196196                        </xsl:when> 
    197197                        <xsl:when test="$extension = '.tif' or $extension = '.TIF' or $extensionLong = '.tiff' or $extensionLong = '.TIFF'"> 
    198                                 <a href="{@href}" title="{@href}"><img src="{@href}" alt="Loading Image..." onload="resizeIfNeeded( this )" /></a> 
     198                                <a href="{@href}" title="{@href}"><img src="{@href}" alt="Loading Image..." onload="scrollToBottom()" /></a> 
    199199                        </xsl:when> 
    200200                        <xsl:when test="$extension = '.pdf' or $extension = '.PDF'"> 
    201                                 <a href="{@href}" title="{@href}"><img src="{@href}" alt="Loading Image..." onload="resizeIfNeeded( this )" /></a> 
     201                                <a href="{@href}" title="{@href}"><img src="{@href}" alt="Loading Image..." onload="scrollToBottom()" /></a> 
    202202                        </xsl:when> 
    203203                        <xsl:when test="$extension = '.bmp' or $extension = '.BMP'"> 
    204                                 <a href="{@href}" title="{@href}"><img src="{@href}" alt="Loading Image..." onload="resizeIfNeeded( this )" /></a> 
     204                                <a href="{@href}" title="{@href}"><img src="{@href}" alt="Loading Image..." onload="scrollToBottom()" /></a> 
    205205                        </xsl:when> 
    206206                        <xsl:otherwise>