Commit 24ff720d authored by Jonathon Duerig's avatar Jonathon Duerig
Browse files

Fix instantiate page(s). Fix loading issue for libraries that use templates

parent 6b72a377
......@@ -440,7 +440,6 @@ function SPITFORM($formfields, $newuser, $errors)
echo "<script src='js/lib/jquery-2.0.3.min.js'></script>\n";
REQUIRE_UNDERSCORE();
REQUIRE_CONSTRAINTS();
REQUIRE_SUP();
REQUIRE_PPWIZARDSTART();
REQUIRE_JACKS_EDITOR();
......
//define(['underscore', 'js/lib/text!template/edit-modal.html', 'js/lib/text!template/edit-inline.html'],
window.JacksEditor = (function ()
$(function () {
window.JacksEditor = (function ()
{
'use strict';
......@@ -276,3 +277,4 @@ window.JacksEditor = (function ()
return JacksEditor;
})();
});
......@@ -2,7 +2,8 @@
// Progress Modal
//
//define(['underscore', 'js/quickvm_sup'],
window.aptforms = (function()
$(function () {
window.aptforms = (function()
{
'use strict';
......@@ -263,3 +264,4 @@ window.aptforms = (function()
};
}
)();
});
......@@ -5,7 +5,8 @@
// 'js/lib/text!template/user-extend-modal.html',
// 'js/lib/text!template/admin-extend-modal.html',
// 'js/lib/text!template/guest-extend-modal.html'],
$(function () {
window.ShowExtendModal = (function(/*_, sup, userExtendString, adminExtendString, guestExtendString*/)
{
'use strict';
......@@ -447,3 +448,4 @@ window.ShowExtendModal = (function(/*_, sup, userExtendString, adminExtendString
}
}
)();
});
......@@ -3,6 +3,7 @@
//
//define(['underscore', 'js/quickvm_sup', 'moment'],
// function(_, sup, moment)
$(function () {
window.ShowIdleGraphs = (function ()
{
'use strict';
......@@ -500,3 +501,4 @@ window.ShowIdleGraphs = (function ()
}
}
)();
});
......@@ -2,6 +2,7 @@
// Progress Modal
//
//define(['underscore', 'js/quickvm_sup', 'filesize'],
$(function () {
window.ShowImagingModal = (function()
{
'use strict';
......@@ -185,3 +186,4 @@ window.ShowImagingModal = (function()
}
}
)();
});
......@@ -2,12 +2,12 @@
// ['underscore', 'constraints', 'js/quickvm_sup',
// 'js/ppwizardstart', 'js/JacksEditor', 'js/wizard-template',
// 'formhelpers', 'filestyle', 'marked', 'jacks', 'jquery-steps'],
$(function (_, Constraints, sup, ppstart, JacksEditor, wt)
$(function (/*_, Constraints, sup, ppstart, JacksEditor, wt*/)
{
'use strict';
var templates = APT_OPTIONS.fetchTemplateList(['instantiate-new', 'aboutapt', 'aboutcloudlab', 'aboutpnet', 'waitwait-modal', 'rspectextview-modal']);
var instantiateString = templates['instantiate'];
var instantiateString = templates['instantiate-new'];
var aboutaptString = templates['aboutapt'];
var aboutcloudString = templates['aboutcloudlab'];
var aboutpnetString = templates['aboutpnet'];
......@@ -1369,7 +1369,6 @@ $(function (_, Constraints, sup, ppstart, JacksEditor, wt)
{
delete context.canvasOptions.defaults;
}
constraints = new Constraints(context);
jacks.instance = new window.Jacks({
mode: 'viewer',
source: 'rspec',
......@@ -1380,6 +1379,7 @@ $(function (_, Constraints, sup, ppstart, JacksEditor, wt)
jacks.output = output;
jacks.output.on('found-images', onFoundImages);
jacks.output.on('found-types', onFoundTypes);
constraints = new JACKS_LOADER.Constraints(context);
updateWhere();
},
canvasOptions: context.canvasOptions,
......@@ -1428,7 +1428,7 @@ $(function (_, Constraints, sup, ppstart, JacksEditor, wt)
// is not what actually comes back. Copy before print.
var mycopy = $.extend(true, {}, json.value);
//console.log('json', mycopy);
constraints = new Constraints(context);
constraints = new JACKS_LOADER.Constraints(context);
constraints.addPossibles({ images: foundImages });
allowWithSites(json.value[0].images, json.value[0].constraints);
CreateAggregateSelectors(selected_rspec);
......
......@@ -2,7 +2,7 @@
// ['underscore', 'constraints', 'js/quickvm_sup',
// 'js/ppwizardstart', 'js/JacksEditor', 'js/wizard-template',
// 'formhelpers', 'filestyle', 'marked', 'jacks', 'jquery-steps'],
$(function (_, Constraints, sup, ppstart, JacksEditor, wt)
$(function (/*_, Constraints, sup, ppstart, JacksEditor, wt*/)
{
'use strict';
......@@ -1064,7 +1064,6 @@ $(function (_, Constraints, sup, ppstart, JacksEditor, wt)
{
delete context.canvasOptions.defaults;
}
constraints = new Constraints(context);
jacks.instance = new window.Jacks({
mode: 'viewer',
source: 'rspec',
......@@ -1075,6 +1074,7 @@ $(function (_, Constraints, sup, ppstart, JacksEditor, wt)
jacks.output = output;
jacks.output.on('found-images', onFoundImages);
jacks.output.on('found-types', onFoundTypes);
constraints = new JACKS_LOADER.Constraints(context);
updateWhere();
},
canvasOptions: context.canvasOptions,
......@@ -1123,7 +1123,7 @@ $(function (_, Constraints, sup, ppstart, JacksEditor, wt)
// is not what actually comes back. Copy before print.
var mycopy = $.extend(true, {}, json.value);
//console.log('json', mycopy);
constraints = new Constraints(context);
constraints = new JACKS_LOADER.Constraints(context);
constraints.addPossibles({ images: foundImages });
allowWithSites(json.value[0].images, json.value[0].constraints);
CreateAggregateSelectors(selected_rspec);
......
//require(window.APT_OPTIONS.configObject,
// ['underscore', 'js/quickvm_sup'],
$(function (_, sup)
$(function (/*_, sup*/)
{
'use strict';
var templates = APT_OPTIONS.fetchTemplateList(['waitwait-modal']);
......
......@@ -2,6 +2,7 @@
// Slothd graphs
//
//define(['underscore', 'js/quickvm_sup', 'moment'],
$(function () {
window.ShowOpenstackGraphs = (function()
{
'use strict';
......@@ -530,3 +531,4 @@ window.ShowOpenstackGraphs = (function()
}
}
)();
});
......@@ -6,7 +6,8 @@
// 'js/lib/text!template/ppform-wizard-body.html',
// 'js/lib/text!template/choose-am.html',
// ],
window.ppstart = (function()
$(function () {
window.ppstart = (function()
{
'use strict';
......@@ -747,3 +748,4 @@ window.ppstart = (function()
};
}
)();
});
//define(['dateformat', 'marked', 'jacks'],
$(function () {
window.sup = (function () {
function ShowModal(which)
......@@ -275,3 +276,4 @@ return {
InitGeniLogin: InitGeniLogin,
};
})();
});
//define(['underscore'],
$(function () {
window.wt = (function() {
function ClusterStatusHTML(options, fedlist) {
......@@ -171,3 +172,4 @@ window.wt = (function() {
};
}
)();
});
......@@ -44,11 +44,6 @@ function REQUIRE_BILEVEL()
AddLibrary("js/bilevel.js");
}
function REQUIRE_CONSTRAINTS()
{
AddLibrary("https://www.emulab.net/protogeni/jacks-utah/js/Constraints.js");
}
function REQUIRE_CONTEXTMENU()
{
AddLibrary("js/lib/bootstrap-contextmenu.js");
......
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