Mercurial > hg > extraction-interface
annotate develop/views/Extractapp/configtagsintopic.php @ 21:c805470cefee
Remove bootstrap.TaggingText UI layout modification
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Tue, 24 Feb 2015 16:09:59 +0100 |
parents | 04db1dd9d10d |
children | a879f6b9d166 |
rev | line source |
---|---|
12
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
1 <?php |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
2 // --- initialize --- |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
3 $taglistArray = $viewmodel['taglistArray']; |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
4 $topic = $viewmodel['topic']; |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
5 $topic_name = $viewmodel['topic_name']; |
21
c805470cefee
Remove bootstrap.TaggingText UI layout modification
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
20
diff
changeset
|
6 $tag_intopic = $viewmodel['tag_intopic']; |
c805470cefee
Remove bootstrap.TaggingText UI layout modification
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
20
diff
changeset
|
7 $tag_others = $viewmodel['tag_others']; |
12
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
8 |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
9 ?> |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
10 |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
11 <html> |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
12 <head> |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
13 <title></title> |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
14 </head> |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
15 |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
16 <body> |
18
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
17 <script type="text/javascript"> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
18 function SelectMoveRows(s1, s2) |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
19 { |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
20 var selId = ''; |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
21 var selText = ''; |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
22 // Move rows from s1 to s2 from bottom to top |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
23 for (i = s1.options.length - 1; i >= 0; i--) |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
24 { |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
25 if (s1.options[i].selected == true) |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
26 { |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
27 selId = s1.options[i].value; |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
28 selText = s1.options[i].text; |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
29 var newRow = new Option(selText,selId); |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
30 s2.options[s2.length] = newRow; |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
31 s1.options[i] = null; |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
32 } |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
33 } |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
34 SelectSort(s2); |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
35 } |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
36 function SelectSort(selList) |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
37 { |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
38 var id = ''; |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
39 var t = ''; |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
40 for (x = 0; x < selList.length - 1; x++) |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
41 { |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
42 for (y = x+1; y < selList.length; y++) |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
43 { |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
44 if (selList[x].text > selList[y].text) |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
45 { |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
46 // Swap rows |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
47 id = selList[x].value; |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
48 t = selList[x].text; |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
49 selList[x].value = selList[y].value; |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
50 selList[x].text = selList[y].text; |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
51 selList[y].value = id; |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
52 selList[y].text = t; |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
53 } |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
54 } |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
55 } |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
56 } |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
57 |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
58 function checkTopic(t) { |
19
f60969462226
save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
18
diff
changeset
|
59 var ids = []; |
f60969462226
save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
18
diff
changeset
|
60 |
f60969462226
save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
18
diff
changeset
|
61 for (var i = 0; i < t.options.length; i++) { |
f60969462226
save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
18
diff
changeset
|
62 ids.push(t.options[i].value); |
f60969462226
save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
18
diff
changeset
|
63 console.log(t.options[i].text); |
f60969462226
save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
18
diff
changeset
|
64 } |
f60969462226
save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
18
diff
changeset
|
65 |
f60969462226
save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
18
diff
changeset
|
66 console.log(ids); |
f60969462226
save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
18
diff
changeset
|
67 var ids_json = JSON.stringify(ids); |
f60969462226
save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
18
diff
changeset
|
68 var topic_id = JSON.parse('<?php echo json_encode($topic) ?>'); |
18
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
69 |
19
f60969462226
save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
18
diff
changeset
|
70 $.ajax({ |
f60969462226
save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
18
diff
changeset
|
71 url : './ConfigTagsInTopic', |
f60969462226
save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
18
diff
changeset
|
72 async : false, |
f60969462226
save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
18
diff
changeset
|
73 type : 'POST', |
f60969462226
save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
18
diff
changeset
|
74 data : 'func=Update'+'&ids='+ids_json+'&topic_id='+topic_id, |
f60969462226
save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
18
diff
changeset
|
75 error: function (e) { |
f60969462226
save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
18
diff
changeset
|
76 console.log("error when update tags in topic"+ e ); |
f60969462226
save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
18
diff
changeset
|
77 }, |
f60969462226
save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
18
diff
changeset
|
78 success: function (e) { |
f60969462226
save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
18
diff
changeset
|
79 alert("Updated!"); |
f60969462226
save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
18
diff
changeset
|
80 } |
f60969462226
save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
18
diff
changeset
|
81 }).done(function(result) { |
f60969462226
save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
18
diff
changeset
|
82 }); |
18
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
83 |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
84 } |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
85 |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
86 </script> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
87 |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
88 <div class="container-fluid"> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
89 <div class="row"> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
90 <div class="col-xs-12 col-sm-12 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3"> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
91 |
19
f60969462226
save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
18
diff
changeset
|
92 <form name="config" autocomplete='off' action="Javascript:checkTopic(document.config.InTopic)"> |
18
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
93 <h3>Topic: <?php echo $topic_name;?> </h3> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
94 |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
95 <table class="table"> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
96 <thead> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
97 <tr> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
98 <td class="text-warning"> Selected tags </td> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
99 <td></td> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
100 <td class="text-warning"> Other tags </td> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
101 </tr> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
102 </thead> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
103 <tbody> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
104 <tr> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
105 <td> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
106 <select name="InTopic" size="<?php echo count($taglistArray)*0.8; ?>" class="form-control" multiple> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
107 <?php |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
108 foreach ($taglistArray as $taglistValue) { |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
109 if ($taglistValue['topic_id'] == $topic) { |
20
04db1dd9d10d
update topic_regex_relation table when saving (new) regex file
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
19
diff
changeset
|
110 echo "<option value='".$taglistValue['id']."'>".$taglistValue['name']." (".$taglistValue['tag'].") "."</option>"; |
18
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
111 } |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
112 } |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
113 ?> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
114 </select> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
115 </td> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
116 <td align="center" valign="middle"> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
117 <input type="button" value="<< Add" class="btn btn-primary" onClick="SelectMoveRows(document.config.Others, document.config.InTopic)"><br> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
118 <br> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
119 <input type="button" value="Remove >>" class="btn btn-warning" onClick="SelectMoveRows(document.config.InTopic, document.config.Others)"><br> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
120 </td> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
121 <td > |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
122 <select name="Others" size="<?php echo count($taglistArray)*0.8; ?>" class="form-control" multiple> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
123 <?php |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
124 foreach ($taglistArray as $taglistValue) { |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
125 if ($taglistValue['topic_id'] != $topic) { |
20
04db1dd9d10d
update topic_regex_relation table when saving (new) regex file
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
19
diff
changeset
|
126 echo "<option value='".$taglistValue['id']."'>".$taglistValue['name']." (".$taglistValue['tag'].") "."</option>"; |
18
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
127 } |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
128 } |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
129 ?> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
130 </select> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
131 </td> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
132 </tr> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
133 <tr> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
134 <td></td> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
135 <td><input type="submit" value="Submit" class="btn btn-lg btn-success"></td> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
136 <td></td> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
137 </tr> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
138 </tbody> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
139 </table> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
140 |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
141 |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
142 </form> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
143 </div> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
144 </div> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
145 </div> |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
146 |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
147 <!-- |
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
148 <form name="config" autocomplete='off' action="Javascript:checkTopic(this)"> |
12
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
149 <h3>Topic: <?php echo $topic_name;?> </h3> |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
150 <div> Select/Unselect the following tags for the topic. </div> |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
151 <input type="submit" value="Submit"> |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
152 |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
153 <table style="" border="1"> |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
154 <thead> |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
155 <tr> |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
156 <td>Name</td> |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
157 <td>Tag</td> |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
158 <td>Select/Unselect</td> |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
159 </tr> |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
160 </thead> |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
161 <tbody> |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
162 <?php |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
163 // list the tags with topic |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
164 foreach ($taglistArray as $taglistValue) { |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
165 echo "<tr>"; |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
166 echo "<td>".$taglistValue['name']."</td>"; |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
167 echo "<td>".$taglistValue['tag']."</td>"; |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
168 // checkbox for topic |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
169 if ($taglistValue['topic_id'] == $topic) { |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
170 echo "<td> <input type='checkbox' name='".$taglistValue['id']."' checked='true'/> </td>"; |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
171 } else { |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
172 echo "<td> <input type='checkbox' name='".$taglistValue['id']."'/> </td>"; |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
173 } |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
174 echo "</tr>"; |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
175 } |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
176 ?> |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
177 </tbody> |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
178 </table> |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
179 |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
180 </form> |
18
115dda3d1728
configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
12
diff
changeset
|
181 --> |
12
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
182 |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
183 |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
184 </body> |
e82ca7375e93
Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
185 </html> |