# HG changeset patch # User adam-novak # Date 1382138205 14400 # Node ID 6ae12361157c17704925c9b3e2726b93ce3fd222 # Parent 61f6a1991ae3ca8765d0b9096820b838a2a15bb2 Uploaded diff -r 61f6a1991ae3 -r 6ae12361157c hexagram/hexagram.js --- a/hexagram/hexagram.js Fri Oct 18 19:12:07 2013 -0400 +++ b/hexagram/hexagram.js Fri Oct 18 19:16:45 2013 -0400 @@ -3746,14 +3746,13 @@ if(layout_names.length == 1) { // This is the very first layout. Pull it up. - $("#layout-search").select2("data", {id: layout_names[0], - text: layout_names[0]}); - // TODO: We ought to go through the normal change event here, - // but we aren't actually using change there. + // TODO: We don't go through the normal change event since we + // never change the dropdown value actually. But we duplicate + // user selection hode here. var current_layout = "Current Layout: " + layout_names[0]; - document.getElementById('current-layout').innerHTML=current_layout; + $("#current-layout").text(current_layout); initialize_view (0); recreate_map(layout_names[0], 1); refresh (); @@ -3828,7 +3827,7 @@ var current_layout = "Current Layout: " + layout_name; - document.getElementById('current-layout').innerHTML=current_layout; + $("#current-layout").text(current_layout); initialize_view (0); recreate_map(layout_name, 1); refresh (); diff -r 61f6a1991ae3 -r 6ae12361157c hexagram/hexagram.js~ --- a/hexagram/hexagram.js~ Fri Oct 18 19:12:07 2013 -0400 +++ b/hexagram/hexagram.js~ Fri Oct 18 19:16:45 2013 -0400 @@ -3746,8 +3746,18 @@ if(layout_names.length == 1) { // This is the very first layout. Pull it up. - $("#layout-search").select2("data", {id: layout_names[0], - text: layout_names[0]}); + + // TODO: We don't go through the normal change event since we + // never change the dropdown value actually. But we duplicate + // user selection hode here. + var current_layout = "Current Layout: " + layout_names[0]; + + $("#current-layout").text(current_layout); + initialize_view (0); + recreate_map(layout_names[0], 1); + refresh (); + current_layout_name = layout_names[0]; + } } }, "text");