Commit 60de5482 authored by Jonathon Duerig's avatar Jonathon Duerig
Browse files

Tweaks to make apt work better with the new version of jacks.

parent 7ae2836d
...@@ -22,7 +22,7 @@ function (_, sup) ...@@ -22,7 +22,7 @@ function (_, sup)
}); });
$('#verify_modal').modal('show'); $('#verify_modal').modal('show');
} }
$('#quickvm_topomodal').on('hidden.bs.modal', function() { $('#quickvm_topomodal').on('shown.bs.modal', function() {
ShowProfileList($('.current')) ShowProfileList($('.current'))
}); });
...@@ -41,14 +41,16 @@ function (_, sup) ...@@ -41,14 +41,16 @@ function (_, sup)
$('button#showtopo_select').click(function (event) { $('button#showtopo_select').click(function (event) {
event.preventDefault(); event.preventDefault();
UpdateProfileSelection($('.selected')); UpdateProfileSelection($('.selected'));
ShowProfileList($('.selected'));
$('#quickvm_topomodal').modal('hide'); $('#quickvm_topomodal').modal('hide');
}); });
$('#instantiate_submit').click(function (event) { $('#instantiate_submit').click(function (event) {
$("#waitwait").modal('show'); $("#waitwait").modal('show');
return true; return true;
}); });
UpdateProfileSelection($('#profile_name li[value = ' + var startProfile = $('#profile_name li[value = ' + window.PROFILE + ']')
window.PROFILE + ']')); UpdateProfileSelection(startProfile);
ShowProfileList(startProfile, true);
_.delay(function () {$('.dropdown-toggle').dropdown();}, 500); _.delay(function () {$('.dropdown-toggle').dropdown();}, 500);
} }
...@@ -69,10 +71,9 @@ function (_, sup) ...@@ -69,10 +71,9 @@ function (_, sup)
}); });
$(selectedElement).addClass('current'); $(selectedElement).addClass('current');
} }
ShowProfileList(selectedElement);
} }
function ShowProfileList(selectedElement) function ShowProfileList(selectedElement, justTitle)
{ {
var profile = $(selectedElement).attr('value'); var profile = $(selectedElement).attr('value');
...@@ -118,7 +119,9 @@ function (_, sup) ...@@ -118,7 +119,9 @@ function (_, sup)
$('#showtopo_description').html(description); $('#showtopo_description').html(description);
$('#selected_profile_description').html(description); $('#selected_profile_description').html(description);
sup.maketopmap('#showtopo_div', json.value.rspec, null); if (! justTitle) {
sup.maketopmap('#showtopo_div', json.value.rspec, null);
}
} }
var $xmlthing = sup.CallServerMethod(ajaxurl, var $xmlthing = sup.CallServerMethod(ajaxurl,
"instantiate", "GetProfile", "instantiate", "GetProfile",
......
...@@ -60,7 +60,9 @@ function (sup) ...@@ -60,7 +60,9 @@ function (sup)
return; return;
} }
sup.ShowModal("#quickvm_topomodal"); sup.ShowModal("#quickvm_topomodal");
sup.maketopmap('#showtopo_nopicker', json.value.rspec, null); $("#quickvm_topomodal").one("shown.bs.modal", function () {
sup.maketopmap('#showtopo_nopicker', json.value.rspec, null);
});
}; };
var $xmlthing = sup.CallServerMethod(ajaxurl, var $xmlthing = sup.CallServerMethod(ajaxurl,
"myprofiles", "myprofiles",
......
...@@ -68,7 +68,8 @@ function maketopmap(divname, xml, sshcallback) ...@@ -68,7 +68,8 @@ function maketopmap(divname, xml, sshcallback)
show: { show: {
rspec: false, rspec: false,
tour: false, tour: false,
version: false version: false,
menu: false
} }
}); });
} }
......
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