- 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

@@ -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(){
// 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();

View File

@@ -9,7 +9,7 @@
----------------------------------------------------------------- */
function attachMochaLinkEvents(){
initializeWindows = function(){
function addClickEvent(el, fn){
['Link','Button'].each(function(item) {
@@ -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(){
scrollbars: false,
resizable: false,
maximizable: false,
closable: true,
paddingVertical: 0,
paddingHorizontal: 0,
width: 500,
@@ -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(){
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(){
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(){
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(){
addClickEvent('about', function(e){
new Event(e).stop();
document.mochaUI.newWindow({
new MochaUI.Window({
id: 'aboutpage',
title: 'About',
loadMethod: 'iframe',

File diff suppressed because it is too large Load Diff