Commit dadffaa3 authored by Thibaut Frain's avatar Thibaut Frain

Attempt to exec mercury_loader.js after gadget is ready

parent eb379d95
......@@ -11,7 +11,7 @@
<script src="../lib/jquery.js"></script>
<script src="../lib/jschannel.js"></script>
<script src="../lib/renderjs.js"></script>
<script src="../lib/mercury/mercury_loader.js?pack=all"></script>
<script src="../js/gadget_mercury.js"></script>
</head>
<body>
......
/*global window, jQuery, rJS*/
/*jslint evil: true*/
"use strict";
(function (window, $, rJS) {
......@@ -15,6 +16,13 @@
.declareMethod('clearContent', function () {
console.log("clear content");
})
.ready(function () {
var xhr = new window.XMLHttpRequest();
xhr.open('GET', '../lib/mercury/mercury_loader.js?pack=all', false);
xhr.send();
eval(xhr.responseText);
});
}(window, jQuery, rJS));
......@@ -24,7 +24,7 @@
// Some default packages are provided for you. If you want to define your own, feel free to do so before including this
// script. These, or your own packages can be specified to the loader in query params (read below for details).
if (!window.mercuryPackages) window.mercuryPackages = {
all: {javascripts: 'deploy/lib/mercury/jquery-1.7.js,deploy/lib/mercury/mercury.min.js,deploy/lib/mercury/mercury_dialogs.js,deploy/js/gadget_mercury.js', stylesheets: 'deploy/css/mercury.bundle.css'},
all: {javascripts: 'deploy/lib/mercury/jquery-1.7.js,deploy/lib/mercury/mercury.min.js,deploy/lib/mercury/mercury_dialogs.js', stylesheets: 'deploy/css/mercury.bundle.css'},
development: {javascripts: 'jquery-1.7.js,mercury.js', stylesheets: 'mercury.css'},
bundled: {javascripts: 'javascripts/jquery-1.7.js,javascripts/mercury.min.js,javascripts/mercury_dialogs.js', stylesheets: 'stylesheets/mercury.bundle.css'}
};
......@@ -188,3 +188,4 @@
if (window == top) { timer = pollDoScroll.defer(); }
}
})();
console.log("couscous");
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment