mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
remove the js resources and use the ones bundled with libanki instead
This commit is contained in:
parent
c5a109dca0
commit
9e20c979fb
4 changed files with 4 additions and 22 deletions
|
@ -7,6 +7,7 @@ from PyQt4.QtCore import *
|
||||||
from PyQt4.QtGui import *
|
from PyQt4.QtGui import *
|
||||||
from PyQt4.QtWebKit import QWebPage, QWebView
|
from PyQt4.QtWebKit import QWebPage, QWebView
|
||||||
from PyQt4 import pyqtconfig
|
from PyQt4 import pyqtconfig
|
||||||
|
import anki.js
|
||||||
QtConfig = pyqtconfig.Configuration()
|
QtConfig = pyqtconfig.Configuration()
|
||||||
|
|
||||||
# Bridge for Qt<->JS
|
# Bridge for Qt<->JS
|
||||||
|
@ -82,10 +83,10 @@ class AnkiWebView(QWebView):
|
||||||
def stdHtml(self, body, css="", bodyClass="", loadCB=None):
|
def stdHtml(self, body, css="", bodyClass="", loadCB=None):
|
||||||
self.setHtml("""
|
self.setHtml("""
|
||||||
<html><head><style>%s</style>
|
<html><head><style>%s</style>
|
||||||
<script src="qrc:/jquery.min.js"></script>
|
<script>%s</script>
|
||||||
<script src="qrc:/jquery.flot.min.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
<body class="%s">%s</body></html>""" % (css, bodyClass, body), loadCB)
|
<body class="%s">%s</body></html>""" % (
|
||||||
|
css, anki.js.all, bodyClass, body), loadCB)
|
||||||
# ensure we're focused
|
# ensure we're focused
|
||||||
self.setFocus()
|
self.setFocus()
|
||||||
def setBridge(self, bridge):
|
def setBridge(self, bridge):
|
||||||
|
|
|
@ -94,7 +94,5 @@
|
||||||
<file>icons/text_under.png</file>
|
<file>icons/text_under.png</file>
|
||||||
<file>icons/view-pim-news.png</file>
|
<file>icons/view-pim-news.png</file>
|
||||||
<file>icons/view_text.png</file>
|
<file>icons/view_text.png</file>
|
||||||
<file>jquery.min.js</file>
|
|
||||||
<file>jquery.flot.min.js</file>
|
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
1
designer/jquery.flot.min.js
vendored
1
designer/jquery.flot.min.js
vendored
File diff suppressed because one or more lines are too long
16
designer/jquery.min.js
vendored
16
designer/jquery.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue