Mercurial > hg > Members > nobuyasu > html > graphViewer
changeset 36:9d31b5239170 draft
implemented hover and click function on StateSelect
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 23 Mar 2013 07:00:13 +0900 |
parents | 26eaf273efbf |
children | 4b3fd472120b |
files | show.html |
diffstat | 1 files changed, 22 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/show.html Sat Mar 23 06:49:54 2013 +0900 +++ b/show.html Sat Mar 23 07:00:13 2013 +0900 @@ -43,11 +43,6 @@ </div> </div> </div> - <nobr style='position:absolute; width:100%; bottom:5px;'> - <span class='button' id="acceptButton" style='position:absolute; width:50px; left:5px; bottom:5px; opacity:1;' value='accept' onclick="statePost($('#acceptButton'));">accept</span> - <span class='button' id="rejectButton" style='position:absolute; width:50px; left:65px; bottom:5px; opacity:1; ' value='rejecte' onclick="statePost($('#rejectButton'));">reject</span> - <span class='button' id="retractButton" style='position:absolute; width:50px; left:125px; bottom:5px; opacity:1; ' value='retract' onclick="statePost($('#retractButton'));">retract</span> - </nobr> </div> <div class="graphMainCss" style="position:absolute; left:0; bottom:0; width:100%; height:75%;" id='graphMain'> @@ -289,7 +284,7 @@ var body = $(menu.children()[1]); var childArray = body.children(); $(childArray).css('visibility','visible'); - body.viewFlag = true; + body[0].viewFlag = true; var height = calcChildrenHeight(childArray); menu.css('height', height+'px'); } @@ -306,7 +301,7 @@ var body = $(menu.children()[1]); var childArray = body.children(); $(childArray).css('visibility','hidden'); - body.viewFlag = false; + body[0].viewFlag = false; menu.css('height', height+'px'); } @@ -328,13 +323,33 @@ function appendStateSelectDiv(body, div, state) { div.click(function(){ stateTraversePost(state) }); + div.hover( + function(){div.css("box-shadow","black 0 0 50px"); }, + function(){div.css("box-shadow","");} + ); appendMenuBody(body, div); } +function clickStateSelect() { + var flag = $('#stateMenuBody')[0].viewFlag; + if (flag) { + hiddenStateMenuBody(); + } else { + showStateMenuBody(); + } +} + function createStateSelectMenu() { removeStateMenuBody(); var stateMenu = $('#stateMenu'); var body = $('#stateMenuBody'); + body[0].viewFlag = true; + var title = $('#stateMenuTitle'); + title.click(function(){clickStateSelect(); updateMenuDisplayHeight(); }); + title.hover( + function(){title.css("box-shadow","black 0 0 50px"); }, + function(){title.css("box-shadow","");} + ); body.viewFlag = true; for (var state in stateObj) { var div = $('<div class="menuContent" >'+state+'</div>');