1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-11 15:27:54 +00:00

Merge pull request #3240 from ngosang/webui_interface

[Web UI] Changes in menus, new features and reordered Options.
This commit is contained in:
sledgehammer999 2015-06-20 19:31:06 +03:00
commit a22137e06e
9 changed files with 409 additions and 361 deletions

View File

@ -48,14 +48,21 @@
<li><a id="pauseAllLink"><img class="MyMenuIcon" alt="QBT_TR(P&ause All)QBT_TR" src="theme/media-playback-pause" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(P&ause All)QBT_TR</a></li> <li><a id="pauseAllLink"><img class="MyMenuIcon" alt="QBT_TR(P&ause All)QBT_TR" src="theme/media-playback-pause" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(P&ause All)QBT_TR</a></li>
<li class="divider"><a id="resumeLink"><img class="MyMenuIcon" alt="QBT_TR(&Resume)QBT_TR" src="theme/media-playback-start" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(&Resume)QBT_TR</a></li> <li class="divider"><a id="resumeLink"><img class="MyMenuIcon" alt="QBT_TR(&Resume)QBT_TR" src="theme/media-playback-start" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(&Resume)QBT_TR</a></li>
<li><a id="pauseLink"><img class="MyMenuIcon" src="theme/media-playback-pause" alt="QBT_TR(&Pause)QBT_TR" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(&Pause)QBT_TR</a></li> <li><a id="pauseLink"><img class="MyMenuIcon" src="theme/media-playback-pause" alt="QBT_TR(&Pause)QBT_TR" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(&Pause)QBT_TR</a></li>
<li><a id="recheckLink"><img class="MyMenuIcon" src="theme/document-edit-verify" alt="QBT_TR(Force recheck)QBT_TR" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(Force recheck)QBT_TR</a></li>
<li class="divider"><a id="deleteLink"><img class="MyMenuIcon" src="theme/list-remove" alt="QBT_TR(&Delete)QBT_TR" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(&Delete)QBT_TR</a></li> <li class="divider"><a id="deleteLink"><img class="MyMenuIcon" src="theme/list-remove" alt="QBT_TR(&Delete)QBT_TR" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(&Delete)QBT_TR</a></li>
<span id="queueingLinks">
<li class="divider"><a id="topPrioLink"><img class="MyMenuIcon" src="theme/go-top" alt="QBT_TR(Top Priority)QBT_TR" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(Top Priority)QBT_TR</a></li>
<li><a id="increasePrioLink"><img class="MyMenuIcon" src="theme/go-up" alt="QBT_TR(Increase Priority)QBT_TR" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(Increase Priority)QBT_TR</a></li>
<li><a id="decreasePrioLink"><img class="MyMenuIcon" src="theme/go-down" alt="QBT_TR(Decrease Priority)QBT_TR" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(Decrease Priority)QBT_TR</a></li>
<li><a id="bottomPrioLink"><img class="MyMenuIcon" src="theme/go-bottom" alt="QBT_TR(Minimum Priority)QBT_TR" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(Minimum Priority)QBT_TR</a></li>
</span>
<li class="divider"><a id="recheckLink"><img class="MyMenuIcon" src="theme/document-edit-verify" alt="QBT_TR(Force Recheck)QBT_TR" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(Force Recheck)QBT_TR</a></li>
</ul> </ul>
</li> </li>
<li> <li>
<a class="returnFalse">QBT_TR(&View)QBT_TR</a> <a class="returnFalse">QBT_TR(&View)QBT_TR</a>
<ul> <ul>
<li><a id="speedInBrowserTitleBarLink"><img class="MyMenuIcon" src="theme/checked" alt="QBT_TR(&Speed in title bar)QBT_TR" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(&Speed in title bar)QBT_TR</a></li> <li><a id="showTopToolbarLink"><img class="MyMenuIcon" src="theme/checked" alt="QBT_TR(&Top Toolbar)QBT_TR" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(&Top Toolbar)QBT_TR</a></li>
<li><a id="speedInBrowserTitleBarLink"><img class="MyMenuIcon" src="theme/checked" alt="QBT_TR(S&peed in Title Bar)QBT_TR" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(S&peed in Title Bar)QBT_TR</a></li>
</ul> </ul>
</li> </li>
<li> <li>
@ -67,9 +74,8 @@
<li> <li>
<a class="returnFalse">QBT_TR(&Help)QBT_TR</a> <a class="returnFalse">QBT_TR(&Help)QBT_TR</a>
<ul> <ul>
<li><a id="bugLink" target="_blank" href="http://bugs.qbittorrent.org/"><img class="MyMenuIcon" src="theme/tools-report-bug" alt="QBT_TR(Report a &bug)QBT_TR" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(Report a &bug)QBT_TR</a></li>
<li><a id="siteLink" target="_blank" href="http://www.qbittorrent.org/"><img class="MyMenuIcon" src="images/skin/qbittorrent16.png" alt="QBT_TR(Visit &Website)QBT_TR" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(Visit &Website)QBT_TR</a></li>
<li><a id="docsLink" target="_blank" href="http://wiki.qbittorrent.org/"><img class="MyMenuIcon" src="theme/help-contents" alt="QBT_TR(&Documentation)QBT_TR" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(&Documentation)QBT_TR</a></li> <li><a id="docsLink" target="_blank" href="http://wiki.qbittorrent.org/"><img class="MyMenuIcon" src="theme/help-contents" alt="QBT_TR(&Documentation)QBT_TR" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(&Documentation)QBT_TR</a></li>
<li class="divider"><a id="bugLink" target="_blank" href="http://sourceforge.net/donate/index.php?group_id=163414"><img class="MyMenuIcon" src="theme/wallet-open" alt="QBT_TR(Do&nate!)QBT_TR" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(Do&nate!)QBT_TR</a></li>
<li><a id="aboutLink"><img class="MyMenuIcon" src="theme/help-about" alt="QBT_TR(&About)QBT_TR" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(&About)QBT_TR</a></li> <li><a id="aboutLink"><img class="MyMenuIcon" src="theme/help-about" alt="QBT_TR(&About)QBT_TR" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(&About)QBT_TR</a></li>
</ul> </ul>
</li> </li>
@ -77,8 +83,8 @@
</div> </div>
<div id="mochaToolbar"> <div id="mochaToolbar">
&nbsp;&nbsp; &nbsp;&nbsp;
<a id="uploadButton"><img class="mochaToolButton" title="QBT_TR(&Add Torrent File...)QBT_TR" src="theme/list-add" alt="QBT_TR(&Add Torrent File...)QBT_TR" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="downloadButton"><img class="mochaToolButton" title="QBT_TR(Add Torrent &Link...)QBT_TR" src="theme/insert-link" alt="QBT_TR(Add Torrent &Link...)QBT_TR" width="24" height="24" onload="fixPNG(this)"/></a> <a id="downloadButton"><img class="mochaToolButton" title="QBT_TR(Add Torrent &Link...)QBT_TR" src="theme/insert-link" alt="QBT_TR(Add Torrent &Link...)QBT_TR" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="uploadButton"><img class="mochaToolButton" title="QBT_TR(&Add Torrent File...)QBT_TR" src="theme/list-add" alt="QBT_TR(&Add Torrent File...)QBT_TR" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="deleteButton" class="divider"><img class="mochaToolButton" title="QBT_TR(Delete)QBT_TR" src="theme/list-remove" alt="QBT_TR(Delete)QBT_TR" width="24" height="24" onload="fixPNG(this)"/></a> <a id="deleteButton" class="divider"><img class="mochaToolButton" title="QBT_TR(Delete)QBT_TR" src="theme/list-remove" alt="QBT_TR(Delete)QBT_TR" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="resumeButton" class="divider"><img class="mochaToolButton" title="QBT_TR(Resume)QBT_TR" src="theme/media-playback-start" alt="QBT_TR(Resume)QBT_TR" width="24" height="24" onload="fixPNG(this)"/></a> <a id="resumeButton" class="divider"><img class="mochaToolButton" title="QBT_TR(Resume)QBT_TR" src="theme/media-playback-start" alt="QBT_TR(Resume)QBT_TR" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="pauseButton"><img class="mochaToolButton" title="QBT_TR(Pause)QBT_TR" src="theme/media-playback-pause" alt="QBT_TR(Pause)QBT_TR" width="24" height="24" onload="fixPNG(this)"/></a> <a id="pauseButton"><img class="mochaToolButton" title="QBT_TR(Pause)QBT_TR" src="theme/media-playback-pause" alt="QBT_TR(Pause)QBT_TR" width="24" height="24" onload="fixPNG(this)"/></a>

