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