mirror of
https://github.com/ankitects/anki.git
synced 2025-11-06 20:57:13 -05:00
only use jquery ui in deck browser screen
This commit is contained in:
parent
8e6e7bb39f
commit
b2919f285d
2 changed files with 6 additions and 3 deletions
|
|
@ -5,6 +5,7 @@
|
|||
from aqt.qt import *
|
||||
from aqt.utils import askUser, getOnlyText, openLink, showWarning
|
||||
from anki.utils import isMac
|
||||
import anki.js
|
||||
from anki.errors import DeckRenameError
|
||||
import aqt
|
||||
|
||||
|
|
@ -105,7 +106,8 @@ body { margin: 1em; -webkit-user-select: none; }
|
|||
def _renderPage(self):
|
||||
css = self.mw.sharedCSS + self._css
|
||||
tree = self._renderDeckTree(self.mw.col.sched.deckDueTree())
|
||||
self.web.stdHtml(self._body%dict(tree=tree), css=css)
|
||||
self.web.stdHtml(self._body%dict(tree=tree), css=css,
|
||||
js=anki.js.jquery+anki.js.ui)
|
||||
self._drawButtons()
|
||||
|
||||
def _renderDeckTree(self, nodes, depth=0):
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ class AnkiWebView(QWebView):
|
|||
def setHtml(self, html, loadCB=None):
|
||||
self._loadFinishedCB = loadCB
|
||||
QWebView.setHtml(self, html)
|
||||
def stdHtml(self, body, css="", bodyClass="", loadCB=None, head=""):
|
||||
def stdHtml(self, body, css="", bodyClass="", loadCB=None, js=None, head=""):
|
||||
if isMac:
|
||||
button = "font-weight: bold; height: 24px;"
|
||||
else:
|
||||
|
|
@ -98,7 +98,8 @@ button {
|
|||
|
||||
</head>
|
||||
<body class="%s">%s</body></html>""" % (
|
||||
fontForPlatform(), button, css, anki.js.all, head, bodyClass, body), loadCB)
|
||||
fontForPlatform(), button, css, js or anki.js.jquery, head,
|
||||
bodyClass, body), loadCB)
|
||||
def setBridge(self, bridge):
|
||||
self._bridge.setBridge(bridge)
|
||||
def eval(self, js):
|
||||
|
|
|
|||
Loading…
Reference in a new issue