- Ported WebUI to MochaUI 0.9.5

This commit is contained in:
Christophe Dumez 2008-12-23 23:47:30 +00:00
parent a73d3132df
commit 816f35cbab
8 changed files with 5595 additions and 1936 deletions

View file

@ -10,6 +10,8 @@
- FEATURE: Added support for 2 new extensions (uTorrent metadata and smart ban plugin) - FEATURE: Added support for 2 new extensions (uTorrent metadata and smart ban plugin)
- FEATURE: Allow to change the save path of torrents after addition - FEATURE: Allow to change the save path of torrents after addition
- FEATURE: Got rid of libmagick++ dependency - FEATURE: Got rid of libmagick++ dependency
- FEATURE: Updated Web interface to MochaUI v0.9.5
- BUGFIX: Fixed several memory leaks
* Unknown - Christophe Dumez <chris@qbittorrent.org> - v1.2.1 * Unknown - Christophe Dumez <chris@qbittorrent.org> - v1.2.1
- BUGFIX: Fixed possible crash when deleting a torrent permanently - BUGFIX: Fixed possible crash when deleting a torrent permanently

3
TODO
View file

@ -1,5 +1,8 @@
See https://blueprints.launchpad.net/qbittorrent/ See https://blueprints.launchpad.net/qbittorrent/
- Use tabs from MochaUI 0.9.5
- Test new MochaUI on IE7
// translations done // translations done
- Romanian - Romanian
- Russian - Russian

View file

@ -9,8 +9,8 @@
<file>webui/css/style.css</file> <file>webui/css/style.css</file>
<file>webui/css/mootabs1.2.css</file> <file>webui/css/mootabs1.2.css</file>
<file>webui/scripts/excanvas-compressed.js</file> <file>webui/scripts/excanvas-compressed.js</file>
<file>webui/scripts/mocha-events.js</file>
<file>webui/scripts/mocha.js</file> <file>webui/scripts/mocha.js</file>
<file>webui/scripts/mocha-init.js</file>
<file>webui/scripts/mootools-1.2-core-yc.js</file> <file>webui/scripts/mootools-1.2-core-yc.js</file>
<file>webui/scripts/mootools-1.2-more.js</file> <file>webui/scripts/mootools-1.2-more.js</file>
<file>webui/scripts/dynamicTable.js</file> <file>webui/scripts/dynamicTable.js</file>

File diff suppressed because it is too large Load diff

View file

@ -13,18 +13,18 @@
<script type="text/javascript" src="scripts/excanvas-compressed.js"></script> <script type="text/javascript" src="scripts/excanvas-compressed.js"></script>
<![endif]--> <![endif]-->
<script type="text/javascript" src="scripts/mootabs1.2.js" charset="utf-8"></script> <script type="text/javascript" src="scripts/mootabs1.2.js" charset="utf-8"></script>
<script type="text/javascript" src="scripts/mocha-events.js" charset="utf-8"></script> <script type="text/javascript" src="scripts/mocha.js"></script>
<script type="text/javascript" src="scripts/mocha.js" charset="utf-8"></script> <script type="text/javascript" src="scripts/mocha-init.js"></script>
<script type="text/javascript" src="scripts/dynamicTable.js" charset="utf-8"></script> <script type="text/javascript" src="scripts/dynamicTable.js" charset="utf-8"></script>
<script type="text/javascript" src="scripts/client.js" charset="utf-8"></script> <script type="text/javascript" src="scripts/client.js" charset="utf-8"></script>
</head> </head>
<body> <body>
<div id="mochaDesktop"> <div id="desktop">
<div id="mochaDesktopHeader"> <div id="desktopHeader">
<div id="mochaDesktopTitlebar"> <div id="desktopTitlebar">
<h1>qBittorrent Web User Interface <span class="version">version 1.2</span></h1> <h1 class="applicationTitle">qBittorrent Web User Interface <span class="version">version 1.2</span></h1>
</div> </div>
<div id="mochaDesktopNavbar"> <div id="desktopNavbar">
<ul> <ul>
<li> <li>
<a class="returnFalse">File</a> <a class="returnFalse">File</a>
@ -64,7 +64,7 @@
<a id="pauseAllButton"><img class="mochaToolButton" title="Pause All" src="images/skin/pause_all.png"/></a> <a id="pauseAllButton"><img class="mochaToolButton" title="Pause All" src="images/skin/pause_all.png"/></a>
</div> </div>
</div> </div>
<div id="pageWrapper">
<div id="myTabs" class="toolbarTabs"> <div id="myTabs" class="toolbarTabs">
<ul class="mootabs_title"> <ul class="mootabs_title">
<li title="Tab1"><a>Downloads</a></li> <li title="Tab1"><a>Downloads</a></li>
@ -107,7 +107,7 @@
</div> </div>
</div> </div>
</div><!-- tabs --> </div><!-- tabs -->
</div>
</div> </div>
</body> </body>
</html> </html>

