Mercurial > hg > Members > nobuyasu > Consensus
annotate public/viewer/revisionviewer.html @ 131:2b6e9496fb0c draft default tip
modified updateUserConsensusStatus
author | one |
---|---|
date | Fri, 26 Apr 2013 02:47:01 +0900 |
parents | 21e746cdc99e |
children |
rev | line source |
---|---|
125 | 1 <meta http-equiv="content-type" content="text/html;charset=utf-8" /> |
2 <title>R-Consensus</title> | |
3 <link rel='stylesheet' href="form.css"> | |
4 <link rel="stylesheet" href="jquery-ui.css"> | |
5 <script src='form.js'></script> | |
6 <script type="text/javascript" src="js/lib/jquery-1.8.1-min.js"></script> | |
7 <script type="text/javascript" src="js/lib/jquery-ui-1.8.23-min.js"></script> | |
8 <script type="text/javascript" src="js/lib/jquery.ui.touch-punch.min.js"></script> | |
9 <script type="text/javascript" src="js/lib/jsBezier-0.4-min.js"></script> | |
10 <script type="text/javascript" src="js/1.3.15/jsPlumb-util-1.3.15-RC1.js"></script> | |
11 <script type="text/javascript" src="js/1.3.15/jsPlumb-dom-adapter-1.3.15-RC1.js"></script> | |
12 <script type="text/javascript" src="js/1.3.15/jsPlumb-1.3.15-RC1.js"></script> | |
13 <script type="text/javascript" src="js/1.3.15/jsPlumb-defaults-1.3.15-RC1.js"></script> | |
14 <script type="text/javascript" src="js/1.3.15/jsPlumb-renderers-svg-1.3.15-RC1.js"></script> | |
15 <script type="text/javascript" src="js/1.3.15/jsPlumb-renderers-canvas-1.3.15-RC1.js"></script> | |
16 <script type="text/javascript" src="js/1.3.15/jsPlumb-renderers-vml-1.3.15-RC1.js"></script> | |
17 <script type="text/javascript" src="js/1.3.15/jquery.jsPlumb-1.3.15-RC1.js"></script> | |
18 <script type="text/javascript" src='treeArrangement.js'></script> | |
128
c03c7198ec67
add viewrLib.js
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
125
diff
changeset
|
19 <script type="text/javascript" src='viewerLib.js'></script> |
125 | 20 <script type="text/javascript"> |
119 | 21 var LOAD_INTERVAL=5; |
87 | 22 var BASE_URL=""; |
23 if(!Array.prototype.filter){ | |
119 | 24 Array.prototype.filter=function(func){ |
25 var arr=[]; | |
26 for(var i=0;i<this.length;i++)if(func(this[i]))arr.push(this[i]); | |
27 return arr; | |
28 } | |
87 | 29 } |
30 | |
31 var userName; | |
32 var treeInfo; | |
33 var userList=[]; | |
34 var root_id; | |
35 function loadConsensus(id){ | |
119 | 36 $.ajax({ |
37 url:BASE_URL+"/consensus/browse/"+id, | |
38 success:function(o){onload(o)}, | |
39 type:"GET",cache:false, | |
40 error:function(o){console.log("ERROR",o)} | |
41 }); | |
87 | 42 } |
43 | |
88 | 44 function loadRevisionInfo(consensus_id) { |
119 | 45 $.ajax({ |
46 url:BASE_URL+"/claims/get/revision/"+consensus_id, | |
123
bb930ac4cfd8
remove createOptionTag method
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
122
diff
changeset
|
47 success:function(o){ console.log("revision = "+ o) |
bb930ac4cfd8
remove createOptionTag method
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
122
diff
changeset
|
48 createSlider(o); |
122
9cfb52e94bd0
implemented slider
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
119
diff
changeset
|
49 }, |
119 | 50 type:"GET",cache:false, |
51 error:function(o){console.log("ERROR",o)} | |
52 }); | |
88 | 53 } |
54 | |
90 | 55 function changeRevision(id) { |
56 root_id = id; | |
57 loadConsensus(id); | |
58 } | |
59 | |
122
9cfb52e94bd0
implemented slider
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
119
diff
changeset
|
60 var REVISION_INFO = {}; |
9cfb52e94bd0
implemented slider
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
119
diff
changeset
|
61 var STEP = 5; |
9cfb52e94bd0
implemented slider
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
119
diff
changeset
|
62 var SLIDE_DISTANCE = 20; |
9cfb52e94bd0
implemented slider
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
119
diff
changeset
|
63 function createSlider(revisionInfo) { |
9cfb52e94bd0
implemented slider
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
119
diff
changeset
|
64 $('#slider').css('width',revisionInfo.length * SLIDE_DISTANCE); |
9cfb52e94bd0
implemented slider
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
119
diff
changeset
|
65 var slideMax = 0; |
9cfb52e94bd0
implemented slider
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
119
diff
changeset
|
66 for (var i=0; i<revisionInfo.length; i++) { |
9cfb52e94bd0
implemented slider
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
119
diff
changeset
|
67 var r = revisionInfo[i]; |
9cfb52e94bd0
implemented slider
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
119
diff
changeset
|
68 REVISION_INFO[i*STEP] = r; |
9cfb52e94bd0
implemented slider
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
119
diff
changeset
|
69 slideMax = i*STEP; |
9cfb52e94bd0
implemented slider
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
119
diff
changeset
|
70 } |
9cfb52e94bd0
implemented slider
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
119
diff
changeset
|
71 var MAX_REV = revisionInfo.length-1; |
9cfb52e94bd0
implemented slider
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
119
diff
changeset
|
72 $('#revisionDisplayId').val("0/"+MAX_REV); |
124
26896f0aed2a
modified revisionviewer.html
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
123
diff
changeset
|
73 function _slideAction(event, ui) { |
26896f0aed2a
modified revisionviewer.html
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
123
diff
changeset
|
74 var id = REVISION_INFO[ui.value]; |
26896f0aed2a
modified revisionviewer.html
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
123
diff
changeset
|
75 $('#revisionDisplayId').val(ui.value/STEP+"/"+MAX_REV); |
26896f0aed2a
modified revisionviewer.html
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
123
diff
changeset
|
76 changeRevision(id); |
26896f0aed2a
modified revisionviewer.html
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
123
diff
changeset
|
77 } |
26896f0aed2a
modified revisionviewer.html
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
123
diff
changeset
|
78 function _slideMoveAction(event, ui){ |
26896f0aed2a
modified revisionviewer.html
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
123
diff
changeset
|
79 var id = REVISION_INFO[ui.value]; |
26896f0aed2a
modified revisionviewer.html
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
123
diff
changeset
|
80 $('#revisionDisplayId').val(ui.value/STEP+"/"+MAX_REV); |
26896f0aed2a
modified revisionviewer.html
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
123
diff
changeset
|
81 } |
122
9cfb52e94bd0
implemented slider
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
119
diff
changeset
|
82 $('#slider').slider({ step:STEP, |
124
26896f0aed2a
modified revisionviewer.html
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
123
diff
changeset
|
83 max: slideMax, |
26896f0aed2a
modified revisionviewer.html
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
123
diff
changeset
|
84 slide: _slideMoveAction, |
26896f0aed2a
modified revisionviewer.html
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
123
diff
changeset
|
85 stop: _slideAction |
122
9cfb52e94bd0
implemented slider
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
119
diff
changeset
|
86 }); |
9cfb52e94bd0
implemented slider
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
119
diff
changeset
|
87 $('#slider').slider('option','value',0); |
9cfb52e94bd0
implemented slider
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
119
diff
changeset
|
88 $('#slider').slider(); |
9cfb52e94bd0
implemented slider
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
119
diff
changeset
|
89 } |
9cfb52e94bd0
implemented slider
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
119
diff
changeset
|
90 |
87 | 91 $(function(){ |
119 | 92 userName=localStorage.userName; |
93 if(userName)start(); | |
129
21e746cdc99e
modified viewer.html
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
128
diff
changeset
|
94 else displayBlock(); |
87 | 95 }) |
129
21e746cdc99e
modified viewer.html
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
128
diff
changeset
|
96 |
87 | 97 function login(uname){ |
119 | 98 userName=localStorage.userName=uname; |
99 start(); | |
87 | 100 } |
129
21e746cdc99e
modified viewer.html
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
128
diff
changeset
|
101 |
87 | 102 function start(){ |
128
c03c7198ec67
add viewrLib.js
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
125
diff
changeset
|
103 init(); |
119 | 104 var consensus_id=(location.search.match("[0-9]+")||[])[0]; |
128
c03c7198ec67
add viewrLib.js
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
125
diff
changeset
|
105 loadRevisionInfo(consensus_id); |
87 | 106 } |
107 | |
108 </script> | |
125 | 109 <style> |
110 body{background-color:black;} | |
122
9cfb52e94bd0
implemented slider
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
119
diff
changeset
|
111 p.revisionDisplay{ |
9cfb52e94bd0
implemented slider
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
119
diff
changeset
|
112 position:absolute; |
9cfb52e94bd0
implemented slider
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
119
diff
changeset
|
113 left:5px; |
124
26896f0aed2a
modified revisionviewer.html
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
123
diff
changeset
|
114 top:40px; |
122
9cfb52e94bd0
implemented slider
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
119
diff
changeset
|
115 z-index:5; |
9cfb52e94bd0
implemented slider
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
119
diff
changeset
|
116 color:white; |
9cfb52e94bd0
implemented slider
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
119
diff
changeset
|
117 } |
119 | 118 div.revisionSlider{ |
119 position:absolute; | |
125 | 120 left:20px;top:80px; |
119 | 121 z-index:5; |
122 width:50%; | |
87 | 123 } |
122
9cfb52e94bd0
implemented slider
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
119
diff
changeset
|
124 |
87 | 125 </style> |
125 | 126 <script> |
127 function resetMentionForm(){ | |
128 var keys=['title','contents','w','d','b','q','r']; | |
129 for(var i=0;i<keys.length;i++)$("#mentionform_"+keys[i]).val(""); | |
130 $("#mention_option")[0].className="option"; | |
131 } | |
87 | 132 var formClaim; |
133 var claimUserMap,mentionUserMap; | |
134 function showClaim(claim){ | |
125 | 135 formClaim=claim; |
136 var info=claim.info; | |
137 var keys=['title','contents','w','d','b','q','r']; | |
138 for(var i=0;i<keys.length;i++)$("#claimform_"+keys[i]).val(info.toulmin[keys[i]]); | |
139 | |
140 var status=""; | |
141 for(var i=0;i<info.users.length;i++)if(info.users[i].id==userName)status=info.users[i].status; | |
142 var op=({denied:1,pend:2,agreed:3})[status]; | |
143 | |
144 $("#claim_status").text(info.status) | |
145 $("#claim_status").css("color",({passed:"blue",failed:"red",fail:"red",unknown:"black"})[info.status]); | |
146 $("#agree_option")[0].className="option"+(op?" option"+op:""); | |
147 $("#agree_option").css("display",status?"block":"none"); | |
148 | |
149 $("#claim_button").css("display",(userName==info.author)?"block":"none"); | |
150 $("#claimvote_option").css("display",status?"block":"none"); | |
151 | |
152 $("#claimbody")[0].className="claim_contents"; | |
153 $("#mentionbody")[0].className="mention_contents"; | |
154 | |
155 $("#claim_author").text(info.author); | |
156 $("#mention_author").text(userName); | |
157 $("#claimvote_option")[0].className="option option"+(claim.agreeType=="majority"?2:1); | |
158 $("#mentionvote_option")[0].className="option option1"; | |
159 var stateMap={}; | |
160 for(var i=0;i<info.users.length;i++)stateMap['#'+info.users[i].id]=info.users[i].status; | |
161 claimUserMap=new HashSet(info.users.map(function(u){return u.id})); | |
162 mentionUserMap=new HashSet(); | |
163 $("#claim_users").text(""); | |
164 $("#mention_users").text(""); | |
165 if(userName!=info.author)mentionUserMap.add(info.author); | |
166 for(var i=0;i<userList.length;i++){ | |
167 var name=userList[i]; | |
168 if(name!=info.author){ | |
169 var status=stateMap['#'+name]; | |
170 createUserSelectItem(name,status,claimUserMap).appendTo($("#claim_users")); | |
171 }if(name!=userName){ | |
172 createUserSelectItem(name,name==info.author?"unknown":"",mentionUserMap).appendTo($("#mention_users")); | |
87 | 173 } |
125 | 174 } |
175 resetMentionForm(); | |
176 popupShowMain() | |
87 | 177 } |
178 | |
179 | |
180 function claimSave(){ | |
125 | 181 var claim=formClaim; |
182 var info=claim.info; | |
183 var id=claim.id||root_id; | |
184 var agreeType=[null,"unanimously","majority"][($('#claimvote_option')[0].className.match("[0-9]+")||"0")[0]]; | |
185 var title=$('#claimform_title').val(); | |
186 var contents=$('#claimform_contents').val(); | |
187 var d=$('#claimform_d').val(); | |
188 var w=$('#claimform_w').val(); | |
189 var b=$('#claimform_b').val(); | |
190 var q=$('#claimform_q').val(); | |
191 var r=$('#claimform_r').val(); | |
192 var users=claimUserMap.toArray(); | |
193 var errors=[]; | |
194 if(!title)errors.push("タイトル"); | |
195 if(!agreeType)errors.push("採決方法"); | |
196 if(users.length==0)errors.push("同意を取るユーザ"); | |
197 if(errors.length){ | |
198 alert("未入力項目:"+errors.join(", ")); | |
199 }else{ | |
200 $.ajax({ | |
201 url:BASE_URL+"/claims/edit/"+id, | |
202 success:function(o){loadConsensus(root_id)}, | |
203 type:"POST",cache:false, | |
204 contentType:"application/json", | |
205 data:JSON.stringify({type:agreeType,toulmin:{title:title,contents:contents,q:q,d:d,w:w,b:b,r:r},author:userName,users:users}), | |
206 error:function(o){console.log("ERROR",o)} | |
207 }); | |
208 popupHideAll(); | |
209 } | |
87 | 210 } |
211 function claimAgree(status){ | |
125 | 212 var claim=formClaim; |
213 var info=claim.info; | |
214 var id=claim.id||root_id; | |
215 $.ajax({ | |
216 url:BASE_URL+"/claims/answer/"+id+"/"+userName+"/"+status, | |
217 success:function(o){loadConsensus(root_id)}, | |
218 type:"POST",cache:false, | |
219 error:function(o){console.log("ERROR",o)} | |
220 }); | |
221 popupHideAll(); | |
87 | 222 } |
223 function mentionSave(){ | |
125 | 224 var claim=formClaim; |
225 var info=claim.info; | |
226 var id=claim.id||root_id; | |
227 var mentionType=[null,"refutation","question","suggestion"][($('#mention_option')[0].className.match("[0-9]+")||"0")[0]]; | |
228 var agreeType=[null,"unanimously","majority"][($('#mentionvote_option')[0].className.match("[0-9]+")||"0")[0]]; | |
229 var title=$('#mentionform_title').val(); | |
230 var contents=$('#mentionform_contents').val(); | |
231 var d=$('#mentionform_d').val(); | |
232 var w=$('#mentionform_w').val(); | |
233 var b=$('#mentionform_b').val(); | |
234 var q=$('#mentionform_q').val(); | |
235 var r=$('#mentionform_r').val(); | |
236 var users=mentionUserMap.toArray(); | |
237 var author=userName; | |
238 var errors=[]; | |
239 if(!title)errors.push("タイトル"); | |
240 if(!agreeType)errors.push("採決方法"); | |
241 if(!mentionType)errors.push("反論質問提案"); | |
242 if(users.length==0)errors.push("同意を取るユーザ"); | |
243 if(errors.length){ | |
244 alert("未入力項目:"+errors.join(", ")); | |
245 }else{ | |
246 $.ajax({ | |
247 url:BASE_URL+"/claims/"+mentionType+"/"+id+"/create", | |
248 success:function(o){loadConsensus(root_id)}, | |
249 type:"POST",cache:false,contentType:"application/json", | |
250 data:JSON.stringify({type:agreeType,toulmin:{title:title,contents:contents,q:q,d:d,w:w,b:b,r:r},author:author,users:users}), | |
251 error:function(o){console.log("ERROR",o)} | |
252 }); | |
253 popupHideAll(); | |
254 } | |
87 | 255 } |
256 | |
257 </script> | |
125 | 258 <div class='header'> |
259 <nobr id='header_title'><a href='index.html'>Home</a><span id='headertitle_main' style='margin-left:40px;'>loading</span></nobr> | |
260 </div> | |
261 <p class='revisionDisplay'> | |
122
9cfb52e94bd0
implemented slider
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
119
diff
changeset
|
262 <label for="revInfo">Revision Number:</label> |
9cfb52e94bd0
implemented slider
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
119
diff
changeset
|
263 <input type="text" id="revisionDisplayId" style='background-color:black; border:0; color:white;'/> |
125 | 264 </p> |
265 <div class="revisionSlider" id="slider" ></div> | |
87 | 266 |
125 | 267 <div style="position:relative;left:0;top:0;" id='treeMain'> |
268 <div style="position:absolute;width:0;height:0;left:100;" id='treeRoot'> | |
269 </div> | |
270 </div> | |
87 | 271 |
125 | 272 <div class='userList'></div> |
87 | 273 |
274 | |
125 | 275 <div id='popup_base' style='display:none;z-index:100'> |
276 <div id='popup_background'></div> | |
277 <div class='popup_center'> | |
278 <div class='claiminfo' id='claiminfo'> | |
279 <div class='claim_title'><input placeholder="title" id='claimform_title'></div> | |
280 <div id='claimbody' class='claim_contents'> | |
281 <div class='claim_menu'> | |
282 <div class='menu_item menu_contents' onclick="$('#claimbody')[0].className='claim_contents'">Contents</div> | |
283 <div class='menu_item menu_toulmin' onclick="$('#claimbody')[0].className='claim_toulmin'">Toulmin</div> | |
284 <div class='menu_item menu_users' onclick="$('#claimbody')[0].className='claim_users'">Users</div> | |
285 <div id='claim_status'></div> | |
286 </div> | |
287 <div class='claim_main main_contents'> | |
288 <textarea placeholder='contents' id='claimform_contents'></textarea> | |
289 </div> | |
290 <div class='claim_main main_toulmin'> | |
291 <div class='item_toulmin'><span>データ</span><input id='claimform_d'></div> | |
292 <div class='item_toulmin'><span>論拠 </span><input id='claimform_w'></div> | |
293 <div class='item_toulmin'><span>裏付け</span><input id='claimform_b'></div> | |
294 <div class='item_toulmin'><span>限定詞</span><input id='claimform_q'></div> | |
295 <div class='item_toulmin'><span>反駁 </span><input id='claimform_r'></div> | |
296 </div> | |
297 <div class='claim_main main_users'> | |
298 <span class='author_label'>作者:</span> | |
299 <span class='author_name' id='claim_author'></span> | |
300 <div class='option option1' id='claimvote_option'> | |
301 <span class='option option1 vote1' onclick="$('#claimvote_option')[0].className='option option1'">全会一致</span> | |
302 <span class='option option2 vote2' onclick="$('#claimvote_option')[0].className='option option2'">多数決</span> | |
303 </div> | |
304 <div id='claim_users'></div> | |
305 </div> | |
306 </div> | |
307 <div class='claim_footer'> | |
308 <span onclick='popupShowSubMain()' class='button mention_button'>mention</span> | |
309 <div class='option' id='agree_option'> | |
310 <span class='option option1 agree1' onclick="$('#agree_option')[0].className='option option1';claimAgree('denied');">否認</span> | |
311 <span class='option option2 agree2' onclick="$('#agree_option')[0].className='option option2';claimAgree('pend');">保留</span> | |
312 <span class='option option3 agree3' onclick="$('#agree_option')[0].className='option option3';claimAgree('agreed');">合意</span> | |
313 </div> | |
314 <div id='claim_button'> | |
315 <span class='button cancel' onclick="popupHideAll()">cancel</span> | |
316 <span class='button save' onclick="claimSave()">save</span> | |
317 </div> | |
318 </div> | |
319 <div class='cover' id='claim_cover'></div> | |
320 </div> | |
87 | 321 |
322 | |
125 | 323 <div class='mentioninfo' id='mentioninfo'> |
324 <div class='claim_title'><input placeholder="title" id='mentionform_title'></div> | |
325 <div id='mentionbody' class='mention_contents'> | |
326 <div class='claim_menu'> | |
327 <div class='menu_item menu_contents' onclick="$('#mentionbody')[0].className='mention_contents'">Contents</div> | |
328 <div class='menu_item menu_toulmin' onclick="$('#mentionbody')[0].className='mention_toulmin'">Toulmin</div> | |
329 <div class='menu_item menu_users' onclick="$('#mentionbody')[0].className='mention_users'">Users</div> | |
330 </div> | |
331 <div class='mention_main main_contents'> | |
332 <textarea placeholder='contents' id='mentionform_contents'></textarea> | |
333 </div> | |
334 <div class='mention_main main_toulmin'> | |
335 <div class='item_toulmin'><span>データ</span><input id='mentionform_d'></div> | |
336 <div class='item_toulmin'><span>論拠 </span><input id='mentionform_w'></div> | |
337 <div class='item_toulmin'><span>裏付け</span><input id='mentionform_b'></div> | |
338 <div class='item_toulmin'><span>限定詞</span><input id='mentionform_q'></div> | |
339 <div class='item_toulmin'><span>反駁 </span><input id='mentionform_r'></div> | |
340 </div> | |
341 <div class='mention_main main_users'> | |
342 <span class='author_label'>作者:</span> | |
343 <span class='author_name' id='mention_author'></span> | |
344 <div class='option option1' id='mentionvote_option'> | |
345 <span class='option option1 vote1' onclick="$('#mentionvote_option')[0].className='option option1'">全会一致</span> | |
346 <span class='option option2 vote2' onclick="$('#mentionvote_option')[0].className='option option2'">多数決</span> | |
347 </div> | |
348 <div id='mention_users'></div> | |
349 </div> | |
350 </div> | |
351 <div class='claim_footer'> | |
352 <div class='option' id='mention_option'> | |
353 <span class='option option1 mention1' onclick="$('#mention_option')[0].className='option option1'">反論</span> | |
354 <span class='option option2 mention2' onclick="$('#mention_option')[0].className='option option2'">質問</span> | |
355 <span class='option option3 mention3' onclick="$('#mention_option')[0].className='option option3'">提案</span> | |
356 </div> | |
357 <span class='button cancel' onclick="popupShowMain()">cancel</span> | |
358 <span class='button save' onclick="mentionSave()">save</span> | |
359 </div> | |
360 <div class='cover' id='mention_cover'></div> | |
361 </div> | |
362 </div> | |
363 </div> | |
87 | 364 |
365 | |
366 | |
367 | |
125 | 368 <div id="loginPopup" style='position:fixed;left:0;top:0;width:100%;height:100%;z-index:10;display:none;'> |
369 <div style='position:absolute;left:0;top:0;width:100%;height:100%;background:black;opacity:0.5'></div> | |
370 <div style='position:absolute;left:50%;top:50%;'> | |
371 <div style='position:absolute;left:-160px;top:-80px;width:320px;height:120px;background:white'> | |
372 <form onsubmit="try{a=$('#loginUserName');if(a.val()){login(a.val());$('#loginPopup').remove();}}catch(e){console.log(e)}return false"> | |
373 <div style='position:absolute;left:20px;top:15px;font-size:24px;width:280;text-align:center;'> | |
374 R-Consensus Login | |
87 | 375 </div> |
125 | 376 <input type=text placeholder='username' style='position:absolute;left:20px;top:70px;width:180px;font-size:16px;height:24px;' id='loginUserName'> |
377 <span style='position:absolute;left:220px;top:70px;width:80px;font-size:16px;height:24px;line-height:24px;' class='button' value='login' onclick="try{a=$('#loginUserName');if(a.val()){login(a.val());$('#loginPopup').remove();}}catch(e){console.log(e)}return false">login</span> | |
378 </form> | |
379 </div> | |
380 </div> | |
381 </div> |