comparison views/Extractapp/TaggingText.php @ 93:a05491461199 extractapp

bug fixed: solve the nested tagging issue
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Fri, 02 Oct 2015 12:18:34 +0200
parents 3e11a9c5a672
children b0cecc104639
comparison
equal deleted inserted replaced
92:f5b0cd4f25b2 93:a05491461199
55 <meta charset="UTF-8"> 55 <meta charset="UTF-8">
56 <title>Extraction Interface</title> 56 <title>Extraction Interface</title>
57 <meta http-equiv="no-cache"> 57 <meta http-equiv="no-cache">
58 <meta http-equiv="Expires" content="-1"> 58 <meta http-equiv="Expires" content="-1">
59 <meta http-equiv="Cache-Control" content="no-cache"> 59 <meta http-equiv="Cache-Control" content="no-cache">
60
60 <style> 61 <style>
61 dynasty 62 dynasty
62 { 63 {
63 color:red; 64 color:red;
64 } 65 }
84 echo ".span_".$taglistValue[2]."\n{\nbackground-color:".$taglistValue[3]."\n}\n"; 85 echo ".span_".$taglistValue[2]."\n{\nbackground-color:".$taglistValue[3]."\n}\n";
85 } 86 }
86 87
87 ?> 88 ?>
88 </style> 89 </style>
89
90 90
91 </head> 91 </head>
92 92
93 <body> 93 <body>
94 94
168 // popup-window overlapping issue 168 // popup-window overlapping issue
169 var pop_remove_tag_window = true; 169 var pop_remove_tag_window = true;
170 var taglistArray = JSON.parse('<?php echo json_encode($taglistArray) ?>'); 170 var taglistArray = JSON.parse('<?php echo json_encode($taglistArray) ?>');
171 for (var i = 0; i < taglistArray.length; i++) { 171 for (var i = 0; i < taglistArray.length; i++) {
172 var taglistValue = taglistArray[i]; 172 var taglistValue = taglistArray[i];
173 173
174
174 $(document).on("click", taglistValue[2], function (e) { 175 $(document).on("click", taglistValue[2], function (e) {
175 if ($("#editTextId").html() != "Edit the text") return 0; 176 if ($("#editTextId").html() != "Edit the text") return 0;
176 var tagName = $(this).prop("tagName").toLowerCase(); 177 var tagName = $(this).prop("tagName").toLowerCase();
177 /* 178 //if (tagName != taglistValue[2]) return 0;
178 if ($(this).prop("tagName").toLowerCase() != taglistValue[2]) { 179
179 return 0;
180 }
181 */
182 // pop_remove_tag_window is a global variable which indicates if to show the remove-popup-window 180 // pop_remove_tag_window is a global variable which indicates if to show the remove-popup-window
183 if (pop_remove_tag_window) { 181 if (pop_remove_tag_window) {
184 removeTagNewDiv( e, tagName , $(this)); 182 removeTagNewDiv( e, tagName , $(this));
185 }; 183 };
186 }); 184 return false;
185 });
186
187
188
187 }; 189 };
188 190
189 /* 191 /*
190 <?php 192 <?php
191 foreach ( $taglistArray as $taglistValue ) { 193 foreach ( $taglistArray as $taglistValue ) {