Mercurial > hg > extraction-interface
comparison interface/tagging_text.php @ 6:63e08b98032f
rewrite extraction interface into PHP MVC architecture.
(Although js hasn't been rewritten into MVC, it's fitted into the current PHP MVC architecture.)
- The root of the new PHP MVC is at 'develop/'.
- extraction interface is called "Extractapp" with several action, eg TaggingText, EditWordlist, EditTaglist, ExportTable.
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Thu, 05 Feb 2015 16:07:53 +0100 |
parents | b12c99b7c3f0 |
children |
comparison
equal
deleted
inserted
replaced
5:cbbb7ef22394 | 6:63e08b98032f |
---|---|
276 echo "\t".'if ( $("#editTextId").html() != "Edit the text" ) return 0;'."\n"; | 276 echo "\t".'if ( $("#editTextId").html() != "Edit the text" ) return 0;'."\n"; |
277 echo "\tremoveTagNewDiv( e, \"".$taglistValue[2]."\", $(this) );\n"; | 277 echo "\tremoveTagNewDiv( e, \"".$taglistValue[2]."\", $(this) );\n"; |
278 echo "});\n"; | 278 echo "});\n"; |
279 } | 279 } |
280 ?> | 280 ?> |
281 | |
282 | |
283 | |
284 | |
281 $(document).on("click", "name", function (e) { | 285 $(document).on("click", "name", function (e) { |
282 if ( $("#editTextId").html() != "Edit the text" ) return 0; | 286 if ( $("#editTextId").html() != "Edit the text" ) return 0; |
283 if ( $(this).prop("tagName").toLowerCase() != "name" ) return 0; | 287 if ( $(this).prop("tagName").toLowerCase() != "name" ) return 0; |
284 removeTagNewDiv( e, "name", $(this) ); | 288 removeTagNewDiv( e, "name", $(this) ); |
289 | |
285 }); | 290 }); |
286 | 291 |
287 $(document).on("mouseup", '#editable-area', function (e) { | 292 $(document).on("mouseup", '#editable-area', function (e) { |
288 $('.questionMarkClass').remove(); | 293 $('.questionMarkClass').remove(); |
289 $('.tagItemDivClass').remove(); | 294 $('.tagItemDivClass').remove(); |
290 | 295 |
291 if ( $("#editTextId").html() != "Edit the text" ) return 0; | 296 if ( $("#editTextId").html() != "Edit the text" ) return 0; |
292 var selection = getSelected(); | 297 var selection = getSelected(); |
293 range = getSelected().getRangeAt(0); | 298 range = getSelected().getRangeAt(0); |
294 | 299 |
295 container = document.createElement("div"); | 300 container = document.createElement("div"); |
1047 $('#smartRegexShowDiv').html( $('#'+divName).html() ); | 1052 $('#smartRegexShowDiv').html( $('#'+divName).html() ); |
1048 $('#load_regex_div').css("display", "none"); | 1053 $('#load_regex_div').css("display", "none"); |
1049 } | 1054 } |
1050 | 1055 |
1051 $(document).on("change", '#smartRegexPopUpSelectWord', function (e) { | 1056 $(document).on("change", '#smartRegexPopUpSelectWord', function (e) { |
1057 | |
1052 <?php | 1058 <?php |
1053 foreach ( $wordlistArray as $wordlistValue ) { | 1059 foreach ( $wordlistArray as $wordlistValue ) { |
1054 echo "if ( $('#smartRegexPopUpSelectWord').val() == \"".$wordlistValue[0]."\") {"; | 1060 echo "if ( $('#smartRegexPopUpSelectWord').val() == \"".$wordlistValue[0]."\") {"; |
1055 echo "$('#smartRegexPopUpText').val(\"".$wordlistValue[2]."\");"; | 1061 echo "$('#smartRegexPopUpText').val(\"".$wordlistValue[2]."\");"; |
1056 echo "}"; | 1062 echo "}"; |