Commit 69ff8708 authored by Laurent Montel's avatar Laurent Montel 😁

Fix add/remove yellow mark

parent c6b390c7
......@@ -2951,7 +2951,7 @@ void ViewerPrivate::scrollToAttachment(KMime::Content *node)
{
const QString indexStr = node->index().toString();
// The anchors for this are created in ObjectTreeParser::parseObjectTree()
mViewer->scrollToAnchor(QLatin1String("att") + indexStr);
mViewer->scrollToAnchor(QLatin1String("attachmentDiv") + indexStr);
// Remove any old color markings which might be there
const KMime::Content *root = node->topLevel();
......
......@@ -295,15 +295,12 @@ void MailWebEngineView::setElementByIdVisible(const QString &id, bool visible)
void MailWebEngineView::removeAttachmentMarking(const QString &id)
{
runJavaScriptInWordId(WebEngineViewer::WebEngineScript::removeStyleToElement(QLatin1String("*#")
+ id));
runJavaScriptInWordId(WebEngineViewer::WebEngineScript::removeStyleToElement(id));
}
void MailWebEngineView::markAttachment(const QString &id, const QString &style)
{
//TODO verify "*#" + id
runJavaScriptInWordId(WebEngineViewer::WebEngineScript::setStyleToElement(QLatin1String("*#")
+ id, style));
runJavaScriptInWordId(WebEngineViewer::WebEngineScript::setStyleToElement(id, style));
}
void MailWebEngineView::scrollToAnchor(const QString &anchor)
......
......@@ -17,7 +17,7 @@
Boston, MA 02110-1301, USA.
*/
#include "webenginescript.h"
#include <QDebug>
using namespace WebEngineViewer;
QString WebEngineScript::findAllImages()
......@@ -156,7 +156,7 @@ QString WebEngineScript::scrollDown(int pixel)
QString WebEngineScript::scrollToPosition(const QPoint &pos)
{
const QString source = QStringLiteral("window.scrollTo(%1, %2); [window.scrollX, window.scrollY];").arg(pos.x(), pos.y());
const QString source = QStringLiteral("window.scrollTo(%1, %2); [window.scrollX, window.scrollY];").arg(pos.x()).arg(pos.y());
return source;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment