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