This repository was archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.4k
/
Copy pathangular-bootstrap.js
60 lines (52 loc) · 1.65 KB
/
angular-bootstrap.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
'use strict';
(function(previousOnLoad) {
var prefix = (function() {
var filename = /(.*\/)angular-bootstrap.js(#(.*))?/;
var scripts = window.document.getElementsByTagName('script');
for (var j = 0; j < scripts.length; j++) {
var src = scripts[j].src;
if (src && src.match(filename)) {
var parts = src.match(filename);
return parts[1];
}
}
})();
function addScript(path) {
window.document.write('<script type="text/javascript" src="' + prefix + path + '"></script>');
}
function addCSS(path) {
window.document.write('<link rel="stylesheet" type="text/css" href="' + prefix + path + '"/>');
}
window.onload = function() {
try {
if (previousOnLoad) previousOnLoad();
} catch (e) { /* empty */ }
angular.scenario.setUpAndRun({});
};
addCSS('../../css/angular-scenario.css');
addScript('../../lib/jquery/jquery.js');
window.document.write(
'<script type="text/javascript">' +
'var _jQuery = jQuery.noConflict(true);' +
'</script>'
);
addScript('../angular-bootstrap.js');
addScript('Scenario.js');
addScript('Application.js');
addScript('Describe.js');
addScript('Future.js');
addScript('Runner.js');
addScript('SpecRunner.js');
addScript('dsl.js');
addScript('matchers.js');
addScript('ObjectModel.js');
addScript('output/Html.js');
addScript('output/Json.js');
addScript('output/Object.js');
addScript('output/Xml.js');
// Create the runner (which also sets up the global API)
window.document.write(
'<script type="text/javascript">' +
' var $runner = new angular.scenario.Runner(window);' +
'</script>');
})(window.onload);