summaryrefslogtreecommitdiff
path: root/day9/task5/static/js/overlayButtonsCallbacks.js
blob: 866a302e0a535a221d6df04d3ef09019f66342b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
const uploadFileHtml = '<img src="/static/images/upload_icon.png" alt="" style="width: 70%;height: 70%;">';

function addNewRowOnHover() {
    let btn = document.getElementById('newEntryBtn');
    btn.innerText = 'Add new row';
}

function addNewRowOnEndHover() {
    let btn = document.getElementById('newEntryBtn');
    btn.innerText = '+';
}

function uploadFileOnHover() {
    let btn = document.getElementById('uploadFileBtn');
    btn.innerHTML = 'Upload File';
}

function uploadFileOnEndHover() {
    let btn = document.getElementById('uploadFileBtn');
    btn.innerHTML = uploadFileHtml;
}

function triggerUploadFile() {
    let fileInput = document.getElementById('csvFileInput');
    fileInput.click()
}