Changeset 8568


Ignore:
Timestamp:
May 31, 2009, 5:05:22 PM (14 years ago)
Author:
kjg
Message:

(trunk web) move ie specific stylesheet logic into the html to prevent a js race condition

Location:
trunk/web
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/web/index.html

    r8567 r8568  
    1212                <link media="only screen and (max-device-width: 480px)" href="./stylesheets/iphone.css" type= "text/css" rel="stylesheet" />
    1313                <link media="screen and (min-device-width: 481px)" href="./stylesheets/common.css" type="text/css" rel="stylesheet" />
     14                <!--[if IE]><link media="screen" href="./stylesheets/common.css" type="text/css" rel="stylesheet" /><![endif]-->
     15                <!--[if IE 6]><link media="screen" href="./stylesheets/ie6.css" type="text/css" rel="stylesheet" /><![endif]-->
     16                <!--[if IE 7]><link media="screen" href="./stylesheets/ie7.css" type="text/css" rel="stylesheet" /><![endif]-->
    1417                <script type="text/javascript" src="./javascript/jquery/jquery.transmenu.min.js"></script>
    1518                <script type="text/javascript" src="./javascript/jquery/jquery.contextmenu.min.js"></script>
  • trunk/web/javascript/common.js

    r8501 r8568  
    3434
    3535$(document).ready( function() {
    36         // Initialise a torrent controller to handle events
    37        
    3836        // Initialise the dialog controller
    3937        dialog = new Dialog();
     
    4139        // Initialise the main Transmission controller
    4240        transmission = new Transmission();
     41
     42        // IE specific fixes here
     43        if ($.browser.msie) {
     44                try {
     45                  document.execCommand("BackgroundImageCache", false, true);
     46                } catch(err) {}
     47                $('.dialog_container').css('height',$(window).height()+'px');
     48        }
    4349
    4450        if ($.browser.safari) {
  • trunk/web/javascript/transmission.js

    r8546 r8568  
    2121        initialize: function()
    2222        {
    23                 // IE specific fixes here
    24                 if ($.browser.msie) {
    25                         try {
    26                           document.execCommand("BackgroundImageCache", false, true);
    27                         } catch(err) {}
    28                         $('head').append('<link media="screen" href="./stylesheets/common.css" type="text/css" rel="stylesheet" />');
    29                         $('head').append('<link media="screen" href="./stylesheets/ie'+$.browser.version.substr(0,1)+'.css" type="text/css" rel="stylesheet" />');
    30                         $('.dialog_container').css('height',$(window).height()+'px');
    31                 }
    32                
    3323                // Initialize the helper classes
    3424                this.remote = new TransmissionRemote(this);
Note: See TracChangeset for help on using the changeset viewer.