Commit f1a84950 authored by Leigh B Stoller's avatar Leigh B Stoller

Merge branch 'keithmaster'

parents 9625d980 9fc67760
...@@ -3,18 +3,19 @@ require.config({ ...@@ -3,18 +3,19 @@ require.config({
paths: { paths: {
'jquery': 'js/lib/jquery-2.0.3.min', 'jquery': 'js/lib/jquery-2.0.3.min',
'bootstrap': 'bootstrap/js/bootstrap', 'bootstrap': 'bootstrap/js/bootstrap',
'formhelpers': 'formhelpers/js/bootstrap-formhelpers',
'dateformat': 'js/lib/date.format', 'dateformat': 'js/lib/date.format',
'd3': 'js/lib/d3.v3', 'd3': 'js/lib/d3.v3',
}, },
shim: { shim: {
'bootstrap': { deps: ['jquery'] }, 'bootstrap': { deps: ['jquery'] },
'formhelpers': { deps: ['bootstrap']},
'dateformat': { exports: 'dateFormat' }, 'dateformat': { exports: 'dateFormat' },
'd3': { exports: 'd3' } 'd3': { exports: 'd3' }
}, },
}); });
require(['jquery', 'js/quickvm_sup', require(['jquery', 'js/quickvm_sup',
'formhelpers/js/bootstrap-formhelpers',
// jQuery modules // jQuery modules
'bootstrap'], 'bootstrap'],
function ($, sup) function ($, sup)
...@@ -87,7 +88,7 @@ function ($, sup) ...@@ -87,7 +88,7 @@ function ($, sup)
function initIndex() function initIndex()
{ {
sup.UpdateProfileSelection($('#profile_name li:eq(0)')); sup.UpdateProfileSelection($('#profile_name li[value = ' + window.PROFILE + ']'));
$('#quickvm_topomodal').on('hidden.bs.modal', function() { $('#quickvm_topomodal').on('hidden.bs.modal', function() {
sup.ShowProfileList($('.current')) sup.ShowProfileList($('.current'))
}); });
......
...@@ -272,14 +272,24 @@ function SPITFORM($username, $email, $sshkey, $profile, $newuser, $errors) ...@@ -272,14 +272,24 @@ function SPITFORM($username, $email, $sshkey, $profile, $newuser, $errors)
</div> </div>
</div> </div>
</div>\n"; </div>\n";
echo "<script type='text/javascript'>\n";
echo "window.APT_OPTIONS = {\n"; echo "<script type='text/javascript'>\n";
echo " pageType: 'index',\n"; if (isset($profile) && $profile != "") {
if ($newuser) { echo "window.PROFILE = '$profile_value';\n";
echo " isNewUser: true\n"; }
} else {
echo "};\n"; echo "window.PROFILE = '$profile_default';\n";
echo "</script>\n"; }
echo "</script>\n";
echo "<script type='text/javascript'>\n";
echo "window.APT_OPTIONS = {\n";
echo " pageType: 'index',\n";
if ($newuser) {
echo " isNewUser: true\n";
}
echo "};\n";
echo "</script>\n";
} }
if (!isset($create)) { if (!isset($create)) {
......
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