Browse Source

- Ported WebUI to MochaUI 0.9.5

adaptive-webui-19844
Christophe Dumez 16 years ago
parent
commit
816f35cbab
  1. 2
      Changelog
  2. 3
      TODO
  3. 2
      src/webui.qrc
  4. 1331
      src/webui/css/mocha.css
  5. 18
      src/webui/index.html
  6. 12
      src/webui/scripts/client.js
  7. 15
      src/webui/scripts/mocha-init.js
  8. 6148
      src/webui/scripts/mocha.js

2
Changelog

@ -10,6 +10,8 @@ @@ -10,6 +10,8 @@
- 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: 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
- BUGFIX: Fixed possible crash when deleting a torrent permanently

3
TODO

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

2
src/webui.qrc

@ -9,8 +9,8 @@ @@ -9,8 +9,8 @@
<file>webui/css/style.css</file>
<file>webui/css/mootabs1.2.css</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-init.js</file>
<file>webui/scripts/mootools-1.2-core-yc.js</file>
<file>webui/scripts/mootools-1.2-more.js</file>
<file>webui/scripts/dynamicTable.js</file>

1331
src/webui/css/mocha.css

File diff suppressed because it is too large Load Diff

18
src/webui/index.html

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

12
src/webui/scripts/client.js

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

15
src/webui/scripts/mocha-events.js → src/webui/scripts/mocha-init.js

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

6148
src/webui/scripts/mocha.js

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save