diff --git a/Changelog b/Changelog index 0d3e645e5..a20e04a32 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,14 @@ -* Unknown - Christophe Dumez - v1.1.4 +* Sun Sept 14 2008 - Christophe Dumez - v1.1.4 + - FEATURE: DHT is no longer used as fallback only + - FEATURE: Ported WebUI to Mootools v1.2 - BUGFIX: Fixed 'start seeding after torrent creation' feature - BUGFIX: Fixed compilation with boost v1.36 + - BUGFIX: Some code optimization + - BUGFIX: Fixed memory leak in Web UI + - BUGFIX: Fixed problems with column sorting + - BUGFIX: Improved code for pausing torrents on startup + - BUGFIX: Torrent addition dialog is now disabled for downloads from WebUI + - BUGFIX: Give focus to input field in WebUI download dialog * Tue Aug 26 2008 - Christophe Dumez - v1.1.3 - BUGFIX: Fixed ratio saving for seeding torrents diff --git a/src/FinishedTorrents.cpp b/src/FinishedTorrents.cpp index 47cfb6de9..b7cafd968 100644 --- a/src/FinishedTorrents.cpp +++ b/src/FinishedTorrents.cpp @@ -55,7 +55,7 @@ FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession) : par // Make download list header clickable for sorting finishedList->header()->setClickable(true); finishedList->header()->setSortIndicatorShown(true); - connect(finishedList->header(), SIGNAL(sectionPressed(int)), this, SLOT(sortFinishedList(int))); + connect(finishedList->header(), SIGNAL(sectionPressed(int)), this, SLOT(toggleFinishedListSortOrder(int))); finishedListDelegate = new FinishedListDelegate(finishedList); finishedList->setItemDelegate(finishedListDelegate); connect(finishedList, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayFinishedListMenu(const QPoint&))); @@ -123,6 +123,7 @@ void FinishedTorrents::addTorrent(QString hash){ // Update the number of finished torrents ++nbFinished; emit finishedTorrentsNumberChanged(nbFinished); + sortFinishedList(); } void FinishedTorrents::torrentAdded(QString, QTorrentHandle& h, bool) { @@ -174,10 +175,27 @@ bool FinishedTorrents::loadColWidthFinishedList(){ for(unsigned int i=0; iheader()->resizeSection(i, width_list.at(i).toInt()); } + loadLastSortedColumn(); qDebug("Finished list columns width loaded"); return true; } +void FinishedTorrents::loadLastSortedColumn() { + // Loading last sorted column + QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); + QString sortedCol = settings.value(QString::fromUtf8("FinishedListSortedCol"), QString()).toString(); + if(!sortedCol.isEmpty()) { + Qt::SortOrder sortOrder; + if(sortedCol.endsWith(QString::fromUtf8("d"))) + sortOrder = Qt::DescendingOrder; + else + sortOrder = Qt::AscendingOrder; + sortedCol = sortedCol.left(sortedCol.size()-1); + int index = sortedCol.toInt(); + sortFinishedList(index, sortOrder); + } +} + // Save columns width in a file to remember them // (finished list) void FinishedTorrents::saveColWidthFinishedList() const{ @@ -238,9 +256,6 @@ void FinishedTorrents::updateFinishedList(){ } Q_ASSERT(row != -1); if(h.is_paused()) continue; - if(BTSession->getTorrentsToPauseAfterChecking().indexOf(hash) != -1) { - continue; - } if(h.state() == torrent_status::downloading || (h.state() != torrent_status::checking_files && h.state() != torrent_status::queued_for_checking && h.progress() < 1.)) { // What are you doing here? go back to download tab! int reponse = QMessageBox::question(this, tr("Incomplete torrent in seeding list"), tr("It appears that the state of '%1' torrent changed from 'seeding' to 'downloading'. Would you like to move it back to download list? (otherwise the torrent will simply be deleted)").arg(h.name()), QMessageBox::Yes | QMessageBox::No); @@ -535,17 +550,36 @@ QAction* FinishedTorrents::getActionHoSCol(int index) { * Sorting functions */ -void FinishedTorrents::sortFinishedList(int index){ - static Qt::SortOrder sortOrder = Qt::AscendingOrder; +void FinishedTorrents::toggleFinishedListSortOrder(int index) { + Qt::SortOrder sortOrder = Qt::AscendingOrder; if(finishedList->header()->sortIndicatorSection() == index){ - if(sortOrder == Qt::AscendingOrder){ - sortOrder = Qt::DescendingOrder; - }else{ - sortOrder = Qt::AscendingOrder; - } + sortOrder = (Qt::SortOrder)!(bool)finishedList->header()->sortIndicatorOrder(); } - finishedList->header()->setSortIndicator(index, sortOrder); - switch(index){ + switch(index) { + case F_SIZE: + case F_UPSPEED: + sortFinishedListFloat(index, sortOrder); + break; + default: + sortFinishedListString(index, sortOrder); + } + QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); + QString sortOrderLetter; + if(sortOrder == Qt::AscendingOrder) + sortOrderLetter = QString::fromUtf8("a"); + else + sortOrderLetter = QString::fromUtf8("d"); + settings.setValue(QString::fromUtf8("FinishedListSortedCol"), misc::toQString(index)+sortOrderLetter); +} + +void FinishedTorrents::sortFinishedList(int index, Qt::SortOrder sortOrder){ + if(index == -1) { + index = finishedList->header()->sortIndicatorSection(); + sortOrder = finishedList->header()->sortIndicatorOrder(); + } else { + finishedList->header()->setSortIndicator(index, sortOrder); + } + switch(index) { case F_SIZE: case F_UPSPEED: sortFinishedListFloat(index, sortOrder); diff --git a/src/FinishedTorrents.h b/src/FinishedTorrents.h index 52d528b1d..943a99a78 100644 --- a/src/FinishedTorrents.h +++ b/src/FinishedTorrents.h @@ -60,7 +60,9 @@ class FinishedTorrents : public QWidget, public Ui::seeding { void displayFinishedHoSMenu(const QPoint&); void setRowColor(int row, QString color); void saveColWidthFinishedList() const; - void sortFinishedList(int index); + void loadLastSortedColumn(); + void toggleFinishedListSortOrder(int index); + void sortFinishedList(int index=-1, Qt::SortOrder sortOrder=Qt::AscendingOrder); void sortFinishedListFloat(int index, Qt::SortOrder sortOrder); void sortFinishedListString(int index, Qt::SortOrder sortOrder); void updateFileSize(QString hash); diff --git a/src/GUI.cpp b/src/GUI.cpp index 067cc304a..0df54eb2c 100644 --- a/src/GUI.cpp +++ b/src/GUI.cpp @@ -32,14 +32,13 @@ #include #include #endif - +#include #include #include #include #include #include "GUI.h" -#include "httpserver.h" #include "downloadingTorrents.h" #include "misc.h" #include "createtorrent_imp.h" @@ -54,7 +53,7 @@ #include "options_imp.h" #include "previewSelect.h" #include "allocationDlg.h" -#include "stdlib.h" +#include "httpserver.h" using namespace libtorrent; @@ -125,7 +124,6 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis BTSession = new bittorrent(); connect(BTSession, SIGNAL(fullDiskError(QTorrentHandle&)), this, SLOT(fullDiskError(QTorrentHandle&))); connect(BTSession, SIGNAL(finishedTorrent(QTorrentHandle&)), this, SLOT(finishedTorrent(QTorrentHandle&))); - connect(BTSession, SIGNAL(torrentFinishedChecking(QString)), this, SLOT(torrentChecked(QString))); connect(BTSession, SIGNAL(trackerAuthenticationRequired(QTorrentHandle&)), this, SLOT(trackerAuthenticationRequired(QTorrentHandle&))); connect(BTSession, SIGNAL(scanDirFoundTorrents(const QStringList&)), this, SLOT(processScannedFiles(const QStringList&))); connect(BTSession, SIGNAL(newDownloadedTorrent(QString, QString)), this, SLOT(processDownloadedFiles(QString, QString))); @@ -293,27 +291,6 @@ void GUI::writeSettings() { settings.endGroup(); } -// Called when a torrent finished checking -void GUI::torrentChecked(QString hash) const { - // Check if the torrent was paused after checking - if(BTSession->isPaused(hash)) { - // Was paused, change its icon/color - if(BTSession->isFinished(hash)) { - // In finished list - qDebug("Automatically paused torrent was in finished list"); - finishedTorrentTab->pauseTorrent(hash); - }else{ - // In download list - downloadingTorrentTab->pauseTorrent(hash); - } - } - if(!BTSession->isFinished(hash)){ - // Delayed Sorting - downloadingTorrentTab->updateFileSizeAndProgress(hash); - downloadingTorrentTab->sortProgressColumnDelayed(); - } -} - // called when a torrent has finished void GUI::finishedTorrent(QTorrentHandle& h) const { qDebug("In GUI, a torrent has finished"); @@ -425,7 +402,7 @@ void GUI::acceptConnection() { } void GUI::readParamsOnSocket() { - if(clientConnection != 0) { + if(clientConnection) { QByteArray params = clientConnection->readAll(); if(!params.isEmpty()) { processParams(QString::fromUtf8(params.data()).split(QString::fromUtf8("\n"))); @@ -999,6 +976,7 @@ void GUI::configureSession(bool deleteOptions) { sessionSettings.user_agent = "qBittorrent "VERSION; } sessionSettings.upnp_ignore_nonrouters = true; + sessionSettings.use_dht_as_fallback = false; BTSession->setSessionSettings(sessionSettings); // Bittorrent // * Max connections limit @@ -1369,7 +1347,6 @@ void GUI::createSystrayDelayed() { createTrayIcon(); systrayIntegration = true; delete systrayCreator; - systrayCreator = 0; } else { if(timeout) { // Retry a bit later @@ -1379,7 +1356,6 @@ void GUI::createSystrayDelayed() { // Timed out, apparently system really does not // support systray icon delete systrayCreator; - systrayCreator = 0; } } } @@ -1444,7 +1420,6 @@ void GUI::OptionsSaved(QString info, bool deleteOptions) { else if(httpServer) { delete httpServer; - httpServer = 0; } // Update session configureSession(deleteOptions); @@ -1453,11 +1428,9 @@ void GUI::OptionsSaved(QString info, bool deleteOptions) { bool GUI::initWebUi(QString username, QString password, int port) { if(httpServer) - { httpServer->close(); - } else - httpServer = new HttpServer(BTSession, 500, this); + httpServer = new HttpServer(BTSession, 1000, this); httpServer->setAuthorization(username, password); bool success = httpServer->listen(QHostAddress::Any, port); if (success) diff --git a/src/GUI.h b/src/GUI.h index 41e482b85..c67456a65 100644 --- a/src/GUI.h +++ b/src/GUI.h @@ -24,7 +24,7 @@ #include #include - +#include #include "ui_MainWindow.h" #include "qtorrenthandle.h" @@ -65,7 +65,7 @@ class GUI : public QMainWindow, private Ui::MainWindow{ QTabWidget *tabs; options_imp *options; QSystemTrayIcon *myTrayIcon; - QTimer *systrayCreator; + QPointer systrayCreator; QMenu *myTrayIconMenu; DownloadingTorrents *downloadingTorrentTab; FinishedTorrents *finishedTorrentTab; @@ -86,7 +86,7 @@ class GUI : public QMainWindow, private Ui::MainWindow{ // RSS RSSImp *rssWidget; // Web UI - HttpServer *httpServer; + QPointer httpServer; // Misc #ifdef QT_4_4 QLocalServer *localServer; @@ -150,7 +150,6 @@ class GUI : public QMainWindow, private Ui::MainWindow{ void deleteTorrent(QString hash); void deleteRatioTorrent(QString fileName); void finishedTorrent(QTorrentHandle& h) const; - void torrentChecked(QString hash) const; void updateLists(); bool initWebUi(QString username, QString password, int port); void pauseTorrent(QString hash); diff --git a/src/Icons/qBittorrent.desktop b/src/Icons/qBittorrent.desktop index f65263404..f90badaf2 100644 --- a/src/Icons/qBittorrent.desktop +++ b/src/Icons/qBittorrent.desktop @@ -1,6 +1,6 @@ [Desktop Entry] Categories=Qt;Network;P2P -Comment=V1.1.1 +Comment=V1.1.4 Exec=qbittorrent %f GenericName=Bittorrent client GenericName[bg]=Торент клиент diff --git a/src/Icons/splash.png b/src/Icons/splash.png index 2803bc0e8..1084b9689 100644 Binary files a/src/Icons/splash.png and b/src/Icons/splash.png differ diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index 2c17340d1..03bbbbab5 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -93,9 +93,9 @@ bittorrent::~bittorrent() { delete deleter; delete fastResumeSaver; delete timerAlerts; - if(BigRatioTimer != 0) + if(BigRatioTimer) delete BigRatioTimer; - if(filterParser != 0) + if(filterParser) delete filterParser; delete downloader; // Delete BT session @@ -206,8 +206,6 @@ bool bittorrent::isPaused(QString hash) const{ qDebug("/!\\ Error: Invalid handle"); return true; } - if(torrentsToPauseAfterChecking.contains(hash)) - return true; return h.is_paused(); } @@ -380,11 +378,6 @@ bool bittorrent::resumeTorrent(QString hash) { // Delete .paused file if(QFile::exists(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".paused")) QFile::remove(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".paused"); - int index = torrentsToPauseAfterChecking.indexOf(hash); - if(index != -1) { - torrentsToPauseAfterChecking.removeAt(index); - success = true; - } return success; } @@ -432,7 +425,7 @@ void bittorrent::loadWebSeeds(QString hash) { } // Add a torrent to the bittorrent session -void bittorrent::addTorrent(QString path, bool fromScanDir, QString from_url, bool resumed) { +void bittorrent::addTorrent(QString path, bool fromScanDir, QString from_url, bool) { QTorrentHandle h; entry resume_data; bool fastResume=false; @@ -543,18 +536,15 @@ void bittorrent::addTorrent(QString path, bool fromScanDir, QString from_url, bo // Copy it to torrentBackup directory QFile::copy(file, newFile); } - // Pause torrent if it was paused last time - if((!resumed && addInPause) || QFile::exists(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".paused")) { - torrentsToPauseAfterChecking << hash; - qDebug("Adding a torrent to the torrentsToPauseAfterChecking list"); - } // Incremental download if(QFile::exists(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".incremental")) { qDebug("Incremental download enabled for %s", t->name().c_str()); h.set_sequenced_download_threshold(1); } - // Start torrent because it was added in paused state - h.resume(); + if(!addInPause && !QFile::exists(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".paused")) { + // Start torrent because it was added in paused state + h.resume(); + } if(QFile::exists(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".finished")) { finishedTorrents << hash; }else{ @@ -865,6 +855,14 @@ void bittorrent::loadDownloadUploadForTorrent(QString hash) { ratioData[hash] = downUp; } +float bittorrent::getUncheckedTorrentProgress(QString hash) const { + /*if(QFile::exists(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".finished")) + return 1.;*/ + QTorrentHandle h = getTorrentHandle(hash); + QPair downUpInfo = ratioData.value(hash, QPair(0,0)); + return (float)downUpInfo.first / (float)h.actual_size(); +} + float bittorrent::getRealRatio(QString hash) const{ QPair downUpInfo = ratioData.value(hash, QPair(0,0)); size_type download = downUpInfo.first; @@ -1045,7 +1043,7 @@ void bittorrent::disableDirectoryScanning() { timerScan->stop(); } } - if(timerScan != 0) + if(timerScan) delete timerScan; } @@ -1105,7 +1103,6 @@ void bittorrent::setDeleteRatio(float ratio) { } else { if(max_ratio != -1 && ratio == -1) { delete BigRatioTimer; - BigRatioTimer = 0; } } if(max_ratio != ratio) { @@ -1130,7 +1127,7 @@ bool bittorrent::loadTrackerFile(QString hash) { t.tier = parts[1].toInt(); trackers.push_back(t); } - if(trackers.size() != 0) { + if(!trackers.empty()) { QTorrentHandle h = getTorrentHandle(hash); h.replace_trackers(trackers); h.force_reannounce(); @@ -1291,18 +1288,12 @@ void bittorrent::readAlerts() { if(h.is_valid()){ QString hash = h.hash(); qDebug("%s have just finished checking", hash.toUtf8().data()); - int index = torrentsToPauseAfterChecking.indexOf(hash); - if(index != -1) { - torrentsToPauseAfterChecking.removeAt(index); - // Pause torrent - pauseTorrent(hash); - qDebug("%s was paused after checking", hash.toUtf8().data()); - } else { + if(!h.is_paused()) { // Save Addition DateTime TorrentsStartTime[hash] = QDateTime::currentDateTime(); TorrentsStartData[hash] = h.total_payload_download(); - } - emit torrentFinishedChecking(hash); + } + //emit torrentFinishedChecking(hash); } } a = s->pop_alert(); @@ -1313,10 +1304,6 @@ QHash bittorrent::getTrackersErrors(QString hash) const{ return trackersErrors.value(hash, QHash()); } -QStringList bittorrent::getTorrentsToPauseAfterChecking() const{ - return torrentsToPauseAfterChecking; -} - // Reload a torrent with full allocation mode void bittorrent::reloadTorrent(const QTorrentHandle &h, bool full_alloc) { qDebug("** Reloading a torrent"); @@ -1427,10 +1414,23 @@ void bittorrent::downloadFromUrl(QString url) { downloader->downloadUrl(url); } +void bittorrent::downloadUrlAndSkipDialog(QString url) { + emit aboutToDownloadFromUrl(url); + url_skippingDlg << url; + // Launch downloader thread + downloader->downloadUrl(url); +} + // Add to bittorrent session the downloaded torrent file void bittorrent::processDownloadedFile(QString url, QString file_path) { - // Add file to torrent download list - emit newDownloadedTorrent(file_path, url); + int index = url_skippingDlg.indexOf(url); + if(index < 0) { + // Add file to torrent download list + emit newDownloadedTorrent(file_path, url); + } else { + url_skippingDlg.removeAt(index); + addTorrent(file_path, false, url, false); + } } void bittorrent::downloadFromURLList(const QStringList& url_list) { diff --git a/src/bittorrent.h b/src/bittorrent.h index d165e07a7..fc52c4d8d 100644 --- a/src/bittorrent.h +++ b/src/bittorrent.h @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -44,14 +45,13 @@ class bittorrent : public QObject{ private: session *s; QString scan_dir; - QTimer *timerScan; + QPointer timerScan; QTimer *timerAlerts; QTimer *fastResumeSaver; - QTimer *BigRatioTimer; + QPointer BigRatioTimer; bool DHTEnabled; downloadThread *downloader; QString defaultSavePath; - QStringList torrentsToPauseAfterChecking; QHash TorrentsStartTime; QHash TorrentsStartData; QHash > ratioData; @@ -67,9 +67,10 @@ class bittorrent : public QObject{ bool UPnPEnabled; bool NATPMPEnabled; bool LSDEnabled; - FilterParserThread *filterParser; + QPointer filterParser; QString filterPath; int folderScanInterval; // in seconds + QStringList url_skippingDlg; protected: QString getSavePath(QString hash); @@ -86,7 +87,6 @@ class bittorrent : public QObject{ float getPayloadUploadRate() const; session_status getSessionStatus() const; int getListenPort() const; - QStringList getTorrentsToPauseAfterChecking() const; qlonglong getETA(QString hash) const; float getRealRatio(QString hash) const; session* getSession() const; @@ -97,6 +97,7 @@ class bittorrent : public QObject{ bool has_filtered_files(QString hash) const; unsigned int getFinishedPausedTorrentsNb() const; unsigned int getUnfinishedPausedTorrentsNb() const; + float getUncheckedTorrentProgress(QString hash) const; public slots: void addTorrent(QString path, bool fromScanDir = false, QString from_url = QString(), bool resumed = false); @@ -123,6 +124,7 @@ class bittorrent : public QObject{ void loadDownloadUploadForTorrent(QString hash); void handleDownloadFailure(QString url, QString reason); void loadWebSeeds(QString fileHash); + void downloadUrlAndSkipDialog(QString); // Session configuration - Setters void setListeningPortsRange(std::pair ports); void setMaxConnections(int maxConnec); @@ -178,7 +180,7 @@ class bittorrent : public QObject{ void downloadFromUrlFailure(QString url, QString reason); void fastResumeDataRejected(QString name); void urlSeedProblem(QString url, QString msg); - void torrentFinishedChecking(QString hash); + //void torrentFinishedChecking(QString hash); void torrent_ratio_deleted(QString fileName); void UPnPError(QString msg); void UPnPSuccess(QString msg); diff --git a/src/deleteThread.h b/src/deleteThread.h index 37e990082..02242fa3b 100644 --- a/src/deleteThread.h +++ b/src/deleteThread.h @@ -35,27 +35,30 @@ class subDeleteThread : public QThread { private: QString save_path; arborescence *arb; - bool abort; public: - subDeleteThread(QObject *parent, QString saveDir, arborescence *arb) : QThread(parent), save_path(saveDir), arb(arb), abort(false){} + subDeleteThread(QObject *parent, QString saveDir, arborescence *_arb) : QThread(parent), save_path(saveDir) { + arb = _arb; + } ~subDeleteThread(){ - abort = true; - wait(); + qDebug("subDeleteThread successfuly deleted"); + //wait(); } signals: // For subthreads void deletionSuccessST(subDeleteThread* st); - void deletionFailureST(subDeleteThread* st); + //void deletionFailureST(subDeleteThread* st); protected: void run(){ - if(arb->removeFromFS(save_path)) + /*if(arb->removeFromFS(save_path)) emit deletionSuccessST(this); else - emit deletionFailureST(this); + emit deletionFailureST(this);*/ + arb->removeFromFS(save_path); + emit deletionSuccessST(this); delete arb; } }; @@ -99,13 +102,13 @@ class deleteThread : public QThread { if(abort) return; mutex.lock(); - if(torrents_list.size() != 0){ + if(!torrents_list.empty()){ QPair torrent = torrents_list.takeFirst(); mutex.unlock(); subDeleteThread *st = new subDeleteThread(0, torrent.first, torrent.second); subThreads << st; connect(st, SIGNAL(deletionSuccessST(subDeleteThread*)), this, SLOT(deleteSubThread(subDeleteThread*))); - connect(st, SIGNAL(deletionFailureST(subDeleteThread*)), this, SLOT(deleteSubThread(subDeleteThread*))); + //connect(st, SIGNAL(deletionFailureST(subDeleteThread*)), this, SLOT(deleteSubThread(subDeleteThread*))); st->start(); }else{ condition.wait(&mutex); diff --git a/src/downloadingTorrents.cpp b/src/downloadingTorrents.cpp index 36f7b7c79..1b77bcc0a 100644 --- a/src/downloadingTorrents.cpp +++ b/src/downloadingTorrents.cpp @@ -33,7 +33,7 @@ #include #include -DownloadingTorrents::DownloadingTorrents(QObject *parent, bittorrent *BTSession) : parent(parent), BTSession(BTSession), delayedSorting(false), nbTorrents(0) { +DownloadingTorrents::DownloadingTorrents(QObject *parent, bittorrent *BTSession) : parent(parent), BTSession(BTSession), nbTorrents(0) { setupUi(this); // Setting icons actionStart->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/play.png"))); @@ -85,7 +85,7 @@ DownloadingTorrents::DownloadingTorrents(QObject *parent, bittorrent *BTSession) downloadList->header()->setSortIndicatorShown(true); // Connecting Actions to slots connect(downloadList, SIGNAL(doubleClicked(const QModelIndex&)), this, SLOT(notifyTorrentDoubleClicked(const QModelIndex&))); - connect(downloadList->header(), SIGNAL(sectionPressed(int)), this, SLOT(sortDownloadList(int))); + connect(downloadList->header(), SIGNAL(sectionPressed(int)), this, SLOT(toggleDownloadListSortOrder(int))); connect(downloadList, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayDLListMenu(const QPoint&))); downloadList->header()->setContextMenuPolicy(Qt::CustomContextMenu); connect(downloadList->header(), SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayDLHoSMenu(const QPoint&))); @@ -153,7 +153,7 @@ void DownloadingTorrents::pauseTorrent(QString hash) { DLListModel->setData(DLListModel->index(row, NAME), QIcon(QString::fromUtf8(":/Icons/skin/paused.png")), Qt::DecorationRole); DLListModel->setData(DLListModel->index(row, SEEDSLEECH), QVariant(QString::fromUtf8("0/0"))); QTorrentHandle h = BTSession->getTorrentHandle(hash); - DLListModel->setData(DLListModel->index(row, PROGRESS), QVariant((double)h.progress())); + //DLListModel->setData(DLListModel->index(row, PROGRESS), QVariant((double)h.progress())); setRowColor(row, QString::fromUtf8("red")); } @@ -496,13 +496,6 @@ void DownloadingTorrents::displayInfoBarMenu(const QPoint& pos) { myLogMenu.exec(mapToGlobal(pos)+QPoint(44,305)); } -void DownloadingTorrents::sortProgressColumnDelayed() { - if(delayedSorting) { - sortDownloadListFloat(PROGRESS, delayedSortingOrder); - qDebug("Delayed sorting of progress column"); - } -} - // get information from torrent handles and // update download list accordingly void DownloadingTorrents::updateDlList() { @@ -526,12 +519,6 @@ void DownloadingTorrents::updateDlList() { Q_ASSERT(row != -1); // No need to update a paused torrent if(h.is_paused()) continue; - if(BTSession->getTorrentsToPauseAfterChecking().indexOf(hash) != -1) { - if(!downloadList->isColumnHidden(PROGRESS)) { - DLListModel->setData(DLListModel->index(row, PROGRESS), QVariant((double)h.progress())); - } - continue; - } // Parse download state // Setting download state switch(h.state()) { @@ -636,6 +623,7 @@ void DownloadingTorrents::addTorrent(QString hash) { DLListModel->setData(DLListModel->index(row, HASH), QVariant(hash)); // Pause torrent if it was paused last time if(BTSession->isPaused(hash)) { + DLListModel->setData(DLListModel->index(row, PROGRESS), QVariant((double)BTSession->getUncheckedTorrentProgress(hash))); DLListModel->setData(DLListModel->index(row, NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/skin/paused.png"))), Qt::DecorationRole); setRowColor(row, QString::fromUtf8("red")); }else{ @@ -644,6 +632,7 @@ void DownloadingTorrents::addTorrent(QString hash) { } ++nbTorrents; emit unfinishedTorrentsNumberChanged(nbTorrents); + sortDownloadList(); } void DownloadingTorrents::sortDownloadListFloat(int index, Qt::SortOrder sortOrder) { @@ -692,27 +681,36 @@ void DownloadingTorrents::sortDownloadListString(int index, Qt::SortOrder sortOr DLListModel->removeRows(0, nbRows_old); } -void DownloadingTorrents::sortDownloadList(int index, Qt::SortOrder startSortOrder, bool fromLoadColWidth) { - qDebug("Called sort download list"); - static Qt::SortOrder sortOrder = startSortOrder; - if(!fromLoadColWidth && downloadList->header()->sortIndicatorSection() == index) { - if(sortOrder == Qt::AscendingOrder) { - sortOrder = Qt::DescendingOrder; - }else{ - sortOrder = Qt::AscendingOrder; - } +void DownloadingTorrents::toggleDownloadListSortOrder(int index) { + Qt::SortOrder sortOrder = Qt::AscendingOrder; + qDebug("Toggling column sort order"); + if(downloadList->header()->sortIndicatorSection() == index) { + sortOrder = (Qt::SortOrder)!(bool)downloadList->header()->sortIndicatorOrder(); } + switch(index) { + case SIZE: + case ETA: + case UPSPEED: + case DLSPEED: + case PROGRESS: + sortDownloadListFloat(index, sortOrder); + break; + default: + sortDownloadListString(index, sortOrder); + } + QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); QString sortOrderLetter; if(sortOrder == Qt::AscendingOrder) sortOrderLetter = QString::fromUtf8("a"); else sortOrderLetter = QString::fromUtf8("d"); - if(fromLoadColWidth) { - // XXX: Why is this needed? - if(sortOrder == Qt::DescendingOrder) - downloadList->header()->setSortIndicator(index, Qt::AscendingOrder); - else - downloadList->header()->setSortIndicator(index, Qt::DescendingOrder); + settings.setValue(QString::fromUtf8("DownloadListSortedCol"), misc::toQString(index)+sortOrderLetter); +} + +void DownloadingTorrents::sortDownloadList(int index, Qt::SortOrder sortOrder) { + if(index == -1) { + index = downloadList->header()->sortIndicatorSection(); + sortOrder = downloadList->header()->sortIndicatorOrder(); } else { downloadList->header()->setSortIndicator(index, sortOrder); } @@ -721,23 +719,12 @@ void DownloadingTorrents::sortDownloadList(int index, Qt::SortOrder startSortOrd case ETA: case UPSPEED: case DLSPEED: - sortDownloadListFloat(index, sortOrder); - break; case PROGRESS: - if(fromLoadColWidth) { - // Progress sorting must be delayed until files are checked (on startup) - delayedSorting = true; - qDebug("Delayed sorting of the progress column"); - delayedSortingOrder = sortOrder; - }else{ - sortDownloadListFloat(index, sortOrder); - } + sortDownloadListFloat(index, sortOrder); break; default: sortDownloadListString(index, sortOrder); } - QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); - settings.setValue(QString::fromUtf8("DownloadListSortedCol"), misc::toQString(index)+sortOrderLetter); } // Save columns width in a file to remember them @@ -786,7 +773,14 @@ bool DownloadingTorrents::loadColWidthDLList() { for(unsigned int i=0; iheader()->resizeSection(i, width_list.at(i).toInt()); } + loadLastSortedColumn(); + qDebug("Download list columns width loaded"); + return true; +} + +void DownloadingTorrents::loadLastSortedColumn() { // Loading last sorted column + QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); QString sortedCol = settings.value(QString::fromUtf8("DownloadListSortedCol"), QString()).toString(); if(!sortedCol.isEmpty()) { Qt::SortOrder sortOrder; @@ -796,10 +790,8 @@ bool DownloadingTorrents::loadColWidthDLList() { sortOrder = Qt::AscendingOrder; sortedCol = sortedCol.left(sortedCol.size()-1); int index = sortedCol.toInt(); - sortDownloadList(index, sortOrder, true); + sortDownloadList(index, sortOrder); } - qDebug("Download list columns width loaded"); - return true; } // Called when a torrent is added @@ -822,6 +814,7 @@ void DownloadingTorrents::torrentAdded(QString path, QTorrentHandle& h, bool fas // Pause torrent if it was paused last time // Not using isPaused function because torrents are paused after checking now if(QFile::exists(misc::qBittorrentPath()+QString::fromUtf8("BT_backup")+QDir::separator()+hash+QString::fromUtf8(".paused"))) { + DLListModel->setData(DLListModel->index(row, PROGRESS), QVariant((double)BTSession->getUncheckedTorrentProgress(hash))); DLListModel->setData(DLListModel->index(row, NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/skin/paused.png"))), Qt::DecorationRole); setRowColor(row, QString::fromUtf8("red")); }else{ @@ -835,6 +828,7 @@ void DownloadingTorrents::torrentAdded(QString path, QTorrentHandle& h, bool fas } ++nbTorrents; emit unfinishedTorrentsNumberChanged(nbTorrents); + sortDownloadList(); } // Called when trying to add a duplicate torrent @@ -852,7 +846,7 @@ void DownloadingTorrents::updateFileSizeAndProgress(QString hash) { Q_ASSERT(row != -1); QTorrentHandle h = BTSession->getTorrentHandle(hash); DLListModel->setData(DLListModel->index(row, SIZE), QVariant((qlonglong)h.actual_size())); - DLListModel->setData(DLListModel->index(row, PROGRESS), QVariant((double)h.progress())); + //DLListModel->setData(DLListModel->index(row, PROGRESS), QVariant((double)h.progress())); } // Called when we couldn't listen on any port diff --git a/src/downloadingTorrents.h b/src/downloadingTorrents.h index 58b5ce0ad..51e502d60 100644 --- a/src/downloadingTorrents.h +++ b/src/downloadingTorrents.h @@ -38,9 +38,7 @@ class DownloadingTorrents : public QWidget, public Ui::downloading{ bittorrent *BTSession; DLListDelegate *DLDelegate; QStandardItemModel *DLListModel; - bool delayedSorting; unsigned int nbTorrents; - Qt::SortOrder delayedSortingOrder; void hideOrShowColumn(int index); bool loadHiddenColumns(); void saveHiddenColumns(); @@ -73,7 +71,8 @@ class DownloadingTorrents : public QWidget, public Ui::downloading{ void on_actionClearLog_triggered(); void displayInfoBarMenu(const QPoint& pos); void addTorrent(QString hash); - void sortDownloadList(int index, Qt::SortOrder startSortOrder=Qt::AscendingOrder, bool fromLoadColWidth=false); + void sortDownloadList(int index=-1, Qt::SortOrder startSortOrder=Qt::AscendingOrder); + void toggleDownloadListSortOrder(int index); void sortDownloadListFloat(int index, Qt::SortOrder sortOrder); void sortDownloadListString(int index, Qt::SortOrder sortOrder); void saveColWidthDLList() const; @@ -94,6 +93,7 @@ class DownloadingTorrents : public QWidget, public Ui::downloading{ void hideOrShowColumnEta(); void displayUPnPError(QString msg); void displayUPnPSuccess(QString msg); + void loadLastSortedColumn(); public slots: void updateDlList(); @@ -103,7 +103,6 @@ class DownloadingTorrents : public QWidget, public Ui::downloading{ void deleteTorrent(QString hash); void setBottomTabEnabled(unsigned int index, bool b); void propertiesSelection(); - void sortProgressColumnDelayed(); void updateFileSizeAndProgress(QString hash); void showPropertiesFromHash(QString hash); diff --git a/src/eventmanager.cpp b/src/eventmanager.cpp index 867b8115d..da42f4788 100644 --- a/src/eventmanager.cpp +++ b/src/eventmanager.cpp @@ -31,11 +31,11 @@ EventManager::EventManager(QObject *parent) void EventManager::update(QVariantMap event) { - revision++; + ++revision; events << QPair(revision, event); emit updated(); - qDebug("Added the following event"); - qDebug() << event; + //qDebug("Added the following event"); + //qDebug() << event; /* QLinkedList >::iterator i; for (i = events.begin(); i != events.end(); i++) qDebug() << *i;*/ diff --git a/src/httpconnection.cpp b/src/httpconnection.cpp index 06b11b194..810a19fc4 100644 --- a/src/httpconnection.cpp +++ b/src/httpconnection.cpp @@ -42,14 +42,24 @@ HttpConnection::HttpConnection(QTcpSocket *socket, HttpServer *parent) HttpConnection::~HttpConnection() { + delete socket; +} + +void HttpConnection::processDownloadedFile(QString url, QString file_path) { + qDebug("URL %s successfully downloaded !", (const char*)url.toUtf8()); + emit torrentReadyToBeDownloaded(file_path, false, url, false); +} + +void HttpConnection::handleDownloadFailure(QString url, QString reason) { + std::cerr << "Could not download " << (const char*)url.toUtf8() << ", reason: " << (const char*)reason.toUtf8() << "\n"; } void HttpConnection::read() { QByteArray input = socket->readAll(); - qDebug(" -------"); + /*qDebug(" -------"); qDebug("|REQUEST|"); - qDebug(" -------"); + qDebug(" -------"); */ //qDebug("%s", input.toAscii().constData()); if(input.size() > 100000) { qDebug("Request too big"); @@ -81,7 +91,7 @@ void HttpConnection::write() void HttpConnection::respond() { - qDebug("Respond called"); + //qDebug("Respond called"); QStringList auth = parser.value("Authorization").split(" ", QString::SkipEmptyParts); if (auth.size() != 2 || QString::compare(auth[0], "Basic", Qt::CaseInsensitive) != 0 || !parent->isAuthorized(auth[1].toUtf8())) { @@ -172,16 +182,13 @@ void HttpConnection::respondCommand(QString command) { QString urls = parser.post("urls"); QStringList list = urls.split('\n'); - QStringList url_list_cleaned; foreach(QString url, list){ url = url.trimmed(); if(!url.isEmpty()){ - if(url_list_cleaned.indexOf(QRegExp(url, Qt::CaseInsensitive, QRegExp::FixedString)) < 0){ - url_list_cleaned << url; - } + qDebug("Downloading url: %s", (const char*)url.toUtf8()); + emit UrlReadyToBeDownloaded(url); } } - emit urlsReadyToBeDownloaded(url_list_cleaned); return; } if(command == "upload") diff --git a/src/httpconnection.h b/src/httpconnection.h index a6ef630df..c43f07807 100644 --- a/src/httpconnection.h +++ b/src/httpconnection.h @@ -27,7 +27,6 @@ #include class QTcpSocket; - class HttpServer; class HttpConnection : public QObject @@ -47,6 +46,8 @@ class HttpConnection : public QObject void respondJson(); void respondCommand(QString command); void respondNotFound(); + void processDownloadedFile(QString, QString); + void handleDownloadFailure(QString, QString); public: HttpConnection(QTcpSocket *socket, HttpServer *parent); @@ -56,7 +57,7 @@ class HttpConnection : public QObject void read(); signals: - void urlsReadyToBeDownloaded(const QStringList&); + void UrlReadyToBeDownloaded(QString url); void torrentReadyToBeDownloaded(QString, bool, QString, bool); void deleteTorrent(QString hash); void resumeTorrent(QString hash); diff --git a/src/httpresponsegenerator.cpp b/src/httpresponsegenerator.cpp index f139f1bc7..c6b20eec1 100644 --- a/src/httpresponsegenerator.cpp +++ b/src/httpresponsegenerator.cpp @@ -20,7 +20,6 @@ #include "httpresponsegenerator.h" -#include void HttpResponseGenerator::setMessage(const QByteArray message) { diff --git a/src/httpserver.cpp b/src/httpserver.cpp index 38d7e650e..c19774d27 100644 --- a/src/httpserver.cpp +++ b/src/httpserver.cpp @@ -32,25 +32,28 @@ HttpServer::HttpServer(bittorrent *BTSession, int msec, QObject* parent) : QTcpS HttpServer::BTSession = BTSession; manager = new EventManager(this); //add torrents - QStringList list = BTSession->getUnfinishedTorrents() + BTSession->getFinishedTorrents(); - QString hash; - foreach(hash, list) - { + QStringList list = BTSession->getUnfinishedTorrents(); + foreach(QString hash, list) { QTorrentHandle h = BTSession->getTorrentHandle(hash); - if(h.is_valid()) - manager->addedTorrent(QString(), h); + if(h.is_valid()) manager->addedTorrent(QString(), h); + } + list = BTSession->getFinishedTorrents(); + foreach(QString hash, list) { + QTorrentHandle h = BTSession->getTorrentHandle(hash); + if(h.is_valid()) manager->addedTorrent(QString(), h); } //connect BTSession to manager connect(BTSession, SIGNAL(addedTorrent(QString, QTorrentHandle&, bool)), manager, SLOT(addedTorrent(QString, QTorrentHandle&))); connect(BTSession, SIGNAL(deletedTorrent(QString)), manager, SLOT(deletedTorrent(QString))); //set timer - QTimer *timer = new QTimer(this); + timer = new QTimer(this); connect(timer, SIGNAL(timeout()), this, SLOT(onTimer())); timer->start(msec); } HttpServer::~HttpServer() { + delete timer; delete manager; } @@ -61,7 +64,7 @@ void HttpServer::newHttpConnection() { HttpConnection *connection = new HttpConnection(socket, this); //connect connection to BTSession - connect(connection, SIGNAL(urlsReadyToBeDownloaded(const QStringList&)), BTSession, SLOT(downloadFromURLList(const QStringList&))); + connect(connection, SIGNAL(UrlReadyToBeDownloaded(QString)), BTSession, SLOT(downloadUrlAndSkipDialog(QString))); connect(connection, SIGNAL(torrentReadyToBeDownloaded(QString, bool, QString, bool)), BTSession, SLOT(addTorrent(QString, bool, QString, bool))); connect(connection, SIGNAL(deleteTorrent(QString)), BTSession, SLOT(deleteTorrent(QString))); connect(connection, SIGNAL(pauseTorrent(QString)), BTSession, SLOT(pauseTorrent(QString))); @@ -73,12 +76,15 @@ void HttpServer::newHttpConnection() void HttpServer::onTimer() { - QStringList list = BTSession->getUnfinishedTorrents() + BTSession->getFinishedTorrents(); - foreach(QString hash, list) - { + QStringList list = BTSession->getUnfinishedTorrents(); + foreach(QString hash, list) { QTorrentHandle h = BTSession->getTorrentHandle(hash); - if(h.is_valid()) - manager->modifiedTorrent(h); + if(h.is_valid()) manager->modifiedTorrent(h); + } + list = BTSession->getFinishedTorrents(); + foreach(QString hash, list) { + QTorrentHandle h = BTSession->getTorrentHandle(hash); + if(h.is_valid()) manager->modifiedTorrent(h); } } diff --git a/src/httpserver.h b/src/httpserver.h index 7ef31e66f..1df5f1309 100644 --- a/src/httpserver.h +++ b/src/httpserver.h @@ -26,7 +26,7 @@ #include class bittorrent; - +class QTimer; class EventManager; class HttpServer : public QTcpServer @@ -37,6 +37,7 @@ class HttpServer : public QTcpServer QByteArray base64; bittorrent *BTSession; EventManager *manager; + QTimer *timer; public: HttpServer(bittorrent *BTSession, int msec, QObject* parent = 0); diff --git a/src/src.pro b/src/src.pro index d5048c354..421bbe44f 100644 --- a/src/src.pro +++ b/src/src.pro @@ -11,10 +11,10 @@ TARGET = qbittorrent CONFIG += qt thread x11 network # Update this VERSION for each release -DEFINES += VERSION=\\\"v1.1.3\\\" +DEFINES += VERSION=\\\"v1.1.4\\\" DEFINES += VERSION_MAJOR=1 DEFINES += VERSION_MINOR=1 -DEFINES += VERSION_BUGFIX=3 +DEFINES += VERSION_BUGFIX=4 QMAKE_LFLAGS += -Wl,--as-needed diff --git a/src/webui.qrc b/src/webui.qrc index 9927a7359..3374e381f 100644 --- a/src/webui.qrc +++ b/src/webui.qrc @@ -10,7 +10,7 @@ webui/scripts/excanvas-compressed.js webui/scripts/mocha-events.js webui/scripts/mocha.js - webui/scripts/mootools-trunk-1475.js + webui/scripts/mootools-1.2-core-yc.js webui/scripts/dynamicTable.js webui/scripts/client.js webui/scripts/download.js diff --git a/src/webui/about.html b/src/webui/about.html index ffff6a713..85247865f 100644 --- a/src/webui/about.html +++ b/src/webui/about.html @@ -4,7 +4,7 @@ qBittorrent web User Interface - + diff --git a/src/webui/download.html b/src/webui/download.html index 9692dea5b..72c1ef987 100644 --- a/src/webui/download.html +++ b/src/webui/download.html @@ -5,7 +5,7 @@ Download from URL - + diff --git a/src/webui/index.html b/src/webui/index.html index 0e9901a3c..e07e84cfb 100644 --- a/src/webui/index.html +++ b/src/webui/index.html @@ -6,7 +6,7 @@ - + @@ -19,7 +19,7 @@
-

