graying corpus statistic(plus tests+vc test fixed) and fix vc serialization
Change-Id: I3f934c2cc0ebbb0a91b5fa8f529bf3f5c3ebd391
(cherry picked from commit 172d6a4bbc7d29a0fe7c23b114fbbf485e2f4aeb)
diff --git a/dev/js/src/vc/doc.js b/dev/js/src/vc/doc.js
index 996c347..2a0e872 100644
--- a/dev/js/src/vc/doc.js
+++ b/dev/js/src/vc/doc.js
@@ -149,6 +149,10 @@
e.appendChild(op.element());
};
+ if(KorAP.vc){
+ KorAP.vc.checkGrayingStat();
+ }
+
return e;
},
@@ -616,9 +620,12 @@
};
},
+ incomplete : function () {
+ return !(this.matchop() && this.key() && this.value());
+ },
toQuery : function () {
- if (!this.matchop() || !this.key())
+ if (this.incomplete())
return "";
// Build doc string based on key