Avoid building jquery to its own directory
This commit is contained in:
parent
37dcdcc4c0
commit
98407c3fea
@ -308,7 +308,7 @@ class CardLayout(QDialog):
|
||||
qconnect(pform.preview_settings.clicked, self.on_preview_settings)
|
||||
|
||||
jsinc = [
|
||||
"js/vendor/jquery/jquery.min.js",
|
||||
"js/vendor/jquery.min.js",
|
||||
"js/vendor/browsersel.js",
|
||||
"js/mathjax.js",
|
||||
"js/vendor/mathjax/tex-chtml.js",
|
||||
|
23
qt/aqt/data/web/js/vendor/BUILD.bazel
vendored
23
qt/aqt/data/web/js/vendor/BUILD.bazel
vendored
@ -1,8 +1,23 @@
|
||||
load("//ts:jquery.bzl", "copy_jquery")
|
||||
|
||||
copy_jquery(
|
||||
name = "jquery",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
|
||||
files = [
|
||||
"jquery",
|
||||
]
|
||||
|
||||
directories = [
|
||||
"mathjax",
|
||||
]
|
||||
|
||||
filegroup(
|
||||
name = "vendor",
|
||||
srcs = glob(["*.js"]) + [
|
||||
"//qt/aqt/data/web/js/vendor/mathjax",
|
||||
"//qt/aqt/data/web/js/vendor/jquery",
|
||||
],
|
||||
srcs = glob(["*.js"])
|
||||
+ ["//qt/aqt/data/web/js/vendor:{}".format(file) for file in files]
|
||||
+ ["//qt/aqt/data/web/js/vendor/{}".format(dir) for dir in directories],
|
||||
visibility = ["//qt:__subpackages__"],
|
||||
)
|
||||
|
6
qt/aqt/data/web/js/vendor/jquery/BUILD.bazel
vendored
6
qt/aqt/data/web/js/vendor/jquery/BUILD.bazel
vendored
@ -1,6 +0,0 @@
|
||||
load("//ts:jquery.bzl", "copy_jquery")
|
||||
|
||||
copy_jquery(
|
||||
name = "jquery",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
@ -124,7 +124,7 @@ class DeckBrowser:
|
||||
self._body % content.__dict__,
|
||||
css=["css/deckbrowser.css"],
|
||||
js=[
|
||||
"js/vendor/jquery/jquery.min.js",
|
||||
"js/vendor/jquery.min.js",
|
||||
"js/vendor/jquery-ui.js",
|
||||
"js/deckbrowser.js",
|
||||
],
|
||||
|
@ -217,7 +217,7 @@ class Editor:
|
||||
self.web.stdHtml(
|
||||
_html % (bgcol, bgcol, topbuts, tr(TR.EDITING_SHOW_DUPLICATES)),
|
||||
css=["css/editor.css"],
|
||||
js=["js/vendor/jquery/jquery.min.js", "js/editor.js"],
|
||||
js=["js/vendor/jquery.min.js", "js/editor.js"],
|
||||
context=self,
|
||||
)
|
||||
|
||||
|
@ -173,7 +173,7 @@ class Overview:
|
||||
self.web.stdHtml(
|
||||
self._body % content.__dict__,
|
||||
css=["css/overview.css"],
|
||||
js=["js/vendor/jquery/jquery.min.js", "js/overview.js"],
|
||||
js=["js/vendor/jquery.min.js", "js/overview.js"],
|
||||
context=self,
|
||||
)
|
||||
|
||||
|
@ -110,7 +110,7 @@ class Previewer(QDialog):
|
||||
|
||||
def _setup_web_view(self):
|
||||
jsinc = [
|
||||
"js/vendor/jquery/jquery.min.js",
|
||||
"js/vendor/jquery.min.js",
|
||||
"js/vendor/browsersel.js",
|
||||
"js/mathjax.js",
|
||||
"js/vendor/mathjax/tex-chtml.js",
|
||||
|
@ -158,7 +158,7 @@ class Reviewer:
|
||||
self.revHtml(),
|
||||
css=["css/reviewer.css"],
|
||||
js=[
|
||||
"js/vendor/jquery/jquery.min.js",
|
||||
"js/vendor/jquery.min.js",
|
||||
"js/vendor/browsersel.js",
|
||||
"js/mathjax.js",
|
||||
"js/vendor/mathjax/tex-chtml.js",
|
||||
@ -171,7 +171,7 @@ class Reviewer:
|
||||
self.bottom.web.stdHtml(
|
||||
self._bottomHTML(),
|
||||
css=["css/toolbar-bottom.css", "css/reviewer-bottom.css"],
|
||||
js=["js/vendor/jquery/jquery.min.js", "js/reviewer-bottom.js"],
|
||||
js=["js/vendor/jquery.min.js", "js/reviewer-bottom.js"],
|
||||
context=ReviewerBottomBar(self),
|
||||
)
|
||||
|
||||
|
@ -177,7 +177,7 @@ class DeckStats(QDialog):
|
||||
self.form.web.title = "deck stats"
|
||||
self.form.web.stdHtml(
|
||||
"<html><body>" + self.report + "</body></html>",
|
||||
js=["js/vendor/jquery/jquery.min.js", "js/vendor/plot.js"],
|
||||
js=["js/vendor/jquery.min.js", "js/vendor/plot.js"],
|
||||
context=self,
|
||||
)
|
||||
self.mw.progress.finish()
|
||||
|
@ -48,7 +48,7 @@ class Toolbar:
|
||||
self.web.stdHtml(
|
||||
self._body % self._centerLinks(),
|
||||
css=["css/toolbar.css"],
|
||||
js=["js/webview.js", "js/vendor/jquery/jquery.min.js", "js/toolbar.js"],
|
||||
js=["js/webview.js", "js/vendor/jquery.min.js", "js/toolbar.js"],
|
||||
context=web_context,
|
||||
)
|
||||
self.web.adjustHeightToFit()
|
||||
|
@ -440,7 +440,7 @@ body {{ zoom: {zoom}; background: {background}; direction: {lang_dir}; {font} }}
|
||||
body=body,
|
||||
head=head,
|
||||
js=["js/webview.js"]
|
||||
+ (["js/vendor/jquery/jquery.min.js"] if js is None else js),
|
||||
+ (["js/vendor/jquery.min.js"] if js is None else js),
|
||||
css=["css/webview.css"] + ([] if css is None else css),
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user