Error fixes

This commit is contained in:
Alejandro Gallardo Escobar 2015-01-19 17:35:46 +01:00
parent 5f1c426fe9
commit 796d594edd
1 changed files with 6 additions and 0 deletions

View File

@ -66,6 +66,8 @@ TreeController = {
// Load leaf counters // Load leaf counters
function _processNodeCounters (container, counters, type) { function _processNodeCounters (container, counters, type) {
var hasCounters = false;
if (typeof counters != 'undefined') { if (typeof counters != 'undefined') {
function _processNodeCounterTitle (container, elementType, counterType) { function _processNodeCounterTitle (container, elementType, counterType) {
@ -264,11 +266,15 @@ TreeController = {
// Close the parentheses // Close the parentheses
$counters.append(")"); $counters.append(")");
hasCounters = true;
} }
// Add the counters html to the container // Add the counters html to the container
container.append($counters); container.append($counters);
} }
return hasCounters;
// Load the counters asynchronously // Load the counters asynchronously
// else if (typeof element.searchCounters != 'undefined' && element.searchCounters) { // else if (typeof element.searchCounters != 'undefined' && element.searchCounters) {
// var $counters = $("<div></div>"); // var $counters = $("<div></div>");