Skip to content

Commit

Permalink
add statistics and speed limit mode to mobile footer
Browse files Browse the repository at this point in the history
  • Loading branch information
endor committed Aug 28, 2014
1 parent 7ea67a6 commit 22e4ac8
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 7 deletions.
Binary file added css/images/speed_mobile.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added css/images/statistics_mobile.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 14 additions & 2 deletions css/mobile.css
Expand Up @@ -173,19 +173,21 @@ footer {
border-right-width: 0;
font-size: 12px;
font-weight: normal;
padding-left: 10px;
padding-right: 2px;
}

#mobile-footer .globalUpAndDownload {
display: inline-block;
width: 50%;
width: 28%;
text-align: right;
vertical-align: middle;
padding: 4px 0 0 0;
}

#mobile-footer .links {
display: inline-block;
width: 48%;
width: 67%;
vertical-align: middle;
margin: 0;
padding: 4px 0 0 0;
Expand Down Expand Up @@ -223,6 +225,16 @@ footer {
background-size: 100%;
}

#mobile-footer .links li .statistics {
background: transparent url(images/statistics_mobile.png) no-repeat 0 0;
background-size: 100%;
}

#mobile-footer .links li .speed_limit_mode {
background: transparent url(images/speed_mobile.png) no-repeat 0 0;
background-size: 100%;
}

#mobile-header {
height: 45px;
width: auto;
Expand Down
4 changes: 3 additions & 1 deletion index.html
Expand Up @@ -91,6 +91,8 @@ <h1>Transmission</h1>
<li><a href="#" class="stop_all">Stop All</a></li>
<li><a href="#/settings" class="settings">Preferences</a></li>
<li><a href="#/torrents/new" class="add_a_torrent">Add a Torrent</a></li>
<li><a href="#/statistics" class="statistics">Statistics</a></li>
<li><a href="#" class="speed_limit_mode">Enable Speed Limit Mode</a></li>
</ul>

<div class="globalUpAndDownload"></div>
Expand All @@ -105,7 +107,7 @@ <h1>Transmission</h1>
<nav id="footer">
<ul class="icon_nav">
<li><a href="#" id="compact_view" title="Compact View">Enable Compact View</a></li>
<li><a href="#" id="speed_limit_mode" title="Speed Limit Mode">Enable Speed Limit Mode</a></li>
<li><a href="#" id="speed_limit_mode" class="speed_limit_mode" title="Speed Limit Mode">Enable Speed Limit Mode</a></li>
<li><a href="#" id="start_all" class="start_all" title="Start All">Start All</a></li>
<li><a href="#" id="stop_all" class="stop_all" title="Stop All">Stop All</a></li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion js/helpers/link_helpers.js
Expand Up @@ -36,7 +36,7 @@ kettu.LinkHelpers = {
},

activateSpeedLimitModeLink: function() {
$('#speed_limit_mode').click(function() {
$('.speed_limit_mode').click(function() {
var form = $('#speed_limit_mode_form'),
link = $(this), title;
form.trigger('submit');
Expand Down
3 changes: 2 additions & 1 deletion js/helpers/mobile_helpers.js
Expand Up @@ -34,7 +34,8 @@
var context = this;
var y = 0;

$('#mobile-footer .links .settings, #mobile-footer .links .add_a_torrent').click(function(event) {
$('#mobile-footer .links .settings, #mobile-footer .links .add_a_torrent, ' +
'#mobile-footer .links .statistics').click(function(event) {
stopEvent(event);
context.redirect($(this).attr('href'));
showBackButton(context, y);
Expand Down
4 changes: 2 additions & 2 deletions js/helpers/torrent_helpers.js
Expand Up @@ -217,10 +217,10 @@

var form = $('#speed_limit_mode_form');
if(speed_limit_mode_enabled) {
$('#speed_limit_mode').addClass('active').text('Disable Speed Limit Mode');
$('.speed_limit_mode').addClass('active').text('Disable Speed Limit Mode');
form.find('input:first').attr('value', 'false');
} else {
$('#speed_limit_mode').removeClass('active').text('Enable Speed Limit Mode');
$('.speed_limit_mode').removeClass('active').text('Enable Speed Limit Mode');
form.find('input:first').attr('value', 'true');
}

Expand Down

0 comments on commit 22e4ac8

Please sign in to comment.