image_annotation/commit
Sets context of annotation to 'unknown' if no info present in localstorage.
author | Chris Dijkshoorn |
---|---|
Tue Jun 16 16:45:03 2015 +0200 | |
committer | Chris Dijkshoorn |
Tue Jun 16 16:45:03 2015 +0200 | |
commit | faf67ed4e6c7c09853356f46e03252356a21d811 |
tree | bab75fd4131a213801725c65b0516c0dab51d299 |
parent | cb353a8f5f47343b703f13c81eb0421194713aec |
Diff style: patch stat
diff --git a/web/js/annotation.js b/web/js/annotation.js index 708fbf9..0fd3381 100644 --- a/web/js/annotation.js +++ b/web/js/annotation.js @@ -761,14 +761,16 @@ YUI.add('annotation', function(Y) { var context = ""; var index = parseInt(localStorage.getItem("itemIndex")); var clusterId = parseInt(localStorage.getItem("clusterId")); - if(query === "expertise values") { + + if(typeof domainSettings == 'undefined') { + context = "unknown"; + } else if(query === "expertise values") { context = "recommendation, " + index + ", " + clusterId; } else if (query !== "") { context = "search, " + query + ", " + index + ", " + clusterId; } else { context = "unknown"; } - console.log("Context", context); Y.io(this.get("store.add"), { method: "POST",