1 var FooterManager =
function(table){
4 this.element = this.createElement();
11 FooterManager.prototype.createElement =
function (){
12 var el = document.createElement(
"div");
14 el.classList.add(
"tabulator-footer");
19 FooterManager.prototype._initialize =
function(element){
20 if(this.table.options.footerElement){
22 switch(typeof this.table.options.footerElement){
25 if(this.table.options.footerElement[0] ===
"<"){
26 this.element.innerHTML = this.table.options.footerElement;
29 this.element = document.querySelector(this.table.options.footerElement);
33 this.element = this.table.options.footerElement;
40 FooterManager.prototype.getElement =
function(){
45 FooterManager.prototype.append =
function(element, parent){
46 this.activate(parent);
48 this.element.appendChild(element);
49 this.table.rowManager.adjustTableSize();
52 FooterManager.prototype.prepend =
function(element, parent){
53 this.activate(parent);
55 this.element.insertBefore(element, this.element.firstChild);
56 this.table.rowManager.adjustTableSize();
59 FooterManager.prototype.remove =
function(element){
60 element.parentNode.removeChild(element);
64 FooterManager.prototype.deactivate =
function(force){
65 if(!this.element.firstChild || force){
67 this.element.parentNode.removeChild(this.element);
75 FooterManager.prototype.activate =
function(parent){
79 this.table.element.appendChild(this.getElement());
80 this.table.element.style.display =
'';
85 this.links.push(parent);
89 FooterManager.prototype.redraw =
function(){
90 this.links.forEach(
function(link){