Fix missing totals in sunstone tabs

This commit is contained in:
Carlos Martín committed 2015-09-01 18:55:49 +02:00
1 parent 87bdaa5a67
commit edbf465c83
2 files changed
+16

No files matched your search

@@ -77,6 +77,8 @@ define(function(require) {
*/
function _elementArray(element_json) {
this.totalGroups++;
var element = element_json[XML_ROOT];
var users_str = "0";
@@ -57,12 +57,16 @@ define(function(require) {
"you_selected_multiple": Locale.tr("You selected the following VDCs:")
};
this.totalElements = 0;
TabDataTable.call(this);
}
Table.prototype = Object.create(TabDataTable.prototype);
Table.prototype.constructor = Table;
Table.prototype.elementArray = _elementArray;
Table.prototype.preUpdateView = _preUpdateView;
Table.prototype.postUpdateView = _postUpdateView;
return Table;
@@ -71,6 +75,8 @@ define(function(require) {
*/
function _elementArray(element_json) {
this.totalElements++;
var element = element_json[XML_ROOT];
return [
@@ -96,4 +102,12 @@ define(function(require) {
return l;
}
function _preUpdateView() {
this.totalElements = 0;
}
function _postUpdateView() {
$(".total_vdcs").text(this.totalElements);
}
});