diff develop/views/Extractapp/taggingtext.php @ 26:579f03f8bee5

merge table books_info into table books (execute Home/Test)
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Tue, 03 Mar 2015 10:33:42 +0100
parents 4b6d2d7e706e
children 4a29bccb6c59
line wrap: on
line diff
--- a/develop/views/Extractapp/taggingtext.php	Mon Mar 02 16:16:54 2015 +0100
+++ b/develop/views/Extractapp/taggingtext.php	Tue Mar 03 10:33:42 2015 +0100
@@ -8,7 +8,8 @@
 $default_topic_id = $viewmodel['default_topic_id'];
 $topic_name = $viewmodel['topic_name'];
 $topic_tag = $viewmodel['topic_tag'];
-$info = $viewmodel['info']; $messages = $viewmodel['messages'];
+$info = $viewmodel['info']; 
+$messages = $viewmodel['messages'];
 
 
 ?>
@@ -117,11 +118,31 @@
 
 
 
+    var info = JSON.parse('<?php echo json_encode($info) ?>');
+    // Popup to proceeding the saving situations
+    /*
+    if (info['current_fileId']) {
+        var retVal = confirm('There were something happened/someone editing in the between of time. 
+            Please choose what you want to proceed the saving. 
+            Click "OK" to force saving the current file.');
+        if( retVal == true ){
+            // TODO: force saving
+            alert("You do the force saving!");
+            return true;
+        }else{
+            // TODO: reload with the new file id (current_FileId)
 
 
+            alert("You will reload for the latest version!");            
+            return false;
+        }
+
+    };
+    
+    */
+
 
     // Popup choosing topic if first time to this section. without branchId
-    var info = JSON.parse('<?php echo json_encode($info) ?>');
     if (info['file_id'] == 0) {  // or info['branchId'] == 0, means new file
         // ask to choose topic
         $.ajax({