View File

@ -1,7 +1,10 @@
<img src="images/skin/mascot.png" align="right"></img> <img src="images/skin/mascot.png" align="right"></img>
<p>qBittorrent ${VERSION} QBT_TR(Web UI)QBT_TR</p> <h3>qBittorrent ${VERSION} QBT_TR(Web UI)QBT_TR</h3>
<p>QBT_TR(An advanced BitTorrent client programmed in C++, based on Qt toolkit and libtorrent-rasterbar.)QBT_TR</p>
<p>Copyright (c) 2011-2015 The qBittorrent project</p> <p>Copyright (c) 2011-2015 The qBittorrent project</p>
<p>QBT_TR(Home Page: )QBT_TR <a href="http://www.qbittorrent.org">http://www.qbittorrent.org</a></p> <p>QBT_TR(Home Page: )QBT_TR <a href="http://www.qbittorrent.org">http://www.qbittorrent.org</a></p>
<p>QBT_TR(Bug Tracker: )QBT_TR <a href="http://bugs.qbittorrent.org">http://bugs.qbittorrent.org</a></p>
<p>QBT_TR(Forum: )QBT_TR <a href="http://forum.qbittorrent.org">http://forum.qbittorrent.org</a></p>
<p>QBT_TR(IRC: #qbittorrent on Freenode)QBT_TR</p>
<h3>QBT_TR(Original authors)QBT_TR</h3> <h3>QBT_TR(Original authors)QBT_TR</h3>
<a href="mailto:ishanarora@gmail.com">Ishan Arora</a>, <a href="mailto:ank.iitd@gmail.com">Ankit Gupta</a>, <a href="mailto:shikhar.ap@gmail.com">Chandan Shikhar Dua</a> and <a href="mailto:swapnil.iitd@gmail.com">Swapnil Kumar</a>. <a href="mailto:ishanarora@gmail.com">Ishan Arora</a>, <a href="mailto:ank.iitd@gmail.com">Ankit Gupta</a>, <a href="mailto:shikhar.ap@gmail.com">Chandan Shikhar Dua</a> and <a href="mailto:swapnil.iitd@gmail.com">Swapnil Kumar</a>.

View File

@ -108,7 +108,6 @@ body {
/* Fixes by Chris */ /* Fixes by Chris */
/*background-color: #ccc;*/ /*background-color: #ccc;*/
height: 20px; height: 20px;
margin-bottom: 5px;
border-bottom: 1px solid #3f3f3f; border-bottom: 1px solid #3f3f3f;
} }

View File

