4 return document.getElementById('dump-' + id);
7 setSub: function(index,sub,show,hide,event){
8 if(event) event.stopPropagation();
9 this.element('sub-' + index).style.display = sub;
10 this.element('show-' + index).style.display = show;
11 this.element('hide-' + index).style.display = hide;
14 showSub: function(index,event){
15 this.setSub(index,'table-row','none','inline-block',event);
18 hideSub: function(index,event){
19 this.setSub(index,'none','inline-block','none',event);
22 showSubs: function(from,to,event){
23 if(event) event.stopPropagation();
24 for(var i = from; i <= to; i++) this.showSub(i);
27 showTab: function(index,select,keys){
30 keys.forEach(function(key){
31 var tab = self.element('tab-' + index + '-' + key),nav = self.element('nav-' + index + '-' + key),active = key == select;
32 if(tab) tab.style.display = active ? 'block' : 'none';
34 nav.className = nav.className.replace(/(^| )dump-active/,'');
35 if(active) nav.className += ' dump-active';
40 copy: function(input){
42 document.execCommand('copy');
43 input.selectionStart = input.selectionEnd;
46 sort: function(index,keys){
47 var self = this,body = this.element('sort-' + index);
48 keys.forEach(function(key){ body.appendChild(self.element('sort-' + index + '-' + key)) });