remove the js resources and use the ones bundled with libanki instead

This commit is contained in:
Damien Elmes 2011-03-25 18:36:16 +09:00
parent c5a109dca0
commit 9e20c979fb
4 changed files with 4 additions and 22 deletions

View file

@ -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):

View file

@ -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>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long