Browse Source

Merge pull request #2124 from pmzqla/webui

Misc changes to the WebUI
adaptive-webui-19844
sledgehammer999 10 years ago
parent
commit
a07f25aa67
  1. BIN
      src/Icons/skin/bg-dropdown.gif
  2. BIN
      src/Icons/skin/bg-header.gif
  3. BIN
      src/Icons/skin/bg-panel-header.gif
  4. BIN
      src/Icons/skin/collapse-expand.gif
  5. BIN
      src/Icons/skin/dock-tabs.gif
  6. BIN
      src/Icons/skin/logo-blank.gif
  7. BIN
      src/Icons/skin/logo.gif
  8. BIN
      src/Icons/skin/logo2.gif
  9. BIN
      src/Icons/skin/spacer.gif
  10. BIN
      src/Icons/skin/spinner-placeholder.gif
  11. BIN
      src/Icons/skin/spinner.gif
  12. BIN
      src/Icons/skin/toolbox-divider2.gif
  13. 12
      src/icons.qrc
  14. 6
      src/webui/requesthandler.cpp
  15. 74
      src/webui/www/private/index.html
  16. 9
      src/webui/www/private/login.html
  17. 5
      src/webui/www/public/css/Layout.css
  18. 13
      src/webui/www/public/css/Window.css
  19. 74
      src/webui/www/public/css/style.css
  20. 48
      src/webui/www/public/prop-files.html
  21. 2
      src/webui/www/public/prop-trackers.html
  22. 2
      src/webui/www/public/scripts/mocha-yc.js
  23. 177
      src/webui/www/public/scripts/mocha.js
  24. 2
      src/webui/www/public/transferlist.html
  25. 36
      src/webui/www/public/upload.html

BIN
src/Icons/skin/bg-dropdown.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 B

BIN
src/Icons/skin/bg-header.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 B

BIN
src/Icons/skin/bg-panel-header.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

BIN
src/Icons/skin/collapse-expand.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

BIN
src/Icons/skin/dock-tabs.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 404 B

BIN
src/Icons/skin/logo-blank.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 979 B

BIN
src/Icons/skin/logo.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
src/Icons/skin/logo2.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
src/Icons/skin/spacer.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 B

BIN
src/Icons/skin/spinner-placeholder.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 B

BIN
src/Icons/skin/spinner.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 793 B

BIN
src/Icons/skin/toolbox-divider2.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 B

12
src/icons.qrc

@ -319,10 +319,15 @@ @@ -319,10 +319,15 @@
<file>Icons/oxygen/wallet-open.png</file>
<file>Icons/oxygen/webui.png</file>
<file>Icons/skin/arrow-right.gif</file>
<file>Icons/skin/bg-dropdown.gif</file>
<file>Icons/skin/bg-handle-horizontal.gif</file>
<file>Icons/skin/bg-header.gif</file>
<file>Icons/skin/bg-panel-header.gif</file>
<file>Icons/skin/checking.png</file>
<file>Icons/skin/collapse-expand.gif</file>
<file>Icons/skin/connected.png</file>
<file>Icons/skin/disconnected.png</file>
<file>Icons/skin/dock-tabs.gif</file>
<file>Icons/skin/download.png</file>
<file>Icons/skin/downloading.png</file>
<file>Icons/skin/error.png</file>
@ -333,6 +338,9 @@ @@ -333,6 +338,9 @@
<file>Icons/skin/handle-icon-horizontal.gif</file>
<file>Icons/skin/handle-icon.gif</file>
<file>Icons/skin/knob.gif</file>
<file>Icons/skin/logo-blank.gif</file>
<file>Icons/skin/logo.gif</file>
<file>Icons/skin/logo2.gif</file>
<file>Icons/skin/mascot.png</file>
<file>Icons/skin/paused.png</file>
<file>Icons/skin/qbittorrent16.png</file>
@ -344,11 +352,15 @@ @@ -344,11 +352,15 @@
<file>Icons/skin/ratio.png</file>
<file>Icons/skin/seeding.png</file>
<file>Icons/skin/slider-area.gif</file>
<file>Icons/skin/spacer.gif</file>
<file>Icons/skin/spinner-placeholder.gif</file>
<file>Icons/skin/spinner.gif</file>
<file>Icons/skin/splash.png</file>
<file>Icons/skin/stalledDL.png</file>
<file>Icons/skin/stalledUP.png</file>
<file>Icons/skin/tabs.gif</file>
<file>Icons/skin/toolbox-divider.gif</file>
<file>Icons/skin/toolbox-divider2.gif</file>
<file>Icons/skin/uploading.png</file>
<file>Icons/oxygen/system-log-out.png</file>
</qresource>

6
src/webui/requesthandler.cpp

@ -260,7 +260,11 @@ void RequestHandler::action_command_upload() @@ -260,7 +260,11 @@ void RequestHandler::action_command_upload()
if (!filePath.isEmpty())
{
QBtSession::instance()->addTorrent(filePath);
QTorrentHandle h = QBtSession::instance()->addTorrent(filePath);
if (!h.is_valid()) {
status(415, "Internal Server Error");
print(QObject::tr("Error: '%1' is not a valid torrent file.\n").arg(torrent.filename), CONTENT_TYPE_TXT);
}
// Clean up
fsutils::forceRemove(filePath);
}

74
src/webui/www/private/index.html

@ -1,9 +1,8 @@ @@ -1,9 +1,8 @@
<?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" lang="en" xml:lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<meta http-equiv="X-UA-Compatible" content="IE=10; IE=9; IE=8;" />
<title>qBittorrent web User Interface</title>
<link rel="stylesheet" href="css/dynamicTable.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
@ -35,77 +34,78 @@ @@ -35,77 +34,78 @@
<li>
<a class="returnFalse">_(File)</a>
<ul>
<li><a id="uploadLink"><img class="MyMenuIcon" src="theme/list-add" width="16" height="16" onload="fixPNG(this)"/>_(&Add torrent file...)</a></li>
<li><a id="downloadLink"><img class="MyMenuIcon" src="theme/insert-link" width="16" height="16" onload="fixPNG(this)"/>_(Add &link to torrent...)</a></li>
<li class="divider"><a id="logoutLink"><img class="MyMenuIcon" src="theme/system-log-out" width="16" height="16" onload="fixPNG(this)"/>_(Logout)</a></li>
<li><a id="shutdownLink"><img class="MyMenuIcon" src="theme/application-exit" width="16" height="16" onload="fixPNG(this)"/>_(Exit qBittorrent)</a></li>
<li><a id="uploadLink"><img class="MyMenuIcon" alt="_(&Add torrent file...)" src="theme/list-add" width="16" height="16" onload="fixPNG(this)"/>_(&Add torrent file...)</a></li>
<li><a id="downloadLink"><img class="MyMenuIcon" alt="_(Add &link to torrent...)" src="theme/insert-link" width="16" height="16" onload="fixPNG(this)"/>_(Add &link to torrent...)</a></li>
<li class="divider"><a id="logoutLink"><img class="MyMenuIcon" alt="_(Logout)" src="theme/system-log-out" width="16" height="16" onload="fixPNG(this)"/>_(Logout)</a></li>
<li><a id="shutdownLink"><img class="MyMenuIcon" alt="_(Exit qBittorrent)" src="theme/application-exit" width="16" height="16" onload="fixPNG(this)"/>_(Exit qBittorrent)</a></li>
</ul>
</li>
<li>
<a class="returnFalse">_(Edit)</a>
<ul>
<li><a id="resumeAllLink"><img class="MyMenuIcon" src="theme/media-playback-start" width="16" height="16" onload="fixPNG(this)"/>_(R&esume All)</a></li>
<li><a id="pauseAllLink"><img class="MyMenuIcon" src="theme/media-playback-pause" width="16" height="16" onload="fixPNG(this)"/>_(P&ause All)</a></li>
<li class="divider"><a id="resumeLink"><img class="MyMenuIcon" src="theme/media-playback-start" width="16" height="16" onload="fixPNG(this)"/>_(&Resume)</a></li>
<li><a id="pauseLink"><img class="MyMenuIcon" src="theme/media-playback-pause" width="16" height="16" onload="fixPNG(this)"/>_(&Pause)</a></li>
<li><a id="recheckLink"><img class="MyMenuIcon" src="theme/document-edit-verify" width="16" height="16" onload="fixPNG(this)"/>_(Force recheck)</a></li>
<li class="divider"><a id="deleteLink"><img class="MyMenuIcon" src="theme/list-remove" width="16" height="16" onload="fixPNG(this)"/>_(&Delete)</a></li>
<li><a id="resumeAllLink"><img class="MyMenuIcon" alt="_(R&esume All)" src="theme/media-playback-start" width="16" height="16" onload="fixPNG(this)"/>_(R&esume All)</a></li>
<li><a id="pauseAllLink"><img class="MyMenuIcon" alt="_(P&ause All)" src="theme/media-playback-pause" width="16" height="16" onload="fixPNG(this)"/>_(P&ause All)</a></li>
<li class="divider"><a id="resumeLink"><img class="MyMenuIcon" alt="_(&Resume)" src="theme/media-playback-start" width="16" height="16" onload="fixPNG(this)"/>_(&Resume)</a></li>
<li><a id="pauseLink"><img class="MyMenuIcon" src="theme/media-playback-pause" alt="_(&Pause)" width="16" height="16" onload="fixPNG(this)"/>_(&Pause)</a></li>
<li><a id="recheckLink"><img class="MyMenuIcon" src="theme/document-edit-verify" alt="_(Force recheck)" width="16" height="16" onload="fixPNG(this)"/>_(Force recheck)</a></li>
<li class="divider"><a id="deleteLink"><img class="MyMenuIcon" src="theme/list-remove" alt="_(&Delete)" width="16" height="16" onload="fixPNG(this)"/>_(&Delete)</a></li>
</ul>
</li>
<li>
<a class="returnFalse">_(&Tools)</a>
<ul>
<li><a id="preferencesLink"><img class="MyMenuIcon" src="theme/preferences-system" width="16" height="16" onload="fixPNG(this)"/>_(&Options...)</a></li>
<li><a id="preferencesLink"><img class="MyMenuIcon" src="theme/preferences-system" alt="_(&Options...)" width="16" height="16" onload="fixPNG(this)"/>_(&Options...)</a></li>
</ul>
</li>
<li>
<a class="returnFalse">_(&Help)</a>
<ul>
<li><a id="bugLink" target="_blank" href="http://bugs.qbittorrent.org/"><img class="MyMenuIcon" src="theme/tools-report-bug" width="16" height="16" onload="fixPNG(this)"/>_(Report a &bug)</a></li>
<li><a id="siteLink" target="_blank" href="http://www.qbittorrent.org/"><img class="MyMenuIcon" src="images/skin/qbittorrent16.png" width="16" height="16" onload="fixPNG(this)"/>_(Visit &Website)</a></li>
<li><a id="docsLink" target="_blank" href="http://wiki.qbittorrent.org/"><img class="MyMenuIcon" src="theme/help-contents" width="16" height="16" onload="fixPNG(this)"/>_(&Documentation)</a></li>
<li><a id="aboutLink"><img class="MyMenuIcon" src="theme/help-about" width="16" height="16" onload="fixPNG(this)"/>_(&About)</a></li>
<li><a id="bugLink" target="_blank" href="http://bugs.qbittorrent.org/"><img class="MyMenuIcon" src="theme/tools-report-bug" alt="_(Report a &bug)" width="16" height="16" onload="fixPNG(this)"/>_(Report a &bug)</a></li>
<li><a id="siteLink" target="_blank" href="http://www.qbittorrent.org/"><img class="MyMenuIcon" src="images/skin/qbittorrent16.png" alt="_(Visit &Website)" width="16" height="16" onload="fixPNG(this)"/>_(Visit &Website)</a></li>
<li><a id="docsLink" target="_blank" href="http://wiki.qbittorrent.org/"><img class="MyMenuIcon" src="theme/help-contents" alt="_(&Documentation)" width="16" height="16" onload="fixPNG(this)"/>_(&Documentation)</a></li>
<li><a id="aboutLink"><img class="MyMenuIcon" src="theme/help-about" alt="_(&About)" width="16" height="16" onload="fixPNG(this)"/>_(&About)</a></li>
</ul>
</li>
</ul>
</div>
<div id="mochaToolbar">
&nbsp;&nbsp;
<a id="uploadButton"><img class="mochaToolButton" title="_(&Add torrent file...)" src="theme/list-add" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="downloadButton"><img class="mochaToolButton" title="_(Add &link to torrent...)" src="theme/insert-link" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="deleteButton" class="divider"><img class="mochaToolButton" title="_(Delete)" src="theme/list-remove" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="resumeButton" class="divider"><img class="mochaToolButton" title="_(Resume)" src="theme/media-playback-start" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="pauseButton"><img class="mochaToolButton" title="_(Pause)" src="theme/media-playback-pause" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="uploadButton"><img class="mochaToolButton" title="_(&Add torrent file...)" src="theme/list-add" alt="_(&Add torrent file...)" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="downloadButton"><img class="mochaToolButton" title="_(Add &link to torrent...)" src="theme/insert-link" alt="_(Add &link to torrent...)" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="deleteButton" class="divider"><img class="mochaToolButton" title="_(Delete)" src="theme/list-remove" alt="_(Delete)" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="resumeButton" class="divider"><img class="mochaToolButton" title="_(Resume)" src="theme/media-playback-start" alt="_(Resume)" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="pauseButton"><img class="mochaToolButton" title="_(Pause)" src="theme/media-playback-pause" alt="_(Pause)" width="24" height="24" onload="fixPNG(this)"/></a>
<span id="queueingButtons">
<a id="decreasePrioButton" class="divider"><img class="mochaToolButton" title="_(Decrease priority)" src="theme/go-down" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="increasePrioButton"><img class="mochaToolButton" title="_(Increase priority)" src="theme/go-up" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="decreasePrioButton" class="divider"><img class="mochaToolButton" title="_(Decrease priority)" src="theme/go-down" alt="_(Decrease priority)" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="increasePrioButton"><img class="mochaToolButton" title="_(Increase priority)" src="theme/go-up" alt="_(Increase priority)" width="24" height="24" onload="fixPNG(this)"/></a>
</span>
<a id="preferencesButton" class="divider"><img class="mochaToolButton" title="_(Options)" src="theme/preferences-system" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="preferencesButton" class="divider"><img class="mochaToolButton" title="_(Options)" src="theme/preferences-system" alt="_(Options)" width="24" height="24" onload="fixPNG(this)"/></a>
</div>
</div>
<div id="pageWrapper"><span id="error_div"></span>
<div id="pageWrapper">
</div>
</div>
<ul id="contextmenu">
<li><a href="#Start"><img src="theme/media-playback-start"/> _(Resume)</a></li>
<li><a href="#Pause"><img src="theme/media-playback-pause"/> _(Pause)</a></li>
<li class="separator"><a href="#Delete""><img src="theme/list-remove"/> _(Delete)</a></li>
<li><a href="#Start"><img src="theme/media-playback-start" alt="_(Resume)"/> _(Resume)</a></li>
<li><a href="#Pause"><img src="theme/media-playback-pause" alt="_(Pause)"/> _(Pause)</a></li>
<li class="separator"><a href="#Delete"><img src="theme/list-remove" alt="_(Delete)"/> _(Delete)</a></li>
<li class="separator"><a href="#priority" class="arrow-right">_(Priority)</a>
<ul>
<li><a href="#prioTop""><img src="theme/go-top"/> _(Move to top)</a></li>
<li><a href="#prioUp"><img src="theme/go-up"/> _(Move up)</a></li>
<li><a href="#prioDown"><img src="theme/go-down"/> _(Move down)</a></li>
<li><a href="#prioBottom"><img src="theme/go-bottom"/> _(Move to bottom)</a></li>
<li><a href="#prioTop"><img src="theme/go-top" alt="_(Move to top)"/> _(Move to top)</a></li>
<li><a href="#prioUp"><img src="theme/go-up" alt="_(Move up)"/> _(Move up)</a></li>
<li><a href="#prioDown"><img src="theme/go-down" alt="_(Move down)"/> _(Move down)</a></li>
<li><a href="#prioBottom"><img src="theme/go-bottom" alt="_(Move to bottom)"/> _(Move to bottom)</a></li>
</ul>
</li>
<li class="separator"><a href="#DownloadLimit"><img src="images/skin/download.png"/> _(Limit download rate...)</a></li>
<li><a href="#UploadLimit"><img src="images/skin/seeding.png"/> _(Limit upload rate...)</a></li>
<li class="separator"><a href="#ForceRecheck"><img src="theme/document-edit-verify"/> _(Force recheck)</a></li>
<li class="separator"><a href="#DownloadLimit"><img src="images/skin/download.png" alt="_(Limit download rate...)"/> _(Limit download rate...)</a></li>
<li><a href="#UploadLimit"><img src="images/skin/seeding.png" alt="_(Limit upload rate...)"/> _(Limit upload rate...)</a></li>
<li class="separator"><a href="#ForceRecheck"><img src="theme/document-edit-verify" alt="_(Force recheck)"/> _(Force recheck)</a></li>
</ul>
<div id="desktopFooterWrapper">
<div id="desktopFooter">
<span id="error_div"></span>
<table style="position: absolute; right: 5px;">
<tr><td id="DlInfos" style="cursor:pointer;"></td><td style="width: 2px;margin:0;"><img src="images/skin/toolbox-divider.gif" style="height: 18px; padding-left: 10px; padding-right: 10px; margin-bottom: -2px;"/></td><td id="UpInfos" style="cursor:pointer;"></td></tr>
<tr><td id="DlInfos" style="cursor:pointer;"></td><td style="width: 2px;margin:0;"><img src="images/skin/toolbox-divider.gif" alt="" style="height: 18px; padding-left: 10px; padding-right: 10px; margin-bottom: -2px;"/></td><td id="UpInfos" style="cursor:pointer;"></td></tr>
</table>
</div>
</div>

