Mercurial > hg > extraction-interface
comparison views/Extractapp/TaggingText.php @ 103:2cc65ff46174 extractapp
minor fixed
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Mon, 25 Jul 2016 17:10:16 +0200 |
parents | 6ba742b712b0 |
children | e542b161d907 |
comparison
equal
deleted
inserted
replaced
102:6ba742b712b0 | 103:2cc65ff46174 |
---|---|
216 } | 216 } |
217 ?> | 217 ?> |
218 */ | 218 */ |
219 | 219 |
220 $(document).ready(function(){ | 220 $(document).ready(function(){ |
221 | |
222 $("#loading").hide(); | |
223 | |
221 // --- for sidebar--- | 224 // --- for sidebar--- |
222 //run once | 225 //run once |
223 var el=$('#follow-scroll'); | 226 var el=$('#follow-scroll'); |
224 var originalelpos=el.offset().top; // take it where it originally is on the page | 227 var originalelpos=el.offset().top; // take it where it originally is on the page |
225 | 228 |
269 | 272 |
270 // --- handle file version conflict --- | 273 // --- handle file version conflict --- |
271 var info = JSON.parse('<?php echo json_encode($info) ?>'); | 274 var info = JSON.parse('<?php echo json_encode($info) ?>'); |
272 // the first time to this section. without branch_id and file_id | 275 // the first time to this section. without branch_id and file_id |
273 if (info['file_id'] == 0) { // or info['branch_id'] == 0, means new file | 276 if (info['file_id'] == 0) { // or info['branch_id'] == 0, means new file |
274 $( "#save_text_to_LGService_id").text( "Create(Save) Branch to LGService" ); | 277 $( "#save_text_to_LGService_id").text( "Create(Save) Task to LGService" ); |
275 | 278 |
276 } | 279 } |
277 handleFileVersionConflict(); | 280 handleFileVersionConflict(); |
278 | 281 |
279 // --- handle taglist deprecation --- | 282 // --- handle taglist deprecation --- |
900 | 903 |
901 } | 904 } |
902 | 905 |
903 function tagwithOnlytag( range, selection, tag ) { | 906 function tagwithOnlytag( range, selection, tag ) { |
904 | 907 |
908 $('#loading').show(); | |
909 | |
905 saveUndoText(); | 910 saveUndoText(); |
906 var topic_tag = JSON.parse('<?php echo json_encode($topic_tag) ?>'); | 911 var topic_tag = JSON.parse('<?php echo json_encode($topic_tag) ?>'); |
907 var topic_tag2 = topic_tag+"2"; | 912 var topic_tag2 = topic_tag+"2"; |
908 | 913 |
909 var documentFragment = range.extractContents(); | 914 var documentFragment = range.extractContents(); |
934 range.insertNode(newdiv); | 939 range.insertNode(newdiv); |
935 } | 940 } |
936 | 941 |
937 | 942 |
938 $('.tagItemDivClass').remove(); | 943 $('.tagItemDivClass').remove(); |
944 | |
945 $('#loading').hide(); | |
939 } | 946 } |
940 | 947 |
941 function tagwithOnlytag_old( range, stringSelection, tag ) { | 948 function tagwithOnlytag_old( range, stringSelection, tag ) { |
942 saveUndoText(); | 949 saveUndoText(); |
943 var topic_tag = JSON.parse('<?php echo json_encode($topic_tag) ?>'); | 950 var topic_tag = JSON.parse('<?php echo json_encode($topic_tag) ?>'); |
958 range.insertNode(newdiv); | 965 range.insertNode(newdiv); |
959 } | 966 } |
960 | 967 |
961 | 968 |
962 $('.tagItemDivClass').remove(); | 969 $('.tagItemDivClass').remove(); |
970 | |
963 } | 971 } |
964 | 972 |
965 function replaceSmartRegex() { | 973 function replaceSmartRegex() { |
966 saveUndoText(); | 974 saveUndoText(); |
967 var startPage = $('#regexPageStart2').val(); | 975 var startPage = $('#regexPageStart2').val(); |
1037 + section_name + "(" + cjst.chineseToPinyin(section_name).join(' ') + ")_" | 1045 + section_name + "(" + cjst.chineseToPinyin(section_name).join(' ') + ")_" |
1038 + today; | 1046 + today; |
1039 } | 1047 } |
1040 | 1048 |
1041 | 1049 |
1042 var label = prompt("Please enter your label for this new branch", default_label); | 1050 var label = prompt("Please enter your label for this new task", default_label); |
1043 while (label == null) { | 1051 while (label == null) { |
1044 alert("You haven't saved your editing."); | 1052 alert("You haven't saved your editing."); |
1045 return; | 1053 return; |
1046 } | 1054 } |
1047 }; | 1055 }; |
1370 <div class="bg-default"> <?php echo $messages['debug']; ?> </div> | 1378 <div class="bg-default"> <?php echo $messages['debug']; ?> </div> |
1371 </div> | 1379 </div> |
1372 </fieldset> | 1380 </fieldset> |
1373 | 1381 |
1374 --> | 1382 --> |
1383 <div id="loading">...</div> | |
1375 | 1384 |
1376 <div class="info-board"> | 1385 <div class="info-board"> |
1377 <div class="bg-danger"><strong><?php echo $messages['error']; ?> </strong></div> | 1386 <div class="bg-danger"><strong><?php echo $messages['error']; ?> </strong></div> |
1378 <div class="bg-warning"> <?php echo $messages['warning']; ?> | 1387 <div class="bg-warning"> <?php echo $messages['warning']; ?> |
1379 <button id="reloadTextButton" onclick="reloadText(<?php echo $default_topic_id; ?>)" style="display:none;">Latest Version</button> | 1388 <button id="reloadTextButton" onclick="reloadText(<?php echo $default_topic_id; ?>)" style="display:none;">Latest Version</button> |
1381 <div class="bg-info"> <?php echo $messages['info']; ?> </div> | 1390 <div class="bg-info"> <?php echo $messages['info']; ?> </div> |
1382 <!-- | 1391 <!-- |
1383 <div class="bg-default"> <?php echo $messages['debug']; ?> </div> | 1392 <div class="bg-default"> <?php echo $messages['debug']; ?> </div> |
1384 --> | 1393 --> |
1385 </div> | 1394 </div> |
1386 | |
1387 | 1395 |
1388 <table border="1" style="margin:10 30 30 30; width:100%; max-width:1270px; min-width:680px"> | 1396 <table border="1" style="margin:10 30 30 30; width:100%; max-width:1270px; min-width:680px"> |
1389 <tr> | 1397 <tr> |
1390 <td style="padding:0 5 0 5; margin: 0 5 0 5;"> | 1398 <td style="padding:0 5 0 5; margin: 0 5 0 5;"> |
1391 <div id="editable-area" class="area" style="max-width:980px; min-width:400px"><?php echo $stringInput; ?></div> | 1399 <div id="editable-area" class="area" style="max-width:980px; min-width:400px"><?php echo $stringInput; ?></div> |