comparison develop/views/Extractapp/taggingtext.php @ 14:ac77748bb813

- Load regex files based on current topic. Only show the regex in this topic. To do that, it needs to lookup a table called 'topic_regex_relation' which has the relation of topic and regex filename in filesystem. - Extractapp UI with some layout modification: button, popup window, responsive (by bootstrap now). It was just for quick prototyping.
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Thu, 19 Feb 2015 11:07:27 +0100
parents cc36a20a68ab
children 1f98c92ebbfb
comparison
equal deleted inserted replaced
13:cc36a20a68ab 14:ac77748bb813
6 $section_id = $viewmodel['section_id']; 6 $section_id = $viewmodel['section_id'];
7 $topiclistArray = $viewmodel['topiclistArray']; 7 $topiclistArray = $viewmodel['topiclistArray'];
8 $default_topic_id = $viewmodel['default_topic_id']; 8 $default_topic_id = $viewmodel['default_topic_id'];
9 $topic_tag = $viewmodel['topic_tag']; 9 $topic_tag = $viewmodel['topic_tag'];
10 $info = $viewmodel['info']; 10 $info = $viewmodel['info'];
11 var_dump($info); 11 $messages = $viewmodel['messages'];
12
12 13
13 ?> 14 ?>
14 15
15 <html> 16 <html>
16 <head> 17 <head>
57 // === This is only for developing on local machine ==== 58 // === This is only for developing on local machine ====
58 var _GET = JSON.parse('<?php echo json_encode($_GET) ?>'); 59 var _GET = JSON.parse('<?php echo json_encode($_GET) ?>');
59 if (_GET['id']) { 60 if (_GET['id']) {
60 61
61 var info = JSON.parse('<?php echo json_encode($info) ?>'); 62 var info = JSON.parse('<?php echo json_encode($info) ?>');
62 var redirectUrl = "http://141.14.239.50:1080/localmonographs/develop/Extractapp/TaggingText"; 63 var redirectUrl = "http://localhost:1080/localmonographs/develop/Extractapp/TaggingText";
63 var section_id = info['section_id']; 64 var section_id = info['section_id'];
64 65
65 var form = $('<form action="' + redirectUrl + '" method="post">' + 66 var form = $('<form action="' + redirectUrl + '" method="post">' +
66 '<input type="hidden" name="sectionId" value="'+section_id+'" />' + 67 '<input type="hidden" name="sectionId" value="'+section_id+'" />' +
67 '</form>'); 68 '</form>');
85 //run once 86 //run once
86 var el=$('#follow-scroll'); 87 var el=$('#follow-scroll');
87 var originalelpos=el.offset().top; // take it where it originally is on the page 88 var originalelpos=el.offset().top; // take it where it originally is on the page
88 89
89 //run on scroll 90 //run on scroll
91 /*
90 $(window).scroll(function(){ 92 $(window).scroll(function(){
91 var el = $('#follow-scroll'); // important! (local) 93 var el = $('#follow-scroll'); // important! (local)
92 var elpos = el.offset().top; // take current situation 94 var elpos = el.offset().top; // take current situation
93 var windowpos = $(window).scrollTop(); 95 var windowpos = $(window).scrollTop();
94 var finaldestination = windowpos+originalelpos; 96 var finaldestination = windowpos+originalelpos;
95 el.stop().animate({'top':finaldestination},500); 97 el.stop().animate({'top':finaldestination},500);
96 }); 98 });
99 */
100
97 }); 101 });
98 $(document).on("click", "name", function (e) { 102 $(document).on("click", "name", function (e) {
99 103
100 if ( $("#editTextId").html() != "Edit the text" ) return 0; 104 if ( $("#editTextId").html() != "Edit the text" ) return 0;
101 if ( $(this).prop("tagName").toLowerCase() != "name" ) return 0; 105 if ( $(this).prop("tagName").toLowerCase() != "name" ) return 0;
244 } 248 }
245 //document.styleSheets[0].addRule("tag001", "color:green;") 249 //document.styleSheets[0].addRule("tag001", "color:green;")
246 } 250 }
247 251
248 252
249 function smartRegexSave() { 253
250 var x; 254 function saveTextToLGService() {
251 var name=prompt("Please enter this Regex name",RegexLoadedName); 255 var info = JSON.parse('<?php echo json_encode($info) ?>');
252 if (name!=null){ 256
253 $.ajax({ 257
254 type : 'POST', 258 // if this is a new branch, ask for label
255 url : '../models/_extractapp_func.php', 259 if (info['branch_id'] == 0) {
256 async : false, 260 var label = prompt("Please enter your label for this new branch", "label for section "+info['section_id']);
257 data : 'func=SmartRegexSave'+'&text='+encodeURIComponent($('#smartRegexShowDiv').html())+'&filename='+name 261 while (label == null) {
258 }).done(function(result) { 262 label = prompt("Please enter your label for this new branch (not empty)", "label for section "+info['section_id']);
259 alert("Saved!"); 263 }
260 }); 264 };
265
266
267 var form = document.createElement("form");
268 form.setAttribute("method", "post");
269 form.setAttribute("action", "./TaggingText"); // hand to controller
270
271 // form.setAttribute("action", "./"+info['section_id']); // hand to controller
272 form.setAttribute("target", "_self");
273
274 var hiddenField = document.createElement("input");
275 hiddenField.setAttribute("name", "func");
276 hiddenField.setAttribute("value", "SaveFullTextToLGService");
277 form.appendChild(hiddenField);
278
279 if (info) {
280 var hiddenField = document.createElement("input");
281 hiddenField.setAttribute("name", "fileId");
282 hiddenField.setAttribute("value", info['file_id']);
283 form.appendChild(hiddenField);
284 var hiddenField = document.createElement("input");
285 hiddenField.setAttribute("name", "branchId");
286 hiddenField.setAttribute("value", info['branch_id']);
287 form.appendChild(hiddenField);
288 var hiddenField = document.createElement("input");
289 hiddenField.setAttribute("name", "userId");
290 hiddenField.setAttribute("value", info['user_id']);
291 form.appendChild(hiddenField);
292 var hiddenField = document.createElement("input");
293 hiddenField.setAttribute("name", "sectionId");
294 hiddenField.setAttribute("value", info['section_id']);
295 form.appendChild(hiddenField);
296
297
261 } 298 }
262 } 299 var hiddenField = document.createElement("input");
263 300 hiddenField.setAttribute("name", "label");
264 function _postForContineTagging(form) { 301 hiddenField.setAttribute("value", label);
265 302 form.appendChild(hiddenField);
266 303
267 var hiddenField = document.createElement("input"); 304 var hiddenField = document.createElement("input");
268 hiddenField.setAttribute("name", "text"); 305 hiddenField.setAttribute("name", "text");
269 var el = document.getElementById("editable-area"); 306 var el = document.getElementById("editable-area");
307 //var text = encodeURIComponent(el.innerHTML);
270 var text = el.innerHTML; 308 var text = el.innerHTML;
271 hiddenField.setAttribute("value", text); 309 hiddenField.setAttribute("value", text);
272 form.appendChild(hiddenField); 310 form.appendChild(hiddenField);
273 311
274 var info = JSON.parse( '<?php echo json_encode($info) ?>'); 312
275
276 if (info) {
277 // TODO: different field info array based on fileId(branchId) existing or not
278 var hiddenField = document.createElement("input");
279 hiddenField.setAttribute("name", "fileId");
280 hiddenField.setAttribute("value", info['file_id']);
281 form.appendChild(hiddenField);
282 var hiddenField = document.createElement("input");
283 hiddenField.setAttribute("name", "branchId");
284 hiddenField.setAttribute("value", info['branch_id']);
285 form.appendChild(hiddenField);
286 var hiddenField = document.createElement("input");
287 hiddenField.setAttribute("name", "userId");
288 hiddenField.setAttribute("value", info['user_id']);
289 form.appendChild(hiddenField);
290 var hiddenField = document.createElement("input");
291 hiddenField.setAttribute("name", "sectionId");
292 hiddenField.setAttribute("value", info['section_id']);
293 form.appendChild(hiddenField);
294
295
296 }
297
298 if(navigator.userAgent.toLowerCase().indexOf('firefox') > -1) { 313 if(navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {
299 document.body.appendChild(form); 314 document.body.appendChild(form);
300 form.submit(); 315 form.submit();
301 } else { 316 } else {
302 form.submit(); // works under IE and Chrome, but not FF 317 form.submit(); // works under IE and Chrome, but not FF
303 } 318 }
304
305 }
306
307
308
309
310 // === for config tags in topic ===
311 function configTagsInTopic(topic_id) {
312 var form = document.createElement("form");
313
314 form.setAttribute("method", "post");
315 //form.setAttribute("action", "exportTable.php");
316 form.setAttribute("action", "./ConfigTagsInTopic"); // hand to controller
317 form.setAttribute("target", "_blank");
318
319
320 var hiddenField = document.createElement("input");
321 hiddenField.setAttribute("name", "topic");
322 hiddenField.setAttribute("value", topic_id);
323 form.appendChild(hiddenField);
324
325 _postForContineTagging(form);
326
327 }
328
329
330 function saveTextToLGService(section_id) {
331 var info = JSON.parse('<?php echo json_encode($info) ?>');
332
333 var el = document.getElementById("editable-area");
334
335 /*
336 $.ajax({
337 url : './TaggingText/'+section_id,
338 async : false,
339 type : 'POST',
340 data : 'func=SaveFullTextToLGService'+'&text='+el.innerHTML+'&fileId='+info['file_id']+'&branchId='+info['branch_id']+'&userId='+info['user_id']+'&sectionId='+info['section_id'],
341 success: function (result) {
342 console.log(result);
343 },
344 error: function (data) {
345 console.log("error when saving to LGService!");
346 }
347 }).done(function(result) {
348 alert("Saved!");
349 console.log("result: "+result);
350 });
351
352 */
353
354
355
356 var form = document.createElement("form");
357 form.setAttribute("method", "post");
358 // form.setAttribute("action", "./"); // hand to controller
359
360 form.setAttribute("action", "./"+info['section_id']); // hand to controller
361 form.setAttribute("target", "_self");
362
363 var hiddenField = document.createElement("input");
364 hiddenField.setAttribute("name", "func");
365 hiddenField.setAttribute("value", "SaveFullTextToLGService");
366 form.appendChild(hiddenField);
367
368 if (info) {
369 var hiddenField = document.createElement("input");
370 hiddenField.setAttribute("name", "fileId");
371 hiddenField.setAttribute("value", info['file_id']);
372 form.appendChild(hiddenField);
373 var hiddenField = document.createElement("input");
374 hiddenField.setAttribute("name", "branchId");
375 hiddenField.setAttribute("value", info['branch_id']);
376 form.appendChild(hiddenField);
377 var hiddenField = document.createElement("input");
378 hiddenField.setAttribute("name", "userId");
379 hiddenField.setAttribute("value", info['user_id']);
380 form.appendChild(hiddenField);
381 var hiddenField = document.createElement("input");
382 hiddenField.setAttribute("name", "sectionId");
383 hiddenField.setAttribute("value", info['section_id']);
384 form.appendChild(hiddenField);
385
386 }
387
388 var hiddenField = document.createElement("input");
389 hiddenField.setAttribute("name", "text");
390 //var el = document.getElementById("editable-area");
391 //var text = encodeURIComponent(el.innerHTML);
392 var text = el.innerHTML;
393 hiddenField.setAttribute("value", text);
394 form.appendChild(hiddenField);
395
396
397 if(navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {
398 document.body.appendChild(form);
399 form.submit();
400 } else {
401 form.submit(); // works under IE and Chrome, but not FF
402 }
403 319
404 } 320 }
405 321
406 322
407 323
411 var info = JSON.parse('<?php echo json_encode($info) ?>'); 327 var info = JSON.parse('<?php echo json_encode($info) ?>');
412 328
413 329
414 $('#load_topic_div').html(""); 330 $('#load_topic_div').html("");
415 $('#load_topic_div').css("display", "block"); 331 $('#load_topic_div').css("display", "block");
332
416 $('#load_topic_div').css("border", "1px solid black"); 333 $('#load_topic_div').css("border", "1px solid black");
417 $('#load_topic_div').css("background-color", "White"); 334 $('#load_topic_div').css("background-color", "White");
418 $('#load_topic_div').css("width", "200px"); 335 $('#load_topic_div').css("width", "150px");
419 $('#load_topic_div').css("height", "50px"); 336 $('#load_topic_div').css("height", "50px");
420 $('#load_topic_div').css("top", "20px"); 337 $('#load_topic_div').css("top", "20px");
421 $('#load_topic_div').css("left", "-200px"); 338 $('#load_topic_div').css("left", "-150px");
339
422 340
423 var topic_select = document.createElement("select"); 341 var topic_select = document.createElement("select");
424 topic_select.id = "loadTopiclist"; 342 topic_select.id = "loadTopiclist";
425 var selected_topic = t[0]; 343 var selected_topic = t[0];
426 topic_select.onchange = function(){ 344 topic_select.onchange = function(){
466 }; 384 };
467 topic_select.appendChild(option); 385 topic_select.appendChild(option);
468 } 386 }
469 387
470 $('#load_topic_div').append(topic_select); 388 $('#load_topic_div').append(topic_select);
389
471 390
472 var newbutton = document.createElement("button"); 391 var newbutton = document.createElement("button");
473 $(newbutton).html("Close"); 392 $(newbutton).html("Close");
393 $(newbutton).addClass("btn btn-default");
474 $(newbutton).attr("onclick", "$('#load_topic_div').css(\"display\", \"none\");"); 394 $(newbutton).attr("onclick", "$('#load_topic_div').css(\"display\", \"none\");");
475 $('#load_topic_div').append(newbutton); 395 $('#load_topic_div').append(newbutton);
476 396
477 } 397 }
398
399 // --- for config tags in topic ---
400 function _postForContineTagging(form) {
401 var hiddenField = document.createElement("input");
402 hiddenField.setAttribute("name", "text");
403 var el = document.getElementById("editable-area");
404 var text = el.innerHTML;
405 hiddenField.setAttribute("value", text);
406 form.appendChild(hiddenField);
407
408 var info = JSON.parse( '<?php echo json_encode($info) ?>');
409
410 if (info) {
411 // TODO: different field info array based on fileId(branchId) existing or not
412 var hiddenField = document.createElement("input");
413 hiddenField.setAttribute("name", "fileId");
414 hiddenField.setAttribute("value", info['file_id']);
415 form.appendChild(hiddenField);
416 var hiddenField = document.createElement("input");
417 hiddenField.setAttribute("name", "branchId");
418 hiddenField.setAttribute("value", info['branch_id']);
419 form.appendChild(hiddenField);
420 var hiddenField = document.createElement("input");
421 hiddenField.setAttribute("name", "userId");
422 hiddenField.setAttribute("value", info['user_id']);
423 form.appendChild(hiddenField);
424 var hiddenField = document.createElement("input");
425 hiddenField.setAttribute("name", "sectionId");
426 hiddenField.setAttribute("value", info['section_id']);
427 form.appendChild(hiddenField);
428
429 }
430
431 if(navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {
432 document.body.appendChild(form);
433 form.submit();
434 } else {
435 form.submit(); // works under IE and Chrome, but not FF
436 }
437
438 }
439
440 function configTagsInTopic(topic_id) {
441 var form = document.createElement("form");
442
443 form.setAttribute("method", "post");
444 //form.setAttribute("action", "exportTable.php");
445 form.setAttribute("action", "./ConfigTagsInTopic"); // hand to controller
446 form.setAttribute("target", "_blank");
447
448
449 var hiddenField = document.createElement("input");
450 hiddenField.setAttribute("name", "topic");
451 hiddenField.setAttribute("value", topic_id);
452 form.appendChild(hiddenField);
453
454 _postForContineTagging(form);
455
456 }
457
478 458
479 459
480 $(document).on("change", '#smartRegexPopUpSelectWord', function (e) { 460 $(document).on("change", '#smartRegexPopUpSelectWord', function (e) {
481 461
482 <?php 462 <?php
486 echo "}"; 466 echo "}";
487 } 467 }
488 ?> 468 ?>
489 }); 469 });
490 470
471 $(function () {
472
473 $('#example').popover({
474 //selector: '.has-popover'
475 content: function () {
476 return;
477 },
478 //template: output_content,
479 title: "Load Regex"
480 });
481 })
482
483
484
485 // init for popover used in bootstrap
486 $(function () {
487 $('[data-toggle="popover"]').popover()
488 })
491 489
492 </script> 490 </script>
491
492 <div class="container-fluid">
493 <div class="row">
494 <div class="col-xs-12 col-sm-12 col-md-12 col-lg-10 col-lg-offset-1">
495 <p class="bg-primary"> <?php echo $messages; ?> </p>
496 </div>
497 </div>
498
499 <div class="row">
500 <div id="editable-area" class="col-xs-8 col-sm-8 col-md-8 col-lg-7 col-lg-offset-1"><?php echo $stringInput; ?>
501 </div>
502 <div id="follow-scroll" class="col-xs-4 col-sm-4 col-md-4 col-lg-4">
503 <div id="load_topic_div" style="position: absolute; display: none"></div>
504 <div id="load_regex_div" style="position: absolute; display: none"></div>
505 <div id="smartRegexPopUpDiv" style="position: absolute; display: none">
506 Name: <input id="smartRegexPopUpName"></input><br><br>
507 Word List:
508 <select id="smartRegexPopUpSelectWord">
509 <option value="NULL" selected>無</option>
510 <?php
511 foreach ( $wordlistArray as $wordlistValue ) {
512 echo "<option value=\"".$wordlistValue[0]."\">".$wordlistValue[1]."</option>\n";
513 }
514 ?>
515 </select>
516 <br>
517 OR (USE "|" TO SEPARATE WORDS):<br>
518 <TEXTAREA id="smartRegexPopUpText" COLS=30 ROWS=4></TEXTAREA><br><br>
519 Tag:
520 <select id="smartRegexPopUpSelectTag">
521 <?php
522 foreach ( $taglistArray as $taglistValue ) {
523 echo "<option value=\"".$taglistValue[2]."\">".$taglistValue[1]."</option>\n";
524 }
525 echo "<option value=\"title\">Title</option>\n";
526 ?>
527 <option value="NOTAG">不標記</option>
528 </select><br>
529 <button id="smartRegexPopUpAdd" onclick="replaceSmartAdd()" class="btn btn-info" style="">Add</button>
530 <button id="smartRegexPopUpEdit" onclick="replaceSmartEdit()" class="btn btn-success" style="">Edit</button>
531 <button id="smartRegexPopUpDel" onclick="replaceSmartDel()" class="btn btn-warning" style="">Delete</button>
532 <button id="smartRegexPopUpBack" onclick="replaceSmartBack()" class="btn btn-default" style=""><<</button>
533 <button id="smartRegexPopUpFor" onclick="replaceSmartFor()" class="btn btn-default" style="">>></button>
534 <button onclick="replaceSmartClose()" class="btn btn-default" style="">Close</button>
535 </div>
536
537 <form action="javascript:void(0);">
538
539 <h4 class="text-success"> Config Topic</h4>
540 <button onclick="chooseTopic(<?php echo $default_topic_id; ?>)" class="btn-">Choose Topic</button>
541
542 <button onclick="configTagsInTopic(<?php echo $default_topic_id;?>)" style="">Config Tags</button></br>
543
544 <fieldset>
545 <legend><h4 class="text-success"> Replace By <i><b>Smart Regex</b></i>©: </h4></legend>
546 <div id="smartRegexShowDiv"></div><br>
547 <button onclick="smartRegexNew()" style="height: 30px; width: 220px">Add Regex Group</button></br>
548 Range: <input type="text" size="5" id="regexPageStart">to<input type="text" size="5" id="regexPageEnd"><br>
549 <button onclick="replaceSmartRun()" style="height: 30px; width: 220px">Run</button></br>
550 <button onclick="replaceSmartRunSpace()" style="height: 30px; width: 220px">Run(Allow space between Group)</button></br>
551 <button onclick="smartRegexSave()" style="height: 30px; width: 70px">Save</button>
552 <button onclick="smartRegexLoad(<?php echo $default_topic_id; ?>)" style="height: 30px; width: 70px">Load</button>
553 <button onclick="smartRegexEmpty()" style="height: 30px; width: 70px">Clear</button></br>
554
555 <!--
556 <button id="example" type="button" class="btn btn-sm btn-default" data-toggle="popover">Load</button>
557 -->
558
559 </fieldset>
560
561 <fieldset>
562 <legend><h4 class="text-success"> Tag by rule:</h4></legend>
563 <button onclick="tagNameWithLastName()" style="height: 30px; width: 220px">Tag Word Begin With Surname</button></br>
564 <button onclick="tagNameWithLastName2()" style="height: 30px; width: 170px">Tag Word Begin With</button><input type="text" size="2" id="surname"></br>
565 <!--<button onclick="tagTime()" style="height: 30px; width: 220px">Tag Time</button></br>-->
566 <!--<button onclick="tagBiogAddr()" style="height: 30px; width: 220px">Tag BiogAddr</button></br>-->
567 <button onclick="Undo()" style="height: 30px; width: 220px" id="buttonUndo" disabled="true">Undo</button>
568 </fieldset>
569
570 <fieldset>
571 <legend><h4 class="text-success"> Edit:</h4></legend>
572 <button onclick="saveTextToLGService()" style="height: 30px; width: 220px">Save to LGService</button></br>
573
574 <!--<button onclick="cleanUpTextArea()" style="height: 30px; width: 220px">Reform the text</button></br>-->
575 <button onclick="saveText(<?php echo $section_id; ?>)" style="height: 30px; width: 220px">Save the text</button></br>
576 <button onclick="editText()" id="editTextId" style="height: 30px; width: 220px">Edit the text</button></br>
577 </br>
578 <button onclick="window.open('./EditWordlist')" style="height: 30px; width: 220px">Manage Word List</button></br>
579 <button onclick="window.open('./EditTaglist')" style="height: 30px; width: 220px">Manage Tag List</button></br>
580 </fieldset>
581
582 <fieldset>
583 <legend><h4 class="text-success"> Export:</h4></legend>
584 Page: <input type="text" size="5" id="exportPageStart">to<input type="text" size="5" id="exportPageEnd"><br>
585 <button onclick="exportPage()" style="height: 30px; width: 220px">Export</button></br>
586 <button onclick="exportAll(<?php echo $default_topic_id;?>)" style="height: 30px; width: 220px">Export All</button></br>
587 </fieldset>
588
589 <fieldset>
590 <legend><h4 class="text-success"> Replace By <i><b>Regex</b></i>: </h4></legend>
591 Range: <input type="text" size="5" id="regexPageStart2">to<input type="text" size="5" id="regexPageEnd2"><br>
592 Regex: <input type="text" size="30" id="regexText"></br>
593 Replace: <input type="text" size="30" id="replaceText"><br>
594 <button onclick="replaceSmartRegex()">Replace!</button>
595 </fieldset>
596 </form>
597 </div>
598 </div>
599
600 </div>
601
493 602
494 <table width="1250" border="1"> 603 <table width="1250" border="1">
495 <tr> 604 <tr>
496 <td width="980"> 605 <td width="980">
497 <div id="editable-area" class="area" style="max-width: 980"><?php echo $stringInput; ?></div> 606 <div id="editable-area" class="area" style="max-width: 980"><?php echo $stringInput; ?></div>
540 <button onclick="smartRegexNew()" style="height: 30px; width: 220px">Add Regex Group</button></br> 649 <button onclick="smartRegexNew()" style="height: 30px; width: 220px">Add Regex Group</button></br>
541 Range: <input type="text" size="5" id="regexPageStart">to<input type="text" size="5" id="regexPageEnd"><br> 650 Range: <input type="text" size="5" id="regexPageStart">to<input type="text" size="5" id="regexPageEnd"><br>
542 <button onclick="replaceSmartRun()" style="height: 30px; width: 220px">Run</button></br> 651 <button onclick="replaceSmartRun()" style="height: 30px; width: 220px">Run</button></br>
543 <button onclick="replaceSmartRunSpace()" style="height: 30px; width: 220px">Run(Allow space between Group)</button></br> 652 <button onclick="replaceSmartRunSpace()" style="height: 30px; width: 220px">Run(Allow space between Group)</button></br>
544 <button onclick="smartRegexSave()" style="height: 30px; width: 70px">Save</button> 653 <button onclick="smartRegexSave()" style="height: 30px; width: 70px">Save</button>
545 <button onclick="smartRegexLoad(<?php echo $section_id;?>)" style="height: 30px; width: 70px">Load</button> 654 <button onclick="smartRegexLoad()" style="height: 30px; width: 70px">Load</button>
546 <button onclick="smartRegexEmpty()" style="height: 30px; width: 70px">Clear</button></br> 655 <button onclick="smartRegexEmpty()" style="height: 30px; width: 70px">Clear</button></br>
547 </fieldset> 656 </fieldset>
548 657
549 <fieldset> 658 <fieldset>
550 <legend>Tag by rule:</legend> 659 <legend>Tag by rule:</legend>
555 <button onclick="Undo()" style="height: 30px; width: 220px" id="buttonUndo" disabled="true">Undo</button> 664 <button onclick="Undo()" style="height: 30px; width: 220px" id="buttonUndo" disabled="true">Undo</button>
556 </fieldset> 665 </fieldset>
557 666
558 <fieldset> 667 <fieldset>
559 <legend>Edit:</legend> 668 <legend>Edit:</legend>
560 <button onclick="saveTextToLGService(<?php echo $section_id;?>)" style="height: 30px; width: 220px">Save to LGService</button></br> 669 <button onclick="saveTextToLGService()" style="height: 30px; width: 220px">Save to LGService</button></br>
561 670
562 <!--<button onclick="cleanUpTextArea()" style="height: 30px; width: 220px">Reform the text</button></br>--> 671 <!--<button onclick="cleanUpTextArea()" style="height: 30px; width: 220px">Reform the text</button></br>-->
563 <button onclick="saveText(<?php echo $section_id; ?>)" style="height: 30px; width: 220px">Save the text</button></br> 672 <button onclick="saveText(<?php echo $section_id; ?>)" style="height: 30px; width: 220px">Save the text</button></br>
564 <button onclick="editText()" id="editTextId" style="height: 30px; width: 220px">Edit the text</button></br> 673 <button onclick="editText()" id="editTextId" style="height: 30px; width: 220px">Edit the text</button></br>
565 </br> 674 </br>
566 <button onclick="window.open('./EditWordlist/<?php echo $section_id;?>')" style="height: 30px; width: 220px">Manage Word List</button></br> 675 <button onclick="window.open('./EditWordlist')" style="height: 30px; width: 220px">Manage Word List</button></br>
567 <button onclick="window.open('./EditTaglist/<?php echo $section_id;?>')" style="height: 30px; width: 220px">Manage Tag List</button></br> 676 <button onclick="window.open('./EditTaglist')" style="height: 30px; width: 220px">Manage Tag List</button></br>
568 </fieldset> 677 </fieldset>
569 678
570 <fieldset> 679 <fieldset>
571 <legend>Export:</legend> 680 <legend>Export:</legend>
572 Page: <input type="text" size="5" id="exportPageStart">to<input type="text" size="5" id="exportPageEnd"><br> 681 Page: <input type="text" size="5" id="exportPageStart">to<input type="text" size="5" id="exportPageEnd"><br>
584 </form> 693 </form>
585 </div> 694 </div>
586 </td> 695 </td>
587 </tr> 696 </tr>
588 </table> 697 </table>
698
699
700
589 </body> 701 </body>
590 702
591 </html> 703 </html>