Skip to content

Commit e977164

Browse files
committed
Revert "[KNOWAGE-8605] add event listener to export button"
This reverts commit d233399.
1 parent d233399 commit e977164

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

knowage/src/main/webapp/WEB-INF/jsp/commons/preview.jsp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
8585
document.getElementById('utility-bar').classList.remove("hidden");
8686
document.getElementById('myGrid').classList.add("has-utility-bar");
8787
for(var e in options['exports']){
88-
document.getElementById('utility-bar').innerHTML += '<button class="kn-button" id="export-'+options['exports'][e].toUpperCase()+'">Export '+options['exports'][e].toUpperCase()+'</button>'
88+
document.getElementById('utility-bar').innerHTML += '<button class="kn-button" id="export-'+options['exports'][e].toUpperCase()+'" onclick="exportDataset(\''+options['exports'][e].toUpperCase()+'\')">Export '+options['exports'][e].toUpperCase()+'</button>'
8989
}
9090
exporterBarShown = true;
9191
}
@@ -394,8 +394,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
394394
DATASET = data.item[0];
395395
})
396396
}
397-
398-
397+
399398
function exportDataset(format){
400399
var body = {};
401400
Toastify({
@@ -440,10 +439,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
440439
})
441440
}
442441
443-
document.getElementsByClassName('kn-button').addEventListener('click', function(e){
444-
exportDataset(e.target.id.replace('export-',''));
445-
});
446-
447442
var eGridDiv = document.querySelector('#myGrid');
448443
new agGrid.Grid(eGridDiv, gridOptions);
449444

0 commit comments

Comments
 (0)