@ -8,184 +8,185 @@ a img,:link img,:visited img { border: none; }
/* Structure */ /* Structure */
body { body {
margin: 0; margin: 0;
text-align: left; text-align: left;
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;
font-size: 12px; font-size: 12px;
line-height: 18px; line-height: 18px;
color: #555; color: #555;
} }
.aside { .aside {
width: 300px; width: 300px;
} }
.invisible { .invisible {
display: none; display: none;
} }
/* Typography */ /* Typography */
h2, h3, h4 { h2, h3, h4 {
margin: 0; margin: 0;
padding: 0 0 5px 0; padding: 0 0 5px 0;
font-size: 12px; font-size: 12px;
font-weight: bold; font-weight: bold;
color: #333; color: #333;
} }
h2 { h2 {
font-size: 14px; font-size: 14px;
color: #555; color: #555;
font-weight: bold; font-weight: bold;
} }
#mochaPage h3 { #mochaPage h3 {
display: block; display: block;
font-size: 12px; font-size: 12px;
padding: 6px 0 6px 0; padding: 6px 0 6px 0;
margin: 0 0 8px 0; margin: 0 0 8px 0;
border-bottom: 1px solid #bbb; border-bottom: 1px solid #bbb;
} }
#error_div { #error_div {
color: #f00; color: #f00;
font-weight: bold; font-weight: bold;
} }
h4 { h4 {
font-size: 11px; font-size: 11px;
} }
a { a {
color: #e60; color: #e60;
text-decoration: none; text-decoration: none;
cursor: pointer; cursor: pointer;
} }
a:hover { a:hover {
text-decoration: none; text-decoration: none;
} }
p { p {
margin: 0; margin: 0;
padding: 0 0 9px 0; padding: 0 0 9px 0;
} }
/* List Elements */ /* List Elements */
ul { ul {
list-style: outside; list-style: outside;
margin: 0 0 9px 16px; margin: 0 0 9px 16px;
} }
dt { dt {
font-weight: bold; font-weight: bold;
} }
dd { dd {
padding: 0 0 9px 0; padding: 0 0 9px 0;
} }
/* Code */ /* Code */
pre { pre {
background-color: #f6f6f6; background-color: #f6f6f6;
color: #006600; color: #006600;
display: block; display: block;
font-family: 'Courier New', Courier, monospace; font-family: 'Courier New', Courier, monospace;
font-size: 11px; font-size: 11px;
max-height: 250px; max-height: 250px;
overflow: auto; overflow: auto;
margin: 0 0 10px 0; margin: 0 0 10px 0;
padding: 10px; padding: 10px;
border: 1px solid #d1d7dc; border: 1px solid #d1d7dc;
} }
/* Dividers */ /* Dividers */
hr { hr {
background-color: #ddd; background-color: #ddd;
color: #ccc; color: #ccc;
height: 1px; height: 1px;
border: 0px; border: 0px;
} }
.vcenter { .vcenter {
vertical-align: middle; vertical-align: middle;
} }
#urls { #urls {
width:90%; width:90%;
height:100%; height:100%;
} }
#trackersUrls { #trackersUrls {
width:90%; width:90%;
height:100%; height:100%;
} }
#Filters ul { #Filters ul {
list-style-type: none; list-style-type: none;
} }
#Filters ul li { #Filters ul li {
margin-left: -16px; margin-left: -16px;
} }
#Filters ul img { #Filters ul img {
padding: 2px 4px; padding: 2px 4px;
vertical-align: middle; vertical-align: middle;
width: 16px; width: 16px;
height: 16px; height: 16px;
} }
.selectedFilter { .selectedFilter {
background-color: #354158; background-color: #354158;
color: #000; color: #000;
} }
#properties { #properties {
background-color: #e5e5e5; background-color: #e5e5e5;
} }
a.propButton { a.propButton {
border: 1px solid rgb(85, 81, 91); border: 1px solid rgb(85, 81, 91);
/*border-radius: 3px;*/ /*border-radius: 3px;*/
padding: 2px; padding: 2px;
margin-left: 3px; margin-left: 3px;
margin-right: 3px; margin-right: 3px;
} }
a.propButton img { a.propButton img {
margin-bottom: -4px; margin-bottom: -4px;
} }
/* context menu specific */ /* context menu specific */
#contextmenu { border:1px solid #999; padding:0; background:#eee; list-style-type:none; display:none;}
#contextmenu .separator { border-top:1px solid #999; } #contextmenu { border:1px solid #999; padding:0; background:#eee; list-style-type:none; display:none;}
#contextmenu li { margin:0; padding:0;} #contextmenu .separator { border-top:1px solid #999; }
#contextmenu li { margin:0; padding:0;}
#contextmenu li a { display:block; padding:5px 10px 5px 5px; font-size:12px; text-decoration:none; font-family:tahoma,arial,sans-serif; color:#000; } #contextmenu li a { display:block; padding:5px 10px 5px 5px; font-size:12px; text-decoration:none; font-family:tahoma,arial,sans-serif; color:#000; }
#contextmenu li a:hover { background-color:#ddd; } #contextmenu li a:hover { background-color:#ddd; }
#contextmenu li a.disabled { color:#ccc; font-style:italic; } #contextmenu li a.disabled { color:#ccc; font-style:italic; }
#contextmenu li a.disabled:hover { background-color:#eee; } #contextmenu li a.disabled:hover { background-color:#eee; }
#contextmenu li ul { #contextmenu li ul {
padding: 0; padding: 0;
border:1px solid #999; padding:0; background:#eee; border:1px solid #999; padding:0; background:#eee;
list-style-type:none; list-style-type:none;
position: absolute; position: absolute;
left: -999em; left: -999em;
z-index: 8000; z-index: 8000;
margin: -29px 0 0 100%; margin: -29px 0 0 100%;
width: 164px; width: 164px;
} }
#contextmenu li ul li a { #contextmenu li ul li a {
position: relative; position: relative;
} }
#contextmenu li a.arrow-right, #contextmenu li a:hover.arrow-right { #contextmenu li a.arrow-right, #contextmenu li a:hover.arrow-right {
background-image: url(../images/skin/arrow-right.gif); background-image: url(../images/skin/arrow-right.gif);
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: right center; background-position: right center;
} }
#contextmenu li:hover ul, #contextmenu li:hover ul,
#contextmenu li.ieHover ul, #contextmenu li.ieHover ul,
@ -193,196 +194,207 @@ a.propButton img {
#contextmenu li li li.ieHover ul, #contextmenu li li li.ieHover ul,
#contextmenu li li:hover ul, #contextmenu li li:hover ul,
#contextmenu li li li:hover ul { /* lists nested under hovered list items */ #contextmenu li li li:hover ul { /* lists nested under hovered list items */
left: auto; left: auto;
} }
#contextmenu li img { #contextmenu li img {
width: 16px; width: 16px;
height: 16px; height: 16px;
margin-bottom: -4px; margin-bottom: -4px;
-ms-interpolation-mode : bicubic; -ms-interpolation-mode : bicubic;
} }
/* Sliders */ /* Sliders */
.slider { .slider {
clear: both; clear: both;
position: relative; position: relative;
font-size: 12px; font-size: 12px;
font-weight: bold; font-weight: bold;
width: 400px; width: 400px;
margin-bottom: 15px; margin-bottom: 15px;
} }
.sliderWrapper { .sliderWrapper {
position: relative; position: relative;
font-size: 1px; font-size: 1px;
line-height: 1px; line-height: 1px;
height: 9px; height: 9px;
width: 422px; width: 422px;
} }
.sliderarea { .sliderarea {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
height: 7px; height: 7px;
width: 420px; width: 420px;
font-size: 1px; font-size: 1px;
line-height: 1px; line-height: 1px;
background: #f2f2f2 url(../images/skin/slider-area.gif) repeat-x; background: #f2f2f2 url(../images/skin/slider-area.gif) repeat-x;
border: 1px solid #a3a3a3; border: 1px solid #a3a3a3;
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
border-left: 1px solid #ccc; border-left: 1px solid #ccc;
margin: 0; margin: 0;
padding: 0; padding: 0;
overflow: hidden; overflow: hidden;
} }
.sliderknob { .sliderknob {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
height: 9px; height: 9px;
width: 19px; width: 19px;
font-size: 1px; font-size: 1px;
line-height: 1px; line-height: 1px;
background: url(../images/skin/knob.gif) no-repeat; background: url(../images/skin/knob.gif) no-repeat;
cursor: pointer; cursor: pointer;
overflow: hidden; overflow: hidden;
z-index: 2; z-index: 2;
} }
.update { .update {
padding-bottom: 5px; padding-bottom: 5px;
} }
.mochaToolButton { .mochaToolButton {
margin-right: 10px; margin-right: 10px;
} }
/* Mocha Customization */ /* Mocha Customization */
#mochaToolbar {
margin-top: 5px;
}
#mochaToolbar .divider { #mochaToolbar .divider {
background-image: url(../images/skin/toolbox-divider.gif); background-image: url(../images/skin/toolbox-divider.gif);
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: left center; background-position: left center;
padding-left: 14px; padding-left: 14px;
padding-top: 15px; padding-top: 15px;
} }
.MyMenuIcon { .MyMenuIcon {
margin-left: -18px; margin-left: -18px;
margin-bottom: -3px; margin-bottom: -3px;
padding-right: 5px; padding-right: 5px;
} }
/* Tri-state checkbox */ /* Tri-state checkbox */
label.tristate { label.tristate {
background: url(../images/3-state-checkbox.gif) 0 0 no-repeat; background: url(../images/3-state-checkbox.gif) 0 0 no-repeat;
display: block; display: block;
float: left; float: left;
height: 13px; height: 13px;
margin: .15em 8px 5px 0px; margin: .15em 8px 5px 0px;
overflow: hidden; overflow: hidden;
text-indent: -999em; text-indent: -999em;
width: 13px; width: 13px;
}
label.checked {
background-position: 0 -13px;
}
label.partial {
background-position: 0 -26px;
} }
label.checked { background-position: 0 -13px; }
label.partial { background-position: 0 -26px; }
fieldset.settings { fieldset.settings {
border: solid 1px black; border: solid 1px black;
border-radius: 8px; border-radius: 8px;
-webkit-border-radius: 8px; -webkit-border-radius: 8px;
-moz-border-radius: 8px; -moz-border-radius: 8px;
padding: 4px 4px 4px 10px; padding: 4px 4px 4px 10px;
} }
fieldset.settings legend { fieldset.settings legend {
margin-left: 8px; margin-left: 8px;
padding: 4px; padding: 4px;
font-weight: bold; font-weight: bold;
} }
fieldset.settings label { fieldset.settings label {
padding: 2px; padding: 2px;
} }
fieldset.settings .leftLabelSmall { fieldset.settings .leftLabelSmall {
width: 5em; width: 5em;
float: left; float: left;
text-align: right; text-align: right;
margin-right: 0.5em; margin-right: 0.5em;
display: block; display: block;
} }
fieldset.settings .leftLabelLarge { fieldset.settings .leftLabelLarge {
width: 14em; width: 14em;
float: left; float: left;
text-align: right; text-align: right;
margin-right: 0.5em; margin-right: 0.5em;
display: block; display: block;
} }
div.formRow { div.formRow {
clear: left; clear: left;
display: block; display: block;
} }
ul.filterList { ul.filterList {
margin: 0 0 0 16px; margin: 0 0 0 16px;
padding-left: 0; padding-left: 0;
} }
ul.filterList a { ul.filterList a {
display: block; display: block;
} }
ul.filterList li:hover { ul.filterList li:hover {
background-color: #e60; background-color: #e60;
} }
ul.filterList li:hover a { ul.filterList li:hover a {
color: white; color: white;
} }
#filesTable { #filesTable {
line-height: 20px; line-height: 20px;
} }
#trackersTable { #trackersTable {
line-height: 25px; line-height: 25px;
} }
#addTrackersPlus { #addTrackersPlus {
width: 16px; width: 16px;
cursor: pointer; cursor: pointer;
margin-bottom: -3px; margin-bottom: -3px;
} }
.torrentTable th { .torrentTable th {
padding: 5px 10px; padding: 5px 10px;
} }
.torrentTable td { .torrentTable td {
padding: 0px 3px; padding: 0px 3px;
} }
.torrentTable thead tr { .torrentTable thead tr {
background-color: #eee; background-color: #eee;
} }
#prop_general { #prop_general {
padding: 2px; padding: 2px;
} }
#watched_folders_tab { #watched_folders_tab {
border-collapse: collapse; border-collapse: collapse;
} }
#watched_folders_tab td, #watched_folders_tab th { #watched_folders_tab td, #watched_folders_tab th {
padding: 2px 4px; padding: 2px 4px;
border: 1px solid black; border: 1px solid black;
} }
/* /*
@ -390,14 +402,14 @@ ul.filterList li:hover a {
* disappearing when zooming in the browser. * disappearing when zooming in the browser.
*/ */
#filtersColumn_handle { #filtersColumn_handle {
margin-left: -1px; margin-left: -1px;
} }
#error_div { #error_div {
float: left; float: left;
font-size: 14px; font-size: 14px;
} }
.combo_priority { .combo_priority {
font-size: 1em; font-size: 1em;
} }

