From ab91d546e51bdd104d6d520dc2a000ade79b207b Mon Sep 17 00:00:00 2001 From: jagannatharjun Date: Mon, 18 May 2020 20:30:51 +0530 Subject: [PATCH] Move all icon resources to icon folder root --- AUTHORS | 2 +- dist/unix/CMakeLists.txt | 6 +- src/app/main.cpp | 2 +- src/base/iconprovider.cpp | 4 +- src/gui/aboutdialog.cpp | 4 +- src/gui/mainwindow.cpp | 18 +- src/gui/optionsdialog.cpp | 8 +- src/gui/statusbar.cpp | 12 +- src/gui/transferlistfilterswidget.cpp | 24 +- src/gui/transferlistmodel.cpp | 18 +- src/gui/transferlistwidget.cpp | 2 +- src/icons/{qbt-theme => }/README.md | 0 .../{qbt-theme => }/application-exit.svg | 0 .../{qbt-theme => }/application-rss+xml.svg | 0 .../application-x-mswinurl.svg | 0 src/icons/{skin => }/arrow-right.gif | Bin src/icons/{skin => }/bg-dropdown.gif | Bin src/icons/{skin => }/bg-handle-horizontal.gif | Bin src/icons/{skin => }/bg-header.gif | Bin src/icons/{skin => }/bg-panel-header.gif | Bin .../{qbt-theme => }/build-icons/Gruntfile.js | 0 .../{qbt-theme => }/build-icons/package.json | 0 .../{qbt-theme => }/build-icons/readme.md | 0 src/icons/{qbt-theme => }/checked.svg | 0 src/icons/{skin => }/checking.svg | 0 src/icons/{skin => }/collapse.svg | 0 src/icons/{skin => }/completed.svg | 0 src/icons/{qbt-theme => }/configure.svg | 0 src/icons/{skin => }/connected.svg | 0 src/icons/{qbt-theme => }/dialog-cancel.svg | 0 .../{qbt-theme => }/dialog-information.svg | 0 src/icons/{qbt-theme => }/dialog-warning.svg | 0 src/icons/{skin => }/disconnected.svg | 0 src/icons/{skin => }/dock-tabs.gif | Bin .../{qbt-theme => }/document-edit-verify.svg | 0 src/icons/{qbt-theme => }/document-edit.svg | 0 .../{qbt-theme => }/document-encrypt.svg | 0 src/icons/{qbt-theme => }/document-import.svg | 0 src/icons/{qbt-theme => }/document-new.svg | 0 .../{qbt-theme => }/document-properties.svg | 0 src/icons/{qbt-theme => }/document-save.svg | 0 src/icons/{qbt-theme => }/download.svg | 0 src/icons/{skin => }/downloading.svg | 0 .../download.svg => downloading_small.svg} | 0 .../{qbt-theme => }/edit-clear-history.svg | 0 src/icons/{qbt-theme => }/edit-clear.svg | 0 src/icons/{qbt-theme => }/edit-copy.svg | 0 src/icons/{qbt-theme => }/edit-cut.svg | 0 src/icons/{qbt-theme => }/edit-delete.svg | 0 src/icons/{qbt-theme => }/edit-find-user.svg | 0 src/icons/{qbt-theme => }/edit-find.svg | 0 src/icons/{qbt-theme => }/edit-paste.svg | 0 src/icons/{qbt-theme => }/edit-rename.svg | 0 src/icons/{skin => }/error.svg | 0 src/icons/{skin => }/expand.svg | 0 src/icons/{skin => }/filteractive.svg | 0 src/icons/{skin => }/filterall.svg | 0 src/icons/{skin => }/filterinactive.svg | 0 src/icons/{skin => }/filterstalled.svg | 0 src/icons/{skin => }/firewalled.svg | 0 .../{qbt-theme => }/folder-documents.svg | 0 src/icons/{qbt-theme => }/folder-download.svg | 0 src/icons/{qbt-theme => }/folder-new.svg | 0 src/icons/{qbt-theme => }/folder-remote.svg | 0 src/icons/{qbt-theme => }/gear.svg | 0 src/icons/{qbt-theme => }/gear32.svg | 0 src/icons/{qbt-theme => }/go-bottom.svg | 0 src/icons/{qbt-theme => }/go-down.svg | 0 src/icons/{qbt-theme => }/go-top.svg | 0 src/icons/{qbt-theme => }/go-up.svg | 0 .../{skin => }/handle-icon-horizontal.gif | Bin src/icons/{skin => }/handle-icon.gif | Bin src/icons/{qbt-theme => }/help-about.svg | 0 src/icons/{qbt-theme => }/help-contents.svg | 0 src/icons/icons.qrc | 260 +++++++++--------- src/icons/{qbt-theme => }/inode-directory.svg | 0 src/icons/{qbt-theme => }/insert-link.svg | 0 src/icons/{skin => }/knob.gif | Bin src/icons/{qbt-theme => }/kt-magnet.svg | 0 .../kt-set-max-download-speed.svg | 0 .../kt-set-max-upload-speed.svg | 0 src/icons/{qbt-theme => }/list-add.svg | 0 src/icons/{qbt-theme => }/list-remove.svg | 0 src/icons/{skin => }/logo-blank.gif | Bin src/icons/{skin => }/logo.gif | Bin src/icons/{skin => }/logo2.gif | Bin .../{qbt-theme => }/mail-folder-inbox.svg | 0 src/icons/{qbt-theme => }/mail-mark-read.svg | 0 src/icons/{skin => }/mascot.png | Bin .../{qbt-theme => }/media-playback-pause.svg | 0 .../{qbt-theme => }/media-playback-start.svg | 0 .../{qbt-theme => }/media-seek-forward.svg | 0 src/icons/{qbt-theme => }/network-server.svg | 0 src/icons/{qbt-theme => }/network-wired.svg | 0 src/icons/{qbt-theme => }/object-locked.svg | 0 .../{qbt-theme => }/office-chart-line.svg | 0 src/icons/{skin => }/paused.svg | 0 .../{qbt-theme => }/preferences-desktop.svg | 0 .../{qbt-theme => }/preferences-other.svg | 0 .../preferences-system-network.svg | 0 .../preferences-web-browser-cookies.svg | 0 .../{skin => }/qbittorrent-tray-dark.svg | 0 .../{skin => }/qbittorrent-tray-light.svg | 0 .../{skin => }/qbittorrent-tray-with-font.svg | 0 src/icons/{skin => }/qbittorrent-tray.svg | 0 src/icons/{skin => }/qbittorrent32.png | Bin src/icons/{skin => }/queued.svg | 0 src/icons/{skin => }/ratio.svg | 0 src/icons/{skin => }/resumed.svg | 0 src/icons/{qbt-theme => }/rss-config.svg | 0 src/icons/{qbt-theme => }/security-high.svg | 0 src/icons/{qbt-theme => }/security-low.svg | 0 src/icons/{skin => }/seeding.svg | 0 src/icons/{qbt-theme => }/services.svg | 0 src/icons/skin/build-icons/Gruntfile.js | 22 -- src/icons/skin/build-icons/package.json | 13 - src/icons/skin/build-icons/readme.md | 14 - src/icons/{skin => }/slider-area.gif | Bin src/icons/{skin => }/spacer.gif | Bin src/icons/{qbt-theme => }/speedometer.svg | 0 src/icons/{skin => }/spinner-placeholder.gif | Bin src/icons/{skin => }/spinner.gif | Bin src/icons/{skin => }/splash.png | Bin src/icons/{skin => }/stalledDL.svg | 0 src/icons/{skin => }/stalledUP.svg | 0 src/icons/{qbt-theme => }/system-log-out.svg | 0 src/icons/{qbt-theme => }/tab-close.svg | 0 src/icons/{skin => }/tabs.gif | Bin src/icons/{qbt-theme => }/task-attention.svg | 0 src/icons/{qbt-theme => }/task-complete.svg | 0 src/icons/{qbt-theme => }/task-ongoing.svg | 0 src/icons/{qbt-theme => }/task-reject.svg | 0 src/icons/{qbt-theme => }/text-plain.svg | 0 src/icons/{skin => }/toolbox-divider.gif | Bin src/icons/{skin => }/toolbox-divider2.gif | Bin .../{qbt-theme => }/tools-report-bug.svg | 0 src/icons/{qbt-theme => }/unavailable.svg | 0 src/icons/{skin => }/uploading.svg | 0 .../{qbt-theme => }/user-group-delete.svg | 0 src/icons/{qbt-theme => }/user-group-new.svg | 0 .../{qbt-theme => }/view-calendar-journal.svg | 0 src/icons/{qbt-theme => }/view-categories.svg | 0 src/icons/{qbt-theme => }/view-filter.svg | 0 src/icons/{qbt-theme => }/view-preview.svg | 0 src/icons/{qbt-theme => }/view-refresh.svg | 0 src/icons/{qbt-theme => }/view-statistics.svg | 0 src/icons/{qbt-theme => }/wallet-open.svg | 0 src/icons/{qbt-theme => }/webui.svg | 0 src/webui/www/private/css/Layout.css | 28 +- src/webui/www/private/css/Tabs.css | 10 +- src/webui/www/private/css/Window.css | 6 +- src/webui/www/private/css/dynamicTable.css | 4 +- src/webui/www/private/css/style.css | 14 +- src/webui/www/private/index.html | 176 ++++++------ src/webui/www/private/scripts/client.js | 12 +- src/webui/www/private/scripts/contextmenu.js | 10 +- src/webui/www/private/scripts/dynamicTable.js | 8 +- .../www/private/scripts/lib/mocha-0.9.6-yc.js | 2 +- .../www/private/scripts/lib/mocha-0.9.6.js | 2 +- src/webui/www/private/views/about.html | 2 +- src/webui/www/private/views/filters.html | 32 +-- src/webui/www/private/views/preferences.html | 2 +- src/webui/www/private/views/search.html | 16 +- .../www/private/views/searchplugins.html | 4 +- src/webui/www/public/index.html | 6 +- unixconf.pri | 6 +- 166 files changed, 353 insertions(+), 396 deletions(-) rename src/icons/{qbt-theme => }/README.md (100%) rename src/icons/{qbt-theme => }/application-exit.svg (100%) rename src/icons/{qbt-theme => }/application-rss+xml.svg (100%) rename src/icons/{qbt-theme => }/application-x-mswinurl.svg (100%) rename src/icons/{skin => }/arrow-right.gif (100%) rename src/icons/{skin => }/bg-dropdown.gif (100%) rename src/icons/{skin => }/bg-handle-horizontal.gif (100%) rename src/icons/{skin => }/bg-header.gif (100%) rename src/icons/{skin => }/bg-panel-header.gif (100%) rename src/icons/{qbt-theme => }/build-icons/Gruntfile.js (100%) rename src/icons/{qbt-theme => }/build-icons/package.json (100%) rename src/icons/{qbt-theme => }/build-icons/readme.md (100%) rename src/icons/{qbt-theme => }/checked.svg (100%) rename src/icons/{skin => }/checking.svg (100%) rename src/icons/{skin => }/collapse.svg (100%) rename src/icons/{skin => }/completed.svg (100%) rename src/icons/{qbt-theme => }/configure.svg (100%) rename src/icons/{skin => }/connected.svg (100%) rename src/icons/{qbt-theme => }/dialog-cancel.svg (100%) rename src/icons/{qbt-theme => }/dialog-information.svg (100%) rename src/icons/{qbt-theme => }/dialog-warning.svg (100%) rename src/icons/{skin => }/disconnected.svg (100%) rename src/icons/{skin => }/dock-tabs.gif (100%) rename src/icons/{qbt-theme => }/document-edit-verify.svg (100%) rename src/icons/{qbt-theme => }/document-edit.svg (100%) rename src/icons/{qbt-theme => }/document-encrypt.svg (100%) rename src/icons/{qbt-theme => }/document-import.svg (100%) rename src/icons/{qbt-theme => }/document-new.svg (100%) rename src/icons/{qbt-theme => }/document-properties.svg (100%) rename src/icons/{qbt-theme => }/document-save.svg (100%) rename src/icons/{qbt-theme => }/download.svg (100%) rename src/icons/{skin => }/downloading.svg (100%) rename src/icons/{skin/download.svg => downloading_small.svg} (100%) rename src/icons/{qbt-theme => }/edit-clear-history.svg (100%) rename src/icons/{qbt-theme => }/edit-clear.svg (100%) rename src/icons/{qbt-theme => }/edit-copy.svg (100%) rename src/icons/{qbt-theme => }/edit-cut.svg (100%) rename src/icons/{qbt-theme => }/edit-delete.svg (100%) rename src/icons/{qbt-theme => }/edit-find-user.svg (100%) rename src/icons/{qbt-theme => }/edit-find.svg (100%) rename src/icons/{qbt-theme => }/edit-paste.svg (100%) rename src/icons/{qbt-theme => }/edit-rename.svg (100%) rename src/icons/{skin => }/error.svg (100%) rename src/icons/{skin => }/expand.svg (100%) rename src/icons/{skin => }/filteractive.svg (100%) rename src/icons/{skin => }/filterall.svg (100%) rename src/icons/{skin => }/filterinactive.svg (100%) rename src/icons/{skin => }/filterstalled.svg (100%) rename src/icons/{skin => }/firewalled.svg (100%) rename src/icons/{qbt-theme => }/folder-documents.svg (100%) rename src/icons/{qbt-theme => }/folder-download.svg (100%) rename src/icons/{qbt-theme => }/folder-new.svg (100%) rename src/icons/{qbt-theme => }/folder-remote.svg (100%) rename src/icons/{qbt-theme => }/gear.svg (100%) rename src/icons/{qbt-theme => }/gear32.svg (100%) rename src/icons/{qbt-theme => }/go-bottom.svg (100%) rename src/icons/{qbt-theme => }/go-down.svg (100%) rename src/icons/{qbt-theme => }/go-top.svg (100%) rename src/icons/{qbt-theme => }/go-up.svg (100%) rename src/icons/{skin => }/handle-icon-horizontal.gif (100%) rename src/icons/{skin => }/handle-icon.gif (100%) rename src/icons/{qbt-theme => }/help-about.svg (100%) rename src/icons/{qbt-theme => }/help-contents.svg (100%) rename src/icons/{qbt-theme => }/inode-directory.svg (100%) rename src/icons/{qbt-theme => }/insert-link.svg (100%) rename src/icons/{skin => }/knob.gif (100%) rename src/icons/{qbt-theme => }/kt-magnet.svg (100%) rename src/icons/{qbt-theme => }/kt-set-max-download-speed.svg (100%) rename src/icons/{qbt-theme => }/kt-set-max-upload-speed.svg (100%) rename src/icons/{qbt-theme => }/list-add.svg (100%) rename src/icons/{qbt-theme => }/list-remove.svg (100%) rename src/icons/{skin => }/logo-blank.gif (100%) rename src/icons/{skin => }/logo.gif (100%) rename src/icons/{skin => }/logo2.gif (100%) rename src/icons/{qbt-theme => }/mail-folder-inbox.svg (100%) rename src/icons/{qbt-theme => }/mail-mark-read.svg (100%) rename src/icons/{skin => }/mascot.png (100%) rename src/icons/{qbt-theme => }/media-playback-pause.svg (100%) rename src/icons/{qbt-theme => }/media-playback-start.svg (100%) rename src/icons/{qbt-theme => }/media-seek-forward.svg (100%) rename src/icons/{qbt-theme => }/network-server.svg (100%) rename src/icons/{qbt-theme => }/network-wired.svg (100%) rename src/icons/{qbt-theme => }/object-locked.svg (100%) rename src/icons/{qbt-theme => }/office-chart-line.svg (100%) rename src/icons/{skin => }/paused.svg (100%) rename src/icons/{qbt-theme => }/preferences-desktop.svg (100%) rename src/icons/{qbt-theme => }/preferences-other.svg (100%) rename src/icons/{qbt-theme => }/preferences-system-network.svg (100%) rename src/icons/{qbt-theme => }/preferences-web-browser-cookies.svg (100%) rename src/icons/{skin => }/qbittorrent-tray-dark.svg (100%) rename src/icons/{skin => }/qbittorrent-tray-light.svg (100%) rename src/icons/{skin => }/qbittorrent-tray-with-font.svg (100%) rename src/icons/{skin => }/qbittorrent-tray.svg (100%) rename src/icons/{skin => }/qbittorrent32.png (100%) rename src/icons/{skin => }/queued.svg (100%) rename src/icons/{skin => }/ratio.svg (100%) rename src/icons/{skin => }/resumed.svg (100%) rename src/icons/{qbt-theme => }/rss-config.svg (100%) rename src/icons/{qbt-theme => }/security-high.svg (100%) rename src/icons/{qbt-theme => }/security-low.svg (100%) rename src/icons/{skin => }/seeding.svg (100%) rename src/icons/{qbt-theme => }/services.svg (100%) delete mode 100644 src/icons/skin/build-icons/Gruntfile.js delete mode 100644 src/icons/skin/build-icons/package.json delete mode 100644 src/icons/skin/build-icons/readme.md rename src/icons/{skin => }/slider-area.gif (100%) rename src/icons/{skin => }/spacer.gif (100%) rename src/icons/{qbt-theme => }/speedometer.svg (100%) rename src/icons/{skin => }/spinner-placeholder.gif (100%) rename src/icons/{skin => }/spinner.gif (100%) rename src/icons/{skin => }/splash.png (100%) rename src/icons/{skin => }/stalledDL.svg (100%) rename src/icons/{skin => }/stalledUP.svg (100%) rename src/icons/{qbt-theme => }/system-log-out.svg (100%) rename src/icons/{qbt-theme => }/tab-close.svg (100%) rename src/icons/{skin => }/tabs.gif (100%) rename src/icons/{qbt-theme => }/task-attention.svg (100%) rename src/icons/{qbt-theme => }/task-complete.svg (100%) rename src/icons/{qbt-theme => }/task-ongoing.svg (100%) rename src/icons/{qbt-theme => }/task-reject.svg (100%) rename src/icons/{qbt-theme => }/text-plain.svg (100%) rename src/icons/{skin => }/toolbox-divider.gif (100%) rename src/icons/{skin => }/toolbox-divider2.gif (100%) rename src/icons/{qbt-theme => }/tools-report-bug.svg (100%) rename src/icons/{qbt-theme => }/unavailable.svg (100%) rename src/icons/{skin => }/uploading.svg (100%) rename src/icons/{qbt-theme => }/user-group-delete.svg (100%) rename src/icons/{qbt-theme => }/user-group-new.svg (100%) rename src/icons/{qbt-theme => }/view-calendar-journal.svg (100%) rename src/icons/{qbt-theme => }/view-categories.svg (100%) rename src/icons/{qbt-theme => }/view-filter.svg (100%) rename src/icons/{qbt-theme => }/view-preview.svg (100%) rename src/icons/{qbt-theme => }/view-refresh.svg (100%) rename src/icons/{qbt-theme => }/view-statistics.svg (100%) rename src/icons/{qbt-theme => }/wallet-open.svg (100%) rename src/icons/{qbt-theme => }/webui.svg (100%) diff --git a/AUTHORS b/AUTHORS index 3aa3c64c8..82fb397c8 100644 --- a/AUTHORS +++ b/AUTHORS @@ -62,7 +62,7 @@ Images Authors: copyright: Mateusz Tobola license: GPLv2 -* file: src/icons/skin/tabs.gif +* file: src/icons/tabs.gif copyright: Greg Houston license: MIT diff --git a/dist/unix/CMakeLists.txt b/dist/unix/CMakeLists.txt index 26b4bea7d..a7145f8a6 100644 --- a/dist/unix/CMakeLists.txt +++ b/dist/unix/CMakeLists.txt @@ -40,9 +40,9 @@ if (Qt5Widgets_FOUND) COMPONENT data) install(FILES - ${qBittorrent_SOURCE_DIR}/src/icons/skin/qbittorrent-tray.svg - ${qBittorrent_SOURCE_DIR}/src/icons/skin/qbittorrent-tray-dark.svg - ${qBittorrent_SOURCE_DIR}/src/icons/skin/qbittorrent-tray-light.svg + ${qBittorrent_SOURCE_DIR}/src/icons/qbittorrent-tray.svg + ${qBittorrent_SOURCE_DIR}/src/icons/qbittorrent-tray-dark.svg + ${qBittorrent_SOURCE_DIR}/src/icons/qbittorrent-tray-light.svg DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status COMPONENT data) endif() diff --git a/src/app/main.cpp b/src/app/main.cpp index 58f26b988..bec7cdb85 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -353,7 +353,7 @@ void sigAbnormalHandler(int signum) #if !defined(DISABLE_GUI) void showSplashScreen() { - QPixmap splashImg(":/icons/skin/splash.png"); + QPixmap splashImg(":/icons/splash.png"); QPainter painter(&splashImg); const QString version = QBT_VERSION; painter.setPen(QPen(Qt::white)); diff --git a/src/base/iconprovider.cpp b/src/base/iconprovider.cpp index c5cba692d..f5dad49f7 100644 --- a/src/base/iconprovider.cpp +++ b/src/base/iconprovider.cpp @@ -58,11 +58,11 @@ IconProvider *IconProvider::instance() QString IconProvider::getIconPath(const QString &iconId) const { // there are a few icons not available in svg - const QString pathSvg = ":/icons/qbt-theme/" + iconId + ".svg"; + const QString pathSvg = ":/icons/" + iconId + ".svg"; if (QFileInfo::exists(pathSvg)) return pathSvg; - const QString pathPng = ":/icons/qbt-theme/" + iconId + ".png"; + const QString pathPng = ":/icons/" + iconId + ".png"; return pathPng; } diff --git a/src/gui/aboutdialog.cpp b/src/gui/aboutdialog.cpp index 52f587449..cb878abe3 100644 --- a/src/gui/aboutdialog.cpp +++ b/src/gui/aboutdialog.cpp @@ -45,7 +45,7 @@ AboutDialog::AboutDialog(QWidget *parent) // Title m_ui->labelName->setText(QString::fromLatin1("

qBittorrent " QBT_VERSION " (%1-bit)

").arg(QT_POINTER_SIZE * 8)); - m_ui->logo->setPixmap(Utils::Gui::scaledPixmapSvg(":/icons/skin/qbittorrent-tray.svg", this, 32)); + m_ui->logo->setPixmap(Utils::Gui::scaledPixmapSvg(":/icons/qbittorrent-tray.svg", this, 32)); // About const QString aboutText = QString( @@ -65,7 +65,7 @@ AboutDialog::AboutDialog(QWidget *parent) , tr("Bug Tracker:")); m_ui->labelAbout->setText(aboutText); - m_ui->labelMascot->setPixmap(Utils::Gui::scaledPixmap(":/icons/skin/mascot.png", this)); + m_ui->labelMascot->setPixmap(Utils::Gui::scaledPixmap(":/icons/mascot.png", this)); // Thanks QFile thanksfile(":/thanks.html"); diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index ac6daf6cd..3eaf2bb1f 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -152,10 +152,10 @@ MainWindow::MainWindow(QWidget *parent) #ifndef Q_OS_MACOS #ifdef Q_OS_UNIX const QIcon appLogo = Preferences::instance()->useSystemIconTheme() - ? QIcon::fromTheme("qbittorrent", QIcon(":/icons/skin/qbittorrent-tray.svg")) - : QIcon(":/icons/skin/qbittorrent-tray.svg"); + ? QIcon::fromTheme("qbittorrent", QIcon(":/icons/qbittorrent-tray.svg")) + : QIcon(":/icons/qbittorrent-tray.svg"); #else - const QIcon appLogo(":/icons/skin/qbittorrent-tray.svg"); + const QIcon appLogo(":/icons/qbittorrent-tray.svg"); #endif // Q_OS_UNIX setWindowIcon(appLogo); #endif // Q_OS_MACOS @@ -1539,10 +1539,10 @@ void MainWindow::reloadSessionStats() "qBittorrent" "" "
" - " %1" + " %1" "
" "
" - " %2" + " %2" "
") .arg(tr("DL speed: %1", "e.g: Download speed: 10 KiB/s").arg(Utils::Misc::friendlyUnit(status.payloadDownloadRate, true)) , tr("UP speed: %1", "e.g: Upload speed: 10 KiB/s").arg(Utils::Misc::friendlyUnit(status.payloadUploadRate, true))); @@ -1984,18 +1984,18 @@ QIcon MainWindow::getSystrayIcon() const #else switch (style) { case TrayIcon::NORMAL: - return QIcon(QLatin1String(":/icons/skin/qbittorrent-tray.svg")); + return QIcon(QLatin1String(":/icons/qbittorrent-tray.svg")); case TrayIcon::MONO_DARK: - return QIcon(QLatin1String(":/icons/skin/qbittorrent-tray-dark.svg")); + return QIcon(QLatin1String(":/icons/qbittorrent-tray-dark.svg")); case TrayIcon::MONO_LIGHT: - return QIcon(QLatin1String(":/icons/skin/qbittorrent-tray-light.svg")); + return QIcon(QLatin1String(":/icons/qbittorrent-tray-light.svg")); default: break; } #endif // As a failsafe in case the enum is invalid - return QIcon(QLatin1String(":/icons/skin/qbittorrent-tray.svg")); + return QIcon(QLatin1String(":/icons/qbittorrent-tray.svg")); } #endif // Q_OS_MACOS diff --git a/src/gui/optionsdialog.cpp b/src/gui/optionsdialog.cpp index 5427d984d..3554a383b 100644 --- a/src/gui/optionsdialog.cpp +++ b/src/gui/optionsdialog.cpp @@ -1691,7 +1691,7 @@ QString OptionsDialog::webUiPassword() const void OptionsDialog::webUIHttpsCertChanged(const QString &path, const ShowError showError) { m_ui->textWebUIHttpsCert->setSelectedPath(path); - m_ui->lblSslCertStatus->setPixmap(Utils::Gui::scaledPixmapSvg(":/icons/qbt-theme/security-low.svg", this, 24)); + m_ui->lblSslCertStatus->setPixmap(Utils::Gui::scaledPixmapSvg(":/icons/security-low.svg", this, 24)); if (path.isEmpty()) return; @@ -1709,13 +1709,13 @@ void OptionsDialog::webUIHttpsCertChanged(const QString &path, const ShowError s return; } - m_ui->lblSslCertStatus->setPixmap(Utils::Gui::scaledPixmapSvg(":/icons/qbt-theme/security-high.svg", this, 24)); + m_ui->lblSslCertStatus->setPixmap(Utils::Gui::scaledPixmapSvg(":/icons/security-high.svg", this, 24)); } void OptionsDialog::webUIHttpsKeyChanged(const QString &path, const ShowError showError) { m_ui->textWebUIHttpsKey->setSelectedPath(path); - m_ui->lblSslKeyStatus->setPixmap(Utils::Gui::scaledPixmapSvg(":/icons/qbt-theme/security-low.svg", this, 24)); + m_ui->lblSslKeyStatus->setPixmap(Utils::Gui::scaledPixmapSvg(":/icons/security-low.svg", this, 24)); if (path.isEmpty()) return; @@ -1733,7 +1733,7 @@ void OptionsDialog::webUIHttpsKeyChanged(const QString &path, const ShowError sh return; } - m_ui->lblSslKeyStatus->setPixmap(Utils::Gui::scaledPixmapSvg(":/icons/qbt-theme/security-high.svg", this, 24)); + m_ui->lblSslKeyStatus->setPixmap(Utils::Gui::scaledPixmapSvg(":/icons/security-high.svg", this, 24)); } void OptionsDialog::showConnectionTab() diff --git a/src/gui/statusbar.cpp b/src/gui/statusbar.cpp index 3f5ec8800..0ebd64d6a 100644 --- a/src/gui/statusbar.cpp +++ b/src/gui/statusbar.cpp @@ -62,14 +62,14 @@ StatusBar::StatusBar(QWidget *parent) m_connecStatusLblIcon->setFlat(true); m_connecStatusLblIcon->setFocusPolicy(Qt::NoFocus); m_connecStatusLblIcon->setCursor(Qt::PointingHandCursor); - m_connecStatusLblIcon->setIcon(QIcon(":/icons/skin/firewalled.svg")); + m_connecStatusLblIcon->setIcon(QIcon(":/icons/firewalled.svg")); m_connecStatusLblIcon->setToolTip( QString::fromLatin1("%1
%2").arg(tr("Connection status:") , tr("No direct connections. This may indicate network configuration problems."))); connect(m_connecStatusLblIcon, &QAbstractButton::clicked, this, &StatusBar::connectionButtonClicked); m_dlSpeedLbl = new QPushButton(this); - m_dlSpeedLbl->setIcon(QIcon(":/icons/skin/download.svg")); + m_dlSpeedLbl->setIcon(QIcon(":/icons/downloading_small.svg")); connect(m_dlSpeedLbl, &QAbstractButton::clicked, this, &StatusBar::capDownloadSpeed); m_dlSpeedLbl->setFlat(true); m_dlSpeedLbl->setFocusPolicy(Qt::NoFocus); @@ -78,7 +78,7 @@ StatusBar::StatusBar(QWidget *parent) m_dlSpeedLbl->setMinimumWidth(200); m_upSpeedLbl = new QPushButton(this); - m_upSpeedLbl->setIcon(QIcon(":/icons/skin/seeding.svg")); + m_upSpeedLbl->setIcon(QIcon(":/icons/seeding.svg")); connect(m_upSpeedLbl, &QAbstractButton::clicked, this, &StatusBar::capUploadSpeed); m_upSpeedLbl->setFlat(true); m_upSpeedLbl->setFocusPolicy(Qt::NoFocus); @@ -173,17 +173,17 @@ void StatusBar::updateConnectionStatus() const BitTorrent::SessionStatus &sessionStatus = BitTorrent::Session::instance()->status(); if (!BitTorrent::Session::instance()->isListening()) { - m_connecStatusLblIcon->setIcon(QIcon(QLatin1String(":/icons/skin/disconnected.svg"))); + m_connecStatusLblIcon->setIcon(QIcon(QLatin1String(":/icons/disconnected.svg"))); m_connecStatusLblIcon->setToolTip(QLatin1String("") + tr("Connection Status:") + QLatin1String("
") + tr("Offline. This usually means that qBittorrent failed to listen on the selected port for incoming connections.")); } else { if (sessionStatus.hasIncomingConnections) { // Connection OK - m_connecStatusLblIcon->setIcon(QIcon(QLatin1String(":/icons/skin/connected.svg"))); + m_connecStatusLblIcon->setIcon(QIcon(QLatin1String(":/icons/connected.svg"))); m_connecStatusLblIcon->setToolTip(QLatin1String("") + tr("Connection Status:") + QLatin1String("
") + tr("Online")); } else { - m_connecStatusLblIcon->setIcon(QIcon(QLatin1String(":/icons/skin/firewalled.svg"))); + m_connecStatusLblIcon->setIcon(QIcon(QLatin1String(":/icons/firewalled.svg"))); m_connecStatusLblIcon->setToolTip(QLatin1String("") + tr("Connection status:") + QLatin1String("
") + QLatin1String("") + tr("No direct connections. This may indicate network configuration problems.") + QLatin1String("")); } } diff --git a/src/gui/transferlistfilterswidget.cpp b/src/gui/transferlistfilterswidget.cpp index 8f0094591..115fb50d5 100644 --- a/src/gui/transferlistfilterswidget.cpp +++ b/src/gui/transferlistfilterswidget.cpp @@ -165,40 +165,40 @@ StatusFilterWidget::StatusFilterWidget(QWidget *parent, TransferListWidget *tran // Add status filters auto *all = new QListWidgetItem(this); all->setData(Qt::DisplayRole, tr("All (0)", "this is for the status filter")); - all->setData(Qt::DecorationRole, QIcon(":/icons/skin/filterall.svg")); + all->setData(Qt::DecorationRole, QIcon(":/icons/filterall.svg")); auto *downloading = new QListWidgetItem(this); downloading->setData(Qt::DisplayRole, tr("Downloading (0)")); - downloading->setData(Qt::DecorationRole, QIcon(":/icons/skin/downloading.svg")); + downloading->setData(Qt::DecorationRole, QIcon(":/icons/downloading.svg")); auto *seeding = new QListWidgetItem(this); seeding->setData(Qt::DisplayRole, tr("Seeding (0)")); - seeding->setData(Qt::DecorationRole, QIcon(":/icons/skin/uploading.svg")); + seeding->setData(Qt::DecorationRole, QIcon(":/icons/uploading.svg")); auto *completed = new QListWidgetItem(this); completed->setData(Qt::DisplayRole, tr("Completed (0)")); - completed->setData(Qt::DecorationRole, QIcon(":/icons/skin/completed.svg")); + completed->setData(Qt::DecorationRole, QIcon(":/icons/completed.svg")); auto *resumed = new QListWidgetItem(this); resumed->setData(Qt::DisplayRole, tr("Resumed (0)")); - resumed->setData(Qt::DecorationRole, QIcon(":/icons/skin/resumed.svg")); + resumed->setData(Qt::DecorationRole, QIcon(":/icons/resumed.svg")); auto *paused = new QListWidgetItem(this); paused->setData(Qt::DisplayRole, tr("Paused (0)")); - paused->setData(Qt::DecorationRole, QIcon(":/icons/skin/paused.svg")); + paused->setData(Qt::DecorationRole, QIcon(":/icons/paused.svg")); auto *active = new QListWidgetItem(this); active->setData(Qt::DisplayRole, tr("Active (0)")); - active->setData(Qt::DecorationRole, QIcon(":/icons/skin/filteractive.svg")); + active->setData(Qt::DecorationRole, QIcon(":/icons/filteractive.svg")); auto *inactive = new QListWidgetItem(this); inactive->setData(Qt::DisplayRole, tr("Inactive (0)")); - inactive->setData(Qt::DecorationRole, QIcon(":/icons/skin/filterinactive.svg")); + inactive->setData(Qt::DecorationRole, QIcon(":/icons/filterinactive.svg")); auto *stalled = new QListWidgetItem(this); stalled->setData(Qt::DisplayRole, tr("Stalled (0)")); - stalled->setData(Qt::DecorationRole, QIcon(":/icons/skin/filterstalled.svg")); + stalled->setData(Qt::DecorationRole, QIcon(":/icons/filterstalled.svg")); auto *stalledUploading = new QListWidgetItem(this); stalledUploading->setData(Qt::DisplayRole, tr("Stalled Uploading (0)")); - stalledUploading->setData(Qt::DecorationRole, QIcon(":/icons/skin/stalledUP.svg")); + stalledUploading->setData(Qt::DecorationRole, QIcon(":/icons/stalledUP.svg")); auto *stalledDownloading = new QListWidgetItem(this); stalledDownloading->setData(Qt::DisplayRole, tr("Stalled Downloading (0)")); - stalledDownloading->setData(Qt::DecorationRole, QIcon(":/icons/skin/stalledDL.svg")); + stalledDownloading->setData(Qt::DecorationRole, QIcon(":/icons/stalledDL.svg")); auto *errored = new QListWidgetItem(this); errored->setData(Qt::DisplayRole, tr("Errored (0)")); - errored->setData(Qt::DecorationRole, QIcon(":/icons/skin/error.svg")); + errored->setData(Qt::DecorationRole, QIcon(":/icons/error.svg")); const Preferences *const pref = Preferences::instance(); setCurrentRow(pref->getTransSelFilter(), QItemSelectionModel::SelectCurrent); diff --git a/src/gui/transferlistmodel.cpp b/src/gui/transferlistmodel.cpp index 5695a667b..e1dad59d1 100644 --- a/src/gui/transferlistmodel.cpp +++ b/src/gui/transferlistmodel.cpp @@ -727,55 +727,55 @@ QColor getDefaultColorByState(const BitTorrent::TorrentState state) QIcon getPausedIcon() { - static QIcon cached = QIcon(":/icons/skin/paused.svg"); + static QIcon cached = QIcon(":/icons/paused.svg"); return cached; } QIcon getQueuedIcon() { - static QIcon cached = QIcon(":/icons/skin/queued.svg"); + static QIcon cached = QIcon(":/icons/queued.svg"); return cached; } QIcon getDownloadingIcon() { - static QIcon cached = QIcon(":/icons/skin/downloading.svg"); + static QIcon cached = QIcon(":/icons/downloading.svg"); return cached; } QIcon getStalledDownloadingIcon() { - static QIcon cached = QIcon(":/icons/skin/stalledDL.svg"); + static QIcon cached = QIcon(":/icons/stalledDL.svg"); return cached; } QIcon getUploadingIcon() { - static QIcon cached = QIcon(":/icons/skin/uploading.svg"); + static QIcon cached = QIcon(":/icons/uploading.svg"); return cached; } QIcon getStalledUploadingIcon() { - static QIcon cached = QIcon(":/icons/skin/stalledUP.svg"); + static QIcon cached = QIcon(":/icons/stalledUP.svg"); return cached; } QIcon getCompletedIcon() { - static QIcon cached = QIcon(":/icons/skin/completed.svg"); + static QIcon cached = QIcon(":/icons/completed.svg"); return cached; } QIcon getCheckingIcon() { - static QIcon cached = QIcon(":/icons/skin/checking.svg"); + static QIcon cached = QIcon(":/icons/checking.svg"); return cached; } QIcon getErrorIcon() { - static QIcon cached = QIcon(":/icons/skin/error.svg"); + static QIcon cached = QIcon(":/icons/error.svg"); return cached; } diff --git a/src/gui/transferlistwidget.cpp b/src/gui/transferlistwidget.cpp index 952b68bed..889b95690 100644 --- a/src/gui/transferlistwidget.cpp +++ b/src/gui/transferlistwidget.cpp @@ -865,7 +865,7 @@ void TransferListWidget::displayListMenu(const QPoint &) connect(actionDelete, &QAction::triggered, this, &TransferListWidget::softDeleteSelectedTorrents); auto *actionPreviewFile = new QAction(UIThemeManager::instance()->getIcon("view-preview"), tr("Preview file..."), listMenu); connect(actionPreviewFile, &QAction::triggered, this, &TransferListWidget::previewSelectedTorrents); - auto *actionSetMaxRatio = new QAction(QIcon(QLatin1String(":/icons/skin/ratio.svg")), tr("Limit share ratio..."), listMenu); + auto *actionSetMaxRatio = new QAction(QIcon(QLatin1String(":/icons/ratio.svg")), tr("Limit share ratio..."), listMenu); connect(actionSetMaxRatio, &QAction::triggered, this, &TransferListWidget::setMaxRatioSelectedTorrents); auto *actionSetUploadLimit = new QAction(UIThemeManager::instance()->getIcon("kt-set-max-upload-speed"), tr("Limit upload rate..."), listMenu); connect(actionSetUploadLimit, &QAction::triggered, this, &TransferListWidget::setUpLimitSelectedTorrents); diff --git a/src/icons/qbt-theme/README.md b/src/icons/README.md similarity index 100% rename from src/icons/qbt-theme/README.md rename to src/icons/README.md diff --git a/src/icons/qbt-theme/application-exit.svg b/src/icons/application-exit.svg similarity index 100% rename from src/icons/qbt-theme/application-exit.svg rename to src/icons/application-exit.svg diff --git a/src/icons/qbt-theme/application-rss+xml.svg b/src/icons/application-rss+xml.svg similarity index 100% rename from src/icons/qbt-theme/application-rss+xml.svg rename to src/icons/application-rss+xml.svg diff --git a/src/icons/qbt-theme/application-x-mswinurl.svg b/src/icons/application-x-mswinurl.svg similarity index 100% rename from src/icons/qbt-theme/application-x-mswinurl.svg rename to src/icons/application-x-mswinurl.svg diff --git a/src/icons/skin/arrow-right.gif b/src/icons/arrow-right.gif similarity index 100% rename from src/icons/skin/arrow-right.gif rename to src/icons/arrow-right.gif diff --git a/src/icons/skin/bg-dropdown.gif b/src/icons/bg-dropdown.gif similarity index 100% rename from src/icons/skin/bg-dropdown.gif rename to src/icons/bg-dropdown.gif diff --git a/src/icons/skin/bg-handle-horizontal.gif b/src/icons/bg-handle-horizontal.gif similarity index 100% rename from src/icons/skin/bg-handle-horizontal.gif rename to src/icons/bg-handle-horizontal.gif diff --git a/src/icons/skin/bg-header.gif b/src/icons/bg-header.gif similarity index 100% rename from src/icons/skin/bg-header.gif rename to src/icons/bg-header.gif diff --git a/src/icons/skin/bg-panel-header.gif b/src/icons/bg-panel-header.gif similarity index 100% rename from src/icons/skin/bg-panel-header.gif rename to src/icons/bg-panel-header.gif diff --git a/src/icons/qbt-theme/build-icons/Gruntfile.js b/src/icons/build-icons/Gruntfile.js similarity index 100% rename from src/icons/qbt-theme/build-icons/Gruntfile.js rename to src/icons/build-icons/Gruntfile.js diff --git a/src/icons/qbt-theme/build-icons/package.json b/src/icons/build-icons/package.json similarity index 100% rename from src/icons/qbt-theme/build-icons/package.json rename to src/icons/build-icons/package.json diff --git a/src/icons/qbt-theme/build-icons/readme.md b/src/icons/build-icons/readme.md similarity index 100% rename from src/icons/qbt-theme/build-icons/readme.md rename to src/icons/build-icons/readme.md diff --git a/src/icons/qbt-theme/checked.svg b/src/icons/checked.svg similarity index 100% rename from src/icons/qbt-theme/checked.svg rename to src/icons/checked.svg diff --git a/src/icons/skin/checking.svg b/src/icons/checking.svg similarity index 100% rename from src/icons/skin/checking.svg rename to src/icons/checking.svg diff --git a/src/icons/skin/collapse.svg b/src/icons/collapse.svg similarity index 100% rename from src/icons/skin/collapse.svg rename to src/icons/collapse.svg diff --git a/src/icons/skin/completed.svg b/src/icons/completed.svg similarity index 100% rename from src/icons/skin/completed.svg rename to src/icons/completed.svg diff --git a/src/icons/qbt-theme/configure.svg b/src/icons/configure.svg similarity index 100% rename from src/icons/qbt-theme/configure.svg rename to src/icons/configure.svg diff --git a/src/icons/skin/connected.svg b/src/icons/connected.svg similarity index 100% rename from src/icons/skin/connected.svg rename to src/icons/connected.svg diff --git a/src/icons/qbt-theme/dialog-cancel.svg b/src/icons/dialog-cancel.svg similarity index 100% rename from src/icons/qbt-theme/dialog-cancel.svg rename to src/icons/dialog-cancel.svg diff --git a/src/icons/qbt-theme/dialog-information.svg b/src/icons/dialog-information.svg similarity index 100% rename from src/icons/qbt-theme/dialog-information.svg rename to src/icons/dialog-information.svg diff --git a/src/icons/qbt-theme/dialog-warning.svg b/src/icons/dialog-warning.svg similarity index 100% rename from src/icons/qbt-theme/dialog-warning.svg rename to src/icons/dialog-warning.svg diff --git a/src/icons/skin/disconnected.svg b/src/icons/disconnected.svg similarity index 100% rename from src/icons/skin/disconnected.svg rename to src/icons/disconnected.svg diff --git a/src/icons/skin/dock-tabs.gif b/src/icons/dock-tabs.gif similarity index 100% rename from src/icons/skin/dock-tabs.gif rename to src/icons/dock-tabs.gif diff --git a/src/icons/qbt-theme/document-edit-verify.svg b/src/icons/document-edit-verify.svg similarity index 100% rename from src/icons/qbt-theme/document-edit-verify.svg rename to src/icons/document-edit-verify.svg diff --git a/src/icons/qbt-theme/document-edit.svg b/src/icons/document-edit.svg similarity index 100% rename from src/icons/qbt-theme/document-edit.svg rename to src/icons/document-edit.svg diff --git a/src/icons/qbt-theme/document-encrypt.svg b/src/icons/document-encrypt.svg similarity index 100% rename from src/icons/qbt-theme/document-encrypt.svg rename to src/icons/document-encrypt.svg diff --git a/src/icons/qbt-theme/document-import.svg b/src/icons/document-import.svg similarity index 100% rename from src/icons/qbt-theme/document-import.svg rename to src/icons/document-import.svg diff --git a/src/icons/qbt-theme/document-new.svg b/src/icons/document-new.svg similarity index 100% rename from src/icons/qbt-theme/document-new.svg rename to src/icons/document-new.svg diff --git a/src/icons/qbt-theme/document-properties.svg b/src/icons/document-properties.svg similarity index 100% rename from src/icons/qbt-theme/document-properties.svg rename to src/icons/document-properties.svg diff --git a/src/icons/qbt-theme/document-save.svg b/src/icons/document-save.svg similarity index 100% rename from src/icons/qbt-theme/document-save.svg rename to src/icons/document-save.svg diff --git a/src/icons/qbt-theme/download.svg b/src/icons/download.svg similarity index 100% rename from src/icons/qbt-theme/download.svg rename to src/icons/download.svg diff --git a/src/icons/skin/downloading.svg b/src/icons/downloading.svg similarity index 100% rename from src/icons/skin/downloading.svg rename to src/icons/downloading.svg diff --git a/src/icons/skin/download.svg b/src/icons/downloading_small.svg similarity index 100% rename from src/icons/skin/download.svg rename to src/icons/downloading_small.svg diff --git a/src/icons/qbt-theme/edit-clear-history.svg b/src/icons/edit-clear-history.svg similarity index 100% rename from src/icons/qbt-theme/edit-clear-history.svg rename to src/icons/edit-clear-history.svg diff --git a/src/icons/qbt-theme/edit-clear.svg b/src/icons/edit-clear.svg similarity index 100% rename from src/icons/qbt-theme/edit-clear.svg rename to src/icons/edit-clear.svg diff --git a/src/icons/qbt-theme/edit-copy.svg b/src/icons/edit-copy.svg similarity index 100% rename from src/icons/qbt-theme/edit-copy.svg rename to src/icons/edit-copy.svg diff --git a/src/icons/qbt-theme/edit-cut.svg b/src/icons/edit-cut.svg similarity index 100% rename from src/icons/qbt-theme/edit-cut.svg rename to src/icons/edit-cut.svg diff --git a/src/icons/qbt-theme/edit-delete.svg b/src/icons/edit-delete.svg similarity index 100% rename from src/icons/qbt-theme/edit-delete.svg rename to src/icons/edit-delete.svg diff --git a/src/icons/qbt-theme/edit-find-user.svg b/src/icons/edit-find-user.svg similarity index 100% rename from src/icons/qbt-theme/edit-find-user.svg rename to src/icons/edit-find-user.svg diff --git a/src/icons/qbt-theme/edit-find.svg b/src/icons/edit-find.svg similarity index 100% rename from src/icons/qbt-theme/edit-find.svg rename to src/icons/edit-find.svg diff --git a/src/icons/qbt-theme/edit-paste.svg b/src/icons/edit-paste.svg similarity index 100% rename from src/icons/qbt-theme/edit-paste.svg rename to src/icons/edit-paste.svg diff --git a/src/icons/qbt-theme/edit-rename.svg b/src/icons/edit-rename.svg similarity index 100% rename from src/icons/qbt-theme/edit-rename.svg rename to src/icons/edit-rename.svg diff --git a/src/icons/skin/error.svg b/src/icons/error.svg similarity index 100% rename from src/icons/skin/error.svg rename to src/icons/error.svg diff --git a/src/icons/skin/expand.svg b/src/icons/expand.svg similarity index 100% rename from src/icons/skin/expand.svg rename to src/icons/expand.svg diff --git a/src/icons/skin/filteractive.svg b/src/icons/filteractive.svg similarity index 100% rename from src/icons/skin/filteractive.svg rename to src/icons/filteractive.svg diff --git a/src/icons/skin/filterall.svg b/src/icons/filterall.svg similarity index 100% rename from src/icons/skin/filterall.svg rename to src/icons/filterall.svg diff --git a/src/icons/skin/filterinactive.svg b/src/icons/filterinactive.svg similarity index 100% rename from src/icons/skin/filterinactive.svg rename to src/icons/filterinactive.svg diff --git a/src/icons/skin/filterstalled.svg b/src/icons/filterstalled.svg similarity index 100% rename from src/icons/skin/filterstalled.svg rename to src/icons/filterstalled.svg diff --git a/src/icons/skin/firewalled.svg b/src/icons/firewalled.svg similarity index 100% rename from src/icons/skin/firewalled.svg rename to src/icons/firewalled.svg diff --git a/src/icons/qbt-theme/folder-documents.svg b/src/icons/folder-documents.svg similarity index 100% rename from src/icons/qbt-theme/folder-documents.svg rename to src/icons/folder-documents.svg diff --git a/src/icons/qbt-theme/folder-download.svg b/src/icons/folder-download.svg similarity index 100% rename from src/icons/qbt-theme/folder-download.svg rename to src/icons/folder-download.svg diff --git a/src/icons/qbt-theme/folder-new.svg b/src/icons/folder-new.svg similarity index 100% rename from src/icons/qbt-theme/folder-new.svg rename to src/icons/folder-new.svg diff --git a/src/icons/qbt-theme/folder-remote.svg b/src/icons/folder-remote.svg similarity index 100% rename from src/icons/qbt-theme/folder-remote.svg rename to src/icons/folder-remote.svg diff --git a/src/icons/qbt-theme/gear.svg b/src/icons/gear.svg similarity index 100% rename from src/icons/qbt-theme/gear.svg rename to src/icons/gear.svg diff --git a/src/icons/qbt-theme/gear32.svg b/src/icons/gear32.svg similarity index 100% rename from src/icons/qbt-theme/gear32.svg rename to src/icons/gear32.svg diff --git a/src/icons/qbt-theme/go-bottom.svg b/src/icons/go-bottom.svg similarity index 100% rename from src/icons/qbt-theme/go-bottom.svg rename to src/icons/go-bottom.svg diff --git a/src/icons/qbt-theme/go-down.svg b/src/icons/go-down.svg similarity index 100% rename from src/icons/qbt-theme/go-down.svg rename to src/icons/go-down.svg diff --git a/src/icons/qbt-theme/go-top.svg b/src/icons/go-top.svg similarity index 100% rename from src/icons/qbt-theme/go-top.svg rename to src/icons/go-top.svg diff --git a/src/icons/qbt-theme/go-up.svg b/src/icons/go-up.svg similarity index 100% rename from src/icons/qbt-theme/go-up.svg rename to src/icons/go-up.svg diff --git a/src/icons/skin/handle-icon-horizontal.gif b/src/icons/handle-icon-horizontal.gif similarity index 100% rename from src/icons/skin/handle-icon-horizontal.gif rename to src/icons/handle-icon-horizontal.gif diff --git a/src/icons/skin/handle-icon.gif b/src/icons/handle-icon.gif similarity index 100% rename from src/icons/skin/handle-icon.gif rename to src/icons/handle-icon.gif diff --git a/src/icons/qbt-theme/help-about.svg b/src/icons/help-about.svg similarity index 100% rename from src/icons/qbt-theme/help-about.svg rename to src/icons/help-about.svg diff --git a/src/icons/qbt-theme/help-contents.svg b/src/icons/help-contents.svg similarity index 100% rename from src/icons/qbt-theme/help-contents.svg rename to src/icons/help-contents.svg diff --git a/src/icons/icons.qrc b/src/icons/icons.qrc index 341d1f5d8..04beda8b1 100644 --- a/src/icons/icons.qrc +++ b/src/icons/icons.qrc @@ -1,6 +1,52 @@ 3-state-checkbox.gif + application-exit.svg + application-rss+xml.svg + application-x-mswinurl.svg + arrow-right.gif + bg-dropdown.gif + bg-handle-horizontal.gif + bg-header.gif + bg-panel-header.gif + checked.svg + checking.svg + collapse.svg + completed.svg + configure.svg + connected.svg + dialog-cancel.svg + dialog-information.svg + dialog-warning.svg + disconnected.svg + dock-tabs.gif + document-edit-verify.svg + document-edit.svg + document-encrypt.svg + document-import.svg + document-new.svg + document-properties.svg + document-save.svg + download.svg + downloading.svg + downloading_small.svg + edit-clear-history.svg + edit-clear.svg + edit-copy.svg + edit-cut.svg + edit-delete.svg + edit-find-user.svg + edit-find.svg + edit-paste.svg + edit-rename.svg + error.svg + expand.svg + fileicon.svg + filteractive.svg + filterall.svg + filterinactive.svg + filterstalled.svg + firewalled.svg flags/ad.svg flags/ae.svg flags/af.svg @@ -141,6 +187,7 @@ flags/mc.svg flags/md.svg flags/me.svg + flags/mf.svg flags/mg.svg flags/mh.svg flags/mk.svg @@ -249,138 +296,97 @@ flags/za.svg flags/zm.svg flags/zw.svg + folder-documents.svg + folder-download.svg + folder-new.svg + folder-remote.svg + gear.svg + gear32.svg + go-bottom.svg + go-down.svg + go-top.svg + go-up.svg + handle-icon-horizontal.gif + handle-icon.gif + help-about.svg + help-contents.svg + inode-directory.svg + insert-link.svg + knob.gif + kt-magnet.svg + kt-set-max-download-speed.svg + kt-set-max-upload-speed.svg L.gif + list-add.svg + list-remove.svg loading.png - qbt-theme/application-exit.svg - qbt-theme/application-rss+xml.svg - qbt-theme/application-x-mswinurl.svg - qbt-theme/checked.svg - qbt-theme/configure.svg - qbt-theme/dialog-cancel.svg - qbt-theme/dialog-information.svg - qbt-theme/dialog-warning.svg - qbt-theme/document-edit-verify.svg - qbt-theme/document-edit.svg - qbt-theme/document-encrypt.svg - qbt-theme/document-import.svg - qbt-theme/document-new.svg - qbt-theme/document-properties.svg - qbt-theme/document-save.svg - qbt-theme/download.svg - qbt-theme/edit-clear-history.svg - qbt-theme/edit-clear.svg - qbt-theme/edit-copy.svg - qbt-theme/edit-cut.svg - qbt-theme/edit-delete.svg - qbt-theme/edit-find-user.svg - qbt-theme/edit-find.svg - qbt-theme/edit-paste.svg - qbt-theme/edit-rename.svg - qbt-theme/folder-documents.svg - qbt-theme/folder-download.svg - qbt-theme/folder-new.svg - qbt-theme/folder-remote.svg - qbt-theme/gear.svg - qbt-theme/gear32.svg - qbt-theme/go-bottom.svg - qbt-theme/go-down.svg - qbt-theme/go-top.svg - qbt-theme/go-up.svg - qbt-theme/help-about.svg - qbt-theme/help-contents.svg - qbt-theme/inode-directory.svg - qbt-theme/insert-link.svg - qbt-theme/kt-magnet.svg - qbt-theme/kt-set-max-download-speed.svg - qbt-theme/kt-set-max-upload-speed.svg - qbt-theme/list-add.svg - qbt-theme/list-remove.svg - qbt-theme/mail-folder-inbox.svg - qbt-theme/mail-mark-read.svg - qbt-theme/media-playback-pause.svg - qbt-theme/media-playback-start.svg - qbt-theme/media-seek-forward.svg - qbt-theme/network-server.svg - qbt-theme/network-wired.svg - qbt-theme/object-locked.svg - qbt-theme/office-chart-line.svg - qbt-theme/preferences-desktop.svg - qbt-theme/preferences-other.svg - qbt-theme/preferences-system-network.svg - qbt-theme/preferences-web-browser-cookies.svg - qbt-theme/rss-config.svg - qbt-theme/security-high.svg - qbt-theme/security-low.svg - qbt-theme/services.svg - qbt-theme/speedometer.svg - qbt-theme/system-log-out.svg - qbt-theme/tab-close.svg - qbt-theme/task-attention.svg - qbt-theme/task-complete.svg - qbt-theme/task-ongoing.svg - qbt-theme/task-reject.svg - qbt-theme/text-plain.svg - qbt-theme/tools-report-bug.svg - qbt-theme/unavailable.svg - qbt-theme/user-group-delete.svg - qbt-theme/user-group-new.svg - qbt-theme/view-calendar-journal.svg - qbt-theme/view-categories.svg - qbt-theme/view-filter.svg - qbt-theme/view-preview.svg - qbt-theme/view-refresh.svg - qbt-theme/view-statistics.svg - qbt-theme/wallet-open.svg - qbt-theme/webui.svg - skin/arrow-right.gif - skin/bg-dropdown.gif - skin/bg-handle-horizontal.gif - skin/bg-header.gif - skin/bg-panel-header.gif - skin/checking.svg - skin/collapse.svg - skin/completed.svg - skin/connected.svg - skin/disconnected.svg - skin/dock-tabs.gif - skin/download.svg - skin/downloading.svg - skin/error.svg - skin/filteractive.svg - skin/filterall.svg - skin/filterinactive.svg - skin/filterstalled.svg - skin/firewalled.svg - skin/handle-icon-horizontal.gif - skin/handle-icon.gif - skin/knob.gif - skin/logo-blank.gif - skin/logo.gif - skin/logo2.gif - skin/mascot.png - skin/paused.svg - skin/qbittorrent-tray.svg - skin/qbittorrent-tray-dark.svg - skin/qbittorrent-tray-light.svg - skin/qbittorrent32.png - skin/queued.svg - skin/ratio.svg - skin/resumed.svg - skin/seeding.svg - skin/slider-area.gif - skin/spacer.gif - skin/spinner-placeholder.gif - skin/spinner.gif - skin/splash.png - skin/stalledDL.svg - skin/stalledUP.svg - skin/tabs.gif - skin/toolbox-divider.gif - skin/toolbox-divider2.gif - skin/uploading.svg + logo-blank.gif + logo.gif + logo2.gif + mail-folder-inbox.svg + mail-mark-read.svg + mascot.png + media-playback-pause.svg + media-playback-start.svg + media-seek-forward.svg + network-server.svg + network-wired.svg + object-locked.svg + office-chart-line.svg + paused.svg + preferences-desktop.svg + preferences-other.svg + preferences-system-network.svg + preferences-web-browser-cookies.svg + qbittorrent-tray-dark.svg + qbittorrent-tray-light.svg + qbittorrent-tray-with-font.svg + qbittorrent-tray.svg + qbittorrent.ico + qbittorrent32.png + qbittorrent_file.ico + queued.svg + ratio.svg + resumed.svg + rss-config.svg + security-high.svg + security-low.svg + seeding.svg + services.svg + slider-area.gif slow.svg slow_off.svg + spacer.gif + speedometer.svg sphere.png sphere2.png + spinner-placeholder.gif + spinner.gif + splash.png + stalledDL.svg + stalledUP.svg + system-log-out.svg + tab-close.svg + tabs.gif + task-attention.svg + task-complete.svg + task-ongoing.svg + task-reject.svg + text-plain.svg + toolbox-divider.gif + toolbox-divider2.gif + tools-report-bug.svg + unavailable.svg + uploading.svg + user-group-delete.svg + user-group-new.svg + view-calendar-journal.svg + view-categories.svg + view-filter.svg + view-preview.svg + view-refresh.svg + view-statistics.svg + wallet-open.svg + webui.svg diff --git a/src/icons/qbt-theme/inode-directory.svg b/src/icons/inode-directory.svg similarity index 100% rename from src/icons/qbt-theme/inode-directory.svg rename to src/icons/inode-directory.svg diff --git a/src/icons/qbt-theme/insert-link.svg b/src/icons/insert-link.svg similarity index 100% rename from src/icons/qbt-theme/insert-link.svg rename to src/icons/insert-link.svg diff --git a/src/icons/skin/knob.gif b/src/icons/knob.gif similarity index 100% rename from src/icons/skin/knob.gif rename to src/icons/knob.gif diff --git a/src/icons/qbt-theme/kt-magnet.svg b/src/icons/kt-magnet.svg similarity index 100% rename from src/icons/qbt-theme/kt-magnet.svg rename to src/icons/kt-magnet.svg diff --git a/src/icons/qbt-theme/kt-set-max-download-speed.svg b/src/icons/kt-set-max-download-speed.svg similarity index 100% rename from src/icons/qbt-theme/kt-set-max-download-speed.svg rename to src/icons/kt-set-max-download-speed.svg diff --git a/src/icons/qbt-theme/kt-set-max-upload-speed.svg b/src/icons/kt-set-max-upload-speed.svg similarity index 100% rename from src/icons/qbt-theme/kt-set-max-upload-speed.svg rename to src/icons/kt-set-max-upload-speed.svg diff --git a/src/icons/qbt-theme/list-add.svg b/src/icons/list-add.svg similarity index 100% rename from src/icons/qbt-theme/list-add.svg rename to src/icons/list-add.svg diff --git a/src/icons/qbt-theme/list-remove.svg b/src/icons/list-remove.svg similarity index 100% rename from src/icons/qbt-theme/list-remove.svg rename to src/icons/list-remove.svg diff --git a/src/icons/skin/logo-blank.gif b/src/icons/logo-blank.gif similarity index 100% rename from src/icons/skin/logo-blank.gif rename to src/icons/logo-blank.gif diff --git a/src/icons/skin/logo.gif b/src/icons/logo.gif similarity index 100% rename from src/icons/skin/logo.gif rename to src/icons/logo.gif diff --git a/src/icons/skin/logo2.gif b/src/icons/logo2.gif similarity index 100% rename from src/icons/skin/logo2.gif rename to src/icons/logo2.gif diff --git a/src/icons/qbt-theme/mail-folder-inbox.svg b/src/icons/mail-folder-inbox.svg similarity index 100% rename from src/icons/qbt-theme/mail-folder-inbox.svg rename to src/icons/mail-folder-inbox.svg diff --git a/src/icons/qbt-theme/mail-mark-read.svg b/src/icons/mail-mark-read.svg similarity index 100% rename from src/icons/qbt-theme/mail-mark-read.svg rename to src/icons/mail-mark-read.svg diff --git a/src/icons/skin/mascot.png b/src/icons/mascot.png similarity index 100% rename from src/icons/skin/mascot.png rename to src/icons/mascot.png diff --git a/src/icons/qbt-theme/media-playback-pause.svg b/src/icons/media-playback-pause.svg similarity index 100% rename from src/icons/qbt-theme/media-playback-pause.svg rename to src/icons/media-playback-pause.svg diff --git a/src/icons/qbt-theme/media-playback-start.svg b/src/icons/media-playback-start.svg similarity index 100% rename from src/icons/qbt-theme/media-playback-start.svg rename to src/icons/media-playback-start.svg diff --git a/src/icons/qbt-theme/media-seek-forward.svg b/src/icons/media-seek-forward.svg similarity index 100% rename from src/icons/qbt-theme/media-seek-forward.svg rename to src/icons/media-seek-forward.svg diff --git a/src/icons/qbt-theme/network-server.svg b/src/icons/network-server.svg similarity index 100% rename from src/icons/qbt-theme/network-server.svg rename to src/icons/network-server.svg diff --git a/src/icons/qbt-theme/network-wired.svg b/src/icons/network-wired.svg similarity index 100% rename from src/icons/qbt-theme/network-wired.svg rename to src/icons/network-wired.svg diff --git a/src/icons/qbt-theme/object-locked.svg b/src/icons/object-locked.svg similarity index 100% rename from src/icons/qbt-theme/object-locked.svg rename to src/icons/object-locked.svg diff --git a/src/icons/qbt-theme/office-chart-line.svg b/src/icons/office-chart-line.svg similarity index 100% rename from src/icons/qbt-theme/office-chart-line.svg rename to src/icons/office-chart-line.svg diff --git a/src/icons/skin/paused.svg b/src/icons/paused.svg similarity index 100% rename from src/icons/skin/paused.svg rename to src/icons/paused.svg diff --git a/src/icons/qbt-theme/preferences-desktop.svg b/src/icons/preferences-desktop.svg similarity index 100% rename from src/icons/qbt-theme/preferences-desktop.svg rename to src/icons/preferences-desktop.svg diff --git a/src/icons/qbt-theme/preferences-other.svg b/src/icons/preferences-other.svg similarity index 100% rename from src/icons/qbt-theme/preferences-other.svg rename to src/icons/preferences-other.svg diff --git a/src/icons/qbt-theme/preferences-system-network.svg b/src/icons/preferences-system-network.svg similarity index 100% rename from src/icons/qbt-theme/preferences-system-network.svg rename to src/icons/preferences-system-network.svg diff --git a/src/icons/qbt-theme/preferences-web-browser-cookies.svg b/src/icons/preferences-web-browser-cookies.svg similarity index 100% rename from src/icons/qbt-theme/preferences-web-browser-cookies.svg rename to src/icons/preferences-web-browser-cookies.svg diff --git a/src/icons/skin/qbittorrent-tray-dark.svg b/src/icons/qbittorrent-tray-dark.svg similarity index 100% rename from src/icons/skin/qbittorrent-tray-dark.svg rename to src/icons/qbittorrent-tray-dark.svg diff --git a/src/icons/skin/qbittorrent-tray-light.svg b/src/icons/qbittorrent-tray-light.svg similarity index 100% rename from src/icons/skin/qbittorrent-tray-light.svg rename to src/icons/qbittorrent-tray-light.svg diff --git a/src/icons/skin/qbittorrent-tray-with-font.svg b/src/icons/qbittorrent-tray-with-font.svg similarity index 100% rename from src/icons/skin/qbittorrent-tray-with-font.svg rename to src/icons/qbittorrent-tray-with-font.svg diff --git a/src/icons/skin/qbittorrent-tray.svg b/src/icons/qbittorrent-tray.svg similarity index 100% rename from src/icons/skin/qbittorrent-tray.svg rename to src/icons/qbittorrent-tray.svg diff --git a/src/icons/skin/qbittorrent32.png b/src/icons/qbittorrent32.png similarity index 100% rename from src/icons/skin/qbittorrent32.png rename to src/icons/qbittorrent32.png diff --git a/src/icons/skin/queued.svg b/src/icons/queued.svg similarity index 100% rename from src/icons/skin/queued.svg rename to src/icons/queued.svg diff --git a/src/icons/skin/ratio.svg b/src/icons/ratio.svg similarity index 100% rename from src/icons/skin/ratio.svg rename to src/icons/ratio.svg diff --git a/src/icons/skin/resumed.svg b/src/icons/resumed.svg similarity index 100% rename from src/icons/skin/resumed.svg rename to src/icons/resumed.svg diff --git a/src/icons/qbt-theme/rss-config.svg b/src/icons/rss-config.svg similarity index 100% rename from src/icons/qbt-theme/rss-config.svg rename to src/icons/rss-config.svg diff --git a/src/icons/qbt-theme/security-high.svg b/src/icons/security-high.svg similarity index 100% rename from src/icons/qbt-theme/security-high.svg rename to src/icons/security-high.svg diff --git a/src/icons/qbt-theme/security-low.svg b/src/icons/security-low.svg similarity index 100% rename from src/icons/qbt-theme/security-low.svg rename to src/icons/security-low.svg diff --git a/src/icons/skin/seeding.svg b/src/icons/seeding.svg similarity index 100% rename from src/icons/skin/seeding.svg rename to src/icons/seeding.svg diff --git a/src/icons/qbt-theme/services.svg b/src/icons/services.svg similarity index 100% rename from src/icons/qbt-theme/services.svg rename to src/icons/services.svg diff --git a/src/icons/skin/build-icons/Gruntfile.js b/src/icons/skin/build-icons/Gruntfile.js deleted file mode 100644 index 2a88a4639..000000000 --- a/src/icons/skin/build-icons/Gruntfile.js +++ /dev/null @@ -1,22 +0,0 @@ -module.exports = function(grunt) { - - grunt.initConfig({ - svg2png: { - all: { - options:{ - size: 256 - }, - files: [ - { - src: ['icons/*.svg'] - } - ] - } - } - }); - - grunt.loadNpmTasks('grunt-svg2png'); - - grunt.registerTask('default', ['svg2png']); - -} \ No newline at end of file diff --git a/src/icons/skin/build-icons/package.json b/src/icons/skin/build-icons/package.json deleted file mode 100644 index c4e5b5ca3..000000000 --- a/src/icons/skin/build-icons/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "build-icons", - "version": "1.0.0", - "description": "Convert svg icons to png", - "main": "index.js", - "dependencies": {}, - "devDependencies": { - "grunt": "^0.4.5", - "grunt-svg2png": "git+https://git@github.com/bertyhell/grunt-svg2png.git" - }, - "author": "Bert Verhelst", - "license": "ISC" -} diff --git a/src/icons/skin/build-icons/readme.md b/src/icons/skin/build-icons/readme.md deleted file mode 100644 index 97c3fd44f..000000000 --- a/src/icons/skin/build-icons/readme.md +++ /dev/null @@ -1,14 +0,0 @@ -Convert SVG icons to PNG ------------------------- - -install npm - -Execute: -``` -npm install -``` - -Convert icons by running: -``` -grunt -``` \ No newline at end of file diff --git a/src/icons/skin/slider-area.gif b/src/icons/slider-area.gif similarity index 100% rename from src/icons/skin/slider-area.gif rename to src/icons/slider-area.gif diff --git a/src/icons/skin/spacer.gif b/src/icons/spacer.gif similarity index 100% rename from src/icons/skin/spacer.gif rename to src/icons/spacer.gif diff --git a/src/icons/qbt-theme/speedometer.svg b/src/icons/speedometer.svg similarity index 100% rename from src/icons/qbt-theme/speedometer.svg rename to src/icons/speedometer.svg diff --git a/src/icons/skin/spinner-placeholder.gif b/src/icons/spinner-placeholder.gif similarity index 100% rename from src/icons/skin/spinner-placeholder.gif rename to src/icons/spinner-placeholder.gif diff --git a/src/icons/skin/spinner.gif b/src/icons/spinner.gif similarity index 100% rename from src/icons/skin/spinner.gif rename to src/icons/spinner.gif diff --git a/src/icons/skin/splash.png b/src/icons/splash.png similarity index 100% rename from src/icons/skin/splash.png rename to src/icons/splash.png diff --git a/src/icons/skin/stalledDL.svg b/src/icons/stalledDL.svg similarity index 100% rename from src/icons/skin/stalledDL.svg rename to src/icons/stalledDL.svg diff --git a/src/icons/skin/stalledUP.svg b/src/icons/stalledUP.svg similarity index 100% rename from src/icons/skin/stalledUP.svg rename to src/icons/stalledUP.svg diff --git a/src/icons/qbt-theme/system-log-out.svg b/src/icons/system-log-out.svg similarity index 100% rename from src/icons/qbt-theme/system-log-out.svg rename to src/icons/system-log-out.svg diff --git a/src/icons/qbt-theme/tab-close.svg b/src/icons/tab-close.svg similarity index 100% rename from src/icons/qbt-theme/tab-close.svg rename to src/icons/tab-close.svg diff --git a/src/icons/skin/tabs.gif b/src/icons/tabs.gif similarity index 100% rename from src/icons/skin/tabs.gif rename to src/icons/tabs.gif diff --git a/src/icons/qbt-theme/task-attention.svg b/src/icons/task-attention.svg similarity index 100% rename from src/icons/qbt-theme/task-attention.svg rename to src/icons/task-attention.svg diff --git a/src/icons/qbt-theme/task-complete.svg b/src/icons/task-complete.svg similarity index 100% rename from src/icons/qbt-theme/task-complete.svg rename to src/icons/task-complete.svg diff --git a/src/icons/qbt-theme/task-ongoing.svg b/src/icons/task-ongoing.svg similarity index 100% rename from src/icons/qbt-theme/task-ongoing.svg rename to src/icons/task-ongoing.svg diff --git a/src/icons/qbt-theme/task-reject.svg b/src/icons/task-reject.svg similarity index 100% rename from src/icons/qbt-theme/task-reject.svg rename to src/icons/task-reject.svg diff --git a/src/icons/qbt-theme/text-plain.svg b/src/icons/text-plain.svg similarity index 100% rename from src/icons/qbt-theme/text-plain.svg rename to src/icons/text-plain.svg diff --git a/src/icons/skin/toolbox-divider.gif b/src/icons/toolbox-divider.gif similarity index 100% rename from src/icons/skin/toolbox-divider.gif rename to src/icons/toolbox-divider.gif diff --git a/src/icons/skin/toolbox-divider2.gif b/src/icons/toolbox-divider2.gif similarity index 100% rename from src/icons/skin/toolbox-divider2.gif rename to src/icons/toolbox-divider2.gif diff --git a/src/icons/qbt-theme/tools-report-bug.svg b/src/icons/tools-report-bug.svg similarity index 100% rename from src/icons/qbt-theme/tools-report-bug.svg rename to src/icons/tools-report-bug.svg diff --git a/src/icons/qbt-theme/unavailable.svg b/src/icons/unavailable.svg similarity index 100% rename from src/icons/qbt-theme/unavailable.svg rename to src/icons/unavailable.svg diff --git a/src/icons/skin/uploading.svg b/src/icons/uploading.svg similarity index 100% rename from src/icons/skin/uploading.svg rename to src/icons/uploading.svg diff --git a/src/icons/qbt-theme/user-group-delete.svg b/src/icons/user-group-delete.svg similarity index 100% rename from src/icons/qbt-theme/user-group-delete.svg rename to src/icons/user-group-delete.svg diff --git a/src/icons/qbt-theme/user-group-new.svg b/src/icons/user-group-new.svg similarity index 100% rename from src/icons/qbt-theme/user-group-new.svg rename to src/icons/user-group-new.svg diff --git a/src/icons/qbt-theme/view-calendar-journal.svg b/src/icons/view-calendar-journal.svg similarity index 100% rename from src/icons/qbt-theme/view-calendar-journal.svg rename to src/icons/view-calendar-journal.svg diff --git a/src/icons/qbt-theme/view-categories.svg b/src/icons/view-categories.svg similarity index 100% rename from src/icons/qbt-theme/view-categories.svg rename to src/icons/view-categories.svg diff --git a/src/icons/qbt-theme/view-filter.svg b/src/icons/view-filter.svg similarity index 100% rename from src/icons/qbt-theme/view-filter.svg rename to src/icons/view-filter.svg diff --git a/src/icons/qbt-theme/view-preview.svg b/src/icons/view-preview.svg similarity index 100% rename from src/icons/qbt-theme/view-preview.svg rename to src/icons/view-preview.svg diff --git a/src/icons/qbt-theme/view-refresh.svg b/src/icons/view-refresh.svg similarity index 100% rename from src/icons/qbt-theme/view-refresh.svg rename to src/icons/view-refresh.svg diff --git a/src/icons/qbt-theme/view-statistics.svg b/src/icons/view-statistics.svg similarity index 100% rename from src/icons/qbt-theme/view-statistics.svg rename to src/icons/view-statistics.svg diff --git a/src/icons/qbt-theme/wallet-open.svg b/src/icons/wallet-open.svg similarity index 100% rename from src/icons/qbt-theme/wallet-open.svg rename to src/icons/wallet-open.svg diff --git a/src/icons/qbt-theme/webui.svg b/src/icons/webui.svg similarity index 100% rename from src/icons/qbt-theme/webui.svg rename to src/icons/webui.svg diff --git a/src/webui/www/private/css/Layout.css b/src/webui/www/private/css/Layout.css index aab95d73b..e95c271bb 100644 --- a/src/webui/www/private/css/Layout.css +++ b/src/webui/www/private/css/Layout.css @@ -43,13 +43,13 @@ body { position: relative; height: 45px; overflow: hidden; - background: #718BA6 url(../images/skin/bg-header.gif) repeat-x; + background: #718BA6 url(../images/bg-header.gif) repeat-x; } #desktopTitlebar { padding: 7px 8px 6px 8px; height: 32px; - background: url(../images/skin/logo.gif) no-repeat; + background: url(../images/logo.gif) no-repeat; background-position: left 0; } @@ -141,14 +141,14 @@ body { } #desktopNavbar ul li a.arrow-right, #desktopNavbar ul li a:hover.arrow-right { - background-image: url(../images/skin/arrow-right.gif); + background-image: url(../images/arrow-right.gif); background-repeat: no-repeat; background-position: right 7px; } #desktopNavbar li ul { border: 1px solid #3f3f3f; - background: #fff url(../images/skin/bg-dropdown.gif) repeat-y; + background: #fff url(../images/bg-dropdown.gif) repeat-y; position: absolute; left: -999em; z-index: 8000; @@ -290,7 +290,7 @@ li.divider { .panel-header { position: relative; - background: #f1f1f1 url(../images/skin/bg-panel-header.gif) repeat-x; + background: #f1f1f1 url(../images/bg-panel-header.gif) repeat-x; height: 30px; overflow: hidden; border-bottom: 1px solid #d3d3d3; @@ -301,7 +301,7 @@ li.divider { } .panel-headerContent.tabs { - background: url(../images/skin/tabs.gif) repeat-x; + background: url(../images/tabs.gif) repeat-x; background-position: left -68px; } @@ -316,11 +316,11 @@ li.divider { } .panel-collapse { - background: url(../images/skin/collapse.svg) left top no-repeat; + background: url(../images/collapse.svg) left top no-repeat; } .panel-expand { - background: url(../images/skin/collapse.svg) left top no-repeat; + background: url(../images/collapse.svg) left top no-repeat; transform: rotate(180deg); } @@ -336,7 +336,7 @@ li.divider { line-height: 1px; font-size: 1px; overflow: hidden; - background: #eee url(../images/skin/bg-handle-horizontal.gif) repeat-x; + background: #eee url(../images/bg-handle-horizontal.gif) repeat-x; } .horizontalHandle.detached .handleIcon { @@ -349,7 +349,7 @@ li.divider { line-height: 1px; font-size: 1px; overflow: hidden; - background: url(../images/skin/handle-icon-horizontal.gif) center center no-repeat; + background: url(../images/handle-icon-horizontal.gif) center center no-repeat; } .columnHandle { @@ -357,7 +357,7 @@ li.divider { float: left; width: 4px; overflow: hidden; - background: #c3c3c3 url(../images/skin/handle-icon.gif) center center no-repeat; + background: #c3c3c3 url(../images/handle-icon.gif) center center no-repeat; border: 1px solid #909090; border-top: 0; border-bottom: 0; @@ -378,7 +378,7 @@ li.divider { } div.toolbox.divider { /* Have to specify div here for IE6's sake */ - background: url(../images/skin/toolbox-divider.gif) repeat-y; + background: url(../images/toolbox-divider.gif) repeat-y; padding-left: 8px; } @@ -413,13 +413,13 @@ div.toolbox.divider { /* Have to specify div here for IE6's sake */ #spinnerWrapper { width: 16px; height: 16px; - background: url(../images/skin/spinner-placeholder.gif) no-repeat; + background: url(../images/spinner-placeholder.gif) no-repeat; margin: 4px 5px 0 5px; } #spinner { display: none; - background: url(../images/skin/spinner.gif) no-repeat; + background: url(../images/spinner.gif) no-repeat; width: 16px; height: 16px; } diff --git a/src/webui/www/private/css/Tabs.css b/src/webui/www/private/css/Tabs.css index fb438eb64..c6c115d35 100644 --- a/src/webui/www/private/css/Tabs.css +++ b/src/webui/www/private/css/Tabs.css @@ -19,7 +19,7 @@ Required by: .toolbarTabs { padding: 0 5px 2px 2px; - background: url(../images/skin/tabs.gif) repeat-x; + background: url(../images/tabs.gif) repeat-x; background-position: left -70px; overflow: visible; } @@ -38,12 +38,12 @@ Required by: float: left; margin: 0 0 5px 0; cursor: pointer; - background: url(../images/skin/tabs.gif) repeat-x; + background: url(../images/tabs.gif) repeat-x; background-position: left -35px; } .tab-menu li.selected { - background: url(../images/skin/tabs.gif) repeat-x; + background: url(../images/tabs.gif) repeat-x; background-position: left 0; } @@ -54,13 +54,13 @@ Required by: text-align: center; font-weight: normal; color: #181818; - background: url(../images/skin/tabs.gif) repeat-x; + background: url(../images/tabs.gif) repeat-x; background-position: right -35px; } .tab-menu li.selected a { color: #181818; font-weight: bold; - background: url(../images/skin/tabs.gif) repeat-x; + background: url(../images/tabs.gif) repeat-x; background-position: right 0; } diff --git a/src/webui/www/private/css/Window.css b/src/webui/www/private/css/Window.css index 30a64ca39..3f6291d70 100644 --- a/src/webui/www/private/css/Window.css +++ b/src/webui/www/private/css/Window.css @@ -46,7 +46,7 @@ Required by: .mochaTitlebar { width: 100%; overflow: hidden; - background: url(../images/skin/spacer.gif?from=fafafa&to=e5e5e5); + background: url(../images/spacer.gif?from=fafafa&to=e5e5e5); } .mochaTitlebar h3 { @@ -187,7 +187,7 @@ div.mochaToolbarWrapper.bottom { left: 6px; width: 16px; height: 16px; - background: url(../images/skin/spinner.gif) no-repeat; + background: url(../images/spinner.gif) no-repeat; } .mochaIframe { @@ -335,7 +335,7 @@ div.mochaToolbarWrapper.bottom { /* Example Window Themes */ #about_contentWrapper { - background: #e5e5e5 url(../images/skin/logo2.gif) 3px 3px no-repeat; + background: #e5e5e5 url(../images/logo2.gif) 3px 3px no-repeat; } #builder_contentWrapper { diff --git a/src/webui/www/private/css/dynamicTable.css b/src/webui/www/private/css/dynamicTable.css index ac5f65fd6..c71c9b9cb 100644 --- a/src/webui/www/private/css/dynamicTable.css +++ b/src/webui/www/private/css/dynamicTable.css @@ -78,14 +78,14 @@ tr.dynamicTableHeader { } .dynamicTable th.sorted { - background-image: url(../images/qbt-theme/go-up.svg); + background-image: url(../images/go-up.svg); background-position: right; background-repeat: no-repeat; background-size: 15px; } .dynamicTable th.sorted.reverse { - background-image: url(../images/qbt-theme/go-down.svg); + background-image: url(../images/go-down.svg); } .dynamicTable td img.flags { diff --git a/src/webui/www/private/css/style.css b/src/webui/www/private/css/style.css index b426aca8b..860f43fa0 100644 --- a/src/webui/www/private/css/style.css +++ b/src/webui/www/private/css/style.css @@ -237,7 +237,7 @@ a.propButton img { } .contextMenu li a.arrow-right, .contextMenu li a:hover.arrow-right { - background-image: url(../images/skin/arrow-right.gif); + background-image: url(../images/arrow-right.gif); background-repeat: no-repeat; background-position: right center; } @@ -290,7 +290,7 @@ a.propButton img { width: 420px; font-size: 1px; line-height: 1px; - background: #f2f2f2 url(../images/skin/slider-area.gif) repeat-x; + background: #f2f2f2 url(../images/slider-area.gif) repeat-x; border: 1px solid #a3a3a3; border-bottom: 1px solid #ccc; border-left: 1px solid #ccc; @@ -307,7 +307,7 @@ a.propButton img { width: 19px; font-size: 1px; line-height: 1px; - background: url(../images/skin/knob.gif) no-repeat; + background: url(../images/knob.gif) no-repeat; cursor: pointer; overflow: hidden; z-index: 2; @@ -331,7 +331,7 @@ a.propButton img { } #mochaToolbar .divider { - background-image: url(../images/skin/toolbox-divider.gif); + background-image: url(../images/toolbox-divider.gif); background-repeat: no-repeat; background-position: left center; padding-left: 14px; @@ -357,7 +357,7 @@ a.propButton img { #torrentsFilterInput { width: 160px; padding-left: 2em; - background-image: url("../images/qbt-theme/edit-find.svg"); + background-image: url("../images/edit-find.svg"); background-repeat: no-repeat; background-size: 1.5em; background-position: left; @@ -371,7 +371,7 @@ a.propButton img { #torrentFilesFilterInput { width: 160px; padding-left: 2em; - background-image: url("../images/qbt-theme/edit-find.svg"); + background-image: url("../images/edit-find.svg"); background-repeat: no-repeat; background-size: 1.5em; background-position: left; @@ -569,7 +569,7 @@ td.generalLabel { td.statusBarSeparator { width: 22px; - background-image: url('../images/skin/toolbox-divider.gif'); + background-image: url('../images/toolbox-divider.gif'); background-repeat: no-repeat; background-position: center 1px; background-size: 2px 18px; diff --git a/src/webui/www/private/index.html b/src/webui/www/private/index.html index 7142480e0..6ef9372cf 100644 --- a/src/webui/www/private/index.html +++ b/src/webui/www/private/index.html @@ -5,8 +5,8 @@ qBittorrent Web UI - - + + @@ -46,68 +46,68 @@
  • QBT_TR(File)QBT_TR[CONTEXT=MainWindow]
  • QBT_TR(Edit)QBT_TR[CONTEXT=MainWindow]
  • QBT_TR(View)QBT_TR[CONTEXT=MainWindow]
  • QBT_TR(Tools)QBT_TR[CONTEXT=MainWindow]
  • QBT_TR(Help)QBT_TR[CONTEXT=MainWindow]
  •    - QBT_TR(Add Torrent Link...)QBT_TR[CONTEXT=MainWindow] - QBT_TR(Add Torrent File...)QBT_TR[CONTEXT=MainWindow] - QBT_TR(Delete)QBT_TR[CONTEXT=TransferListWidget] - QBT_TR(Resume)QBT_TR[CONTEXT=TransferListWidget] - QBT_TR(Pause)QBT_TR[CONTEXT=TransferListWidget] + QBT_TR(Add Torrent Link...)QBT_TR[CONTEXT=MainWindow] + QBT_TR(Add Torrent File...)QBT_TR[CONTEXT=MainWindow] + QBT_TR(Delete)QBT_TR[CONTEXT=TransferListWidget] + QBT_TR(Resume)QBT_TR[CONTEXT=TransferListWidget] + QBT_TR(Pause)QBT_TR[CONTEXT=TransferListWidget] - QBT_TR(Top of Queue)QBT_TR[CONTEXT=MainWindow] - QBT_TR(Move Up Queue)QBT_TR[CONTEXT=MainWindow] - QBT_TR(Move Down Queue)QBT_TR[CONTEXT=MainWindow] - QBT_TR(Bottom of Queue)QBT_TR[CONTEXT=MainWindow] + QBT_TR(Top of Queue)QBT_TR[CONTEXT=MainWindow] + QBT_TR(Move Up Queue)QBT_TR[CONTEXT=MainWindow] + QBT_TR(Move Down Queue)QBT_TR[CONTEXT=MainWindow] + QBT_TR(Bottom of Queue)QBT_TR[CONTEXT=MainWindow] - QBT_TR(Options)QBT_TR[CONTEXT=OptionsDialog] + QBT_TR(Options)QBT_TR[CONTEXT=OptionsDialog]
      -
    • QBT_TR(Rename...)QBT_TR[CONTEXT=PropertiesWidget] QBT_TR(Rename...)QBT_TR[CONTEXT=PropertiesWidget]
    • +
    • QBT_TR(Rename...)QBT_TR[CONTEXT=PropertiesWidget] QBT_TR(Rename...)QBT_TR[CONTEXT=PropertiesWidget]
    • QBT_TR(Priority)QBT_TR[CONTEXT=PropertiesWidget]
        @@ -223,13 +223,13 @@ - QBT_TR(Connection status)QBT_TR[CONTEXT=MainWindow] + QBT_TR(Connection status)QBT_TR[CONTEXT=MainWindow] QBT_TR(Alternative speed limits)QBT_TR[CONTEXT=MainWindow] - QBT_TR(Download speed icon)QBT_TR[CONTEXT=MainWindow] + QBT_TR(Download speed icon)QBT_TR[CONTEXT=MainWindow] - QBT_TR(Upload speed icon)QBT_TR[CONTEXT=MainWindow] + QBT_TR(Upload speed icon)QBT_TR[CONTEXT=MainWindow] diff --git a/src/webui/www/private/scripts/client.js b/src/webui/www/private/scripts/client.js index 1237440da..98670d813 100644 --- a/src/webui/www/private/scripts/client.js +++ b/src/webui/www/private/scripts/client.js @@ -386,7 +386,7 @@ window.addEvent('load', function() { const create_link = function(hash, text, count) { const html = '' - + '' + + '' + window.qBittorrent.Misc.escapeHtml(text) + ' (' + count + ')' + ''; const el = new Element('li', { id: hash, @@ -443,7 +443,7 @@ window.addEvent('load', function() { const createLink = function(hash, text, count) { const html = '' - + '' + + '' + window.qBittorrent.Misc.escapeHtml(text) + ' (' + count + ')' + ''; const el = new Element('li', { id: hash, @@ -497,7 +497,7 @@ window.addEvent('load', function() { const createLink = function(hash, text, count) { const html = '' - + '' + + '' + window.qBittorrent.Misc.escapeHtml(text.replace("%1", count)) + ''; const el = new Element('li', { id: hash, @@ -737,17 +737,17 @@ window.addEvent('load', function() { switch (serverState.connection_status) { case 'connected': { - $('connectionStatus').src = 'images/skin/connected.svg'; + $('connectionStatus').src = 'images/connected.svg'; $('connectionStatus').alt = 'QBT_TR(Connection status: Connected)QBT_TR[CONTEXT=MainWindow]'; } break; case 'firewalled': { - $('connectionStatus').src = 'images/skin/firewalled.svg'; + $('connectionStatus').src = 'images/firewalled.svg'; $('connectionStatus').alt = 'QBT_TR(Connection status: Firewalled)QBT_TR[CONTEXT=MainWindow]'; } break; default: { - $('connectionStatus').src = 'images/skin/disconnected.svg'; + $('connectionStatus').src = 'images/disconnected.svg'; $('connectionStatus').alt = 'QBT_TR(Connection status: Disconnected)QBT_TR[CONTEXT=MainWindow]'; } break; diff --git a/src/webui/www/private/scripts/contextmenu.js b/src/webui/www/private/scripts/contextmenu.js index 0d16525f9..f4831cba3 100644 --- a/src/webui/www/private/scripts/contextmenu.js +++ b/src/webui/www/private/scripts/contextmenu.js @@ -430,10 +430,10 @@ window.qBittorrent.ContextMenu = (function() { const categoryList = $('contextCategoryList'); categoryList.empty(); categoryList.appendChild(new Element('li', { - html: 'QBT_TR(New...)QBT_TR[CONTEXT=TransferListWidget] QBT_TR(New...)QBT_TR[CONTEXT=TransferListWidget]' + html: 'QBT_TR(New...)QBT_TR[CONTEXT=TransferListWidget] QBT_TR(New...)QBT_TR[CONTEXT=TransferListWidget]' })); categoryList.appendChild(new Element('li', { - html: 'QBT_TR(Reset)QBT_TR[CONTEXT=TransferListWidget] QBT_TR(Reset)QBT_TR[CONTEXT=TransferListWidget]' + html: 'QBT_TR(Reset)QBT_TR[CONTEXT=TransferListWidget] QBT_TR(Reset)QBT_TR[CONTEXT=TransferListWidget]' })); const sortedCategories = []; @@ -446,7 +446,7 @@ window.qBittorrent.ContextMenu = (function() { Object.each(sortedCategories, function(categoryName) { const categoryHash = genHash(categoryName); const el = new Element('li', { - html: ' ' + window.qBittorrent.Misc.escapeHtml(categoryName) + '' + html: ' ' + window.qBittorrent.Misc.escapeHtml(categoryName) + '' }); if (first) { el.addClass('separator'); @@ -463,13 +463,13 @@ window.qBittorrent.ContextMenu = (function() { contextTagList.appendChild(new Element('li', { html: '' - + 'QBT_TR(Add...)QBT_TR[CONTEXT=TransferListWidget]' + + 'QBT_TR(Add...)QBT_TR[CONTEXT=TransferListWidget]' + ' QBT_TR(Add...)QBT_TR[CONTEXT=TransferListWidget]' + '' })); contextTagList.appendChild(new Element('li', { html: '' - + 'QBT_TR(Remove All)QBT_TR[CONTEXT=TransferListWidget]' + + 'QBT_TR(Remove All)QBT_TR[CONTEXT=TransferListWidget]' + ' QBT_TR(Remove All)QBT_TR[CONTEXT=TransferListWidget]' + '' })); diff --git a/src/webui/www/private/scripts/dynamicTable.js b/src/webui/www/private/scripts/dynamicTable.js index 9412796d9..d98194cdd 100644 --- a/src/webui/www/private/scripts/dynamicTable.js +++ b/src/webui/www/private/scripts/dynamicTable.js @@ -314,7 +314,7 @@ window.qBittorrent.DynamicTable = (function() { }); const createLi = function(columnName, text) { - const html = '' + window.qBittorrent.Misc.escapeHtml(text) + ''; + const html = '' + window.qBittorrent.Misc.escapeHtml(text) + ''; return new Element('li', { html: html }); @@ -897,7 +897,7 @@ window.qBittorrent.DynamicTable = (function() { break; // do nothing } - const img_path = 'images/skin/' + state + '.svg'; + const img_path = 'images/' + state + '.svg'; if (td.getChildren('img').length > 0) { const img = td.getChildren('img')[0]; @@ -1785,7 +1785,7 @@ window.qBittorrent.DynamicTable = (function() { } else { const collapseIcon = new Element('img', { - src: 'images/qbt-theme/go-down.svg', + src: 'images/go-down.svg', styles: { 'margin-left': (node.depth * 20) }, @@ -1799,7 +1799,7 @@ window.qBittorrent.DynamicTable = (function() { id: fileNameId }); const dirImg = new Element('img', { - src: 'images/qbt-theme/inode-directory.svg', + src: 'images/inode-directory.svg', styles: { 'width': 15, 'padding-right': 5, diff --git a/src/webui/www/private/scripts/lib/mocha-0.9.6-yc.js b/src/webui/www/private/scripts/lib/mocha-0.9.6-yc.js index 053c708f0..e3e888cc9 100644 --- a/src/webui/www/private/scripts/lib/mocha-0.9.6-yc.js +++ b/src/webui/www/private/scripts/lib/mocha-0.9.6-yc.js @@ -1 +1 @@ -var MUI=MochaUI=new Hash({version:"0.9.6 development",options:new Hash({theme:"default",advancedEffects:false,standardEffects:true}),path:{source:"scripts/source/",themes:"themes/",plugins:"plugins/"},themePath:function(){return MUI.path.themes+MUI.options.theme+"/"},files:new Hash()});MUI.files[MUI.path.source+"Core/Core.js"]="loaded";MUI.extend({Windows:{instances:new Hash()},ieSupport:"excanvas",ieLegacySupport:Browser.Engine.trident&&Browser.version<9,updateContent:function(c){var c=$extend({element:null,childElement:null,method:null,data:null,title:null,content:null,loadMethod:null,url:null,scrollbars:null,padding:null,require:{},onContentLoaded:$empty},c);c.require=$extend({css:[],images:[],js:[],onload:null},c.require);var b={};if(!c.element){return}var d=c.element;if(MUI.Windows.instances.get(d.id)){b.recipient="window"}else{b.recipient="panel"}var a=d.retrieve("instance");if(c.title){a.titleEl.set("html",c.title)}var e=a.contentEl;b.contentContainer=c.childElement!=null?c.childElement:a.contentEl;var g=a.contentWrapperEl;if(!c.loadMethod){if(!a.options.loadMethod){if(!c.url){c.loadMethod="html"}else{c.loadMethod="xhr"}}else{c.loadMethod=a.options.loadMethod}}var f=c.scrollbars||a.options.scrollbars;if(b.contentContainer==a.contentEl){g.setStyles({overflow:f!=false&&c.loadMethod!="iframe"?"auto":"hidden"})}if(c.padding!=null){e.setStyles({"padding-top":c.padding.top,"padding-bottom":c.padding.bottom,"padding-left":c.padding.left,"padding-right":c.padding.right})}if(b.contentContainer==e){e.empty().show();e.getAllNext(".column").destroy();e.getAllNext(".columnHandle").destroy()}b.onContentLoaded=function(){if(c.require.js.length||typeof c.require.onload=="function"){new MUI.Require({js:c.require.js,onload:function(){if(!$defined(c.require.onload)){return}if(Browser.Engine.presto){c.require.onload.delay(100)}else{c.require.onload()}c.onContentLoaded?c.onContentLoaded():a.fireEvent("onContentLoaded",d)}.bind(this)})}else{c.onContentLoaded?c.onContentLoaded():a.fireEvent("onContentLoaded",d)}};if(c.require.css.length||c.require.images.length){new MUI.Require({css:c.require.css,images:c.require.images,onload:function(){this.loadSelect(a,c,b)}.bind(this)})}else{this.loadSelect(a,c,b)}},loadSelect:function(a,c,b){switch(c.loadMethod){case"xhr":this.updateContentXHR(a,c,b);break;case"iframe":this.updateContentIframe(a,c,b);break;case"html":default:this.updateContentHTML(a,c,b);break}},updateContentXHR:function(a,c,b){var f=a.contentEl;var e=b.contentContainer;var d=b.onContentLoaded;new Request.HTML({url:c.url,update:e,method:c.method!=null?c.method:"get",data:c.data!=null?new Hash(c.data).toQueryString():"",evalScripts:a.options.evalScripts,evalResponse:a.options.evalResponse,onRequest:function(){if(b.recipient=="window"&&e==f){a.showSpinner()}else{if(b.recipient=="panel"&&e==f&&$("spinner")){$("spinner").show()}}}.bind(this),onFailure:function(g){if(e==f){var j=new RegExp("[\n\rs]*(.*)[\n\rs]*","gmi");var h=j.exec(g.responseText);if(!h){h="Unknown"}e.set("html","

        Error: "+h+"

        ");if(b.recipient=="window"){a.hideSpinner()}else{if(b.recipient=="panel"&&$("spinner")){$("spinner").hide()}}}}.bind(this),onSuccess:function(){if(e==f){if(b.recipient=="window"){a.hideSpinner()}else{if(b.recipient=="panel"&&$("spinner")){$("spinner").hide()}}}Browser.Engine.trident4?d.delay(750):d()}.bind(this),onComplete:function(){}.bind(this)}).send()},updateContentIframe:function(a,c,b){var f=a.contentEl;var e=b.contentContainer;var g=a.contentWrapperEl;var d=b.onContentLoaded;if(a.options.contentURL==""||e!=f){return}a.iframeEl=new Element("iframe",{id:a.options.id+"_iframe",name:a.options.id+"_iframe","class":"mochaIframe",src:c.url,marginwidth:0,marginheight:0,frameBorder:0,scrolling:"auto",styles:{height:g.offsetHeight-g.getStyle("margin-top").toInt()-g.getStyle("margin-bottom").toInt(),width:a.panelEl?g.offsetWidth-g.getStyle("margin-left").toInt()-g.getStyle("margin-right").toInt():"100%"}}).injectInside(f);a.iframeEl.addEvent("load",function(h){if(b.recipient=="window"){a.hideSpinner()}else{if(b.recipient=="panel"&&e==f&&$("spinner")){$("spinner").hide()}}Browser.Engine.trident4?d.delay(50):d()}.bind(this));if(b.recipient=="window"){a.showSpinner()}else{if(b.recipient=="panel"&&e==f&&$("spinner")){$("spinner").show()}}},updateContentHTML:function(a,c,b){var f=a.contentEl;var e=b.contentContainer;var d=b.onContentLoaded;var g=new Array("element","textnode","whitespace","collection");if(g.contains($type(c.content))){c.content.inject(e)}else{e.set("html",c.content)}if(e==f){if(b.recipient=="window"){a.hideSpinner()}else{if(b.recipient=="panel"&&$("spinner")){$("spinner").hide()}}}Browser.Engine.trident4?d.delay(50):d()},reloadIframe:function(a){Browser.Engine.gecko?$(a).src=$(a).src:top.frames[a].location.reload(true)},roundedRect:function(f,d,j,h,c,b,g,e){f.fillStyle="rgba("+g.join(",")+","+e+")";f.beginPath();f.moveTo(d,j+b);f.lineTo(d,j+c-b);f.quadraticCurveTo(d,j+c,d+b,j+c);f.lineTo(d+h-b,j+c);f.quadraticCurveTo(d+h,j+c,d+h,j+c-b);f.lineTo(d+h,j+b);f.quadraticCurveTo(d+h,j,d+h-b,j);f.lineTo(d+b,j);f.quadraticCurveTo(d,j,d,j+b);f.fill()},triangle:function(e,c,h,g,b,f,d){e.beginPath();e.moveTo(c+g,h);e.lineTo(c,h+b);e.lineTo(c+g,h+b);e.closePath();e.fillStyle="rgba("+f.join(",")+","+d+")";e.fill()},circle:function(d,b,g,f,e,c){d.beginPath();d.arc(b,g,f,0,Math.PI*2,true);d.fillStyle="rgba("+e.join(",")+","+c+")";d.fill()},notification:function(a){new MUI.Window({loadMethod:"html",closeAfter:1500,type:"notification",addClass:"notification",content:a,width:220,height:40,y:53,padding:{top:10,right:12,bottom:10,left:12},shadowBlur:5})},toggleAdvancedEffects:function(a){if(MUI.options.advancedEffects==false){MUI.options.advancedEffects=true;if(a){this.toggleAdvancedEffectsLink=new Element("div",{"class":"check",id:"toggleAdvancedEffects_check"}).inject(a)}}else{MUI.options.advancedEffects=false;if(this.toggleAdvancedEffectsLink){this.toggleAdvancedEffectsLink.destroy()}}},toggleStandardEffects:function(a){if(MUI.options.standardEffects==false){MUI.options.standardEffects=true;if(a){this.toggleStandardEffectsLink=new Element("div",{"class":"check",id:"toggleStandardEffects_check"}).inject(a)}}else{MUI.options.standardEffects=false;if(this.toggleStandardEffectsLink){this.toggleStandardEffectsLink.destroy()}}},underlayInitialize:function(){var a=new Element("div",{id:"windowUnderlay",styles:{height:parent.getCoordinates().height,opacity:0.01,display:"none"}}).inject(document.body)},setUnderlaySize:function(){$("windowUnderlay").setStyle("height",parent.getCoordinates().height)}});function fixPNG(e){if(Browser.Engine.trident4&&document.body.filters){var b=(e.id)?"id='"+e.id+"' ":"";var d=(e.className)?"class='"+e.className+"' ":"";var f=(e.title)?"title='"+e.title+"' ":"title='"+e.alt+"' ";var c="display:inline-block;"+e.style.cssText;var a="";e.outerHTML=a}}document.addEvent("mousedown",function(a){MUI.blurAll.delay(50)});window.addEvent("domready",function(){MUI.underlayInitialize()});window.addEvent("resize",function(){if($("windowUnderlay")){MUI.setUnderlaySize()}else{MUI.underlayInitialize()}});Element.implement({hide:function(){this.setStyle("display","none");return this},show:function(){this.setStyle("display","block");return this}});Element.implement({shake:function(b,h){b=b||3;h=h||500;h=(h/50).toInt()-1;var e=this.getParent();if(e!=$(document.body)&&e.getStyle("position")=="static"){e.setStyle("position","relative")}var a=this.getStyle("position");if(a=="static"){this.setStyle("position","relative");a="relative"}if(MUI.ieLegacySupport){e.setStyle("height",e.getStyle("height"))}var g=this.getPosition(e);if(a=="relative"&&!Browser.Engine.presto){g.x-=e.getStyle("paddingLeft").toInt();g.y-=e.getStyle("paddingTop").toInt()}var f=this.retrieve("morph");if(f){f.cancel();var c=f.options}var f=this.get("morph",{duration:50,link:"chain"});for(var d=0;d]*>([\s\S]*?)<\/body>/i);c=(b)?b[1]:c;var a=new Element("div");return a.set("html",c)}});MUI.getCSSRule=function(b){for(var c=0;c=200)&&(a<300))}});Browser.Request=function(){return $try(function(){return new ActiveXObject("MSXML2.XMLHTTP")},function(){return new XMLHttpRequest()})}}MUI.Require=new Class({Implements:[Options],options:{css:[],images:[],js:[],onload:$empty},initialize:function(a){this.setOptions(a);var a=this.options;this.assetsToLoad=a.css.length+a.images.length+a.js.length;this.assetsLoaded=0;var b=0;if(a.css.length){a.css.each(function(c){this.getAsset(c,function(){if(b==a.css.length-1){if(this.assetsLoaded==this.assetsToLoad-1){this.requireOnload()}else{this.assetsLoaded++;this.requireContinue.delay(50,this)}}else{b++;this.assetsLoaded++}}.bind(this))}.bind(this))}else{if(!a.js.length&&!a.images.length){this.options.onload();return true}else{this.requireContinue.delay(50,this)}}},requireOnload:function(){this.assetsLoaded++;if(this.assetsLoaded==this.assetsToLoad){this.options.onload();return true}},requireContinue:function(){var a=this.options;if(a.images.length){a.images.each(function(b){this.getAsset(b,this.requireOnload.bind(this))}.bind(this))}if(a.js.length){a.js.each(function(b){this.getAsset(b,this.requireOnload.bind(this))}.bind(this))}},getAsset:function(b,c){if(MUI.files[b]=="loaded"){if(typeof c=="function"){c()}return true}else{if(MUI.files[b]=="loading"){var d=0;var a=(function(){d++;if(MUI.files[b]=="loading"&&d<"100"){return}$clear(a);if(typeof c=="function"){c()}}).periodical(50)}else{MUI.files[b]="loading";properties={onload:c!="undefined"?c:$empty};var e=properties.onload;properties.onload=function(){MUI.files[b]="loaded";if(e){e()}}.bind(this);switch(b.match(/\.\w+$/)[0]){case".js":return Asset.javascript(b,properties);case".css":return Asset.css(b,properties);case".jpg":case".png":case".gif":return Asset.image(b,properties)}alert('The required file "'+b+'" could not be loaded')}}}});$extend(Asset,{javascript:function(f,d){d=$extend({onload:$empty,document:document,check:$lambda(true)},d);if($(d.id)){d.onload();return $(d.id)}var b=new Element("script",{src:f,type:"text/javascript"});var e=d.onload.bind(b),a=d.check,g=d.document;delete d.onload;delete d.check;delete d.document;if(!Browser.Engine.webkit419&&!Browser.Engine.presto){b.addEvents({load:e,readystatechange:function(){if(MUI.ieLegacySupport&&["loaded","complete"].contains(this.readyState)){e()}}}).setProperties(d)}else{var c=(function(){if(!$try(a)){return}$clear(c);Browser.Engine.presto?e.delay(500):e()}).periodical(50)}return b.inject(g.head)},css:function(b,a){a=$extend({id:null,media:"screen",onload:$empty},a);new Request({method:"get",url:b,onComplete:function(c){var d=new Element("link",{id:a.id,rel:"stylesheet",media:a.media,type:"text/css",href:b}).inject(document.head);a.onload()}.bind(this),onFailure:function(c){},onSuccess:function(){}.bind(this)}).send()}});MUI.extend({newWindowsFromJSON:function(a){new MUI.Require({js:[MUI.path.source+"Window/Windows-from-json.js"],onload:function(){new MUI.newWindowsFromJSON(a)}})},arrangeCascade:function(){new MUI.Require({js:[MUI.path.source+"Window/Arrange-cascade.js"],onload:function(){new MUI.arrangeCascade()}})},arrangeTile:function(){new MUI.Require({js:[MUI.path.source+"Window/Arrange-tile.js"],onload:function(){new MUI.arrangeTile()}})},saveWorkspace:function(){new MUI.Require({js:[MUI.path.source+"Layout/Workspaces.js"],onload:function(){new MUI.saveWorkspace()}})},loadWorkspace:function(){new MUI.Require({js:[MUI.path.source+"Layout/Workspaces.js"],onload:function(){new MUI.loadWorkspace()}})},Themes:{init:function(a){new MUI.Require({js:[MUI.path.source+"Utilities/Themes.js"],onload:function(){MUI.Themes.init(a)}})}}});MUI.files[MUI.path.source+"Utilities/Themes.js"]=1;MUI.Themes={init:function(a){this.newTheme=a.toLowerCase();if(!this.newTheme||this.newTheme==null||this.newTheme==MUI.options.theme.toLowerCase()){return}if($("spinner")){$("spinner").show()}this.oldURIs=[];this.oldSheets=[];$$("link").each(function(c){var b=c.get("href");if(b.contains(MUI.path.themes+MUI.options.theme)){this.oldURIs.push(b);this.oldSheets.push(c)}}.bind(this));this.newSheetURLs=this.oldURIs.map(function(c,b){return c.replace("/"+MUI.options.theme+"/","/"+MUI.Themes.newTheme+"/")}.bind(this));this.sheetsToLoad=this.oldURIs.length;this.sheetsLoaded=0;this.newSheets=[];this.newSheetURLs.each(function(d){var b=d;var c=new Request({method:"get",url:b,onComplete:function(e){var f=new Element("link",{rel:"stylesheet",media:"screen",type:"text/css",href:b});this.newSheets.push(f)}.bind(this),onFailure:function(e){this.themeLoadSuccess=false;if($("spinner")){$("spinner").hide()}MUI.notification("Stylesheets did not load.")},onSuccess:function(){this.sheetsLoaded++;if(this.sheetsLoaded==this.sheetsToLoad){this.updateThemeStylesheets();this.themeLoadSuccess=true}}.bind(this)});c.send()}.bind(this))},updateThemeStylesheets:function(){this.oldSheets.each(function(a){a.destroy()});this.newSheets.each(function(a){MUI.files[a.get("href")]=1;a.inject(document.head)});if(MUI.ieLegacySupport){this.redraw.delay(1250,this)}else{this.redraw.delay(250,this)}},redraw:function(){$$(".replaced").removeClass("replaced");$$(".mocha").each(function(c){var b=c.retrieve("instance");b.setColors();b.drawWindow()});if(MUI.Dock){if(MUI.Dock.options.useControls){MUI.Dock.setDockColors();MUI.Dock.renderDockControls()}}if(MUI.Desktop.desktop){var a=(function(){if(MUI.Desktop.desktop.getStyle("overflow")!="hidden"){return}$clear(a);MUI.Desktop.setDesktopSize()}).periodical(50)}if($("spinner")){$("spinner").hide()}MUI.options.theme=this.newTheme}};window.addEvent("load",function(){if($("themeControl")){$("themeControl").getElements("option").setProperty("selected","false");if($("chooseTheme")){$("chooseTheme").setProperty("selected","true")}}});MUI.files[MUI.path.source+"Window/Window.js"]="loading";MUI.extend({Windows:{instances:new Hash(),indexLevel:100,windowIDCount:0,windowsVisible:true,focusingWindow:false}});MUI.Windows.windowOptions={id:null,title:"New Window",icon:false,type:"window",require:{css:[],images:[],js:[],onload:null},loadMethod:null,method:"get",contentURL:null,data:null,closeAfter:false,evalScripts:true,evalResponse:false,content:"Window content",toolbar:false,toolbarPosition:"top",toolbarHeight:29,toolbarURL:"pages/lipsum.html",toolbarData:null,toolbarContent:"",toolbarOnload:$empty,toolbar2:false,toolbar2Position:"bottom",toolbar2Height:29,toolbar2URL:"pages/lipsum.html",toolbar2Data:null,toolbar2Content:"",toolbar2Onload:$empty,container:null,restrict:true,shape:"box",collapsible:true,minimizable:true,maximizable:true,closable:true,storeOnClose:false,modalOverlayClose:true,draggable:null,draggableGrid:false,draggableLimit:false,draggableSnap:false,resizable:null,resizeLimit:{x:[250,2500],y:[125,2000]},addClass:"",width:300,height:125,headerHeight:25,footerHeight:25,cornerRadius:8,x:null,y:null,scrollbars:true,padding:{top:10,right:12,bottom:10,left:12},shadowBlur:5,shadowOffset:{x:0,y:1},controlsOffset:{right:6,top:6},useCanvas:true,useCanvasControls:true,useSpinner:true,headerStartColor:[250,250,250],headerStopColor:[229,229,229],bodyBgColor:[229,229,229],minimizeBgColor:[255,255,255],minimizeColor:[0,0,0],maximizeBgColor:[255,255,255],maximizeColor:[0,0,0],closeBgColor:[255,255,255],closeColor:[0,0,0],resizableColor:[254,254,254],onBeforeBuild:$empty,onContentLoaded:$empty,onFocus:$empty,onBlur:$empty,onResize:$empty,onMinimize:$empty,onMaximize:$empty,onRestore:$empty,onClose:$empty,onCloseComplete:$empty};MUI.Windows.windowOptionsOriginal=$merge(MUI.Windows.windowOptions);MUI.Window=new Class({Implements:[Events,Options],options:MUI.Windows.windowOptions,initialize:function(a){this.setOptions(a);var a=this.options;$extend(this,{mochaControlsWidth:0,minimizebuttonX:0,maximizebuttonX:0,closebuttonX:0,headerFooterShadow:a.headerHeight+a.footerHeight+(a.shadowBlur*2),oldTop:0,oldLeft:0,isMaximized:false,isMinimized:false,isCollapsed:false,timestamp:$time()});if(a.type!="window"){a.container=document.body;a.minimizable=false}if(!a.container){a.container=MUI.Desktop&&MUI.Desktop.desktop?MUI.Desktop.desktop:document.body}if(a.resizable==null){if(a.type!="window"||a.shape=="gauge"){a.resizable=false}else{a.resizable=true}}if(a.draggable==null){a.draggable=a.type!="window"?false:true}if(a.shape=="gauge"||a.type=="notification"){a.collapsible=false;a.maximizable=false;a.contentBgColor="transparent";a.scrollbars=false;a.footerHeight=0}if(a.type=="notification"){a.closable=false;a.headerHeight=0}if(MUI.Dock&&$(MUI.options.dock)){if(MUI.Dock.dock&&a.type!="modal"&&a.type!="modal2"){a.minimizable=a.minimizable}}else{a.minimizable=false}a.maximizable=MUI.Desktop&&MUI.Desktop.desktop&&a.maximizable&&a.type!="modal"&&a.type!="modal2";if(this.options.type=="modal2"){this.options.shadowBlur=0;this.options.shadowOffset={x:0,y:0};this.options.useSpinner=false;this.options.useCanvas=false;this.options.footerHeight=0;this.options.headerHeight=0}a.id=a.id||"win"+(++MUI.Windows.windowIDCount);this.windowEl=$(a.id);if(a.require.css.length||a.require.images.length){new MUI.Require({css:a.require.css,images:a.require.images,onload:function(){this.newWindow()}.bind(this)})}else{this.newWindow()}return this},saveValues:function(){var a=this.windowEl.getCoordinates();this.options.x=a.left.toInt();this.options.y=a.top.toInt()},newWindow:function(c){var a=MUI.Windows.instances;var j=MUI.Windows.instances.get(this.options.id);var k=this.options;if(j){var h=j}if(this.windowEl&&!this.isClosing){if(h.isMinimized){MUI.Dock.restoreMinimized(this.windowEl)}else{if(h.isCollapsed){MUI.collapseToggle(this.windowEl);setTimeout(MUI.focusWindow.pass(this.windowEl,this),10)}else{if(this.windowEl.hasClass("windowClosed")){if(h.check){h.check.show()}this.windowEl.removeClass("windowClosed");this.windowEl.setStyle("opacity",0);this.windowEl.addClass("mocha");if(MUI.Dock&&$(MUI.options.dock)&&h.options.type=="window"){var f=$(h.options.id+"_dockTab");if(f!=null){f.show()}MUI.Desktop.setDesktopSize()}h.displayNewWindow()}else{var g=document.getCoordinates();if(this.windowEl.getStyle("left").toInt()>g.width||this.windowEl.getStyle("top").toInt()>g.height){MUI.centerWindow(this.windowEl)}setTimeout(MUI.focusWindow.pass(this.windowEl,this),10);if(MUI.options.standardEffects==true){this.windowEl.shake()}}}}return}else{a.set(k.id,this)}this.isClosing=false;this.fireEvent("onBeforeBuild");MUI.Windows.indexLevel++;this.windowEl=new Element("div",{"class":"mocha",id:k.id,styles:{position:"absolute",width:k.width,height:k.height,display:"block",opacity:0,zIndex:MUI.Windows.indexLevel+=2}});this.windowEl.store("instance",this);this.windowEl.addClass(k.addClass);if(k.type=="modal2"){this.windowEl.addClass("modal2")}if(MUI.ieLegacySupport&&k.shape=="gauge"){this.windowEl.setStyle("backgroundImage","url(../images/skin/spacer.gif)")}if(k.loadMethod=="iframe"){k.padding={top:0,right:0,bottom:0,left:0}}this.insertWindowElements();this.titleEl.set("html",k.title);this.contentWrapperEl.setStyle("overflow","hidden");this.contentEl.setStyles({"padding-top":k.padding.top,"padding-bottom":k.padding.bottom,"padding-left":k.padding.left,"padding-right":k.padding.right});if(k.shape=="gauge"){if(k.useCanvasControls){this.canvasControlsEl.setStyle("visibility","hidden")}else{this.controlsEl.setStyle("visibility","hidden")}this.windowEl.addEvent("mouseover",function(){this.mouseover=true;var l=function(){if(this.mouseover!=false){if(k.useCanvasControls){this.canvasControlsEl.setStyle("visibility","visible")}else{this.controlsEl.setStyle("visibility","visible")}this.canvasHeaderEl.setStyle("visibility","visible");this.titleEl.show()}};l.delay(0,this)}.bind(this));this.windowEl.addEvent("mouseleave",function(){this.mouseover=false;if(this.options.useCanvasControls){this.canvasControlsEl.setStyle("visibility","hidden")}else{this.controlsEl.setStyle("visibility","hidden")}this.canvasHeaderEl.setStyle("visibility","hidden");this.titleEl.hide()}.bind(this))}this.windowEl.inject(k.container);this.setColors();if(k.type!="notification"){this.setMochaControlsWidth()}MUI.updateContent({element:this.windowEl,content:k.content,method:k.method,url:k.contentURL,data:k.data,onContentLoaded:null,require:{js:k.require.js,onload:k.require.onload}});if(this.options.toolbar==true){MUI.updateContent({element:this.windowEl,childElement:this.toolbarEl,content:k.toolbarContent,loadMethod:"xhr",method:k.method,url:k.toolbarURL,data:k.toolbarData,onContentLoaded:k.toolbarOnload})}if(this.options.toolbar2==true){MUI.updateContent({element:this.windowEl,childElement:this.toolbar2El,content:k.toolbar2Content,loadMethod:"xhr",method:k.method,url:k.toolbar2URL,data:k.toolbar2Data,onContentLoaded:k.toolbar2Onload})}this.drawWindow();this.attachDraggable();this.attachResizable();this.setupEvents();if(k.resizable){this.adjustHandles()}if(k.container==document.body||k.container==MUI.Desktop.desktop){var b=window.getSize()}else{var b=$(this.options.container).getSize()}if(!k.y){if(MUI.Desktop&&MUI.Desktop.desktop){var d=(b.y*0.5)-(this.windowEl.offsetHeight*0.5);if(d<-k.shadowBlur){d=-k.shadowBlur}}else{var d=window.getScroll().y+(window.getSize().y*0.5)-(this.windowEl.offsetHeight*0.5);if(d<-k.shadowBlur){d=-k.shadowBlur}}}else{var d=k.y-k.shadowBlur}if(!this.options.x){var e=(b.x*0.5)-(this.windowEl.offsetWidth*0.5);if(e<-k.shadowBlur){e=-k.shadowBlur}}else{var e=k.x-k.shadowBlur}this.windowEl.setStyles({top:d,left:e});this.opacityMorph=new Fx.Morph(this.windowEl,{duration:350,transition:Fx.Transitions.Sine.easeInOut,onComplete:function(){if(MUI.ieLegacySupport){this.drawWindow()}}.bind(this)});this.displayNewWindow();this.morph=new Fx.Morph(this.windowEl,{duration:200});this.windowEl.store("morph",this.morph);this.resizeMorph=new Fx.Elements([this.contentWrapperEl,this.windowEl],{duration:400,transition:Fx.Transitions.Sine.easeInOut,onStart:function(){this.resizeAnimation=this.drawWindow.periodical(20,this)}.bind(this),onComplete:function(){$clear(this.resizeAnimation);this.drawWindow();if(this.iframeEl){this.iframeEl.setStyle("visibility","visible")}}.bind(this)});this.windowEl.store("resizeMorph",this.resizeMorph);if($(this.windowEl.id+"LinkCheck")){this.check=new Element("div",{"class":"check",id:this.options.id+"_check"}).inject(this.windowEl.id+"LinkCheck")}if(this.options.closeAfter!=false){MUI.closeWindow.delay(this.options.closeAfter,this,this.windowEl)}if(MUI.Dock&&$(MUI.options.dock)&&this.options.type=="window"){MUI.Dock.createDockTab(this.windowEl)}},displayNewWindow:function(){options=this.options;if(options.type=="modal"||options.type=="modal2"){MUI.currentModal=this.windowEl;if(Browser.Engine.trident4){$("modalFix").show()}$("modalOverlay").show();if(MUI.options.advancedEffects==false){$("modalOverlay").setStyle("opacity",0.6);this.windowEl.setStyles({zIndex:11000,opacity:1})}else{MUI.Modal.modalOverlayCloseMorph.cancel();MUI.Modal.modalOverlayOpenMorph.start({opacity:0.6});this.windowEl.setStyles({zIndex:11000});this.opacityMorph.start({opacity:1})}$$(".dockTab").removeClass("activeDockTab");$$(".mocha").removeClass("isFocused");this.windowEl.addClass("isFocused")}else{if(MUI.options.advancedEffects==false){this.windowEl.setStyle("opacity",1);setTimeout(MUI.focusWindow.pass(this.windowEl,this),10)}else{if(MUI.ieLegacySupport){this.drawWindow(false)}this.opacityMorph.start({opacity:1});setTimeout(MUI.focusWindow.pass(this.windowEl,this),10)}}},setupEvents:function(){var a=this.windowEl;if(this.closeButtonEl){this.closeButtonEl.addEvent("click",function(b){new Event(b).stop();MUI.closeWindow(a)}.bind(this))}if(this.options.type=="window"){a.addEvent("mousedown",function(b){if(MUI.ieLegacySupport){new Event(b).stop()}MUI.focusWindow(a);if(a.getStyle("top").toInt()<-this.options.shadowBlur){a.setStyle("top",-this.options.shadowBlur)}}.bind(this))}if(this.minimizeButtonEl){this.minimizeButtonEl.addEvent("click",function(b){new Event(b).stop();MUI.Dock.minimizeWindow(a)}.bind(this))}if(this.maximizeButtonEl){this.maximizeButtonEl.addEvent("click",function(b){new Event(b).stop();if(this.isMaximized){MUI.Desktop.restoreWindow(a)}else{MUI.Desktop.maximizeWindow(a)}}.bind(this))}if(this.options.collapsible==true){this.titleEl.addEvent("selectstart",function(b){b=new Event(b).stop()}.bind(this));if(MUI.ieLegacySupport){this.titleBarEl.addEvent("mousedown",function(b){this.titleEl.setCapture()}.bind(this));this.titleBarEl.addEvent("mouseup",function(b){this.titleEl.releaseCapture()}.bind(this))}this.titleBarEl.addEvent("dblclick",function(b){b=new Event(b).stop();MUI.collapseToggle(this.windowEl)}.bind(this))}},attachDraggable:function(){var a=this.windowEl;if(!this.options.draggable){return}this.windowDrag=new Drag.Move(a,{handle:this.titleBarEl,container:this.options.restrict==true?$(this.options.container):false,grid:this.options.draggableGrid,limit:this.options.draggableLimit,snap:this.options.draggableSnap,onStart:function(){if(this.options.type!="modal"&&this.options.type!="modal2"){MUI.focusWindow(a);$("windowUnderlay").show()}if(this.iframeEl){if(!MUI.ieLegacySupport){this.iframeEl.setStyle("visibility","hidden")}else{this.iframeEl.hide()}}}.bind(this),onComplete:function(){if(this.options.type!="modal"&&this.options.type!="modal2"){$("windowUnderlay").hide()}if(this.iframeEl){if(!MUI.ieLegacySupport){this.iframeEl.setStyle("visibility","visible")}else{this.iframeEl.show()}}this.saveValues()}.bind(this)})},attachResizable:function(){var a=this.windowEl;if(!this.options.resizable){return}this.resizable1=this.windowEl.makeResizable({handle:[this.n,this.ne,this.nw],limit:{y:[function(){return this.windowEl.getStyle("top").toInt()+this.windowEl.getStyle("height").toInt()-this.options.resizeLimit.y[1]}.bind(this),function(){return this.windowEl.getStyle("top").toInt()+this.windowEl.getStyle("height").toInt()-this.options.resizeLimit.y[0]}.bind(this)]},modifiers:{x:false,y:"top"},onStart:function(){this.resizeOnStart();this.coords=this.contentWrapperEl.getCoordinates();this.y2=this.coords.top.toInt()+this.contentWrapperEl.offsetHeight}.bind(this),onDrag:function(){this.coords=this.contentWrapperEl.getCoordinates();this.contentWrapperEl.setStyle("height",this.y2-this.coords.top.toInt());this.resizeOnDrag()}.bind(this),onComplete:function(){this.resizeOnComplete()}.bind(this)});this.resizable2=this.contentWrapperEl.makeResizable({handle:[this.e,this.ne],limit:{x:[this.options.resizeLimit.x[0]-(this.options.shadowBlur*2),this.options.resizeLimit.x[1]-(this.options.shadowBlur*2)]},modifiers:{x:"width",y:false},onStart:function(){this.resizeOnStart()}.bind(this),onDrag:function(){this.resizeOnDrag()}.bind(this),onComplete:function(){this.resizeOnComplete()}.bind(this)});this.resizable3=this.contentWrapperEl.makeResizable({container:this.options.restrict==true?$(this.options.container):false,handle:this.se,limit:{x:[this.options.resizeLimit.x[0]-(this.options.shadowBlur*2),this.options.resizeLimit.x[1]-(this.options.shadowBlur*2)],y:[this.options.resizeLimit.y[0]-this.headerFooterShadow,this.options.resizeLimit.y[1]-this.headerFooterShadow]},modifiers:{x:"width",y:"height"},onStart:function(){this.resizeOnStart()}.bind(this),onDrag:function(){this.resizeOnDrag()}.bind(this),onComplete:function(){this.resizeOnComplete()}.bind(this)});this.resizable4=this.contentWrapperEl.makeResizable({handle:[this.s,this.sw],limit:{y:[this.options.resizeLimit.y[0]-this.headerFooterShadow,this.options.resizeLimit.y[1]-this.headerFooterShadow]},modifiers:{x:false,y:"height"},onStart:function(){this.resizeOnStart()}.bind(this),onDrag:function(){this.resizeOnDrag()}.bind(this),onComplete:function(){this.resizeOnComplete()}.bind(this)});this.resizable5=this.windowEl.makeResizable({handle:[this.w,this.sw,this.nw],limit:{x:[function(){return this.windowEl.getStyle("left").toInt()+this.windowEl.getStyle("width").toInt()-this.options.resizeLimit.x[1]}.bind(this),function(){return this.windowEl.getStyle("left").toInt()+this.windowEl.getStyle("width").toInt()-this.options.resizeLimit.x[0]}.bind(this)]},modifiers:{x:"left",y:false},onStart:function(){this.resizeOnStart();this.coords=this.contentWrapperEl.getCoordinates();this.x2=this.coords.left.toInt()+this.contentWrapperEl.offsetWidth}.bind(this),onDrag:function(){this.coords=this.contentWrapperEl.getCoordinates();this.contentWrapperEl.setStyle("width",this.x2-this.coords.left.toInt());this.resizeOnDrag()}.bind(this),onComplete:function(){this.resizeOnComplete()}.bind(this)})},resizeOnStart:function(){$("windowUnderlay").show();if(this.iframeEl){if(!MUI.ieLegacySupport){this.iframeEl.setStyle("visibility","hidden")}else{this.iframeEl.hide()}}},resizeOnDrag:function(){this.drawWindow();this.adjustHandles()},resizeOnComplete:function(){$("windowUnderlay").hide();if(this.iframeEl){if(!MUI.ieLegacySupport){this.iframeEl.setStyle("visibility","visible")}else{this.iframeEl.show();this.iframeEl.setStyle("width","99%");this.iframeEl.setStyle("height",this.contentWrapperEl.offsetHeight);this.iframeEl.setStyle("width","100%");this.iframeEl.setStyle("height",this.contentWrapperEl.offsetHeight)}}if(this.contentWrapperEl.getChildren(".column")!=null){MUI.rWidth(this.contentWrapperEl);this.contentWrapperEl.getChildren(".column").each(function(a){MUI.panelHeight(a)})}this.fireEvent("onResize",this.windowEl)},adjustHandles:function(){var d=this.options.shadowBlur;var j=d*2;var k=this.options.shadowOffset;var e=d-k.y-1;var g=d+k.x-1;var a=d+k.y-1;var c=d-k.x-1;var f=this.windowEl.getCoordinates();var b=f.width-j+2;var h=f.height-j+2;this.n.setStyles({top:e,left:c+10,width:b-20});this.e.setStyles({top:e+10,right:g,height:h-30});this.s.setStyles({bottom:a,left:c+10,width:b-30});this.w.setStyles({top:e+10,left:c,height:h-20});this.ne.setStyles({top:e,right:g});this.se.setStyles({bottom:a,right:g});this.sw.setStyles({bottom:a,left:c});this.nw.setStyles({top:e,left:c})},detachResizable:function(){this.resizable1.detach();this.resizable2.detach();this.resizable3.detach();this.resizable4.detach();this.resizable5.detach();this.windowEl.getElements(".handle").hide()},reattachResizable:function(){this.resizable1.attach();this.resizable2.attach();this.resizable3.attach();this.resizable4.attach();this.resizable5.attach();this.windowEl.getElements(".handle").show()},insertWindowElements:function(){var c=this.options;var a=c.height;var d=c.width;var e=c.id;var b={};if(Browser.Engine.trident4){b.zIndexFixEl=new Element("iframe",{id:e+"_zIndexFix","class":"zIndexFix",scrolling:"no",marginWidth:0,marginHeight:0,src:"",styles:{position:"absolute"}}).inject(this.windowEl)}b.overlayEl=new Element("div",{id:e+"_overlay","class":"mochaOverlay",styles:{position:"absolute",top:0,left:0}}).inject(this.windowEl);b.titleBarEl=new Element("div",{id:e+"_titleBar","class":"mochaTitlebar",styles:{cursor:c.draggable?"move":"default"}}).inject(b.overlayEl,"top");b.titleEl=new Element("h3",{id:e+"_title","class":"mochaTitle"}).inject(b.titleBarEl);if(c.icon!=false){b.titleEl.setStyles({"padding-left":28,background:"url("+c.icon+") 5px 4px no-repeat"})}b.contentBorderEl=new Element("div",{id:e+"_contentBorder","class":"mochaContentBorder"}).inject(b.overlayEl);if(c.toolbar){b.toolbarWrapperEl=new Element("div",{id:e+"_toolbarWrapper","class":"mochaToolbarWrapper",styles:{height:c.toolbarHeight}}).inject(b.contentBorderEl,c.toolbarPosition=="bottom"?"after":"before");if(c.toolbarPosition=="bottom"){b.toolbarWrapperEl.addClass("bottom")}b.toolbarEl=new Element("div",{id:e+"_toolbar","class":"mochaToolbar",styles:{height:c.toolbarHeight}}).inject(b.toolbarWrapperEl)}if(c.toolbar2){b.toolbar2WrapperEl=new Element("div",{id:e+"_toolbar2Wrapper","class":"mochaToolbarWrapper",styles:{height:c.toolbar2Height}}).inject(b.contentBorderEl,c.toolbar2Position=="bottom"?"after":"before");if(c.toolbar2Position=="bottom"){b.toolbar2WrapperEl.addClass("bottom")}b.toolbar2El=new Element("div",{id:e+"_toolbar2","class":"mochaToolbar",styles:{height:c.toolbar2Height}}).inject(b.toolbar2WrapperEl)}b.contentWrapperEl=new Element("div",{id:e+"_contentWrapper","class":"mochaContentWrapper",styles:{width:d+"px",height:a+"px"}}).inject(b.contentBorderEl);if(this.options.shape=="gauge"){b.contentBorderEl.setStyle("borderWidth",0)}b.contentEl=new Element("div",{id:e+"_content","class":"mochaContent"}).inject(b.contentWrapperEl);if(this.options.useCanvas==true&&!MUI.ieLegacySupport){b.canvasEl=new Element("canvas",{id:e+"_canvas","class":"mochaCanvas",width:10,height:10}).inject(this.windowEl)}if(this.options.useCanvas==true&&MUI.ieLegacySupport){b.canvasEl=new Element("canvas",{id:e+"_canvas","class":"mochaCanvas",width:50000,height:20000,styles:{position:"absolute",top:0,left:0}}).inject(this.windowEl);if(MUI.ieLegacySupport&&MUI.ieSupport=="excanvas"){G_vmlCanvasManager.initElement(b.canvasEl);b.canvasEl=this.windowEl.getElement(".mochaCanvas")}}b.controlsEl=new Element("div",{id:e+"_controls","class":"mochaControls"}).inject(b.overlayEl,"after");if(c.useCanvasControls==true){b.canvasControlsEl=new Element("canvas",{id:e+"_canvasControls","class":"mochaCanvasControls",width:14,height:14}).inject(this.windowEl);if(MUI.ieLegacySupport&&MUI.ieSupport=="excanvas"){G_vmlCanvasManager.initElement(b.canvasControlsEl);b.canvasControlsEl=this.windowEl.getElement(".mochaCanvasControls")}}if(c.closable){b.closeButtonEl=new Element("div",{id:e+"_closeButton","class":"mochaCloseButton mochaWindowButton",title:"Close"}).inject(b.controlsEl)}if(c.maximizable){b.maximizeButtonEl=new Element("div",{id:e+"_maximizeButton","class":"mochaMaximizeButton mochaWindowButton",title:"Maximize"}).inject(b.controlsEl)}if(c.minimizable){b.minimizeButtonEl=new Element("div",{id:e+"_minimizeButton","class":"mochaMinimizeButton mochaWindowButton",title:"Minimize"}).inject(b.controlsEl)}if(c.useSpinner==true&&c.shape!="gauge"&&c.type!="notification"){b.spinnerEl=new Element("div",{id:e+"_spinner","class":"mochaSpinner",width:16,height:16}).inject(this.windowEl,"bottom")}if(this.options.shape=="gauge"){b.canvasHeaderEl=new Element("canvas",{id:e+"_canvasHeader","class":"mochaCanvasHeader",width:this.options.width,height:26}).inject(this.windowEl,"bottom");if(MUI.ieLegacySupport&&MUI.ieSupport=="excanvas"){G_vmlCanvasManager.initElement(b.canvasHeaderEl);b.canvasHeaderEl=this.windowEl.getElement(".mochaCanvasHeader")}}if(MUI.ieLegacySupport){b.overlayEl.setStyle("zIndex",2)}if(c.resizable){b.n=new Element("div",{id:e+"_resizeHandle_n","class":"handle",styles:{top:0,left:10,cursor:"n-resize"}}).inject(b.overlayEl,"after");b.ne=new Element("div",{id:e+"_resizeHandle_ne","class":"handle corner",styles:{top:0,right:0,cursor:"ne-resize"}}).inject(b.overlayEl,"after");b.e=new Element("div",{id:e+"_resizeHandle_e","class":"handle",styles:{top:10,right:0,cursor:"e-resize"}}).inject(b.overlayEl,"after");b.se=new Element("div",{id:e+"_resizeHandle_se","class":"handle cornerSE",styles:{bottom:0,right:0,cursor:"se-resize"}}).inject(b.overlayEl,"after");b.s=new Element("div",{id:e+"_resizeHandle_s","class":"handle",styles:{bottom:0,left:10,cursor:"s-resize"}}).inject(b.overlayEl,"after");b.sw=new Element("div",{id:e+"_resizeHandle_sw","class":"handle corner",styles:{bottom:0,left:0,cursor:"sw-resize"}}).inject(b.overlayEl,"after");b.w=new Element("div",{id:e+"_resizeHandle_w","class":"handle",styles:{top:10,left:0,cursor:"w-resize"}}).inject(b.overlayEl,"after");b.nw=new Element("div",{id:e+"_resizeHandle_nw","class":"handle corner",styles:{top:0,left:0,cursor:"nw-resize"}}).inject(b.overlayEl,"after")}$extend(this,b)},setColors:function(){if(this.options.useCanvas==true){var c=/\?(.*?)\)/;if(this.titleBarEl.getStyle("backgroundImage")!="none"){var d=this.titleBarEl.getStyle("backgroundImage");d=d.match(c)[1];d=d.parseQueryString();var a=d.from;var b=d.to.replace(/\"/,"");this.options.headerStartColor=new Color(a);this.options.headerStopColor=new Color(b);this.titleBarEl.addClass("replaced")}else{if(this.titleBarEl.getStyle("background-color")!==""&&this.titleBarEl.getStyle("background-color")!=="transparent"){this.options.headerStartColor=new Color(this.titleBarEl.getStyle("background-color")).mix("#fff",20);this.options.headerStopColor=new Color(this.titleBarEl.getStyle("background-color")).mix("#000",20);this.titleBarEl.addClass("replaced")}}if(this.windowEl.getStyle("background-color")!==""&&this.windowEl.getStyle("background-color")!=="transparent"){this.options.bodyBgColor=new Color(this.windowEl.getStyle("background-color"));this.windowEl.addClass("replaced")}if(this.options.resizable&&this.se.getStyle("background-color")!==""&&this.se.getStyle("background-color")!=="transparent"){this.options.resizableColor=new Color(this.se.getStyle("background-color"));this.se.addClass("replaced")}}if(this.options.useCanvasControls==true){if(this.minimizeButtonEl){if(this.minimizeButtonEl.getStyle("color")!==""&&this.minimizeButtonEl.getStyle("color")!=="transparent"){this.options.minimizeColor=new Color(this.minimizeButtonEl.getStyle("color"))}if(this.minimizeButtonEl.getStyle("background-color")!==""&&this.minimizeButtonEl.getStyle("background-color")!=="transparent"){this.options.minimizeBgColor=new Color(this.minimizeButtonEl.getStyle("background-color"));this.minimizeButtonEl.addClass("replaced")}}if(this.maximizeButtonEl){if(this.maximizeButtonEl.getStyle("color")!==""&&this.maximizeButtonEl.getStyle("color")!=="transparent"){this.options.maximizeColor=new Color(this.maximizeButtonEl.getStyle("color"))}if(this.maximizeButtonEl.getStyle("background-color")!==""&&this.maximizeButtonEl.getStyle("background-color")!=="transparent"){this.options.maximizeBgColor=new Color(this.maximizeButtonEl.getStyle("background-color"));this.maximizeButtonEl.addClass("replaced")}}if(this.closeButtonEl){if(this.closeButtonEl.getStyle("color")!==""&&this.closeButtonEl.getStyle("color")!=="transparent"){this.options.closeColor=new Color(this.closeButtonEl.getStyle("color"))}if(this.closeButtonEl.getStyle("background-color")!==""&&this.closeButtonEl.getStyle("background-color")!=="transparent"){this.options.closeBgColor=new Color(this.closeButtonEl.getStyle("background-color"));this.closeButtonEl.addClass("replaced")}}}},drawWindow:function(b){if(this.drawingWindow==true){return}this.drawingWindow=true;if(this.isCollapsed){this.drawWindowCollapsed(b);return}var g=this.windowEl;var m=this.options;var c=m.shadowBlur;var j=c*2;var l=this.options.shadowOffset;this.overlayEl.setStyles({width:this.contentWrapperEl.offsetWidth});if(this.iframeEl){this.iframeEl.setStyle("height",this.contentWrapperEl.offsetHeight)}var d=this.contentBorderEl.getStyle("margin-top").toInt()+this.contentBorderEl.getStyle("margin-bottom").toInt();var f=this.toolbarWrapperEl?this.toolbarWrapperEl.getStyle("height").toInt()+this.toolbarWrapperEl.getStyle("margin-top").toInt():0;var e=this.toolbar2WrapperEl?this.toolbar2WrapperEl.getStyle("height").toInt()+this.toolbar2WrapperEl.getStyle("margin-top").toInt():0;this.headerFooterShadow=m.headerHeight+m.footerHeight+j;var h=this.contentWrapperEl.getStyle("height").toInt()+this.headerFooterShadow+f+e+d;var a=this.contentWrapperEl.getStyle("width").toInt()+j;this.windowEl.setStyles({height:h,width:a});this.overlayEl.setStyles({height:h,top:c-l.y,left:c-l.x});if(this.options.useCanvas==true){if(MUI.ieLegacySupport){this.canvasEl.height=20000;this.canvasEl.width=50000}this.canvasEl.height=h;this.canvasEl.width=a}if(Browser.Engine.trident4){this.zIndexFixEl.setStyles({width:a,height:h})}this.titleBarEl.setStyles({width:a-j,height:m.headerHeight});if(m.useSpinner==true&&m.shape!="gauge"&&m.type!="notification"){this.spinnerEl.setStyles({left:c-l.x+3,bottom:c+l.y+4})}if(this.options.useCanvas!=false){var k=this.canvasEl.getContext("2d");k.clearRect(0,0,a,h);switch(m.shape){case"box":this.drawBox(k,a,h,c,l,b);break;case"gauge":this.drawGauge(k,a,h,c,l,b);break}if(m.resizable){MUI.triangle(k,a-(c+l.x+17),h-(c+l.y+18),11,11,m.resizableColor,1)}if(MUI.ieLegacySupport){MUI.triangle(k,0,0,10,10,m.resizableColor,0)}}if(m.type!="notification"&&m.useCanvasControls==true){this.drawControls(a,h,b)}if(MUI.Desktop&&this.contentWrapperEl.getChildren(".column").length!=0){MUI.rWidth(this.contentWrapperEl);this.contentWrapperEl.getChildren(".column").each(function(n){MUI.panelHeight(n)})}this.drawingWindow=false;return this},drawWindowCollapsed:function(b){var e=this.windowEl;var k=this.options;var c=k.shadowBlur;var f=c*2;var j=k.shadowOffset;var d=k.headerHeight+f+2;var g=d;var a=this.contentWrapperEl.getStyle("width").toInt()+f;this.windowEl.setStyle("height",g);this.overlayEl.setStyles({height:g,top:c-j.y,left:c-j.x});if(Browser.Engine.trident4){this.zIndexFixEl.setStyles({width:a,height:g})}this.windowEl.setStyle("width",a);this.overlayEl.setStyle("width",a);this.titleBarEl.setStyles({width:a-f,height:k.headerHeight});if(this.options.useCanvas!=false){this.canvasEl.height=g;this.canvasEl.width=a;var h=this.canvasEl.getContext("2d");h.clearRect(0,0,a,g);this.drawBoxCollapsed(h,a,g,c,j,b);if(k.useCanvasControls==true){this.drawControls(a,g,b)}if(MUI.ieLegacySupport){MUI.triangle(h,0,0,10,10,k.resizableColor,0)}}this.drawingWindow=false;return this},drawControls:function(g,e,h){var f=this.options;var d=f.shadowBlur;var c=f.shadowOffset;var b=f.controlsOffset;this.controlsEl.setStyles({right:d+c.x+b.right,top:d-c.y+b.top});this.canvasControlsEl.setStyles({right:d+c.x+b.right,top:d-c.y+b.top});this.closebuttonX=f.closable?this.mochaControlsWidth-7:this.mochaControlsWidth+12;this.maximizebuttonX=this.closebuttonX-(f.maximizable?19:0);this.minimizebuttonX=this.maximizebuttonX-(f.minimizable?19:0);var a=this.canvasControlsEl.getContext("2d");a.clearRect(0,0,100,100);if(this.options.closable){this.closebutton(a,this.closebuttonX,7,f.closeBgColor,1,f.closeColor,1)}if(this.options.maximizable){this.maximizebutton(a,this.maximizebuttonX,7,f.maximizeBgColor,1,f.maximizeColor,1)}if(this.options.minimizable){this.minimizebutton(a,this.minimizebuttonX,7,f.minimizeBgColor,1,f.minimizeColor,1)}if(MUI.ieLegacySupport){MUI.circle(a,0,0,3,this.options.resizableColor,0)}},drawBox:function(h,a,g,c,j,b){var k=this.options;var f=c*2;var d=this.options.cornerRadius;if(b!=false){for(var e=0;e<=c;e++){MUI.roundedRect(h,j.x+e,j.y+e,a-(e*2)-j.x,g-(e*2)-j.y,d+(c-e),[0,0,0],e==c?0.29:0.065+(e*0.01))}}this.bodyRoundedRect(h,c-j.x,c-j.y,a-f,g-f,d,k.bodyBgColor);if(this.options.type!="notification"){this.topRoundedRect(h,c-j.x,c-j.y,a-f,k.headerHeight,d,k.headerStartColor,k.headerStopColor)}},drawBoxCollapsed:function(h,a,g,c,j,b){var k=this.options;var f=c*2;var d=k.cornerRadius;if(b!=false){for(var e=0;e<=c;e++){MUI.roundedRect(h,j.x+e,j.y+e,a-(e*2)-j.x,g-(e*2)-j.y,d+(c-e),[0,0,0],e==c?0.3:0.06+(e*0.01))}}this.topRoundedRect2(h,c-j.x,c-j.y,a-f,k.headerHeight+2,d,k.headerStartColor,k.headerStopColor)},drawGauge:function(g,a,f,c,h,b){var j=this.options;var d=(a*0.5)-(c)+16;if(b!=false){for(var e=0;e<=c;e++){MUI.circle(g,a*0.5+h.x,(f+j.headerHeight)*0.5+h.x,(a*0.5)-(e*2)-h.x,[0,0,0],e==c?0.75:0.075+(e*0.04))}}MUI.circle(g,a*0.5-h.x,(f+j.headerHeight)*0.5-h.y,(a*0.5)-c,j.bodyBgColor,1);this.canvasHeaderEl.setStyles({top:c-h.y,left:c-h.x});var g=this.canvasHeaderEl.getContext("2d");g.clearRect(0,0,a,100);g.beginPath();g.lineWidth=24;g.lineCap="round";g.moveTo(13,13);g.lineTo(a-(c*2)-13,13);g.strokeStyle="rgba(0, 0, 0, .65)";g.stroke()},bodyRoundedRect:function(d,c,g,f,b,a,e){d.fillStyle="rgba("+e.join(",")+", 1)";d.beginPath();d.moveTo(c,g+a);d.lineTo(c,g+b-a);d.quadraticCurveTo(c,g+b,c+a,g+b);d.lineTo(c+f-a,g+b);d.quadraticCurveTo(c+f,g+b,c+f,g+b-a);d.lineTo(c+f,g+a);d.quadraticCurveTo(c+f,g,c+f-a,g);d.lineTo(c+a,g);d.quadraticCurveTo(c,g,c,g+a);d.fill()},topRoundedRect:function(j,g,f,a,h,e,c,d){var b=j.createLinearGradient(0,0,0,h);b.addColorStop(0,"rgb("+c.join(",")+")");b.addColorStop(1,"rgb("+d.join(",")+")");j.fillStyle=b;j.beginPath();j.moveTo(g,f);j.lineTo(g,f+h);j.lineTo(g+a,f+h);j.lineTo(g+a,f+e);j.quadraticCurveTo(g+a,f,g+a-e,f);j.lineTo(g+e,f);j.quadraticCurveTo(g,f,g,f+e);j.fill()},topRoundedRect2:function(j,g,f,a,h,e,c,d){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){j.fillStyle="rgba("+d.join(",")+", 1)"}else{var b=j.createLinearGradient(0,this.options.shadowBlur-1,0,h+this.options.shadowBlur+3);b.addColorStop(0,"rgb("+c.join(",")+")");b.addColorStop(1,"rgb("+d.join(",")+")");j.fillStyle=b}j.beginPath();j.moveTo(g,f+e);j.lineTo(g,f+h-e);j.quadraticCurveTo(g,f+h,g+e,f+h);j.lineTo(g+a-e,f+h);j.quadraticCurveTo(g+a,f+h,g+a,f+h-e);j.lineTo(g+a,f+e);j.quadraticCurveTo(g+a,f,g+a-e,f);j.lineTo(g+e,f);j.quadraticCurveTo(g,f,g,f+e);j.fill()},maximizebutton:function(e,c,h,b,g,f,d){e.beginPath();e.arc(c,h,7,0,Math.PI*2,true);e.fillStyle="rgba("+b.join(",")+","+g+")";e.fill();e.strokeStyle="rgba("+f.join(",")+","+d+")";e.lineWidth=2;e.beginPath();e.moveTo(c,h-3.5);e.lineTo(c,h+3.5);e.moveTo(c-3.5,h);e.lineTo(c+3.5,h);e.stroke()},closebutton:function(e,c,h,b,g,f,d){e.beginPath();e.arc(c,h,7,0,Math.PI*2,true);e.fillStyle="rgba("+b.join(",")+","+g+")";e.fill();e.strokeStyle="rgba("+f.join(",")+","+d+")";e.lineWidth=2;e.beginPath();e.moveTo(c-3,h-3);e.lineTo(c+3,h+3);e.moveTo(c+3,h-3);e.lineTo(c-3,h+3);e.stroke()},minimizebutton:function(e,c,h,b,g,f,d){e.beginPath();e.arc(c,h,7,0,Math.PI*2,true);e.fillStyle="rgba("+b.join(",")+","+g+")";e.fill();e.strokeStyle="rgba("+f.join(",")+","+d+")";e.lineWidth=2;e.beginPath();e.moveTo(c-3.5,h);e.lineTo(c+3.5,h);e.stroke()},setMochaControlsWidth:function(){this.mochaControlsWidth=0;var a=this.options;if(a.minimizable){this.mochaControlsWidth+=(this.minimizeButtonEl.getStyle("margin-left").toInt()+this.minimizeButtonEl.getStyle("width").toInt())}if(a.maximizable){this.mochaControlsWidth+=(this.maximizeButtonEl.getStyle("margin-left").toInt()+this.maximizeButtonEl.getStyle("width").toInt())}if(a.closable){this.mochaControlsWidth+=(this.closeButtonEl.getStyle("margin-left").toInt()+this.closeButtonEl.getStyle("width").toInt())}this.controlsEl.setStyle("width",this.mochaControlsWidth);if(a.useCanvasControls==true){this.canvasControlsEl.setProperty("width",this.mochaControlsWidth)}},hideSpinner:function(){if(this.spinnerEl){this.spinnerEl.hide()}return this},showSpinner:function(){if(this.spinnerEl){this.spinnerEl.show()}return this},close:function(){if(!this.isClosing){MUI.closeWindow(this.windowEl)}return this},minimize:function(){MUI.Dock.minimizeWindow(this.windowEl);return this},maximize:function(){if(this.isMinimized){MUI.Dock.restoreMinimized(this.windowEl)}MUI.Desktop.maximizeWindow(this.windowEl);return this},restore:function(){if(this.isMinimized){MUI.Dock.restoreMinimized(this.windowEl)}else{if(this.isMaximized){MUI.Desktop.restoreWindow(this.windowEl)}}return this},resize:function(a){MUI.resizeWindow(this.windowEl,a);return this},center:function(){MUI.centerWindow(this.windowEl);return this},hide:function(){this.windowEl.setStyle("display","none");return this},show:function(){this.windowEl.setStyle("display","block");return this}});MUI.extend({closeWindow:function(c){var a=c.retrieve("instance");if(c!=$(c)||a.isClosing){return}a.isClosing=true;a.fireEvent("onClose",c);if(a.options.storeOnClose){this.storeOnClose(a,c);return}if(a.check){a.check.destroy()}if((a.options.type=="modal"||a.options.type=="modal2")&&Browser.Engine.trident4){$("modalFix").hide()}if(MUI.options.advancedEffects==false){if(a.options.type=="modal"||a.options.type=="modal2"){$("modalOverlay").setStyle("opacity",0)}MUI.closingJobs(c);return true}else{if(MUI.ieLegacySupport){a.drawWindow(false)}if(a.options.type=="modal"||a.options.type=="modal2"){MUI.Modal.modalOverlayCloseMorph.start({opacity:0})}var b=new Fx.Morph(c,{duration:120,onComplete:function(){MUI.closingJobs(c);return true}.bind(this)});b.start({opacity:0.4})}},closingJobs:function(e){var d=MUI.Windows.instances;var a=d.get(e.id);e.setStyle("visibility","hidden");if(MUI.ieLegacySupport){e.dispose()}else{e.destroy()}a.fireEvent("onCloseComplete");if(a.options.type!="notification"){var c=this.getWindowWithHighestZindex();this.focusWindow(c)}d.erase(a.options.id);if(this.loadingWorkspace==true){this.windowUnload()}if(MUI.Dock&&$(MUI.options.dock)&&a.options.type=="window"){var b=$(a.options.id+"_dockTab");if(b!=null){MUI.Dock.dockSortables.removeItems(b).destroy()}MUI.Desktop.setDesktopSize()}},storeOnClose:function(a,d){if(a.check){a.check.hide()}d.setStyles({zIndex:-1});d.addClass("windowClosed");d.removeClass("mocha");if(MUI.Dock&&$(MUI.options.dock)&&a.options.type=="window"){var c=$(a.options.id+"_dockTab");if(c!=null){c.hide()}MUI.Desktop.setDesktopSize()}a.fireEvent("onCloseComplete");if(a.options.type!="notification"){var b=this.getWindowWithHighestZindex();this.focusWindow(b)}a.isClosing=false},closeAll:function(){$$(".mocha").each(function(a){this.closeWindow(a)}.bind(this))},collapseToggle:function(c){var a=c.retrieve("instance");var b=c.getElements(".handle");if(a.isMaximized==true){return}if(a.isCollapsed==false){a.isCollapsed=true;b.hide();if(a.iframeEl){a.iframeEl.setStyle("visibility","hidden")}a.contentBorderEl.setStyles({visibility:"hidden",position:"absolute",top:-10000,left:-10000});if(a.toolbarWrapperEl){a.toolbarWrapperEl.setStyles({visibility:"hidden",position:"absolute",top:-10000,left:-10000})}a.drawWindowCollapsed()}else{a.isCollapsed=false;a.drawWindow();a.contentBorderEl.setStyles({visibility:"visible",position:null,top:null,left:null});if(a.toolbarWrapperEl){a.toolbarWrapperEl.setStyles({visibility:"visible",position:null,top:null,left:null})}if(a.iframeEl){a.iframeEl.setStyle("visibility","visible")}b.show()}},toggleWindowVisibility:function(){MUI.Windows.instances.each(function(a){if(a.options.type=="modal"||a.options.type=="modal2"||a.isMinimized==true){return}var b=$(a.options.id);if(b.getStyle("visibility")=="visible"){if(a.iframe){a.iframeEl.setStyle("visibility","hidden")}if(a.toolbarEl){a.toolbarWrapperEl.setStyle("visibility","hidden")}a.contentBorderEl.setStyle("visibility","hidden");b.setStyle("visibility","hidden");MUI.Windows.windowsVisible=false}else{b.setStyle("visibility","visible");a.contentBorderEl.setStyle("visibility","visible");if(a.iframe){a.iframeEl.setStyle("visibility","visible")}if(a.toolbarEl){a.toolbarWrapperEl.setStyle("visibility","visible")}MUI.Windows.windowsVisible=true}}.bind(this))},focusWindow:function(e,c){MUI.Windows.focusingWindow=true;var b=function(){MUI.Windows.focusingWindow=false};b.delay(170,this);if($$(".mocha").length==0){return}if(e!=$(e)||e.hasClass("isFocused")){return}var d=MUI.Windows.instances;var a=d.get(e.id);if(a.options.type=="notification"){e.setStyle("zIndex",11001);return}MUI.Windows.indexLevel+=2;e.setStyle("zIndex",MUI.Windows.indexLevel);$("windowUnderlay").setStyle("zIndex",MUI.Windows.indexLevel-1).inject($(e),"after");d.each(function(f){if(f.windowEl.hasClass("isFocused")){f.fireEvent("onBlur",f.windowEl)}f.windowEl.removeClass("isFocused")});if(MUI.Dock&&$(MUI.options.dock)&&a.options.type=="window"){MUI.Dock.makeActiveTab()}e.addClass("isFocused");if(c!=false){a.fireEvent("onFocus",e)}},getWindowWithHighestZindex:function(){this.highestZindex=0;$$(".mocha").each(function(a){this.zIndex=a.getStyle("zIndex");if(this.zIndex>=this.highestZindex){this.highestZindex=this.zIndex}}.bind(this));$$(".mocha").each(function(a){if(a.getStyle("zIndex")==this.highestZindex){this.windowWithHighestZindex=a}}.bind(this));return this.windowWithHighestZindex},blurAll:function(){if(MUI.Windows.focusingWindow==false){$$(".mocha").each(function(b){var a=b.retrieve("instance");if(a.options.type!="modal"&&a.options.type!="modal2"){b.removeClass("isFocused")}});$$(".dockTab").removeClass("activeDockTab")}},centerWindow:function(f){if(!f){MUI.Windows.instances.each(function(g){if(g.windowEl.hasClass("isFocused")){f=g.windowEl}})}var a=f.retrieve("instance");var b=a.options;var d=b.container.getCoordinates();var c=window.getScroll().y+(window.getSize().y*0.5)-(f.offsetHeight*0.5);if(c<-a.options.shadowBlur){c=-a.options.shadowBlur}var e=(d.width*0.5)-(f.offsetWidth*0.5);if(e<-a.options.shadowBlur){e=-a.options.shadowBlur}if(MUI.options.advancedEffects==true){a.morph.start({top:c,left:e})}else{f.setStyles({top:c,left:e})}},resizeWindow:function(f,j){var g=f.retrieve("instance");$extend({width:null,height:null,top:null,left:null,centered:true},j);var c=f.getStyle("width").toInt();var h=f.getStyle("height").toInt();var d=f.getStyle("top").toInt();var b=f.getStyle("left").toInt();if(j.centered){var e=j.top||d-((j.height-h)*0.5);var a=j.left||b-((j.width-c)*0.5)}else{var e=j.top||d;var a=j.left||b}if(MUI.options.advancedEffects==false){f.setStyles({top:e,left:a});g.contentWrapperEl.setStyles({height:j.height,width:j.width});g.drawWindow();if(g.iframeEl){if(!MUI.ieLegacySupport){g.iframeEl.setStyle("visibility","visible")}else{g.iframeEl.show()}}}else{f.retrieve("resizeMorph").start({"0":{height:j.height,width:j.width},"1":{top:e,left:a}})}return g},dynamicResize:function(d){var a=d.retrieve("instance");var c=a.contentWrapperEl;var b=a.contentEl;c.setStyles({height:b.offsetHeight,width:b.offsetWidth});a.drawWindow()}});document.addEvent("keydown",function(a){if(a.key=="q"&&a.control&&a.alt){MUI.toggleWindowVisibility()}});MUI.files[MUI.path.source+"Window/Modal.js"]="loaded";MUI.Modal=new Class({Extends:MUI.Window,options:{type:"modal"},initialize:function(a){if(!$("modalOverlay")){this.modalInitialize();window.addEvent("resize",function(){this.setModalSize()}.bind(this))}this.parent(a)},modalInitialize:function(){var a=new Element("div",{id:"modalOverlay",styles:{height:document.getCoordinates().height,opacity:0.6}}).inject(document.body);a.setStyles({position:Browser.Engine.trident4?"absolute":"fixed"});a.addEvent("click",function(d){var c=MUI.Windows.instances.get(MUI.currentModal.id);if(c.options.modalOverlayClose==true){MUI.closeWindow(MUI.currentModal)}});if(Browser.Engine.trident4){var b=new Element("iframe",{id:"modalFix",scrolling:"no",marginWidth:0,marginHeight:0,src:"",styles:{height:document.getCoordinates().height}}).inject(document.body)}MUI.Modal.modalOverlayOpenMorph=new Fx.Morph($("modalOverlay"),{duration:150});MUI.Modal.modalOverlayCloseMorph=new Fx.Morph($("modalOverlay"),{duration:150,onComplete:function(){$("modalOverlay").hide();if(Browser.Engine.trident4){$("modalFix").hide()}}.bind(this)})},setModalSize:function(){$("modalOverlay").setStyle("height",document.getCoordinates().height);if(Browser.Engine.trident4){$("modalFix").setStyle("height",document.getCoordinates().height)}}});MUI.files[MUI.path.source+"Window/Windows-from-html.js"]="loaded";MUI.extend({NewWindowsFromHTML:function(){$$(".mocha").each(function(b){if(Browser.Engine.presto||Browser.Engine.trident5){b.hide()}var d=b.getElement("h3.mochaTitle");if(Browser.Engine.presto){b.show()}var c=b.getStyles("height","width");var a={id:b.getProperty("id"),height:c.height.toInt(),width:c.width.toInt(),x:b.getStyle("left").toInt(),y:b.getStyle("top").toInt()};if(d){a.title=d.innerHTML;d.destroy()}a.content=b.innerHTML;b.destroy();new MUI.Window(a,true)}.bind(this))}});MUI.files[MUI.path.source+"Window/Windows-from-json.js"]="loaded";MUI.extend({newWindowsFromJSON:function(newWindows){newWindows.each(function(options){var temp=new Hash(options);temp.each(function(value,key,hash){if($type(value)!="string"){return}if(value.substring(0,8)=="function"){eval("options."+key+" = "+value)}});new MUI.Window(options)})}});MUI.files[MUI.path.source+"Window/Arrange-cascade.js"]="loaded";MUI.extend({arrangeCascade:function(){var g=30;var a=20;var k=50;var c=40;var j=document.getCoordinates();var d=0;MUI.Windows.instances.each(function(l){if(!l.isMinimized&&l.options.draggable){d++}});if((k*(d+1))>=(j.height-g)){var e=(j.height-g)/(d+1)}else{var e=k}if((c*(d+1))>=(j.width-a-20)){var b=(j.width-a-20)/(d+1)}else{var b=c}var h=a;var f=g;$$(".mocha").each(function(n){var l=n.retrieve("instance");if(!l.isMinimized&&!l.isMaximized&&l.options.draggable){id=n.id;MUI.focusWindow(n);h+=b;f+=e;if(MUI.options.advancedEffects==false){n.setStyles({top:f,left:h})}else{var m=new Fx.Morph(n,{duration:550});m.start({top:f,left:h})}}}.bind(this))}});MUI.files[MUI.path.source+"Window/Arrange-tile.js"]="loaded";MUI.extend({arrangeTile:function(){var g=30;var b=20;var j=10;var f=80;var a=MUI.Windows.instances;var l=0;a.each(function(o){if(!o.isMinimized&&!o.isMaximized){l++}});var h=3;var n=Math.ceil(l/h);var k=document.getCoordinates();var e=((k.width-b)/h);var d=((k.height-g)/n);var m=0;var c=0;a.each(function(x){if(!x.isMinimized&&!x.isMaximized&&x.options.draggable){var t=x.contentWrapperEl;var o=t.getCoordinates();var w=x.windowEl.getCoordinates();var s=o.top-w.top;var v=w.height-o.height-s;var r=o.left-w.left;var y=w.width-o.width-r;var p=(j+(c*e));var u=(f+(m*d));x.drawWindow();MUI.focusWindow(x.windowEl);if(MUI.options.advancedEffects==false){x.windowEl.setStyles({top:u,left:p})}else{var q=new Fx.Morph(x.windowEl,{duration:550});q.start({top:u,left:p})}if(++c===h){m++;c=0}}}.bind(this))}});MUI.files[MUI.path.source+"Components/Tabs.js"]="loaded";MUI.extend({initializeTabs:function(a){$(a).setStyle("list-style","none");$(a).getElements("li").addEvent("click",function(b){MUI.selected(this,a)})},selected:function(b,a){$(a).getChildren().each(function(c){c.removeClass("selected")});b.addClass("selected")}});MUI.files[MUI.path.source+"Layout/Layout.js"]="loaded";MUI.extend({Columns:{instances:new Hash(),columnIDCount:0},Panels:{instances:new Hash(),panelIDCount:0}});MUI.Desktop={options:{desktop:"desktop",desktopHeader:"desktopHeader",desktopFooter:"desktopFooter",desktopNavBar:"desktopNavbar",pageWrapper:"pageWrapper",page:"page",desktopFooter:"desktopFooterWrapper"},initialize:function(){this.desktop=$(this.options.desktop);this.desktopHeader=$(this.options.desktopHeader);this.desktopNavBar=$(this.options.desktopNavBar);this.pageWrapper=$(this.options.pageWrapper);this.page=$(this.options.page);this.desktopFooter=$(this.options.desktopFooter);if(this.desktop){($$("body")).setStyles({overflow:"hidden",height:"100%",margin:0});($$("html")).setStyles({overflow:"hidden",height:"100%"})}if(!MUI.Dock){this.setDesktopSize()}this.menuInitialize();window.addEvent("resize",function(a){this.onBrowserResize()}.bind(this));if(MUI.myChain){MUI.myChain.callChain()}},menuInitialize:function(){if(Browser.Engine.trident4&&this.desktopNavBar){this.desktopNavBar.getElements("li").each(function(a){a.addEvent("mouseenter",function(){this.addClass("ieHover")});a.addEvent("mouseleave",function(){this.removeClass("ieHover")})})}},onBrowserResize:function(){this.setDesktopSize();setTimeout(function(){MUI.Windows.instances.each(function(a){if(a.isMaximized){if(a.iframeEl){a.iframeEl.setStyle("visibility","hidden")}var d=document.getCoordinates();var b=a.contentBorderEl.getStyle("margin-top").toInt()+a.contentBorderEl.getStyle("margin-bottom").toInt();var c=a.toolbarWrapperEl?a.toolbarWrapperEl.getStyle("height").toInt()+a.toolbarWrapperEl.getStyle("margin-top").toInt():0;a.contentWrapperEl.setStyles({height:d.height-a.options.headerHeight-a.options.footerHeight-b-c,width:d.width});a.drawWindow();if(a.iframeEl){a.iframeEl.setStyles({height:a.contentWrapperEl.getStyle("height")});a.iframeEl.setStyle("visibility","visible")}}}.bind(this))}.bind(this),100)},setDesktopSize:function(){var d=window.getCoordinates();var b=$(MUI.options.dockWrapper);if(this.desktop){this.desktop.setStyle("height",d.height)}if(this.pageWrapper){var a=MUI.dockVisible?b.offsetHeight:0;var c=d.height;c-=this.pageWrapper.getStyle("margin-top").toInt();c-=this.pageWrapper.getStyle("margin-bottom").toInt();if(this.desktopHeader){c-=this.desktopHeader.offsetHeight}if(this.desktopFooter){c-=this.desktopFooter.offsetHeight}c-=a;if(c<0){c=0}this.pageWrapper.setStyle("height",c)}if(MUI.Columns.instances.getKeys().length>0){MUI.Desktop.resizePanels()}},resizePanels:function(){MUI.panelHeight();MUI.rWidth()},maximizeWindow:function(f){var g=MUI.Windows.instances.get(f.id);var j=g.options;var c=g.windowDrag;if(f!=$(f)||g.isMaximized){return}if(g.isCollapsed){MUI.collapseToggle(f)}g.isMaximized=true;if(g.options.restrict){c.detach();if(j.resizable){g.detachResizable()}g.titleBarEl.setStyle("cursor","default")}if(j.container!=this.desktop){this.desktop.grab(f);if(this.options.restrict){c.container=this.desktop}}g.oldTop=f.getStyle("top");g.oldLeft=f.getStyle("left");var d=g.contentWrapperEl;d.oldWidth=d.getStyle("width");d.oldHeight=d.getStyle("height");if(g.iframeEl){if(!MUI.ieLegacySupport){g.iframeEl.setStyle("visibility","hidden")}else{g.iframeEl.hide()}}var b=document.getCoordinates();var j=g.options;var e=j.shadowBlur;var h=j.shadowOffset;var a=b.height-j.headerHeight-j.footerHeight;a-=g.contentBorderEl.getStyle("margin-top").toInt();a-=g.contentBorderEl.getStyle("margin-bottom").toInt();a-=(g.toolbarWrapperEl?g.toolbarWrapperEl.getStyle("height").toInt()+g.toolbarWrapperEl.getStyle("margin-top").toInt():0);MUI.resizeWindow(f,{width:b.width,height:a,top:h.y-e,left:h.x-e});g.fireEvent("onMaximize",f);if(g.maximizeButtonEl){g.maximizeButtonEl.setProperty("title","Restore")}MUI.focusWindow(f)},restoreWindow:function(d){var a=d.retrieve("instance");if(d!=$(d)||!a.isMaximized){return}var b=a.options;a.isMaximized=false;if(b.restrict){a.windowDrag.attach();if(b.resizable){a.reattachResizable()}a.titleBarEl.setStyle("cursor","move")}if(a.iframeEl){if(!MUI.ieLegacySupport){a.iframeEl.setStyle("visibility","hidden")}else{a.iframeEl.hide()}}var c=a.contentWrapperEl;MUI.resizeWindow(d,{width:c.oldWidth,height:c.oldHeight,top:a.oldTop,left:a.oldLeft});a.fireEvent("onRestore",d);if(a.maximizeButtonEl){a.maximizeButtonEl.setProperty("title","Maximize")}}};MUI.Column=new Class({Implements:[Events,Options],options:{id:null,container:null,placement:null,width:null,resizeLimit:[],sortable:true,onResize:$empty,onCollapse:$empty,onExpand:$empty},initialize:function(b){this.setOptions(b);$extend(this,{timestamp:$time(),isCollapsed:false,oldWidth:0});if(this.options.id==null){this.options.id="column"+(++MUI.Columns.columnIDCount)}var b=this.options;var g=MUI.Columns.instances;var d=g.get(b.id);if(b.container==null){b.container=MUI.Desktop.pageWrapper}else{$(b.container).setStyle("overflow","hidden")}if(typeof this.options.container=="string"){this.options.container=$(this.options.container)}if(d){var a=d}if(this.columnEl){return}else{g.set(b.id,this)}if($(b.container).getElement(".pad")!=null){$(b.container).getElement(".pad").hide()}if($(b.container).getElement(".mochaContent")!=null){$(b.container).getElement(".mochaContent").hide()}this.columnEl=new Element("div",{id:this.options.id,"class":"column expanded",styles:{width:b.placement=="main"?null:b.width}}).inject($(b.container));this.columnEl.store("instance",this);var c=this.columnEl.getParent();var f=c.getStyle("height").toInt();this.columnEl.setStyle("height",f);if(this.options.sortable){if(!this.options.container.retrieve("sortables")){var e=new Sortables(this.columnEl,{opacity:1,handle:".panel-header",constrain:false,revert:false,onSort:function(){$$(".column").each(function(h){h.getChildren(".panelWrapper").each(function(j){j.getElement(".panel").removeClass("bottomPanel")});if(h.getChildren(".panelWrapper").getLast()){h.getChildren(".panelWrapper").getLast().getElement(".panel").addClass("bottomPanel")}MUI.panelHeight()}.bind(this))}.bind(this)});this.options.container.store("sortables",e)}else{this.options.container.retrieve("sortables").addLists(this.columnEl)}}if(b.placement=="main"){this.columnEl.addClass("rWidth")}switch(this.options.placement){case"left":this.handleEl=new Element("div",{id:this.options.id+"_handle","class":"columnHandle"}).inject(this.columnEl,"after");this.handleIconEl=new Element("div",{id:b.id+"_handle_icon","class":"handleIcon"}).inject(this.handleEl);addResizeRight(this.columnEl,b.resizeLimit[0],b.resizeLimit[1]);break;case"right":this.handleEl=new Element("div",{id:this.options.id+"_handle","class":"columnHandle"}).inject(this.columnEl,"before");this.handleIconEl=new Element("div",{id:b.id+"_handle_icon","class":"handleIcon"}).inject(this.handleEl);addResizeLeft(this.columnEl,b.resizeLimit[0],b.resizeLimit[1]);break}if(this.handleEl!=null){this.handleEl.addEvent("dblclick",function(){this.columnToggle()}.bind(this))}MUI.rWidth()},columnToggle:function(){var a=this.columnEl;if(this.isCollapsed==false){this.oldWidth=a.getStyle("width").toInt();this.resize.detach();this.handleEl.removeEvents("dblclick");this.handleEl.addEvent("click",function(){this.columnToggle()}.bind(this));this.handleEl.setStyle("cursor","pointer").addClass("detached");a.setStyle("width",0);this.isCollapsed=true;a.addClass("collapsed");a.removeClass("expanded");MUI.rWidth();this.fireEvent("onCollapse")}else{a.setStyle("width",this.oldWidth);this.isCollapsed=false;a.addClass("expanded");a.removeClass("collapsed");this.handleEl.removeEvents("click");this.handleEl.addEvent("dblclick",function(){this.columnToggle()}.bind(this));this.resize.attach();this.handleEl.setStyle("cursor",(Browser.Engine.webkit||Browser.Engine.gecko)?"col-resize":"e-resize").addClass("attached");MUI.rWidth();this.fireEvent("onExpand")}}});MUI.Column.implement(new Options,new Events);MUI.Panel=new Class({Implements:[Events,Options],options:{id:null,title:"New Panel",column:null,require:{css:[],images:[],js:[],onload:null},loadMethod:null,contentURL:null,method:"get",data:null,evalScripts:true,evalResponse:false,content:"Panel content",tabsURL:null,tabsData:null,tabsOnload:$empty,header:true,headerToolbox:false,headerToolboxURL:"pages/lipsum.html",headerToolboxOnload:$empty,height:125,addClass:"",scrollbars:true,padding:{top:8,right:8,bottom:8,left:8},collapsible:true,onBeforeBuild:$empty,onContentLoaded:$empty,onResize:$empty,onCollapse:$empty,onExpand:$empty},initialize:function(b){this.setOptions(b);$extend(this,{timestamp:$time(),isCollapsed:false,oldHeight:0,partner:null});if(this.options.id==null){this.options.id="panel"+(++MUI.Panels.panelIDCount)}var f=MUI.Panels.instances;var c=f.get(this.options.id);var b=this.options;if(c){var a=c}if(this.panelEl){return}else{f.set(this.options.id,this)}this.fireEvent("onBeforeBuild");if(b.loadMethod=="iframe"){b.padding={top:0,right:0,bottom:0,left:0}}this.showHandle=true;if($(b.column).getChildren().length==0){this.showHandle=false}this.panelWrapperEl=new Element("div",{id:this.options.id+"_wrapper","class":"panelWrapper expanded"}).inject($(b.column));this.panelEl=new Element("div",{id:this.options.id,"class":"panel expanded",styles:{height:b.height}}).inject(this.panelWrapperEl);this.panelEl.store("instance",this);this.panelEl.addClass(b.addClass);this.contentEl=new Element("div",{id:b.id+"_pad","class":"pad"}).inject(this.panelEl);this.contentWrapperEl=this.panelEl;this.contentEl.setStyles({"padding-top":b.padding.top,"padding-bottom":b.padding.bottom,"padding-left":b.padding.left,"padding-right":b.padding.right});this.panelHeaderEl=new Element("div",{id:this.options.id+"_header","class":"panel-header",styles:{display:b.header?"block":"none"}}).inject(this.panelEl,"before");var d=MUI.Columns.instances;var e=d.get(this.options.column);if(e.options.sortable){this.panelHeaderEl.setStyle("cursor","move");e.options.container.retrieve("sortables").addItems(this.panelWrapperEl)}if(this.options.collapsible){this.collapseToggleInit()}if(this.options.headerToolbox){this.panelHeaderToolboxEl=new Element("div",{id:b.id+"_headerToolbox","class":"panel-header-toolbox"}).inject(this.panelHeaderEl)}this.panelHeaderContentEl=new Element("div",{id:b.id+"_headerContent","class":"panel-headerContent"}).inject(this.panelHeaderEl);this.titleEl=new Element("h2",{id:b.id+"_title"}).inject(this.panelHeaderContentEl);this.handleEl=new Element("div",{id:b.id+"_handle","class":"horizontalHandle",styles:{display:this.showHandle==true?"block":"none"}}).inject(this.panelEl,"after");this.handleIconEl=new Element("div",{id:b.id+"_handle_icon","class":"handleIcon"}).inject(this.handleEl);addResizeBottom(b.id);if(b.require.css.length||b.require.images.length){new MUI.Require({css:b.require.css,images:b.require.images,onload:function(){this.newPanel()}.bind(this)})}else{this.newPanel()}},newPanel:function(){options=this.options;if(this.options.headerToolbox){MUI.updateContent({element:this.panelEl,childElement:this.panelHeaderToolboxEl,loadMethod:"xhr",url:options.headerToolboxURL,onContentLoaded:options.headerToolboxOnload})}if(options.tabsURL==null){this.titleEl.set("html",options.title)}else{this.panelHeaderContentEl.addClass("tabs");MUI.updateContent({element:this.panelEl,childElement:this.panelHeaderContentEl,loadMethod:"xhr",url:options.tabsURL,data:options.tabsData,onContentLoaded:options.tabsOnload})}MUI.updateContent({element:this.panelEl,content:options.content,method:options.method,data:options.data,url:options.contentURL,onContentLoaded:null,require:{js:options.require.js,onload:options.require.onload}});$(options.column).getChildren(".panelWrapper").each(function(a){a.getElement(".panel").removeClass("bottomPanel")});$(options.column).getChildren(".panelWrapper").getLast().getElement(".panel").addClass("bottomPanel");MUI.panelHeight(options.column,this.panelEl,"new")},collapseToggleInit:function(a){var a=this.options;this.panelHeaderCollapseBoxEl=new Element("div",{id:a.id+"_headerCollapseBox","class":"toolbox"}).inject(this.panelHeaderEl);if(a.headerToolbox){this.panelHeaderCollapseBoxEl.addClass("divider")}this.collapseToggleEl=new Element("div",{id:a.id+"_collapseToggle","class":"panel-collapse icon16",styles:{width:16,height:16},title:"Collapse Panel"}).inject(this.panelHeaderCollapseBoxEl);this.collapseToggleEl.addEvent("click",function(f){var b=this.panelEl;var c=this.panelWrapperEl;var g=MUI.Panels.instances;var e=[];c.getAllPrevious(".panelWrapper").each(function(j){var h=g.get(j.getElement(".panel").id);if(h.isCollapsed==false){e.push(j.getElement(".panel").id)}});c.getAllNext(".panelWrapper").each(function(j){var h=g.get(j.getElement(".panel").id);if(h.isCollapsed==false){e.push(j.getElement(".panel").id)}});if(this.isCollapsed==false){var d=MUI.Columns.instances.get($(a.column).id);if(e.length==0&&d.options.placement!="main"){var d=MUI.Columns.instances.get($(a.column).id);d.columnToggle();return}else{if(e.length==0&&d.options.placement=="main"){return}}this.oldHeight=b.getStyle("height").toInt();if(this.oldHeight<10){this.oldHeight=20}this.contentEl.setStyle("position","absolute");b.setStyle("height",0);this.isCollapsed=true;c.addClass("collapsed");c.removeClass("expanded");MUI.panelHeight(a.column,b,"collapsing");MUI.panelHeight();this.collapseToggleEl.removeClass("panel-collapsed");this.collapseToggleEl.addClass("panel-expand");this.collapseToggleEl.setProperty("title","Expand Panel");this.fireEvent("onCollapse")}else{this.contentEl.setStyle("position",null);b.setStyle("height",this.oldHeight);this.isCollapsed=false;c.addClass("expanded");c.removeClass("collapsed");MUI.panelHeight(this.options.column,b,"expanding");MUI.panelHeight();this.collapseToggleEl.removeClass("panel-expand");this.collapseToggleEl.addClass("panel-collapsed");this.collapseToggleEl.setProperty("title","Collapse Panel");this.fireEvent("onExpand")}}.bind(this))}});MUI.Panel.implement(new Options,new Events);MUI.extend({panelHeight:function(a,c,b){if(a!=null){MUI.panelHeight2($(a),c,b)}else{$$(".column").each(function(d){MUI.panelHeight2(d)}.bind(this))}},panelHeight2:function(e,m,f){var b=MUI.Panels.instances;var j=e.getParent();var h=j.getStyle("height").toInt();if(Browser.Engine.trident4&&j==MUI.Desktop.pageWrapper){h-=1}e.setStyle("height",h);var g=[];e.getChildren(".panelWrapper").each(function(n){g.push(n.getElement(".panel"))}.bind(this));var k=[];e.getChildren(".expanded").each(function(n){k.push(n.getElement(".panel"))}.bind(this));var c=[];var d;var a=0;this.panelsTotalHeight=0;this.height=0;g.each(function(n){instance=b.get(n.id);if(n.getParent().hasClass("expanded")&&n.getParent().getNext(".expanded")){instance.partner=n.getParent().getNext(".expanded").getElement(".panel");instance.resize.attach();instance.handleEl.setStyles({display:"block",cursor:(Browser.Engine.webkit||Browser.Engine.gecko)?"row-resize":"n-resize"}).removeClass("detached")}else{instance.resize.detach();instance.handleEl.setStyles({display:"none",cursor:null}).addClass("detached")}if(n.getParent().getNext(".panelWrapper")==null){instance.handleEl.hide()}}.bind(this));e.getChildren().each(function(n){n.getChildren().each(function(p){if(p.hasClass("panel")){var o=b.get(p.id);anyNextSiblingsExpanded=function(q){var r;q.getParent().getAllNext(".panelWrapper").each(function(s){var t=b.get(s.getElement(".panel").id);if(t.isCollapsed==false){r=true}}.bind(this));return r}.bind(this);anyExpandingNextSiblingsExpanded=function(q){var r;m.getParent().getAllNext(".panelWrapper").each(function(s){var t=b.get(s.getElement(".panel").id);if(t.isCollapsed==false){r=true}}.bind(this));return r}.bind(this);anyNextContainsChanging=function(r){var q=[];r.getParent().getAllNext(".panelWrapper").each(function(t){q.push(t.getElement(".panel"))}.bind(this));var s=q.contains(m);return s}.bind(this);nextExpandedChanging=function(q){var r;if(q.getParent().getNext(".expanded")){if(q.getParent().getNext(".expanded").getElement(".panel")==m){r=true}}return r};if(f=="new"){if(!o.isCollapsed&&p!=m){c.push(p);this.panelsTotalHeight+=p.offsetHeight.toInt()}}else{if(f==null||f=="collapsing"){if(!o.isCollapsed&&(!anyNextContainsChanging(p)||!anyNextSiblingsExpanded(p))){c.push(p);this.panelsTotalHeight+=p.offsetHeight.toInt()}}else{if(f=="expanding"&&!o.isCollapsed&&p!=m){if(!anyNextContainsChanging(p)||(!anyExpandingNextSiblingsExpanded(p)&&nextExpandedChanging(p))){c.push(p);this.panelsTotalHeight+=p.offsetHeight.toInt()}}}}if(p.style.height){this.height+=p.getStyle("height").toInt()}}else{this.height+=p.offsetHeight.toInt()}}.bind(this))}.bind(this));var l=e.offsetHeight.toInt()-this.height;this.height=0;e.getChildren().each(function(n){this.height+=n.offsetHeight.toInt()}.bind(this));var l=e.offsetHeight.toInt()-this.height;c.each(function(n){var q=this.panelsTotalHeight/n.offsetHeight.toInt();var p=n.getStyle("height").toInt();var o=l/q;if(!isNaN(p)){o+=p}if(o<1){o=0}n.setStyle("height",o)}.bind(this));this.height=0;e.getChildren().each(function(n){n.getChildren().each(function(o){this.height+=o.offsetHeight.toInt();if(o.hasClass("panel")&&o.getStyle("height").toInt()>a){d=o;a=o.getStyle("height").toInt()}}.bind(this))}.bind(this));var l=e.offsetHeight.toInt()-this.height;if(l!=0&&a>0){d.setStyle("height",d.getStyle("height").toInt()+l);if(d.getStyle("height")<1){d.setStyle("height",0)}}j.getChildren(".columnHandle").each(function(p){var o=p.getParent();if(o.getStyle("height").toInt()<1){return}var n=o.getStyle("height").toInt()-p.getStyle("margin-top").toInt()-p.getStyle("margin-bottom").toInt();if(Browser.Engine.trident4&&o==MUI.Desktop.pageWrapper){n-=1}p.setStyle("height",n)});k.each(function(n){MUI.resizeChildren(n)}.bind(this))},resizeChildren:function(b){var d=MUI.Panels.instances;var a=d.get(b.id);var c=a.contentWrapperEl;if(a.iframeEl){if(!MUI.ieLegacySupport){a.iframeEl.setStyles({height:c.getStyle("height"),width:c.offsetWidth-c.getStyle("margin-left").toInt()-c.getStyle("margin-right").toInt()})}else{a.iframeEl.setStyles({height:c.getStyle("height"),width:c.offsetWidth-c.getStyle("margin-left").toInt()-c.getStyle("margin-right").toInt()-1});a.iframeEl.setStyles({width:c.offsetWidth-c.getStyle("margin-left").toInt()-c.getStyle("margin-right").toInt()})}}},rWidth:function(a){if(a==null){var a=MUI.Desktop.desktop}a.getElements(".rWidth").each(function(e){var b=e.offsetWidth.toInt();b-=e.getStyle("margin-left").toInt();b-=e.getStyle("margin-right").toInt();var d=e.getParent();this.width=0;d.getChildren().each(function(g){if(g.hasClass("mocha")!=true){this.width+=g.offsetWidth.toInt()}}.bind(this));var c=d.offsetWidth.toInt()-this.width;var f=b+c;if(f<1){f=0}e.setStyle("width",f);e.getChildren(".panel").each(function(g){g.setStyle("width",f-g.getStyle("margin-left").toInt()-g.getStyle("margin-right").toInt());MUI.resizeChildren(g)}.bind(this))})}});function addResizeRight(d,c,b){if(!$(d)){return}d=$(d);var f=MUI.Columns.instances;var a=f.get(d.id);var e=d.getNext(".columnHandle");e.setStyle("cursor",(Browser.Engine.webkit||Browser.Engine.gecko)?"col-resize":"e-resize");if(!c){c=50}if(!b){b=250}if(MUI.ieLegacySupport){e.addEvents({mousedown:function(){e.setCapture()},mouseup:function(){e.releaseCapture()}})}a.resize=d.makeResizable({handle:e,modifiers:{x:"width",y:false},limit:{x:[c,b]},onStart:function(){d.getElements("iframe").setStyle("visibility","hidden");d.getNext(".column").getElements("iframe").setStyle("visibility","hidden")}.bind(this),onDrag:function(){MUI.rWidth(d.getParent());if(Browser.Engine.trident4){d.getChildren().each(function(h){var g=$(d).getStyle("width").toInt();g-=h.getStyle("margin-right").toInt();g-=h.getStyle("margin-left").toInt();g-=h.getStyle("padding-right").toInt();g-=h.getStyle("padding-left").toInt();h.setStyle("width",g)}.bind(this))}}.bind(this),onComplete:function(){MUI.rWidth(d.getParent());d.getElements("iframe").setStyle("visibility","visible");d.getNext(".column").getElements("iframe").setStyle("visibility","visible");a.fireEvent("onResize")}.bind(this)})}function addResizeLeft(d,c,b){if(!$(d)){return}d=$(d);var g=MUI.Columns.instances;var a=g.get(d.id);var f=d.getPrevious(".columnHandle");f.setStyle("cursor",(Browser.Engine.webkit||Browser.Engine.gecko)?"col-resize":"e-resize");var e=d.getPrevious(".column");if(!c){c=50}if(!b){b=250}if(MUI.ieLegacySupport){f.addEvents({mousedown:function(){f.setCapture()},mouseup:function(){f.releaseCapture()}})}a.resize=d.makeResizable({handle:f,modifiers:{x:"width",y:false},invert:true,limit:{x:[c,b]},onStart:function(){$(d).getElements("iframe").setStyle("visibility","hidden");e.getElements("iframe").setStyle("visibility","hidden")}.bind(this),onDrag:function(){MUI.rWidth(d.getParent())}.bind(this),onComplete:function(){MUI.rWidth(d.getParent());$(d).getElements("iframe").setStyle("visibility","visible");e.getElements("iframe").setStyle("visibility","visible");a.fireEvent("onResize")}.bind(this)})}function addResizeBottom(b){if(!$(b)){return}var b=$(b);var d=MUI.Panels.instances;var a=d.get(b.id);var c=a.handleEl;c.setStyle("cursor",(Browser.Engine.webkit||Browser.Engine.gecko)?"row-resize":"n-resize");partner=a.partner;min=0;max=function(){return b.getStyle("height").toInt()+partner.getStyle("height").toInt()}.bind(this);if(MUI.ieLegacySupport){c.addEvents({mousedown:function(){c.setCapture()},mouseup:function(){c.releaseCapture()}})}a.resize=b.makeResizable({handle:c,modifiers:{x:false,y:"height"},limit:{y:[min,max]},invert:false,onBeforeStart:function(){partner=a.partner;this.originalHeight=b.getStyle("height").toInt();this.partnerOriginalHeight=partner.getStyle("height").toInt()}.bind(this),onStart:function(){if(a.iframeEl){if(!MUI.ieLegacySupport){a.iframeEl.setStyle("visibility","hidden");partner.getElements("iframe").setStyle("visibility","hidden")}else{a.iframeEl.hide();partner.getElements("iframe").hide()}}}.bind(this),onDrag:function(){partnerHeight=partnerOriginalHeight;partnerHeight+=(this.originalHeight-b.getStyle("height").toInt());partner.setStyle("height",partnerHeight);MUI.resizeChildren(b,b.getStyle("height").toInt());MUI.resizeChildren(partner,partnerHeight);b.getChildren(".column").each(function(e){MUI.panelHeight(e)});partner.getChildren(".column").each(function(e){MUI.panelHeight(e)})}.bind(this),onComplete:function(){partnerHeight=partnerOriginalHeight;partnerHeight+=(this.originalHeight-b.getStyle("height").toInt());partner.setStyle("height",partnerHeight);MUI.resizeChildren(b,b.getStyle("height").toInt());MUI.resizeChildren(partner,partnerHeight);b.getChildren(".column").each(function(f){MUI.panelHeight(f)});partner.getChildren(".column").each(function(f){MUI.panelHeight(f)});if(a.iframeEl){if(!MUI.ieLegacySupport){a.iframeEl.setStyle("visibility","visible");partner.getElements("iframe").setStyle("visibility","visible")}else{a.iframeEl.show();partner.getElements("iframe").show();var e=a.iframeEl.getStyle("width").toInt();a.iframeEl.setStyle("width",e-1);MUI.rWidth();a.iframeEl.setStyle("width",e)}}a.fireEvent("onResize")}.bind(this)})}MUI.extend({closeColumn:function(b){var d=MUI.Columns.instances;var a=d.get(b.id);if(b!=$(b)||a.isClosing){return}a.isClosing=true;if(a.options.sortable){a.container.retrieve("sortables").removeLists(this.columnEl)}var c=b.getChildren(".panel");c.each(function(e){MUI.closePanel($(e.id))}.bind(this));if(MUI.ieLegacySupport){b.dispose();if(a.handleEl!=null){a.handleEl.dispose()}}else{b.destroy();if(a.handleEl!=null){a.handleEl.destroy()}}if(MUI.Desktop){MUI.Desktop.resizePanels()}d.erase(a.options.id);return true},closePanel:function(f){var e=MUI.Panels.instances;var a=e.get(f.id);if(f!=$(f)||a.isClosing){return}var b=a.options.column;a.isClosing=true;var c=MUI.Columns.instances;var d=c.get(b);if(d.options.sortable){d.options.container.retrieve("sortables").removeItems(a.panelWrapperEl)}a.panelWrapperEl.destroy();if(MUI.Desktop){MUI.Desktop.resizePanels()}$(b).getChildren(".panelWrapper").each(function(g){g.getElement(".panel").removeClass("bottomPanel")});$(b).getChildren(".panelWrapper").getLast().getElement(".panel").addClass("bottomPanel");e.erase(a.options.id);return true}});MUI.files[MUI.path.source+"Layout/Dock.js"]="loaded";MUI.options.extend({dockWrapper:"dockWrapper",dock:"dock"});MUI.extend({minimizeAll:function(){$$(".mocha").each(function(b){var a=b.retrieve("instance");if(!a.isMinimized&&a.options.minimizable==true){MUI.Dock.minimizeWindow(b)}}.bind(this))}});MUI.Dock={options:{useControls:true,dockPosition:"bottom",trueButtonColor:[70,245,70],enabledButtonColor:[115,153,191],disabledButtonColor:[170,170,170]},initialize:function(a){if(!MUI.Desktop){return}MUI.dockVisible=true;this.dockWrapper=$(MUI.options.dockWrapper);this.dock=$(MUI.options.dock);this.autoHideEvent=null;this.dockAutoHide=false;if(!this.dockWrapper){return}if(!this.options.useControls){if($("dockPlacement")){$("dockPlacement").setStyle("cursor","default")}if($("dockAutoHide")){$("dockAutoHide").setStyle("cursor","default")}}this.dockWrapper.setStyles({display:"block",position:"absolute",top:null,bottom:MUI.Desktop.desktopFooter?MUI.Desktop.desktopFooter.offsetHeight:0,left:0});if(this.options.useControls){this.initializeDockControls()}if($("dockLinkCheck")){this.sidebarCheck=new Element("div",{"class":"check",id:"dock_check"}).inject($("dockLinkCheck"))}this.dockSortables=new Sortables("#dockSort",{opacity:1,constrain:true,clone:false,revert:false});MUI.Desktop.setDesktopSize();if(MUI.myChain){MUI.myChain.callChain()}},initializeDockControls:function(){this.setDockColors();if(this.options.useControls){var b=new Element("canvas",{id:"dockCanvas",width:"15",height:"18"}).inject(this.dock);if(MUI.ieLegacySupport&&MUI.ieSupport=="excanvas"){G_vmlCanvasManager.initElement(b)}}var a=$("dockPlacement");var c=$("dockAutoHide");a.setProperty("title","Position Dock Top");a.addEvent("click",function(){this.moveDock()}.bind(this));c.setProperty("title","Turn Auto Hide On");c.addEvent("click",function(e){if(this.dockWrapper.getProperty("dockPosition")=="top"){return false}var d=$("dockCanvas").getContext("2d");this.dockAutoHide=!this.dockAutoHide;if(this.dockAutoHide){$("dockAutoHide").setProperty("title","Turn Auto Hide Off");MUI.circle(d,5,14,3,this.options.trueButtonColor,1);this.autoHideEvent=function(g){if(!this.dockAutoHide){return}if(!MUI.Desktop.desktopFooter){var f=this.dockWrapper.offsetHeight;if(f<25){f=25}}else{if(MUI.Desktop.desktopFooter){var f=this.dockWrapper.offsetHeight+MUI.Desktop.desktopFooter.offsetHeight;if(f<25){f=25}}}if(!MUI.Desktop.desktopFooter&&g.client.y>(document.getCoordinates().height-f)){if(!MUI.dockVisible){this.dockWrapper.show();MUI.dockVisible=true;MUI.Desktop.setDesktopSize()}}else{if(MUI.Desktop.desktopFooter&&g.client.y>(document.getCoordinates().height-f)){if(!MUI.dockVisible){this.dockWrapper.show();MUI.dockVisible=true;MUI.Desktop.setDesktopSize()}}else{if(MUI.dockVisible){this.dockWrapper.hide();MUI.dockVisible=false;MUI.Desktop.setDesktopSize()}}}}.bind(this);document.addEvent("mousemove",this.autoHideEvent)}else{$("dockAutoHide").setProperty("title","Turn Auto Hide On");MUI.circle(d,5,14,3,this.options.enabledButtonColor,1);document.removeEvent("mousemove",this.autoHideEvent)}}.bind(this));this.renderDockControls();if(this.options.dockPosition=="top"){this.moveDock()}},setDockColors:function(){var c=MUI.getCSSRule(".dockButtonEnabled");if(c&&c.style.backgroundColor){this.options.enabledButtonColor=new Color(c.style.backgroundColor)}var a=MUI.getCSSRule(".dockButtonDisabled");if(a&&a.style.backgroundColor){this.options.disabledButtonColor=new Color(a.style.backgroundColor)}var b=MUI.getCSSRule(".dockButtonTrue");if(b&&b.style.backgroundColor){this.options.trueButtonColor=new Color(b.style.backgroundColor)}},renderDockControls:function(){var a=$("dockCanvas").getContext("2d");a.clearRect(0,0,100,100);MUI.circle(a,5,4,3,this.options.enabledButtonColor,1);if(this.dockWrapper.getProperty("dockPosition")=="top"){MUI.circle(a,5,14,3,this.options.disabledButtonColor,1)}else{if(this.dockAutoHide){MUI.circle(a,5,14,3,this.options.trueButtonColor,1)}else{MUI.circle(a,5,14,3,this.options.enabledButtonColor,1)}}},moveDock:function(){var a=$("dockCanvas").getContext("2d");if(this.dockWrapper.getStyle("position")!="relative"){this.dockWrapper.setStyles({position:"relative",bottom:null});this.dockWrapper.addClass("top");MUI.Desktop.setDesktopSize();this.dockWrapper.setProperty("dockPosition","top");a.clearRect(0,0,100,100);MUI.circle(a,5,4,3,this.options.enabledButtonColor,1);MUI.circle(a,5,14,3,this.options.disabledButtonColor,1);$("dockPlacement").setProperty("title","Position Dock Bottom");$("dockAutoHide").setProperty("title","Auto Hide Disabled in Top Dock Position");this.dockAutoHide=false}else{this.dockWrapper.setStyles({position:"absolute",bottom:MUI.Desktop.desktopFooter?MUI.Desktop.desktopFooter.offsetHeight:0});this.dockWrapper.removeClass("top");MUI.Desktop.setDesktopSize();this.dockWrapper.setProperty("dockPosition","bottom");a.clearRect(0,0,100,100);MUI.circle(a,5,4,3,this.options.enabledButtonColor,1);MUI.circle(a,5,14,3,this.options.enabledButtonColor,1);$("dockPlacement").setProperty("title","Position Dock Top");$("dockAutoHide").setProperty("title","Turn Auto Hide On")}},createDockTab:function(e){var a=e.retrieve("instance");var d=new Element("div",{id:a.options.id+"_dockTab","class":"dockTab",title:b}).inject($("dockClear"),"before");d.addEvent("mousedown",function(f){new Event(f).stop();this.timeDown=$time()});d.addEvent("mouseup",function(f){this.timeUp=$time();if((this.timeUp-this.timeDown)<275){if(MUI.Windows.windowsVisible==false){MUI.toggleWindowVisibility();if(a.isMinimized==true){MUI.Dock.restoreMinimized.delay(25,MUI.Dock,e)}else{MUI.focusWindow(e)}return}if(a.isMinimized==true){MUI.Dock.restoreMinimized.delay(25,MUI.Dock,e)}else{if(a.windowEl.hasClass("isFocused")&&a.options.minimizable==true){MUI.Dock.minimizeWindow(e)}else{MUI.focusWindow(e)}var g=document.getCoordinates();if(e.getStyle("left").toInt()>g.width||e.getStyle("top").toInt()>g.height){MUI.centerWindow(e)}}}});this.dockSortables.addItems(d);var b=a.titleEl.innerHTML;var c=new Element("div",{id:a.options.id+"_dockTabText","class":"dockText"}).set("html",b.substring(0,19)+(b.length>19?"...":"")).inject($(d));if(a.options.icon!=false){}MUI.Desktop.setDesktopSize()},makeActiveTab:function(){var c=MUI.getWindowWithHighestZindex();var a=c.retrieve("instance");$$(".dockTab").removeClass("activeDockTab");if(a.isMinimized!=true){a.windowEl.addClass("isFocused");var b=$(a.options.id+"_dockTab");if(b!=null){b.addClass("activeDockTab")}}else{a.windowEl.removeClass("isFocused")}},minimizeWindow:function(b){if(b!=$(b)){return}var a=b.retrieve("instance");a.isMinimized=true;if(a.iframeEl){if(!MUI.ieLegacySupport){a.iframeEl.setStyle("visibility","hidden")}else{a.iframeEl.hide()}}a.contentBorderEl.setStyle("visibility","hidden");if(a.toolbarWrapperEl){a.toolbarWrapperEl.hide()}b.setStyle("visibility","hidden");MUI.Desktop.setDesktopSize();setTimeout(function(){b.setStyle("zIndex",1);b.removeClass("isFocused");this.makeActiveTab()}.bind(this),100);a.fireEvent("onMinimize",b)},restoreMinimized:function(b){var a=b.retrieve("instance");if(a.isMinimized==false){return}if(MUI.Windows.windowsVisible==false){MUI.toggleWindowVisibility()}MUI.Desktop.setDesktopSize();if(a.options.scrollbars==true&&!a.iframeEl){a.contentWrapperEl.setStyle("overflow","auto")}if(a.isCollapsed){MUI.collapseToggle(b)}b.setStyle("visibility","visible");a.contentBorderEl.setStyle("visibility","visible");if(a.toolbarWrapperEl){a.toolbarWrapperEl.show()}if(a.iframeEl){if(!MUI.ieLegacySupport){a.iframeEl.setStyle("visibility","visible")}else{a.iframeEl.show()}}a.isMinimized=false;MUI.focusWindow(b);a.fireEvent("onRestore",b)}};MUI.files[MUI.path.source+"Layout/Workspaces.js"]="loaded";MUI.extend({saveWorkspace:function(){this.cookie=new Hash.Cookie("mochaUIworkspaceCookie",{duration:3600});this.cookie.empty();MUI.Windows.instances.each(function(a){a.saveValues();this.cookie.set(a.options.id,{id:a.options.id,top:a.options.y,left:a.options.x,width:a.contentWrapperEl.getStyle("width").toInt(),height:a.contentWrapperEl.getStyle("height").toInt()})}.bind(this));this.cookie.save();new MUI.Window({loadMethod:"html",type:"notification",addClass:"notification",content:"Workspace saved.",closeAfter:"1400",width:200,height:40,y:53,padding:{top:10,right:12,bottom:10,left:12},shadowBlur:5,bodyBgColor:[255,255,255]})},windowUnload:function(){if($$(".mocha").length==0&&this.myChain){this.myChain.callChain()}},loadWorkspace2:function(workspaceWindows){workspaceWindows.each(function(workspaceWindow){windowFunction=eval("MUI."+workspaceWindow.id+"Window");if(windowFunction){eval("MUI."+workspaceWindow.id+"Window({width:"+workspaceWindow.width+",height:"+workspaceWindow.height+"});");var windowEl=$(workspaceWindow.id);windowEl.setStyles({top:workspaceWindow.top,left:workspaceWindow.left});var instance=windowEl.retrieve("instance");instance.contentWrapperEl.setStyles({width:workspaceWindow.width,height:workspaceWindow.height});instance.drawWindow()}}.bind(this));this.loadingWorkspace=false},loadWorkspace:function(){cookie=new Hash.Cookie("mochaUIworkspaceCookie",{duration:3600});workspaceWindows=cookie.load();if(!cookie.getKeys().length){new MUI.Window({loadMethod:"html",type:"notification",addClass:"notification",content:"You have no saved workspace.",closeAfter:"1400",width:220,height:40,y:25,padding:{top:10,right:12,bottom:10,left:12},shadowBlur:5,bodyBgColor:[255,255,255]});return}if($$(".mocha").length!=0){this.loadingWorkspace=true;this.myChain=new Chain();this.myChain.chain(function(){$$(".mocha").each(function(a){this.closeWindow(a)}.bind(this))}.bind(this),function(){this.loadWorkspace2(workspaceWindows)}.bind(this));this.myChain.callChain()}else{this.loadWorkspace2(workspaceWindows)}}}); \ No newline at end of file +var MUI=MochaUI=new Hash({version:"0.9.6 development",options:new Hash({theme:"default",advancedEffects:false,standardEffects:true}),path:{source:"scripts/source/",themes:"themes/",plugins:"plugins/"},themePath:function(){return MUI.path.themes+MUI.options.theme+"/"},files:new Hash()});MUI.files[MUI.path.source+"Core/Core.js"]="loaded";MUI.extend({Windows:{instances:new Hash()},ieSupport:"excanvas",ieLegacySupport:Browser.Engine.trident&&Browser.version<9,updateContent:function(c){var c=$extend({element:null,childElement:null,method:null,data:null,title:null,content:null,loadMethod:null,url:null,scrollbars:null,padding:null,require:{},onContentLoaded:$empty},c);c.require=$extend({css:[],images:[],js:[],onload:null},c.require);var b={};if(!c.element){return}var d=c.element;if(MUI.Windows.instances.get(d.id)){b.recipient="window"}else{b.recipient="panel"}var a=d.retrieve("instance");if(c.title){a.titleEl.set("html",c.title)}var e=a.contentEl;b.contentContainer=c.childElement!=null?c.childElement:a.contentEl;var g=a.contentWrapperEl;if(!c.loadMethod){if(!a.options.loadMethod){if(!c.url){c.loadMethod="html"}else{c.loadMethod="xhr"}}else{c.loadMethod=a.options.loadMethod}}var f=c.scrollbars||a.options.scrollbars;if(b.contentContainer==a.contentEl){g.setStyles({overflow:f!=false&&c.loadMethod!="iframe"?"auto":"hidden"})}if(c.padding!=null){e.setStyles({"padding-top":c.padding.top,"padding-bottom":c.padding.bottom,"padding-left":c.padding.left,"padding-right":c.padding.right})}if(b.contentContainer==e){e.empty().show();e.getAllNext(".column").destroy();e.getAllNext(".columnHandle").destroy()}b.onContentLoaded=function(){if(c.require.js.length||typeof c.require.onload=="function"){new MUI.Require({js:c.require.js,onload:function(){if(!$defined(c.require.onload)){return}if(Browser.Engine.presto){c.require.onload.delay(100)}else{c.require.onload()}c.onContentLoaded?c.onContentLoaded():a.fireEvent("onContentLoaded",d)}.bind(this)})}else{c.onContentLoaded?c.onContentLoaded():a.fireEvent("onContentLoaded",d)}};if(c.require.css.length||c.require.images.length){new MUI.Require({css:c.require.css,images:c.require.images,onload:function(){this.loadSelect(a,c,b)}.bind(this)})}else{this.loadSelect(a,c,b)}},loadSelect:function(a,c,b){switch(c.loadMethod){case"xhr":this.updateContentXHR(a,c,b);break;case"iframe":this.updateContentIframe(a,c,b);break;case"html":default:this.updateContentHTML(a,c,b);break}},updateContentXHR:function(a,c,b){var f=a.contentEl;var e=b.contentContainer;var d=b.onContentLoaded;new Request.HTML({url:c.url,update:e,method:c.method!=null?c.method:"get",data:c.data!=null?new Hash(c.data).toQueryString():"",evalScripts:a.options.evalScripts,evalResponse:a.options.evalResponse,onRequest:function(){if(b.recipient=="window"&&e==f){a.showSpinner()}else{if(b.recipient=="panel"&&e==f&&$("spinner")){$("spinner").show()}}}.bind(this),onFailure:function(g){if(e==f){var j=new RegExp("[\n\rs]*(.*)[\n\rs]*","gmi");var h=j.exec(g.responseText);if(!h){h="Unknown"}e.set("html","

        Error: "+h+"

        ");if(b.recipient=="window"){a.hideSpinner()}else{if(b.recipient=="panel"&&$("spinner")){$("spinner").hide()}}}}.bind(this),onSuccess:function(){if(e==f){if(b.recipient=="window"){a.hideSpinner()}else{if(b.recipient=="panel"&&$("spinner")){$("spinner").hide()}}}Browser.Engine.trident4?d.delay(750):d()}.bind(this),onComplete:function(){}.bind(this)}).send()},updateContentIframe:function(a,c,b){var f=a.contentEl;var e=b.contentContainer;var g=a.contentWrapperEl;var d=b.onContentLoaded;if(a.options.contentURL==""||e!=f){return}a.iframeEl=new Element("iframe",{id:a.options.id+"_iframe",name:a.options.id+"_iframe","class":"mochaIframe",src:c.url,marginwidth:0,marginheight:0,frameBorder:0,scrolling:"auto",styles:{height:g.offsetHeight-g.getStyle("margin-top").toInt()-g.getStyle("margin-bottom").toInt(),width:a.panelEl?g.offsetWidth-g.getStyle("margin-left").toInt()-g.getStyle("margin-right").toInt():"100%"}}).injectInside(f);a.iframeEl.addEvent("load",function(h){if(b.recipient=="window"){a.hideSpinner()}else{if(b.recipient=="panel"&&e==f&&$("spinner")){$("spinner").hide()}}Browser.Engine.trident4?d.delay(50):d()}.bind(this));if(b.recipient=="window"){a.showSpinner()}else{if(b.recipient=="panel"&&e==f&&$("spinner")){$("spinner").show()}}},updateContentHTML:function(a,c,b){var f=a.contentEl;var e=b.contentContainer;var d=b.onContentLoaded;var g=new Array("element","textnode","whitespace","collection");if(g.contains($type(c.content))){c.content.inject(e)}else{e.set("html",c.content)}if(e==f){if(b.recipient=="window"){a.hideSpinner()}else{if(b.recipient=="panel"&&$("spinner")){$("spinner").hide()}}}Browser.Engine.trident4?d.delay(50):d()},reloadIframe:function(a){Browser.Engine.gecko?$(a).src=$(a).src:top.frames[a].location.reload(true)},roundedRect:function(f,d,j,h,c,b,g,e){f.fillStyle="rgba("+g.join(",")+","+e+")";f.beginPath();f.moveTo(d,j+b);f.lineTo(d,j+c-b);f.quadraticCurveTo(d,j+c,d+b,j+c);f.lineTo(d+h-b,j+c);f.quadraticCurveTo(d+h,j+c,d+h,j+c-b);f.lineTo(d+h,j+b);f.quadraticCurveTo(d+h,j,d+h-b,j);f.lineTo(d+b,j);f.quadraticCurveTo(d,j,d,j+b);f.fill()},triangle:function(e,c,h,g,b,f,d){e.beginPath();e.moveTo(c+g,h);e.lineTo(c,h+b);e.lineTo(c+g,h+b);e.closePath();e.fillStyle="rgba("+f.join(",")+","+d+")";e.fill()},circle:function(d,b,g,f,e,c){d.beginPath();d.arc(b,g,f,0,Math.PI*2,true);d.fillStyle="rgba("+e.join(",")+","+c+")";d.fill()},notification:function(a){new MUI.Window({loadMethod:"html",closeAfter:1500,type:"notification",addClass:"notification",content:a,width:220,height:40,y:53,padding:{top:10,right:12,bottom:10,left:12},shadowBlur:5})},toggleAdvancedEffects:function(a){if(MUI.options.advancedEffects==false){MUI.options.advancedEffects=true;if(a){this.toggleAdvancedEffectsLink=new Element("div",{"class":"check",id:"toggleAdvancedEffects_check"}).inject(a)}}else{MUI.options.advancedEffects=false;if(this.toggleAdvancedEffectsLink){this.toggleAdvancedEffectsLink.destroy()}}},toggleStandardEffects:function(a){if(MUI.options.standardEffects==false){MUI.options.standardEffects=true;if(a){this.toggleStandardEffectsLink=new Element("div",{"class":"check",id:"toggleStandardEffects_check"}).inject(a)}}else{MUI.options.standardEffects=false;if(this.toggleStandardEffectsLink){this.toggleStandardEffectsLink.destroy()}}},underlayInitialize:function(){var a=new Element("div",{id:"windowUnderlay",styles:{height:parent.getCoordinates().height,opacity:0.01,display:"none"}}).inject(document.body)},setUnderlaySize:function(){$("windowUnderlay").setStyle("height",parent.getCoordinates().height)}});function fixPNG(e){if(Browser.Engine.trident4&&document.body.filters){var b=(e.id)?"id='"+e.id+"' ":"";var d=(e.className)?"class='"+e.className+"' ":"";var f=(e.title)?"title='"+e.title+"' ":"title='"+e.alt+"' ";var c="display:inline-block;"+e.style.cssText;var a="";e.outerHTML=a}}document.addEvent("mousedown",function(a){MUI.blurAll.delay(50)});window.addEvent("domready",function(){MUI.underlayInitialize()});window.addEvent("resize",function(){if($("windowUnderlay")){MUI.setUnderlaySize()}else{MUI.underlayInitialize()}});Element.implement({hide:function(){this.setStyle("display","none");return this},show:function(){this.setStyle("display","block");return this}});Element.implement({shake:function(b,h){b=b||3;h=h||500;h=(h/50).toInt()-1;var e=this.getParent();if(e!=$(document.body)&&e.getStyle("position")=="static"){e.setStyle("position","relative")}var a=this.getStyle("position");if(a=="static"){this.setStyle("position","relative");a="relative"}if(MUI.ieLegacySupport){e.setStyle("height",e.getStyle("height"))}var g=this.getPosition(e);if(a=="relative"&&!Browser.Engine.presto){g.x-=e.getStyle("paddingLeft").toInt();g.y-=e.getStyle("paddingTop").toInt()}var f=this.retrieve("morph");if(f){f.cancel();var c=f.options}var f=this.get("morph",{duration:50,link:"chain"});for(var d=0;d]*>([\s\S]*?)<\/body>/i);c=(b)?b[1]:c;var a=new Element("div");return a.set("html",c)}});MUI.getCSSRule=function(b){for(var c=0;c=200)&&(a<300))}});Browser.Request=function(){return $try(function(){return new ActiveXObject("MSXML2.XMLHTTP")},function(){return new XMLHttpRequest()})}}MUI.Require=new Class({Implements:[Options],options:{css:[],images:[],js:[],onload:$empty},initialize:function(a){this.setOptions(a);var a=this.options;this.assetsToLoad=a.css.length+a.images.length+a.js.length;this.assetsLoaded=0;var b=0;if(a.css.length){a.css.each(function(c){this.getAsset(c,function(){if(b==a.css.length-1){if(this.assetsLoaded==this.assetsToLoad-1){this.requireOnload()}else{this.assetsLoaded++;this.requireContinue.delay(50,this)}}else{b++;this.assetsLoaded++}}.bind(this))}.bind(this))}else{if(!a.js.length&&!a.images.length){this.options.onload();return true}else{this.requireContinue.delay(50,this)}}},requireOnload:function(){this.assetsLoaded++;if(this.assetsLoaded==this.assetsToLoad){this.options.onload();return true}},requireContinue:function(){var a=this.options;if(a.images.length){a.images.each(function(b){this.getAsset(b,this.requireOnload.bind(this))}.bind(this))}if(a.js.length){a.js.each(function(b){this.getAsset(b,this.requireOnload.bind(this))}.bind(this))}},getAsset:function(b,c){if(MUI.files[b]=="loaded"){if(typeof c=="function"){c()}return true}else{if(MUI.files[b]=="loading"){var d=0;var a=(function(){d++;if(MUI.files[b]=="loading"&&d<"100"){return}$clear(a);if(typeof c=="function"){c()}}).periodical(50)}else{MUI.files[b]="loading";properties={onload:c!="undefined"?c:$empty};var e=properties.onload;properties.onload=function(){MUI.files[b]="loaded";if(e){e()}}.bind(this);switch(b.match(/\.\w+$/)[0]){case".js":return Asset.javascript(b,properties);case".css":return Asset.css(b,properties);case".jpg":case".png":case".gif":return Asset.image(b,properties)}alert('The required file "'+b+'" could not be loaded')}}}});$extend(Asset,{javascript:function(f,d){d=$extend({onload:$empty,document:document,check:$lambda(true)},d);if($(d.id)){d.onload();return $(d.id)}var b=new Element("script",{src:f,type:"text/javascript"});var e=d.onload.bind(b),a=d.check,g=d.document;delete d.onload;delete d.check;delete d.document;if(!Browser.Engine.webkit419&&!Browser.Engine.presto){b.addEvents({load:e,readystatechange:function(){if(MUI.ieLegacySupport&&["loaded","complete"].contains(this.readyState)){e()}}}).setProperties(d)}else{var c=(function(){if(!$try(a)){return}$clear(c);Browser.Engine.presto?e.delay(500):e()}).periodical(50)}return b.inject(g.head)},css:function(b,a){a=$extend({id:null,media:"screen",onload:$empty},a);new Request({method:"get",url:b,onComplete:function(c){var d=new Element("link",{id:a.id,rel:"stylesheet",media:a.media,type:"text/css",href:b}).inject(document.head);a.onload()}.bind(this),onFailure:function(c){},onSuccess:function(){}.bind(this)}).send()}});MUI.extend({newWindowsFromJSON:function(a){new MUI.Require({js:[MUI.path.source+"Window/Windows-from-json.js"],onload:function(){new MUI.newWindowsFromJSON(a)}})},arrangeCascade:function(){new MUI.Require({js:[MUI.path.source+"Window/Arrange-cascade.js"],onload:function(){new MUI.arrangeCascade()}})},arrangeTile:function(){new MUI.Require({js:[MUI.path.source+"Window/Arrange-tile.js"],onload:function(){new MUI.arrangeTile()}})},saveWorkspace:function(){new MUI.Require({js:[MUI.path.source+"Layout/Workspaces.js"],onload:function(){new MUI.saveWorkspace()}})},loadWorkspace:function(){new MUI.Require({js:[MUI.path.source+"Layout/Workspaces.js"],onload:function(){new MUI.loadWorkspace()}})},Themes:{init:function(a){new MUI.Require({js:[MUI.path.source+"Utilities/Themes.js"],onload:function(){MUI.Themes.init(a)}})}}});MUI.files[MUI.path.source+"Utilities/Themes.js"]=1;MUI.Themes={init:function(a){this.newTheme=a.toLowerCase();if(!this.newTheme||this.newTheme==null||this.newTheme==MUI.options.theme.toLowerCase()){return}if($("spinner")){$("spinner").show()}this.oldURIs=[];this.oldSheets=[];$$("link").each(function(c){var b=c.get("href");if(b.contains(MUI.path.themes+MUI.options.theme)){this.oldURIs.push(b);this.oldSheets.push(c)}}.bind(this));this.newSheetURLs=this.oldURIs.map(function(c,b){return c.replace("/"+MUI.options.theme+"/","/"+MUI.Themes.newTheme+"/")}.bind(this));this.sheetsToLoad=this.oldURIs.length;this.sheetsLoaded=0;this.newSheets=[];this.newSheetURLs.each(function(d){var b=d;var c=new Request({method:"get",url:b,onComplete:function(e){var f=new Element("link",{rel:"stylesheet",media:"screen",type:"text/css",href:b});this.newSheets.push(f)}.bind(this),onFailure:function(e){this.themeLoadSuccess=false;if($("spinner")){$("spinner").hide()}MUI.notification("Stylesheets did not load.")},onSuccess:function(){this.sheetsLoaded++;if(this.sheetsLoaded==this.sheetsToLoad){this.updateThemeStylesheets();this.themeLoadSuccess=true}}.bind(this)});c.send()}.bind(this))},updateThemeStylesheets:function(){this.oldSheets.each(function(a){a.destroy()});this.newSheets.each(function(a){MUI.files[a.get("href")]=1;a.inject(document.head)});if(MUI.ieLegacySupport){this.redraw.delay(1250,this)}else{this.redraw.delay(250,this)}},redraw:function(){$$(".replaced").removeClass("replaced");$$(".mocha").each(function(c){var b=c.retrieve("instance");b.setColors();b.drawWindow()});if(MUI.Dock){if(MUI.Dock.options.useControls){MUI.Dock.setDockColors();MUI.Dock.renderDockControls()}}if(MUI.Desktop.desktop){var a=(function(){if(MUI.Desktop.desktop.getStyle("overflow")!="hidden"){return}$clear(a);MUI.Desktop.setDesktopSize()}).periodical(50)}if($("spinner")){$("spinner").hide()}MUI.options.theme=this.newTheme}};window.addEvent("load",function(){if($("themeControl")){$("themeControl").getElements("option").setProperty("selected","false");if($("chooseTheme")){$("chooseTheme").setProperty("selected","true")}}});MUI.files[MUI.path.source+"Window/Window.js"]="loading";MUI.extend({Windows:{instances:new Hash(),indexLevel:100,windowIDCount:0,windowsVisible:true,focusingWindow:false}});MUI.Windows.windowOptions={id:null,title:"New Window",icon:false,type:"window",require:{css:[],images:[],js:[],onload:null},loadMethod:null,method:"get",contentURL:null,data:null,closeAfter:false,evalScripts:true,evalResponse:false,content:"Window content",toolbar:false,toolbarPosition:"top",toolbarHeight:29,toolbarURL:"pages/lipsum.html",toolbarData:null,toolbarContent:"",toolbarOnload:$empty,toolbar2:false,toolbar2Position:"bottom",toolbar2Height:29,toolbar2URL:"pages/lipsum.html",toolbar2Data:null,toolbar2Content:"",toolbar2Onload:$empty,container:null,restrict:true,shape:"box",collapsible:true,minimizable:true,maximizable:true,closable:true,storeOnClose:false,modalOverlayClose:true,draggable:null,draggableGrid:false,draggableLimit:false,draggableSnap:false,resizable:null,resizeLimit:{x:[250,2500],y:[125,2000]},addClass:"",width:300,height:125,headerHeight:25,footerHeight:25,cornerRadius:8,x:null,y:null,scrollbars:true,padding:{top:10,right:12,bottom:10,left:12},shadowBlur:5,shadowOffset:{x:0,y:1},controlsOffset:{right:6,top:6},useCanvas:true,useCanvasControls:true,useSpinner:true,headerStartColor:[250,250,250],headerStopColor:[229,229,229],bodyBgColor:[229,229,229],minimizeBgColor:[255,255,255],minimizeColor:[0,0,0],maximizeBgColor:[255,255,255],maximizeColor:[0,0,0],closeBgColor:[255,255,255],closeColor:[0,0,0],resizableColor:[254,254,254],onBeforeBuild:$empty,onContentLoaded:$empty,onFocus:$empty,onBlur:$empty,onResize:$empty,onMinimize:$empty,onMaximize:$empty,onRestore:$empty,onClose:$empty,onCloseComplete:$empty};MUI.Windows.windowOptionsOriginal=$merge(MUI.Windows.windowOptions);MUI.Window=new Class({Implements:[Events,Options],options:MUI.Windows.windowOptions,initialize:function(a){this.setOptions(a);var a=this.options;$extend(this,{mochaControlsWidth:0,minimizebuttonX:0,maximizebuttonX:0,closebuttonX:0,headerFooterShadow:a.headerHeight+a.footerHeight+(a.shadowBlur*2),oldTop:0,oldLeft:0,isMaximized:false,isMinimized:false,isCollapsed:false,timestamp:$time()});if(a.type!="window"){a.container=document.body;a.minimizable=false}if(!a.container){a.container=MUI.Desktop&&MUI.Desktop.desktop?MUI.Desktop.desktop:document.body}if(a.resizable==null){if(a.type!="window"||a.shape=="gauge"){a.resizable=false}else{a.resizable=true}}if(a.draggable==null){a.draggable=a.type!="window"?false:true}if(a.shape=="gauge"||a.type=="notification"){a.collapsible=false;a.maximizable=false;a.contentBgColor="transparent";a.scrollbars=false;a.footerHeight=0}if(a.type=="notification"){a.closable=false;a.headerHeight=0}if(MUI.Dock&&$(MUI.options.dock)){if(MUI.Dock.dock&&a.type!="modal"&&a.type!="modal2"){a.minimizable=a.minimizable}}else{a.minimizable=false}a.maximizable=MUI.Desktop&&MUI.Desktop.desktop&&a.maximizable&&a.type!="modal"&&a.type!="modal2";if(this.options.type=="modal2"){this.options.shadowBlur=0;this.options.shadowOffset={x:0,y:0};this.options.useSpinner=false;this.options.useCanvas=false;this.options.footerHeight=0;this.options.headerHeight=0}a.id=a.id||"win"+(++MUI.Windows.windowIDCount);this.windowEl=$(a.id);if(a.require.css.length||a.require.images.length){new MUI.Require({css:a.require.css,images:a.require.images,onload:function(){this.newWindow()}.bind(this)})}else{this.newWindow()}return this},saveValues:function(){var a=this.windowEl.getCoordinates();this.options.x=a.left.toInt();this.options.y=a.top.toInt()},newWindow:function(c){var a=MUI.Windows.instances;var j=MUI.Windows.instances.get(this.options.id);var k=this.options;if(j){var h=j}if(this.windowEl&&!this.isClosing){if(h.isMinimized){MUI.Dock.restoreMinimized(this.windowEl)}else{if(h.isCollapsed){MUI.collapseToggle(this.windowEl);setTimeout(MUI.focusWindow.pass(this.windowEl,this),10)}else{if(this.windowEl.hasClass("windowClosed")){if(h.check){h.check.show()}this.windowEl.removeClass("windowClosed");this.windowEl.setStyle("opacity",0);this.windowEl.addClass("mocha");if(MUI.Dock&&$(MUI.options.dock)&&h.options.type=="window"){var f=$(h.options.id+"_dockTab");if(f!=null){f.show()}MUI.Desktop.setDesktopSize()}h.displayNewWindow()}else{var g=document.getCoordinates();if(this.windowEl.getStyle("left").toInt()>g.width||this.windowEl.getStyle("top").toInt()>g.height){MUI.centerWindow(this.windowEl)}setTimeout(MUI.focusWindow.pass(this.windowEl,this),10);if(MUI.options.standardEffects==true){this.windowEl.shake()}}}}return}else{a.set(k.id,this)}this.isClosing=false;this.fireEvent("onBeforeBuild");MUI.Windows.indexLevel++;this.windowEl=new Element("div",{"class":"mocha",id:k.id,styles:{position:"absolute",width:k.width,height:k.height,display:"block",opacity:0,zIndex:MUI.Windows.indexLevel+=2}});this.windowEl.store("instance",this);this.windowEl.addClass(k.addClass);if(k.type=="modal2"){this.windowEl.addClass("modal2")}if(MUI.ieLegacySupport&&k.shape=="gauge"){this.windowEl.setStyle("backgroundImage","url(../images/spacer.gif)")}if(k.loadMethod=="iframe"){k.padding={top:0,right:0,bottom:0,left:0}}this.insertWindowElements();this.titleEl.set("html",k.title);this.contentWrapperEl.setStyle("overflow","hidden");this.contentEl.setStyles({"padding-top":k.padding.top,"padding-bottom":k.padding.bottom,"padding-left":k.padding.left,"padding-right":k.padding.right});if(k.shape=="gauge"){if(k.useCanvasControls){this.canvasControlsEl.setStyle("visibility","hidden")}else{this.controlsEl.setStyle("visibility","hidden")}this.windowEl.addEvent("mouseover",function(){this.mouseover=true;var l=function(){if(this.mouseover!=false){if(k.useCanvasControls){this.canvasControlsEl.setStyle("visibility","visible")}else{this.controlsEl.setStyle("visibility","visible")}this.canvasHeaderEl.setStyle("visibility","visible");this.titleEl.show()}};l.delay(0,this)}.bind(this));this.windowEl.addEvent("mouseleave",function(){this.mouseover=false;if(this.options.useCanvasControls){this.canvasControlsEl.setStyle("visibility","hidden")}else{this.controlsEl.setStyle("visibility","hidden")}this.canvasHeaderEl.setStyle("visibility","hidden");this.titleEl.hide()}.bind(this))}this.windowEl.inject(k.container);this.setColors();if(k.type!="notification"){this.setMochaControlsWidth()}MUI.updateContent({element:this.windowEl,content:k.content,method:k.method,url:k.contentURL,data:k.data,onContentLoaded:null,require:{js:k.require.js,onload:k.require.onload}});if(this.options.toolbar==true){MUI.updateContent({element:this.windowEl,childElement:this.toolbarEl,content:k.toolbarContent,loadMethod:"xhr",method:k.method,url:k.toolbarURL,data:k.toolbarData,onContentLoaded:k.toolbarOnload})}if(this.options.toolbar2==true){MUI.updateContent({element:this.windowEl,childElement:this.toolbar2El,content:k.toolbar2Content,loadMethod:"xhr",method:k.method,url:k.toolbar2URL,data:k.toolbar2Data,onContentLoaded:k.toolbar2Onload})}this.drawWindow();this.attachDraggable();this.attachResizable();this.setupEvents();if(k.resizable){this.adjustHandles()}if(k.container==document.body||k.container==MUI.Desktop.desktop){var b=window.getSize()}else{var b=$(this.options.container).getSize()}if(!k.y){if(MUI.Desktop&&MUI.Desktop.desktop){var d=(b.y*0.5)-(this.windowEl.offsetHeight*0.5);if(d<-k.shadowBlur){d=-k.shadowBlur}}else{var d=window.getScroll().y+(window.getSize().y*0.5)-(this.windowEl.offsetHeight*0.5);if(d<-k.shadowBlur){d=-k.shadowBlur}}}else{var d=k.y-k.shadowBlur}if(!this.options.x){var e=(b.x*0.5)-(this.windowEl.offsetWidth*0.5);if(e<-k.shadowBlur){e=-k.shadowBlur}}else{var e=k.x-k.shadowBlur}this.windowEl.setStyles({top:d,left:e});this.opacityMorph=new Fx.Morph(this.windowEl,{duration:350,transition:Fx.Transitions.Sine.easeInOut,onComplete:function(){if(MUI.ieLegacySupport){this.drawWindow()}}.bind(this)});this.displayNewWindow();this.morph=new Fx.Morph(this.windowEl,{duration:200});this.windowEl.store("morph",this.morph);this.resizeMorph=new Fx.Elements([this.contentWrapperEl,this.windowEl],{duration:400,transition:Fx.Transitions.Sine.easeInOut,onStart:function(){this.resizeAnimation=this.drawWindow.periodical(20,this)}.bind(this),onComplete:function(){$clear(this.resizeAnimation);this.drawWindow();if(this.iframeEl){this.iframeEl.setStyle("visibility","visible")}}.bind(this)});this.windowEl.store("resizeMorph",this.resizeMorph);if($(this.windowEl.id+"LinkCheck")){this.check=new Element("div",{"class":"check",id:this.options.id+"_check"}).inject(this.windowEl.id+"LinkCheck")}if(this.options.closeAfter!=false){MUI.closeWindow.delay(this.options.closeAfter,this,this.windowEl)}if(MUI.Dock&&$(MUI.options.dock)&&this.options.type=="window"){MUI.Dock.createDockTab(this.windowEl)}},displayNewWindow:function(){options=this.options;if(options.type=="modal"||options.type=="modal2"){MUI.currentModal=this.windowEl;if(Browser.Engine.trident4){$("modalFix").show()}$("modalOverlay").show();if(MUI.options.advancedEffects==false){$("modalOverlay").setStyle("opacity",0.6);this.windowEl.setStyles({zIndex:11000,opacity:1})}else{MUI.Modal.modalOverlayCloseMorph.cancel();MUI.Modal.modalOverlayOpenMorph.start({opacity:0.6});this.windowEl.setStyles({zIndex:11000});this.opacityMorph.start({opacity:1})}$$(".dockTab").removeClass("activeDockTab");$$(".mocha").removeClass("isFocused");this.windowEl.addClass("isFocused")}else{if(MUI.options.advancedEffects==false){this.windowEl.setStyle("opacity",1);setTimeout(MUI.focusWindow.pass(this.windowEl,this),10)}else{if(MUI.ieLegacySupport){this.drawWindow(false)}this.opacityMorph.start({opacity:1});setTimeout(MUI.focusWindow.pass(this.windowEl,this),10)}}},setupEvents:function(){var a=this.windowEl;if(this.closeButtonEl){this.closeButtonEl.addEvent("click",function(b){new Event(b).stop();MUI.closeWindow(a)}.bind(this))}if(this.options.type=="window"){a.addEvent("mousedown",function(b){if(MUI.ieLegacySupport){new Event(b).stop()}MUI.focusWindow(a);if(a.getStyle("top").toInt()<-this.options.shadowBlur){a.setStyle("top",-this.options.shadowBlur)}}.bind(this))}if(this.minimizeButtonEl){this.minimizeButtonEl.addEvent("click",function(b){new Event(b).stop();MUI.Dock.minimizeWindow(a)}.bind(this))}if(this.maximizeButtonEl){this.maximizeButtonEl.addEvent("click",function(b){new Event(b).stop();if(this.isMaximized){MUI.Desktop.restoreWindow(a)}else{MUI.Desktop.maximizeWindow(a)}}.bind(this))}if(this.options.collapsible==true){this.titleEl.addEvent("selectstart",function(b){b=new Event(b).stop()}.bind(this));if(MUI.ieLegacySupport){this.titleBarEl.addEvent("mousedown",function(b){this.titleEl.setCapture()}.bind(this));this.titleBarEl.addEvent("mouseup",function(b){this.titleEl.releaseCapture()}.bind(this))}this.titleBarEl.addEvent("dblclick",function(b){b=new Event(b).stop();MUI.collapseToggle(this.windowEl)}.bind(this))}},attachDraggable:function(){var a=this.windowEl;if(!this.options.draggable){return}this.windowDrag=new Drag.Move(a,{handle:this.titleBarEl,container:this.options.restrict==true?$(this.options.container):false,grid:this.options.draggableGrid,limit:this.options.draggableLimit,snap:this.options.draggableSnap,onStart:function(){if(this.options.type!="modal"&&this.options.type!="modal2"){MUI.focusWindow(a);$("windowUnderlay").show()}if(this.iframeEl){if(!MUI.ieLegacySupport){this.iframeEl.setStyle("visibility","hidden")}else{this.iframeEl.hide()}}}.bind(this),onComplete:function(){if(this.options.type!="modal"&&this.options.type!="modal2"){$("windowUnderlay").hide()}if(this.iframeEl){if(!MUI.ieLegacySupport){this.iframeEl.setStyle("visibility","visible")}else{this.iframeEl.show()}}this.saveValues()}.bind(this)})},attachResizable:function(){var a=this.windowEl;if(!this.options.resizable){return}this.resizable1=this.windowEl.makeResizable({handle:[this.n,this.ne,this.nw],limit:{y:[function(){return this.windowEl.getStyle("top").toInt()+this.windowEl.getStyle("height").toInt()-this.options.resizeLimit.y[1]}.bind(this),function(){return this.windowEl.getStyle("top").toInt()+this.windowEl.getStyle("height").toInt()-this.options.resizeLimit.y[0]}.bind(this)]},modifiers:{x:false,y:"top"},onStart:function(){this.resizeOnStart();this.coords=this.contentWrapperEl.getCoordinates();this.y2=this.coords.top.toInt()+this.contentWrapperEl.offsetHeight}.bind(this),onDrag:function(){this.coords=this.contentWrapperEl.getCoordinates();this.contentWrapperEl.setStyle("height",this.y2-this.coords.top.toInt());this.resizeOnDrag()}.bind(this),onComplete:function(){this.resizeOnComplete()}.bind(this)});this.resizable2=this.contentWrapperEl.makeResizable({handle:[this.e,this.ne],limit:{x:[this.options.resizeLimit.x[0]-(this.options.shadowBlur*2),this.options.resizeLimit.x[1]-(this.options.shadowBlur*2)]},modifiers:{x:"width",y:false},onStart:function(){this.resizeOnStart()}.bind(this),onDrag:function(){this.resizeOnDrag()}.bind(this),onComplete:function(){this.resizeOnComplete()}.bind(this)});this.resizable3=this.contentWrapperEl.makeResizable({container:this.options.restrict==true?$(this.options.container):false,handle:this.se,limit:{x:[this.options.resizeLimit.x[0]-(this.options.shadowBlur*2),this.options.resizeLimit.x[1]-(this.options.shadowBlur*2)],y:[this.options.resizeLimit.y[0]-this.headerFooterShadow,this.options.resizeLimit.y[1]-this.headerFooterShadow]},modifiers:{x:"width",y:"height"},onStart:function(){this.resizeOnStart()}.bind(this),onDrag:function(){this.resizeOnDrag()}.bind(this),onComplete:function(){this.resizeOnComplete()}.bind(this)});this.resizable4=this.contentWrapperEl.makeResizable({handle:[this.s,this.sw],limit:{y:[this.options.resizeLimit.y[0]-this.headerFooterShadow,this.options.resizeLimit.y[1]-this.headerFooterShadow]},modifiers:{x:false,y:"height"},onStart:function(){this.resizeOnStart()}.bind(this),onDrag:function(){this.resizeOnDrag()}.bind(this),onComplete:function(){this.resizeOnComplete()}.bind(this)});this.resizable5=this.windowEl.makeResizable({handle:[this.w,this.sw,this.nw],limit:{x:[function(){return this.windowEl.getStyle("left").toInt()+this.windowEl.getStyle("width").toInt()-this.options.resizeLimit.x[1]}.bind(this),function(){return this.windowEl.getStyle("left").toInt()+this.windowEl.getStyle("width").toInt()-this.options.resizeLimit.x[0]}.bind(this)]},modifiers:{x:"left",y:false},onStart:function(){this.resizeOnStart();this.coords=this.contentWrapperEl.getCoordinates();this.x2=this.coords.left.toInt()+this.contentWrapperEl.offsetWidth}.bind(this),onDrag:function(){this.coords=this.contentWrapperEl.getCoordinates();this.contentWrapperEl.setStyle("width",this.x2-this.coords.left.toInt());this.resizeOnDrag()}.bind(this),onComplete:function(){this.resizeOnComplete()}.bind(this)})},resizeOnStart:function(){$("windowUnderlay").show();if(this.iframeEl){if(!MUI.ieLegacySupport){this.iframeEl.setStyle("visibility","hidden")}else{this.iframeEl.hide()}}},resizeOnDrag:function(){this.drawWindow();this.adjustHandles()},resizeOnComplete:function(){$("windowUnderlay").hide();if(this.iframeEl){if(!MUI.ieLegacySupport){this.iframeEl.setStyle("visibility","visible")}else{this.iframeEl.show();this.iframeEl.setStyle("width","99%");this.iframeEl.setStyle("height",this.contentWrapperEl.offsetHeight);this.iframeEl.setStyle("width","100%");this.iframeEl.setStyle("height",this.contentWrapperEl.offsetHeight)}}if(this.contentWrapperEl.getChildren(".column")!=null){MUI.rWidth(this.contentWrapperEl);this.contentWrapperEl.getChildren(".column").each(function(a){MUI.panelHeight(a)})}this.fireEvent("onResize",this.windowEl)},adjustHandles:function(){var d=this.options.shadowBlur;var j=d*2;var k=this.options.shadowOffset;var e=d-k.y-1;var g=d+k.x-1;var a=d+k.y-1;var c=d-k.x-1;var f=this.windowEl.getCoordinates();var b=f.width-j+2;var h=f.height-j+2;this.n.setStyles({top:e,left:c+10,width:b-20});this.e.setStyles({top:e+10,right:g,height:h-30});this.s.setStyles({bottom:a,left:c+10,width:b-30});this.w.setStyles({top:e+10,left:c,height:h-20});this.ne.setStyles({top:e,right:g});this.se.setStyles({bottom:a,right:g});this.sw.setStyles({bottom:a,left:c});this.nw.setStyles({top:e,left:c})},detachResizable:function(){this.resizable1.detach();this.resizable2.detach();this.resizable3.detach();this.resizable4.detach();this.resizable5.detach();this.windowEl.getElements(".handle").hide()},reattachResizable:function(){this.resizable1.attach();this.resizable2.attach();this.resizable3.attach();this.resizable4.attach();this.resizable5.attach();this.windowEl.getElements(".handle").show()},insertWindowElements:function(){var c=this.options;var a=c.height;var d=c.width;var e=c.id;var b={};if(Browser.Engine.trident4){b.zIndexFixEl=new Element("iframe",{id:e+"_zIndexFix","class":"zIndexFix",scrolling:"no",marginWidth:0,marginHeight:0,src:"",styles:{position:"absolute"}}).inject(this.windowEl)}b.overlayEl=new Element("div",{id:e+"_overlay","class":"mochaOverlay",styles:{position:"absolute",top:0,left:0}}).inject(this.windowEl);b.titleBarEl=new Element("div",{id:e+"_titleBar","class":"mochaTitlebar",styles:{cursor:c.draggable?"move":"default"}}).inject(b.overlayEl,"top");b.titleEl=new Element("h3",{id:e+"_title","class":"mochaTitle"}).inject(b.titleBarEl);if(c.icon!=false){b.titleEl.setStyles({"padding-left":28,background:"url("+c.icon+") 5px 4px no-repeat"})}b.contentBorderEl=new Element("div",{id:e+"_contentBorder","class":"mochaContentBorder"}).inject(b.overlayEl);if(c.toolbar){b.toolbarWrapperEl=new Element("div",{id:e+"_toolbarWrapper","class":"mochaToolbarWrapper",styles:{height:c.toolbarHeight}}).inject(b.contentBorderEl,c.toolbarPosition=="bottom"?"after":"before");if(c.toolbarPosition=="bottom"){b.toolbarWrapperEl.addClass("bottom")}b.toolbarEl=new Element("div",{id:e+"_toolbar","class":"mochaToolbar",styles:{height:c.toolbarHeight}}).inject(b.toolbarWrapperEl)}if(c.toolbar2){b.toolbar2WrapperEl=new Element("div",{id:e+"_toolbar2Wrapper","class":"mochaToolbarWrapper",styles:{height:c.toolbar2Height}}).inject(b.contentBorderEl,c.toolbar2Position=="bottom"?"after":"before");if(c.toolbar2Position=="bottom"){b.toolbar2WrapperEl.addClass("bottom")}b.toolbar2El=new Element("div",{id:e+"_toolbar2","class":"mochaToolbar",styles:{height:c.toolbar2Height}}).inject(b.toolbar2WrapperEl)}b.contentWrapperEl=new Element("div",{id:e+"_contentWrapper","class":"mochaContentWrapper",styles:{width:d+"px",height:a+"px"}}).inject(b.contentBorderEl);if(this.options.shape=="gauge"){b.contentBorderEl.setStyle("borderWidth",0)}b.contentEl=new Element("div",{id:e+"_content","class":"mochaContent"}).inject(b.contentWrapperEl);if(this.options.useCanvas==true&&!MUI.ieLegacySupport){b.canvasEl=new Element("canvas",{id:e+"_canvas","class":"mochaCanvas",width:10,height:10}).inject(this.windowEl)}if(this.options.useCanvas==true&&MUI.ieLegacySupport){b.canvasEl=new Element("canvas",{id:e+"_canvas","class":"mochaCanvas",width:50000,height:20000,styles:{position:"absolute",top:0,left:0}}).inject(this.windowEl);if(MUI.ieLegacySupport&&MUI.ieSupport=="excanvas"){G_vmlCanvasManager.initElement(b.canvasEl);b.canvasEl=this.windowEl.getElement(".mochaCanvas")}}b.controlsEl=new Element("div",{id:e+"_controls","class":"mochaControls"}).inject(b.overlayEl,"after");if(c.useCanvasControls==true){b.canvasControlsEl=new Element("canvas",{id:e+"_canvasControls","class":"mochaCanvasControls",width:14,height:14}).inject(this.windowEl);if(MUI.ieLegacySupport&&MUI.ieSupport=="excanvas"){G_vmlCanvasManager.initElement(b.canvasControlsEl);b.canvasControlsEl=this.windowEl.getElement(".mochaCanvasControls")}}if(c.closable){b.closeButtonEl=new Element("div",{id:e+"_closeButton","class":"mochaCloseButton mochaWindowButton",title:"Close"}).inject(b.controlsEl)}if(c.maximizable){b.maximizeButtonEl=new Element("div",{id:e+"_maximizeButton","class":"mochaMaximizeButton mochaWindowButton",title:"Maximize"}).inject(b.controlsEl)}if(c.minimizable){b.minimizeButtonEl=new Element("div",{id:e+"_minimizeButton","class":"mochaMinimizeButton mochaWindowButton",title:"Minimize"}).inject(b.controlsEl)}if(c.useSpinner==true&&c.shape!="gauge"&&c.type!="notification"){b.spinnerEl=new Element("div",{id:e+"_spinner","class":"mochaSpinner",width:16,height:16}).inject(this.windowEl,"bottom")}if(this.options.shape=="gauge"){b.canvasHeaderEl=new Element("canvas",{id:e+"_canvasHeader","class":"mochaCanvasHeader",width:this.options.width,height:26}).inject(this.windowEl,"bottom");if(MUI.ieLegacySupport&&MUI.ieSupport=="excanvas"){G_vmlCanvasManager.initElement(b.canvasHeaderEl);b.canvasHeaderEl=this.windowEl.getElement(".mochaCanvasHeader")}}if(MUI.ieLegacySupport){b.overlayEl.setStyle("zIndex",2)}if(c.resizable){b.n=new Element("div",{id:e+"_resizeHandle_n","class":"handle",styles:{top:0,left:10,cursor:"n-resize"}}).inject(b.overlayEl,"after");b.ne=new Element("div",{id:e+"_resizeHandle_ne","class":"handle corner",styles:{top:0,right:0,cursor:"ne-resize"}}).inject(b.overlayEl,"after");b.e=new Element("div",{id:e+"_resizeHandle_e","class":"handle",styles:{top:10,right:0,cursor:"e-resize"}}).inject(b.overlayEl,"after");b.se=new Element("div",{id:e+"_resizeHandle_se","class":"handle cornerSE",styles:{bottom:0,right:0,cursor:"se-resize"}}).inject(b.overlayEl,"after");b.s=new Element("div",{id:e+"_resizeHandle_s","class":"handle",styles:{bottom:0,left:10,cursor:"s-resize"}}).inject(b.overlayEl,"after");b.sw=new Element("div",{id:e+"_resizeHandle_sw","class":"handle corner",styles:{bottom:0,left:0,cursor:"sw-resize"}}).inject(b.overlayEl,"after");b.w=new Element("div",{id:e+"_resizeHandle_w","class":"handle",styles:{top:10,left:0,cursor:"w-resize"}}).inject(b.overlayEl,"after");b.nw=new Element("div",{id:e+"_resizeHandle_nw","class":"handle corner",styles:{top:0,left:0,cursor:"nw-resize"}}).inject(b.overlayEl,"after")}$extend(this,b)},setColors:function(){if(this.options.useCanvas==true){var c=/\?(.*?)\)/;if(this.titleBarEl.getStyle("backgroundImage")!="none"){var d=this.titleBarEl.getStyle("backgroundImage");d=d.match(c)[1];d=d.parseQueryString();var a=d.from;var b=d.to.replace(/\"/,"");this.options.headerStartColor=new Color(a);this.options.headerStopColor=new Color(b);this.titleBarEl.addClass("replaced")}else{if(this.titleBarEl.getStyle("background-color")!==""&&this.titleBarEl.getStyle("background-color")!=="transparent"){this.options.headerStartColor=new Color(this.titleBarEl.getStyle("background-color")).mix("#fff",20);this.options.headerStopColor=new Color(this.titleBarEl.getStyle("background-color")).mix("#000",20);this.titleBarEl.addClass("replaced")}}if(this.windowEl.getStyle("background-color")!==""&&this.windowEl.getStyle("background-color")!=="transparent"){this.options.bodyBgColor=new Color(this.windowEl.getStyle("background-color"));this.windowEl.addClass("replaced")}if(this.options.resizable&&this.se.getStyle("background-color")!==""&&this.se.getStyle("background-color")!=="transparent"){this.options.resizableColor=new Color(this.se.getStyle("background-color"));this.se.addClass("replaced")}}if(this.options.useCanvasControls==true){if(this.minimizeButtonEl){if(this.minimizeButtonEl.getStyle("color")!==""&&this.minimizeButtonEl.getStyle("color")!=="transparent"){this.options.minimizeColor=new Color(this.minimizeButtonEl.getStyle("color"))}if(this.minimizeButtonEl.getStyle("background-color")!==""&&this.minimizeButtonEl.getStyle("background-color")!=="transparent"){this.options.minimizeBgColor=new Color(this.minimizeButtonEl.getStyle("background-color"));this.minimizeButtonEl.addClass("replaced")}}if(this.maximizeButtonEl){if(this.maximizeButtonEl.getStyle("color")!==""&&this.maximizeButtonEl.getStyle("color")!=="transparent"){this.options.maximizeColor=new Color(this.maximizeButtonEl.getStyle("color"))}if(this.maximizeButtonEl.getStyle("background-color")!==""&&this.maximizeButtonEl.getStyle("background-color")!=="transparent"){this.options.maximizeBgColor=new Color(this.maximizeButtonEl.getStyle("background-color"));this.maximizeButtonEl.addClass("replaced")}}if(this.closeButtonEl){if(this.closeButtonEl.getStyle("color")!==""&&this.closeButtonEl.getStyle("color")!=="transparent"){this.options.closeColor=new Color(this.closeButtonEl.getStyle("color"))}if(this.closeButtonEl.getStyle("background-color")!==""&&this.closeButtonEl.getStyle("background-color")!=="transparent"){this.options.closeBgColor=new Color(this.closeButtonEl.getStyle("background-color"));this.closeButtonEl.addClass("replaced")}}}},drawWindow:function(b){if(this.drawingWindow==true){return}this.drawingWindow=true;if(this.isCollapsed){this.drawWindowCollapsed(b);return}var g=this.windowEl;var m=this.options;var c=m.shadowBlur;var j=c*2;var l=this.options.shadowOffset;this.overlayEl.setStyles({width:this.contentWrapperEl.offsetWidth});if(this.iframeEl){this.iframeEl.setStyle("height",this.contentWrapperEl.offsetHeight)}var d=this.contentBorderEl.getStyle("margin-top").toInt()+this.contentBorderEl.getStyle("margin-bottom").toInt();var f=this.toolbarWrapperEl?this.toolbarWrapperEl.getStyle("height").toInt()+this.toolbarWrapperEl.getStyle("margin-top").toInt():0;var e=this.toolbar2WrapperEl?this.toolbar2WrapperEl.getStyle("height").toInt()+this.toolbar2WrapperEl.getStyle("margin-top").toInt():0;this.headerFooterShadow=m.headerHeight+m.footerHeight+j;var h=this.contentWrapperEl.getStyle("height").toInt()+this.headerFooterShadow+f+e+d;var a=this.contentWrapperEl.getStyle("width").toInt()+j;this.windowEl.setStyles({height:h,width:a});this.overlayEl.setStyles({height:h,top:c-l.y,left:c-l.x});if(this.options.useCanvas==true){if(MUI.ieLegacySupport){this.canvasEl.height=20000;this.canvasEl.width=50000}this.canvasEl.height=h;this.canvasEl.width=a}if(Browser.Engine.trident4){this.zIndexFixEl.setStyles({width:a,height:h})}this.titleBarEl.setStyles({width:a-j,height:m.headerHeight});if(m.useSpinner==true&&m.shape!="gauge"&&m.type!="notification"){this.spinnerEl.setStyles({left:c-l.x+3,bottom:c+l.y+4})}if(this.options.useCanvas!=false){var k=this.canvasEl.getContext("2d");k.clearRect(0,0,a,h);switch(m.shape){case"box":this.drawBox(k,a,h,c,l,b);break;case"gauge":this.drawGauge(k,a,h,c,l,b);break}if(m.resizable){MUI.triangle(k,a-(c+l.x+17),h-(c+l.y+18),11,11,m.resizableColor,1)}if(MUI.ieLegacySupport){MUI.triangle(k,0,0,10,10,m.resizableColor,0)}}if(m.type!="notification"&&m.useCanvasControls==true){this.drawControls(a,h,b)}if(MUI.Desktop&&this.contentWrapperEl.getChildren(".column").length!=0){MUI.rWidth(this.contentWrapperEl);this.contentWrapperEl.getChildren(".column").each(function(n){MUI.panelHeight(n)})}this.drawingWindow=false;return this},drawWindowCollapsed:function(b){var e=this.windowEl;var k=this.options;var c=k.shadowBlur;var f=c*2;var j=k.shadowOffset;var d=k.headerHeight+f+2;var g=d;var a=this.contentWrapperEl.getStyle("width").toInt()+f;this.windowEl.setStyle("height",g);this.overlayEl.setStyles({height:g,top:c-j.y,left:c-j.x});if(Browser.Engine.trident4){this.zIndexFixEl.setStyles({width:a,height:g})}this.windowEl.setStyle("width",a);this.overlayEl.setStyle("width",a);this.titleBarEl.setStyles({width:a-f,height:k.headerHeight});if(this.options.useCanvas!=false){this.canvasEl.height=g;this.canvasEl.width=a;var h=this.canvasEl.getContext("2d");h.clearRect(0,0,a,g);this.drawBoxCollapsed(h,a,g,c,j,b);if(k.useCanvasControls==true){this.drawControls(a,g,b)}if(MUI.ieLegacySupport){MUI.triangle(h,0,0,10,10,k.resizableColor,0)}}this.drawingWindow=false;return this},drawControls:function(g,e,h){var f=this.options;var d=f.shadowBlur;var c=f.shadowOffset;var b=f.controlsOffset;this.controlsEl.setStyles({right:d+c.x+b.right,top:d-c.y+b.top});this.canvasControlsEl.setStyles({right:d+c.x+b.right,top:d-c.y+b.top});this.closebuttonX=f.closable?this.mochaControlsWidth-7:this.mochaControlsWidth+12;this.maximizebuttonX=this.closebuttonX-(f.maximizable?19:0);this.minimizebuttonX=this.maximizebuttonX-(f.minimizable?19:0);var a=this.canvasControlsEl.getContext("2d");a.clearRect(0,0,100,100);if(this.options.closable){this.closebutton(a,this.closebuttonX,7,f.closeBgColor,1,f.closeColor,1)}if(this.options.maximizable){this.maximizebutton(a,this.maximizebuttonX,7,f.maximizeBgColor,1,f.maximizeColor,1)}if(this.options.minimizable){this.minimizebutton(a,this.minimizebuttonX,7,f.minimizeBgColor,1,f.minimizeColor,1)}if(MUI.ieLegacySupport){MUI.circle(a,0,0,3,this.options.resizableColor,0)}},drawBox:function(h,a,g,c,j,b){var k=this.options;var f=c*2;var d=this.options.cornerRadius;if(b!=false){for(var e=0;e<=c;e++){MUI.roundedRect(h,j.x+e,j.y+e,a-(e*2)-j.x,g-(e*2)-j.y,d+(c-e),[0,0,0],e==c?0.29:0.065+(e*0.01))}}this.bodyRoundedRect(h,c-j.x,c-j.y,a-f,g-f,d,k.bodyBgColor);if(this.options.type!="notification"){this.topRoundedRect(h,c-j.x,c-j.y,a-f,k.headerHeight,d,k.headerStartColor,k.headerStopColor)}},drawBoxCollapsed:function(h,a,g,c,j,b){var k=this.options;var f=c*2;var d=k.cornerRadius;if(b!=false){for(var e=0;e<=c;e++){MUI.roundedRect(h,j.x+e,j.y+e,a-(e*2)-j.x,g-(e*2)-j.y,d+(c-e),[0,0,0],e==c?0.3:0.06+(e*0.01))}}this.topRoundedRect2(h,c-j.x,c-j.y,a-f,k.headerHeight+2,d,k.headerStartColor,k.headerStopColor)},drawGauge:function(g,a,f,c,h,b){var j=this.options;var d=(a*0.5)-(c)+16;if(b!=false){for(var e=0;e<=c;e++){MUI.circle(g,a*0.5+h.x,(f+j.headerHeight)*0.5+h.x,(a*0.5)-(e*2)-h.x,[0,0,0],e==c?0.75:0.075+(e*0.04))}}MUI.circle(g,a*0.5-h.x,(f+j.headerHeight)*0.5-h.y,(a*0.5)-c,j.bodyBgColor,1);this.canvasHeaderEl.setStyles({top:c-h.y,left:c-h.x});var g=this.canvasHeaderEl.getContext("2d");g.clearRect(0,0,a,100);g.beginPath();g.lineWidth=24;g.lineCap="round";g.moveTo(13,13);g.lineTo(a-(c*2)-13,13);g.strokeStyle="rgba(0, 0, 0, .65)";g.stroke()},bodyRoundedRect:function(d,c,g,f,b,a,e){d.fillStyle="rgba("+e.join(",")+", 1)";d.beginPath();d.moveTo(c,g+a);d.lineTo(c,g+b-a);d.quadraticCurveTo(c,g+b,c+a,g+b);d.lineTo(c+f-a,g+b);d.quadraticCurveTo(c+f,g+b,c+f,g+b-a);d.lineTo(c+f,g+a);d.quadraticCurveTo(c+f,g,c+f-a,g);d.lineTo(c+a,g);d.quadraticCurveTo(c,g,c,g+a);d.fill()},topRoundedRect:function(j,g,f,a,h,e,c,d){var b=j.createLinearGradient(0,0,0,h);b.addColorStop(0,"rgb("+c.join(",")+")");b.addColorStop(1,"rgb("+d.join(",")+")");j.fillStyle=b;j.beginPath();j.moveTo(g,f);j.lineTo(g,f+h);j.lineTo(g+a,f+h);j.lineTo(g+a,f+e);j.quadraticCurveTo(g+a,f,g+a-e,f);j.lineTo(g+e,f);j.quadraticCurveTo(g,f,g,f+e);j.fill()},topRoundedRect2:function(j,g,f,a,h,e,c,d){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){j.fillStyle="rgba("+d.join(",")+", 1)"}else{var b=j.createLinearGradient(0,this.options.shadowBlur-1,0,h+this.options.shadowBlur+3);b.addColorStop(0,"rgb("+c.join(",")+")");b.addColorStop(1,"rgb("+d.join(",")+")");j.fillStyle=b}j.beginPath();j.moveTo(g,f+e);j.lineTo(g,f+h-e);j.quadraticCurveTo(g,f+h,g+e,f+h);j.lineTo(g+a-e,f+h);j.quadraticCurveTo(g+a,f+h,g+a,f+h-e);j.lineTo(g+a,f+e);j.quadraticCurveTo(g+a,f,g+a-e,f);j.lineTo(g+e,f);j.quadraticCurveTo(g,f,g,f+e);j.fill()},maximizebutton:function(e,c,h,b,g,f,d){e.beginPath();e.arc(c,h,7,0,Math.PI*2,true);e.fillStyle="rgba("+b.join(",")+","+g+")";e.fill();e.strokeStyle="rgba("+f.join(",")+","+d+")";e.lineWidth=2;e.beginPath();e.moveTo(c,h-3.5);e.lineTo(c,h+3.5);e.moveTo(c-3.5,h);e.lineTo(c+3.5,h);e.stroke()},closebutton:function(e,c,h,b,g,f,d){e.beginPath();e.arc(c,h,7,0,Math.PI*2,true);e.fillStyle="rgba("+b.join(",")+","+g+")";e.fill();e.strokeStyle="rgba("+f.join(",")+","+d+")";e.lineWidth=2;e.beginPath();e.moveTo(c-3,h-3);e.lineTo(c+3,h+3);e.moveTo(c+3,h-3);e.lineTo(c-3,h+3);e.stroke()},minimizebutton:function(e,c,h,b,g,f,d){e.beginPath();e.arc(c,h,7,0,Math.PI*2,true);e.fillStyle="rgba("+b.join(",")+","+g+")";e.fill();e.strokeStyle="rgba("+f.join(",")+","+d+")";e.lineWidth=2;e.beginPath();e.moveTo(c-3.5,h);e.lineTo(c+3.5,h);e.stroke()},setMochaControlsWidth:function(){this.mochaControlsWidth=0;var a=this.options;if(a.minimizable){this.mochaControlsWidth+=(this.minimizeButtonEl.getStyle("margin-left").toInt()+this.minimizeButtonEl.getStyle("width").toInt())}if(a.maximizable){this.mochaControlsWidth+=(this.maximizeButtonEl.getStyle("margin-left").toInt()+this.maximizeButtonEl.getStyle("width").toInt())}if(a.closable){this.mochaControlsWidth+=(this.closeButtonEl.getStyle("margin-left").toInt()+this.closeButtonEl.getStyle("width").toInt())}this.controlsEl.setStyle("width",this.mochaControlsWidth);if(a.useCanvasControls==true){this.canvasControlsEl.setProperty("width",this.mochaControlsWidth)}},hideSpinner:function(){if(this.spinnerEl){this.spinnerEl.hide()}return this},showSpinner:function(){if(this.spinnerEl){this.spinnerEl.show()}return this},close:function(){if(!this.isClosing){MUI.closeWindow(this.windowEl)}return this},minimize:function(){MUI.Dock.minimizeWindow(this.windowEl);return this},maximize:function(){if(this.isMinimized){MUI.Dock.restoreMinimized(this.windowEl)}MUI.Desktop.maximizeWindow(this.windowEl);return this},restore:function(){if(this.isMinimized){MUI.Dock.restoreMinimized(this.windowEl)}else{if(this.isMaximized){MUI.Desktop.restoreWindow(this.windowEl)}}return this},resize:function(a){MUI.resizeWindow(this.windowEl,a);return this},center:function(){MUI.centerWindow(this.windowEl);return this},hide:function(){this.windowEl.setStyle("display","none");return this},show:function(){this.windowEl.setStyle("display","block");return this}});MUI.extend({closeWindow:function(c){var a=c.retrieve("instance");if(c!=$(c)||a.isClosing){return}a.isClosing=true;a.fireEvent("onClose",c);if(a.options.storeOnClose){this.storeOnClose(a,c);return}if(a.check){a.check.destroy()}if((a.options.type=="modal"||a.options.type=="modal2")&&Browser.Engine.trident4){$("modalFix").hide()}if(MUI.options.advancedEffects==false){if(a.options.type=="modal"||a.options.type=="modal2"){$("modalOverlay").setStyle("opacity",0)}MUI.closingJobs(c);return true}else{if(MUI.ieLegacySupport){a.drawWindow(false)}if(a.options.type=="modal"||a.options.type=="modal2"){MUI.Modal.modalOverlayCloseMorph.start({opacity:0})}var b=new Fx.Morph(c,{duration:120,onComplete:function(){MUI.closingJobs(c);return true}.bind(this)});b.start({opacity:0.4})}},closingJobs:function(e){var d=MUI.Windows.instances;var a=d.get(e.id);e.setStyle("visibility","hidden");if(MUI.ieLegacySupport){e.dispose()}else{e.destroy()}a.fireEvent("onCloseComplete");if(a.options.type!="notification"){var c=this.getWindowWithHighestZindex();this.focusWindow(c)}d.erase(a.options.id);if(this.loadingWorkspace==true){this.windowUnload()}if(MUI.Dock&&$(MUI.options.dock)&&a.options.type=="window"){var b=$(a.options.id+"_dockTab");if(b!=null){MUI.Dock.dockSortables.removeItems(b).destroy()}MUI.Desktop.setDesktopSize()}},storeOnClose:function(a,d){if(a.check){a.check.hide()}d.setStyles({zIndex:-1});d.addClass("windowClosed");d.removeClass("mocha");if(MUI.Dock&&$(MUI.options.dock)&&a.options.type=="window"){var c=$(a.options.id+"_dockTab");if(c!=null){c.hide()}MUI.Desktop.setDesktopSize()}a.fireEvent("onCloseComplete");if(a.options.type!="notification"){var b=this.getWindowWithHighestZindex();this.focusWindow(b)}a.isClosing=false},closeAll:function(){$$(".mocha").each(function(a){this.closeWindow(a)}.bind(this))},collapseToggle:function(c){var a=c.retrieve("instance");var b=c.getElements(".handle");if(a.isMaximized==true){return}if(a.isCollapsed==false){a.isCollapsed=true;b.hide();if(a.iframeEl){a.iframeEl.setStyle("visibility","hidden")}a.contentBorderEl.setStyles({visibility:"hidden",position:"absolute",top:-10000,left:-10000});if(a.toolbarWrapperEl){a.toolbarWrapperEl.setStyles({visibility:"hidden",position:"absolute",top:-10000,left:-10000})}a.drawWindowCollapsed()}else{a.isCollapsed=false;a.drawWindow();a.contentBorderEl.setStyles({visibility:"visible",position:null,top:null,left:null});if(a.toolbarWrapperEl){a.toolbarWrapperEl.setStyles({visibility:"visible",position:null,top:null,left:null})}if(a.iframeEl){a.iframeEl.setStyle("visibility","visible")}b.show()}},toggleWindowVisibility:function(){MUI.Windows.instances.each(function(a){if(a.options.type=="modal"||a.options.type=="modal2"||a.isMinimized==true){return}var b=$(a.options.id);if(b.getStyle("visibility")=="visible"){if(a.iframe){a.iframeEl.setStyle("visibility","hidden")}if(a.toolbarEl){a.toolbarWrapperEl.setStyle("visibility","hidden")}a.contentBorderEl.setStyle("visibility","hidden");b.setStyle("visibility","hidden");MUI.Windows.windowsVisible=false}else{b.setStyle("visibility","visible");a.contentBorderEl.setStyle("visibility","visible");if(a.iframe){a.iframeEl.setStyle("visibility","visible")}if(a.toolbarEl){a.toolbarWrapperEl.setStyle("visibility","visible")}MUI.Windows.windowsVisible=true}}.bind(this))},focusWindow:function(e,c){MUI.Windows.focusingWindow=true;var b=function(){MUI.Windows.focusingWindow=false};b.delay(170,this);if($$(".mocha").length==0){return}if(e!=$(e)||e.hasClass("isFocused")){return}var d=MUI.Windows.instances;var a=d.get(e.id);if(a.options.type=="notification"){e.setStyle("zIndex",11001);return}MUI.Windows.indexLevel+=2;e.setStyle("zIndex",MUI.Windows.indexLevel);$("windowUnderlay").setStyle("zIndex",MUI.Windows.indexLevel-1).inject($(e),"after");d.each(function(f){if(f.windowEl.hasClass("isFocused")){f.fireEvent("onBlur",f.windowEl)}f.windowEl.removeClass("isFocused")});if(MUI.Dock&&$(MUI.options.dock)&&a.options.type=="window"){MUI.Dock.makeActiveTab()}e.addClass("isFocused");if(c!=false){a.fireEvent("onFocus",e)}},getWindowWithHighestZindex:function(){this.highestZindex=0;$$(".mocha").each(function(a){this.zIndex=a.getStyle("zIndex");if(this.zIndex>=this.highestZindex){this.highestZindex=this.zIndex}}.bind(this));$$(".mocha").each(function(a){if(a.getStyle("zIndex")==this.highestZindex){this.windowWithHighestZindex=a}}.bind(this));return this.windowWithHighestZindex},blurAll:function(){if(MUI.Windows.focusingWindow==false){$$(".mocha").each(function(b){var a=b.retrieve("instance");if(a.options.type!="modal"&&a.options.type!="modal2"){b.removeClass("isFocused")}});$$(".dockTab").removeClass("activeDockTab")}},centerWindow:function(f){if(!f){MUI.Windows.instances.each(function(g){if(g.windowEl.hasClass("isFocused")){f=g.windowEl}})}var a=f.retrieve("instance");var b=a.options;var d=b.container.getCoordinates();var c=window.getScroll().y+(window.getSize().y*0.5)-(f.offsetHeight*0.5);if(c<-a.options.shadowBlur){c=-a.options.shadowBlur}var e=(d.width*0.5)-(f.offsetWidth*0.5);if(e<-a.options.shadowBlur){e=-a.options.shadowBlur}if(MUI.options.advancedEffects==true){a.morph.start({top:c,left:e})}else{f.setStyles({top:c,left:e})}},resizeWindow:function(f,j){var g=f.retrieve("instance");$extend({width:null,height:null,top:null,left:null,centered:true},j);var c=f.getStyle("width").toInt();var h=f.getStyle("height").toInt();var d=f.getStyle("top").toInt();var b=f.getStyle("left").toInt();if(j.centered){var e=j.top||d-((j.height-h)*0.5);var a=j.left||b-((j.width-c)*0.5)}else{var e=j.top||d;var a=j.left||b}if(MUI.options.advancedEffects==false){f.setStyles({top:e,left:a});g.contentWrapperEl.setStyles({height:j.height,width:j.width});g.drawWindow();if(g.iframeEl){if(!MUI.ieLegacySupport){g.iframeEl.setStyle("visibility","visible")}else{g.iframeEl.show()}}}else{f.retrieve("resizeMorph").start({"0":{height:j.height,width:j.width},"1":{top:e,left:a}})}return g},dynamicResize:function(d){var a=d.retrieve("instance");var c=a.contentWrapperEl;var b=a.contentEl;c.setStyles({height:b.offsetHeight,width:b.offsetWidth});a.drawWindow()}});document.addEvent("keydown",function(a){if(a.key=="q"&&a.control&&a.alt){MUI.toggleWindowVisibility()}});MUI.files[MUI.path.source+"Window/Modal.js"]="loaded";MUI.Modal=new Class({Extends:MUI.Window,options:{type:"modal"},initialize:function(a){if(!$("modalOverlay")){this.modalInitialize();window.addEvent("resize",function(){this.setModalSize()}.bind(this))}this.parent(a)},modalInitialize:function(){var a=new Element("div",{id:"modalOverlay",styles:{height:document.getCoordinates().height,opacity:0.6}}).inject(document.body);a.setStyles({position:Browser.Engine.trident4?"absolute":"fixed"});a.addEvent("click",function(d){var c=MUI.Windows.instances.get(MUI.currentModal.id);if(c.options.modalOverlayClose==true){MUI.closeWindow(MUI.currentModal)}});if(Browser.Engine.trident4){var b=new Element("iframe",{id:"modalFix",scrolling:"no",marginWidth:0,marginHeight:0,src:"",styles:{height:document.getCoordinates().height}}).inject(document.body)}MUI.Modal.modalOverlayOpenMorph=new Fx.Morph($("modalOverlay"),{duration:150});MUI.Modal.modalOverlayCloseMorph=new Fx.Morph($("modalOverlay"),{duration:150,onComplete:function(){$("modalOverlay").hide();if(Browser.Engine.trident4){$("modalFix").hide()}}.bind(this)})},setModalSize:function(){$("modalOverlay").setStyle("height",document.getCoordinates().height);if(Browser.Engine.trident4){$("modalFix").setStyle("height",document.getCoordinates().height)}}});MUI.files[MUI.path.source+"Window/Windows-from-html.js"]="loaded";MUI.extend({NewWindowsFromHTML:function(){$$(".mocha").each(function(b){if(Browser.Engine.presto||Browser.Engine.trident5){b.hide()}var d=b.getElement("h3.mochaTitle");if(Browser.Engine.presto){b.show()}var c=b.getStyles("height","width");var a={id:b.getProperty("id"),height:c.height.toInt(),width:c.width.toInt(),x:b.getStyle("left").toInt(),y:b.getStyle("top").toInt()};if(d){a.title=d.innerHTML;d.destroy()}a.content=b.innerHTML;b.destroy();new MUI.Window(a,true)}.bind(this))}});MUI.files[MUI.path.source+"Window/Windows-from-json.js"]="loaded";MUI.extend({newWindowsFromJSON:function(newWindows){newWindows.each(function(options){var temp=new Hash(options);temp.each(function(value,key,hash){if($type(value)!="string"){return}if(value.substring(0,8)=="function"){eval("options."+key+" = "+value)}});new MUI.Window(options)})}});MUI.files[MUI.path.source+"Window/Arrange-cascade.js"]="loaded";MUI.extend({arrangeCascade:function(){var g=30;var a=20;var k=50;var c=40;var j=document.getCoordinates();var d=0;MUI.Windows.instances.each(function(l){if(!l.isMinimized&&l.options.draggable){d++}});if((k*(d+1))>=(j.height-g)){var e=(j.height-g)/(d+1)}else{var e=k}if((c*(d+1))>=(j.width-a-20)){var b=(j.width-a-20)/(d+1)}else{var b=c}var h=a;var f=g;$$(".mocha").each(function(n){var l=n.retrieve("instance");if(!l.isMinimized&&!l.isMaximized&&l.options.draggable){id=n.id;MUI.focusWindow(n);h+=b;f+=e;if(MUI.options.advancedEffects==false){n.setStyles({top:f,left:h})}else{var m=new Fx.Morph(n,{duration:550});m.start({top:f,left:h})}}}.bind(this))}});MUI.files[MUI.path.source+"Window/Arrange-tile.js"]="loaded";MUI.extend({arrangeTile:function(){var g=30;var b=20;var j=10;var f=80;var a=MUI.Windows.instances;var l=0;a.each(function(o){if(!o.isMinimized&&!o.isMaximized){l++}});var h=3;var n=Math.ceil(l/h);var k=document.getCoordinates();var e=((k.width-b)/h);var d=((k.height-g)/n);var m=0;var c=0;a.each(function(x){if(!x.isMinimized&&!x.isMaximized&&x.options.draggable){var t=x.contentWrapperEl;var o=t.getCoordinates();var w=x.windowEl.getCoordinates();var s=o.top-w.top;var v=w.height-o.height-s;var r=o.left-w.left;var y=w.width-o.width-r;var p=(j+(c*e));var u=(f+(m*d));x.drawWindow();MUI.focusWindow(x.windowEl);if(MUI.options.advancedEffects==false){x.windowEl.setStyles({top:u,left:p})}else{var q=new Fx.Morph(x.windowEl,{duration:550});q.start({top:u,left:p})}if(++c===h){m++;c=0}}}.bind(this))}});MUI.files[MUI.path.source+"Components/Tabs.js"]="loaded";MUI.extend({initializeTabs:function(a){$(a).setStyle("list-style","none");$(a).getElements("li").addEvent("click",function(b){MUI.selected(this,a)})},selected:function(b,a){$(a).getChildren().each(function(c){c.removeClass("selected")});b.addClass("selected")}});MUI.files[MUI.path.source+"Layout/Layout.js"]="loaded";MUI.extend({Columns:{instances:new Hash(),columnIDCount:0},Panels:{instances:new Hash(),panelIDCount:0}});MUI.Desktop={options:{desktop:"desktop",desktopHeader:"desktopHeader",desktopFooter:"desktopFooter",desktopNavBar:"desktopNavbar",pageWrapper:"pageWrapper",page:"page",desktopFooter:"desktopFooterWrapper"},initialize:function(){this.desktop=$(this.options.desktop);this.desktopHeader=$(this.options.desktopHeader);this.desktopNavBar=$(this.options.desktopNavBar);this.pageWrapper=$(this.options.pageWrapper);this.page=$(this.options.page);this.desktopFooter=$(this.options.desktopFooter);if(this.desktop){($$("body")).setStyles({overflow:"hidden",height:"100%",margin:0});($$("html")).setStyles({overflow:"hidden",height:"100%"})}if(!MUI.Dock){this.setDesktopSize()}this.menuInitialize();window.addEvent("resize",function(a){this.onBrowserResize()}.bind(this));if(MUI.myChain){MUI.myChain.callChain()}},menuInitialize:function(){if(Browser.Engine.trident4&&this.desktopNavBar){this.desktopNavBar.getElements("li").each(function(a){a.addEvent("mouseenter",function(){this.addClass("ieHover")});a.addEvent("mouseleave",function(){this.removeClass("ieHover")})})}},onBrowserResize:function(){this.setDesktopSize();setTimeout(function(){MUI.Windows.instances.each(function(a){if(a.isMaximized){if(a.iframeEl){a.iframeEl.setStyle("visibility","hidden")}var d=document.getCoordinates();var b=a.contentBorderEl.getStyle("margin-top").toInt()+a.contentBorderEl.getStyle("margin-bottom").toInt();var c=a.toolbarWrapperEl?a.toolbarWrapperEl.getStyle("height").toInt()+a.toolbarWrapperEl.getStyle("margin-top").toInt():0;a.contentWrapperEl.setStyles({height:d.height-a.options.headerHeight-a.options.footerHeight-b-c,width:d.width});a.drawWindow();if(a.iframeEl){a.iframeEl.setStyles({height:a.contentWrapperEl.getStyle("height")});a.iframeEl.setStyle("visibility","visible")}}}.bind(this))}.bind(this),100)},setDesktopSize:function(){var d=window.getCoordinates();var b=$(MUI.options.dockWrapper);if(this.desktop){this.desktop.setStyle("height",d.height)}if(this.pageWrapper){var a=MUI.dockVisible?b.offsetHeight:0;var c=d.height;c-=this.pageWrapper.getStyle("margin-top").toInt();c-=this.pageWrapper.getStyle("margin-bottom").toInt();if(this.desktopHeader){c-=this.desktopHeader.offsetHeight}if(this.desktopFooter){c-=this.desktopFooter.offsetHeight}c-=a;if(c<0){c=0}this.pageWrapper.setStyle("height",c)}if(MUI.Columns.instances.getKeys().length>0){MUI.Desktop.resizePanels()}},resizePanels:function(){MUI.panelHeight();MUI.rWidth()},maximizeWindow:function(f){var g=MUI.Windows.instances.get(f.id);var j=g.options;var c=g.windowDrag;if(f!=$(f)||g.isMaximized){return}if(g.isCollapsed){MUI.collapseToggle(f)}g.isMaximized=true;if(g.options.restrict){c.detach();if(j.resizable){g.detachResizable()}g.titleBarEl.setStyle("cursor","default")}if(j.container!=this.desktop){this.desktop.grab(f);if(this.options.restrict){c.container=this.desktop}}g.oldTop=f.getStyle("top");g.oldLeft=f.getStyle("left");var d=g.contentWrapperEl;d.oldWidth=d.getStyle("width");d.oldHeight=d.getStyle("height");if(g.iframeEl){if(!MUI.ieLegacySupport){g.iframeEl.setStyle("visibility","hidden")}else{g.iframeEl.hide()}}var b=document.getCoordinates();var j=g.options;var e=j.shadowBlur;var h=j.shadowOffset;var a=b.height-j.headerHeight-j.footerHeight;a-=g.contentBorderEl.getStyle("margin-top").toInt();a-=g.contentBorderEl.getStyle("margin-bottom").toInt();a-=(g.toolbarWrapperEl?g.toolbarWrapperEl.getStyle("height").toInt()+g.toolbarWrapperEl.getStyle("margin-top").toInt():0);MUI.resizeWindow(f,{width:b.width,height:a,top:h.y-e,left:h.x-e});g.fireEvent("onMaximize",f);if(g.maximizeButtonEl){g.maximizeButtonEl.setProperty("title","Restore")}MUI.focusWindow(f)},restoreWindow:function(d){var a=d.retrieve("instance");if(d!=$(d)||!a.isMaximized){return}var b=a.options;a.isMaximized=false;if(b.restrict){a.windowDrag.attach();if(b.resizable){a.reattachResizable()}a.titleBarEl.setStyle("cursor","move")}if(a.iframeEl){if(!MUI.ieLegacySupport){a.iframeEl.setStyle("visibility","hidden")}else{a.iframeEl.hide()}}var c=a.contentWrapperEl;MUI.resizeWindow(d,{width:c.oldWidth,height:c.oldHeight,top:a.oldTop,left:a.oldLeft});a.fireEvent("onRestore",d);if(a.maximizeButtonEl){a.maximizeButtonEl.setProperty("title","Maximize")}}};MUI.Column=new Class({Implements:[Events,Options],options:{id:null,container:null,placement:null,width:null,resizeLimit:[],sortable:true,onResize:$empty,onCollapse:$empty,onExpand:$empty},initialize:function(b){this.setOptions(b);$extend(this,{timestamp:$time(),isCollapsed:false,oldWidth:0});if(this.options.id==null){this.options.id="column"+(++MUI.Columns.columnIDCount)}var b=this.options;var g=MUI.Columns.instances;var d=g.get(b.id);if(b.container==null){b.container=MUI.Desktop.pageWrapper}else{$(b.container).setStyle("overflow","hidden")}if(typeof this.options.container=="string"){this.options.container=$(this.options.container)}if(d){var a=d}if(this.columnEl){return}else{g.set(b.id,this)}if($(b.container).getElement(".pad")!=null){$(b.container).getElement(".pad").hide()}if($(b.container).getElement(".mochaContent")!=null){$(b.container).getElement(".mochaContent").hide()}this.columnEl=new Element("div",{id:this.options.id,"class":"column expanded",styles:{width:b.placement=="main"?null:b.width}}).inject($(b.container));this.columnEl.store("instance",this);var c=this.columnEl.getParent();var f=c.getStyle("height").toInt();this.columnEl.setStyle("height",f);if(this.options.sortable){if(!this.options.container.retrieve("sortables")){var e=new Sortables(this.columnEl,{opacity:1,handle:".panel-header",constrain:false,revert:false,onSort:function(){$$(".column").each(function(h){h.getChildren(".panelWrapper").each(function(j){j.getElement(".panel").removeClass("bottomPanel")});if(h.getChildren(".panelWrapper").getLast()){h.getChildren(".panelWrapper").getLast().getElement(".panel").addClass("bottomPanel")}MUI.panelHeight()}.bind(this))}.bind(this)});this.options.container.store("sortables",e)}else{this.options.container.retrieve("sortables").addLists(this.columnEl)}}if(b.placement=="main"){this.columnEl.addClass("rWidth")}switch(this.options.placement){case"left":this.handleEl=new Element("div",{id:this.options.id+"_handle","class":"columnHandle"}).inject(this.columnEl,"after");this.handleIconEl=new Element("div",{id:b.id+"_handle_icon","class":"handleIcon"}).inject(this.handleEl);addResizeRight(this.columnEl,b.resizeLimit[0],b.resizeLimit[1]);break;case"right":this.handleEl=new Element("div",{id:this.options.id+"_handle","class":"columnHandle"}).inject(this.columnEl,"before");this.handleIconEl=new Element("div",{id:b.id+"_handle_icon","class":"handleIcon"}).inject(this.handleEl);addResizeLeft(this.columnEl,b.resizeLimit[0],b.resizeLimit[1]);break}if(this.handleEl!=null){this.handleEl.addEvent("dblclick",function(){this.columnToggle()}.bind(this))}MUI.rWidth()},columnToggle:function(){var a=this.columnEl;if(this.isCollapsed==false){this.oldWidth=a.getStyle("width").toInt();this.resize.detach();this.handleEl.removeEvents("dblclick");this.handleEl.addEvent("click",function(){this.columnToggle()}.bind(this));this.handleEl.setStyle("cursor","pointer").addClass("detached");a.setStyle("width",0);this.isCollapsed=true;a.addClass("collapsed");a.removeClass("expanded");MUI.rWidth();this.fireEvent("onCollapse")}else{a.setStyle("width",this.oldWidth);this.isCollapsed=false;a.addClass("expanded");a.removeClass("collapsed");this.handleEl.removeEvents("click");this.handleEl.addEvent("dblclick",function(){this.columnToggle()}.bind(this));this.resize.attach();this.handleEl.setStyle("cursor",(Browser.Engine.webkit||Browser.Engine.gecko)?"col-resize":"e-resize").addClass("attached");MUI.rWidth();this.fireEvent("onExpand")}}});MUI.Column.implement(new Options,new Events);MUI.Panel=new Class({Implements:[Events,Options],options:{id:null,title:"New Panel",column:null,require:{css:[],images:[],js:[],onload:null},loadMethod:null,contentURL:null,method:"get",data:null,evalScripts:true,evalResponse:false,content:"Panel content",tabsURL:null,tabsData:null,tabsOnload:$empty,header:true,headerToolbox:false,headerToolboxURL:"pages/lipsum.html",headerToolboxOnload:$empty,height:125,addClass:"",scrollbars:true,padding:{top:8,right:8,bottom:8,left:8},collapsible:true,onBeforeBuild:$empty,onContentLoaded:$empty,onResize:$empty,onCollapse:$empty,onExpand:$empty},initialize:function(b){this.setOptions(b);$extend(this,{timestamp:$time(),isCollapsed:false,oldHeight:0,partner:null});if(this.options.id==null){this.options.id="panel"+(++MUI.Panels.panelIDCount)}var f=MUI.Panels.instances;var c=f.get(this.options.id);var b=this.options;if(c){var a=c}if(this.panelEl){return}else{f.set(this.options.id,this)}this.fireEvent("onBeforeBuild");if(b.loadMethod=="iframe"){b.padding={top:0,right:0,bottom:0,left:0}}this.showHandle=true;if($(b.column).getChildren().length==0){this.showHandle=false}this.panelWrapperEl=new Element("div",{id:this.options.id+"_wrapper","class":"panelWrapper expanded"}).inject($(b.column));this.panelEl=new Element("div",{id:this.options.id,"class":"panel expanded",styles:{height:b.height}}).inject(this.panelWrapperEl);this.panelEl.store("instance",this);this.panelEl.addClass(b.addClass);this.contentEl=new Element("div",{id:b.id+"_pad","class":"pad"}).inject(this.panelEl);this.contentWrapperEl=this.panelEl;this.contentEl.setStyles({"padding-top":b.padding.top,"padding-bottom":b.padding.bottom,"padding-left":b.padding.left,"padding-right":b.padding.right});this.panelHeaderEl=new Element("div",{id:this.options.id+"_header","class":"panel-header",styles:{display:b.header?"block":"none"}}).inject(this.panelEl,"before");var d=MUI.Columns.instances;var e=d.get(this.options.column);if(e.options.sortable){this.panelHeaderEl.setStyle("cursor","move");e.options.container.retrieve("sortables").addItems(this.panelWrapperEl)}if(this.options.collapsible){this.collapseToggleInit()}if(this.options.headerToolbox){this.panelHeaderToolboxEl=new Element("div",{id:b.id+"_headerToolbox","class":"panel-header-toolbox"}).inject(this.panelHeaderEl)}this.panelHeaderContentEl=new Element("div",{id:b.id+"_headerContent","class":"panel-headerContent"}).inject(this.panelHeaderEl);this.titleEl=new Element("h2",{id:b.id+"_title"}).inject(this.panelHeaderContentEl);this.handleEl=new Element("div",{id:b.id+"_handle","class":"horizontalHandle",styles:{display:this.showHandle==true?"block":"none"}}).inject(this.panelEl,"after");this.handleIconEl=new Element("div",{id:b.id+"_handle_icon","class":"handleIcon"}).inject(this.handleEl);addResizeBottom(b.id);if(b.require.css.length||b.require.images.length){new MUI.Require({css:b.require.css,images:b.require.images,onload:function(){this.newPanel()}.bind(this)})}else{this.newPanel()}},newPanel:function(){options=this.options;if(this.options.headerToolbox){MUI.updateContent({element:this.panelEl,childElement:this.panelHeaderToolboxEl,loadMethod:"xhr",url:options.headerToolboxURL,onContentLoaded:options.headerToolboxOnload})}if(options.tabsURL==null){this.titleEl.set("html",options.title)}else{this.panelHeaderContentEl.addClass("tabs");MUI.updateContent({element:this.panelEl,childElement:this.panelHeaderContentEl,loadMethod:"xhr",url:options.tabsURL,data:options.tabsData,onContentLoaded:options.tabsOnload})}MUI.updateContent({element:this.panelEl,content:options.content,method:options.method,data:options.data,url:options.contentURL,onContentLoaded:null,require:{js:options.require.js,onload:options.require.onload}});$(options.column).getChildren(".panelWrapper").each(function(a){a.getElement(".panel").removeClass("bottomPanel")});$(options.column).getChildren(".panelWrapper").getLast().getElement(".panel").addClass("bottomPanel");MUI.panelHeight(options.column,this.panelEl,"new")},collapseToggleInit:function(a){var a=this.options;this.panelHeaderCollapseBoxEl=new Element("div",{id:a.id+"_headerCollapseBox","class":"toolbox"}).inject(this.panelHeaderEl);if(a.headerToolbox){this.panelHeaderCollapseBoxEl.addClass("divider")}this.collapseToggleEl=new Element("div",{id:a.id+"_collapseToggle","class":"panel-collapse icon16",styles:{width:16,height:16},title:"Collapse Panel"}).inject(this.panelHeaderCollapseBoxEl);this.collapseToggleEl.addEvent("click",function(f){var b=this.panelEl;var c=this.panelWrapperEl;var g=MUI.Panels.instances;var e=[];c.getAllPrevious(".panelWrapper").each(function(j){var h=g.get(j.getElement(".panel").id);if(h.isCollapsed==false){e.push(j.getElement(".panel").id)}});c.getAllNext(".panelWrapper").each(function(j){var h=g.get(j.getElement(".panel").id);if(h.isCollapsed==false){e.push(j.getElement(".panel").id)}});if(this.isCollapsed==false){var d=MUI.Columns.instances.get($(a.column).id);if(e.length==0&&d.options.placement!="main"){var d=MUI.Columns.instances.get($(a.column).id);d.columnToggle();return}else{if(e.length==0&&d.options.placement=="main"){return}}this.oldHeight=b.getStyle("height").toInt();if(this.oldHeight<10){this.oldHeight=20}this.contentEl.setStyle("position","absolute");b.setStyle("height",0);this.isCollapsed=true;c.addClass("collapsed");c.removeClass("expanded");MUI.panelHeight(a.column,b,"collapsing");MUI.panelHeight();this.collapseToggleEl.removeClass("panel-collapsed");this.collapseToggleEl.addClass("panel-expand");this.collapseToggleEl.setProperty("title","Expand Panel");this.fireEvent("onCollapse")}else{this.contentEl.setStyle("position",null);b.setStyle("height",this.oldHeight);this.isCollapsed=false;c.addClass("expanded");c.removeClass("collapsed");MUI.panelHeight(this.options.column,b,"expanding");MUI.panelHeight();this.collapseToggleEl.removeClass("panel-expand");this.collapseToggleEl.addClass("panel-collapsed");this.collapseToggleEl.setProperty("title","Collapse Panel");this.fireEvent("onExpand")}}.bind(this))}});MUI.Panel.implement(new Options,new Events);MUI.extend({panelHeight:function(a,c,b){if(a!=null){MUI.panelHeight2($(a),c,b)}else{$$(".column").each(function(d){MUI.panelHeight2(d)}.bind(this))}},panelHeight2:function(e,m,f){var b=MUI.Panels.instances;var j=e.getParent();var h=j.getStyle("height").toInt();if(Browser.Engine.trident4&&j==MUI.Desktop.pageWrapper){h-=1}e.setStyle("height",h);var g=[];e.getChildren(".panelWrapper").each(function(n){g.push(n.getElement(".panel"))}.bind(this));var k=[];e.getChildren(".expanded").each(function(n){k.push(n.getElement(".panel"))}.bind(this));var c=[];var d;var a=0;this.panelsTotalHeight=0;this.height=0;g.each(function(n){instance=b.get(n.id);if(n.getParent().hasClass("expanded")&&n.getParent().getNext(".expanded")){instance.partner=n.getParent().getNext(".expanded").getElement(".panel");instance.resize.attach();instance.handleEl.setStyles({display:"block",cursor:(Browser.Engine.webkit||Browser.Engine.gecko)?"row-resize":"n-resize"}).removeClass("detached")}else{instance.resize.detach();instance.handleEl.setStyles({display:"none",cursor:null}).addClass("detached")}if(n.getParent().getNext(".panelWrapper")==null){instance.handleEl.hide()}}.bind(this));e.getChildren().each(function(n){n.getChildren().each(function(p){if(p.hasClass("panel")){var o=b.get(p.id);anyNextSiblingsExpanded=function(q){var r;q.getParent().getAllNext(".panelWrapper").each(function(s){var t=b.get(s.getElement(".panel").id);if(t.isCollapsed==false){r=true}}.bind(this));return r}.bind(this);anyExpandingNextSiblingsExpanded=function(q){var r;m.getParent().getAllNext(".panelWrapper").each(function(s){var t=b.get(s.getElement(".panel").id);if(t.isCollapsed==false){r=true}}.bind(this));return r}.bind(this);anyNextContainsChanging=function(r){var q=[];r.getParent().getAllNext(".panelWrapper").each(function(t){q.push(t.getElement(".panel"))}.bind(this));var s=q.contains(m);return s}.bind(this);nextExpandedChanging=function(q){var r;if(q.getParent().getNext(".expanded")){if(q.getParent().getNext(".expanded").getElement(".panel")==m){r=true}}return r};if(f=="new"){if(!o.isCollapsed&&p!=m){c.push(p);this.panelsTotalHeight+=p.offsetHeight.toInt()}}else{if(f==null||f=="collapsing"){if(!o.isCollapsed&&(!anyNextContainsChanging(p)||!anyNextSiblingsExpanded(p))){c.push(p);this.panelsTotalHeight+=p.offsetHeight.toInt()}}else{if(f=="expanding"&&!o.isCollapsed&&p!=m){if(!anyNextContainsChanging(p)||(!anyExpandingNextSiblingsExpanded(p)&&nextExpandedChanging(p))){c.push(p);this.panelsTotalHeight+=p.offsetHeight.toInt()}}}}if(p.style.height){this.height+=p.getStyle("height").toInt()}}else{this.height+=p.offsetHeight.toInt()}}.bind(this))}.bind(this));var l=e.offsetHeight.toInt()-this.height;this.height=0;e.getChildren().each(function(n){this.height+=n.offsetHeight.toInt()}.bind(this));var l=e.offsetHeight.toInt()-this.height;c.each(function(n){var q=this.panelsTotalHeight/n.offsetHeight.toInt();var p=n.getStyle("height").toInt();var o=l/q;if(!isNaN(p)){o+=p}if(o<1){o=0}n.setStyle("height",o)}.bind(this));this.height=0;e.getChildren().each(function(n){n.getChildren().each(function(o){this.height+=o.offsetHeight.toInt();if(o.hasClass("panel")&&o.getStyle("height").toInt()>a){d=o;a=o.getStyle("height").toInt()}}.bind(this))}.bind(this));var l=e.offsetHeight.toInt()-this.height;if(l!=0&&a>0){d.setStyle("height",d.getStyle("height").toInt()+l);if(d.getStyle("height")<1){d.setStyle("height",0)}}j.getChildren(".columnHandle").each(function(p){var o=p.getParent();if(o.getStyle("height").toInt()<1){return}var n=o.getStyle("height").toInt()-p.getStyle("margin-top").toInt()-p.getStyle("margin-bottom").toInt();if(Browser.Engine.trident4&&o==MUI.Desktop.pageWrapper){n-=1}p.setStyle("height",n)});k.each(function(n){MUI.resizeChildren(n)}.bind(this))},resizeChildren:function(b){var d=MUI.Panels.instances;var a=d.get(b.id);var c=a.contentWrapperEl;if(a.iframeEl){if(!MUI.ieLegacySupport){a.iframeEl.setStyles({height:c.getStyle("height"),width:c.offsetWidth-c.getStyle("margin-left").toInt()-c.getStyle("margin-right").toInt()})}else{a.iframeEl.setStyles({height:c.getStyle("height"),width:c.offsetWidth-c.getStyle("margin-left").toInt()-c.getStyle("margin-right").toInt()-1});a.iframeEl.setStyles({width:c.offsetWidth-c.getStyle("margin-left").toInt()-c.getStyle("margin-right").toInt()})}}},rWidth:function(a){if(a==null){var a=MUI.Desktop.desktop}a.getElements(".rWidth").each(function(e){var b=e.offsetWidth.toInt();b-=e.getStyle("margin-left").toInt();b-=e.getStyle("margin-right").toInt();var d=e.getParent();this.width=0;d.getChildren().each(function(g){if(g.hasClass("mocha")!=true){this.width+=g.offsetWidth.toInt()}}.bind(this));var c=d.offsetWidth.toInt()-this.width;var f=b+c;if(f<1){f=0}e.setStyle("width",f);e.getChildren(".panel").each(function(g){g.setStyle("width",f-g.getStyle("margin-left").toInt()-g.getStyle("margin-right").toInt());MUI.resizeChildren(g)}.bind(this))})}});function addResizeRight(d,c,b){if(!$(d)){return}d=$(d);var f=MUI.Columns.instances;var a=f.get(d.id);var e=d.getNext(".columnHandle");e.setStyle("cursor",(Browser.Engine.webkit||Browser.Engine.gecko)?"col-resize":"e-resize");if(!c){c=50}if(!b){b=250}if(MUI.ieLegacySupport){e.addEvents({mousedown:function(){e.setCapture()},mouseup:function(){e.releaseCapture()}})}a.resize=d.makeResizable({handle:e,modifiers:{x:"width",y:false},limit:{x:[c,b]},onStart:function(){d.getElements("iframe").setStyle("visibility","hidden");d.getNext(".column").getElements("iframe").setStyle("visibility","hidden")}.bind(this),onDrag:function(){MUI.rWidth(d.getParent());if(Browser.Engine.trident4){d.getChildren().each(function(h){var g=$(d).getStyle("width").toInt();g-=h.getStyle("margin-right").toInt();g-=h.getStyle("margin-left").toInt();g-=h.getStyle("padding-right").toInt();g-=h.getStyle("padding-left").toInt();h.setStyle("width",g)}.bind(this))}}.bind(this),onComplete:function(){MUI.rWidth(d.getParent());d.getElements("iframe").setStyle("visibility","visible");d.getNext(".column").getElements("iframe").setStyle("visibility","visible");a.fireEvent("onResize")}.bind(this)})}function addResizeLeft(d,c,b){if(!$(d)){return}d=$(d);var g=MUI.Columns.instances;var a=g.get(d.id);var f=d.getPrevious(".columnHandle");f.setStyle("cursor",(Browser.Engine.webkit||Browser.Engine.gecko)?"col-resize":"e-resize");var e=d.getPrevious(".column");if(!c){c=50}if(!b){b=250}if(MUI.ieLegacySupport){f.addEvents({mousedown:function(){f.setCapture()},mouseup:function(){f.releaseCapture()}})}a.resize=d.makeResizable({handle:f,modifiers:{x:"width",y:false},invert:true,limit:{x:[c,b]},onStart:function(){$(d).getElements("iframe").setStyle("visibility","hidden");e.getElements("iframe").setStyle("visibility","hidden")}.bind(this),onDrag:function(){MUI.rWidth(d.getParent())}.bind(this),onComplete:function(){MUI.rWidth(d.getParent());$(d).getElements("iframe").setStyle("visibility","visible");e.getElements("iframe").setStyle("visibility","visible");a.fireEvent("onResize")}.bind(this)})}function addResizeBottom(b){if(!$(b)){return}var b=$(b);var d=MUI.Panels.instances;var a=d.get(b.id);var c=a.handleEl;c.setStyle("cursor",(Browser.Engine.webkit||Browser.Engine.gecko)?"row-resize":"n-resize");partner=a.partner;min=0;max=function(){return b.getStyle("height").toInt()+partner.getStyle("height").toInt()}.bind(this);if(MUI.ieLegacySupport){c.addEvents({mousedown:function(){c.setCapture()},mouseup:function(){c.releaseCapture()}})}a.resize=b.makeResizable({handle:c,modifiers:{x:false,y:"height"},limit:{y:[min,max]},invert:false,onBeforeStart:function(){partner=a.partner;this.originalHeight=b.getStyle("height").toInt();this.partnerOriginalHeight=partner.getStyle("height").toInt()}.bind(this),onStart:function(){if(a.iframeEl){if(!MUI.ieLegacySupport){a.iframeEl.setStyle("visibility","hidden");partner.getElements("iframe").setStyle("visibility","hidden")}else{a.iframeEl.hide();partner.getElements("iframe").hide()}}}.bind(this),onDrag:function(){partnerHeight=partnerOriginalHeight;partnerHeight+=(this.originalHeight-b.getStyle("height").toInt());partner.setStyle("height",partnerHeight);MUI.resizeChildren(b,b.getStyle("height").toInt());MUI.resizeChildren(partner,partnerHeight);b.getChildren(".column").each(function(e){MUI.panelHeight(e)});partner.getChildren(".column").each(function(e){MUI.panelHeight(e)})}.bind(this),onComplete:function(){partnerHeight=partnerOriginalHeight;partnerHeight+=(this.originalHeight-b.getStyle("height").toInt());partner.setStyle("height",partnerHeight);MUI.resizeChildren(b,b.getStyle("height").toInt());MUI.resizeChildren(partner,partnerHeight);b.getChildren(".column").each(function(f){MUI.panelHeight(f)});partner.getChildren(".column").each(function(f){MUI.panelHeight(f)});if(a.iframeEl){if(!MUI.ieLegacySupport){a.iframeEl.setStyle("visibility","visible");partner.getElements("iframe").setStyle("visibility","visible")}else{a.iframeEl.show();partner.getElements("iframe").show();var e=a.iframeEl.getStyle("width").toInt();a.iframeEl.setStyle("width",e-1);MUI.rWidth();a.iframeEl.setStyle("width",e)}}a.fireEvent("onResize")}.bind(this)})}MUI.extend({closeColumn:function(b){var d=MUI.Columns.instances;var a=d.get(b.id);if(b!=$(b)||a.isClosing){return}a.isClosing=true;if(a.options.sortable){a.container.retrieve("sortables").removeLists(this.columnEl)}var c=b.getChildren(".panel");c.each(function(e){MUI.closePanel($(e.id))}.bind(this));if(MUI.ieLegacySupport){b.dispose();if(a.handleEl!=null){a.handleEl.dispose()}}else{b.destroy();if(a.handleEl!=null){a.handleEl.destroy()}}if(MUI.Desktop){MUI.Desktop.resizePanels()}d.erase(a.options.id);return true},closePanel:function(f){var e=MUI.Panels.instances;var a=e.get(f.id);if(f!=$(f)||a.isClosing){return}var b=a.options.column;a.isClosing=true;var c=MUI.Columns.instances;var d=c.get(b);if(d.options.sortable){d.options.container.retrieve("sortables").removeItems(a.panelWrapperEl)}a.panelWrapperEl.destroy();if(MUI.Desktop){MUI.Desktop.resizePanels()}$(b).getChildren(".panelWrapper").each(function(g){g.getElement(".panel").removeClass("bottomPanel")});$(b).getChildren(".panelWrapper").getLast().getElement(".panel").addClass("bottomPanel");e.erase(a.options.id);return true}});MUI.files[MUI.path.source+"Layout/Dock.js"]="loaded";MUI.options.extend({dockWrapper:"dockWrapper",dock:"dock"});MUI.extend({minimizeAll:function(){$$(".mocha").each(function(b){var a=b.retrieve("instance");if(!a.isMinimized&&a.options.minimizable==true){MUI.Dock.minimizeWindow(b)}}.bind(this))}});MUI.Dock={options:{useControls:true,dockPosition:"bottom",trueButtonColor:[70,245,70],enabledButtonColor:[115,153,191],disabledButtonColor:[170,170,170]},initialize:function(a){if(!MUI.Desktop){return}MUI.dockVisible=true;this.dockWrapper=$(MUI.options.dockWrapper);this.dock=$(MUI.options.dock);this.autoHideEvent=null;this.dockAutoHide=false;if(!this.dockWrapper){return}if(!this.options.useControls){if($("dockPlacement")){$("dockPlacement").setStyle("cursor","default")}if($("dockAutoHide")){$("dockAutoHide").setStyle("cursor","default")}}this.dockWrapper.setStyles({display:"block",position:"absolute",top:null,bottom:MUI.Desktop.desktopFooter?MUI.Desktop.desktopFooter.offsetHeight:0,left:0});if(this.options.useControls){this.initializeDockControls()}if($("dockLinkCheck")){this.sidebarCheck=new Element("div",{"class":"check",id:"dock_check"}).inject($("dockLinkCheck"))}this.dockSortables=new Sortables("#dockSort",{opacity:1,constrain:true,clone:false,revert:false});MUI.Desktop.setDesktopSize();if(MUI.myChain){MUI.myChain.callChain()}},initializeDockControls:function(){this.setDockColors();if(this.options.useControls){var b=new Element("canvas",{id:"dockCanvas",width:"15",height:"18"}).inject(this.dock);if(MUI.ieLegacySupport&&MUI.ieSupport=="excanvas"){G_vmlCanvasManager.initElement(b)}}var a=$("dockPlacement");var c=$("dockAutoHide");a.setProperty("title","Position Dock Top");a.addEvent("click",function(){this.moveDock()}.bind(this));c.setProperty("title","Turn Auto Hide On");c.addEvent("click",function(e){if(this.dockWrapper.getProperty("dockPosition")=="top"){return false}var d=$("dockCanvas").getContext("2d");this.dockAutoHide=!this.dockAutoHide;if(this.dockAutoHide){$("dockAutoHide").setProperty("title","Turn Auto Hide Off");MUI.circle(d,5,14,3,this.options.trueButtonColor,1);this.autoHideEvent=function(g){if(!this.dockAutoHide){return}if(!MUI.Desktop.desktopFooter){var f=this.dockWrapper.offsetHeight;if(f<25){f=25}}else{if(MUI.Desktop.desktopFooter){var f=this.dockWrapper.offsetHeight+MUI.Desktop.desktopFooter.offsetHeight;if(f<25){f=25}}}if(!MUI.Desktop.desktopFooter&&g.client.y>(document.getCoordinates().height-f)){if(!MUI.dockVisible){this.dockWrapper.show();MUI.dockVisible=true;MUI.Desktop.setDesktopSize()}}else{if(MUI.Desktop.desktopFooter&&g.client.y>(document.getCoordinates().height-f)){if(!MUI.dockVisible){this.dockWrapper.show();MUI.dockVisible=true;MUI.Desktop.setDesktopSize()}}else{if(MUI.dockVisible){this.dockWrapper.hide();MUI.dockVisible=false;MUI.Desktop.setDesktopSize()}}}}.bind(this);document.addEvent("mousemove",this.autoHideEvent)}else{$("dockAutoHide").setProperty("title","Turn Auto Hide On");MUI.circle(d,5,14,3,this.options.enabledButtonColor,1);document.removeEvent("mousemove",this.autoHideEvent)}}.bind(this));this.renderDockControls();if(this.options.dockPosition=="top"){this.moveDock()}},setDockColors:function(){var c=MUI.getCSSRule(".dockButtonEnabled");if(c&&c.style.backgroundColor){this.options.enabledButtonColor=new Color(c.style.backgroundColor)}var a=MUI.getCSSRule(".dockButtonDisabled");if(a&&a.style.backgroundColor){this.options.disabledButtonColor=new Color(a.style.backgroundColor)}var b=MUI.getCSSRule(".dockButtonTrue");if(b&&b.style.backgroundColor){this.options.trueButtonColor=new Color(b.style.backgroundColor)}},renderDockControls:function(){var a=$("dockCanvas").getContext("2d");a.clearRect(0,0,100,100);MUI.circle(a,5,4,3,this.options.enabledButtonColor,1);if(this.dockWrapper.getProperty("dockPosition")=="top"){MUI.circle(a,5,14,3,this.options.disabledButtonColor,1)}else{if(this.dockAutoHide){MUI.circle(a,5,14,3,this.options.trueButtonColor,1)}else{MUI.circle(a,5,14,3,this.options.enabledButtonColor,1)}}},moveDock:function(){var a=$("dockCanvas").getContext("2d");if(this.dockWrapper.getStyle("position")!="relative"){this.dockWrapper.setStyles({position:"relative",bottom:null});this.dockWrapper.addClass("top");MUI.Desktop.setDesktopSize();this.dockWrapper.setProperty("dockPosition","top");a.clearRect(0,0,100,100);MUI.circle(a,5,4,3,this.options.enabledButtonColor,1);MUI.circle(a,5,14,3,this.options.disabledButtonColor,1);$("dockPlacement").setProperty("title","Position Dock Bottom");$("dockAutoHide").setProperty("title","Auto Hide Disabled in Top Dock Position");this.dockAutoHide=false}else{this.dockWrapper.setStyles({position:"absolute",bottom:MUI.Desktop.desktopFooter?MUI.Desktop.desktopFooter.offsetHeight:0});this.dockWrapper.removeClass("top");MUI.Desktop.setDesktopSize();this.dockWrapper.setProperty("dockPosition","bottom");a.clearRect(0,0,100,100);MUI.circle(a,5,4,3,this.options.enabledButtonColor,1);MUI.circle(a,5,14,3,this.options.enabledButtonColor,1);$("dockPlacement").setProperty("title","Position Dock Top");$("dockAutoHide").setProperty("title","Turn Auto Hide On")}},createDockTab:function(e){var a=e.retrieve("instance");var d=new Element("div",{id:a.options.id+"_dockTab","class":"dockTab",title:b}).inject($("dockClear"),"before");d.addEvent("mousedown",function(f){new Event(f).stop();this.timeDown=$time()});d.addEvent("mouseup",function(f){this.timeUp=$time();if((this.timeUp-this.timeDown)<275){if(MUI.Windows.windowsVisible==false){MUI.toggleWindowVisibility();if(a.isMinimized==true){MUI.Dock.restoreMinimized.delay(25,MUI.Dock,e)}else{MUI.focusWindow(e)}return}if(a.isMinimized==true){MUI.Dock.restoreMinimized.delay(25,MUI.Dock,e)}else{if(a.windowEl.hasClass("isFocused")&&a.options.minimizable==true){MUI.Dock.minimizeWindow(e)}else{MUI.focusWindow(e)}var g=document.getCoordinates();if(e.getStyle("left").toInt()>g.width||e.getStyle("top").toInt()>g.height){MUI.centerWindow(e)}}}});this.dockSortables.addItems(d);var b=a.titleEl.innerHTML;var c=new Element("div",{id:a.options.id+"_dockTabText","class":"dockText"}).set("html",b.substring(0,19)+(b.length>19?"...":"")).inject($(d));if(a.options.icon!=false){}MUI.Desktop.setDesktopSize()},makeActiveTab:function(){var c=MUI.getWindowWithHighestZindex();var a=c.retrieve("instance");$$(".dockTab").removeClass("activeDockTab");if(a.isMinimized!=true){a.windowEl.addClass("isFocused");var b=$(a.options.id+"_dockTab");if(b!=null){b.addClass("activeDockTab")}}else{a.windowEl.removeClass("isFocused")}},minimizeWindow:function(b){if(b!=$(b)){return}var a=b.retrieve("instance");a.isMinimized=true;if(a.iframeEl){if(!MUI.ieLegacySupport){a.iframeEl.setStyle("visibility","hidden")}else{a.iframeEl.hide()}}a.contentBorderEl.setStyle("visibility","hidden");if(a.toolbarWrapperEl){a.toolbarWrapperEl.hide()}b.setStyle("visibility","hidden");MUI.Desktop.setDesktopSize();setTimeout(function(){b.setStyle("zIndex",1);b.removeClass("isFocused");this.makeActiveTab()}.bind(this),100);a.fireEvent("onMinimize",b)},restoreMinimized:function(b){var a=b.retrieve("instance");if(a.isMinimized==false){return}if(MUI.Windows.windowsVisible==false){MUI.toggleWindowVisibility()}MUI.Desktop.setDesktopSize();if(a.options.scrollbars==true&&!a.iframeEl){a.contentWrapperEl.setStyle("overflow","auto")}if(a.isCollapsed){MUI.collapseToggle(b)}b.setStyle("visibility","visible");a.contentBorderEl.setStyle("visibility","visible");if(a.toolbarWrapperEl){a.toolbarWrapperEl.show()}if(a.iframeEl){if(!MUI.ieLegacySupport){a.iframeEl.setStyle("visibility","visible")}else{a.iframeEl.show()}}a.isMinimized=false;MUI.focusWindow(b);a.fireEvent("onRestore",b)}};MUI.files[MUI.path.source+"Layout/Workspaces.js"]="loaded";MUI.extend({saveWorkspace:function(){this.cookie=new Hash.Cookie("mochaUIworkspaceCookie",{duration:3600});this.cookie.empty();MUI.Windows.instances.each(function(a){a.saveValues();this.cookie.set(a.options.id,{id:a.options.id,top:a.options.y,left:a.options.x,width:a.contentWrapperEl.getStyle("width").toInt(),height:a.contentWrapperEl.getStyle("height").toInt()})}.bind(this));this.cookie.save();new MUI.Window({loadMethod:"html",type:"notification",addClass:"notification",content:"Workspace saved.",closeAfter:"1400",width:200,height:40,y:53,padding:{top:10,right:12,bottom:10,left:12},shadowBlur:5,bodyBgColor:[255,255,255]})},windowUnload:function(){if($$(".mocha").length==0&&this.myChain){this.myChain.callChain()}},loadWorkspace2:function(workspaceWindows){workspaceWindows.each(function(workspaceWindow){windowFunction=eval("MUI."+workspaceWindow.id+"Window");if(windowFunction){eval("MUI."+workspaceWindow.id+"Window({width:"+workspaceWindow.width+",height:"+workspaceWindow.height+"});");var windowEl=$(workspaceWindow.id);windowEl.setStyles({top:workspaceWindow.top,left:workspaceWindow.left});var instance=windowEl.retrieve("instance");instance.contentWrapperEl.setStyles({width:workspaceWindow.width,height:workspaceWindow.height});instance.drawWindow()}}.bind(this));this.loadingWorkspace=false},loadWorkspace:function(){cookie=new Hash.Cookie("mochaUIworkspaceCookie",{duration:3600});workspaceWindows=cookie.load();if(!cookie.getKeys().length){new MUI.Window({loadMethod:"html",type:"notification",addClass:"notification",content:"You have no saved workspace.",closeAfter:"1400",width:220,height:40,y:25,padding:{top:10,right:12,bottom:10,left:12},shadowBlur:5,bodyBgColor:[255,255,255]});return}if($$(".mocha").length!=0){this.loadingWorkspace=true;this.myChain=new Chain();this.myChain.chain(function(){$$(".mocha").each(function(a){this.closeWindow(a)}.bind(this))}.bind(this),function(){this.loadWorkspace2(workspaceWindows)}.bind(this));this.myChain.callChain()}else{this.loadWorkspace2(workspaceWindows)}}}); \ No newline at end of file diff --git a/src/webui/www/private/scripts/lib/mocha-0.9.6.js b/src/webui/www/private/scripts/lib/mocha-0.9.6.js index 669d80f83..0373992a5 100644 --- a/src/webui/www/private/scripts/lib/mocha-0.9.6.js +++ b/src/webui/www/private/scripts/lib/mocha-0.9.6.js @@ -1625,7 +1625,7 @@ MUI.Window = new Class({ // Fix a mouseover issue with gauges in IE7 if ( MUI.ieLegacySupport && options.shape == 'gauge') { - this.windowEl.setStyle('backgroundImage', 'url(../images/skin/spacer.gif)'); + this.windowEl.setStyle('backgroundImage', 'url(../images/spacer.gif)'); } if (options.loadMethod == 'iframe') { diff --git a/src/webui/www/private/views/about.html b/src/webui/www/private/views/about.html index 55483857f..2c8c8adc6 100644 --- a/src/webui/www/private/views/about.html +++ b/src/webui/www/private/views/about.html @@ -1,5 +1,5 @@
        - qBittorrent Mascot + qBittorrent Mascot

        QBT_TR(An advanced BitTorrent client programmed in C++, based on Qt toolkit and libtorrent-rasterbar.)QBT_TR[CONTEXT=AboutDialog]

        Copyright (c) 2011-2020 The qBittorrent project

        diff --git a/src/webui/www/private/views/filters.html b/src/webui/www/private/views/filters.html index 0dd068b82..6702cfb0a 100644 --- a/src/webui/www/private/views/filters.html +++ b/src/webui/www/private/views/filters.html @@ -1,39 +1,39 @@
        - QBT_TR(Status)QBT_TR[CONTEXT=TransferListFiltersWidget] + QBT_TR(Status)QBT_TR[CONTEXT=TransferListFiltersWidget]
        - QBT_TR(Categories)QBT_TR[CONTEXT=TransferListFiltersWidget] + QBT_TR(Categories)QBT_TR[CONTEXT=TransferListFiltersWidget]
        - QBT_TR(Tags)QBT_TR[CONTEXT=TransferListFiltersWidget] + QBT_TR(Tags)QBT_TR[CONTEXT=TransferListFiltersWidget]
        - QBT_TR(Trackers)QBT_TR[CONTEXT=TransferListFiltersWidget] + QBT_TR(Trackers)QBT_TR[CONTEXT=TransferListFiltersWidget]
        diff --git a/src/webui/www/private/views/preferences.html b/src/webui/www/private/views/preferences.html index 41c9a80de..5d4e4bc95 100644 --- a/src/webui/www/private/views/preferences.html +++ b/src/webui/www/private/views/preferences.html @@ -134,7 +134,7 @@ - Add + Add
        diff --git a/src/webui/www/private/views/search.html b/src/webui/www/private/views/search.html index 5f31bc14b..6cf1e6d89 100644 --- a/src/webui/www/private/views/search.html +++ b/src/webui/www/private/views/search.html @@ -3,7 +3,7 @@ width: 300px; line-height: 2em; padding: 1px 5px 1px 2em; - background-image: url("images/qbt-theme/edit-find.svg"); + background-image: url("images/edit-find.svg"); background-repeat: no-repeat; background-size: 1.5em; background-position: left; @@ -109,7 +109,7 @@ - QBT_TR(Warning)QBT_TR[CONTEXT=SearchEngineWidget] + QBT_TR(Warning)QBT_TR[CONTEXT=SearchEngineWidget]
        QBT_TR(Seeds:)QBT_TR[CONTEXT=SearchEngineWidget] @@ -167,14 +167,14 @@
        diff --git a/src/webui/www/private/views/searchplugins.html b/src/webui/www/private/views/searchplugins.html index 4649a2e13..aa462a68f 100644 --- a/src/webui/www/private/views/searchplugins.html +++ b/src/webui/www/private/views/searchplugins.html @@ -72,8 +72,8 @@