diff --git a/app/routes.js b/app/routes.js index 83cd4b8..6c577e7 100644 --- a/app/routes.js +++ b/app/routes.js @@ -307,7 +307,8 @@ module.exports = function(app) { },{ $set:{ "status":"skip", - "taggingtime":Date.now() + "taggingtime":Date.now(), + "userid":userid } },function(err,rst) { diff --git a/public/partials/fastcoding.html b/public/partials/fastcoding.html index b2ab59c..bf44263 100644 --- a/public/partials/fastcoding.html +++ b/public/partials/fastcoding.html @@ -22,7 +22,7 @@

Fast Arabic Actor Coding (PERSON ENTITY)

-->
-
+
@@ -94,7 +94,7 @@

Fast Arabic Actor Coding (PERSON ENTITY)

success:function(data) { var result = JSON.parse(data); - $("#arabicentity").html(result.word); + $("#arabicentity").val(result.word); $("#arabicentity").attr("data-entityid",result.entityid); var sentences=result.sentences; var countleft=result.countleft; @@ -117,18 +117,19 @@

Fast Arabic Actor Coding (PERSON ENTITY)

}); $("#fast-commit").on("click",function(){ + var userid=localStorage.getItem("currentid"); $.ajax({ method:"POST", url:"/commitperentity", //actually I am not sure why the country needs input needs to be handle specially otehrwise it will not have the value, if you continously have //two same country as input. - data:{'entityid':$('#arabicentity').attr("data-entityid"),'timespend':(new Date()-start)/1000,"country":$($(".special").find("input")[0]).text(),"firstrole":$("#firstrole").val(),"secondrole":$("#secondrole").val(),"userid":localStorage["currentid"],"username":localStorage["currentuser"],"startdate":$("#datepicker1").val(),"enddate":$("#datepicker2").val(),"word":$("#arabicentity").text()}, + data:{'entityid':$('#arabicentity').attr("data-entityid"),'timespend':(new Date()-start)/1000,"country":$($(".special").find("input")[0]).text(),"firstrole":$("#firstrole").val(),"secondrole":$("#secondrole").val(),"userid":userid,"username":localStorage["currentuser"],"startdate":$("#datepicker1").val(),"enddate":$("#datepicker2").val(),"word":$("#arabicentity").val()}, success:function(data) { console.log("time"+new Date()-start); var result = JSON.parse(data); var countleft=result.countleft; - $("#arabicentity").html(result.word); + $("#arabicentity").val(result.word); $("#arabicentity").attr("data-entityid",result.entityid); var sentences=result.sentences; // console.log(sentences); @@ -166,7 +167,7 @@

Fast Arabic Actor Coding (PERSON ENTITY)

//paser the data into dictionary , this needs to be called var result = JSON.parse(data); var countleft=result.countleft; - $("#arabicentity").html(result.word); + $("#arabicentity").val(result.word); $("#arabicentity").attr("data-entityid",result.entityid); var sentences=result.sentences; // console.log(sentences);