Mercurial > hg > Members > nobuyasu > Consensus
diff public/viewer/revisionviewer.html @ 123:bb930ac4cfd8 draft
remove createOptionTag method
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 19 Apr 2013 20:29:44 +0900 |
parents | 9cfb52e94bd0 |
children | 26896f0aed2a |
line wrap: on
line diff
--- a/public/viewer/revisionviewer.html Fri Apr 19 14:49:09 2013 +0900 +++ b/public/viewer/revisionviewer.html Fri Apr 19 20:29:44 2013 +0900 @@ -65,8 +65,8 @@ function loadRevisionInfo(consensus_id) { $.ajax({ url:BASE_URL+"/claims/get/revision/"+consensus_id, - success:function(o){createOptionTag(consensus_id, o); console.log("revision = "+ o) - createSlider(o); + success:function(o){ console.log("revision = "+ o) + createSlider(o); }, type:"GET",cache:false, error:function(o){console.log("ERROR",o)} @@ -93,9 +93,7 @@ $('#revisionDisplayId').val("0/"+MAX_REV); $('#slider').slider({ step:STEP, max:slideMax, - slide: function(event, ui){ console.log('ui.value = '+ui.value); - var id = REVISION_INFO[ui.value]; - console.log("id = "+id); + slide: function(event, ui){ var id = REVISION_INFO[ui.value]; $('#revisionDisplayId').val(ui.value/STEP+"/"+MAX_REV); changeRevision(id); }, @@ -105,19 +103,6 @@ $('#slider').slider(); } -function createOptionTag(consensus_id, revisionInfo) { - var selectArray = new Array(); - selectArray.push('<select onchange="changeRevision(this.value)" >'); - var index = 0; - for (var i=0; i<revisionInfo.length; i++) { - var revision = revisionInfo.length - i; - selectArray.push("<option value='"+revisionInfo[i]+"'>"+revision+"</option>"); - } - selectArray.push("</select>"); - $('#revisionId')[0].innerHTML = "revision:"+selectArray.join(); - // $('#revisionId')[0].children[0].value = consensus_id; -} - $(function(){ userName=localStorage.userName; if(userName)start(); @@ -495,7 +480,6 @@ <div class='header'> <nobr id='header_title'><a href='index.html'>Home</a><span id='headertitle_main' style='margin-left:40px;'>loading</span></nobr> </div> -<div class="revision" id="revisionId"></div> <p class='revisionDisplay'> <label for="revInfo">Revision Number:</label> <input type="text" id="revisionDisplayId" style='background-color:black; border:0; color:white;'/>