View File

@ -13,11 +13,10 @@
<!-- preferences --> <!-- preferences -->
<div class="toolbarTabs"> <div class="toolbarTabs">
<ul id="preferencesTabs" class="tab-menu"> <ul id="preferencesTabs" class="tab-menu">
<li id="PrefConnectionLink" class="selected"><a>QBT_TR(Connection)QBT_TR</a></li> <li id="PrefDownloadsLink" class="selected"><a>QBT_TR(Downloads)QBT_TR</a></li>
<li id="PrefConnectionLink"><a>QBT_TR(Connection)QBT_TR</a></li>
<li id="PrefSpeedLink"><a>QBT_TR(Speed)QBT_TR</a></li>
<li id="PrefBittorrentLink"><a>QBT_TR(BitTorrent)QBT_TR</a></li> <li id="PrefBittorrentLink"><a>QBT_TR(BitTorrent)QBT_TR</a></li>
<li id="PrefDownloadsLink"><a>QBT_TR(Downloads)QBT_TR</a></li>
<li id="PrefProxyLink"><a>QBT_TR(Proxy Server)QBT_TR</a></li>
<li id="PrefFilterLink"><a>QBT_TR(IP Filtering)QBT_TR</a></li>
<li id="PrefWebUILink"><a>QBT_TR(Web UI)QBT_TR</a></li> <li id="PrefWebUILink"><a>QBT_TR(Web UI)QBT_TR</a></li>
</ul> </ul>
<div class="clear"></div> <div class="clear"></div>
@ -27,25 +26,21 @@
// Tabs // Tabs
MochaUI.initializeTabs('preferencesTabs'); MochaUI.initializeTabs('preferencesTabs');
$('PrefConnectionLink').addEvent('click', function(e){
$$('.PrefTab').addClass('invisible');
$('ConnectionTab').removeClass('invisible');
});
$('PrefBittorrentLink').addEvent('click', function(e) {
$$('.PrefTab').addClass('invisible');
$('BittorrentTab').removeClass('invisible');
});
$('PrefDownloadsLink').addEvent('click', function(e) { $('PrefDownloadsLink').addEvent('click', function(e) {
$$('.PrefTab').addClass('invisible'); $$('.PrefTab').addClass('invisible');
$('DownloadsTab').removeClass('invisible'); $('DownloadsTab').removeClass('invisible');
}); });
$('PrefProxyLink').addEvent('click', function(e) { $('PrefConnectionLink').addEvent('click', function(e){
$$('.PrefTab').addClass('invisible'); $$('.PrefTab').addClass('invisible');
$('ProxyTab').removeClass('invisible'); $('ConnectionTab').removeClass('invisible');
}); });
$('PrefFilterLink').addEvent('click', function(e) { $('PrefSpeedLink').addEvent('click', function(e) {
$$('.PrefTab').addClass('invisible'); $$('.PrefTab').addClass('invisible');
$('FilterTab').removeClass('invisible'); $('SpeedTab').removeClass('invisible');
});
$('PrefBittorrentLink').addEvent('click', function(e) {
$$('.PrefTab').addClass('invisible');
$('BittorrentTab').removeClass('invisible');
}); });
$('PrefWebUILink').addEvent('click', function(e) { $('PrefWebUILink').addEvent('click', function(e) {
$$('.PrefTab').addClass('invisible'); $$('.PrefTab').addClass('invisible');

View File

@ -1,137 +1,4 @@
<div id="ConnectionTab" class="PrefTab"> <div id="DownloadsTab" class="PrefTab">
<fieldset class="settings">
<legend>QBT_TR(Listening Port)QBT_TR</legend>
<label for="port_value">QBT_TR(Port used for incoming connections:)QBT_TR</label>
<input type="text" id="port_value" style="width: 4em;"/><br/>
<input type="checkbox" id="upnp_checkbox"/>
<label for="upnp_checkbox">QBT_TR(Use UPnP / NAT-PMP port forwarding from my router)QBT_TR</label>
</fieldset>
<fieldset class="settings">
<legend>QBT_TR(Connections Limits)QBT_TR</legend>
<table>
<tr>
<td>
<input type="checkbox" id="max_connec_checkbox" onClick="updateMaxConnecEnabled();"/>
<label for="max_connec_checkbox">QBT_TR(Global maximum number of connections:)QBT_TR</label>
</td>
<td><input type="text" id="max_connec_value" style="width: 4em;"/></td>
</tr>
<tr>
<td>
<input type="checkbox" id="max_connec_per_torrent_checkbox" onClick="updateMaxConnecPerTorrentEnabled();"/>
<label for="max_connec_per_torrent_checkbox">QBT_TR(Maximum number of connections per torrent:)QBT_TR</label>
</td>
<td><input type="text" id="max_connec_per_torrent_value" style="width: 4em;"/></td>
</tr>
<tr>
<td>
<input type="checkbox" id="max_uploads_checkbox" onClick="updateMaxUploadsEnabled();"/>
<label for="max_uploads_checkbox">QBT_TR(Global maximum number of upload slots:)QBT_TR</label>
</td>
<td><input type="text" id="max_uploads_value" style="width: 4em;"/></td>
</tr>
<tr>
<td>
<input type="checkbox" id="max_uploads_per_torrent_checkbox" onClick="updateMaxUploadsPerTorrentEnabled();"/>
<label for="max_uploads_per_torrent_checkbox">QBT_TR(Maximum number of upload slots per torrent:)QBT_TR</label>
</td>
<td><input type="text" id="max_uploads_per_torrent_value" style="width: 4em;"/></td>
</tr>
</table>
</fieldset>
<fieldset class="settings">
<legend>QBT_TR(Global Rate Limits)QBT_TR</legend>
<table>
<tr>
<td>
<input type="checkbox" id="up_limit_checkbox" onClick="updateUpLimitEnabled();"/>
<label for ="up_limit_checkbox">QBT_TR(Upload:)QBT_TR</label>
</td>
<td><input type="text" id="up_limit_value" style="width: 4em;"/>&nbsp;&nbsp;QBT_TR(KiB/s)QBT_TR</td>
</tr>
<tr>
<td>
<input type="checkbox" id="dl_limit_checkbox" onClick="updateDlLimitEnabled();"/>
<label for="dl_limit_checkbox">QBT_TR(Download:)QBT_TR</label>
</td>
<td><input type="text" id="dl_limit_value" style="width: 4em;"/>&nbsp;&nbsp;QBT_TR(KiB/s)QBT_TR</td>
</tr>
</table>
<fieldset class="settings">
<legend>QBT_TR(Options)QBT_TR</legend>
<input type="checkbox" id="enable_utp_checkbox"/>
<label for="enable_utp_checkbox">QBT_TR(Enable bandwidth management (uTP))QBT_TR</label><br/>
<input type="checkbox" id="limit_utp_rate_checkbox"/>
<label for="limit_utp_rate_checkbox">QBT_TR(Apply rate limit to uTP connections)QBT_TR</label><br/>
<input type="checkbox" id="limit_tcp_overhead_checkbox"/>
<label for="limit_tcp_overhead_checkbox">QBT_TR(Apply rate limit to transport overhead)QBT_TR</label><br/>
</fieldset>
</fieldset>
<fieldset class="settings">
<legend>QBT_TR(Alternative Global Rate Limits)QBT_TR</legend>
<table>
<tr>
<td>
QBT_TR(Upload:)QBT_TR
</td>
<td><input type="text" id="alt_up_limit_value" style="width: 4em;"/>&nbsp;&nbsp;QBT_TR(KiB/s)QBT_TR</td>
</tr>
<tr>
<td>
QBT_TR(Download:)QBT_TR
</td>
<td><input type="text" id="alt_dl_limit_value" style="width: 4em;"/>&nbsp;&nbsp;QBT_TR(KiB/s)QBT_TR</td>
</tr>
</table>
<fieldset class="settings">
<legend><input type="checkbox" id="limit_sheduling_checkbox" onClick="updateSchedulingEnabled();"/>
<label for="limit_sheduling_checkbox">QBT_TR(Schedule the use of alternative rate limits)QBT_TR</label></legend>
QBT_TR(from)QBT_TR
<input type="text" id="schedule_from_hour" style="width: 1.5em;"/>:<input type="text" id="schedule_from_min" style="width: 1.5em;"/>
QBT_TR(to)QBT_TR
<input type="text" id="schedule_to_hour" style="width: 1.5em;"/>:<input type="text" id="schedule_to_min" style="width: 1.5em;"/>
<br/>
QBT_TR(When:)QBT_TR
<select id="schedule_freq_select">
<option value="0">QBT_TR(Every day)QBT_TR</option>
<option value="1">QBT_TR(Week days)QBT_TR</option>
<option value="2">QBT_TR(Week ends)QBT_TR</option>
<option value="3">QBT_TR(Monday)QBT_TR</option>
<option value="4">QBT_TR(Tuesday)QBT_TR</option>
<option value="5">QBT_TR(Wednesday)QBT_TR</option>
<option value="6">QBT_TR(Thursday)QBT_TR</option>
<option value="7">QBT_TR(Friday)QBT_TR</option>
<option value="8">QBT_TR(Saturday)QBT_TR</option>
<option value="9">QBT_TR(Sunday)QBT_TR</option>
</select>
</br/>
</fieldset>
</fieldset>
</div>
<div id="BittorrentTab" class="PrefTab invisible">
<fieldset class="settings">
<legend>QBT_TR(Privacy)QBT_TR</legend>
<input type="checkbox" id="dht_checkbox"/>
<label for="dht_checkbox">QBT_TR(Enable DHT (decentralized network) to find more peers)QBT_TR</label><br/>
<input type="checkbox" id="pex_checkbox"/>
<label for="pex_checkbox">QBT_TR(Enable Peer Exchange (PeX) to find more peers)QBT_TR</label><br/>
<input type="checkbox" id="lsd_checkbox"/>
<label for="lsd_checkbox">QBT_TR(Enable Local Peer Discovery to find more peers)QBT_TR</label><br/>
<label for="encryption_select">QBT_TR(Encryption mode:)QBT_TR</label>
<select id="encryption_select">
<option value="0">QBT_TR(Prefer encryption)QBT_TR</option>
<option value="1">QBT_TR(Require encryption)QBT_TR</option>
<option value="2">QBT_TR(Disable encryption)QBT_TR</option>
</select><br/>
<input type="checkbox" id="anonymous_mode_checkbox" onClick="toggleAnonymousMode()"/>
<label for="anonymous_mode_checkbox">QBT_TR(Enable anonymous mode)QBT_TR (<a href="https://github.com/qbittorrent/qBittorrent/wiki/Anonymous-Mode">More information</a>)</label><br/>
</fieldset>
</div>
<div id="DownloadsTab" class="PrefTab invisible">
<fieldset class="settings"> <fieldset class="settings">
<legend>QBT_TR(Hard Disk)QBT_TR</legend> <legend>QBT_TR(Hard Disk)QBT_TR</legend>
<div class="formRow"> <div class="formRow">
@ -196,41 +63,51 @@
<li>%n: QBT_TR(Torrent name)QBT_TR</li> <li>%n: QBT_TR(Torrent name)QBT_TR</li>
</ul></i> </ul></i>
</fieldset> </fieldset>
<fieldset class="settings">
<legend>QBT_TR(Torrent Queueing)QBT_TR</legend>
<input type="checkbox" id="queueing_checkbox" onclick="updateQueueingSystem();"/>
<label for="queueing_checkbox">QBT_TR(Torrent Queueing)QBT_TR</label><br/>
<div class="formRow">
<label for="max_active_dl_value" style="margin-left: 20px;" class="leftLabelLarge">QBT_TR(Maximum active downloads:)QBT_TR</label>
<input type="text" id="max_active_dl_value" style="width: 4em;"/>
</div>
<div class="formRow">
<label for="max_active_up_value" style="margin-left: 20px;" class="leftLabelLarge">QBT_TR(Maximum active uploads:)QBT_TR</label>
<input type="text" id="max_active_up_value" style="width: 4em;"/>
</div>
<div class="formRow">
<label for="max_active_to_value" style="margin-left: 20px;" class="leftLabelLarge">QBT_TR(Maximum active torrents:)QBT_TR</label>
<input type="text" id="max_active_to_value" style="width: 4em;"/>
</div>
<div class="formRow">
<input type="checkbox" id="dont_count_slow_torrents_checkbox"/>
<label for="dont_count_slow_torrents_checkbox">QBT_TR(Do not count slow torrents in these limits)QBT_TR</label>
</div>
</fieldset>
</div> </div>
<div id="FilterTab" class="PrefTab invisible"> <div id="ConnectionTab" class="PrefTab invisible">
<fieldset class="settings"> <fieldset class="settings">
<legend>QBT_TR(IP Filtering)QBT_TR</legend> <legend>QBT_TR(Listening Port)QBT_TR</legend>
<input type="checkbox" id="ipfilter_enabled_checkbox" onclick="updateFilterSettings();"/> <label for="port_value">QBT_TR(Port used for incoming connections:)QBT_TR</label>
<label for="ipfilter_enabled_checkbox">QBT_TR(IP Filtering)QBT_TR</label><br/> <input type="text" id="port_value" style="width: 4em;"/><br/>
<label for="ipfilter_text" style="margin-left: 20px;">QBT_TR(Filter path (.dat, .p2p, .p2b):)QBT_TR</label> <input type="checkbox" id="upnp_checkbox"/>
<input type="text" id="ipfilter_text"/> <label for="upnp_checkbox">QBT_TR(Use UPnP / NAT-PMP port forwarding from my router)QBT_TR</label>
</fieldset>
<fieldset class="settings">
<legend>QBT_TR(Connections Limits)QBT_TR</legend>
<table>
<tr>
<td>
<input type="checkbox" id="max_connec_checkbox" onClick="updateMaxConnecEnabled();"/>
<label for="max_connec_checkbox">QBT_TR(Global maximum number of connections:)QBT_TR</label>
</td>
<td><input type="text" id="max_connec_value" style="width: 4em;"/></td>
</tr>
<tr>
<td>
<input type="checkbox" id="max_connec_per_torrent_checkbox" onClick="updateMaxConnecPerTorrentEnabled();"/>
<label for="max_connec_per_torrent_checkbox">QBT_TR(Maximum number of connections per torrent:)QBT_TR</label>
</td>
<td><input type="text" id="max_connec_per_torrent_value" style="width: 4em;"/></td>
</tr>
<tr>
<td>
<input type="checkbox" id="max_uploads_checkbox" onClick="updateMaxUploadsEnabled();"/>
<label for="max_uploads_checkbox">QBT_TR(Global maximum number of upload slots:)QBT_TR</label>
</td>
<td><input type="text" id="max_uploads_value" style="width: 4em;"/></td>
</tr>
<tr>
<td>
<input type="checkbox" id="max_uploads_per_torrent_checkbox" onClick="updateMaxUploadsPerTorrentEnabled();"/>
<label for="max_uploads_per_torrent_checkbox">QBT_TR(Maximum number of upload slots per torrent:)QBT_TR</label>
</td>
<td><input type="text" id="max_uploads_per_torrent_value" style="width: 4em;"/></td>
</tr>
</table>
</fieldset> </fieldset>
</div>
<div id="ProxyTab" class="PrefTab invisible">
<fieldset class="settings"> <fieldset class="settings">
<legend>QBT_TR(Proxy Server)QBT_TR</legend> <legend>QBT_TR(Proxy Server)QBT_TR</legend>
<div class="formRow"> <div class="formRow">
@ -256,7 +133,6 @@
</div> </div>
<input type="checkbox" id="peer_proxy_auth_checkbox" onclick="updatePeerProxyAuthSettings();"/> <input type="checkbox" id="peer_proxy_auth_checkbox" onclick="updatePeerProxyAuthSettings();"/>
<label for="peer_proxy_auth_checkbox">QBT_TR(Authentication)QBT_TR</label><br/> <label for="peer_proxy_auth_checkbox">QBT_TR(Authentication)QBT_TR</label><br/>
<div class="formRow"> <div class="formRow">
<label for="peer_proxy_username_text" class="leftLabelLarge">QBT_TR(Username:)QBT_TR</label> <label for="peer_proxy_username_text" class="leftLabelLarge">QBT_TR(Username:)QBT_TR</label>
<input type="text" id="peer_proxy_username_text" /> <input type="text" id="peer_proxy_username_text" />
@ -266,6 +142,129 @@
<input type="password" id="peer_proxy_password_text" /> <input type="password" id="peer_proxy_password_text" />
</div> </div>
</fieldset> </fieldset>
<fieldset class="settings">
<legend>QBT_TR(IP Filtering)QBT_TR</legend>
<input type="checkbox" id="ipfilter_enabled_checkbox" onclick="updateFilterSettings();"/>
<label for="ipfilter_enabled_checkbox">QBT_TR(IP Filtering)QBT_TR</label><br/>
<label for="ipfilter_text" style="margin-left: 20px;">QBT_TR(Filter path (.dat, .p2p, .p2b):)QBT_TR</label>
<input type="text" id="ipfilter_text"/>
</fieldset>
</div>
<div id="SpeedTab" class="PrefTab invisible">
<fieldset class="settings">
<legend>QBT_TR(Global Rate Limits)QBT_TR</legend>
<table>
<tr>
<td>
<input type="checkbox" id="up_limit_checkbox" onClick="updateUpLimitEnabled();"/>
<label for ="up_limit_checkbox">QBT_TR(Upload:)QBT_TR</label>
</td>
<td><input type="text" id="up_limit_value" style="width: 4em;"/>&nbsp;&nbsp;QBT_TR(KiB/s)QBT_TR</td>
</tr>
<tr>
<td>
<input type="checkbox" id="dl_limit_checkbox" onClick="updateDlLimitEnabled();"/>
<label for="dl_limit_checkbox">QBT_TR(Download:)QBT_TR</label>
</td>
<td><input type="text" id="dl_limit_value" style="width: 4em;"/>&nbsp;&nbsp;QBT_TR(KiB/s)QBT_TR</td>
</tr>
</table>
<fieldset class="settings">
<legend>QBT_TR(Options)QBT_TR</legend>
<input type="checkbox" id="enable_utp_checkbox"/>
<label for="enable_utp_checkbox">QBT_TR(Enable bandwidth management (uTP))QBT_TR</label><br/>
<input type="checkbox" id="limit_utp_rate_checkbox"/>
<label for="limit_utp_rate_checkbox">QBT_TR(Apply rate limit to uTP connections)QBT_TR</label><br/>
<input type="checkbox" id="limit_tcp_overhead_checkbox"/>
<label for="limit_tcp_overhead_checkbox">QBT_TR(Apply rate limit to transport overhead)QBT_TR</label><br/>
</fieldset>
</fieldset>
<fieldset class="settings">
<legend>QBT_TR(Alternative Global Rate Limits)QBT_TR</legend>
<table>
<tr>
<td>
QBT_TR(Upload:)QBT_TR
</td>
<td><input type="text" id="alt_up_limit_value" style="width: 4em;"/>&nbsp;&nbsp;QBT_TR(KiB/s)QBT_TR</td>
</tr>
<tr>
<td>
QBT_TR(Download:)QBT_TR
</td>
<td><input type="text" id="alt_dl_limit_value" style="width: 4em;"/>&nbsp;&nbsp;QBT_TR(KiB/s)QBT_TR</td>
</tr>
</table>
<fieldset class="settings">
<legend><input type="checkbox" id="limit_sheduling_checkbox" onClick="updateSchedulingEnabled();"/>
<label for="limit_sheduling_checkbox">QBT_TR(Schedule the use of alternative rate limits)QBT_TR</label></legend>
QBT_TR(from)QBT_TR
<input type="text" id="schedule_from_hour" style="width: 1.5em;"/>:<input type="text" id="schedule_from_min" style="width: 1.5em;"/>
QBT_TR(to)QBT_TR
<input type="text" id="schedule_to_hour" style="width: 1.5em;"/>:<input type="text" id="schedule_to_min" style="width: 1.5em;"/>
<br/>
QBT_TR(When:)QBT_TR
<select id="schedule_freq_select">
<option value="0">QBT_TR(Every day)QBT_TR</option>
<option value="1">QBT_TR(Week days)QBT_TR</option>
<option value="2">QBT_TR(Week ends)QBT_TR</option>
<option value="3">QBT_TR(Monday)QBT_TR</option>
<option value="4">QBT_TR(Tuesday)QBT_TR</option>
<option value="5">QBT_TR(Wednesday)QBT_TR</option>
<option value="6">QBT_TR(Thursday)QBT_TR</option>
<option value="7">QBT_TR(Friday)QBT_TR</option>
<option value="8">QBT_TR(Saturday)QBT_TR</option>
<option value="9">QBT_TR(Sunday)QBT_TR</option>
</select>
</br/>
</fieldset>
</fieldset>
</div>
<div id="BittorrentTab" class="PrefTab invisible">
<fieldset class="settings">
<legend>QBT_TR(Privacy)QBT_TR</legend>
<input type="checkbox" id="dht_checkbox"/>
<label for="dht_checkbox">QBT_TR(Enable DHT (decentralized network) to find more peers)QBT_TR</label><br/>
<input type="checkbox" id="pex_checkbox"/>
<label for="pex_checkbox">QBT_TR(Enable Peer Exchange (PeX) to find more peers)QBT_TR</label><br/>
<input type="checkbox" id="lsd_checkbox"/>
<label for="lsd_checkbox">QBT_TR(Enable Local Peer Discovery to find more peers)QBT_TR</label><br/>
<label for="encryption_select">QBT_TR(Encryption mode:)QBT_TR</label>
<select id="encryption_select">
<option value="0">QBT_TR(Prefer encryption)QBT_TR</option>
<option value="1">QBT_TR(Require encryption)QBT_TR</option>
<option value="2">QBT_TR(Disable encryption)QBT_TR</option>
</select><br/>
<input type="checkbox" id="anonymous_mode_checkbox" onClick="toggleAnonymousMode()"/>
<label for="anonymous_mode_checkbox">QBT_TR(Enable anonymous mode)QBT_TR (<a href="https://github.com/qbittorrent/qBittorrent/wiki/Anonymous-Mode">More information</a>)</label><br/>
</fieldset>
<fieldset class="settings">
<legend>QBT_TR(Torrent Queueing)QBT_TR</legend>
<input type="checkbox" id="queueing_checkbox" onclick="updateQueueingSystem();"/>
<label for="queueing_checkbox">QBT_TR(Torrent Queueing)QBT_TR</label><br/>
<div class="formRow">
<label for="max_active_dl_value" style="margin-left: 20px;" class="leftLabelLarge">QBT_TR(Maximum active downloads:)QBT_TR</label>
<input type="text" id="max_active_dl_value" style="width: 4em;"/>
</div>
<div class="formRow">
<label for="max_active_up_value" style="margin-left: 20px;" class="leftLabelLarge">QBT_TR(Maximum active uploads:)QBT_TR</label>
<input type="text" id="max_active_up_value" style="width: 4em;"/>
</div>
<div class="formRow">
<label for="max_active_to_value" style="margin-left: 20px;" class="leftLabelLarge">QBT_TR(Maximum active torrents:)QBT_TR</label>
<input type="text" id="max_active_to_value" style="width: 4em;"/>
</div>
<div class="formRow">
<input type="checkbox" id="dont_count_slow_torrents_checkbox"/>
<label for="dont_count_slow_torrents_checkbox">QBT_TR(Do not count slow torrents in these limits)QBT_TR</label>
</div>
</fieldset>
</div> </div>
<div id="WebUITab" class="PrefTab invisible"> <div id="WebUITab" class="PrefTab invisible">

View File

@ -89,7 +89,6 @@ window.addEvent('load', function () {
width : null, width : null,
resizeLimit : [100, 300] resizeLimit : [100, 300]
}); });
MochaUI.Desktop.setDesktopSize();
setFilter = function (f) { setFilter = function (f) {
// Visually Select the right filter // Visually Select the right filter
@ -129,10 +128,23 @@ window.addEvent('load', function () {
}); });
initializeWindows(); initializeWindows();
// Show Top Toolbar is enabled by default
if (localStorage.getItem('show_top_toolbar') == null)
var showTopToolbar = true;
else
var showTopToolbar = localStorage.getItem('show_top_toolbar') == "true";
if (!showTopToolbar) {
$('showTopToolbarLink').firstChild.style.opacity = '0';
$('mochaToolbar').addClass('invisible');
}
var speedInTitle = localStorage.getItem('speed_in_browser_title_bar') == "true"; var speedInTitle = localStorage.getItem('speed_in_browser_title_bar') == "true";
if (!speedInTitle) if (!speedInTitle)
$('speedInBrowserTitleBarLink').firstChild.style.opacity = '0'; $('speedInBrowserTitleBarLink').firstChild.style.opacity = '0';
// After Show Top Toolbar
MochaUI.Desktop.setDesktopSize();
var syncMainDataLastResponseId = 0; var syncMainDataLastResponseId = 0;
var serverState = {}; var serverState = {};
@ -218,10 +230,12 @@ window.addEvent('load', function () {
myTable.columns['priority'].force_hide = !queueing_enabled; myTable.columns['priority'].force_hide = !queueing_enabled;
myTable.updateColumn('priority'); myTable.updateColumn('priority');
if (queueing_enabled) { if (queueing_enabled) {
$('queueingLinks').removeClass('invisible');
$('queueingButtons').removeClass('invisible'); $('queueingButtons').removeClass('invisible');
$('queueingMenuItems').removeClass('invisible'); $('queueingMenuItems').removeClass('invisible');
} }
else { else {
$('queueingLinks').addClass('invisible');
$('queueingButtons').addClass('invisible'); $('queueingButtons').addClass('invisible');
$('queueingMenuItems').addClass('invisible'); $('queueingMenuItems').addClass('invisible');
} }
@ -269,6 +283,20 @@ window.addEvent('load', function () {
updateMainData(); updateMainData();
}; };
$('showTopToolbarLink').addEvent('click', function(e) {
showTopToolbar = !showTopToolbar;
localStorage.setItem('show_top_toolbar', showTopToolbar.toString());
if (showTopToolbar) {
$('showTopToolbarLink').firstChild.style.opacity = '1';
$('mochaToolbar').removeClass('invisible');
}
else {
$('showTopToolbarLink').firstChild.style.opacity = '0';
$('mochaToolbar').addClass('invisible');
}
MochaUI.Desktop.setDesktopSize();
});
$('speedInBrowserTitleBarLink').addEvent('click', function(e) { $('speedInBrowserTitleBarLink').addEvent('click', function(e) {
speedInTitle = !speedInTitle; speedInTitle = !speedInTitle;
localStorage.setItem('speed_in_browser_title_bar', speedInTitle.toString()); localStorage.setItem('speed_in_browser_title_bar', speedInTitle.toString());

View File

@ -49,9 +49,9 @@ var dynamicTable = new Class({
}, },
initColumns : function () { initColumns : function () {
this.newColumn('priority', 'width: 30px; cursor: pointer', '#');
this.newColumn('state_icon', 'width: 16px', ''); this.newColumn('state_icon', 'width: 16px', '');
this.newColumn('name', 'min-width: 200px; cursor: pointer', 'QBT_TR(Name)QBT_TR'); this.newColumn('name', 'min-width: 200px; cursor: pointer', 'QBT_TR(Name)QBT_TR');
this.newColumn('priority', 'width: 90px; cursor: pointer', '#');
this.newColumn('size', 'width: 100px; cursor: pointer', 'QBT_TR(Size)QBT_TR'); this.newColumn('size', 'width: 100px; cursor: pointer', 'QBT_TR(Size)QBT_TR');
this.newColumn('progress', 'width: 80px; cursor: pointer', 'QBT_TR(Done)QBT_TR'); this.newColumn('progress', 'width: 80px; cursor: pointer', 'QBT_TR(Done)QBT_TR');
this.newColumn('num_seeds', 'width: 100px; cursor: pointer', 'QBT_TR(Seeds)QBT_TR'); this.newColumn('num_seeds', 'width: 100px; cursor: pointer', 'QBT_TR(Seeds)QBT_TR');
@ -507,6 +507,10 @@ var dynamicTable = new Class({
state = "queued"; state = "queued";
else if (state == "checkingUP" || state == "checkingDL") else if (state == "checkingUP" || state == "checkingDL")
state = "checking"; state = "checking";
else if (state == "forcedDL" || state == "metaDL")
state = "downloading";
else if (state == "forcedUP")
state = "uploading";
var img_path = 'images/skin/' + state + '.png'; var img_path = 'images/skin/' + state + '.png';
@ -522,12 +526,6 @@ var dynamicTable = new Class({
})); }));
}; };
// name
this.columns['name'].updateTd = function (td, row) {
td.set('html', escapeHtml(this.getRowValue(row)));
};
// priority // priority
this.columns['priority'].updateTd = function (td, row) { this.columns['priority'].updateTd = function (td, row) {
@ -548,6 +546,12 @@ var dynamicTable = new Class({
else return 0; else return 0;
}; };
// name
this.columns['name'].updateTd = function (td, row) {
td.set('html', escapeHtml(this.getRowValue(row)));
};
// size // size
this.columns['size'].updateTd = function (td, row) { this.columns['size'].updateTd = function (td, row) {

View File

@ -366,8 +366,8 @@ initializeWindows = function() {
title: 'QBT_TR(About)QBT_TR', title: 'QBT_TR(About)QBT_TR',
loadMethod: 'xhr', loadMethod: 'xhr',
contentURL: 'about.html', contentURL: 'about.html',
width: 650, width: 550,
height: 200, height: 290,
padding: 10 padding: 10
}); });
}); });
@ -385,13 +385,15 @@ initializeWindows = function() {
addClickEvent('shutdown', function(e) { addClickEvent('shutdown', function(e) {
new Event(e).stop(); new Event(e).stop();
new Request({ if (confirm('QBT_TR(Are you sure you want to quit qBittorrent?)QBT_TR')) {
url: 'command/shutdown', new Request({
onSuccess: function() { url: 'command/shutdown',
document.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"><html xmlns=\"http://www.w3.org/1999/xhtml\"><head><title>QBT_TR(qBittorrent has been shutdown.)QBT_TR</title><style type=\"text/css\">body { text-align: center; }</style></head><body><h1>QBT_TR(qBittorrent has been shutdown.)QBT_TR</h1></body></html>"); onSuccess: function() {
stop(); document.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"><html xmlns=\"http://www.w3.org/1999/xhtml\"><head><title>QBT_TR(qBittorrent has been shutdown.)QBT_TR</title><style type=\"text/css\">body { text-align: center; }</style></head><body><h1>QBT_TR(qBittorrent has been shutdown.)QBT_TR</h1></body></html>");
} stop();
}).send(); }
}).send();
}
}); });
// Deactivate menu header links // Deactivate menu header links