changeset 60:3239979f6673 extractapp

New: 1.display messages(style) 2.handle saving conflict:up-to-date or reload text
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Tue, 31 Mar 2015 11:58:26 +0200
parents 6e44605eb4f6
children c6fa7f83c5bf
files models/extractapp.php views/Extractapp/TaggingText.php
diffstat 2 files changed, 4 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/models/extractapp.php	Tue Mar 31 11:32:25 2015 +0200
+++ b/models/extractapp.php	Tue Mar 31 11:58:26 2015 +0200
@@ -261,6 +261,7 @@
         $this->messages['info'] .= "[Info] book name: ".$this->book_name;
         $this->messages['info'] .= ", section id: ". $this->section_id;
         $this->messages['info'] .= ", branch id: ".$this->branch_id;
+        $this->messages['info'] .= ", file id: ".$this->file_id;
         $this->messages['info'] .= "<br>";
 
         /*
--- a/views/Extractapp/TaggingText.php	Tue Mar 31 11:32:25 2015 +0200
+++ b/views/Extractapp/TaggingText.php	Tue Mar 31 11:58:26 2015 +0200
@@ -166,6 +166,7 @@
         el.stop().animate({'top':finaldestination},0);
     });
 
+
     // --- handle old version taglist ---
     var _GET = JSON.parse('<?php echo json_encode($_GET) ?>');
     if (_GET['id']) {
@@ -211,25 +212,9 @@
 
     }
 
-
     handleFileVersionConflict();
 
 
-    /*
-    // Popup choosing topic if first time to this section. without branch_id
-    if (info['file_id'] == 0) {  // or info['branch_id'] == 0, means new file
-        // ask to choose topic
-        $.ajax({
-
-        });
-        var popup = document.getElementById('popup-window');
-
-        // alert('choose topic!');
-    }
-    */
-    
-
-
 });
 $(document).on("click", "name", function (e) {
 
@@ -931,13 +916,12 @@
 </div>
 
 
-<div style="margin:10 30 10 30; max-width:1250">
+<div style="margin:10 30 10 30;max-width:1270;height:70px;overflow:scroll;overflow-x:hidden;">
     <p class="bg-info" style=""> <?php echo $messages['info']; ?> </p>
     <p class="bg-warning" style=""> <?php echo $messages['warning']; ?> 
-        <button id="reloadTextButton" onclick="reloadText(<?php echo $default_topic_id; ?>)" style="display:none;">Load Latest Version</button>
+        <button id="reloadTextButton" onclick="reloadText(<?php echo $default_topic_id; ?>)" class="btn btn-xs btn-default" style="display:none;">Load Latest Version</button>
     </p>
     <p class="bg-danger" style=""> <?php echo $messages['error']; ?> </p>
-
     <p class="bg-default" style=""> <?php echo $messages['debug']; ?> </p>
 </div>