]> granicus.if.org Git - transmission/commitdiff
(trunk web) rpc returns true and false for this, no need for 1 and 0. reported by...
authorKevin Glowacz <kevin@glowacz.info>
Wed, 2 Sep 2009 01:03:38 +0000 (01:03 +0000)
committerKevin Glowacz <kevin@glowacz.info>
Wed, 2 Sep 2009 01:03:38 +0000 (01:03 +0000)
web/javascript/transmission.js

index 7627c5afe9914d35befc67a0245feb96af82e0d2..86448a743b8e3e8c4219850166d6bf591fde53b0 100644 (file)
@@ -610,8 +610,8 @@ Transmission.prototype =
                o[RPC._UpSpeedLimit]     = parseInt( $('#prefs_form #upload_rate')[0].value );
                o[RPC._DownSpeedLimit]   = parseInt( $('#prefs_form #download_rate')[0].value );
                o[RPC._DownloadDir]      = $('#prefs_form #download_location')[0].value;
-               o[RPC._UpSpeedLimited]   = $('#prefs_form #limit_upload')[0].checked ? 1 : 0;
-               o[RPC._DownSpeedLimited] = $('#prefs_form #limit_download')[0].checked ? 1 : 0;
+               o[RPC._UpSpeedLimited]   = $('#prefs_form #limit_upload')[0].checked;
+               o[RPC._DownSpeedLimited] = $('#prefs_form #limit_download')[0].checked;
                o[RPC._Encryption]       = $('#prefs_form #encryption')[0].checked
                                               ? RPC._EncryptionRequired
                                               : RPC._EncryptionPreferred;
@@ -774,13 +774,13 @@ Transmission.prototype =
                var down_limited  = prefs[RPC._DownSpeedLimited];
                var up_limit      = prefs[RPC._UpSpeedLimit];
                var up_limited    = prefs[RPC._UpSpeedLimited];
-               
+
                $('div.download_location input')[0].value = prefs[RPC._DownloadDir];
                $('div.port input')[0].value              = prefs[RPC._PeerPort];
                $('div.auto_start input')[0].checked      = prefs[Prefs._AutoStart];
-               $('input#limit_download')[0].checked      = down_limited == 1;
+               $('input#limit_download')[0].checked      = down_limited;
                $('input#download_rate')[0].value         = down_limit;
-               $('input#limit_upload')[0].checked        = up_limited == 1;
+               $('input#limit_upload')[0].checked        = up_limited;
                $('input#upload_rate')[0].value           = up_limit;
                $('input#refresh_rate')[0].value          = prefs[Prefs._RefreshRate];
                $('div.encryption input')[0].checked      = prefs[RPC._Encryption] == RPC._EncryptionRequired;