View file

@ -23,6 +23,12 @@
*/ */
window.addEvent('domready', function(){ window.addEvent('domready', function(){
MochaUI.Desktop = new MochaUI.Desktop();
MochaUI.Desktop.desktop.setStyles({
'background': '#fff',
'visibility': 'visible'
});
initializeWindows();
// Tabs // Tabs
myTabs1 = new mootabs('myTabs', { myTabs1 = new mootabs('myTabs', {
width: '100%', width: '100%',
@ -146,6 +152,12 @@ window.addEvent('domready', function(){
// ajaxfn.periodical(5000); // ajaxfn.periodical(5000);
}); });
// This runs when a person leaves your page.
window.addEvent('unload', function(){
if (MochaUI) MochaUI.garbageCleanUp();
});
window.addEvent('keydown', function(event){ window.addEvent('keydown', function(event){
if (event.key == 'a' && event.control) { if (event.key == 'a' && event.control) {
event.stop(); event.stop();

View file

@ -9,7 +9,7 @@
----------------------------------------------------------------- */ ----------------------------------------------------------------- */
function attachMochaLinkEvents(){ initializeWindows = function(){
function addClickEvent(el, fn){ function addClickEvent(el, fn){
['Link','Button'].each(function(item) { ['Link','Button'].each(function(item) {
@ -21,7 +21,7 @@ function attachMochaLinkEvents(){
addClickEvent('download', function(e){ addClickEvent('download', function(e){
new Event(e).stop(); new Event(e).stop();
document.mochaUI.newWindow({ new MochaUI.Window({
id: 'downloadPage', id: 'downloadPage',
title: 'Download from URLs', title: 'Download from URLs',
loadMethod: 'iframe', loadMethod: 'iframe',
@ -29,6 +29,7 @@ function attachMochaLinkEvents(){
scrollbars: false, scrollbars: false,
resizable: false, resizable: false,
maximizable: false, maximizable: false,
closable: true,
paddingVertical: 0, paddingVertical: 0,
paddingHorizontal: 0, paddingHorizontal: 0,
width: 500, width: 500,
@ -38,7 +39,7 @@ function attachMochaLinkEvents(){
addClickEvent('upload', function(e){ addClickEvent('upload', function(e){
new Event(e).stop(); new Event(e).stop();
document.mochaUI.newWindow({ new MochaUI.Window({
id: 'uploadPage', id: 'uploadPage',
title: 'Upload torrent file', title: 'Upload torrent file',
loadMethod: 'iframe', loadMethod: 'iframe',
@ -90,7 +91,7 @@ function attachMochaLinkEvents(){
addClickEvent('bug', function(e){ addClickEvent('bug', function(e){
new Event(e).stop(); new Event(e).stop();
document.mochaUI.newWindow({ new MochaUI.Window({
id: 'bugPage', id: 'bugPage',
title: 'Report a Bug', title: 'Report a Bug',
loadMethod: 'iframe', loadMethod: 'iframe',
@ -102,7 +103,7 @@ function attachMochaLinkEvents(){
addClickEvent('site', function(e){ addClickEvent('site', function(e){
new Event(e).stop(); new Event(e).stop();
document.mochaUI.newWindow({ new MochaUI.Window({
id: 'sitePage', id: 'sitePage',
title: 'qBittorrent Website', title: 'qBittorrent Website',
loadMethod: 'iframe', loadMethod: 'iframe',
@ -114,7 +115,7 @@ function attachMochaLinkEvents(){
addClickEvent('docs', function(e){ addClickEvent('docs', function(e){
new Event(e).stop(); new Event(e).stop();
document.mochaUI.newWindow({ new MochaUI.Window({
id: 'docsPage', id: 'docsPage',
title: 'qBittorrent official wiki', title: 'qBittorrent official wiki',
loadMethod: 'iframe', loadMethod: 'iframe',
@ -126,7 +127,7 @@ function attachMochaLinkEvents(){
addClickEvent('about', function(e){ addClickEvent('about', function(e){
new Event(e).stop(); new Event(e).stop();
document.mochaUI.newWindow({ new MochaUI.Window({
id: 'aboutpage', id: 'aboutpage',
title: 'About', title: 'About',
loadMethod: 'iframe', loadMethod: 'iframe',

File diff suppressed because it is too large Load diff