comparison develop/views/Extractapp/TaggingText.php @ 39:8347776a44fc extractapp

embedded topic, taglist,book metadata in file
author Zoe Hong <zhong@mpiwg-berlin.mpg.de
date Sun, 08 Mar 2015 22:28:21 +0100
parents e078e1500cc2
children 2e938dc046db
comparison
equal deleted inserted replaced
38:4b3da4802998 39:8347776a44fc
9 $topic_name = $viewmodel['topic_name']; 9 $topic_name = $viewmodel['topic_name'];
10 $topic_tag = $viewmodel['topic_tag']; 10 $topic_tag = $viewmodel['topic_tag'];
11 $info = $viewmodel['info']; 11 $info = $viewmodel['info'];
12 $messages = $viewmodel['messages']; 12 $messages = $viewmodel['messages'];
13 13
14 $taglist_infile = $viewmodel['taglist_infile'];
14 15
15 ?> 16 ?>
16 17
17 <html> 18 <html>
18 <head> 19 <head>
59 // === This is only for developing on local machine ==== 60 // === This is only for developing on local machine ====
60 var _GET = JSON.parse('<?php echo json_encode($_GET) ?>'); 61 var _GET = JSON.parse('<?php echo json_encode($_GET) ?>');
61 if (_GET['id']) { 62 if (_GET['id']) {
62 63
63 var info = JSON.parse('<?php echo json_encode($info) ?>'); 64 var info = JSON.parse('<?php echo json_encode($info) ?>');
64 var redirectUrl = "http://localhost:1080/localmonographs/develop/Extractapp/TaggingText"; 65 var redirectUrl = "http://localhost:1080/extraction-interface/develop/Extractapp/TaggingText";
65 var section_id = info['section_id']; 66 var section_id = info['section_id'];
66 67
67 var form = $('<form action="' + redirectUrl + '" method="post">' + 68 var form = $('<form action="' + redirectUrl + '" method="post">' +
68 '<input type="hidden" name="sectionId" value="'+section_id+'" />' + 69 '<input type="hidden" name="sectionId" value="'+section_id+'" />' +
69 '</form>'); 70 '</form>');
70 $('body').append(form); 71 $('body').append(form);
71 $(form).submit(); 72 $(form).submit();
72 } 73 }
73 // ==== 74 // ====
75 // --- check if taglist in file is up-to-date ---
76 var check_taglist = JSON.parse('<?php echo json_encode($taglist_infile) ?>');
77 if (check_taglist) {
78 // TODO: pop up to ask if load the latest taglist
79 var retVal = confirm("The tag list in the file is not up-to-date. \nDo you want to load file with new tag list?");
80 if( retVal == true ){
81 <?php $$taglistArray = $taglist_infile; ?>
82 alert("Load with new tag list.");
83 }else{
84 alert("You are using the old version of tag list.");
85 }
86 }
74 87
75 88
76 89
77 // TODO: Popup to proceeding the saving situations 90 // TODO: Popup to proceeding the saving situations
78 function handleFileVersionConflict() { 91 function handleFileVersionConflict() {