comparison controllers/extractapp.php @ 57:5cf9720a2e25 extractapp

New: add reloadText to load the latest version
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Mon, 30 Mar 2015 17:23:47 +0200
parents f9594c240826
children a11f9103b8db
comparison
equal deleted inserted replaced
56:95f929d7b318 57:5cf9720a2e25
25 case 'SaveFullTextToLGService': 25 case 'SaveFullTextToLGService':
26 $viewmodel->messages .= "SaveFullTextToLGService! "."<br>"; 26 $viewmodel->messages .= "SaveFullTextToLGService! "."<br>";
27 $viewmodel->GetInfoFromPreviousPage($this->postdata); 27 $viewmodel->GetInfoFromPreviousPage($this->postdata);
28 $response = $viewmodel->SaveFullTextToLGService($this->postdata); 28 $response = $viewmodel->SaveFullTextToLGService($this->postdata);
29 $viewmodel->UpdateInfoByResponseFromLGService($response); // update file_id, branch_id, user_id 29 $viewmodel->UpdateInfoByResponseFromLGService($response); // update file_id, branch_id, user_id
30 // TODO: GetTextFromFileId?? reload saved file from LGService, necessary!
31 $viewmodel->GetTextFromFileId(); 30 $viewmodel->GetTextFromFileId();
32 $this->ReturnView($viewmodel->StartTagging(), true); 31 $this->ReturnView($viewmodel->StartTagging(), true);
33 break; 32 break;
34 33
35 case 'SmartRegexLoad': 34 case 'SmartRegexLoad':
36 $viewmodel->SmartRegexLoad($this->postdata['topic_id']); 35 $viewmodel->SmartRegexLoad($this->postdata['topic_id']);
37 break; 36 break;
38 case 'SmartRegexSave': 37 case 'SmartRegexSave':
39 $viewmodel->SmartRegexSave($this->postdata); 38 $viewmodel->SmartRegexSave($this->postdata);
40 break; 39 break;
41 case 'Reload': 40 case 'ReloadText':
42 // $viewmodel->Reload(); 41 $viewmodel->messages .= "Reload the latest text "."<br>";
42 $viewmodel->GetInfoFromPreviousPage($this->postdata);
43 $viewmodel->ReloadSetting(); // set file_id = current_fileId, current_fileId = 0
44 $viewmodel->GetTextFromFileId();
45 $this->ReturnView($viewmodel->StartTagging(), true);
43 break; 46 break;
44 47
45 case 'ContinueTagging': 48 case 'ContinueTagging':
46 $viewmodel->messages .= "(Countinue tagging) "."<br>"; 49 $viewmodel->messages .= "(Countinue tagging) "."<br>";
47 if ($this->postdata['topic']) { 50 if ($this->postdata['topic']) {