qBittorrent Web User Interface version 1.0

+

qBittorrent Web User Interface version 1.1

    diff --git a/src/webui/scripts/client.js b/src/webui/scripts/client.js index ddafdb675..a7df415e3 100644 --- a/src/webui/scripts/client.js +++ b/src/webui/scripts/client.js @@ -41,7 +41,8 @@ window.addEvent('domready', function(){ var url = 'json/events?r='+r; if (!waiting){ waiting=true; - var request = new Json.Remote(url, { + var request = new Request.JSON({ + url: url, method: 'get', onComplete: function(jsonObj) { if(jsonObj){ diff --git a/src/webui/scripts/download.js b/src/webui/scripts/download.js index 87ac4d8a1..a9e395dea 100644 --- a/src/webui/scripts/download.js +++ b/src/webui/scripts/download.js @@ -22,12 +22,13 @@ */ window.addEvent('domready', function(){ + $('urls').focus(); $('downButton').addEvent('click', function(e){ new Event(e).stop(); - new Ajax('/command/download', {method: 'post', data: {urls: $('urls').value}, + new Request({url: '/command/download', method: 'post', data: {urls: $('urls').value}, onComplete: function() { window.parent.document.getElementById('downloadPage').parentNode.removeChild(window.parent.document.getElementById('downloadPage')); } - }).request(); + }).send(); }); }); diff --git a/src/webui/scripts/dynamicTable.js b/src/webui/scripts/dynamicTable.js index 113623af3..6ca6e8689 100644 --- a/src/webui/scripts/dynamicTable.js +++ b/src/webui/scripts/dynamicTable.js @@ -66,7 +66,7 @@ var dynamicTable = new Class ({ for(var i=0; iError Loading XMLHttpRequest

    Make sure all of your content is uploaded to your server, and that you are attempting to load a document from the same domain as this page. XMLHttpRequests will not work on your local machine.

    '); + subElements.content.set('html', '

    Error Loading XMLHttpRequest

    Make sure all of your content is uploaded to your server, and that you are attempting to load a document from the same domain as this page. XMLHttpRequests will not work on your local machine.

    '); this.hideLoadingIcon.delay(150, this, subElements.canvasIcon); }.bind(this), onSuccess: function(response) { - subElements.content.setHTML(response); + subElements.content.set('html', response); this.hideLoadingIcon.delay(150, this, subElements.canvasIcon); windowProperties.onContentLoaded(); }.bind(this) @@ -374,7 +374,7 @@ var MochaUI = new Class({ break; case 'html': default: - subElements.content.setHTML(windowProperties.content); + subElements.content.set('html', windowProperties.content); windowProperties.onContentLoaded(); break; } @@ -665,7 +665,7 @@ var MochaUI = new Class({ 'id': windowEl.id + '_dockButton', 'class': 'mochaDockButton', 'title': titleText - }).setHTML(titleText.substring(0,13) + (titleText.length > 13 ? '...' : '')).injectInside($(this.dock)); + }).set('html', titleText.substring(0,13) + (titleText.length > 13 ? '...' : '')).injectInside($(this.dock)); dockButton.addEvent('click', function(event) { this.restoreMinimized(windowEl); }.bind(this)); @@ -1525,7 +1525,7 @@ function addSlider(){ steps: 20, offset: 5, onChange: function(pos){ - $('updatevalue').setHTML(pos); + $('updatevalue').set('html', pos); document.mochaUI.options.cornerRadius = pos; $$('div.mocha').each(function(windowEl, i) { document.mochaUI.drawWindow(windowEl); diff --git a/src/webui/scripts/mootools-1.2-core-yc.js b/src/webui/scripts/mootools-1.2-core-yc.js new file mode 100644 index 000000000..caeb274db --- /dev/null +++ b/src/webui/scripts/mootools-1.2-core-yc.js @@ -0,0 +1 @@ +var MooTools={version:"1.2.0",build:""};var Native=function(J){J=J||{};var F=J.afterImplement||function(){};var G=J.generics;G=(G!==false);var H=J.legacy;var E=J.initialize;var B=J.protect;var A=J.name;var C=E||H;C.constructor=Native;C.$family={name:"native"};if(H&&E){C.prototype=H.prototype}C.prototype.constructor=C;if(A){var D=A.toLowerCase();C.prototype.$family={name:D};Native.typize(C,D)}var I=function(M,K,N,L){if(!B||L||!M.prototype[K]){M.prototype[K]=N}if(G){Native.genericize(M,K,B)}F.call(M,K,N);return M};C.implement=function(L,K,N){if(typeof L=="string"){return I(this,L,K,N)}for(var M in L){I(this,M,L[M],K)}return this};C.alias=function(M,K,N){if(typeof M=="string"){M=this.prototype[M];if(M){I(this,K,M,N)}}else{for(var L in M){this.alias(L,M[L],K)}}return this};return C};Native.implement=function(D,C){for(var B=0,A=D.length;B-1:this.indexOf(A)>-1},trim:function(){return this.replace(/^\s+|\s+$/g,"")},clean:function(){return this.replace(/\s+/g," ").trim()},camelCase:function(){return this.replace(/-\D/g,function(A){return A.charAt(1).toUpperCase()})},hyphenate:function(){return this.replace(/[A-Z]/g,function(A){return("-"+A.charAt(0).toLowerCase())})},capitalize:function(){return this.replace(/\b[a-z]/g,function(A){return A.toUpperCase()})},escapeRegExp:function(){return this.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1")},toInt:function(A){return parseInt(this,A||10)},toFloat:function(){return parseFloat(this)},hexToRgb:function(B){var A=this.match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/);return(A)?A.slice(1).hexToRgb(B):null},rgbToHex:function(B){var A=this.match(/\d{1,3}/g);return(A)?A.rgbToHex(B):null},stripScripts:function(B){var A="";var C=this.replace(/]*>([\s\S]*?)<\/script>/gi,function(){A+=arguments[1]+"\n";return""});if(B===true){$exec(A)}else{if($type(B)=="function"){B(A,C)}}return C},substitute:function(A,B){return this.replace(B||(/\\?\{([^}]+)\}/g),function(D,C){if(D.charAt(0)=="\\"){return D.slice(1)}return(A[C]!=undefined)?A[C]:""})}});Hash.implement({has:Object.prototype.hasOwnProperty,keyOf:function(B){for(var A in this){if(this.hasOwnProperty(A)&&this[A]===B){return A}}return null},hasValue:function(A){return(Hash.keyOf(this,A)!==null)},extend:function(A){Hash.each(A,function(C,B){Hash.set(this,B,C)},this);return this},combine:function(A){Hash.each(A,function(C,B){Hash.include(this,B,C)},this);return this},erase:function(A){if(this.hasOwnProperty(A)){delete this[A]}return this},get:function(A){return(this.hasOwnProperty(A))?this[A]:null},set:function(A,B){if(!this[A]||this.hasOwnProperty(A)){this[A]=B}return this},empty:function(){Hash.each(this,function(B,A){delete this[A]},this);return this},include:function(B,C){var A=this[B];if(A==undefined){this[B]=C}return this},map:function(B,C){var A=new Hash;Hash.each(this,function(E,D){A.set(D,B.call(C,E,D,this))},this);return A},filter:function(B,C){var A=new Hash;Hash.each(this,function(E,D){if(B.call(C,E,D,this)){A.set(D,E)}},this);return A},every:function(B,C){for(var A in this){if(this.hasOwnProperty(A)&&!B.call(C,this[A],A)){return false}}return true},some:function(B,C){for(var A in this){if(this.hasOwnProperty(A)&&B.call(C,this[A],A)){return true}}return false},getKeys:function(){var A=[];Hash.each(this,function(C,B){A.push(B)});return A},getValues:function(){var A=[];Hash.each(this,function(B){A.push(B)});return A},toQueryString:function(A){var B=[];Hash.each(this,function(F,E){if(A){E=A+"["+E+"]"}var D;switch($type(F)){case"object":D=Hash.toQueryString(F,E);break;case"array":var C={};F.each(function(H,G){C[G]=H});D=Hash.toQueryString(C,E);break;default:D=E+"="+encodeURIComponent(F)}if(F!=undefined){B.push(D)}});return B.join("&")}});Hash.alias({keyOf:"indexOf",hasValue:"contains"});var Event=new Native({name:"Event",initialize:function(A,F){F=F||window;var K=F.document;A=A||F.event;if(A.$extended){return A}this.$extended=true;var J=A.type;var G=A.target||A.srcElement;while(G&&G.nodeType==3){G=G.parentNode}if(J.test(/key/)){var B=A.which||A.keyCode;var M=Event.Keys.keyOf(B);if(J=="keydown"){var D=B-111;if(D>0&&D<13){M="f"+D}}M=M||String.fromCharCode(B).toLowerCase()}else{if(J.match(/(click|mouse|menu)/i)){K=(!K.compatMode||K.compatMode=="CSS1Compat")?K.html:K.body;var I={x:A.pageX||A.clientX+K.scrollLeft,y:A.pageY||A.clientY+K.scrollTop};var C={x:(A.pageX)?A.pageX-F.pageXOffset:A.clientX,y:(A.pageY)?A.pageY-F.pageYOffset:A.clientY};if(J.match(/DOMMouseScroll|mousewheel/)){var H=(A.wheelDelta)?A.wheelDelta/120:-(A.detail||0)/3}var E=(A.which==3)||(A.button==2);var L=null;if(J.match(/over|out/)){switch(J){case"mouseover":L=A.relatedTarget||A.fromElement;break;case"mouseout":L=A.relatedTarget||A.toElement}if(!(function(){while(L&&L.nodeType==3){L=L.parentNode}return true}).create({attempt:Browser.Engine.gecko})()){L=false}}}}return $extend(this,{event:A,type:J,page:I,client:C,rightClick:E,wheel:H,relatedTarget:L,target:G,code:B,key:M,shift:A.shiftKey,control:A.ctrlKey,alt:A.altKey,meta:A.metaKey})}});Event.Keys=new Hash({enter:13,up:38,down:40,left:37,right:39,esc:27,space:32,backspace:8,tab:9,"delete":46});Event.implement({stop:function(){return this.stopPropagation().preventDefault()},stopPropagation:function(){if(this.event.stopPropagation){this.event.stopPropagation()}else{this.event.cancelBubble=true}return this},preventDefault:function(){if(this.event.preventDefault){this.event.preventDefault()}else{this.event.returnValue=false}return this}});var Class=new Native({name:"Class",initialize:function(B){B=B||{};var A=function(E){for(var D in this){this[D]=$unlink(this[D])}for(var F in Class.Mutators){if(!this[F]){continue}Class.Mutators[F](this,this[F]);delete this[F]}this.constructor=A;if(E===$empty){return this}var C=(this.initialize)?this.initialize.apply(this,arguments):this;if(this.options&&this.options.initialize){this.options.initialize.call(this)}return C};$extend(A,this);A.constructor=Class;A.prototype=B;return A}});Class.implement({implement:function(){Class.Mutators.Implements(this.prototype,Array.slice(arguments));return this}});Class.Mutators={Implements:function(A,B){$splat(B).each(function(C){$extend(A,($type(C)=="class")?new C($empty):C)})},Extends:function(self,klass){var instance=new klass($empty);delete instance.parent;delete instance.parentOf;for(var key in instance){var current=self[key],previous=instance[key];if(current==undefined){self[key]=previous;continue}var ctype=$type(current),ptype=$type(previous);if(ctype!=ptype){continue}switch(ctype){case"function":if(!arguments.callee.caller){self[key]=eval("("+String(current).replace(/\bthis\.parent\(\s*(\))?/g,function(full,close){return"arguments.callee._parent_.call(this"+(close||", ")})+")")}self[key]._parent_=previous;break;case"object":self[key]=$merge(previous,current)}}self.parent=function(){return arguments.callee.caller._parent_.apply(this,arguments)};self.parentOf=function(descendant){return descendant._parent_.apply(this,Array.slice(arguments,1))}}};var Chain=new Class({chain:function(){this.$chain=(this.$chain||[]).extend(arguments);return this},callChain:function(){return(this.$chain&&this.$chain.length)?this.$chain.shift().apply(this,arguments):false},clearChain:function(){if(this.$chain){this.$chain.empty()}return this}});var Events=new Class({addEvent:function(C,B,A){C=Events.removeOn(C);if(B!=$empty){this.$events=this.$events||{};this.$events[C]=this.$events[C]||[];this.$events[C].include(B);if(A){B.internal=true}}return this},addEvents:function(A){for(var B in A){this.addEvent(B,A[B])}return this},fireEvent:function(C,B,A){C=Events.removeOn(C);if(!this.$events||!this.$events[C]){return this}this.$events[C].each(function(D){D.create({bind:this,delay:A,"arguments":B})()},this);return this},removeEvent:function(B,A){B=Events.removeOn(B);if(!this.$events||!this.$events[B]){return this}if(!A.internal){this.$events[B].erase(A)}return this},removeEvents:function(C){for(var D in this.$events){if(C&&C!=D){continue}var B=this.$events[D];for(var A=B.length;A--;A){this.removeEvent(D,B[A])}}return this}});Events.removeOn=function(A){return A.replace(/^on([A-Z])/,function(B,C){return C.toLowerCase()})};var Options=new Class({setOptions:function(){this.options=$merge.run([this.options].extend(arguments));if(!this.addEvent){return this}for(var A in this.options){if($type(this.options[A])!="function"||!(/^on[A-Z]/).test(A)){continue}this.addEvent(A,this.options[A]);delete this.options[A]}return this}});Document.implement({newElement:function(A,B){if(Browser.Engine.trident&&B){["name","type","checked"].each(function(C){if(!B[C]){return }A+=" "+C+'="'+B[C]+'"';if(C!="checked"){delete B[C]}});A="<"+A+">"}return $.element(this.createElement(A)).set(B)},newTextNode:function(A){return this.createTextNode(A)},getDocument:function(){return this},getWindow:function(){return this.defaultView||this.parentWindow},purge:function(){var C=this.getElementsByTagName("*");for(var B=0,A=C.length;B1);A.each(function(E){var F=this.getElementsByTagName(E.trim());(B)?C.extend(F):C=F},this);return new Elements(C,{ddup:B,cash:!D})}});Element.Storage={get:function(A){return(this[A]||(this[A]={}))}};Element.Inserters=new Hash({before:function(B,A){if(A.parentNode){A.parentNode.insertBefore(B,A)}},after:function(B,A){if(!A.parentNode){return }var C=A.nextSibling;(C)?A.parentNode.insertBefore(B,C):A.parentNode.appendChild(B)},bottom:function(B,A){A.appendChild(B)},top:function(B,A){var C=A.firstChild;(C)?A.insertBefore(B,C):A.appendChild(B)}});Element.Inserters.inside=Element.Inserters.bottom;Element.Inserters.each(function(C,B){var A=B.capitalize();Element.implement("inject"+A,function(D){C(this,$(D,true));return this});Element.implement("grab"+A,function(D){C($(D,true),this);return this})});Element.implement({getDocument:function(){return this.ownerDocument},getWindow:function(){return this.ownerDocument.getWindow()},getElementById:function(D,C){var B=this.ownerDocument.getElementById(D);if(!B){return null}for(var A=B.parentNode;A!=this;A=A.parentNode){if(!A){return null}}return $.element(B,C)},set:function(D,B){switch($type(D)){case"object":for(var C in D){this.set(C,D[C])}break;case"string":var A=Element.Properties.get(D);(A&&A.set)?A.set.apply(this,Array.slice(arguments,1)):this.setProperty(D,B)}return this},get:function(B){var A=Element.Properties.get(B);return(A&&A.get)?A.get.apply(this,Array.slice(arguments,1)):this.getProperty(B)},erase:function(B){var A=Element.Properties.get(B);(A&&A.erase)?A.erase.apply(this,Array.slice(arguments,1)):this.removeProperty(B);return this},match:function(A){return(!A||Element.get(this,"tag")==A)},inject:function(B,A){Element.Inserters.get(A||"bottom")(this,$(B,true));return this},wraps:function(B,A){B=$(B,true);return this.replaces(B).grab(B,A)},grab:function(B,A){Element.Inserters.get(A||"bottom")($(B,true),this);return this},appendText:function(B,A){return this.grab(this.getDocument().newTextNode(B),A)},adopt:function(){Array.flatten(arguments).each(function(A){A=$(A,true);if(A){this.appendChild(A)}},this);return this},dispose:function(){return(this.parentNode)?this.parentNode.removeChild(this):this},clone:function(D,C){switch($type(this)){case"element":var H={};for(var G=0,E=this.attributes.length;G1),cash:!G})}});Element.implement({match:function(B){if(!B){return true}var D=Selectors.Utils.parseTagAndID(B);var A=D[0],E=D[1];if(!Selectors.Filters.byID(this,E)||!Selectors.Filters.byTag(this,A)){return false}var C=Selectors.Utils.parseSelector(B);return(C)?Selectors.Utils.filter(this,C,{}):true}});var Selectors={Cache:{nth:{},parsed:{}}};Selectors.RegExps={id:(/#([\w-]+)/),tag:(/^(\w+|\*)/),quick:(/^(\w+|\*)$/),splitter:(/\s*([+>~\s])\s*([a-zA-Z#.*:\[])/g),combined:(/\.([\w-]+)|\[(\w+)(?:([!*^$~|]?=)["']?(.*?)["']?)?\]|:([\w-]+)(?:\(["']?(.*?)?["']?\)|$)/g)};Selectors.Utils={chk:function(B,C){if(!C){return true}var A=$uid(B);if(!C[A]){return C[A]=true}return false},parseNthArgument:function(F){if(Selectors.Cache.nth[F]){return Selectors.Cache.nth[F]}var C=F.match(/^([+-]?\d*)?([a-z]+)?([+-]?\d*)?$/);if(!C){return false}var E=parseInt(C[1]);var B=(E||E===0)?E:1;var D=C[2]||false;var A=parseInt(C[3])||0;if(B!=0){A--;while(A<1){A+=B}while(A>=B){A-=B}}else{B=A;D="index"}switch(D){case"n":C={a:B,b:A,special:"n"};break;case"odd":C={a:2,b:0,special:"n"};break;case"even":C={a:2,b:1,special:"n"};break;case"first":C={a:0,special:"index"};break;case"last":C={special:"last-child"};break;case"only":C={special:"only-child"};break;default:C={a:(B-1),special:"index"}}return Selectors.Cache.nth[F]=C},parseSelector:function(E){if(Selectors.Cache.parsed[E]){return Selectors.Cache.parsed[E]}var D,H={classes:[],pseudos:[],attributes:[]};while((D=Selectors.RegExps.combined.exec(E))){var I=D[1],G=D[2],F=D[3],B=D[4],C=D[5],J=D[6];if(I){H.classes.push(I)}else{if(C){var A=Selectors.Pseudo.get(C);if(A){H.pseudos.push({parser:A,argument:J})}else{H.attributes.push({name:C,operator:"=",value:J})}}else{if(G){H.attributes.push({name:G,operator:F,value:B})}}}}if(!H.classes.length){delete H.classes}if(!H.attributes.length){delete H.attributes}if(!H.pseudos.length){delete H.pseudos}if(!H.classes&&!H.attributes&&!H.pseudos){H=null}return Selectors.Cache.parsed[E]=H},parseTagAndID:function(B){var A=B.match(Selectors.RegExps.tag);var C=B.match(Selectors.RegExps.id);return[(A)?A[1]:"*",(C)?C[1]:false]},filter:function(F,C,E){var D;if(C.classes){for(D=C.classes.length;D--;D){var G=C.classes[D];if(!Selectors.Filters.byClass(F,G)){return false}}}if(C.attributes){for(D=C.attributes.length;D--;D){var B=C.attributes[D];if(!Selectors.Filters.byAttribute(F,B.name,B.operator,B.value)){return false}}}if(C.pseudos){for(D=C.pseudos.length;D--;D){var A=C.pseudos[D];if(!Selectors.Filters.byPseudo(F,A.parser,A.argument,E)){return false}}}return true},getByTagAndID:function(B,A,D){if(D){var C=(B.getElementById)?B.getElementById(D,true):Element.getElementById(B,D,true);return(C&&Selectors.Filters.byTag(C,A))?[C]:[]}else{return B.getElementsByTagName(A)}},search:function(J,I,O){var B=[];var C=I.trim().replace(Selectors.RegExps.splitter,function(Z,Y,X){B.push(Y);return":)"+X}).split(":)");var K,F,E,V;for(var U=0,Q=C.length;U":function(H,G,I,A,F){var C=Selectors.Utils.getByTagAndID(G,I,A);for(var E=0,D=C.length;EA){return false}}return(C==A)},even:function(B,A){return Selectors.Pseudo["nth-child"].call(this,"2n+1",A)},odd:function(B,A){return Selectors.Pseudo["nth-child"].call(this,"2n",A)}});Element.Events.domready={onAdd:function(A){if(Browser.loaded){A.call(this)}}};(function(){var B=function(){if(Browser.loaded){return }Browser.loaded=true;window.fireEvent("domready");document.fireEvent("domready")};switch(Browser.Engine.name){case"webkit":(function(){(["loaded","complete"].contains(document.readyState))?B():arguments.callee.delay(50)})();break;case"trident":var A=document.createElement("div");(function(){($try(function(){A.doScroll("left");return $(A).inject(document.body).set("html","temp").dispose()}))?B():arguments.callee.delay(50)})();break;default:window.addEvent("load",B);document.addEvent("DOMContentLoaded",B)}})();var JSON=new Hash({encode:function(B){switch($type(B)){case"string":return'"'+B.replace(/[\x00-\x1f\\"]/g,JSON.$replaceChars)+'"';case"array":return"["+String(B.map(JSON.encode).filter($defined))+"]";case"object":case"hash":var A=[];Hash.each(B,function(E,D){var C=JSON.encode(E);if(C){A.push(JSON.encode(D)+":"+C)}});return"{"+A+"}";case"number":case"boolean":return String(B);case false:return"null"}return null},$specialChars:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},$replaceChars:function(A){return JSON.$specialChars[A]||"\\u00"+Math.floor(A.charCodeAt()/16).toString(16)+(A.charCodeAt()%16).toString(16)},decode:function(string,secure){if($type(string)!="string"||!string.length){return null}if(secure&&!(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(string.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,""))){return null}return eval("("+string+")")}});Native.implement([Hash,Array,String,Number],{toJSON:function(){return JSON.encode(this)}});var Cookie=new Class({Implements:Options,options:{path:false,domain:false,duration:false,secure:false,document:document},initialize:function(B,A){this.key=B;this.setOptions(A)},write:function(B){B=encodeURIComponent(B);if(this.options.domain){B+="; domain="+this.options.domain}if(this.options.path){B+="; path="+this.options.path}if(this.options.duration){var A=new Date();A.setTime(A.getTime()+this.options.duration*24*60*60*1000);B+="; expires="+A.toGMTString()}if(this.options.secure){B+="; secure"}this.options.document.cookie=this.key+"="+B;return this},read:function(){var A=this.options.document.cookie.match("(?:^|;)\\s*"+this.key.escapeRegExp()+"=([^;]*)");return(A)?decodeURIComponent(A[1]):null},dispose:function(){new Cookie(this.key,$merge(this.options,{duration:-1})).write("");return this}});Cookie.write=function(B,C,A){return new Cookie(B,A).write(C)};Cookie.read=function(A){return new Cookie(A).read()};Cookie.dispose=function(B,A){return new Cookie(B,A).dispose()};var Swiff=new Class({Implements:[Options],options:{id:null,height:1,width:1,container:null,properties:{},params:{quality:"high",allowScriptAccess:"always",wMode:"transparent",swLiveConnect:true},callBacks:{},vars:{}},toElement:function(){return this.object},initialize:function(L,M){this.instance="Swiff_"+$time();this.setOptions(M);M=this.options;var B=this.id=M.id||this.instance;var A=$(M.container);Swiff.CallBacks[this.instance]={};var E=M.params,G=M.vars,F=M.callBacks;var H=$extend({height:M.height,width:M.width},M.properties);var K=this;for(var D in F){Swiff.CallBacks[this.instance][D]=(function(N){return function(){return N.apply(K.object,arguments)}})(F[D]);G[D]="Swiff.CallBacks."+this.instance+"."+D}E.flashVars=Hash.toQueryString(G);if(Browser.Engine.trident){H.classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";E.movie=L}else{H.type="application/x-shockwave-flash";H.data=L}var J=''}}J+="";this.object=((A)?A.empty():new Element("div")).set("html",J).firstChild},replaces:function(A){A=$(A,true);A.parentNode.replaceChild(this.toElement(),A);return this},inject:function(A){$(A,true).appendChild(this.toElement());return this},remote:function(){return Swiff.remote.apply(Swiff,[this.toElement()].extend(arguments))}});Swiff.CallBacks={};Swiff.remote=function(obj,fn){var rs=obj.CallFunction(''+__flash__argumentsToXML(arguments,2)+"");return eval(rs)};var Fx=new Class({Implements:[Chain,Events,Options],options:{fps:50,unit:false,duration:500,link:"ignore",transition:function(A){return -(Math.cos(Math.PI*A)-1)/2}},initialize:function(A){this.subject=this.subject||this;this.setOptions(A);this.options.duration=Fx.Durations[this.options.duration]||this.options.duration.toInt();var B=this.options.wait;if(B===false){this.options.link="cancel"}},step:function(){var A=$time();if(A=(7-4*B)/11){C=-Math.pow((11-6*B-11*D)/4,2)+A*A;break}}return C},Elastic:function(B,A){return Math.pow(2,10*--B)*Math.cos(20*B*Math.PI*(A[0]||1)/3)}});["Quad","Cubic","Quart","Quint"].each(function(B,A){Fx.Transitions[B]=new Fx.Transition(function(C){return Math.pow(C,[A+2])})});var Request=new Class({Implements:[Chain,Events,Options],options:{url:"",data:"",headers:{"X-Requested-With":"XMLHttpRequest",Accept:"text/javascript, text/html, application/xml, text/xml, */*"},async:true,format:false,method:"post",link:"ignore",isSuccess:null,emulation:true,urlEncoded:true,encoding:"utf-8",evalScripts:false,evalResponse:false},initialize:function(A){this.xhr=new Browser.Request();this.setOptions(A);this.options.isSuccess=this.options.isSuccess||this.isSuccess;this.headers=new Hash(this.options.headers)},onStateChange:function(){if(this.xhr.readyState!=4||!this.running){return }this.running=false;this.status=0;$try(function(){this.status=this.xhr.status}.bind(this));if(this.options.isSuccess.call(this,this.status)){this.response={text:this.xhr.responseText,xml:this.xhr.responseXML};this.success(this.response.text,this.response.xml)}else{this.response={text:null,xml:null};this.failure()}this.xhr.onreadystatechange=$empty},isSuccess:function(){return((this.status>=200)&&(this.status<300))},processScripts:function(A){if(this.options.evalResponse||(/(ecma|java)script/).test(this.getHeader("Content-type"))){return $exec(A)}return A.stripScripts(this.options.evalScripts)},success:function(B,A){this.onSuccess(this.processScripts(B),A)},onSuccess:function(){this.fireEvent("complete",arguments).fireEvent("success",arguments).callChain()},failure:function(){this.onFailure()},onFailure:function(){this.fireEvent("complete").fireEvent("failure",this.xhr)},setHeader:function(A,B){this.headers.set(A,B);return this},getHeader:function(A){return $try(function(){return this.xhr.getResponseHeader(A)}.bind(this))},check:function(A){if(!this.running){return true}switch(this.options.link){case"cancel":this.cancel();return true;case"chain":this.chain(A.bind(this,Array.slice(arguments,1)));return false}return false},send:function(I){if(!this.check(arguments.callee,I)){return this}this.running=true;var G=$type(I);if(G=="string"||G=="element"){I={data:I}}var D=this.options;I=$extend({data:D.data,url:D.url,method:D.method},I);var E=I.data,B=I.url,A=I.method;switch($type(E)){case"element":E=$(E).toQueryString();break;case"object":case"hash":E=Hash.toQueryString(E)}if(this.options.format){var H="format="+this.options.format;E=(E)?H+"&"+E:H}if(this.options.emulation&&["put","delete"].contains(A)){var F="_method="+A;E=(E)?F+"&"+E:F;A="post"}if(this.options.urlEncoded&&A=="post"){var C=(this.options.encoding)?"; charset="+this.options.encoding:"";this.headers.set("Content-type","application/x-www-form-urlencoded"+C)}if(E&&A=="get"){B=B+(B.contains("?")?"&":"?")+E;E=null}this.xhr.open(A.toUpperCase(),B,this.options.async);this.xhr.onreadystatechange=this.onStateChange.bind(this);this.headers.each(function(K,J){if(!$try(function(){this.xhr.setRequestHeader(J,K);return true}.bind(this))){this.fireEvent("exception",[J,K])}},this);this.fireEvent("request");this.xhr.send(E);if(!this.options.async){this.onStateChange()}return this},cancel:function(){if(!this.running){return this}this.running=false;this.xhr.abort();this.xhr.onreadystatechange=$empty;this.xhr=new Browser.Request();this.fireEvent("cancel");return this}});(function(){var A={};["get","post","put","delete","GET","POST","PUT","DELETE"].each(function(B){A[B]=function(){var C=Array.link(arguments,{url:String.type,data:$defined});return this.send($extend(C,{method:B.toLowerCase()}))}});Request.implement(A)})();Element.Properties.send={set:function(A){var B=this.retrieve("send");if(B){B.cancel()}return this.eliminate("send").store("send:options",$extend({data:this,link:"cancel",method:this.get("method")||"post",url:this.get("action")},A))},get:function(A){if(A||!this.retrieve("send")){if(A||!this.retrieve("send:options")){this.set("send",A)}this.store("send",new Request(this.retrieve("send:options")))}return this.retrieve("send")}};Element.implement({send:function(A){var B=this.get("send");B.send({data:this,url:A||B.options.url});return this}});Request.HTML=new Class({Extends:Request,options:{update:false,evalScripts:true,filter:false},processHTML:function(C){var B=C.match(/]*>([\s\S]*?)<\/body>/i);C=(B)?B[1]:C;var A=new Element("div");return $try(function(){var D=""+C+"",G;if(Browser.Engine.trident){G=new ActiveXObject("Microsoft.XMLDOM");G.async=false;G.loadXML(D)}else{G=new DOMParser().parseFromString(D,"text/xml")}D=G.getElementsByTagName("root")[0];for(var F=0,E=D.childNodes.length;Fthis.options.snap){this.cancel();this.document.addEvents({mousemove:this.bound.drag,mouseup:this.bound.stop});this.fireEvent("start",this.element).fireEvent("snap",this.element)}},drag:function(A){if(this.options.preventDefault){A.preventDefault()}this.mouse.now=A.page;for(var B in this.options.modifiers){if(!this.options.modifiers[B]){continue}this.value.now[B]=this.mouse.now[B]-this.mouse.pos[B];if(this.options.invert){this.value.now[B]*=-1}if(this.options.limit&&this.limit[B]){if($chk(this.limit[B][1])&&(this.value.now[B]>this.limit[B][1])){this.value.now[B]=this.limit[B][1]}else{if($chk(this.limit[B][0])&&(this.value.now[B]B.left&&A.xB.top)},checkDroppables:function(){var A=this.droppables.filter(this.checkAgainst,this).getLast();if(this.overed!=A){if(this.overed){this.fireEvent("leave",[this.element,this.overed])}if(A){this.overed=A;this.fireEvent("enter",[this.element,A])}else{this.overed=null}}},drag:function(A){this.parent(A);if(this.droppables.length){this.checkDroppables()}},stop:function(A){this.checkDroppables();this.fireEvent("drop",[this.element,this.overed]);this.overed=null;return this.parent(A)}});Element.implement({makeDraggable:function(A){return new Drag.Move(this,A)}}); \ No newline at end of file diff --git a/src/webui/scripts/mootools-trunk-1475.js b/src/webui/scripts/mootools-trunk-1475.js deleted file mode 100644 index 913730d06..000000000 --- a/src/webui/scripts/mootools-trunk-1475.js +++ /dev/null @@ -1,504 +0,0 @@ -//MooTools, My Object Oriented Javascript Tools. Copyright (c) 2006-2007 Valerio Proietti, , MIT Style License. - -var MooTools={version:"1.2dev",build:"1475"};var Native=function(J){J=J||{};var F=J.afterImplement||function(){};var G=J.generics;G=(G!==false);var H=J.legacy; -var E=J.initialize;var B=J.protect;var A=J.name;var C=E||H;C.constructor=Native;C.$family={name:"native"};if(H&&E){C.prototype=H.prototype;}C.prototype.constructor=C; -if(A){var D=A.toLowerCase();C.prototype.$family={name:D};Native.typize(C,D);}var I=function(M,K,N,L){if(!B||L||!M.prototype[K]){M.prototype[K]=N;}if(G){Native.genericize(M,K,B); -}F.call(M,K,N);return M;};C.implement=function(L,K,N){if(typeof L=="string"){return I(this,L,K,N);}for(var M in L){I(this,M,L[M],K);}return this;};C.alias=function(K,M,L){K=this.prototype[K]; -if(K){I(this,M,K,L);}return this;};return C;};Native.implement=function(D,C){for(var B=0,A=D.length;B-1:this.indexOf(A)>-1;},trim:function(){return this.replace(/^\s+|\s+$/g,"");},clean:function(){return this.replace(/\s+/g," ").trim(); -},camelCase:function(){return this.replace(/-\D/g,function(A){return A.charAt(1).toUpperCase();});},hyphenate:function(){return this.replace(/[A-Z]/g,function(A){return("-"+A.charAt(0).toLowerCase()); -});},capitalize:function(){return this.replace(/\b[a-z]/g,function(A){return A.toUpperCase();});},escapeRegExp:function(){return this.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1"); -},toInt:function(A){return parseInt(this,A||10);},toFloat:function(){return parseFloat(this);},hexToRgb:function(B){var A=this.match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/); -return(A)?A.slice(1).hexToRgb(B):null;},rgbToHex:function(B){var A=this.match(/\d{1,3}/g);return(A)?A.rgbToHex(B):null;},stripScripts:function(B){var A=""; -var C=this.replace(/]*>([\s\S]*?)<\/script>/gi,function(){A+=arguments[1]+"\n";return"";});if(B===true){$exec(A);}else{if($type(B)=="function"){B(A,C); -}}return C;},substitute:function(A,B){return this.replace(B||/\\?\{([^}]+)\}/g,function(D,C){if(D.charAt(0)=="\\"){return D.slice(1);}return(A[C]!=undefined)?A[C]:""; -});}});Hash.implement({has:Object.prototype.hasOwnProperty,keyOf:function(B){for(var A in this){if(this.hasOwnProperty(A)&&this[A]===B){return A;}}return null; -},hasValue:function(A){return(Hash.keyOf(this,A)!==null);},extend:function(A){Hash.each(A,function(C,B){Hash.set(this,B,C);},this);return this;},merge:function(A){Hash.each(A,function(C,B){Hash.include(this,B,C); -},this);return this;},erase:function(A){if(this.hasOwnProperty(A)){delete this[A];}return this;},get:function(A){return(this.hasOwnProperty(A))?this[A]:null; -},set:function(A,B){if(!this[A]||this.hasOwnProperty(A)){this[A]=B;}return this;},empty:function(){Hash.each(this,function(B,A){delete this[A];},this); -return this;},include:function(B,C){var A=this[B];if(!$defined(A)){this[B]=C;}return this;},map:function(B,C){var A=new Hash;Hash.each(this,function(E,D){A.set(D,B.call(C,E,D,this)); -},this);return A;},filter:function(B,C){var A=new Hash;Hash.each(this,function(E,D){if(B.call(C,E,D,this)){A.set(D,E);}},this);return A;},every:function(B,C){for(var A in this){if(this.hasOwnProperty(A)&&!B.call(C,this[A],A)){return false; -}}return true;},some:function(B,C){for(var A in this){if(this.hasOwnProperty(A)&&B.call(C,this[A],A)){return true;}}return false;},getKeys:function(){var A=[]; -Hash.each(this,function(C,B){A.push(B);});return A;},getValues:function(){var A=[];Hash.each(this,function(B){A.push(B);});return A;},toQueryString:function(){var A=[]; -Hash.each(this,function(C,B){$splat(C).each(function(D){A.push(B+"="+encodeURIComponent(D));});});return A.join("&");}});Hash.alias("keyOf","indexOf").alias("hasValue","contains"); -Hash.alias("getKeys","keys").alias("getValues","values").alias("has","hasKey");var Abstract=Hash;var Event=new Native({name:"Event",initialize:function(A,F){F=F||window; -A=A||F.event;if(A.$extended){return A;}this.$extended=true;var J=A.type;var G=A.target||A.srcElement;while(G&&G.nodeType==3){G=G.parentNode;}if(J.test(/key/)){var B=A.which||A.keyCode; -var L=Event.Keys.keyOf(B);if(J=="keydown"){var D=B-111;if(D>0&&D<13){L="f"+D;}}L=L||String.fromCharCode(B).toLowerCase();}else{if(J.match(/(click|mouse|menu)/i)){var I={x:A.pageX||A.clientX+F.document.documentElement.scrollLeft,y:A.pageY||A.clientY+F.document.documentElement.scrollTop}; -var C={x:A.pageX?A.pageX-F.pageXOffset:A.clientX,y:A.pageY?A.pageY-F.pageYOffset:A.clientY};if(J.match(/DOMMouseScroll|mousewheel/)){var H=(A.wheelDelta)?A.wheelDelta/120:-(A.detail||0)/3; -}var E=(A.which==3)||(A.button==2);var K=null;if(J.match(/over|out/)){switch(J){case"mouseover":K=A.relatedTarget||A.fromElement;break;case"mouseout":K=A.relatedTarget||A.toElement; -}if(!(function(){while(K&&K.nodeType==3){K=K.parentNode;}return true;}).create({attempt:Browser.Engine.gecko})()){K=false;}}}}return $extend(this,{event:A,type:J,page:I,client:C,rightClick:E,wheel:H,relatedTarget:K,target:G,code:B,key:L,shift:A.shiftKey,control:A.ctrlKey,alt:A.altKey,meta:A.metaKey}); -}});Event.Keys=new Hash({enter:13,up:38,down:40,left:37,right:39,esc:27,space:32,backspace:8,tab:9,"delete":46});Event.implement({stop:function(){return this.stopPropagation().preventDefault(); -},stopPropagation:function(){if(this.event.stopPropagation){this.event.stopPropagation();}else{this.event.cancelBubble=true;}return this;},preventDefault:function(){if(this.event.preventDefault){this.event.preventDefault(); -}else{this.event.returnValue=false;}return this;}});var Class=new Native({name:"Class",initialize:function(B){B=B||{};var A=function(){for(var D in this){this[D]=$unlink(this[D]); -}this.parent=null;for(var E in Class.Mutators){if(!this[E]){continue;}Class.Mutators[E](this,this[E]);delete this[E];}this.constructor=A;var C=(arguments[0]!==$empty&&this.initialize)?this.initialize.apply(this,arguments):this; -if(this.options&&this.options.initialize){this.options.initialize.call(this);}return C;};$extend(A,this);A.constructor=Class;A.prototype=B;return A;}}); -Class.implement({implement:function(){Class.Mutators.Implements(this.prototype,Array.slice(arguments));return this;}});Class.Mutators={};Class.Mutators.Implements=function(A,B){$splat(B).each(function(C){$extend(A,($type(C)=="class")?new C($empty):C); -});};Class.Mutators.Extends=function(C,A){A=new A($empty);for(var E in A){var B=A[E];var D=C[E];C[E]=(function(G,H){if($defined(H)&&G!=H){var F=$type(H); -if(F!=$type(G)){return H;}switch(F){case"function":return function(){H.parent=this.parent=G.bind(this);var I=H.apply(this,arguments);this.parent=H.parent; -return I;};case"object":return $merge(G,H);default:return H;}}return G;})(B,D);}};Class.empty=$empty;Class.prototype.extend=function(A){A.Extends=this; -return new Class(A);};var Chain=new Class({chain:function(){this.$chain=(this.$chain||[]).extend(arguments);return this;},callChain:function(){return(this.$chain&&this.$chain.length)?this.$chain.shift().apply(this,arguments):false; -},clearChain:function(){if(this.$chain){this.$chain.empty();}return this;}});var Events=new Class({addEvent:function(C,B,A){if(B!=$empty){this.$events=this.$events||{}; -this.$events[C]=this.$events[C]||[];this.$events[C].include(B);if(A){B.internal=true;}}return this;},addEvents:function(A){for(var B in A){this.addEvent(B,A[B]); -}return this;},fireEvent:function(C,B,A){if(!this.$events||!this.$events[C]){return this;}this.$events[C].each(function(D){D.create({bind:this,delay:A,"arguments":B})(); -},this);return this;},removeEvent:function(B,A){if(!this.$events||!this.$events[B]){return this;}if(!A.internal){this.$events[B].erase(A);}return this; -},removeEvents:function(C){for(var D in this.$events){if(C&&C!=D){continue;}var B=this.$events[D];for(var A=B.length;A--;A){this.removeEvent(D,B[A]);}}return this; -}});var Options=new Class({setOptions:function(){this.options=$merge.run([this.options].extend(arguments));if(!this.addEvent){return this;}for(var A in this.options){if($type(this.options[A])!="function"||!(/^on[A-Z]/).test(A)){continue; -}this.addEvent(A,this.options[A]);delete this.options[A];}return this;}});Document.implement({newElement:function(A,B){if(Browser.Engine.trident&&B){["name","type","checked"].each(function(C){if(!B[C]){return ; -}A+=" "+C+'="'+B[C]+'"';if(C!="checked"){delete B[C];}});A="<"+A+">";}return $.element(this.createElement(A)).set(B);},newTextNode:function(A){return this.createTextNode(A); -},getDocument:function(){return this;},getWindow:function(){return this.defaultView||this.parentWindow;},purge:function(){var C=this.getElementsByTagName("*"); -for(var B=0,A=C.length;B1);A.each(function(E){var F=this.getElementsByTagName(E.trim());(B)?C.extend(F):C=F;},this);return new Elements(C,{ddup:B,cash:!D}); -}});Element.Storage={get:function(A){return(this[A]||(this[A]={}));}};Element.Inserters=new Hash({before:function(B,A){if(A.parentNode){A.parentNode.insertBefore(B,A); -}},after:function(B,A){if(!A.parentNode){return ;}var C=A.nextSibling;(C)?A.parentNode.insertBefore(B,C):A.parentNode.appendChild(B);},bottom:function(B,A){A.appendChild(B); -},top:function(B,A){var C=A.firstChild;(C)?A.insertBefore(B,C):A.appendChild(B);}});Element.Inserters.inside=Element.Inserters.bottom;Element.Inserters.each(function(C,B){var A=B.capitalize(); -Element.implement("inject"+A,function(D){Element.Inserters[B](this,$(D,true));return this;});Element.implement("grab"+A,function(D){Element.Inserters[B]($(D,true),this); -return this;});});Element.implement({getDocument:function(){return this.ownerDocument;},getWindow:function(){return this.ownerDocument.getWindow();},getElementById:function(D,C){var B=this.ownerDocument.getElementById(D); -if(!B){return null;}for(var A=B.parentNode;A!=this;A=A.parentNode){if(!A){return null;}}return $.element(B,C);},set:function(D,B){switch($type(D)){case"object":for(var C in D){this.set(C,D[C]); -}break;case"string":var A=Element.Properties.get(D);(A&&A.set)?A.set.apply(this,Array.slice(arguments,1)):this.setProperty(D,B);}return this;},get:function(B){var A=Element.Properties.get(B); -return(A&&A.get)?A.get.apply(this,Array.slice(arguments,1)):this.getProperty(B);},erase:function(B){var A=Element.Properties.get(B);(A&&A.erase)?A.erase.apply(this,Array.slice(arguments,1)):this.removeProperty(B); -return this;},match:function(A){return(!A||Element.get(this,"tag")==A);},inject:function(B,A){Element.Inserters.get(A||"bottom")(this,$(B,true));return this; -},wraps:function(B,A){B=$(B,true);return this.replaces(B).grab(B);},grab:function(B,A){Element.Inserters.get(A||"bottom")($(B,true),this);return this;},appendText:function(B,A){return this.grab(this.getDocument().newTextNode(B),A); -},adopt:function(){Array.flatten(arguments).each(function(A){A=$(A,true);if(A){this.appendChild(A);}},this);return this;},dispose:function(){return(this.parentNode)?this.parentNode.removeChild(this):this; -},clone:function(D,C){switch($type(this)){case"element":var H={};for(var G=0,E=this.attributes.length;G1),cash:!G});}});Element.implement({match:function(B){if(!B){return true;}var D=Selectors.Utils.parseTagAndID(B); -var A=D[0],E=D[1];if(!Selectors.Filters.byID(this,E)||!Selectors.Filters.byTag(this,A)){return false;}var C=Selectors.Utils.parseSelector(B);return(C)?Selectors.Utils.filter(this,C,{}):true; -}});var Selectors={Cache:{nth:{},parsed:{}}};Selectors.RegExps={id:(/#([\w-]+)/),tag:(/^(\w+|\*)/),quick:(/^(\w+|\*)$/),splitter:(/\s*([+>~\s])\s*([a-zA-Z#.*:\[])/g),combined:(/\.([\w-]+)|\[(\w+)(?:([!*^$~|]?=)["']?(.*?)["']?)?\]|:([\w-]+)(?:\(["']?(.*?)?["']?\)|$)/g)}; -Selectors.Utils={chk:function(B,C){if(!C){return true;}var A=$uid(B);if(!C[A]){return C[A]=true;}return false;},parseNthArgument:function(F){if(Selectors.Cache.nth[F]){return Selectors.Cache.nth[F]; -}var C=F.match(/^([+-]?\d*)?([a-z]+)?([+-]?\d*)?$/);if(!C){return false;}var E=parseInt(C[1]);var B=(E||E===0)?E:1;var D=C[2]||false;var A=parseInt(C[3])||0; -if(B!=0){A--;while(A<1){A+=B;}while(A>=B){A-=B;}}else{B=A;D="index";}switch(D){case"n":C={a:B,b:A,special:"n"};break;case"odd":C={a:2,b:0,special:"n"}; -break;case"even":C={a:2,b:1,special:"n"};break;case"first":C={a:0,special:"index"};break;case"last":C={special:"last-child"};break;case"only":C={special:"only-child"}; -break;default:C={a:(B-1),special:"index"};}return Selectors.Cache.nth[F]=C;},parseSelector:function(E){if(Selectors.Cache.parsed[E]){return Selectors.Cache.parsed[E]; -}var D,H={classes:[],pseudos:[],attributes:[]};while((D=Selectors.RegExps.combined.exec(E))){var I=D[1],G=D[2],F=D[3],B=D[4],C=D[5],J=D[6];if(I){H.classes.push(I); -}else{if(C){var A=Selectors.Pseudo.get(C);if(A){H.pseudos.push({parser:A,argument:J});}else{H.attributes.push({name:C,operator:"=",value:J});}}else{if(G){H.attributes.push({name:G,operator:F,value:B}); -}}}}if(!H.classes.length){delete H.classes;}if(!H.attributes.length){delete H.attributes;}if(!H.pseudos.length){delete H.pseudos;}if(!H.classes&&!H.attributes&&!H.pseudos){H=null; -}return Selectors.Cache.parsed[E]=H;},parseTagAndID:function(B){var A=B.match(Selectors.RegExps.tag);var C=B.match(Selectors.RegExps.id);return[(A)?A[1]:"*",(C)?C[1]:false]; -},filter:function(F,C,E){var D;if(C.classes){for(D=C.classes.length;D--;D){var G=C.classes[D];if(!Selectors.Filters.byClass(F,G)){return false;}}}if(C.attributes){for(D=C.attributes.length; -D--;D){var B=C.attributes[D];if(!Selectors.Filters.byAttribute(F,B.name,B.operator,B.value)){return false;}}}if(C.pseudos){for(D=C.pseudos.length;D--;D){var A=C.pseudos[D]; -if(!Selectors.Filters.byPseudo(F,A.parser,A.argument,E)){return false;}}}return true;},getByTagAndID:function(B,A,D){if(D){var C=B.getElementById(D,true); -return(C&&Selectors.Filters.byTag(C,A))?[C]:[];}else{return B.getElementsByTagName(A);}},search:function(J,I,O){var B=[];var C=I.trim().replace(Selectors.RegExps.splitter,function(Z,Y,X){B.push(Y); -return":)"+X;}).split(":)");var K,F,E,V;for(var U=0,Q=C.length;U":function(H,G,I,A,F){var C=Selectors.Utils.getByTagAndID(G,I,A);for(var E=0,D=C.length;EA){return false; -}}return(C==A);},even:function(B,A){return Selectors.Pseudo["nth-child"].call(this,"2n+1",A);},odd:function(B,A){return Selectors.Pseudo["nth-child"].call(this,"2n",A); -}});Native.implement([Element,Document],{getElementsByClassName:function(A){return this.getElements("."+A);},getElementsBySelector:function(A){return this.getElements(A); -}});Elements.implement({filterByTag:function(A){return this.filterBy(A);},filterByClass:function(A){return this.filterBy("."+A);},filterById:function(A){return this.filterBy("#"+A); -},filterByAttribute:function(B,A,C){return this.filterBy("["+B+(A||"")+(C||"")+"]");}});var $E=function(A,B){return($(B)||document).getElement(A);};var $ES=function(A,B){return($(B)||document).getElements(A); -};Element.Events.domready={onAdd:function(A){if(Browser.loaded){A.call(this);}}};(function(){var B=function(){if(Browser.loaded){return ;}Browser.loaded=true; -window.fireEvent("domready");document.fireEvent("domready");};switch(Browser.Engine.name){case"webkit":(function(){(["loaded","complete"].contains(document.readyState))?B():arguments.callee.delay(50); -})();break;case"trident":var A=document.createElement("div");(function(){($try(function(){A.doScroll("left");return $(A).inject(document.body).set("html","temp").dispose(); -}))?B():arguments.callee.delay(50);})();break;default:window.addEvent("load",B);document.addEvent("DOMContentLoaded",B);}})();var JSON=new Hash({encode:function(B){switch($type(B)){case"string":return'"'+B.replace(/[\x00-\x1f\\"]/g,JSON.$replaceChars)+'"'; -case"array":return"["+String(B.map(JSON.encode).filter($defined))+"]";case"object":case"hash":var A=[];Hash.each(B,function(E,D){var C=JSON.encode(E);if(C){A.push(JSON.encode(D)+":"+C); -}});return"{"+A+"}";case"number":case"boolean":return String(B);case false:return"null";}return null;},$specialChars:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},$replaceChars:function(A){return JSON.$specialChars[A]||"\\u00"+Math.floor(A.charCodeAt()/16).toString(16)+(A.charCodeAt()%16).toString(16); -},decode:function(string,secure){if($type(string)!="string"||!string.length){return null;}if(secure&&!(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(string.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,""))){return null; -}return eval("("+string+")");}});Native.implement([Hash,Array,String,Number],{toJSON:function(){return JSON.encode(this);}});var Json=JSON;JSON.toString=JSON.encode; -JSON.evaluate=JSON.decode;var Cookie=new Class({Implements:Options,options:{path:false,domain:false,duration:false,secure:false,document:document},initialize:function(B,A){this.key=B; -this.setOptions(A);},write:function(B){B=encodeURIComponent(B);if(this.options.domain){B+="; domain="+this.options.domain;}if(this.options.path){B+="; path="+this.options.path; -}if(this.options.duration){var A=new Date();A.setTime(A.getTime()+this.options.duration*24*60*60*1000);B+="; expires="+A.toGMTString();}if(this.options.secure){B+="; secure"; -}this.options.document.cookie=this.key+"="+B;return this;},read:function(){var A=this.options.document.cookie.match("(?:^|;)\\s*"+this.key.escapeRegExp()+"=([^;]*)"); -return(A)?decodeURIComponent(A[1]):null;},dispose:function(){new Cookie(this.key,$merge(this.options,{duration:-1})).write("");return this;}});Cookie.write=function(B,C,A){return new Cookie(B,A).write(C); -};Cookie.read=function(A){return new Cookie(A).read();};Cookie.dispose=function(B,A){return new Cookie(B,A).dispose();};Cookie.set=function(B,C,A){return new Cookie(B,A).write(C); -};Cookie.get=function(A){return new Cookie(A).read();};Cookie.remove=function(B,A){return new Cookie(B,A).dispose();};var Swiff=new Class({Implements:[Options],options:{id:null,height:1,width:1,container:null,properties:{},params:{quality:"high",allowScriptAccess:"always",wMode:"transparent",swLiveConnect:true},callBacks:{},vars:{}},toElement:function(){return this.object; -},initialize:function(L,M){this.instance="Swiff_"+$time();this.setOptions(M);M=this.options;var B=this.id=M.id||this.instance;var A=$(M.container);Swiff.CallBacks[this.instance]={}; -var E=M.params,G=M.vars,F=M.callBacks;var H=$extend({height:M.height,width:M.width},M.properties);var K=this;for(var D in F){Swiff.CallBacks[this.instance][D]=(function(N){return function(){return N.apply(K.object,arguments); -};})(F[D]);G[D]="Swiff.CallBacks."+this.instance+"."+D;}E.flashVars=Hash.toQueryString(G);if(Browser.Engine.trident){H.classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"; -E.movie=L;}else{H.type="application/x-shockwave-flash";H.data=L;}var J=''; -}J+="";this.object=(A||new Element("div")).set("html",J).firstChild;},replaces:function(A){A=$(A,true);A.parentNode.replaceChild(this.toElement(),A); -return this;},inject:function(A){$(A,true).appendChild(this.toElement());return this;},remote:function(A){return Swiff.remote(this.toElement(),A);}});Swiff.CallBacks={}; -Swiff.remote=function(obj,fn){var rs=obj.CallFunction(''+__flash__argumentsToXML(arguments,2)+""); -return eval(rs);};var Fx=new Class({Implements:[Chain,Events,Options],options:{fps:50,unit:false,duration:500,link:"ignore",transition:function(A){return -(Math.cos(Math.PI*A)-1)/2; -}},initialize:function(A){this.subject=this.subject||this;this.setOptions(A);this.options.duration=Fx.Durations[this.options.duration]||this.options.duration.toInt(); -var B=this.options.wait;if(B===false){this.options.link="cancel";}},step:function(){var A=$time();if(A=(7-4*B)/11){C=-Math.pow((11-6*B-11*D)/4,2)+A*A;break;}}return C;},Elastic:function(B,A){return Math.pow(2,10*--B)*Math.cos(20*B*Math.PI*(A[0]||1)/3); -}});["Quad","Cubic","Quart","Quint"].each(function(B,A){Fx.Transitions[B]=new Fx.Transition(function(C){return Math.pow(C,[A+2]);});});var Request=new Class({Implements:[Chain,Events,Options],options:{url:"",data:"",headers:{"X-Requested-With":"XMLHttpRequest",Accept:"text/javascript, text/html, application/xml, text/xml, */*"},async:true,method:"post",link:"ignore",isSuccess:null,emulation:true,urlEncoded:true,encoding:"utf-8",evalScripts:false,evalResponse:false},initialize:function(A){this.xhr=new Browser.Request(); -this.setOptions(A);this.options.isSuccess=this.options.isSuccess||this.isSuccess;this.headers=new Hash(this.options.headers);},onStateChange:function(){if(this.xhr.readyState!=4||!this.running){return ; -}this.running=false;this.status=0;$try(function(){this.status=this.xhr.status;}.bind(this));if(this.options.isSuccess.call(this,this.status)){this.response={text:this.xhr.responseText,xml:this.xhr.responseXML}; -this.success(this.response.text,this.response.xml);}else{this.response={text:null,xml:null};this.failure();}this.xhr.onreadystatechange=$empty;},isSuccess:function(){return((this.status>=200)&&(this.status<300)); -},processScripts:function(A){if(this.options.evalResponse||(/(ecma|java)script/).test(this.getHeader("Content-type"))){return $exec(A);}return A.stripScripts(this.options.evalScripts); -},success:function(B,A){this.onSuccess(this.processScripts(B),A);},onSuccess:function(){this.fireEvent("onComplete",arguments).fireEvent("onSuccess",arguments).callChain(); -},failure:function(){this.onFailure();},onFailure:function(){this.fireEvent("onComplete").fireEvent("onFailure",this.xhr);},setHeader:function(A,B){this.headers.set(A,B); -return this;},getHeader:function(A){return $try(function(){return this.xhr.getResponseHeader(A);}.bind(this));},check:function(){if(!this.running){return true; -}switch(this.options.link){case"cancel":this.cancel();return true;case"chain":this.chain(this.send.bind(this,arguments));return false;}return false;},send:function(D){if(!this.check(D)){return this; -}this.running=true;var E=$type(D);if(E=="string"||E=="element"){D={data:D};}var A=this.options;D=$extend({data:A.data,url:A.url,method:A.method},D);var G=D.data,C=D.url,H=D.method; -switch($type(G)){case"element":G=$(G).toQueryString();break;case"object":case"hash":G=Hash.toQueryString(G);}if(this.options.emulation&&["put","delete"].contains(H)){var B="_method="+H; -G=(G)?B+"&"+G:B;H="post";}if(this.options.urlEncoded&&H=="post"){var F=(this.options.encoding)?"; charset="+this.options.encoding:"";this.headers.set("Content-type","application/x-www-form-urlencoded"+F); -}if(G&&H=="get"){C=C+(C.contains("?")?"&":"?")+G;G=null;}this.xhr.open(H.toUpperCase(),C,this.options.async);this.xhr.onreadystatechange=this.onStateChange.bind(this); -this.headers.each(function(J,I){if(!$try(function(){this.xhr.setRequestHeader(I,J);return true;}.bind(this))){this.fireEvent("onException",[e,I,J]);}},this); -this.fireEvent("onRequest");this.xhr.send(G);if(!this.options.async){this.onStateChange();}return this;},cancel:function(){if(!this.running){return this; -}this.running=false;this.xhr.abort();this.xhr.onreadystatechange=$empty;this.xhr=new Browser.Request();this.fireEvent("onCancel");return this;}});(function(){var A={}; -["get","post","GET","POST","PUT","DELETE"].each(function(B){A[B]=function(){var C=Array.link(arguments,{url:String.type,data:$defined});return this.send($extend(C,{method:B.toLowerCase()})); -};});Request.implement(A);})();Element.Properties.send={set:function(A){var B=this.retrieve("send");if(B){B.cancel();}return this.eliminate("send").store("send:options",$extend({data:this,link:"cancel",method:this.get("method")||"post",url:this.get("action")},A)); -},get:function(A){if(A||!this.retrieve("send")){if(A||!this.retrieve("send:options")){this.set("send",A);}this.store("send",new Request(this.retrieve("send:options"))); -}return this.retrieve("send");}};Element.implement({send:function(A){var B=this.get("send");B.send({data:this,url:A||B.options.url});return this;}});Object.toQueryString=Hash.toQueryString; -var XHR=new Class({Extends:Request,options:{update:false},initialize:function(B,A){arguments.callee.parent(A);this.url=B;},request:function(A){return this.send(this.url,A||this.options.data); -},send:function(A,B){if(!this.check(A,B)){return this;}return arguments.callee.parent({url:A,data:B});},success:function(B,A){B=this.processScripts(B); -if(this.options.update){$(this.options.update).empty().set("html",B);}this.onSuccess(B,A);},failure:function(){this.fireEvent("onFailure",this.xhr);}}); -var Ajax=XHR;Request.HTML=new Class({Extends:Request,options:{update:false,evalScripts:true,filter:false},processHTML:function(C){var B=C.match(/]*>([\s\S]*?)<\/body>/i); -C=(B)?B[1]:C;var A=new Element("div");return $try(function(){var D=""+C+"",G;if(Browser.Engine.trident){G=new ActiveXObject("Microsoft.XMLDOM"); -G.async=false;G.loadXML(D);}else{G=new DOMParser().parseFromString(D,"text/xml");}D=G.getElementsByTagName("root")[0];for(var F=0,E=D.childNodes.length; -Fthis.options.snap){this.cancel();this.document.addEvents({mousemove:this.bound.drag,mouseup:this.bound.stop});this.fireEvent("onStart",this.element).fireEvent("onSnap",this.element); -}},drag:function(A){this.mouse.now=A.page;for(var B in this.options.modifiers){if(!this.options.modifiers[B]){continue;}this.value.now[B]=this.mouse.now[B]-this.mouse.pos[B]; -if(this.options.invert){this.value.now[B]*=-1;}if(this.options.limit&&this.limit[B]){if($chk(this.limit[B][1])&&(this.value.now[B]>this.limit[B][1])){this.value.now[B]=this.limit[B][1]; -}else{if($chk(this.limit[B][0])&&(this.value.now[B]B.left&&A.xB.top);},checkDroppables:function(){var A=this.droppables.filter(this.checkAgainst,this).getLast(); -if(this.overed!=A){if(this.overed){this.overed.fireEvent("leave",[this.element,this]);}this.overed=A?A.fireEvent("over",[this.element,this]):null;}},drag:function(A){arguments.callee.parent(A); -if(this.droppables.length){this.checkDroppables();}},stop:function(A){this.checkDroppables();if(this.overed){this.overed.fireEvent("drop",[this.element,this]); -}else{this.element.fireEvent("emptydrop",this);}return arguments.callee.parent(A);}});Element.implement({makeDraggable:function(A){return new Drag.Move(this,A); -}});var Color=new Native({initialize:function(B,C){if(arguments.length>=3){C="rgb";B=Array.slice(arguments,0,3);}else{if(typeof B=="string"){if(B.match(/rgb/)){B=B.rgbToHex().hexToRgb(true); -}else{if(B.match(/hsb/)){B=B.hsbToRgb();}else{B=B.hexToRgb(true);}}}}C=C||"rgb";switch(C){case"hsb":var A=B;B=B.hsbToRgb();B.hsb=A;break;case"hex":B=B.hexToRgb(true); -break;}B.rgb=B.slice(0,3);B.hsb=B.hsb||B.rgbToHsb();B.hex=B.rgbToHex();return $extend(B,this);}});Color.implement({mix:function(){var A=Array.slice(arguments); -var C=($type(A.getLast())=="number")?A.pop():50;var B=this.slice();A.each(function(D){D=new Color(D);for(var E=0;E<3;E++){B[E]=Math.round((B[E]/100*(100-C))+(D[E]/100*C)); -}});return new Color(B,"rgb");},invert:function(){return new Color(this.map(function(A){return 255-A;}));},setHue:function(A){return new Color([A,this.hsb[1],this.hsb[2]],"hsb"); -},setSaturation:function(A){return new Color([this.hsb[0],A,this.hsb[2]],"hsb");},setBrightness:function(A){return new Color([this.hsb[0],this.hsb[1],A],"hsb"); -}});function $RGB(C,B,A){return new Color([C,B,A],"rgb");}function $HSB(C,B,A){return new Color([C,B,A],"hsb");}function $HEX(A){return new Color(A,"hex"); -}Array.implement({rgbToHsb:function(){var B=this[0],C=this[1],J=this[2];var G,F,H;var I=Math.max(B,C,J),E=Math.min(B,C,J);var K=I-E;H=I/255;F=(I!=0)?K/I:0; -if(F==0){G=0;}else{var D=(I-B)/K;var A=(I-C)/K;var L=(I-J)/K;if(B==I){G=L-A;}else{if(C==I){G=2+D-L;}else{G=4+A-D;}}G/=6;if(G<0){G++;}}return[Math.round(G*360),Math.round(F*100),Math.round(H*100)]; -},hsbToRgb:function(){var C=Math.round(this[2]/100*255);if(this[1]==0){return[C,C,C];}else{var A=this[0]%360;var E=A%60;var F=Math.round((this[2]*(100-this[1]))/10000*255); -var D=Math.round((this[2]*(6000-this[1]*E))/600000*255);var B=Math.round((this[2]*(6000-this[1]*(60-E)))/600000*255);switch(Math.floor(A/60)){case 0:return[C,B,F]; -case 1:return[D,C,F];case 2:return[F,C,B];case 3:return[F,D,C];case 4:return[B,F,C];case 5:return[C,F,D];}}return false;}});String.implement({rgbToHsb:function(){var A=this.match(/\d{1,3}/g); -return(A)?hsb.rgbToHsb():null;},hsbToRgb:function(){var A=this.match(/\d{1,3}/g);return(A)?A.hsbToRgb():null;}});var Group=new Class({initialize:function(){this.instances=Array.flatten(arguments); -this.events={};this.checker={};},addEvent:function(B,A){this.checker[B]=this.checker[B]||{};this.events[B]=this.events[B]||[];if(this.events[B].contains(A)){return false; -}else{this.events[B].push(A);}this.instances.each(function(C,D){C.addEvent(B,this.check.bind(this,[B,C,D]));},this);return this;},check:function(C,A,B){this.checker[C][B]=true; -var D=this.instances.every(function(F,E){return this.checker[C][E]||false;},this);if(!D){return ;}this.checker[C]={};this.events[C].each(function(E){E.call(this,this.instances,A); -},this);}});Hash.Cookie=new Class({Extends:Cookie,options:{autoSave:true},initialize:function(B,A){this.parent(B,A);this.load();},save:function(){var A=JSON.encode(this.hash); -if(!A||A.length>4096){return false;}if(A=="{}"){this.dispose();}else{this.write(A);}return true;},load:function(){this.hash=new Hash(JSON.decode(this.read(),true)); -return this;}});Hash.Cookie.implement((function(){var A={};Hash.each(Hash.prototype,function(C,B){A[B]=function(){var D=C.apply(this.hash,arguments);if(this.options.autoSave){this.save(); -}return D;};});return A;})());var Sortables=new Class({Implements:[Events,Options],options:{snap:4,handle:false,revert:false,constrain:false,cloneOpacity:0.7,elementOpacity:0.3},initialize:function(A,B){this.setOptions(B); -this.elements=[];this.lists=[];this.idle=true;this.addLists($$($(A)||A));if(this.options.revert){this.effect=new Fx.Morph(null,$merge({duration:250,link:"cancel"},this.options.revert)); -}},attach:function(){this.addLists(this.lists);return this;},detach:function(){this.lists=this.removeLists(this.lists);return this;},addItems:function(){Array.flatten(arguments).each(function(A){this.elements.push(A); -var C=A.retrieve("sortables:start",this.start.bindWithEvent(this,A));var B=A.retrieve("sortables:insert",this.insert.bind(this,A));(this.options.handle?A.getElement(this.options.handle)||A:A).addEvent("mousedown",C); -A.addEvent("over",B);},this);return this;},addLists:function(){Array.flatten(arguments).each(function(A){this.lists.push(A);this.addItems(A.getChildren()); -A.addEvent("over",A.retrieve("sortables:insert",this.insert.bind(this,[A,"inside"])));},this);return this;},removeItems:function(){var A=[];Array.flatten(arguments).each(function(B){A.push(B); -this.elements.erase(B);var D=B.retrieve("sortables:start");var C=B.retrieve("sortables:insert");(this.options.handle?B.getElement(this.options.handle)||B:B).removeEvent("mousedown",D); -B.removeEvent("over",C);},this);return A;},removeLists:function(){var A=[];Array.flatten(arguments).each(function(B){A.push(B);this.lists.erase(B);this.removeItems(B.getChildren()); -B.removeEvent("over",B.retrieve("sortables:insert"));},this);return A;},getClone:function(A){return A.clone(true).setStyles({margin:"0px",position:"absolute",visibility:"hidden"}).inject(this.list).position(A.getRelativePosition()); -},getDroppables:function(){var A=this.list.getChildren();if(!this.options.constrain){A=this.lists.concat(A).erase(this.list);}return A.erase(this.clone).erase(this.element); -},insert:function(B,A){if(A){this.list=B;this.drag.droppables=this.getDroppables();}A=A||(this.element.getAllPrevious().contains(B)?"before":"after");this.element.inject(B,A); -this.fireEvent("onSort",[this.element,this.clone]);},start:function(B,A){if(!this.idle){return ;}this.idle=false;this.element=A;this.opacity=A.get("opacity"); -this.list=A.getParent();this.clone=this.getClone(A);this.drag=this.clone.makeDraggable({snap:this.options.snap,container:this.options.constrain&&this.clone.getParent(),droppables:this.getDroppables(),onStart:function(){B.stop(); -this.clone.set("opacity",this.options.cloneOpacity);this.element.set("opacity",this.options.elementOpacity);this.fireEvent("onStart",[this.element,this.clone]); -}.bind(this),onCancel:this.reset.bind(this),onComplete:this.end.bind(this)});this.drag.start(B);},end:function(){this.element.set("opacity",this.opacity); -this.drag.detach();if(this.effect){var A=this.element.getStyles("width","height");var B=this.clone.computePosition(this.element.getPosition(this.clone.offsetParent),this.clone.getParent().positioned()); -this.effect.element=this.clone;this.effect.start({top:B.top,left:B.left,width:A.width,height:A.height,opacity:0.25}).chain(this.reset.bind(this));}else{this.reset(); -}},reset:function(){this.idle=true;this.clone.destroy();this.fireEvent("onComplete",this.element);},serialize:function(C,A){var B=this.lists.map(function(D){return D.getChildren().map(A||function(F,E){return F.get("id"); -},this);},this);if(this.lists.length==1){C=0;}return $chk(C)&&C>=0&&CB[F]){G=D.page[F]-this.options.offsets[F]-E[F]; -}this.tip.setStyle(C[F],G);}},fill:function(A,B){(typeof B=="string")?A.set("html",B):A.adopt(B);},show:function(){this.fireEvent("onShow",this.tip);},hide:function(){this.fireEvent("onHide",this.tip); -}});var SmoothScroll=new Class({Extends:Fx.Scroll,initialize:function(B,C){C=C||document;var E=C.getDocument(),D=C.getWindow();arguments.callee.parent(E,B); -this.links=(this.options.links)?$$(this.options.links):$$(E.links);var A=D.location.href.match(/^[^#]*/)[0]+"#";this.links.each(function(G){if(G.href.indexOf(A)!=0){return ; -}var F=G.href.substr(A.length);if(F&&$(F)){this.useLink(G,F);}},this);if(!Browser.Engine.webkit419){this.addEvent("onComplete",function(){D.location.hash=this.anchor; -},true);}},useLink:function(B,A){B.addEvent("click",function(C){this.anchor=A;this.toElement(A);C.stop();}.bind(this));}});var Slider=new Class({Implements:[Events,Options],options:{onTick:function(A){if(this.options.snap){A=this.toPosition(this.step); -}this.knob.setStyle(this.property,A);},snap:false,offset:0,range:false,wheel:false,steps:100,mode:"horizontal"},initialize:function(E,A,D){this.setOptions(D); -this.element=$(E);this.knob=$(A);this.previousChange=this.previousEnd=this.step=-1;this.element.addEvent("mousedown",this.clickedElement.bind(this));if(this.options.wheel){this.element.addEvent("mousewheel",this.scrolledElement.bindWithEvent(this)); -}var F,B={},C={x:false,y:false};switch(this.options.mode){case"vertical":this.axis="y";this.property="top";F="offsetHeight";break;case"horizontal":this.axis="x"; -this.property="left";F="offsetWidth";}this.half=this.knob[F]/2;this.full=this.element[F]-this.knob[F]+(this.options.offset*2);this.min=$chk(this.options.range[0])?this.options.range[0]:0; -this.max=$chk(this.options.range[1])?this.options.range[1]:this.options.steps;this.range=this.max-this.min;this.steps=this.options.steps||this.full;this.stepSize=Math.abs(this.range)/this.steps; -this.stepWidth=this.stepSize*this.full/Math.abs(this.range);this.knob.setStyle("position","relative").setStyle(this.property,-this.options.offset);C[this.axis]=this.property; -B[this.axis]=[-this.options.offset,this.full-this.options.offset];this.drag=new Drag(this.knob,{snap:0,limit:B,modifiers:C,onDrag:this.draggedKnob.bind(this),onStart:this.draggedKnob.bind(this),onComplete:function(){this.draggedKnob(); -this.end();}.bind(this)});if(this.options.snap){this.drag.options.grid=Math.ceil(this.stepWidth);this.drag.options.limit[this.axis][1]=this.full;}},set:function(A){if(!((this.range>0)^(A0)^(A>this.max))){A=this.max;}this.step=Math.round(A);this.checkStep();this.end();this.fireEvent("onTick",this.toPosition(this.step)); -return this;},clickedElement:function(C){var B=this.range<0?-1:1;var A=C.page[this.axis]-this.element.getPosition()[this.axis]-this.half;A=A.limit(-this.options.offset,this.full-this.options.offset); -this.step=Math.round(this.min+B*this.toStep(A));this.checkStep();this.end();this.fireEvent("onTick",A);},scrolledElement:function(A){var B=(this.options.mode=="horizontal")?(A.wheel<0):(A.wheel>0); -this.set(B?this.step-this.stepSize:this.step+this.stepSize);A.stop();},draggedKnob:function(){var B=this.range<0?-1:1;var A=this.drag.value.now[this.axis]; -A=A.limit(-this.options.offset,this.full-this.options.offset);this.step=Math.round(this.min+B*this.toStep(A));this.checkStep();},checkStep:function(){if(this.previousChange!=this.step){this.previousChange=this.step; -this.fireEvent("onChange",this.step);}},end:function(){if(this.previousEnd!==this.step){this.previousEnd=this.step;this.fireEvent("onComplete",this.step+""); -}},toStep:function(A){var B=(A+this.options.offset)*this.stepSize/this.full*this.steps;return this.options.steps?Math.round(B-=B%this.stepSize):B;},toPosition:function(A){return(this.full*Math.abs(this.min-A))/(this.steps*this.stepSize)-this.options.offset; -}});var Scroller=new Class({Implements:[Events,Options],options:{area:20,velocity:1,onChange:function(A,B){this.element.scrollTo(A,B);}},initialize:function(B,A){this.setOptions(A); -this.element=$(B);this.listener=($type(this.element)!="element")?$(this.element.getDocument().body):this.element;this.timer=null;},start:function(){this.coord=this.getCoords.bind(this); -this.listener.addEvent("mousemove",this.coord);},stop:function(){this.listener.removeEvent("mousemove",this.coord);this.timer=$clear(this.timer);},getCoords:function(A){this.page=(this.listener.get("tag")=="body")?A.client:A.page; -if(!this.timer){this.timer=this.scroll.periodical(50,this);}},scroll:function(){var B=this.element.getSize(),A=this.element.getScroll(),E=this.element.getPosition(),D={x:0,y:0}; -for(var C in this.page){if(this.page[C]<(this.options.area+E[C])&&A[C]!=0){D[C]=(this.page[C]-this.options.area-E[C])*this.options.velocity;}else{if(this.page[C]+this.options.area>(B[C]+E[C])&&B[C]+B[C]!=A[C]){D[C]=(this.page[C]-B[C]+this.options.area-E[C])*this.options.velocity; -}}}if(D.y||D.x){this.fireEvent("onChange",[A.x+D.x,A.y+D.y]);}}});var Asset=new Hash({javascript:function(F,D){D=$extend({onload:$empty,document:document,check:$lambda(true)},D); -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; -B.addEvents({load:E,readystatechange:function(){if(["loaded","complete"].contains(this.readyState)){E();}}}).setProperties(D);if(Browser.Engine.webkit419){var C=(function(){if(!$try(A)){return ; -}$clear(C);E();}).periodical(50);}return B.inject(G.head);},css:function(B,A){return new Element("link",$merge({rel:"stylesheet",media:"screen",type:"text/css",href:B},A)).inject(document.head); -},image:function(C,B){B=$merge({onload:$empty,onabort:$empty,onerror:$empty},B);var D=new Image();var A=$(D)||new Element("img");["load","abort","error"].each(function(E){var F="on"+E; -var G=B[F];delete B[F];D[F]=function(){if(!D){return ;}if(!A.parentNode){A.width=D.width;A.height=D.height;}D=D.onload=D.onabort=D.onerror=null;G.delay(1,A,A); -A.fireEvent(E,A,1);};});D.src=A.src=C;if(D&&D.complete){D.onload.delay(1);}return A.setProperties(B);},images:function(D,C){C=$merge({onComplete:$empty,onProgress:$empty},C); -if(!D.push){D=[D];}var A=[];var B=0;D.each(function(F){var E=new Asset.image(F,{onload:function(){C.onProgress.call(this,B,D.indexOf(F));B++;if(B==D.length){C.onComplete(); -}}});A.push(E);});return new Elements(A);}});var Accordion=new Class({Extends:Fx.Elements,options:{display:0,show:false,height:true,width:false,opacity:true,fixedHeight:false,fixedWidth:false,wait:false,alwaysHide:false},initialize:function(){var C=Array.link(arguments,{container:Element.type,options:Object.type,togglers:$defined,elements:$defined}); -arguments.callee.parent(C.elements,C.options);this.togglers=$$(C.togglers);this.container=$(C.container);this.previous=-1;if(this.options.alwaysHide){this.options.wait=true; -}if($chk(this.options.show)){this.options.display=false;this.previous=this.options.show;}if(this.options.start){this.options.display=false;this.options.show=false; -}this.effects={};if(this.options.opacity){this.effects.opacity="fullOpacity";}if(this.options.width){this.effects.width=this.options.fixedWidth?"fullWidth":"offsetWidth"; -}if(this.options.height){this.effects.height=this.options.fixedHeight?"fullHeight":"scrollHeight";}for(var B=0,A=this.togglers.length;B0));this.fireEvent(C?"onBackground":"onActive",[this.togglers[D],E]); -for(var F in this.effects){B[D][F]=C?0:E[this.effects[F]];}},this);return this.start(B);}}); \ No newline at end of file diff --git a/src/webui/upload.html b/src/webui/upload.html index 81e54b7d1..762768484 100644 --- a/src/webui/upload.html +++ b/src/webui/upload.html @@ -5,7 +5,7 @@ Upload local torrent file - +