Mercurial > repos > adam-novak > hexagram
changeset 11:6ae12361157c draft default tip
Uploaded
author | adam-novak |
---|---|
date | Fri, 18 Oct 2013 19:16:45 -0400 |
parents | 61f6a1991ae3 |
children | |
files | hexagram/hexagram.js hexagram/hexagram.js~ |
diffstat | 2 files changed, 17 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- 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 ();
--- 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");