mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 04:54:29 -04:00
Update server code integration for QtWebApp 1.7.11
- Adapt server code for QtWebapp namespace 'stefanfrings' - Implement custom modifications needed by v1 controller via template engine - Unify iphone and ipad templates
This commit is contained in:
@ -14,6 +14,10 @@
|
|||||||
|
|
||||||
#include <typeinfo>
|
#include <typeinfo>
|
||||||
|
|
||||||
|
using stefanfrings::HttpRequest;
|
||||||
|
using stefanfrings::HttpResponse;
|
||||||
|
using stefanfrings::HttpSession;
|
||||||
|
|
||||||
ComicController::ComicController() { }
|
ComicController::ComicController() { }
|
||||||
|
|
||||||
void ComicController::service(HttpRequest &request, HttpResponse &response)
|
void ComicController::service(HttpRequest &request, HttpResponse &response)
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
class Comic;
|
class Comic;
|
||||||
class QString;
|
class QString;
|
||||||
|
|
||||||
class ComicController : public HttpRequestHandler
|
class ComicController : public stefanfrings::HttpRequestHandler
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DISABLE_COPY(ComicController);
|
Q_DISABLE_COPY(ComicController);
|
||||||
@ -19,7 +19,7 @@ public:
|
|||||||
ComicController();
|
ComicController();
|
||||||
|
|
||||||
/** Generates the response */
|
/** Generates the response */
|
||||||
void service(HttpRequest &request, HttpResponse &response) override;
|
void service(stefanfrings::HttpRequest &request, stefanfrings::HttpResponse &response) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // COMICCONTROLLER_H
|
#endif // COMICCONTROLLER_H
|
||||||
|
@ -5,6 +5,9 @@
|
|||||||
|
|
||||||
#include "comic_db.h"
|
#include "comic_db.h"
|
||||||
|
|
||||||
|
using stefanfrings::HttpRequest;
|
||||||
|
using stefanfrings::HttpResponse;
|
||||||
|
|
||||||
ComicDownloadInfoController::ComicDownloadInfoController() { }
|
ComicDownloadInfoController::ComicDownloadInfoController() { }
|
||||||
|
|
||||||
void ComicDownloadInfoController::service(HttpRequest &request, HttpResponse &response)
|
void ComicDownloadInfoController::service(HttpRequest &request, HttpResponse &response)
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include "httpresponse.h"
|
#include "httpresponse.h"
|
||||||
#include "httprequesthandler.h"
|
#include "httprequesthandler.h"
|
||||||
|
|
||||||
class ComicDownloadInfoController : public HttpRequestHandler
|
class ComicDownloadInfoController : public stefanfrings::HttpRequestHandler
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DISABLE_COPY(ComicDownloadInfoController);
|
Q_DISABLE_COPY(ComicDownloadInfoController);
|
||||||
@ -15,7 +15,7 @@ public:
|
|||||||
ComicDownloadInfoController();
|
ComicDownloadInfoController();
|
||||||
|
|
||||||
/** Generates the response */
|
/** Generates the response */
|
||||||
void service(HttpRequest &request, HttpResponse &response) override;
|
void service(stefanfrings::HttpRequest &request, stefanfrings::HttpResponse &response) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // COMICDOWNLOADINFOCONTROLLER_H
|
#endif // COMICDOWNLOADINFOCONTROLLER_H
|
||||||
|
@ -6,6 +6,10 @@
|
|||||||
#include "template.h"
|
#include "template.h"
|
||||||
#include "../static.h"
|
#include "../static.h"
|
||||||
|
|
||||||
|
using stefanfrings::HttpRequest;
|
||||||
|
using stefanfrings::HttpResponse;
|
||||||
|
using stefanfrings::HttpSession;
|
||||||
|
|
||||||
CoverController::CoverController() { }
|
CoverController::CoverController() { }
|
||||||
|
|
||||||
void CoverController::service(HttpRequest &request, HttpResponse &response)
|
void CoverController::service(HttpRequest &request, HttpResponse &response)
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include "httpresponse.h"
|
#include "httpresponse.h"
|
||||||
#include "httprequesthandler.h"
|
#include "httprequesthandler.h"
|
||||||
|
|
||||||
class CoverController : public HttpRequestHandler
|
class CoverController : public stefanfrings::HttpRequestHandler
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DISABLE_COPY(CoverController);
|
Q_DISABLE_COPY(CoverController);
|
||||||
@ -15,7 +15,7 @@ public:
|
|||||||
CoverController();
|
CoverController();
|
||||||
|
|
||||||
/** Generates the response */
|
/** Generates the response */
|
||||||
void service(HttpRequest &request, HttpResponse &response) override;
|
void service(stefanfrings::HttpRequest &request, stefanfrings::HttpResponse &response) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // COVERCONTROLLER_H
|
#endif // COVERCONTROLLER_H
|
||||||
|
@ -3,6 +3,9 @@
|
|||||||
#include "template.h"
|
#include "template.h"
|
||||||
#include "../static.h"
|
#include "../static.h"
|
||||||
|
|
||||||
|
using stefanfrings::HttpRequest;
|
||||||
|
using stefanfrings::HttpResponse;
|
||||||
|
|
||||||
ErrorController::ErrorController(int errorCode)
|
ErrorController::ErrorController(int errorCode)
|
||||||
: error(errorCode)
|
: error(errorCode)
|
||||||
{
|
{
|
||||||
@ -21,4 +24,4 @@ void ErrorController::service(HttpRequest &request, HttpResponse &response)
|
|||||||
response.write("404 not found", true);
|
response.write("404 not found", true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include "httpresponse.h"
|
#include "httpresponse.h"
|
||||||
#include "httprequesthandler.h"
|
#include "httprequesthandler.h"
|
||||||
|
|
||||||
class ErrorController : public HttpRequestHandler
|
class ErrorController : public stefanfrings::HttpRequestHandler
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DISABLE_COPY(ErrorController);
|
Q_DISABLE_COPY(ErrorController);
|
||||||
@ -15,7 +15,7 @@ public:
|
|||||||
ErrorController(int errorCode);
|
ErrorController(int errorCode);
|
||||||
|
|
||||||
/** Generates the response */
|
/** Generates the response */
|
||||||
void service(HttpRequest &request, HttpResponse &response) override;
|
void service(stefanfrings::HttpRequest &request, stefanfrings::HttpResponse &response) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int error;
|
int error;
|
||||||
|
@ -16,6 +16,11 @@
|
|||||||
|
|
||||||
#include "QsLog.h"
|
#include "QsLog.h"
|
||||||
|
|
||||||
|
using stefanfrings::HttpRequest;
|
||||||
|
using stefanfrings::HttpResponse;
|
||||||
|
using stefanfrings::HttpSession;
|
||||||
|
using stefanfrings::Template;
|
||||||
|
|
||||||
struct LibraryItemSorter {
|
struct LibraryItemSorter {
|
||||||
bool operator()(const LibraryItem *a, const LibraryItem *b) const
|
bool operator()(const LibraryItem *a, const LibraryItem *b) const
|
||||||
{
|
{
|
||||||
@ -41,8 +46,14 @@ void FolderController::service(HttpRequest &request, HttpResponse &response)
|
|||||||
//QString y = session.get("xxx").toString();
|
//QString y = session.get("xxx").toString();
|
||||||
//response.writeText(QString("session xxx : %1 <br/>").arg(y));
|
//response.writeText(QString("session xxx : %1 <br/>").arg(y));
|
||||||
|
|
||||||
Template t = Static::templateLoader->getTemplate("folder_" + ySession->getDeviceType(), request.getHeader("Accept-Language"));
|
Template t = Static::templateLoader->getTemplate("folder", request.getHeader("Accept-Language"));
|
||||||
t.enableWarnings();
|
t.enableWarnings();
|
||||||
|
|
||||||
|
// set device type for templates
|
||||||
|
t.setVariable("device", ySession->getDeviceType());
|
||||||
|
t.setVariable("display", ySession->getDisplayType());
|
||||||
|
t.setCondition("device.ipad", ySession->getDeviceType() == "ipad");
|
||||||
|
|
||||||
QString path = QUrl::fromPercentEncoding(request.getPath()).toUtf8();
|
QString path = QUrl::fromPercentEncoding(request.getPath()).toUtf8();
|
||||||
QStringList pathElements = path.split('/');
|
QStringList pathElements = path.split('/');
|
||||||
int libraryId = pathElements.at(2).toInt();
|
int libraryId = pathElements.at(2).toInt();
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include "httpresponse.h"
|
#include "httpresponse.h"
|
||||||
#include "httprequesthandler.h"
|
#include "httprequesthandler.h"
|
||||||
|
|
||||||
class FolderController : public HttpRequestHandler
|
class FolderController : public stefanfrings::HttpRequestHandler
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DISABLE_COPY(FolderController);
|
Q_DISABLE_COPY(FolderController);
|
||||||
@ -15,7 +15,7 @@ public:
|
|||||||
FolderController();
|
FolderController();
|
||||||
|
|
||||||
/** Generates the response */
|
/** Generates the response */
|
||||||
void service(HttpRequest &request, HttpResponse &response) override;
|
void service(stefanfrings::HttpRequest &request, stefanfrings::HttpResponse &response) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // FOLDERCONTROLLER_H
|
#endif // FOLDERCONTROLLER_H
|
||||||
|
@ -7,6 +7,9 @@
|
|||||||
#include "template.h"
|
#include "template.h"
|
||||||
#include "../static.h"
|
#include "../static.h"
|
||||||
|
|
||||||
|
using stefanfrings::HttpRequest;
|
||||||
|
using stefanfrings::HttpResponse;
|
||||||
|
|
||||||
FolderInfoController::FolderInfoController() { }
|
FolderInfoController::FolderInfoController() { }
|
||||||
|
|
||||||
void FolderInfoController::service(HttpRequest &request, HttpResponse &response)
|
void FolderInfoController::service(HttpRequest &request, HttpResponse &response)
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include "httpresponse.h"
|
#include "httpresponse.h"
|
||||||
#include "httprequesthandler.h"
|
#include "httprequesthandler.h"
|
||||||
|
|
||||||
class FolderInfoController : public HttpRequestHandler
|
class FolderInfoController : public stefanfrings::HttpRequestHandler
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DISABLE_COPY(FolderInfoController);
|
Q_DISABLE_COPY(FolderInfoController);
|
||||||
@ -15,10 +15,10 @@ public:
|
|||||||
FolderInfoController();
|
FolderInfoController();
|
||||||
|
|
||||||
/** Generates the response */
|
/** Generates the response */
|
||||||
void service(HttpRequest &request, HttpResponse &response) override;
|
void service(stefanfrings::HttpRequest &request, stefanfrings::HttpResponse &response) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void serviceComics(const int &library, const qulonglong &folderId, HttpResponse &response);
|
void serviceComics(const int &library, const qulonglong &folderId, stefanfrings::HttpResponse &response);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // FOLDERINFOCONTROLLER_H
|
#endif // FOLDERINFOCONTROLLER_H
|
||||||
|
@ -8,6 +8,11 @@
|
|||||||
|
|
||||||
#include "QsLog.h"
|
#include "QsLog.h"
|
||||||
|
|
||||||
|
using stefanfrings::HttpRequest;
|
||||||
|
using stefanfrings::HttpResponse;
|
||||||
|
using stefanfrings::HttpSession;
|
||||||
|
using stefanfrings::Template;
|
||||||
|
|
||||||
LibrariesController::LibrariesController() { }
|
LibrariesController::LibrariesController() { }
|
||||||
|
|
||||||
void LibrariesController::service(HttpRequest &request, HttpResponse &response)
|
void LibrariesController::service(HttpRequest &request, HttpResponse &response)
|
||||||
@ -20,9 +25,13 @@ void LibrariesController::service(HttpRequest &request, HttpResponse &response)
|
|||||||
|
|
||||||
ySession->clearNavigationPath();
|
ySession->clearNavigationPath();
|
||||||
|
|
||||||
Template t = Static::templateLoader->getTemplate("libraries_" + ySession->getDeviceType(), request.getHeader("Accept-Language"));
|
Template t = Static::templateLoader->getTemplate("libraries", request.getHeader("Accept-Language"));
|
||||||
t.enableWarnings();
|
t.enableWarnings();
|
||||||
|
|
||||||
|
// set device type and display
|
||||||
|
t.setVariable("device", ySession->getDeviceType());
|
||||||
|
t.setVariable("display", ySession->getDisplayType());
|
||||||
|
|
||||||
YACReaderLibraries libraries = DBHelper::getLibraries();
|
YACReaderLibraries libraries = DBHelper::getLibraries();
|
||||||
QList<QString> names = DBHelper::getLibrariesNames();
|
QList<QString> names = DBHelper::getLibrariesNames();
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
This controller displays a HTML form and dumps the submitted input.
|
This controller displays a HTML form and dumps the submitted input.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class LibrariesController : public HttpRequestHandler
|
class LibrariesController : public stefanfrings::HttpRequestHandler
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DISABLE_COPY(LibrariesController);
|
Q_DISABLE_COPY(LibrariesController);
|
||||||
@ -19,7 +19,7 @@ public:
|
|||||||
LibrariesController();
|
LibrariesController();
|
||||||
|
|
||||||
/** Generates the response */
|
/** Generates the response */
|
||||||
void service(HttpRequest &request, HttpResponse &response) override;
|
void service(stefanfrings::HttpRequest &request, stefanfrings::HttpResponse &response) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // LIBRARIESCONTROLLER_H
|
#endif // LIBRARIESCONTROLLER_H
|
||||||
|
@ -13,6 +13,10 @@
|
|||||||
|
|
||||||
#include "db_helper.h"
|
#include "db_helper.h"
|
||||||
|
|
||||||
|
using stefanfrings::HttpRequest;
|
||||||
|
using stefanfrings::HttpResponse;
|
||||||
|
using stefanfrings::HttpSession;
|
||||||
|
|
||||||
PageController::PageController() { }
|
PageController::PageController() { }
|
||||||
|
|
||||||
void PageController::service(HttpRequest &request, HttpResponse &response)
|
void PageController::service(HttpRequest &request, HttpResponse &response)
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include "httpresponse.h"
|
#include "httpresponse.h"
|
||||||
#include "httprequesthandler.h"
|
#include "httprequesthandler.h"
|
||||||
|
|
||||||
class PageController : public HttpRequestHandler
|
class PageController : public stefanfrings::HttpRequestHandler
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DISABLE_COPY(PageController);
|
Q_DISABLE_COPY(PageController);
|
||||||
@ -15,7 +15,7 @@ public:
|
|||||||
PageController();
|
PageController();
|
||||||
|
|
||||||
/** Generates the response */
|
/** Generates the response */
|
||||||
void service(HttpRequest &request, HttpResponse &response) override;
|
void service(stefanfrings::HttpRequest &request, stefanfrings::HttpResponse &response) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // PAGECONTROLLER_H
|
#endif // PAGECONTROLLER_H
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
|
|
||||||
|
using stefanfrings::HttpRequest;
|
||||||
|
using stefanfrings::HttpResponse;
|
||||||
|
|
||||||
SessionController::SessionController() { }
|
SessionController::SessionController() { }
|
||||||
|
|
||||||
void SessionController::service(HttpRequest &request, HttpResponse &response)
|
void SessionController::service(HttpRequest &request, HttpResponse &response)
|
||||||
|
@ -6,6 +6,9 @@
|
|||||||
#include "comic_db.h"
|
#include "comic_db.h"
|
||||||
#include "db_helper.h"
|
#include "db_helper.h"
|
||||||
|
|
||||||
|
using stefanfrings::HttpRequest;
|
||||||
|
using stefanfrings::HttpResponse;
|
||||||
|
|
||||||
SyncController::SyncController()
|
SyncController::SyncController()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#include "httpresponse.h"
|
#include "httpresponse.h"
|
||||||
#include "httprequesthandler.h"
|
#include "httprequesthandler.h"
|
||||||
|
|
||||||
class SyncController : public HttpRequestHandler
|
class SyncController : public stefanfrings::HttpRequestHandler
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DISABLE_COPY(SyncController)
|
Q_DISABLE_COPY(SyncController)
|
||||||
@ -16,7 +16,7 @@ public:
|
|||||||
SyncController();
|
SyncController();
|
||||||
|
|
||||||
/** Generates the response */
|
/** Generates the response */
|
||||||
void service(HttpRequest &request, HttpResponse &response) override;
|
void service(stefanfrings::HttpRequest &request, stefanfrings::HttpResponse &response) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SYNCCONTROLLER_H
|
#endif // SYNCCONTROLLER_H
|
||||||
|
@ -11,6 +11,10 @@
|
|||||||
|
|
||||||
#include "QsLog.h"
|
#include "QsLog.h"
|
||||||
|
|
||||||
|
using stefanfrings::HttpRequest;
|
||||||
|
using stefanfrings::HttpResponse;
|
||||||
|
using stefanfrings::HttpSession;
|
||||||
|
|
||||||
UpdateComicController::UpdateComicController() { }
|
UpdateComicController::UpdateComicController() { }
|
||||||
|
|
||||||
void UpdateComicController::service(HttpRequest &request, HttpResponse &response)
|
void UpdateComicController::service(HttpRequest &request, HttpResponse &response)
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include "httpresponse.h"
|
#include "httpresponse.h"
|
||||||
#include "httprequesthandler.h"
|
#include "httprequesthandler.h"
|
||||||
|
|
||||||
class UpdateComicController : public HttpRequestHandler
|
class UpdateComicController : public stefanfrings::HttpRequestHandler
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DISABLE_COPY(UpdateComicController);
|
Q_DISABLE_COPY(UpdateComicController);
|
||||||
@ -14,7 +14,7 @@ public:
|
|||||||
UpdateComicController();
|
UpdateComicController();
|
||||||
|
|
||||||
/** Generates the response */
|
/** Generates the response */
|
||||||
void service(HttpRequest &request, HttpResponse &response) override;
|
void service(stefanfrings::HttpRequest &request, stefanfrings::HttpResponse &response) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // UPDATECOMICCONTROLLER_H
|
#endif // UPDATECOMICCONTROLLER_H
|
||||||
|
@ -14,6 +14,9 @@
|
|||||||
|
|
||||||
#include <typeinfo>
|
#include <typeinfo>
|
||||||
|
|
||||||
|
using stefanfrings::HttpRequest;
|
||||||
|
using stefanfrings::HttpResponse;
|
||||||
|
|
||||||
ComicControllerV2::ComicControllerV2() { }
|
ComicControllerV2::ComicControllerV2() { }
|
||||||
|
|
||||||
void ComicControllerV2::service(HttpRequest &request, HttpResponse &response)
|
void ComicControllerV2::service(HttpRequest &request, HttpResponse &response)
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
class Comic;
|
class Comic;
|
||||||
class QString;
|
class QString;
|
||||||
|
|
||||||
class ComicControllerV2 : public HttpRequestHandler
|
class ComicControllerV2 : public stefanfrings::HttpRequestHandler
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DISABLE_COPY(ComicControllerV2)
|
Q_DISABLE_COPY(ComicControllerV2)
|
||||||
@ -18,7 +18,7 @@ public:
|
|||||||
ComicControllerV2();
|
ComicControllerV2();
|
||||||
|
|
||||||
/** Generates the response */
|
/** Generates the response */
|
||||||
void service(HttpRequest &request, HttpResponse &response) override;
|
void service(stefanfrings::HttpRequest &request, stefanfrings::HttpResponse &response) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // COMICCONTROLLER_H
|
#endif // COMICCONTROLLER_H
|
||||||
|
@ -5,6 +5,9 @@
|
|||||||
|
|
||||||
#include "comic_db.h"
|
#include "comic_db.h"
|
||||||
|
|
||||||
|
using stefanfrings::HttpRequest;
|
||||||
|
using stefanfrings::HttpResponse;
|
||||||
|
|
||||||
ComicDownloadInfoControllerV2::ComicDownloadInfoControllerV2() { }
|
ComicDownloadInfoControllerV2::ComicDownloadInfoControllerV2() { }
|
||||||
|
|
||||||
void ComicDownloadInfoControllerV2::service(HttpRequest &request, HttpResponse &response)
|
void ComicDownloadInfoControllerV2::service(HttpRequest &request, HttpResponse &response)
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include "httpresponse.h"
|
#include "httpresponse.h"
|
||||||
#include "httprequesthandler.h"
|
#include "httprequesthandler.h"
|
||||||
|
|
||||||
class ComicDownloadInfoControllerV2 : public HttpRequestHandler
|
class ComicDownloadInfoControllerV2 : public stefanfrings::HttpRequestHandler
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DISABLE_COPY(ComicDownloadInfoControllerV2)
|
Q_DISABLE_COPY(ComicDownloadInfoControllerV2)
|
||||||
@ -14,7 +14,7 @@ public:
|
|||||||
ComicDownloadInfoControllerV2();
|
ComicDownloadInfoControllerV2();
|
||||||
|
|
||||||
/** Generates the response */
|
/** Generates the response */
|
||||||
void service(HttpRequest &request, HttpResponse &response) override;
|
void service(stefanfrings::HttpRequest &request, stefanfrings::HttpResponse &response) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // COMICDOWNLOADINFOCONTROLLER_H
|
#endif // COMICDOWNLOADINFOCONTROLLER_H
|
||||||
|
@ -11,6 +11,9 @@
|
|||||||
#include "qnaturalsorting.h"
|
#include "qnaturalsorting.h"
|
||||||
|
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
|
|
||||||
|
using stefanfrings::HttpRequest;
|
||||||
|
using stefanfrings::HttpResponse;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
ComicFullinfoController_v2::ComicFullinfoController_v2() { }
|
ComicFullinfoController_v2::ComicFullinfoController_v2() { }
|
||||||
|
@ -5,17 +5,17 @@
|
|||||||
#include "httpresponse.h"
|
#include "httpresponse.h"
|
||||||
#include "httprequesthandler.h"
|
#include "httprequesthandler.h"
|
||||||
|
|
||||||
class ComicFullinfoController_v2 : public HttpRequestHandler
|
class ComicFullinfoController_v2 : public stefanfrings::HttpRequestHandler
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DISABLE_COPY(ComicFullinfoController_v2)
|
Q_DISABLE_COPY(ComicFullinfoController_v2)
|
||||||
public:
|
public:
|
||||||
ComicFullinfoController_v2();
|
ComicFullinfoController_v2();
|
||||||
|
|
||||||
void service(HttpRequest &request, HttpResponse &response) override;
|
void service(stefanfrings::HttpRequest &request, stefanfrings::HttpResponse &response) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void serviceContent(const int &library, const qulonglong &comicId, HttpResponse &response);
|
void serviceContent(const int &library, const qulonglong &comicId, stefanfrings::HttpResponse &response);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // COMICFULLINFOCONTROLLER_V2_H
|
#endif // COMICFULLINFOCONTROLLER_V2_H
|
||||||
|
@ -6,6 +6,9 @@
|
|||||||
#include "template.h"
|
#include "template.h"
|
||||||
#include "../static.h"
|
#include "../static.h"
|
||||||
|
|
||||||
|
using stefanfrings::HttpRequest;
|
||||||
|
using stefanfrings::HttpResponse;
|
||||||
|
|
||||||
CoverControllerV2::CoverControllerV2() { }
|
CoverControllerV2::CoverControllerV2() { }
|
||||||
|
|
||||||
void CoverControllerV2::service(HttpRequest &request, HttpResponse &response)
|
void CoverControllerV2::service(HttpRequest &request, HttpResponse &response)
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include "httpresponse.h"
|
#include "httpresponse.h"
|
||||||
#include "httprequesthandler.h"
|
#include "httprequesthandler.h"
|
||||||
|
|
||||||
class CoverControllerV2 : public HttpRequestHandler
|
class CoverControllerV2 : public stefanfrings::HttpRequestHandler
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DISABLE_COPY(CoverControllerV2)
|
Q_DISABLE_COPY(CoverControllerV2)
|
||||||
@ -14,7 +14,7 @@ public:
|
|||||||
CoverControllerV2();
|
CoverControllerV2();
|
||||||
|
|
||||||
/** Generates the response */
|
/** Generates the response */
|
||||||
void service(HttpRequest &request, HttpResponse &response) override;
|
void service(stefanfrings::HttpRequest &request, stefanfrings::HttpResponse &response) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // COVERCONTROLLER_H
|
#endif // COVERCONTROLLER_H
|
||||||
|
@ -3,6 +3,9 @@
|
|||||||
#include "template.h"
|
#include "template.h"
|
||||||
#include "../static.h"
|
#include "../static.h"
|
||||||
|
|
||||||
|
using stefanfrings::HttpRequest;
|
||||||
|
using stefanfrings::HttpResponse;
|
||||||
|
|
||||||
ErrorControllerV2::ErrorControllerV2(int errorCode)
|
ErrorControllerV2::ErrorControllerV2(int errorCode)
|
||||||
: error(errorCode)
|
: error(errorCode)
|
||||||
{
|
{
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include "httpresponse.h"
|
#include "httpresponse.h"
|
||||||
#include "httprequesthandler.h"
|
#include "httprequesthandler.h"
|
||||||
|
|
||||||
class ErrorControllerV2 : public HttpRequestHandler
|
class ErrorControllerV2 : public stefanfrings::HttpRequestHandler
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DISABLE_COPY(ErrorControllerV2)
|
Q_DISABLE_COPY(ErrorControllerV2)
|
||||||
@ -14,7 +14,7 @@ public:
|
|||||||
ErrorControllerV2(int errorCode);
|
ErrorControllerV2(int errorCode);
|
||||||
|
|
||||||
/** Generates the response */
|
/** Generates the response */
|
||||||
void service(HttpRequest &request, HttpResponse &response) override;
|
void service(stefanfrings::HttpRequest &request, stefanfrings::HttpResponse &response) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int error;
|
int error;
|
||||||
|
@ -5,6 +5,9 @@
|
|||||||
|
|
||||||
#include "yacreader_server_data_helper.h"
|
#include "yacreader_server_data_helper.h"
|
||||||
|
|
||||||
|
using stefanfrings::HttpRequest;
|
||||||
|
using stefanfrings::HttpResponse;
|
||||||
|
|
||||||
FavoritesControllerV2::FavoritesControllerV2() { }
|
FavoritesControllerV2::FavoritesControllerV2() { }
|
||||||
|
|
||||||
void FavoritesControllerV2::service(HttpRequest &request, HttpResponse &response)
|
void FavoritesControllerV2::service(HttpRequest &request, HttpResponse &response)
|
||||||
|
@ -5,17 +5,17 @@
|
|||||||
#include "httpresponse.h"
|
#include "httpresponse.h"
|
||||||
#include "httprequesthandler.h"
|
#include "httprequesthandler.h"
|
||||||
|
|
||||||
class FavoritesControllerV2 : public HttpRequestHandler
|
class FavoritesControllerV2 : public stefanfrings::HttpRequestHandler
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DISABLE_COPY(FavoritesControllerV2)
|
Q_DISABLE_COPY(FavoritesControllerV2)
|
||||||
public:
|
public:
|
||||||
FavoritesControllerV2();
|
FavoritesControllerV2();
|
||||||
|
|
||||||
void service(HttpRequest &request, HttpResponse &response) override;
|
void service(stefanfrings::HttpRequest &request, stefanfrings::HttpResponse &response) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void serviceContent(const int library, HttpResponse &response);
|
void serviceContent(const int library, stefanfrings::HttpResponse &response);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // FAVORITESCONTROLLER_H
|
#endif // FAVORITESCONTROLLER_H
|
||||||
|
@ -14,6 +14,9 @@
|
|||||||
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
|
|
||||||
|
using stefanfrings::HttpRequest;
|
||||||
|
using stefanfrings::HttpResponse;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
struct LibraryItemSorter {
|
struct LibraryItemSorter {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include "httpresponse.h"
|
#include "httpresponse.h"
|
||||||
#include "httprequesthandler.h"
|
#include "httprequesthandler.h"
|
||||||
|
|
||||||
class FolderContentControllerV2 : public HttpRequestHandler
|
class FolderContentControllerV2 : public stefanfrings::HttpRequestHandler
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DISABLE_COPY(FolderContentControllerV2)
|
Q_DISABLE_COPY(FolderContentControllerV2)
|
||||||
@ -14,10 +14,10 @@ public:
|
|||||||
FolderContentControllerV2();
|
FolderContentControllerV2();
|
||||||
|
|
||||||
/** Generates the response */
|
/** Generates the response */
|
||||||
void service(HttpRequest &request, HttpResponse &response) override;
|
void service(stefanfrings::HttpRequest &request, stefanfrings::HttpResponse &response) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void serviceContent(const int &library, const qulonglong &folderId, HttpResponse &response);
|
void serviceContent(const int &library, const qulonglong &folderId, stefanfrings::HttpResponse &response);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // FOLDERCONTENTCONTROLLER_H
|
#endif // FOLDERCONTENTCONTROLLER_H
|
||||||
|
@ -7,6 +7,9 @@
|
|||||||
#include "template.h"
|
#include "template.h"
|
||||||
#include "../static.h"
|
#include "../static.h"
|
||||||
|
|
||||||
|
using stefanfrings::HttpRequest;
|
||||||
|
using stefanfrings::HttpResponse;
|
||||||
|
|
||||||
FolderInfoControllerV2::FolderInfoControllerV2() { }
|
FolderInfoControllerV2::FolderInfoControllerV2() { }
|
||||||
|
|
||||||
void FolderInfoControllerV2::service(HttpRequest &request, HttpResponse &response)
|
void FolderInfoControllerV2::service(HttpRequest &request, HttpResponse &response)
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include "httpresponse.h"
|
#include "httpresponse.h"
|
||||||
#include "httprequesthandler.h"
|
#include "httprequesthandler.h"
|
||||||
|
|
||||||
class FolderInfoControllerV2 : public HttpRequestHandler
|
class FolderInfoControllerV2 : public stefanfrings::HttpRequestHandler
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DISABLE_COPY(FolderInfoControllerV2)
|
Q_DISABLE_COPY(FolderInfoControllerV2)
|
||||||
@ -14,10 +14,10 @@ public:
|
|||||||
FolderInfoControllerV2();
|
FolderInfoControllerV2();
|
||||||
|
|
||||||
/** Generates the response */
|
/** Generates the response */
|
||||||
void service(HttpRequest &request, HttpResponse &response) override;
|
void service(stefanfrings::HttpRequest &request, stefanfrings::HttpResponse &response) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void serviceComics(const int &library, const qulonglong &folderId, HttpResponse &response);
|
void serviceComics(const int &library, const qulonglong &folderId, stefanfrings::HttpResponse &response);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // FOLDERINFOCONTROLLER_H
|
#endif // FOLDERINFOCONTROLLER_H
|
||||||
|
@ -7,6 +7,9 @@
|
|||||||
|
|
||||||
#include "QsLog.h"
|
#include "QsLog.h"
|
||||||
|
|
||||||
|
using stefanfrings::HttpRequest;
|
||||||
|
using stefanfrings::HttpResponse;
|
||||||
|
|
||||||
LibrariesControllerV2::LibrariesControllerV2() { }
|
LibrariesControllerV2::LibrariesControllerV2() { }
|
||||||
|
|
||||||
void LibrariesControllerV2::service(HttpRequest & /* request */, HttpResponse &response)
|
void LibrariesControllerV2::service(HttpRequest & /* request */, HttpResponse &response)
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
This controller displays a HTML form and dumps the submitted input.
|
This controller displays a HTML form and dumps the submitted input.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class LibrariesControllerV2 : public HttpRequestHandler
|
class LibrariesControllerV2 : public stefanfrings::HttpRequestHandler
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DISABLE_COPY(LibrariesControllerV2)
|
Q_DISABLE_COPY(LibrariesControllerV2)
|
||||||
@ -18,7 +18,7 @@ public:
|
|||||||
LibrariesControllerV2();
|
LibrariesControllerV2();
|
||||||
|
|
||||||
/** Generates the response */
|
/** Generates the response */
|
||||||
void service(HttpRequest &request, HttpResponse &response) override;
|
void service(stefanfrings::HttpRequest &request, stefanfrings::HttpResponse &response) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // LIBRARIESCONTROLLER_H
|
#endif // LIBRARIESCONTROLLER_H
|
||||||
|
@ -13,6 +13,9 @@
|
|||||||
|
|
||||||
#include "db_helper.h"
|
#include "db_helper.h"
|
||||||
|
|
||||||
|
using stefanfrings::HttpRequest;
|
||||||
|
using stefanfrings::HttpResponse;
|
||||||
|
|
||||||
PageControllerV2::PageControllerV2() { }
|
PageControllerV2::PageControllerV2() { }
|
||||||
|
|
||||||
void PageControllerV2::service(HttpRequest &request, HttpResponse &response)
|
void PageControllerV2::service(HttpRequest &request, HttpResponse &response)
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include "httpresponse.h"
|
#include "httpresponse.h"
|
||||||
#include "httprequesthandler.h"
|
#include "httprequesthandler.h"
|
||||||
|
|
||||||
class PageControllerV2 : public HttpRequestHandler
|
class PageControllerV2 : public stefanfrings::HttpRequestHandler
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DISABLE_COPY(PageControllerV2)
|
Q_DISABLE_COPY(PageControllerV2)
|
||||||
@ -14,7 +14,7 @@ public:
|
|||||||
PageControllerV2();
|
PageControllerV2();
|
||||||
|
|
||||||
/** Generates the response */
|
/** Generates the response */
|
||||||
void service(HttpRequest &request, HttpResponse &response) override;
|
void service(stefanfrings::HttpRequest &request, stefanfrings::HttpResponse &response) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // PAGECONTROLLER_H
|
#endif // PAGECONTROLLER_H
|
||||||
|
@ -5,6 +5,9 @@
|
|||||||
|
|
||||||
#include "yacreader_server_data_helper.h"
|
#include "yacreader_server_data_helper.h"
|
||||||
|
|
||||||
|
using stefanfrings::HttpRequest;
|
||||||
|
using stefanfrings::HttpResponse;
|
||||||
|
|
||||||
ReadingComicsControllerV2::ReadingComicsControllerV2()
|
ReadingComicsControllerV2::ReadingComicsControllerV2()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -5,17 +5,17 @@
|
|||||||
#include "httpresponse.h"
|
#include "httpresponse.h"
|
||||||
#include "httprequesthandler.h"
|
#include "httprequesthandler.h"
|
||||||
|
|
||||||
class ReadingComicsControllerV2 : public HttpRequestHandler
|
class ReadingComicsControllerV2 : public stefanfrings::HttpRequestHandler
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DISABLE_COPY(ReadingComicsControllerV2)
|
Q_DISABLE_COPY(ReadingComicsControllerV2)
|
||||||
public:
|
public:
|
||||||
ReadingComicsControllerV2();
|
ReadingComicsControllerV2();
|
||||||
|
|
||||||
void service(HttpRequest &request, HttpResponse &response) override;
|
void service(stefanfrings::HttpRequest &request, stefanfrings::HttpResponse &response) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void serviceContent(const int &library, HttpResponse &response);
|
void serviceContent(const int &library, stefanfrings::HttpResponse &response);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // READINGCOMICSCONTROLLER_H
|
#endif // READINGCOMICSCONTROLLER_H
|
||||||
|
@ -5,6 +5,9 @@
|
|||||||
|
|
||||||
#include "yacreader_server_data_helper.h"
|
#include "yacreader_server_data_helper.h"
|
||||||
|
|
||||||
|
using stefanfrings::HttpRequest;
|
||||||
|
using stefanfrings::HttpResponse;
|
||||||
|
|
||||||
ReadingListContentControllerV2::ReadingListContentControllerV2()
|
ReadingListContentControllerV2::ReadingListContentControllerV2()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -5,17 +5,17 @@
|
|||||||
#include "httpresponse.h"
|
#include "httpresponse.h"
|
||||||
#include "httprequesthandler.h"
|
#include "httprequesthandler.h"
|
||||||
|
|
||||||
class ReadingListContentControllerV2 : public HttpRequestHandler
|
class ReadingListContentControllerV2 : public stefanfrings::HttpRequestHandler
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DISABLE_COPY(ReadingListContentControllerV2)
|
Q_DISABLE_COPY(ReadingListContentControllerV2)
|
||||||
public:
|
public:
|
||||||
ReadingListContentControllerV2();
|
ReadingListContentControllerV2();
|
||||||
|
|
||||||
void service(HttpRequest &request, HttpResponse &response) override;
|
void service(stefanfrings::HttpRequest &request, stefanfrings::HttpResponse &response) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void serviceContent(const int &library, const qulonglong &readingListId, HttpResponse &response);
|
void serviceContent(const int &library, const qulonglong &readingListId, stefanfrings::HttpResponse &response);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // READINGLISTCONTENTCONTROLLER_H
|
#endif // READINGLISTCONTENTCONTROLLER_H
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
#include "template.h"
|
#include "template.h"
|
||||||
#include "../static.h"
|
#include "../static.h"
|
||||||
|
|
||||||
|
using stefanfrings::HttpRequest;
|
||||||
|
using stefanfrings::HttpResponse;
|
||||||
|
|
||||||
ReadingListInfoControllerV2::ReadingListInfoControllerV2() { }
|
ReadingListInfoControllerV2::ReadingListInfoControllerV2() { }
|
||||||
|
|
||||||
void ReadingListInfoControllerV2::service(HttpRequest &request, HttpResponse &response)
|
void ReadingListInfoControllerV2::service(HttpRequest &request, HttpResponse &response)
|
||||||
|
@ -5,17 +5,17 @@
|
|||||||
#include "httpresponse.h"
|
#include "httpresponse.h"
|
||||||
#include "httprequesthandler.h"
|
#include "httprequesthandler.h"
|
||||||
|
|
||||||
class ReadingListInfoControllerV2 : public HttpRequestHandler
|
class ReadingListInfoControllerV2 : public stefanfrings::HttpRequestHandler
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DISABLE_COPY(ReadingListInfoControllerV2)
|
Q_DISABLE_COPY(ReadingListInfoControllerV2)
|
||||||
public:
|
public:
|
||||||
ReadingListInfoControllerV2();
|
ReadingListInfoControllerV2();
|
||||||
|
|
||||||
void service(HttpRequest &request, HttpResponse &response) override;
|
void service(stefanfrings::HttpRequest &request, stefanfrings::HttpResponse &response) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void serviceComics(const int &library, const qulonglong &readingListId, HttpResponse &response);
|
void serviceComics(const int &library, const qulonglong &readingListId, stefanfrings::HttpResponse &response);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // READINGLISTINFOCONTROLLER_V2_H
|
#endif // READINGLISTINFOCONTROLLER_V2_H
|
||||||
|
@ -4,6 +4,9 @@
|
|||||||
#include "reading_list.h"
|
#include "reading_list.h"
|
||||||
#include "yacreader_server_data_helper.h"
|
#include "yacreader_server_data_helper.h"
|
||||||
|
|
||||||
|
using stefanfrings::HttpRequest;
|
||||||
|
using stefanfrings::HttpResponse;
|
||||||
|
|
||||||
ReadingListsControllerV2::ReadingListsControllerV2()
|
ReadingListsControllerV2::ReadingListsControllerV2()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -5,17 +5,17 @@
|
|||||||
#include "httpresponse.h"
|
#include "httpresponse.h"
|
||||||
#include "httprequesthandler.h"
|
#include "httprequesthandler.h"
|
||||||
|
|
||||||
class ReadingListsControllerV2 : public HttpRequestHandler
|
class ReadingListsControllerV2 : public stefanfrings::HttpRequestHandler
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DISABLE_COPY(ReadingListsControllerV2)
|
Q_DISABLE_COPY(ReadingListsControllerV2)
|
||||||
public:
|
public:
|
||||||
ReadingListsControllerV2();
|
ReadingListsControllerV2();
|
||||||
|
|
||||||
void service(HttpRequest &request, HttpResponse &response) override;
|
void service(stefanfrings::HttpRequest &request, stefanfrings::HttpResponse &response) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void serviceContent(const int library, HttpResponse &response);
|
void serviceContent(const int library, stefanfrings::HttpResponse &response);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // READINGLISTSCONTROLLER_H
|
#endif // READINGLISTSCONTROLLER_H
|
||||||
|
@ -6,6 +6,9 @@
|
|||||||
#include "comic_db.h"
|
#include "comic_db.h"
|
||||||
#include "db_helper.h"
|
#include "db_helper.h"
|
||||||
|
|
||||||
|
using stefanfrings::HttpRequest;
|
||||||
|
using stefanfrings::HttpResponse;
|
||||||
|
|
||||||
SyncControllerV2::SyncControllerV2()
|
SyncControllerV2::SyncControllerV2()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#include "httpresponse.h"
|
#include "httpresponse.h"
|
||||||
#include "httprequesthandler.h"
|
#include "httprequesthandler.h"
|
||||||
|
|
||||||
class SyncControllerV2 : public HttpRequestHandler
|
class SyncControllerV2 : public stefanfrings::HttpRequestHandler
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DISABLE_COPY(SyncControllerV2)
|
Q_DISABLE_COPY(SyncControllerV2)
|
||||||
@ -16,7 +16,7 @@ public:
|
|||||||
SyncControllerV2();
|
SyncControllerV2();
|
||||||
|
|
||||||
/** Generates the response */
|
/** Generates the response */
|
||||||
void service(HttpRequest &request, HttpResponse &response) override;
|
void service(stefanfrings::HttpRequest &request, stefanfrings::HttpResponse &response) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SYNCCONTROLLER_H
|
#endif // SYNCCONTROLLER_H
|
||||||
|
@ -7,6 +7,9 @@
|
|||||||
|
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
|
||||||
|
using stefanfrings::HttpRequest;
|
||||||
|
using stefanfrings::HttpResponse;
|
||||||
|
|
||||||
TagContentControllerV2::TagContentControllerV2()
|
TagContentControllerV2::TagContentControllerV2()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include "httpresponse.h"
|
#include "httpresponse.h"
|
||||||
#include "httprequesthandler.h"
|
#include "httprequesthandler.h"
|
||||||
|
|
||||||
class TagContentControllerV2 : public HttpRequestHandler
|
class TagContentControllerV2 : public stefanfrings::HttpRequestHandler
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DISABLE_COPY(TagContentControllerV2)
|
Q_DISABLE_COPY(TagContentControllerV2)
|
||||||
@ -14,10 +14,10 @@ public:
|
|||||||
TagContentControllerV2();
|
TagContentControllerV2();
|
||||||
|
|
||||||
/** Generates the response */
|
/** Generates the response */
|
||||||
void service(HttpRequest &request, HttpResponse &response) override;
|
void service(stefanfrings::HttpRequest &request, stefanfrings::HttpResponse &response) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void serviceContent(const int &library, const qulonglong &tagId, HttpResponse &response);
|
void serviceContent(const int &library, const qulonglong &tagId, stefanfrings::HttpResponse &response);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // TAGCONTENTCONTROLLER_H
|
#endif // TAGCONTENTCONTROLLER_H
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
#include "template.h"
|
#include "template.h"
|
||||||
#include "../static.h"
|
#include "../static.h"
|
||||||
|
|
||||||
|
using stefanfrings::HttpRequest;
|
||||||
|
using stefanfrings::HttpResponse;
|
||||||
|
|
||||||
TagInfoControllerV2::TagInfoControllerV2() { }
|
TagInfoControllerV2::TagInfoControllerV2() { }
|
||||||
|
|
||||||
void TagInfoControllerV2::service(HttpRequest &request, HttpResponse &response)
|
void TagInfoControllerV2::service(HttpRequest &request, HttpResponse &response)
|
||||||
|
@ -5,17 +5,17 @@
|
|||||||
#include "httpresponse.h"
|
#include "httpresponse.h"
|
||||||
#include "httprequesthandler.h"
|
#include "httprequesthandler.h"
|
||||||
|
|
||||||
class TagInfoControllerV2 : public HttpRequestHandler
|
class TagInfoControllerV2 : public stefanfrings::HttpRequestHandler
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DISABLE_COPY(TagInfoControllerV2)
|
Q_DISABLE_COPY(TagInfoControllerV2)
|
||||||
public:
|
public:
|
||||||
TagInfoControllerV2();
|
TagInfoControllerV2();
|
||||||
|
|
||||||
void service(HttpRequest &request, HttpResponse &response) override;
|
void service(stefanfrings::HttpRequest &request, stefanfrings::HttpResponse &response) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void serviceComics(const int &library, const qulonglong &tagId, HttpResponse &response);
|
void serviceComics(const int &library, const qulonglong &tagId, stefanfrings::HttpResponse &response);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // TAGINFOCONTROLLER_V2_H
|
#endif // TAGINFOCONTROLLER_V2_H
|
||||||
|
@ -11,6 +11,9 @@
|
|||||||
|
|
||||||
#include "QsLog.h"
|
#include "QsLog.h"
|
||||||
|
|
||||||
|
using stefanfrings::HttpRequest;
|
||||||
|
using stefanfrings::HttpResponse;
|
||||||
|
|
||||||
TagsControllerV2::TagsControllerV2() { }
|
TagsControllerV2::TagsControllerV2() { }
|
||||||
|
|
||||||
void TagsControllerV2::service(HttpRequest &request, HttpResponse &response)
|
void TagsControllerV2::service(HttpRequest &request, HttpResponse &response)
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include "httpresponse.h"
|
#include "httpresponse.h"
|
||||||
#include "httprequesthandler.h"
|
#include "httprequesthandler.h"
|
||||||
|
|
||||||
class TagsControllerV2 : public HttpRequestHandler
|
class TagsControllerV2 : public stefanfrings::HttpRequestHandler
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DISABLE_COPY(TagsControllerV2)
|
Q_DISABLE_COPY(TagsControllerV2)
|
||||||
@ -14,7 +14,7 @@ public:
|
|||||||
TagsControllerV2();
|
TagsControllerV2();
|
||||||
|
|
||||||
/** Generates the response */
|
/** Generates the response */
|
||||||
void service(HttpRequest &request, HttpResponse &response) override;
|
void service(stefanfrings::HttpRequest &request, stefanfrings::HttpResponse &response) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // TAGSCONTROLLER_H
|
#endif // TAGSCONTROLLER_H
|
||||||
|
@ -11,6 +11,9 @@
|
|||||||
|
|
||||||
#include "QsLog.h"
|
#include "QsLog.h"
|
||||||
|
|
||||||
|
using stefanfrings::HttpRequest;
|
||||||
|
using stefanfrings::HttpResponse;
|
||||||
|
|
||||||
UpdateComicControllerV2::UpdateComicControllerV2() { }
|
UpdateComicControllerV2::UpdateComicControllerV2() { }
|
||||||
|
|
||||||
void UpdateComicControllerV2::service(HttpRequest &request, HttpResponse &response)
|
void UpdateComicControllerV2::service(HttpRequest &request, HttpResponse &response)
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include "httpresponse.h"
|
#include "httpresponse.h"
|
||||||
#include "httprequesthandler.h"
|
#include "httprequesthandler.h"
|
||||||
|
|
||||||
class UpdateComicControllerV2 : public HttpRequestHandler
|
class UpdateComicControllerV2 : public stefanfrings::HttpRequestHandler
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DISABLE_COPY(UpdateComicControllerV2)
|
Q_DISABLE_COPY(UpdateComicControllerV2)
|
||||||
@ -14,7 +14,7 @@ public:
|
|||||||
UpdateComicControllerV2();
|
UpdateComicControllerV2();
|
||||||
|
|
||||||
/** Generates the response */
|
/** Generates the response */
|
||||||
void service(HttpRequest &request, HttpResponse &response) override;
|
void service(stefanfrings::HttpRequest &request, stefanfrings::HttpResponse &response) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // UPDATECOMICCONTROLLER_H
|
#endif // UPDATECOMICCONTROLLER_H
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
#include "versioncontroller.h"
|
#include "versioncontroller.h"
|
||||||
|
|
||||||
|
using stefanfrings::HttpRequest;
|
||||||
|
using stefanfrings::HttpResponse;
|
||||||
|
|
||||||
VersionController::VersionController() { }
|
VersionController::VersionController() { }
|
||||||
|
|
||||||
void VersionController::service(HttpRequest &request, HttpResponse &response)
|
void VersionController::service(HttpRequest &request, HttpResponse &response)
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#include <QThread>
|
#include <QThread>
|
||||||
|
|
||||||
class VersionController : public HttpRequestHandler
|
class VersionController : public stefanfrings::HttpRequestHandler
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DISABLE_COPY(VersionController);
|
Q_DISABLE_COPY(VersionController);
|
||||||
@ -17,7 +17,7 @@ public:
|
|||||||
VersionController();
|
VersionController();
|
||||||
|
|
||||||
/** Generates the response */
|
/** Generates the response */
|
||||||
void service(HttpRequest &request, HttpResponse &response) override;
|
void service(stefanfrings::HttpRequest &request, stefanfrings::HttpResponse &response) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // VERSIONCONTROLLER_H
|
#endif // VERSIONCONTROLLER_H
|
||||||
|
@ -47,6 +47,11 @@
|
|||||||
|
|
||||||
#include "QsLog.h"
|
#include "QsLog.h"
|
||||||
|
|
||||||
|
using stefanfrings::HttpRequest;
|
||||||
|
using stefanfrings::HttpRequestHandler;
|
||||||
|
using stefanfrings::HttpResponse;
|
||||||
|
using stefanfrings::HttpSession;
|
||||||
|
|
||||||
QMutex RequestMapper::mutex;
|
QMutex RequestMapper::mutex;
|
||||||
|
|
||||||
RequestMapper::RequestMapper(QObject *parent)
|
RequestMapper::RequestMapper(QObject *parent)
|
||||||
|
@ -9,20 +9,20 @@
|
|||||||
#include "httprequesthandler.h"
|
#include "httprequesthandler.h"
|
||||||
#include <QMutex>
|
#include <QMutex>
|
||||||
|
|
||||||
class RequestMapper : public HttpRequestHandler
|
class RequestMapper : public stefanfrings::HttpRequestHandler
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DISABLE_COPY(RequestMapper)
|
Q_DISABLE_COPY(RequestMapper)
|
||||||
public:
|
public:
|
||||||
RequestMapper(QObject *parent = nullptr);
|
RequestMapper(QObject *parent = nullptr);
|
||||||
|
|
||||||
void service(HttpRequest &request, HttpResponse &response) override;
|
void service(stefanfrings::HttpRequest &request, stefanfrings::HttpResponse &response) override;
|
||||||
void loadSessionV1(HttpRequest &request, HttpResponse &response);
|
void loadSessionV1(stefanfrings::HttpRequest &request, stefanfrings::HttpResponse &response);
|
||||||
void loadSessionV2(HttpRequest &request, HttpResponse &response);
|
void loadSessionV2(stefanfrings::HttpRequest &request, stefanfrings::HttpResponse &response);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void serviceV1(HttpRequest &request, HttpResponse &response);
|
void serviceV1(stefanfrings::HttpRequest &request, stefanfrings::HttpResponse &response);
|
||||||
void serviceV2(HttpRequest &request, HttpResponse &response);
|
void serviceV2(stefanfrings::HttpRequest &request, stefanfrings::HttpResponse &response);
|
||||||
|
|
||||||
static QMutex mutex;
|
static QMutex mutex;
|
||||||
};
|
};
|
||||||
|
@ -24,6 +24,14 @@
|
|||||||
/** Short description of this application */
|
/** Short description of this application */
|
||||||
#define DESCRIPTION "Comic reader and organizer"
|
#define DESCRIPTION "Comic reader and organizer"
|
||||||
|
|
||||||
|
using stefanfrings::HttpListener;
|
||||||
|
using stefanfrings::HttpRequest;
|
||||||
|
using stefanfrings::HttpResponse;
|
||||||
|
|
||||||
|
using stefanfrings::HttpSessionStore;
|
||||||
|
using stefanfrings::StaticFileController;
|
||||||
|
using stefanfrings::TemplateCache;
|
||||||
|
|
||||||
void Startup::start()
|
void Startup::start()
|
||||||
{
|
{
|
||||||
// Initialize the core application
|
// Initialize the core application
|
||||||
@ -126,6 +134,11 @@ void Startup::start()
|
|||||||
|
|
||||||
listener = new HttpListener(listenerSettings, new RequestMapper(app), app);
|
listener = new HttpListener(listenerSettings, new RequestMapper(app), app);
|
||||||
|
|
||||||
|
// if the requested port is busy, use random port
|
||||||
|
if (!listener->isListening()) {
|
||||||
|
listener->QTcpServer::listen(QHostAddress::Any, 0);
|
||||||
|
}
|
||||||
|
|
||||||
qDebug("ServiceHelper: Service has started");
|
qDebug("ServiceHelper: Service has started");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,7 +8,10 @@
|
|||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
|
namespace stefanfrings {
|
||||||
class HttpListener;
|
class HttpListener;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Helper class to install and run the application as a windows
|
Helper class to install and run the application as a windows
|
||||||
service.
|
service.
|
||||||
@ -17,7 +20,7 @@ class Startup
|
|||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
//QTcpServer
|
//QTcpServer
|
||||||
HttpListener *listener;
|
stefanfrings::HttpListener *listener;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
|
@ -9,6 +9,11 @@
|
|||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
|
using stefanfrings::HttpResponse;
|
||||||
|
using stefanfrings::HttpSessionStore;
|
||||||
|
using stefanfrings::StaticFileController;
|
||||||
|
using stefanfrings::TemplateLoader;
|
||||||
|
|
||||||
QString Static::configDir = nullptr;
|
QString Static::configDir = nullptr;
|
||||||
|
|
||||||
TemplateLoader *Static::templateLoader = nullptr;
|
TemplateLoader *Static::templateLoader = nullptr;
|
||||||
|
@ -47,15 +47,15 @@ public:
|
|||||||
static QString getConfigDir();
|
static QString getConfigDir();
|
||||||
|
|
||||||
/** Cache for template files */
|
/** Cache for template files */
|
||||||
static TemplateLoader *templateLoader;
|
static stefanfrings::TemplateLoader *templateLoader;
|
||||||
|
|
||||||
/** Storage for session cookies */
|
/** Storage for session cookies */
|
||||||
static HttpSessionStore *sessionStore;
|
static stefanfrings::HttpSessionStore *sessionStore;
|
||||||
|
|
||||||
static YACReaderHttpSessionStore *yacreaderSessionStore;
|
static YACReaderHttpSessionStore *yacreaderSessionStore;
|
||||||
|
|
||||||
/** Controller for static files */
|
/** Controller for static files */
|
||||||
static StaticFileController *staticFileController;
|
static stefanfrings::StaticFileController *staticFileController;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/** Directory of the main config file */
|
/** Directory of the main config file */
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
#include "httpsessionstore.h"
|
#include "httpsessionstore.h"
|
||||||
|
|
||||||
|
using stefanfrings::HttpSessionStore;
|
||||||
|
|
||||||
YACReaderHttpSessionStore::YACReaderHttpSessionStore(HttpSessionStore *sessionStore, QObject *parent)
|
YACReaderHttpSessionStore::YACReaderHttpSessionStore(HttpSessionStore *sessionStore, QObject *parent)
|
||||||
: QObject(parent), sessionStore(sessionStore)
|
: QObject(parent), sessionStore(sessionStore)
|
||||||
{
|
{
|
||||||
|
@ -4,14 +4,16 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QtCore>
|
#include <QtCore>
|
||||||
|
|
||||||
|
namespace stefanfrings {
|
||||||
class HttpSessionStore;
|
class HttpSessionStore;
|
||||||
|
}
|
||||||
class YACReaderHttpSession;
|
class YACReaderHttpSession;
|
||||||
|
|
||||||
class YACReaderHttpSessionStore : public QObject
|
class YACReaderHttpSessionStore : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit YACReaderHttpSessionStore(HttpSessionStore *sessionStore, QObject *parent = nullptr);
|
explicit YACReaderHttpSessionStore(stefanfrings::HttpSessionStore *sessionStore, QObject *parent = nullptr);
|
||||||
|
|
||||||
void addYACReaderHttpSession(const QByteArray &httpSessionId, YACReaderHttpSession *yacreaderHttpSession);
|
void addYACReaderHttpSession(const QByteArray &httpSessionId, YACReaderHttpSession *yacreaderHttpSession);
|
||||||
YACReaderHttpSession *getYACReaderSessionHttpSession(const QByteArray &httpSessionId);
|
YACReaderHttpSession *getYACReaderSessionHttpSession(const QByteArray &httpSessionId);
|
||||||
@ -22,7 +24,7 @@ public slots:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
QMap<QByteArray, YACReaderHttpSession *> sessions;
|
QMap<QByteArray, YACReaderHttpSession *> sessions;
|
||||||
HttpSessionStore *sessionStore;
|
stefanfrings::HttpSessionStore *sessionStore;
|
||||||
QTimer cleanupTimer;
|
QTimer cleanupTimer;
|
||||||
|
|
||||||
QMutex mutex;
|
QMutex mutex;
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||||
<link rel="stylesheet" href="/css/reset.css" type="text/css" />
|
<link rel="stylesheet" href="/css/reset.css" type="text/css" />
|
||||||
<link rel="stylesheet" href="/css/styles.css" type="text/css" />
|
<link rel="stylesheet" href="/css/styles_{device}.css" type="text/css" />
|
||||||
<title>Folder</title>
|
<title>Folder</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="content">
|
<div id="content">
|
||||||
@ -15,15 +15,17 @@
|
|||||||
|
|
||||||
|
|
||||||
<div id="folder-subheader1">
|
<div id="folder-subheader1">
|
||||||
|
{if device.ipad}
|
||||||
<h1>{folder.name}</h1>
|
<h1>{folder.name}</h1>
|
||||||
|
{end device.ipad}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id ="folder-subheader2">
|
<div id ="folder-subheader2">
|
||||||
<a class="path" href="/">Libraries</a> <img class="indicator" src="/images/indicator.png" style="width: 5px"/> <a class="path" href="{library.url}">{library.name}</a> {loop path} <img class="indicator" src="/images/indicator.png" style="width: 5px"/> <a class="path" href="{path.url}">{path.name}</a> {end path}
|
<a class="pat" href="/">Libraries</a> <img class="indicator" src="/images/indicator{display}.png" style="width: 5px"/> <a class="path" href="{library.url}">{library.name}</a> {loop path} <img class="indicator" src="/images/indicator.png" style="width: 5px"/> <a class="path" href="{path.url}">{path.name}</a> {end path}
|
||||||
</div>
|
</div>
|
||||||
<div id ="header-combos">
|
<div id ="header-combos">
|
||||||
{if pageIndex}
|
{if pageIndex}
|
||||||
<img class="comboIndicator" src="/images/combo.png"/>
|
<img class="comboIndicator" src="/images/combo{display}.png"/>
|
||||||
<select name="indexnumber" id="indexnumber" onchange="navigateTo(this, 'window', false);">
|
<select name="indexnumber" id="indexnumber" onchange="navigateTo(this, 'window', false);">
|
||||||
<option value="" disabled selected>{page}/{pages}</option>
|
<option value="" disabled selected>{page}/{pages}</option>
|
||||||
{loop page}
|
{loop page}
|
||||||
@ -33,7 +35,7 @@
|
|||||||
{end pageIndex}
|
{end pageIndex}
|
||||||
|
|
||||||
{if alphaIndex}
|
{if alphaIndex}
|
||||||
<img class="comboIndicator" src="/images/combo.png"/>
|
<img class="comboIndicator" src="/images/combo{display}.png"/>
|
||||||
<select name="indexalpha" id="indexalpha" onchange="navigateTo(this, 'window', false);">
|
<select name="indexalpha" id="indexalpha" onchange="navigateTo(this, 'window', false);">
|
||||||
<option value="" disabled selected>index</option>
|
<option value="" disabled selected>index</option>
|
||||||
{loop index}
|
{loop index}
|
||||||
@ -52,13 +54,13 @@
|
|||||||
<li>
|
<li>
|
||||||
<div class="{element.class}">
|
<div class="{element.class}">
|
||||||
{element.cover.browse} <img style="width: 80px" src="{element.image.url}"/> {element.cover.browse.end}
|
{element.cover.browse} <img style="width: 80px" src="{element.image.url}"/> {element.cover.browse.end}
|
||||||
</div>
|
</div>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<div class="title"><p>{element.name}</p>
|
<div class="title"><p>{element.name}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="elementInfo"> {element.pages} {element.size}
|
<div class="elementInfo"> {element.pages} {element.size}
|
||||||
</div>
|
</div>
|
||||||
<div class="buttons"> {element.download} {element.read} {element.browse}
|
<div class="buttons"> {element.download} {element.read} {element.browse}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{element.status}
|
{element.status}
|
||||||
@ -75,7 +77,7 @@
|
|||||||
|
|
||||||
<div class="index">
|
<div class="index">
|
||||||
<ul id="alphaIndex">
|
<ul id="alphaIndex">
|
||||||
{loop index}
|
{loop index}
|
||||||
|
|
||||||
<li> <a href="{index.url}"> {index.indexname} </a> </li>
|
<li> <a href="{index.url}"> {index.indexname} </a> </li>
|
||||||
|
|
||||||
@ -94,7 +96,7 @@
|
|||||||
<!-- <li> <a class="first" href="{page.first}">first</a> </li>
|
<!-- <li> <a class="first" href="{page.first}">first</a> </li>
|
||||||
<li> <a class="previous" href="{page.previous}">previous</a> </li>-->
|
<li> <a class="previous" href="{page.previous}">previous</a> </li>-->
|
||||||
|
|
||||||
{loop page} <li> <a class="{page.current}" href="{page.url}"> {page.number} </a> </li> {end page}
|
{loop page} <li> <a class="{page.current}" href="{page.url}"> {page.number} </a> </li> {end page}
|
||||||
|
|
||||||
<!-- <li> <a class="next" href="{page.next}">next</a> </li>
|
<!-- <li> <a class="next" href="{page.next}">next</a> </li>
|
||||||
<li> <a class="last" href="{page.last}">last</a> </li>-->
|
<li> <a class="last" href="{page.last}">last</a> </li>-->
|
||||||
@ -107,7 +109,7 @@
|
|||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function navigateTo(sel, target) {
|
function navigateTo(sel, target) {
|
||||||
window[target].location.href = sel.options[sel.selectedIndex].value;
|
window[target].location.href = sel.options[sel.selectedIndex].value;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -1,114 +0,0 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
|
||||||
<link rel="stylesheet" href="/css/reset.css" type="text/css" />
|
|
||||||
<link rel="stylesheet" href="/css/styles.css" type="text/css" />
|
|
||||||
<title>Folder</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="content">
|
|
||||||
<div>
|
|
||||||
|
|
||||||
<div id="folder-header">
|
|
||||||
<div id="topIndex"> {if pageIndex} <a class="previous" href="{page.previous}">previous</a> <a class="next" href="{page.next}">next</a> {end pageIndex} <a class="up" href="{upurl}">up</a> </div>
|
|
||||||
|
|
||||||
|
|
||||||
<div id="folder-subheader1">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id ="folder-subheader2">
|
|
||||||
<a class="path" href="/">Libraries</a> <!--<img class="indicator" src="/images/indicator.png" style="width: 5px"/> <a class="path" href="{library.url}">{library.name}</a> -->{loop path} <img class="indicator" src="/images/indicator.png" style="width: 5px"/> <a class="path" href="{path.url}">{path.name}</a> {end path}
|
|
||||||
</div>
|
|
||||||
<div id ="header-combos">
|
|
||||||
{if pageIndex}
|
|
||||||
<img class="comboIndicator" src="/images/combo.png"/>
|
|
||||||
<select name="indexnumber" id="indexnumber" onchange="navigateTo(this, 'window', false);">
|
|
||||||
<option value="" disabled selected>{page}/{pages}</option>
|
|
||||||
{loop page}
|
|
||||||
<option value="{page.url}">{page.number}</option>
|
|
||||||
{end page}
|
|
||||||
</select>
|
|
||||||
{end pageIndex}
|
|
||||||
|
|
||||||
{if alphaIndex}
|
|
||||||
<img class="comboIndicator" src="/images/combo.png"/>
|
|
||||||
<select name="indexalpha" id="indexalpha" onchange="navigateTo(this, 'window', false);">
|
|
||||||
<option value="" disabled selected>index</option>
|
|
||||||
{loop index}
|
|
||||||
<option value="{index.url}">{index.indexname}</option>
|
|
||||||
{end index}
|
|
||||||
</select>
|
|
||||||
{end alphaIndex}
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!--<a href="javascript:javascript:history.go(-1)">up</a>-->
|
|
||||||
<div class="folderContent">
|
|
||||||
<ul id="itemContainer">
|
|
||||||
{loop element}
|
|
||||||
<li>
|
|
||||||
<div class="{element.class}">
|
|
||||||
{element.cover.browse} <img style="width: 80px" src="{element.image.url}"/> {element.cover.browse.end}
|
|
||||||
</div>
|
|
||||||
<div class="info">
|
|
||||||
<div class="title"><p>{element.name}</p>
|
|
||||||
</div>
|
|
||||||
<div class="elementInfo"> {element.pages} {element.size}
|
|
||||||
</div>
|
|
||||||
<div class="buttons"> {element.download} {element.read} {element.browse}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{element.status}
|
|
||||||
</li>
|
|
||||||
{end element}
|
|
||||||
</ul>
|
|
||||||
<div class="clear"> </div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{if index}
|
|
||||||
<div id="indexes">
|
|
||||||
{if alphaIndex}
|
|
||||||
|
|
||||||
<div class="index">
|
|
||||||
<ul id="alphaIndex">
|
|
||||||
{loop index}
|
|
||||||
|
|
||||||
<li> <a href="{index.url}"> {index.indexname} </a> </li>
|
|
||||||
|
|
||||||
{end index}
|
|
||||||
</ul>
|
|
||||||
<div class="clear"> </div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{end alphaIndex}
|
|
||||||
|
|
||||||
|
|
||||||
{if pageIndex}
|
|
||||||
|
|
||||||
<div class="index">
|
|
||||||
<ul id="pageIndex">
|
|
||||||
<!-- <li> <a class="first" href="{page.first}">first</a> </li>
|
|
||||||
<li> <a class="previous" href="{page.previous}">previous</a> </li>-->
|
|
||||||
|
|
||||||
{loop page} <li> <a class="{page.current}" href="{page.url}"> {page.number} </a> </li> {end page}
|
|
||||||
|
|
||||||
<!-- <li> <a class="next" href="{page.next}">next</a> </li>
|
|
||||||
<li> <a class="last" href="{page.last}">last</a> </li>-->
|
|
||||||
</ul>
|
|
||||||
<div class="clear"> </div>
|
|
||||||
</div>
|
|
||||||
{end pageIndex}
|
|
||||||
</div>
|
|
||||||
{end index}
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
function navigateTo(sel, target) {
|
|
||||||
window[target].location.href = sel.options[sel.selectedIndex].value;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,21 +1,21 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||||
<link rel="stylesheet" href="/css/reset.css" type="text/css" />
|
<link rel="stylesheet" href="/css/reset.css" type="text/css" />
|
||||||
<link rel="stylesheet" href="/css/styles.css" type="text/css" />
|
<link rel="stylesheet" href="/css/styles_{device}.css" type="text/css" />
|
||||||
<title>Libraries</title>
|
<title>Libraries</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="contentLibraries">
|
<div id="contentLibraries">
|
||||||
<h1>Libraries</h1>
|
<h1>Libraries</h1>
|
||||||
<p>
|
<p>
|
||||||
<ul id="librariesList">
|
<ul id="librariesList">
|
||||||
{loop library}
|
{loop library}
|
||||||
<li>
|
<li>
|
||||||
<div class="library-icon"> <img width="14px" height="18px" src="../images/library.png" /> </div>
|
<div class="library-icon"> <img width="14px" height="18px" src="../images/library{display}.png" /> </div>
|
||||||
<div class="library-link"> {library.label} </div>
|
<div class="library-link"> {library.label} </div>
|
||||||
<div class="library-indicator"> <img width="5px" height="9px" src="../images/indicator.png" /> </div>
|
<div class="library-indicator"> <img width="5px" height="9px" src="../images/indicator{display}.png" /> </div>
|
||||||
<a href="/library/{library.name}/folder/1"> </a>
|
<a href="/library/{library.name}/folder/1"> </a>
|
||||||
<div class="clear"> </div>
|
<div class="clear"> </div>
|
||||||
</li>
|
</li>
|
||||||
@ -24,4 +24,4 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@ -1,27 +0,0 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
|
||||||
<link rel="stylesheet" href="/css/reset.css" type="text/css" />
|
|
||||||
<link rel="stylesheet" href="/css/styles.css" type="text/css" />
|
|
||||||
<title>Libraries</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="contentLibraries">
|
|
||||||
<h1>Libraries</h1>
|
|
||||||
<p>
|
|
||||||
<ul id="librariesList">
|
|
||||||
{loop library}
|
|
||||||
<li>
|
|
||||||
<div class="library-icon"> <img width="14px" height="18px" src="../images/library.png" /> </div>
|
|
||||||
<div class="library-link"> {library.label} </div>
|
|
||||||
<div class="library-indicator"> <img width="5px" height="9px" src="../images/indicator.png" /> </div>
|
|
||||||
<a href="/library/{library.name}/folder/1"> </a>
|
|
||||||
<div class="clear"> </div>
|
|
||||||
</li>
|
|
||||||
{end library}
|
|
||||||
</ul>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Reference in New Issue
Block a user