9
src/webui/www/private/login.html

@ -1,4 +1,3 @@ @@ -1,4 +1,3 @@
<?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" lang="en" xml:lang="en" dir="ltr">
<head>
@ -8,6 +7,10 @@ @@ -8,6 +7,10 @@
<link rel="stylesheet" type="text/css" href="/css/style.css" />
<script type="text/javascript" src="scripts/mootools-1.2-core-yc.js" charset="utf-8"></script>
<script type="text/javascript">
window.onload = function() {
$('username').focus();
}
window.addEvent('domready', function() {
$('loginform').addEvent('submit', function(e) {
new Event(e).stop();
@ -41,7 +44,7 @@ @@ -41,7 +44,7 @@
}).send();
}
</script>
<style>
<style type="text/css">
.col {
display: inline-block;
vertical-align: middle;
@ -68,7 +71,7 @@ @@ -68,7 +71,7 @@
<div id="main">
<h1>_(qBittorrent web User Interface)</h1>
<div id="logo" class="col">
<img src="images/qbittorrent.png" />
<img src="images/qbittorrent.png" alt="qBittorrent logo"/>
</div>
<div id="formplace" class="col">
<form id="loginform" action="">

5
src/webui/www/public/css/Layout.css

@ -148,7 +148,6 @@ body { @@ -148,7 +148,6 @@ body {
}
#desktopNavbar li ul {
padding: 2px;
border: 1px solid #3f3f3f;
background: #fff url(../images/skin/bg-dropdown.gif) repeat-y;
position: absolute;
@ -185,11 +184,11 @@ body { @@ -185,11 +184,11 @@ body {
#desktopNavbar li ul li a {
position: relative;
/*padding: 1px 9px 1px 25px;*/
width: 130px;
width: 134px;
color: #3f3f3f;
font-weight: normal;
/* Fix By Chris */
padding: 1px 9px 1px 20px; /* Reduce left padding */
padding: 1px 10px 1px 20px; /* Reduce left padding */
}
#desktopNavbar li ul li a:hover {

13
src/webui/www/public/css/Window.css

@ -47,7 +47,7 @@ Required by: @@ -47,7 +47,7 @@ Required by:
.mochaTitlebar {
width: 100%;
overflow: hidden;
background: url(../images/spacer.gif?from=fafafa&to=e5e5e5);
background: url(../images/skin/spacer.gif?from=fafafa&to=e5e5e5);
}
.mochaTitlebar h3 {
@ -188,7 +188,7 @@ div.mochaToolbarWrapper.bottom { @@ -188,7 +188,7 @@ div.mochaToolbarWrapper.bottom {
left: 6px;
width: 16px;
height: 16px;
background: url(../images/spinner.gif) no-repeat;
background: url(../images/skin/spinner.gif) no-repeat;
}
.mochaIframe {
@ -334,7 +334,7 @@ div.mochaToolbarWrapper.bottom { @@ -334,7 +334,7 @@ div.mochaToolbarWrapper.bottom {
/* Example Window Themes */
#about_contentWrapper {
background: #e5e5e5 url(../images/logo2.gif) 3px 3px no-repeat;
background: #e5e5e5 url(../images/skin/logo2.gif) 3px 3px no-repeat;
}
#builder_contentWrapper {
@ -369,3 +369,10 @@ div.mochaToolbarWrapper.bottom { @@ -369,3 +369,10 @@ div.mochaToolbarWrapper.bottom {
#clock {
background: #fff;
}
/* Workaround to make invisible buttons clickable */
.mochaMinimizeButton.replaced,
.mochaMaximizeButton.replaced,
.mochaCloseButton.replaced {
background-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7) !important;
}

74
src/webui/www/public/css/style.css

@ -134,9 +134,8 @@ hr { @@ -134,9 +134,8 @@ hr {
}
#Filters ul img {
padding-left: 4px;
padding-right: 2px;
margin-bottom: -4px;
padding: 2px 4px;
vertical-align: middle;
}
.selectedFilter {
@ -270,13 +269,13 @@ a.propButton img { @@ -270,13 +269,13 @@ a.propButton img {
}
.MyMenuIcon {
margin-left: -16px;
margin-left: -18px;
margin-bottom: -3px;
padding-right: 3px;
padding-right: 5px;
}
/* Tri-state checkbox */
a.tristate {
label.tristate {
background: url(../images/3-state-checkbox.gif) 0 0 no-repeat;
display: block;
float: left;
@ -286,8 +285,8 @@ a.tristate { @@ -286,8 +285,8 @@ a.tristate {
text-indent: -999em;
width: 13px;
}
a.checked { background-position: 0 -13px; }
a.partial { background-position: 0 -26px; }
label.checked { background-position: 0 -13px; }
label.partial { background-position: 0 -26px; }
fieldset.settings {
border: solid 1px black;
@ -333,7 +332,62 @@ ul.filterList { @@ -333,7 +332,62 @@ ul.filterList {
padding-left: 0;
}
ul.filterList li {
padding-top: 2px
ul.filterList a {
display: block;
}
ul.filterList li:hover {
background-color: #e60;
}
ul.filterList li:hover a {
color: white;
}
#filesTable {
line-height: 20px;
}
#filesTable tr:nth-child(even) {
background-color: #eee;
}
#filesTable tr:hover {
background-color: #e60;
color: white;
}
#addTrackersPlus {
width: 16px;
cursor: pointer;
vertical-align: middle;
}
.torrentTable th {
padding: 5px 10px;
}
.torrentTable td {
padding: 0px 3px;
}
.torrentTable thead tr {
background-color: #eee;
}
/*
* Workaround to prevent the transfer list from
* disappearing when zooming in the browser.
*/
#filtersColumn_handle {
margin-left: -1px;
}
#error_div {
float: left;
font-size: 14px;
}
.combo_priority {
font-size: 1em;
}

48
src/webui/www/public/prop-files.html

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
<table class="torrentTable" cellpadding="0" cellspacing="0" style="width: 100%">
<thead>
<tr>
<th><a id="all_files_cb" style="margin-right: 2px;" class="tristate" onclick="javascript:switchCBState()"></a>&nbsp;&nbsp;_(Downloaded)</th>
<th style="width: 30px"><input type="checkbox" id="tristate_cb" style="display: none;" onclick="javascript:switchCBState()" /><label id="all_files_cb" class="tristate" for="tristate_cb"></label></th>
<th>_(Name)</th>
<th>_(Size)</th>
<th style="width: 90px;">_(Progress)</th>
@ -18,23 +18,42 @@ @@ -18,23 +18,42 @@
var is_seed = true;
var current_hash = "";
var setCBState = function(state) {
if(state == "partial") {
if(!$("all_files_cb").hasClass("partial")) {
if (!(Browser.name == "ie" && Browser.version < 9)) {
$("all_files_cb").removeClass("tristate");
$("all_files_cb").removeClass("partial");
$("all_files_cb").removeClass("checked");
$("all_files_cb").addClass("partial");
$("tristate_cb").style.display = "inline";
}
return;
}
if(state == "checked") {
if(!$("all_files_cb").hasClass("checked")) {
$("all_files_cb").removeClass("partial");
$("all_files_cb").addClass("checked");
var setCBState = function(state) {
if (Browser.name == "ie" && Browser.version < 9) {
if (state == "partial") {
if (!$("all_files_cb").hasClass("partial")) {
$("all_files_cb").removeClass("checked");
$("all_files_cb").addClass("partial");
}
return;
}
if (state == "checked") {
if(!$("all_files_cb").hasClass("checked")) {
$("all_files_cb").removeClass("partial");
$("all_files_cb").addClass("checked");
}
return;
}
$("all_files_cb").removeClass("partial");
$("all_files_cb").removeClass("checked");
} else {
if (state == "partial") {
$("tristate_cb").indeterminate = true;
} else if (state == "checked") {
$("tristate_cb").indeterminate = false;
$("tristate_cb").checked = true;
} else {
$("tristate_cb").indeterminate = false;
$("tristate_cb").checked = false;
}
return;
}
$("all_files_cb").removeClass("partial");
$("all_files_cb").removeClass("checked");
}
var switchCBState = function() {
@ -153,6 +172,7 @@ var createPriorityCombo = function(id, selected_prio) { @@ -153,6 +172,7 @@ var createPriorityCombo = function(id, selected_prio) {
} else {
select.removeClass("invisible");
}
select.addClass("combo_priority");
return select;
}

2
src/webui/www/public/prop-trackers.html

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
<table class="torrentTable" cellpadding="0" cellspacing="0" style="width: 100%">
<thead>
<tr>
<th>_(URL) <img src="theme/list-add" id="addTrackersPlus" style="width:16px;cursor:pointer;"/></th>
<th>_(URL) <img src="theme/list-add" id="addTrackersPlus"/></th>
<th>_(Status)</th>
<th>_(Peers)</th>
<th>_(Message)</th>

2
src/webui/www/public/scripts/mocha-yc.js

File diff suppressed because one or more lines are too long

177
src/webui/www/public/scripts/mocha.js

@ -53,6 +53,8 @@ MUI.extend({ @@ -53,6 +53,8 @@ MUI.extend({
ieSupport: 'excanvas', // Makes it easier to switch between Excanvas and Moocanvas for testing
ieLegacySupport: Browser.Engine.trident && Browser.version < 9,
/*
Function: updateContent
@ -271,8 +273,8 @@ MUI.extend({ @@ -271,8 +273,8 @@ MUI.extend({
'frameBorder': 0,
'scrolling': 'auto',
'styles': {
'height': contentWrapperEl.offsetHeight - contentWrapperEl.getStyle('border-top').toInt() - contentWrapperEl.getStyle('border-bottom').toInt(),
'width': instance.panelEl ? contentWrapperEl.offsetWidth - contentWrapperEl.getStyle('border-left').toInt() - contentWrapperEl.getStyle('border-right').toInt() : '100%'
'height': contentWrapperEl.offsetHeight - contentWrapperEl.getStyle('margin-top').toInt() - contentWrapperEl.getStyle('margin-bottom').toInt(),
'width': instance.panelEl ? contentWrapperEl.offsetWidth - contentWrapperEl.getStyle('margin-left').toInt() - contentWrapperEl.getStyle('margin-right').toInt() : '100%'
}
}).injectInside(contentEl);
@ -533,7 +535,7 @@ Element.implement({ @@ -533,7 +535,7 @@ Element.implement({
this.setStyle('position','relative');
position = 'relative';
}
if(Browser.Engine.trident){
if(MUI.ieLegacySupport){
parent.setStyle('height',parent.getStyle('height'));
}
var coords = this.getPosition(parent);
@ -794,7 +796,7 @@ $extend(Asset, { @@ -794,7 +796,7 @@ $extend(Asset, {
script.addEvents({
load: load,
readystatechange: function(){
if (Browser.Engine.trident && ['loaded', 'complete'].contains(this.readyState))
if (MUI.ieLegacySupport && ['loaded', 'complete'].contains(this.readyState))
load();
}
}).setProperties(properties);
@ -1058,7 +1060,7 @@ MUI.Themes = { @@ -1058,7 +1060,7 @@ MUI.Themes = {
});
// Delay gives the stylesheets time to take effect. IE6 needs more delay.
if (Browser.Engine.trident){
if (MUI.ieLegacySupport){
this.redraw.delay(1250, this);
}
else {
@ -1620,17 +1622,8 @@ MUI.Window = new Class({ @@ -1620,17 +1622,8 @@ MUI.Window = new Class({
}
// Fix a mouseover issue with gauges in IE7
if ( Browser.Engine.trident && options.shape == 'gauge') {
this.windowEl.setStyle('backgroundImage', 'url(../images/spacer.gif)');
}
if ((this.options.type == 'modal' || options.type == 'modal2' ) && Browser.Platform.mac && Browser.Engine.gecko){
if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)) {
var ffversion = new Number(RegExp.$1);
if (ffversion < 3) {
this.windowEl.setStyle('position', 'fixed');
}
}
if ( MUI.ieLegacySupport && options.shape == 'gauge') {
this.windowEl.setStyle('backgroundImage', 'url(../images/skin/spacer.gif)');
}
if (options.loadMethod == 'iframe') {
@ -1793,7 +1786,7 @@ MUI.Window = new Class({ @@ -1793,7 +1786,7 @@ MUI.Window = new Class({
'duration': 350,
transition: Fx.Transitions.Sine.easeInOut,
onComplete: function(){
if (Browser.Engine.trident){
if (MUI.ieLegacySupport){
this.drawWindow();
}
}.bind(this)
@ -1883,7 +1876,7 @@ MUI.Window = new Class({ @@ -1883,7 +1876,7 @@ MUI.Window = new Class({
}
else {
// IE cannot handle both element opacity and VML alpha at the same time.
if (Browser.Engine.trident){
if (MUI.ieLegacySupport){
this.drawWindow(false);
}
this.opacityMorph.start({
@ -1906,7 +1899,7 @@ MUI.Window = new Class({ @@ -1906,7 +1899,7 @@ MUI.Window = new Class({
if (this.options.type == 'window'){
windowEl.addEvent('mousedown', function(e) {
if (Browser.Engine.trident) {
if (MUI.ieLegacySupport) {
new Event(e).stop();
}
MUI.focusWindow(windowEl);
@ -1940,7 +1933,7 @@ MUI.Window = new Class({ @@ -1940,7 +1933,7 @@ MUI.Window = new Class({
e = new Event(e).stop();
}.bind(this));
if (Browser.Engine.trident) {
if (MUI.ieLegacySupport) {
this.titleBarEl.addEvent('mousedown', function(e) {
this.titleEl.setCapture();
}.bind(this));
@ -1977,7 +1970,7 @@ MUI.Window = new Class({ @@ -1977,7 +1970,7 @@ MUI.Window = new Class({
$('windowUnderlay').show();
}
if (this.iframeEl) {
if (!Browser.Engine.trident) {
if (!MUI.ieLegacySupport) {
this.iframeEl.setStyle('visibility', 'hidden');
}
else {
@ -1990,7 +1983,7 @@ MUI.Window = new Class({ @@ -1990,7 +1983,7 @@ MUI.Window = new Class({
$('windowUnderlay').hide();
}
if ( this.iframeEl ){
if (!Browser.Engine.trident) {
if (!MUI.ieLegacySupport) {
this.iframeEl.setStyle('visibility', 'visible');
}
else {
@ -2124,7 +2117,7 @@ MUI.Window = new Class({ @@ -2124,7 +2117,7 @@ MUI.Window = new Class({
resizeOnStart: function(){
$('windowUnderlay').show();
if (this.iframeEl){
if (!Browser.Engine.trident) {
if (!MUI.ieLegacySupport) {
this.iframeEl.setStyle('visibility', 'hidden');
}
else {
@ -2133,25 +2126,13 @@ MUI.Window = new Class({ @@ -2133,25 +2126,13 @@ MUI.Window = new Class({
}
},
resizeOnDrag: function(){
// Fix for a rendering glitch in FF when resizing a window with panels in it
if (Browser.Engine.gecko) {
this.windowEl.getElements('.panel').each(function(panel){
panel.store('oldOverflow', panel.getStyle('overflow'));
panel.setStyle('overflow', 'visible');
});
}
this.drawWindow();
this.adjustHandles();
if (Browser.Engine.gecko) {
this.windowEl.getElements('.panel').each(function(panel){
panel.setStyle('overflow', panel.retrieve('oldOverflow')); // Fix for a rendering bug in FF
});
}
},
resizeOnComplete: function(){
$('windowUnderlay').hide();
if (this.iframeEl){
if (!Browser.Engine.trident) {
if (!MUI.ieLegacySupport) {
this.iframeEl.setStyle('visibility', 'visible');
}
else {
@ -2360,7 +2341,7 @@ MUI.Window = new Class({ @@ -2360,7 +2341,7 @@ MUI.Window = new Class({
'class': 'mochaContent'
}).inject(cache.contentWrapperEl);
if (this.options.useCanvas == true && Browser.Engine.trident != true) {
if (this.options.useCanvas == true && !MUI.ieLegacySupport) {
cache.canvasEl = new Element('canvas', {
'id': id + '_canvas',
'class': 'mochaCanvas',
@ -2369,7 +2350,7 @@ MUI.Window = new Class({ @@ -2369,7 +2350,7 @@ MUI.Window = new Class({
}).inject(this.windowEl);
}
if (this.options.useCanvas == true && Browser.Engine.trident) {
if (this.options.useCanvas == true && MUI.ieLegacySupport) {
cache.canvasEl = new Element('canvas', {
'id': id + '_canvas',
'class': 'mochaCanvas',
@ -2382,7 +2363,7 @@ MUI.Window = new Class({ @@ -2382,7 +2363,7 @@ MUI.Window = new Class({
}
}).inject(this.windowEl);
if (MUI.ieSupport == 'excanvas'){
if (MUI.ieLegacySupport && MUI.ieSupport == 'excanvas'){
G_vmlCanvasManager.initElement(cache.canvasEl);
cache.canvasEl = this.windowEl.getElement('.mochaCanvas');
}
@ -2401,7 +2382,7 @@ MUI.Window = new Class({ @@ -2401,7 +2382,7 @@ MUI.Window = new Class({
'height': 14
}).inject(this.windowEl);
if (Browser.Engine.trident && MUI.ieSupport == 'excanvas'){
if (MUI.ieLegacySupport && MUI.ieSupport == 'excanvas'){
G_vmlCanvasManager.initElement(cache.canvasControlsEl);
cache.canvasControlsEl = this.windowEl.getElement('.mochaCanvasControls');
}
@ -2448,26 +2429,16 @@ MUI.Window = new Class({ @@ -2448,26 +2429,16 @@ MUI.Window = new Class({
'height': 26
}).inject(this.windowEl, 'bottom');
if (Browser.Engine.trident && MUI.ieSupport == 'excanvas'){
if (MUI.ieLegacySupport && MUI.ieSupport == 'excanvas'){
G_vmlCanvasManager.initElement(cache.canvasHeaderEl);
cache.canvasHeaderEl = this.windowEl.getElement('.mochaCanvasHeader');
}
}
if ( Browser.Engine.trident ){
if ( MUI.ieLegacySupport ){
cache.overlayEl.setStyle('zIndex', 2);
}
// For Mac Firefox 2 to help reduce scrollbar bugs in that browser
if (Browser.Platform.mac && Browser.Engine.gecko){
if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){
var ffversion = new Number(RegExp.$1);
if (ffversion < 3){
cache.overlayEl.setStyle('overflow', 'auto');
}
}
}
if (options.resizable){
cache.n = new Element('div', {
'id': id + '_resizeHandle_n',
@ -2678,9 +2649,9 @@ MUI.Window = new Class({ @@ -2678,9 +2649,9 @@ MUI.Window = new Class({
this.iframeEl.setStyle('height', this.contentWrapperEl.offsetHeight);
}
var borderHeight = this.contentBorderEl.getStyle('border-top').toInt() + this.contentBorderEl.getStyle('border-bottom').toInt();
var toolbarHeight = this.toolbarWrapperEl ? this.toolbarWrapperEl.getStyle('height').toInt() + this.toolbarWrapperEl.getStyle('border-top').toInt() : 0;
var toolbar2Height = this.toolbar2WrapperEl ? this.toolbar2WrapperEl.getStyle('height').toInt() + this.toolbar2WrapperEl.getStyle('border-top').toInt() : 0;
var borderHeight = this.contentBorderEl.getStyle('margin-top').toInt() + this.contentBorderEl.getStyle('margin-bottom').toInt();
var toolbarHeight = this.toolbarWrapperEl ? this.toolbarWrapperEl.getStyle('height').toInt() + this.toolbarWrapperEl.getStyle('margin-top').toInt() : 0;
var toolbar2Height = this.toolbar2WrapperEl ? this.toolbar2WrapperEl.getStyle('height').toInt() + this.toolbar2WrapperEl.getStyle('margin-top').toInt() : 0;
this.headerFooterShadow = options.headerHeight + options.footerHeight + shadowBlur2x;
var height = this.contentWrapperEl.getStyle('height').toInt() + this.headerFooterShadow + toolbarHeight + toolbar2Height + borderHeight;
@ -2697,7 +2668,7 @@ MUI.Window = new Class({ @@ -2697,7 +2668,7 @@ MUI.Window = new Class({
});
if (this.options.useCanvas == true) {
if (Browser.Engine.trident) {
if (MUI.ieLegacySupport) {
this.canvasEl.height = 20000;
this.canvasEl.width = 50000;
}
@ -2754,7 +2725,7 @@ MUI.Window = new Class({ @@ -2754,7 +2725,7 @@ MUI.Window = new Class({
}
// Invisible dummy object. The last element drawn is not rendered consistently while resizing in IE6 and IE7
if (Browser.Engine.trident){
if (MUI.ieLegacySupport){
MUI.triangle(ctx, 0, 0, 10, 10, options.resizableColor, 0);
}
}
@ -2825,7 +2796,7 @@ MUI.Window = new Class({ @@ -2825,7 +2796,7 @@ MUI.Window = new Class({
}
// Invisible dummy object. The last element drawn is not rendered consistently while resizing in IE6 and IE7
if (Browser.Engine.trident){
if (MUI.ieLegacySupport){
MUI.triangle(ctx, 0, 0, 10, 10, options.resizableColor, 0);
}
}
@ -2894,7 +2865,7 @@ MUI.Window = new Class({ @@ -2894,7 +2865,7 @@ MUI.Window = new Class({
);
}
// Invisible dummy object. The last element drawn is not rendered consistently while resizing in IE6 and IE7
if (Browser.Engine.trident){
if (MUI.ieLegacySupport){
MUI.circle(ctx2, 0, 0, 3, this.options.resizableColor, 0);
}
@ -3326,7 +3297,7 @@ MUI.extend({ @@ -3326,7 +3297,7 @@ MUI.extend({
}
else {
// Redraws IE windows without shadows since IE messes up canvas alpha when you change element opacity
if (Browser.Engine.trident) instance.drawWindow(false);
if (MUI.ieLegacySupport) instance.drawWindow(false);
if (instance.options.type == 'modal' || instance.options.type == 'modal2'){
MUI.Modal.modalOverlayCloseMorph.start({
'opacity': 0
@ -3351,7 +3322,7 @@ MUI.extend({ @@ -3351,7 +3322,7 @@ MUI.extend({
var instance = instances.get(windowEl.id);
windowEl.setStyle('visibility', 'hidden');
// Destroy throws an error in IE8
if (Browser.Engine.trident) {
if (MUI.ieLegacySupport) {
windowEl.dispose();
}
else {
@ -3650,7 +3621,7 @@ MUI.extend({ @@ -3650,7 +3621,7 @@ MUI.extend({
instance.drawWindow();
// Show iframe
if (instance.iframeEl){
if (!Browser.Engine.trident) {
if (!MUI.ieLegacySupport) {
instance.iframeEl.setStyle('visibility', 'visible');
}
else {
@ -4266,8 +4237,8 @@ MUI.Desktop = { @@ -4266,8 +4237,8 @@ MUI.Desktop = {
}
var coordinates = document.getCoordinates();
var borderHeight = instance.contentBorderEl.getStyle('border-top').toInt() + instance.contentBorderEl.getStyle('border-bottom').toInt();
var toolbarHeight = instance.toolbarWrapperEl ? instance.toolbarWrapperEl.getStyle('height').toInt() + instance.toolbarWrapperEl.getStyle('border-top').toInt() : 0;
var borderHeight = instance.contentBorderEl.getStyle('margin-top').toInt() + instance.contentBorderEl.getStyle('margin-bottom').toInt();
var toolbarHeight = instance.toolbarWrapperEl ? instance.toolbarWrapperEl.getStyle('height').toInt() + instance.toolbarWrapperEl.getStyle('margin-top').toInt() : 0;
instance.contentWrapperEl.setStyles({
'height': coordinates.height - instance.options.headerHeight - instance.options.footerHeight - borderHeight - toolbarHeight,
'width': coordinates.width
@ -4300,8 +4271,8 @@ MUI.Desktop = { @@ -4300,8 +4271,8 @@ MUI.Desktop = {
if (this.pageWrapper) {
var dockOffset = MUI.dockVisible ? dockWrapper.offsetHeight : 0;
var pageWrapperHeight = windowDimensions.height;
pageWrapperHeight -= this.pageWrapper.getStyle('border-top').toInt();
pageWrapperHeight -= this.pageWrapper.getStyle('border-bottom').toInt();
pageWrapperHeight -= this.pageWrapper.getStyle('margin-top').toInt();
pageWrapperHeight -= this.pageWrapper.getStyle('margin-bottom').toInt();
if (this.desktopHeader){ pageWrapperHeight -= this.desktopHeader.offsetHeight; }
if (this.desktopFooter){ pageWrapperHeight -= this.desktopFooter.offsetHeight; }
pageWrapperHeight -= dockOffset;
@ -4377,7 +4348,7 @@ MUI.Desktop = { @@ -4377,7 +4348,7 @@ MUI.Desktop = {
// Hide iframe
// Iframe should be hidden when minimizing, maximizing, and moving for performance and Flash issues
if ( instance.iframeEl ) {
if (!Browser.Engine.trident) {
if (!MUI.ieLegacySupport) {
instance.iframeEl.setStyle('visibility', 'hidden');
}
else {
@ -4390,9 +4361,9 @@ MUI.Desktop = { @@ -4390,9 +4361,9 @@ MUI.Desktop = {
var shadowBlur = options.shadowBlur;
var shadowOffset = options.shadowOffset;
var newHeight = windowDimensions.height - options.headerHeight - options.footerHeight;
newHeight -= instance.contentBorderEl.getStyle('border-top').toInt();
newHeight -= instance.contentBorderEl.getStyle('border-bottom').toInt();
newHeight -= (instance.toolbarWrapperEl ? instance.toolbarWrapperEl.getStyle('height').toInt() + instance.toolbarWrapperEl.getStyle('border-top').toInt() : 0);
newHeight -= instance.contentBorderEl.getStyle('margin-top').toInt();
newHeight -= instance.contentBorderEl.getStyle('margin-bottom').toInt();
newHeight -= (instance.toolbarWrapperEl ? instance.toolbarWrapperEl.getStyle('height').toInt() + instance.toolbarWrapperEl.getStyle('margin-top').toInt() : 0);
MUI.resizeWindow(windowEl, {
width: windowDimensions.width,
@ -4440,7 +4411,7 @@ MUI.Desktop = { @@ -4440,7 +4411,7 @@ MUI.Desktop = {
// Hide iframe
// Iframe should be hidden when minimizing, maximizing, and moving for performance and Flash issues
if ( instance.iframeEl ) {
if (!Browser.Engine.trident) {
if (!MUI.ieLegacySupport) {
instance.iframeEl.setStyle('visibility', 'hidden');
}
else {
@ -5253,7 +5224,10 @@ MUI.extend({ @@ -5253,7 +5224,10 @@ MUI.extend({
panelsToResize.each(function(panel){
var ratio = this.panelsTotalHeight / panel.offsetHeight.toInt();
var newPanelHeight = panel.getStyle('height').toInt() + (remainingHeight / ratio);
var panelHeight = panel.getStyle('height').toInt();
var newPanelHeight = remainingHeight / ratio;
if (!isNaN(panelHeight))
newPanelHeight += panelHeight;
if (newPanelHeight < 1){
newPanelHeight = 0;
}
@ -5288,7 +5262,7 @@ MUI.extend({ @@ -5288,7 +5262,7 @@ MUI.extend({
parent.getChildren('.columnHandle').each(function(handle){
var parent = handle.getParent();
if (parent.getStyle('height').toInt() < 1) return; // Keeps IE7 and 8 from throwing an error when collapsing a panel within a panel
var handleHeight = parent.getStyle('height').toInt() - handle.getStyle('border-top').toInt() - handle.getStyle('border-bottom').toInt();
var handleHeight = parent.getStyle('height').toInt() - handle.getStyle('margin-top').toInt() - handle.getStyle('margin-bottom').toInt();
if (Browser.Engine.trident4 && parent == MUI.Desktop.pageWrapper){
handleHeight -= 1;
}
@ -5307,10 +5281,10 @@ MUI.extend({ @@ -5307,10 +5281,10 @@ MUI.extend({
var contentWrapperEl = instance.contentWrapperEl;
if (instance.iframeEl) {
if (!Browser.Engine.trident) {
if (!MUI.ieLegacySupport) {
instance.iframeEl.setStyles({
'height': contentWrapperEl.getStyle('height'),
'width': contentWrapperEl.offsetWidth - contentWrapperEl.getStyle('border-left').toInt() - contentWrapperEl.getStyle('border-right').toInt()
'width': contentWrapperEl.offsetWidth - contentWrapperEl.getStyle('margin-left').toInt() - contentWrapperEl.getStyle('margin-right').toInt()
});
}
else {
@ -5318,10 +5292,10 @@ MUI.extend({ @@ -5318,10 +5292,10 @@ MUI.extend({
// when only the vertical dimension is changed.
instance.iframeEl.setStyles({
'height': contentWrapperEl.getStyle('height'),
'width': contentWrapperEl.offsetWidth - contentWrapperEl.getStyle('border-left').toInt() - contentWrapperEl.getStyle('border-right').toInt() - 1
'width': contentWrapperEl.offsetWidth - contentWrapperEl.getStyle('margin-left').toInt() - contentWrapperEl.getStyle('margin-right').toInt() - 1
});
instance.iframeEl.setStyles({
'width': contentWrapperEl.offsetWidth - contentWrapperEl.getStyle('border-left').toInt() - contentWrapperEl.getStyle('border-right').toInt()
'width': contentWrapperEl.offsetWidth - contentWrapperEl.getStyle('margin-left').toInt() - contentWrapperEl.getStyle('margin-right').toInt()
});
}
}
@ -5334,9 +5308,8 @@ MUI.extend({ @@ -5334,9 +5308,8 @@ MUI.extend({
}
container.getElements('.rWidth').each(function(column){
var currentWidth = column.offsetWidth.toInt();
currentWidth -= column.getStyle('border-left').toInt();
currentWidth -= column.getStyle('border-right').toInt();
currentWidth -= column.getStyle('margin-left').toInt();
currentWidth -= column.getStyle('margin-right').toInt();
var parent = column.getParent();
this.width = 0;
@ -5353,7 +5326,7 @@ MUI.extend({ @@ -5353,7 +5326,7 @@ MUI.extend({
if (newWidth < 1) newWidth = 0;
column.setStyle('width', newWidth);
column.getChildren('.panel').each(function(panel){
panel.setStyle('width', newWidth - panel.getStyle('border-left').toInt() - panel.getStyle('border-right').toInt());
panel.setStyle('width', newWidth - panel.getStyle('margin-left').toInt() - panel.getStyle('margin-right').toInt());
MUI.resizeChildren(panel);
}.bind(this));
@ -5373,7 +5346,7 @@ function addResizeRight(element, min, max){ @@ -5373,7 +5346,7 @@ function addResizeRight(element, min, max){
handle.setStyle('cursor', Browser.Engine.webkit ? 'col-resize' : 'e-resize');
if (!min) min = 50;
if (!max) max = 250;
if (Browser.Engine.trident) {
if (MUI.ieLegacySupport) {
handle.addEvents({
'mousedown': function(){
handle.setCapture();
@ -5397,22 +5370,12 @@ function addResizeRight(element, min, max){ @@ -5397,22 +5370,12 @@ function addResizeRight(element, min, max){
element.getNext('.column').getElements('iframe').setStyle('visibility', 'hidden');
}.bind(this),
onDrag: function(){
if (Browser.Engine.gecko) {
$$('.panel').each(function(panel){
if (panel.getElements('.mochaIframe').length == 0) {
panel.hide(); // Fix for a rendering bug in FF
}
});
}
MUI.rWidth(element.getParent());
if (Browser.Engine.gecko) {
$$('.panel').show(); // Fix for a rendering bug in FF
}
if (Browser.Engine.trident4) {
element.getChildren().each(function(el){
var width = $(element).getStyle('width').toInt();
width -= el.getStyle('border-right').toInt();
width -= el.getStyle('border-left').toInt();
width -= el.getStyle('margin-right').toInt();
width -= el.getStyle('margin-left').toInt();
width -= el.getStyle('padding-right').toInt();
width -= el.getStyle('padding-left').toInt();
el.setStyle('width', width);
@ -5440,7 +5403,7 @@ function addResizeLeft(element, min, max){ @@ -5440,7 +5403,7 @@ function addResizeLeft(element, min, max){
var partner = element.getPrevious('.column');
if (!min) min = 50;
if (!max) max = 250;
if (Browser.Engine.trident){
if (MUI.ieLegacySupport){
handle.addEvents({
'mousedown': function(){
handle.setCapture();
@ -5485,7 +5448,7 @@ function addResizeBottom(element){ @@ -5485,7 +5448,7 @@ function addResizeBottom(element){
return element.getStyle('height').toInt() + partner.getStyle('height').toInt();
}.bind(this);
if (Browser.Engine.trident) {
if (MUI.ieLegacySupport) {
handle.addEvents({
'mousedown': function(){
handle.setCapture();
@ -5507,7 +5470,7 @@ function addResizeBottom(element){ @@ -5507,7 +5470,7 @@ function addResizeBottom(element){
}.bind(this),
onStart: function(){
if (instance.iframeEl) {
if (!Browser.Engine.trident) {
if (!MUI.ieLegacySupport) {
instance.iframeEl.setStyle('visibility', 'hidden');
partner.getElements('iframe').setStyle('visibility','hidden');
}
@ -5544,7 +5507,7 @@ function addResizeBottom(element){ @@ -5544,7 +5507,7 @@ function addResizeBottom(element){
MUI.panelHeight(column);
});
if (instance.iframeEl) {
if (!Browser.Engine.trident) {
if (!MUI.ieLegacySupport) {
instance.iframeEl.setStyle('visibility', 'visible');
partner.getElements('iframe').setStyle('visibility','visible');
}
@ -5600,7 +5563,7 @@ MUI.extend({ @@ -5600,7 +5563,7 @@ MUI.extend({
MUI.closePanel($(panel.id));
}.bind(this));
if (Browser.Engine.trident) {
if (MUI.ieLegacySupport) {
columnEl.dispose();
if (instance.handleEl != null) {
instance.handleEl.dispose();
@ -5795,7 +5758,7 @@ MUI.Dock = { @@ -5795,7 +5758,7 @@ MUI.Dock = {
}).inject(this.dock);
// Dynamically initialize canvas using excanvas. This is only required by IE
if (Browser.Engine.trident && MUI.ieSupport == 'excanvas'){
if (MUI.ieLegacySupport && MUI.ieSupport == 'excanvas'){
G_vmlCanvasManager.initElement(canvas);
}
}
@ -6053,7 +6016,7 @@ MUI.Dock = { @@ -6053,7 +6016,7 @@ MUI.Dock = {
// Iframe should be hidden when minimizing, maximizing, and moving for performance and Flash issues
if ( instance.iframeEl ) {
// Some elements are still visible in IE8 in the iframe when the iframe's visibility is set to hidden.
if (!Browser.Engine.trident) {
if (!MUI.ieLegacySupport) {
instance.iframeEl.setStyle('visibility', 'hidden');
}
else {
@ -6068,16 +6031,6 @@ MUI.Dock = { @@ -6068,16 +6031,6 @@ MUI.Dock = {
}
windowEl.setStyle('visibility', 'hidden');
// Fixes a scrollbar issue in Mac FF2
if (Browser.Platform.mac && Browser.Engine.gecko){
if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){
var ffversion = new Number(RegExp.$1);
if (ffversion < 3) {
instance.contentWrapperEl.setStyle('overflow', 'hidden');
}
}
}
MUI.Desktop.setDesktopSize();
// Have to use timeout because window gets focused when you click on the minimize button
@ -6119,7 +6072,7 @@ MUI.Dock = { @@ -6119,7 +6072,7 @@ MUI.Dock = {
// Show iframe
if (instance.iframeEl){
if (!Browser.Engine.trident){
if (!MUI.ieLegacySupport){
instance.iframeEl.setStyle('visibility', 'visible');
}
else {

2
src/webui/www/public/transferlist.html

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
<table class="torrentTable" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th></th>
<th style="width: 0"></th>
<th onClick="setSortedColumn(1);" style="cursor: pointer;">_(Name)</th>
<th id='prioHeader' onClick="setSortedColumn(2);" style="cursor: pointer;">#</th>
<th onClick="setSortedColumn(3);" style="cursor: pointer;">_(Size)</th>

36
src/webui/www/public/upload.html

@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>_(Download local torrent)</title>
<link rel="stylesheet" href="css/style.css" type="text/css" />
<link rel="stylesheet" href="css/Window.css" type="text/css" />
<script type="text/javascript" src="scripts/mootools-1.2-core-yc.js" charset="utf-8"></script>
<script type="text/javascript">
@ -18,6 +19,7 @@ function stateChangeHandler() { @@ -18,6 +19,7 @@ function stateChangeHandler() {
alert("_(Upload Failed!)");
}
}
$('upload_spinner').style.display = "none";
}
}
@ -36,33 +38,37 @@ function uploadFiles(files) { @@ -36,33 +38,37 @@ function uploadFiles(files) {
}
}
// file selection
function fileSelectHandler(e) {
function fileHandler(e) {
e.preventDefault();
$('upload_spinner').style.display = "block";
// fetch FileList object
var files = e.target.files || e.dataTransfer.files;
var files = $('fileselect').files
// process all File objects
uploadFiles(files);
}
window.addEvent('load', function() {
$('fileselect').addEvent('change', fileSelectHandler);
// is XHR2 available?
// is XHR2 available?
var xhr = new XMLHttpRequest();
if (xhr.upload)
$('submitbutton').addClass("invisible");
else
$('upload_frame').addEvent('load', function(e) { window.parent.closeWindows(); });
if (xhr.upload) {
$('uploadForm').addEvent('submit', fileHandler);
} else {
$('upload_frame').addEvent('load', function() { window.parent.closeWindows(); });
$('uploadForm').addEvent('submit', function() { $('upload_spinner').style.display = "block"; });
}
});
</script>
</head>
<body>
<br/>
<iframe id="upload_frame" name="upload_frame" style="width:1px;height:1px;border:0px;" src="javascript:false;"></iframe>
<form action="command/upload" enctype="multipart/form-data" method="post" id="uploadForm" target="upload_frame">
<input type="file" id="fileselect" name="fileselect[]" multiple="multiple" /><br/>
<div id="submitbutton">
<button type="submit">_(Upload Torrents)</button>
<iframe id="upload_frame" name="upload_frame" class="invisible" src="javascript:false;"></iframe>
<form action="command/upload" enctype="multipart/form-data" method="post" id="uploadForm" target="upload_frame" style="text-align: center;">
<div style="margin-top: 25px; display: inline-block; border: 1px solid lightgrey; border-radius: 4px;">
<input type="file" id="fileselect" name="fileselect[]" multiple="multiple" />
</div>
<div id="submitbutton" style="margin-top: 30px;">
<button type="submit" style="font-size: 1em;">_(Upload Torrents)</button>
</div>
</form>
<div id="upload_spinner" class="mochaSpinner"></div>
</body>
</html>

Loading…
Cancel
Save