51
|
1 <meta http-equiv="content-type" content="text/html;charset=utf-8" />
|
53
|
2 <title>R-Consensus</title>
|
51
|
3 <link rel='stylesheet' href="form.css">
|
|
4 <script src='form.js'></script>
|
|
5 <script type="text/javascript" src="js/lib/jquery-1.8.1-min.js"></script>
|
|
6 <script type="text/javascript" src="js/lib/jquery-ui-1.8.23-min.js"></script>
|
|
7 <script type="text/javascript" src="js/lib/jquery.ui.touch-punch.min.js"></script>
|
|
8 <script type="text/javascript" src="js/lib/jsBezier-0.4-min.js"></script>
|
|
9 <script type="text/javascript" src="js/1.3.15/jsPlumb-util-1.3.15-RC1.js"></script>
|
|
10 <script type="text/javascript" src="js/1.3.15/jsPlumb-dom-adapter-1.3.15-RC1.js"></script>
|
|
11 <script type="text/javascript" src="js/1.3.15/jsPlumb-1.3.15-RC1.js"></script>
|
|
12 <script type="text/javascript" src="js/1.3.15/jsPlumb-defaults-1.3.15-RC1.js"></script>
|
|
13 <script type="text/javascript" src="js/1.3.15/jsPlumb-renderers-svg-1.3.15-RC1.js"></script>
|
|
14 <script type="text/javascript" src="js/1.3.15/jsPlumb-renderers-canvas-1.3.15-RC1.js"></script>
|
|
15 <script type="text/javascript" src="js/1.3.15/jsPlumb-renderers-vml-1.3.15-RC1.js"></script>
|
|
16 <script type="text/javascript" src="js/1.3.15/jquery.jsPlumb-1.3.15-RC1.js"></script>
|
|
17 <script type="text/javascript" src='treeArrangement.js'></script>
|
|
18 <script type="text/javascript">
|
|
19 var LOAD_INTERVAL=5;
|
|
20 var BASE_URL="";
|
|
21 if(!Array.prototype.filter){
|
|
22 Array.prototype.filter=function(func){
|
|
23 var arr=[];
|
|
24 for(var i=0;i<this.length;i++)if(func(this[i]))arr.push(this[i]);
|
|
25 return arr;
|
|
26 }
|
|
27 }
|
|
28
|
53
|
29 var userName;
|
|
30
|
51
|
31 var treeInfo;
|
|
32 var userList=[];
|
|
33 var root_id;
|
|
34 function loadConsensus(id){
|
|
35 function onload(json){
|
54
|
36 document.title="R-Consensus:"+json.toulmin.title;
|
|
37 $("#headertitle_main").text(json.toulmin.title)
|
51
|
38 if(treeInfo){
|
|
39 updateToNew(json);
|
|
40 }else{
|
|
41 console.log(JSON.parse(JSON.stringify(json)));
|
|
42 treeInfo=createJSONTreeInfo(json)
|
|
43 //userList=getUserListFromJSONTree(treeInfo.root);
|
|
44 showUserList([]);
|
|
45 updateNode(treeInfo.root);
|
|
46 updateTree();
|
|
47 }
|
|
48 }
|
|
49 $.ajax({
|
93
|
50 url:BASE_URL+"/consensus/browse/latest/"+id,
|
51
|
51 success:function(o){onload(o)},
|
|
52 type:"GET",cache:false,
|
|
53 error:function(o){console.log("ERROR",o)}
|
|
54 });
|
|
55 }
|
|
56 function loadUserList(){
|
|
57 $.ajax({
|
|
58 url:BASE_URL+"/users/all",
|
53
|
59 success:function(o){userList=o.sort();showUserList([]);},
|
51
|
60 type:"GET",cache:false,
|
|
61 error:function(o){console.log("ERROR",o)}
|
|
62 });
|
|
63 }
|
|
64
|
|
65 $(function(){
|
53
|
66 userName=localStorage.userName;
|
|
67 if(userName)start();
|
|
68 else $("#loginPopup").css("display","block");
|
|
69 })
|
|
70 function login(uname){
|
|
71 userName=localStorage.userName=uname;
|
|
72 start();
|
|
73 }
|
|
74 function start(){
|
|
75 $.ajax({
|
|
76 url:BASE_URL+"/users/create/"+userName,
|
|
77 success:function(o){console.log(o)},
|
|
78 type:"PUT",cache:false,
|
|
79 error:function(o){console.log(o)}
|
|
80 });
|
|
81
|
51
|
82 popupInit();
|
|
83 jsPlumb.importDefaults({
|
|
84 Connector : [ "Straight", { curviness:50 } ],
|
|
85 PaintStyle : { strokeStyle:"gray", lineWidth:2 },
|
|
86 EndpointStyle : {},
|
|
87 Anchors: ["BottomCenter","TopCenter"]
|
|
88 });
|
|
89 var consensus_id=(location.search.match("[0-9]+")||[])[0];
|
|
90 if(consensus_id){
|
|
91 root_id=consensus_id;
|
|
92 loadUserList()
|
|
93 loadConsensus(consensus_id);
|
|
94 setInterval(function(){loadUserList();loadConsensus(consensus_id)},LOAD_INTERVAL*1000);
|
|
95 }else{
|
|
96 document.body.innerHTML="<div style='color:white;font-size:64px'>No ClaimID Specified.<br><a href='index.html' style='color:#88f'>back</a></div>";
|
|
97 }
|
53
|
98 }
|
51
|
99
|
|
100 function updateToNew(json){
|
|
101 var t2=createJSONTreeInfo(json)
|
|
102 updateJSONTreeDiff(treeInfo.root,t2.root);
|
|
103
|
|
104 updateNode(treeInfo.root);
|
|
105 treeInfo.newLayout=t2.layout;
|
|
106 var cnt=0,time=500;
|
|
107 var time0=new Date();
|
|
108 var prevCnt=0;
|
|
109 function tfunc(t){return 2*t-t*t}
|
|
110 function animation(){
|
|
111 var cnt=(new Date()-time0)/time;
|
|
112 if(cnt<1){
|
|
113 if(prevCnt!=cnt){
|
|
114 var pt=tfunc(prevCnt);
|
|
115 var t=tfunc(cnt);
|
|
116 animateTree((t-1)/(pt-t));
|
|
117 prevCnt=cnt;
|
|
118
|
|
119 }
|
|
120 setTimeout(animation,10);
|
|
121 }else{
|
|
122 animateTree(0);
|
|
123 }
|
|
124 updateNode(treeInfo.root);
|
|
125 updateTree();
|
|
126 }
|
|
127 animation();
|
|
128 }
|
|
129
|
|
130 var ViewParam={
|
|
131 offsetTop:100,
|
|
132 offsetBottom:100,
|
|
133 offsetLeft:100,
|
|
134 offsetRight:100,
|
|
135 nodeWidth:120,
|
|
136 nodeHeight:60,
|
|
137 intervalX:140,
|
|
138 intervalY:120
|
|
139 };
|
|
140
|
|
141 function animateTree(t){
|
|
142 function animateNodePosition(node,t){
|
|
143 node.position.x=(node.position.x*t+node.newPosition.x)/(1+t);
|
|
144 node.position.y=(node.position.y*t+node.newPosition.y)/(1+t);
|
|
145 for(var i=0;i<node.mentions.length;i++){
|
|
146 animateNodePosition(node.mentions[i],t);
|
|
147 }
|
|
148 if(t==0){
|
|
149 if(node.newPosition.remove){
|
|
150 jsPlumb.removeAllEndpoints(node.view);
|
|
151 $(node.view).remove();
|
|
152 }
|
|
153 node.mentions=node.mentions.filter(function(n){return !n.newPosition.remove});
|
|
154 }
|
|
155 }
|
|
156 animateNodePosition(treeInfo.root,t);
|
|
157 treeInfo.layout.left=(treeInfo.layout.left*t+treeInfo.newLayout.left)/(1+t);
|
|
158 treeInfo.layout.right=(treeInfo.layout.right*t+treeInfo.newLayout.right)/(1+t);
|
|
159 treeInfo.layout.depth=(treeInfo.layout.depth*t+treeInfo.newLayout.depth)/(1+t);
|
|
160 }
|
|
161
|
|
162 function updateTree(){
|
|
163 with(treeInfo.layout){
|
|
164 $("#treeRoot").css({
|
|
165 left:ViewParam.offsetLeft+ViewParam.nodeWidth/2-ViewParam.intervalX*left,
|
|
166 top:ViewParam.offsetTop+ViewParam.nodeHeight/2});
|
|
167 $("#treeMain").css({
|
|
168 width:ViewParam.intervalX*(right-left)+ViewParam.nodeWidth+ViewParam.offsetLeft+ViewParam.offsetRight,
|
|
169 height:ViewParam.intervalY*(depth-1)+ViewParam.nodeHeight+ViewParam.offsetTop+ViewParam.offsetBottom,
|
|
170 top:50});
|
|
171 }
|
|
172 jsPlumb.repaintEverything();
|
|
173 }
|
|
174
|
|
175
|
|
176 var relationJPMap={
|
|
177 suggestion:"提案",
|
|
178 refutation:"反論",
|
|
179 question:"質問"
|
|
180 };
|
|
181 function updateNode(node){
|
|
182 if(updateClaimElement(node)){
|
|
183 var fc=$("#treeRoot")[0].firstChild;
|
|
184 if(fc)$("#treeRoot")[0].insertBefore(node.view[0],fc);
|
|
185 else $("#treeRoot").append(node.view);
|
|
186 }
|
|
187 node.view.css({
|
|
188 left:node.position.x*ViewParam.intervalX-ViewParam.nodeWidth/2,
|
|
189 top:node.position.y*ViewParam.intervalY-ViewParam.nodeHeight/2
|
|
190 });
|
|
191 var childs=node.mentions;
|
|
192 for(var i=0;i<childs.length;i++){
|
|
193 var child=childs[i];
|
|
194 var created=!child.view;
|
|
195 updateNode(child);
|
|
196 if(created){
|
|
197 var c=jsPlumb.connect({source:node.view[0],target:child.view[0]});
|
|
198 c.setLabel({label:"<span style='color:white'>"+(relationJPMap[child.relation]||child.relation)+"</span>",cssStyle:"color:white"});
|
|
199 }
|
|
200 }
|
|
201 }
|
|
202
|
|
203 var focusedUser=null;
|
|
204 function setFocusedShadowEverything(){
|
|
205 function recFocusShadow(node){
|
|
206 setFocusedShadow(node);
|
|
207 for(var i=0;i<node.mentions.length;i++){
|
|
208 recFocusShadow(node.mentions[i]);
|
|
209 }
|
|
210 }
|
|
211 recFocusShadow(treeInfo.root);
|
|
212 }
|
|
213 function setFocusedShadow(node){
|
|
214 var name=focusedUser||userName;
|
|
215 var color;
|
|
216 console.log(node.info.author)
|
|
217 if(node.info.author==name)color="#afa";
|
|
218 else{
|
|
219 var users=node.info.users,status;
|
|
220 for(var i=0;i<users.length;i++){
|
|
221 var u=users[i];
|
|
222 if(u.id==name){status=u.status;break;}
|
|
223 }
|
|
224 color=({agreed:"#aaf",denied:"#faa",pend:"white",unknown:"white"})[status];
|
|
225 }
|
|
226 node.view.css("box-shadow",color?color+" 0 0 30px":"none");
|
|
227 }
|
|
228 function updateClaimElement(node){
|
|
229 var created=false;
|
|
230 if(!node.view){
|
|
231 created=true
|
|
232 node.view=$("<div class='claimNode'/>");
|
|
233 node.view.click(function(){showClaim(node);});
|
|
234 node.view.hover(
|
|
235 function(){div.css("box-shadow","white 0 0 50px");showUserList(node.info.users,node.info.author)},
|
|
236 function(){try{setFocusedShadow(node);}catch(e){console.log(e);}showUserList([])}
|
|
237 )
|
|
238 }
|
|
239 setFocusedShadow(node);
|
|
240 var div=node.view;
|
|
241 div.text(node.info.toulmin.title);
|
|
242 var statusBackground={pass:"#aaf",unknown:"#fff",failed:"#faa",fail:"#faa"};
|
|
243 var statusBorder={pass:"#66a",unknown:"#aaa",failed:"#a66",fail:"#a66"};
|
|
244 div.css("background",statusBackground[node.info.status]||"white");
|
|
245 div.css("border-color",statusBorder[node.info.status]||"white");
|
|
246 return created;
|
|
247 }
|
|
248
|
|
249
|
|
250 function showUserList(users,author){
|
|
251 var statusMap={};
|
|
252 var userListElement=$(".userList");
|
|
253 userListElement.text('')
|
|
254 if(author)statusMap['#'+author]='author';
|
|
255 for(var i=0;i<users.length;i++){
|
|
256 statusMap['#'+users[i].id]=users[i].status;
|
|
257 }
|
|
258 for(var i=0;i<userList.length;i++){
|
|
259 var u=userList[i];
|
|
260 var ue=createUserElement(u==userName?"あなた("+u+")":u,statusMap['#'+u]);
|
|
261 if(u==userName){
|
|
262 ue.css({fontWeight:"bold"})
|
|
263 }
|
|
264 ue.appendTo(userListElement);
|
|
265 with({name:u,element:ue}){
|
|
266 ue.hover(
|
|
267 function(){
|
|
268 element.css("opacity",1);
|
|
269 focusedUser=name;setFocusedShadowEverything()
|
|
270 },
|
|
271 function(){
|
|
272 element.css("opacity",0.5);
|
|
273 focusedUser=userName;setFocusedShadowEverything()
|
|
274 }
|
|
275 )
|
|
276 }
|
|
277
|
|
278 }
|
|
279 $(".userList").css("opacity","1");
|
|
280 }
|
|
281 function hideUserList(){
|
|
282 $(".userStatus").css("background","none");
|
|
283 $(".userItem").css("opacity","1");
|
|
284 $(".userList").css("opacity","0.2");
|
|
285 }
|
|
286 </script>
|
|
287 <style>
|
|
288 div.claimNode{
|
|
289 z-index:20;
|
|
290 position:absolute;width:92px;height:40px;font-size:12px;padding:4px;background:white;
|
|
291 border:2px solid silver;
|
|
292 overflow:hidden;
|
|
293 border-radius:5px;
|
|
294 cursor:pointer;
|
|
295 }
|
|
296 body{background-color:black;}
|
|
297
|
|
298 div.userList{
|
|
299 position:fixed;
|
|
300 z-index:30;
|
|
301 right:0;top:0;
|
|
302 width:160px;
|
|
303 }
|
|
304 div.header{
|
|
305 position:absolute;
|
|
306 left:0;top:0;
|
|
307 z-index:5;
|
|
308 height:50px;
|
|
309 width:100%;
|
|
310 background:#223;
|
53
|
311 background:-moz-linear-gradient(top,#002,#223);
|
51
|
312 background:-webkit-gradient(linear,left top,left bottom,from(#002),to(#223));
|
|
313 color:silver;
|
|
314 font-size:40px;
|
|
315 }
|
86
|
316 div.revision{
|
|
317 position:absolute;
|
|
318 left:0;top:50px;
|
|
319 z-index:5;
|
|
320 height:25px;
|
|
321 width:100%;
|
|
322 color:silver;
|
|
323 font-size:20px;
|
|
324 }
|
51
|
325
|
|
326 </style>
|
|
327 <script>
|
|
328 function resetMentionForm(){
|
|
329 var keys=['title','contents','w','d','b','q','r'];
|
|
330 for(var i=0;i<keys.length;i++)$("#mentionform_"+keys[i]).val("");
|
|
331 $("#mention_option")[0].className="option";
|
|
332 }
|
|
333 var formClaim;
|
|
334 var claimUserMap,mentionUserMap;
|
|
335 function showClaim(claim){
|
|
336 formClaim=claim;
|
|
337 var info=claim.info;
|
|
338 var keys=['title','contents','w','d','b','q','r'];
|
|
339 for(var i=0;i<keys.length;i++)$("#claimform_"+keys[i]).val(info.toulmin[keys[i]]);
|
|
340
|
|
341 var status="";
|
|
342 for(var i=0;i<info.users.length;i++)if(info.users[i].id==userName)status=info.users[i].status;
|
|
343 var op=({denied:1,pend:2,agreed:3})[status];
|
|
344
|
|
345 $("#claim_status").text(info.status)
|
|
346 $("#claim_status").css("color",({pass:"blue",failed:"red",fail:"red",unknown:"black"})[info.status]);
|
|
347 $("#agree_option")[0].className="option"+(op?" option"+op:"");
|
|
348 $("#agree_option").css("display",status?"block":"none");
|
|
349
|
|
350 $("#claim_button").css("display",(userName==info.author)?"block":"none");
|
|
351 $("#claimvote_option").css("display",status?"block":"none");
|
|
352
|
|
353 $("#claimbody")[0].className="claim_contents";
|
|
354 $("#mentionbody")[0].className="mention_contents";
|
|
355
|
|
356 $("#claim_author").text(info.author);
|
|
357 $("#mention_author").text(userName);
|
|
358 $("#claimvote_option")[0].className="option option"+(claim.agreeType=="majority"?2:1);
|
|
359 $("#mentionvote_option")[0].className="option option1";
|
|
360 var stateMap={};
|
|
361 for(var i=0;i<info.users.length;i++)stateMap['#'+info.users[i].id]=info.users[i].status;
|
|
362 claimUserMap=new HashSet(info.users.map(function(u){return u.id}));
|
|
363 mentionUserMap=new HashSet();
|
|
364 $("#claim_users").text("");
|
|
365 $("#mention_users").text("");
|
|
366 if(userName!=info.author)mentionUserMap.add(info.author);
|
|
367 for(var i=0;i<userList.length;i++){
|
|
368 var name=userList[i];
|
|
369 if(name!=info.author){
|
|
370 var status=stateMap['#'+name];
|
|
371 createUserSelectItem(name,status,claimUserMap).appendTo($("#claim_users"));
|
|
372 }if(name!=userName){
|
|
373 createUserSelectItem(name,name==info.author?"unknown":"",mentionUserMap).appendTo($("#mention_users"));
|
|
374 }
|
|
375 }
|
|
376 resetMentionForm();
|
|
377 popupShowMain()
|
|
378 }
|
|
379
|
|
380
|
|
381 function claimSave(){
|
|
382 var claim=formClaim;
|
|
383 var info=claim.info;
|
|
384 var id=claim.id||root_id;
|
|
385 var agreeType=[null,"unanimously","majority"][($('#claimvote_option')[0].className.match("[0-9]+")||"0")[0]];
|
|
386 var title=$('#claimform_title').val();
|
|
387 var contents=$('#claimform_contents').val();
|
|
388 var d=$('#claimform_d').val();
|
|
389 var w=$('#claimform_w').val();
|
|
390 var b=$('#claimform_b').val();
|
|
391 var q=$('#claimform_q').val();
|
|
392 var r=$('#claimform_r').val();
|
|
393 var users=claimUserMap.toArray();
|
|
394 var errors=[];
|
|
395 if(!title)errors.push("タイトル");
|
|
396 if(!agreeType)errors.push("採決方法");
|
|
397 if(users.length==0)errors.push("同意を取るユーザ");
|
|
398 if(errors.length){
|
|
399 alert("未入力項目:"+errors.join(", "));
|
|
400 }else{
|
|
401 $.ajax({
|
|
402 url:BASE_URL+"/claims/edit/"+id,
|
|
403 success:function(o){loadConsensus(root_id)},
|
|
404 type:"POST",cache:false,
|
|
405 contentType:"application/json",
|
|
406 data:JSON.stringify({type:agreeType,toulmin:{title:title,contents:contents,q:q,d:d,w:w,b:b,r:r},author:userName,users:users}),
|
|
407 error:function(o){console.log("ERROR",o)}
|
|
408 });
|
|
409 popupHideAll();
|
|
410 }
|
|
411 }
|
|
412 function claimAgree(status){
|
|
413 var claim=formClaim;
|
|
414 var info=claim.info;
|
|
415 var id=claim.id||root_id;
|
|
416 $.ajax({
|
|
417 url:BASE_URL+"/claims/answer/"+id+"/"+userName+"/"+status,
|
|
418 success:function(o){loadConsensus(root_id)},
|
|
419 type:"POST",cache:false,
|
|
420 error:function(o){console.log("ERROR",o)}
|
|
421 });
|
|
422 popupHideAll();
|
|
423 }
|
|
424 function mentionSave(){
|
|
425 var claim=formClaim;
|
|
426 var info=claim.info;
|
|
427 var id=claim.id||root_id;
|
|
428 var mentionType=[null,"refutation","question","suggestion"][($('#mention_option')[0].className.match("[0-9]+")||"0")[0]];
|
|
429 var agreeType=[null,"unanimously","majority"][($('#mentionvote_option')[0].className.match("[0-9]+")||"0")[0]];
|
|
430 var title=$('#mentionform_title').val();
|
|
431 var contents=$('#mentionform_contents').val();
|
|
432 var d=$('#mentionform_d').val();
|
|
433 var w=$('#mentionform_w').val();
|
|
434 var b=$('#mentionform_b').val();
|
|
435 var q=$('#mentionform_q').val();
|
|
436 var r=$('#mentionform_r').val();
|
|
437 var users=mentionUserMap.toArray();
|
|
438 var author=userName;
|
|
439 var errors=[];
|
|
440 if(!title)errors.push("タイトル");
|
|
441 if(!agreeType)errors.push("採決方法");
|
|
442 if(!mentionType)errors.push("反論質問提案");
|
|
443 if(users.length==0)errors.push("同意を取るユーザ");
|
|
444 if(errors.length){
|
|
445 alert("未入力項目:"+errors.join(", "));
|
|
446 }else{
|
|
447 $.ajax({
|
|
448 url:BASE_URL+"/claims/"+mentionType+"/"+id+"/create",
|
|
449 success:function(o){loadConsensus(root_id)},
|
|
450 type:"POST",cache:false,contentType:"application/json",
|
|
451 data:JSON.stringify({type:agreeType,toulmin:{title:title,contents:contents,q:q,d:d,w:w,b:b,r:r},author:author,users:users}),
|
|
452 error:function(o){console.log("ERROR",o)}
|
|
453 });
|
|
454 popupHideAll();
|
|
455 }
|
|
456 }
|
|
457
|
|
458 </script>
|
|
459 <div class='header'>
|
54
|
460 <nobr id='header_title'><a href='index.html'>Home</a><span id='headertitle_main' style='margin-left:40px;'>loading</span></nobr>
|
51
|
461 </div>
|
86
|
462 <div class="revision">
|
|
463 <span onclick='var id=location.search.match("[0-9]+");location.href="/revisionviewer.html?="+id'>revision</span>
|
|
464 </div>
|
51
|
465
|
|
466 <div style="position:relative;left:0;top:0;" id='treeMain'>
|
|
467 <div style="position:absolute;width:0;height:0;left:100;" id='treeRoot'>
|
|
468 </div>
|
|
469 </div>
|
|
470
|
|
471 <div class='userList'></div>
|
|
472
|
|
473
|
|
474 <div id='popup_base' style='display:none;z-index:100'>
|
|
475 <div id='popup_background'></div>
|
|
476 <div class='popup_center'>
|
|
477 <div class='claiminfo' id='claiminfo'>
|
|
478 <div class='claim_title'><input placeholder="title" id='claimform_title'></div>
|
|
479 <div id='claimbody' class='claim_contents'>
|
|
480 <div class='claim_menu'>
|
|
481 <div class='menu_item menu_contents' onclick="$('#claimbody')[0].className='claim_contents'">Contents</div>
|
|
482 <div class='menu_item menu_toulmin' onclick="$('#claimbody')[0].className='claim_toulmin'">Toulmin</div>
|
|
483 <div class='menu_item menu_users' onclick="$('#claimbody')[0].className='claim_users'">Users</div>
|
|
484 <div id='claim_status'></div>
|
|
485 </div>
|
|
486 <div class='claim_main main_contents'>
|
|
487 <textarea placeholder='contents' id='claimform_contents'></textarea>
|
|
488 </div>
|
|
489 <div class='claim_main main_toulmin'>
|
|
490 <div class='item_toulmin'><span>データ</span><input id='claimform_d'></div>
|
|
491 <div class='item_toulmin'><span>論拠 </span><input id='claimform_w'></div>
|
|
492 <div class='item_toulmin'><span>裏付け</span><input id='claimform_b'></div>
|
|
493 <div class='item_toulmin'><span>限定詞</span><input id='claimform_q'></div>
|
|
494 <div class='item_toulmin'><span>反駁 </span><input id='claimform_r'></div>
|
|
495 </div>
|
|
496 <div class='claim_main main_users'>
|
|
497 <span class='author_label'>作者:</span>
|
|
498 <span class='author_name' id='claim_author'></span>
|
|
499 <div class='option option1' id='claimvote_option'>
|
|
500 <span class='option option1 vote1' onclick="$('#claimvote_option')[0].className='option option1'">全会一致</span>
|
|
501 <span class='option option2 vote2' onclick="$('#claimvote_option')[0].className='option option2'">多数決</span>
|
|
502 </div>
|
|
503 <div id='claim_users'></div>
|
|
504 </div>
|
|
505 </div>
|
|
506 <div class='claim_footer'>
|
|
507 <span onclick='popupShowSubMain()' class='button mention_button'>mention</span>
|
|
508 <div class='option' id='agree_option'>
|
|
509 <span class='option option1 agree1' onclick="$('#agree_option')[0].className='option option1';claimAgree('denied');">否認</span>
|
|
510 <span class='option option2 agree2' onclick="$('#agree_option')[0].className='option option2';claimAgree('pend');">保留</span>
|
|
511 <span class='option option3 agree3' onclick="$('#agree_option')[0].className='option option3';claimAgree('agreed');">合意</span>
|
|
512 </div>
|
|
513 <div id='claim_button'>
|
|
514 <span class='button cancel' onclick="popupHideAll()">cancel</span>
|
|
515 <span class='button save' onclick="claimSave()">save</span>
|
|
516 </div>
|
|
517 </div>
|
|
518 <div class='cover' id='claim_cover'></div>
|
|
519 </div>
|
|
520
|
|
521
|
|
522 <div class='mentioninfo' id='mentioninfo'>
|
|
523 <div class='claim_title'><input placeholder="title" id='mentionform_title'></div>
|
|
524 <div id='mentionbody' class='mention_contents'>
|
|
525 <div class='claim_menu'>
|
|
526 <div class='menu_item menu_contents' onclick="$('#mentionbody')[0].className='mention_contents'">Contents</div>
|
|
527 <div class='menu_item menu_toulmin' onclick="$('#mentionbody')[0].className='mention_toulmin'">Toulmin</div>
|
|
528 <div class='menu_item menu_users' onclick="$('#mentionbody')[0].className='mention_users'">Users</div>
|
|
529 </div>
|
|
530 <div class='mention_main main_contents'>
|
|
531 <textarea placeholder='contents' id='mentionform_contents'></textarea>
|
|
532 </div>
|
|
533 <div class='mention_main main_toulmin'>
|
|
534 <div class='item_toulmin'><span>データ</span><input id='mentionform_d'></div>
|
|
535 <div class='item_toulmin'><span>論拠 </span><input id='mentionform_w'></div>
|
|
536 <div class='item_toulmin'><span>裏付け</span><input id='mentionform_b'></div>
|
|
537 <div class='item_toulmin'><span>限定詞</span><input id='mentionform_q'></div>
|
|
538 <div class='item_toulmin'><span>反駁 </span><input id='mentionform_r'></div>
|
|
539 </div>
|
|
540 <div class='mention_main main_users'>
|
|
541 <span class='author_label'>作者:</span>
|
|
542 <span class='author_name' id='mention_author'></span>
|
|
543 <div class='option option1' id='mentionvote_option'>
|
|
544 <span class='option option1 vote1' onclick="$('#mentionvote_option')[0].className='option option1'">全会一致</span>
|
|
545 <span class='option option2 vote2' onclick="$('#mentionvote_option')[0].className='option option2'">多数決</span>
|
|
546 </div>
|
|
547 <div id='mention_users'></div>
|
|
548 </div>
|
|
549 </div>
|
|
550 <div class='claim_footer'>
|
|
551 <div class='option' id='mention_option'>
|
|
552 <span class='option option1 mention1' onclick="$('#mention_option')[0].className='option option1'">反論</span>
|
|
553 <span class='option option2 mention2' onclick="$('#mention_option')[0].className='option option2'">質問</span>
|
|
554 <span class='option option3 mention3' onclick="$('#mention_option')[0].className='option option3'">提案</span>
|
|
555 </div>
|
|
556 <span class='button cancel' onclick="popupShowMain()">cancel</span>
|
|
557 <span class='button save' onclick="mentionSave()">save</span>
|
|
558 </div>
|
|
559 <div class='cover' id='mention_cover'></div>
|
|
560 </div>
|
|
561 </div>
|
53
|
562 </div>
|
|
563
|
|
564
|
|
565
|
|
566
|
|
567 <div id="loginPopup" style='position:fixed;left:0;top:0;width:100%;height:100%;z-index:10;display:none;'>
|
|
568 <div style='position:absolute;left:0;top:0;width:100%;height:100%;background:black;opacity:0.5'></div>
|
|
569 <div style='position:absolute;left:50%;top:50%;'>
|
|
570 <div style='position:absolute;left:-160px;top:-80px;width:320px;height:120px;background:white'>
|
|
571 <form onsubmit="try{a=$('#loginUserName');if(a.val()){login(a.val());$('#loginPopup').remove();}}catch(e){console.log(e)}return false">
|
|
572 <div style='position:absolute;left:20px;top:15px;font-size:24px;width:280;text-align:center;'>
|
|
573 R-Consensus Login
|
|
574 </div>
|
|
575 <input type=text placeholder='username' style='position:absolute;left:20px;top:70px;width:180px;font-size:16px;height:24px;' id='loginUserName'>
|
|
576 <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>
|
|
577 </form>
|
|
578 </div>
|
|
579 </div>
|
|
580 </div>
|