# HG changeset patch # User Zoe Hong # Date 1427794345 -7200 # Node ID 6e44605eb4f69dbe67fee40578c40f7715dd55c4 # Parent a11f9103b8db5cf74ee12d7fb671563a9d7abb31 New: 1.display messages 2.handle saving conflict:up-to-date or reload text diff -r a11f9103b8db -r 6e44605eb4f6 controllers/extractapp.php --- a/controllers/extractapp.php Tue Mar 31 10:59:52 2015 +0200 +++ b/controllers/extractapp.php Tue Mar 31 11:32:25 2015 +0200 @@ -23,7 +23,7 @@ $this->ReturnView($viewmodel->StartTagging(), true); break; case 'SaveFullTextToLGService': - $viewmodel->messages['info'] .= "SaveFullTextToLGService! "."
"; + $viewmodel->messages['info'] .= "SaveFullTextToLGService! "; $viewmodel->GetInfoFromPreviousPage($this->postdata); $response = $viewmodel->SaveFullTextToLGService($this->postdata); $viewmodel->UpdateInfoByResponseFromLGService($response); // update file_id, branch_id, user_id @@ -38,7 +38,7 @@ $viewmodel->SmartRegexSave($this->postdata); break; case 'ReloadText': - $viewmodel->messages['info'] .= "Reload the latest text "."
"; + $viewmodel->messages['info'] .= "Reload the latest text "; $viewmodel->GetInfoFromPreviousPage($this->postdata); $viewmodel->ReloadSetting(); // set file_id = current_fileId, current_fileId = 0 $viewmodel->GetTextFromFileId(); @@ -46,7 +46,7 @@ break; case 'ContinueTagging': - $viewmodel->messages['info'] .= "(Countinue tagging) "."
"; + $viewmodel->messages['info'] .= "(Countinue tagging) "; if ($this->postdata['topic']) { $viewmodel->SetTopic($this->postdata['topic']); } @@ -56,7 +56,7 @@ default: // first time visit extraction interface from LGService - $viewmodel->messages['info'] .= "Welcome to Extraction Interface. "."
"; + $viewmodel->messages['info'] .= "Welcome to Extraction Interface. "; if ($this->postdata['fileId'] != 0) { // ($this->postdata['branchId'] != 0) { // get text from fileId, from LGService diff -r a11f9103b8db -r 6e44605eb4f6 models/extractapp.php --- a/models/extractapp.php Tue Mar 31 10:59:52 2015 +0200 +++ b/models/extractapp.php Tue Mar 31 11:32:25 2015 +0200 @@ -178,35 +178,7 @@ } - /* - public function Reload($_postdata) { - - // update text using $this->current_fileId - // getTextbyFileId - $current_fileId = $_postdata['currentFileId']; - //$this->file_id = $_postdata['currentFileId']; - //$this->GetTextFromFileId($_postdata); - //$latest_editing = $this->lg_text; - // get from URL with file_id - - $lg_text_url = $this->get_text_from_fileId_url.$current_fileId; - $lg_text = file_get_contents($lg_text_url); - - $stringInput = $lg_text; - $stringInput = preg_replace("/ /u", "○", $stringInput); - $stringInput = preg_replace("/\n/u", "
", $stringInput); - $stringInput = preg_replace("/【(.*?)】/u", "【\\1】", $stringInput); - $lg_text = $stringInput; - - - //var_dump($lg_text); - - echo json_encode($lg_text); - //var_dump($this->file_id); - - } - */ - + // TODO: comparison not correct private function Taglist_infileUpToDate($taglistArray) { @@ -480,7 +452,7 @@ } else { // -- new branch case - echo "saveNew!"; + // echo "saveNew!"; $user_id = "0"; if ($_postdata['userId']) { $user_id = $_postdata['userId']; diff -r a11f9103b8db -r 6e44605eb4f6 views/Extractapp/TaggingText.php --- a/views/Extractapp/TaggingText.php Tue Mar 31 10:59:52 2015 +0200 +++ b/views/Extractapp/TaggingText.php Tue Mar 31 11:32:25 2015 +0200 @@ -933,9 +933,10 @@

-

+

+ +

-

@@ -987,7 +988,7 @@
Config Topic:
current topic is - +