Commit f1a84950 authored by Leigh Stoller's avatar Leigh Stoller

Merge branch 'keithmaster'

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