Skip to content

Commit 31cc39f

Browse files
committed
jquery version mismatch for bootstrap
1 parent c44423a commit 31cc39f

File tree

3 files changed

+136
-3
lines changed

3 files changed

+136
-3
lines changed

client/src/js/browser.js

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
/*!
2+
* jQuery Browser Plugin 0.1.0
3+
* https://github.com/gabceb/jquery-browser-plugin
4+
*
5+
* Original jquery-browser code Copyright 2005, 2015 jQuery Foundation, Inc. and other contributors
6+
* http://jquery.org/license
7+
*
8+
* Modifications Copyright 2015 Gabriel Cebrian
9+
* https://github.com/gabceb
10+
*
11+
* Released under the MIT license
12+
*
13+
* Date: 23-11-2015
14+
*/ !(function (a) {
15+
"function" == typeof define && define.amd
16+
? define(["jquery"], function (b) {
17+
return a(b);
18+
})
19+
: "object" == typeof module && "object" == typeof module.exports
20+
? (module.exports = a(require("jquery")))
21+
: a(window.jQuery);
22+
})(function (a) {
23+
"use strict";
24+
function b(a) {
25+
void 0 === a && (a = window.navigator.userAgent), (a = a.toLowerCase());
26+
var b =
27+
/(edge)\/([\w.]+)/.exec(a) ||
28+
/(opr)[\/]([\w.]+)/.exec(a) ||
29+
/(chrome)[ \/]([\w.]+)/.exec(a) ||
30+
/(iemobile)[\/]([\w.]+)/.exec(a) ||
31+
/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(
32+
a
33+
) ||
34+
/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(
35+
a
36+
) ||
37+
/(webkit)[ \/]([\w.]+)/.exec(a) ||
38+
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a) ||
39+
/(msie) ([\w.]+)/.exec(a) ||
40+
(a.indexOf("trident") >= 0 && /(rv)(?::| )([\w.]+)/.exec(a)) ||
41+
(a.indexOf("compatible") < 0 &&
42+
/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)) ||
43+
[],
44+
c =
45+
/(ipad)/.exec(a) ||
46+
/(ipod)/.exec(a) ||
47+
/(windows phone)/.exec(a) ||
48+
/(iphone)/.exec(a) ||
49+
/(kindle)/.exec(a) ||
50+
/(silk)/.exec(a) ||
51+
/(android)/.exec(a) ||
52+
/(win)/.exec(a) ||
53+
/(mac)/.exec(a) ||
54+
/(linux)/.exec(a) ||
55+
/(cros)/.exec(a) ||
56+
/(playbook)/.exec(a) ||
57+
/(bb)/.exec(a) ||
58+
/(blackberry)/.exec(a) ||
59+
[],
60+
d = {},
61+
e = {
62+
browser: b[5] || b[3] || b[1] || "",
63+
version: b[2] || b[4] || "0",
64+
versionNumber: b[4] || b[2] || "0",
65+
platform: c[0] || "",
66+
};
67+
if (
68+
(e.browser &&
69+
((d[e.browser] = !0),
70+
(d.version = e.version),
71+
(d.versionNumber = parseInt(e.versionNumber, 10))),
72+
e.platform && (d[e.platform] = !0),
73+
(d.android ||
74+
d.bb ||
75+
d.blackberry ||
76+
d.ipad ||
77+
d.iphone ||
78+
d.ipod ||
79+
d.kindle ||
80+
d.playbook ||
81+
d.silk ||
82+
d["windows phone"]) &&
83+
(d.mobile = !0),
84+
(d.cros || d.mac || d.linux || d.win) && (d.desktop = !0),
85+
(d.chrome || d.opr || d.safari) && (d.webkit = !0),
86+
d.rv || d.iemobile)
87+
) {
88+
var f = "msie";
89+
(e.browser = f), (d[f] = !0);
90+
}
91+
if (d.edge) {
92+
delete d.edge;
93+
var g = "msedge";
94+
(e.browser = g), (d[g] = !0);
95+
}
96+
if (d.safari && d.blackberry) {
97+
var h = "blackberry";
98+
(e.browser = h), (d[h] = !0);
99+
}
100+
if (d.safari && d.playbook) {
101+
var i = "playbook";
102+
(e.browser = i), (d[i] = !0);
103+
}
104+
if (d.bb) {
105+
var j = "blackberry";
106+
(e.browser = j), (d[j] = !0);
107+
}
108+
if (d.opr) {
109+
var k = "opera";
110+
(e.browser = k), (d[k] = !0);
111+
}
112+
if (d.safari && d.android) {
113+
var l = "android";
114+
(e.browser = l), (d[l] = !0);
115+
}
116+
if (d.safari && d.kindle) {
117+
var m = "kindle";
118+
(e.browser = m), (d[m] = !0);
119+
}
120+
if (d.safari && d.silk) {
121+
var n = "silk";
122+
(e.browser = n), (d[n] = !0);
123+
}
124+
return (d.name = e.browser), (d.platform = e.platform), d;
125+
}
126+
return (
127+
(window.jQBrowser = b(window.navigator.userAgent)),
128+
(window.jQBrowser.uaMatch = b),
129+
a && (a.browser = window.jQBrowser),
130+
window.jQBrowser
131+
);
132+
});

client/src/js/queuedjobprogressfield.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ window.jQuery.entwine("ss", ($) => {
5555

5656
$(".queuedjob__progress").entwine({
5757
onmatch() {
58-
console.log("match");
5958
$(this)
6059
.find(".progress-bar")
6160
.popover({
@@ -74,7 +73,7 @@ window.jQuery.entwine("ss", ($) => {
7473

7574
var link = $(this).data("live"),
7675
self = $(this);
77-
console.log(link);
76+
7877
if (link) {
7978
setTimeout(function () {
8079
self.fetchData();

src/QueuedJobProgressController.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ public function progress()
3030
return $this->httpError(404);
3131
}
3232

33-
Requirements::javascript('silverstripe/admin:thirdparty/jquery/jquery.js');
33+
Requirements::block('silverstripe/admin:thirdparty/jquery/jquery.js');
34+
Requirements::javascript('https://code.jquery.com/jquery-1.12.4.min.js');
35+
Requirements::javascript('fullscreeninteractive/silverstripe-queuedjob-progressfield:client/src/js/browser.js');
3436
Requirements::javascript('https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js');
3537
Requirements::javascript('https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js');
3638
Requirements::javascript('silverstripe/admin:thirdparty/jquery-entwine/dist/jquery.entwine-dist.js');

0 commit comments

Comments
 (0)