Commit 46d6377d authored by Jonathon Duerig's avatar Jonathon Duerig

Set require options in a way more friendly to embedding. Various fixes for resize/jacks embed.

parent 36550e66
...@@ -133,6 +133,10 @@ body { ...@@ -133,6 +133,10 @@ body {
border: 1px solid #000; border: 1px solid #000;
} }
#showtopo_div {
height: 300px;
}
@media (min-width: 970px) { @media (min-width: 970px) {
#showtopo_dialog { #showtopo_dialog {
...@@ -145,7 +149,6 @@ body { ...@@ -145,7 +149,6 @@ body {
#showtopo_div { #showtopo_div {
width: 643px; width: 643px;
height: 300px;
} }
#showtopo_nopicker { #showtopo_nopicker {
width: 850px; width: 850px;
......
window.APT_OPTIONS = window.APT_OPTIONS || {}; window.APT_OPTIONS = window.APT_OPTIONS || {};
window.APT_OPTIONS.config = function () window.APT_OPTIONS.configObject = {
{ baseUrl: '.',
require.config({ paths: {
baseUrl: '.', 'jquery-ui': 'js/lib/jquery-ui-1.10.4.custom',
paths: { 'jquery-grid':'js/lib/jquery.appendGrid-1.3.1.min',
'jquery-ui': 'js/lib/jquery-ui-1.10.4.custom', 'formhelpers': 'js/lib/bootstrap-formhelpers',
'jquery-grid':'js/lib/jquery.appendGrid-1.3.1.min', 'dateformat': 'js/lib/date.format',
'formhelpers': 'js/lib/bootstrap-formhelpers', 'd3': 'js/lib/d3.v3',
'dateformat': 'js/lib/date.format', 'filestyle': 'js/lib/filestyle',
'd3': 'js/lib/d3.v3', 'tablesorter': 'js/lib/jquery.tablesorter.min',
'filestyle': 'js/lib/filestyle', 'tablesorterwidgets': 'js/lib/jquery.tablesorter.widgets.min',
'tablesorter': 'js/lib/jquery.tablesorter.min', 'marked': 'js/lib/marked',
'tablesorterwidgets': 'js/lib/jquery.tablesorter.widgets.min', 'moment': 'js/lib/moment',
'marked': 'js/lib/marked', 'underscore': 'js/lib/underscore-min',
'moment': 'js/lib/moment', 'filesize': 'js/lib/filesize.min',
'underscore': 'js/lib/underscore-min', 'jacks': 'https://www.emulab.net/protogeni/jacks-devel/js/jacks'
'filesize': 'js/lib/filesize.min', },
'jacks': 'https://www.emulab.net/protogeni/jacks-stable/js/jacks' shim: {
}, 'jquery-ui': { },
shim: { 'jquery-grid': { deps: ['jquery-ui'] },
'jquery-ui': { }, 'formhelpers': { },
'jquery-grid': { deps: ['jquery-ui'] }, 'dateformat': { exports: 'dateFormat' },
'formhelpers': { }, 'd3': { exports: 'd3' },
'dateformat': { exports: 'dateFormat' }, 'filestyle': { },
'd3': { exports: 'd3' }, 'tablesorter': { },
'filestyle': { }, 'tablesorterwidgets': { deps: ['tablesorter'] },
'tablesorter': { }, 'marked' : { exports: 'marked' },
'tablesorterwidgets': { deps: ['tablesorter'] }, 'underscore': { exports: '_' },
'marked' : { exports: 'marked' }, 'filesize' : { exports: 'filesize' }
'underscore': { exports: '_' }, }
'filesize' : { exports: 'filesize' },
},
});
}; };
window.APT_OPTIONS.initialize = function (sup) window.APT_OPTIONS.initialize = function (sup)
......
window.APT_OPTIONS.config(); //window.APT_OPTIONS.config();
require(['underscore', 'js/quickvm_sup', // jQuery modules require(window.APT_OPTIONS.configObject,
['underscore', 'js/quickvm_sup', // jQuery modules
'formhelpers', 'filestyle', 'marked', 'jacks'], 'formhelpers', 'filestyle', 'marked', 'jacks'],
function (_, sup) function (_, sup)
{ {
...@@ -125,7 +126,7 @@ function (_, sup) ...@@ -125,7 +126,7 @@ function (_, sup)
mode: 'viewer', mode: 'viewer',
source: 'rspec', source: 'rspec',
root: '#showtopo_div', root: '#showtopo_div',
size: { x: 643, y: 300 }, // size: { x: 643, y: 300 },
nodeSelect: false, nodeSelect: false,
readyCallback: function (input, output) { readyCallback: function (input, output) {
jacksUpdate = input; jacksUpdate = input;
......
window.APT_OPTIONS.config(); require(window.APT_OPTIONS.configObject,
['js/quickvm_sup'
require(['js/quickvm_sup'
// jQuery modules // jQuery modules
], ],
function (sup) function (sup)
......
window.APT_OPTIONS.config(); require(window.APT_OPTIONS.configObject,
['underscore', 'js/quickvm_sup', 'filesize', 'js/image',
require(['underscore', 'js/quickvm_sup', 'filesize', 'js/image',
'js/lib/text!template/manage-profile.html', 'js/lib/text!template/manage-profile.html',
'js/lib/text!template/waitwait-modal.html', 'js/lib/text!template/waitwait-modal.html',
'js/lib/text!template/renderer-modal.html', 'js/lib/text!template/renderer-modal.html',
......
window.APT_OPTIONS.config(); require(window.APT_OPTIONS.configObject,
['js/quickvm_sup',
require(['js/quickvm_sup',
'tablesorter', 'tablesorterwidgets'], 'tablesorter', 'tablesorterwidgets'],
function (sup) function (sup)
{ {
......
window.APT_OPTIONS.config(); require(window.APT_OPTIONS.configObject,
['js/quickvm_sup',
require(['js/quickvm_sup',
'tablesorter', 'tablesorterwidgets'], 'tablesorter', 'tablesorterwidgets'],
function (sup) function (sup)
{ {
......
window.APT_OPTIONS.config(); require(window.APT_OPTIONS.configObject,
['js/quickvm_sup'],
require(['js/quickvm_sup'],
function (sup) function (sup)
{ {
'use strict'; 'use strict';
......
window.APT_OPTIONS.config(); require(window.APT_OPTIONS.configObject,
['underscore', 'js/quickvm_sup',
require(['underscore', 'js/quickvm_sup',
'js/lib/text!template/about-account.html', 'js/lib/text!template/about-account.html',
'js/lib/text!template/verify-modal.html', 'js/lib/text!template/verify-modal.html',
'js/lib/text!template/signup-personal.html', 'js/lib/text!template/signup-personal.html',
......
window.APT_OPTIONS.config(); require([window.APT_OPTIONS.configObject,
'underscore', 'js/quickvm_sup', 'moment', 'js/image',
require(['underscore', 'js/quickvm_sup', 'moment', 'js/image',
'js/lib/text!template/status.html', 'js/lib/text!template/status.html',
'js/lib/text!template/waitwait-modal.html', 'js/lib/text!template/waitwait-modal.html',
'js/lib/text!template/oops-modal.html', 'js/lib/text!template/oops-modal.html',
......
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