Skip to content
This repository has been archived by the owner on Sep 23, 2020. It is now read-only.

Commit

Permalink
Fix confusing UI When there are no launch configs
Browse files Browse the repository at this point in the history
  • Loading branch information
oldpatricka committed Feb 23, 2013
1 parent 04ea089 commit 22adaa0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
8 changes: 8 additions & 0 deletions phantomweb/static/css/phantom_lc.css
Expand Up @@ -14,6 +14,14 @@
padding-bottom: 5px;
}

#phantom_lc_order_area {
display: none;
}

#phantom_lc_info_area {
display: none;
}

#phantom_lc_heading_label
{
}
Expand Down
12 changes: 11 additions & 1 deletion phantomweb/static/js/phantom_lc.js
Expand Up @@ -140,6 +140,10 @@ function phantom_lc_reload_success_func(obj) {
g_selected_lc = first_lc;
phantom_lc_load_lc_names();
}
else {
$("#phantom_lc_info_area").hide();
$("#phantom_lc_order_area").hide();
}
}

phantom_lc_buttons(true);
Expand Down Expand Up @@ -269,6 +273,7 @@ function make_cloud_table_row(site, status) {
function phantom_lc_change_lc_internal(lc_name) {

if (!lc_name) {
$("#phantom_lc_order_area").hide();
return;
}

Expand Down Expand Up @@ -329,6 +334,8 @@ function phantom_lc_change_lc_internal(lc_name) {
var new_opt = $('<option>', {'name': site, value: site, text: site});
$("#phantom_lc_order").append(new_opt);
}

$("#phantom_lc_order_area").show();
}

function phantom_lc_change_lc_click(lc_name) {
Expand Down Expand Up @@ -515,7 +522,8 @@ function phantom_lc_delete_internal(lc_name) {
$("a.launch_config:contains('" + lc_name + "')").parent().remove();
reset_cloud_and_options();
phantom_lc_buttons(true);
//phantom_lc_load_internal();
$("#phantom_lc_info_area").hide();
$("#phantom_lc_order_area").hide();
}

var error_func = function(obj, message) {
Expand Down Expand Up @@ -567,6 +575,8 @@ function phantom_lc_order_selected_click(cloud_name) {

g_selected_cloud = cloud_name;

$("#phantom_lc_info_area").show();

$("#cloud_table_body").children().removeClass("info");
$("#cloud_table_body tr td:contains('" + cloud_name + "')")
.parent().addClass("info");
Expand Down

0 comments on commit 22adaa0

Please sign in to comment.