mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 13:04:28 -04:00
Corregida la navegaci?n (up) en las p?ginas
Corregido el ancho de los botones "importing browse"
This commit is contained in:
@ -61,10 +61,39 @@ void FolderController::service(HttpRequest& request, HttpResponse& response)
|
||||
//QString currentPath = session.get("currentPath").toString();
|
||||
//QStringList pathSize = currentPath.split("/").last().toInt;
|
||||
|
||||
bool fromUp = false;
|
||||
|
||||
QMultiMap<QByteArray,QByteArray> map = request.getParameterMap();
|
||||
if(map.contains("up"))
|
||||
fromUp = true;
|
||||
|
||||
int upPage = 0;
|
||||
|
||||
if(backId == 1 && parentId == 1)
|
||||
{
|
||||
session.pushPage(page);
|
||||
t.setVariable(QString("upurl"),"/?page=0");
|
||||
}
|
||||
else
|
||||
t.setVariable(QString("upurl"),"/library/" + QUrl::toPercentEncoding(libraryName) + "/folder/" +QString("%1").arg(backId));//.arg(upPage));
|
||||
{
|
||||
if(fromUp)
|
||||
{
|
||||
session.popPage();
|
||||
upPage = session.topPage();
|
||||
page = upPage;
|
||||
}
|
||||
else //este nivel puede haberse cargado por primera vez <20> puede que estemos navegando horizontalmente
|
||||
if(p.length() == 0) // acabamos de entrar
|
||||
{
|
||||
session.pushPage(page);
|
||||
}
|
||||
else //navegaci<63>n horizontal
|
||||
{
|
||||
session.popPage();
|
||||
session.pushPage(page);
|
||||
}
|
||||
t.setVariable(QString("upurl"),"/library/" + QUrl::toPercentEncoding(libraryName) + "/folder/" +QString("%1?page=%2&up=true").arg(backId).arg(upPage));
|
||||
}
|
||||
|
||||
/*if(currentPath.length()>0)
|
||||
{
|
||||
|
@ -10,7 +10,7 @@ void LibrariesController::service(HttpRequest& request, HttpResponse& response)
|
||||
{
|
||||
HttpSession session=Static::sessionStore->getSession(request,response);
|
||||
session.set("ySession","ok");
|
||||
|
||||
session.clearNavigationPath();
|
||||
response.setHeader("Content-Type", "text/html; charset=ISO-8859-1");
|
||||
response.setHeader("Connection","close");
|
||||
|
||||
|
@ -281,3 +281,27 @@ void HttpSession::setDisplayType(const QString & display)
|
||||
dataPtr->yacreaderSessionData.display = display;
|
||||
}
|
||||
}
|
||||
|
||||
void HttpSession::clearNavigationPath()
|
||||
{
|
||||
if(dataPtr)
|
||||
dataPtr->yacreaderSessionData.navigationPath.clear();
|
||||
}
|
||||
|
||||
int HttpSession::popPage()
|
||||
{
|
||||
if(dataPtr)
|
||||
return dataPtr->yacreaderSessionData.navigationPath.pop();
|
||||
}
|
||||
|
||||
void HttpSession::pushPage(int page)
|
||||
{
|
||||
if(dataPtr)
|
||||
dataPtr->yacreaderSessionData.navigationPath.push(page);
|
||||
}
|
||||
|
||||
int HttpSession::topPage()
|
||||
{
|
||||
if(dataPtr)
|
||||
return dataPtr->yacreaderSessionData.navigationPath.top();
|
||||
}
|
@ -114,6 +114,11 @@ public:
|
||||
void setDeviceType(const QString & device);
|
||||
void setDisplayType(const QString & display);
|
||||
|
||||
void clearNavigationPath();
|
||||
int popPage();
|
||||
void pushPage(int page);
|
||||
int topPage();
|
||||
|
||||
private:
|
||||
|
||||
struct YACReaderSessionData {
|
||||
@ -125,6 +130,9 @@ private:
|
||||
QString device;
|
||||
QString display;
|
||||
qulonglong comicId;
|
||||
|
||||
QStack<int> navigationPath;
|
||||
|
||||
Comic * comic;
|
||||
};
|
||||
|
||||
|
@ -54,7 +54,7 @@ padding: 8px 0px 0px 0px;
|
||||
float: left;
|
||||
position: relative;
|
||||
height: 115px;
|
||||
width: 130px;
|
||||
width: 135px;
|
||||
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ padding: 8px 0px 0px 0px;
|
||||
float: left;
|
||||
position: relative;
|
||||
height: 110px;
|
||||
width: 155px;
|
||||
width: 160px;
|
||||
}
|
||||
|
||||
.buttons
|
||||
|
Reference in New Issue
Block a user