Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix confusing UI When there are no launch configs

  • Loading branch information...
commit 22adaa0f3aca014155f42ebb3f12d71c864f8573 1 parent 04ea089
Patrick Armstrong authored February 22, 2013
8  phantomweb/static/css/phantom_lc.css
@@ -14,6 +14,14 @@
14 14
     padding-bottom: 5px;
15 15
 }
16 16
 
  17
+#phantom_lc_order_area {
  18
+    display: none;
  19
+}
  20
+
  21
+#phantom_lc_info_area {
  22
+    display: none;
  23
+}
  24
+
17 25
 #phantom_lc_heading_label
18 26
 {
19 27
 }
12  phantomweb/static/js/phantom_lc.js
@@ -140,6 +140,10 @@ function phantom_lc_reload_success_func(obj) {
140 140
                 g_selected_lc = first_lc;
141 141
                 phantom_lc_load_lc_names();
142 142
             }
  143
+            else {
  144
+                $("#phantom_lc_info_area").hide();
  145
+                $("#phantom_lc_order_area").hide();
  146
+            }
143 147
         }
144 148
 
145 149
         phantom_lc_buttons(true);
@@ -269,6 +273,7 @@ function make_cloud_table_row(site, status) {
269 273
 function phantom_lc_change_lc_internal(lc_name) {
270 274
 
271 275
     if (!lc_name) {
  276
+        $("#phantom_lc_order_area").hide();
272 277
         return;
273 278
     }
274 279
 
@@ -329,6 +334,8 @@ function phantom_lc_change_lc_internal(lc_name) {
329 334
         var new_opt = $('<option>', {'name': site, value: site, text: site});
330 335
         $("#phantom_lc_order").append(new_opt);
331 336
     }
  337
+
  338
+    $("#phantom_lc_order_area").show();
332 339
 }
333 340
 
334 341
 function phantom_lc_change_lc_click(lc_name) {
@@ -515,7 +522,8 @@ function phantom_lc_delete_internal(lc_name) {
515 522
         $("a.launch_config:contains('" + lc_name + "')").parent().remove();
516 523
         reset_cloud_and_options();
517 524
         phantom_lc_buttons(true);
518  
-        //phantom_lc_load_internal();
  525
+        $("#phantom_lc_info_area").hide();
  526
+        $("#phantom_lc_order_area").hide();
519 527
     }
520 528
 
521 529
     var error_func = function(obj, message) {
@@ -567,6 +575,8 @@ function phantom_lc_order_selected_click(cloud_name) {
567 575
 
568 576
     g_selected_cloud = cloud_name;
569 577
 
  578
+    $("#phantom_lc_info_area").show();
  579
+
570 580
     $("#cloud_table_body").children().removeClass("info");
571 581
     $("#cloud_table_body tr td:contains('" + cloud_name + "')")
572 582
       .parent().addClass("info");

0 notes on commit 22adaa0

Please sign in to comment.
Something went wrong with that request. Please try again.