Fix JSON Format display multiple record issue
Assign name back to anonymous function for recursive call.
Change-Id: I85eda5b1873024d84df1a2ca803fe1d5a665996c
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1640
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
BAD: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Yingyi Bu <buyingyi@gmail.com>
diff --git a/asterixdb/asterix-app/src/main/resources/webui/static/js/jquery.json-viewer.js b/asterixdb/asterix-app/src/main/resources/webui/static/js/jquery.json-viewer.js
index 35ef5a1..5e8a79e 100644
--- a/asterixdb/asterix-app/src/main/resources/webui/static/js/jquery.json-viewer.js
+++ b/asterixdb/asterix-app/src/main/resources/webui/static/js/jquery.json-viewer.js
@@ -154,11 +154,11 @@
if (options.collapsed == true) {
$(this).find('a.json-toggle').click();
var lvl = options.level;
- $(this).each(function() {
+ $(this).each(function collapse_func() {
lvl = lvl-1;
if (lvl >= 0) {
- $(this).children('a.json-toggle').click();
- $(this).children('ul.json-dict').children().each(cfun);
+ $(this).children('a.json-toggle').click();
+ $(this).children('ul.json-dict').children().each(collapse_func);
}
lvl = lvl+1;
});