summaryrefslogtreecommitdiff
path: root/addons/website/static/src/js/website.tour.test.js
diff options
context:
space:
mode:
authorDharmraj Jhala (OpenERP) <dizzy.zala@gmail.com>2014-02-25 11:02:04 +0530
committerDharmraj Jhala (OpenERP) <dizzy.zala@gmail.com>2014-02-25 11:02:04 +0530
commitc6917b9c074f3f2c19cac1dc3e05c8a3d2cadbed (patch)
tree6a17e259f27e029458207671d10fec50b5c425be /addons/website/static/src/js/website.tour.test.js
parentb2688a37f84a505d8e334f8b0325b4747d440170 (diff)
parent9eb2db4465cefa5dc331123c1b0a4df035545015 (diff)
[MERGE] with trunk-survey2-rim addons branch
bzr revid: dizzy.zala@gmail.com-20140225053204-mra08nfvumkxyixa
Diffstat (limited to 'addons/website/static/src/js/website.tour.test.js')
-rw-r--r--addons/website/static/src/js/website.tour.test.js34
1 files changed, 34 insertions, 0 deletions
diff --git a/addons/website/static/src/js/website.tour.test.js b/addons/website/static/src/js/website.tour.test.js
new file mode 100644
index 00000000000..3e85ce20dae
--- /dev/null
+++ b/addons/website/static/src/js/website.tour.test.js
@@ -0,0 +1,34 @@
+(function () {
+
+function LoadScript(src) {
+ xmlHttp = new XMLHttpRequest();
+ xmlHttp.onreadystatechange = function() {
+ if(xmlHttp.readyState == 4) {
+ if (xmlHttp.status == 200 || xmlHttp.status == 304) {
+ new Function(xmlHttp.responseText)();
+ } else {
+ throw new Error("Can't load JavaScript.\nhref: " + window.location.href + "\nsrc: " + src);
+ }
+ }
+ };
+ xmlHttp.open("GET", src, false);
+ xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
+ xmlHttp.send(null);
+}
+
+if (typeof jQuery === "undefined")
+ LoadScript("/web/static/lib/jquery/jquery.js");
+if (typeof _ === "undefined")
+ LoadScript("/web/static/lib/underscore/underscore.js");
+if (typeof openerp === "undefined") {
+ LoadScript("/web/static/lib/qweb/qweb2.js");
+ LoadScript("/web/static/src/js/openerpframework.js");
+}
+if (typeof openerp === "undefined" || !openerp.website || !openerp.website.add_template_file)
+ LoadScript("/website/static/src/js/website.js");
+if (typeof Tour === "undefined")
+ LoadScript("/website/static/lib/bootstrap-tour/bootstrap-tour.js");
+if (typeof openerp === "undefined" || !openerp.website.Tour)
+ LoadScript("/website/static/src/js/website.tour.js");
+
+})(); \ No newline at end of file