Skip to content

Commit

Permalink
Merge pull request #30 from rafaelpezzuto/fix-static-files
Browse files Browse the repository at this point in the history
Corrige arquivos estáticos
  • Loading branch information
rafaelpezzuto authored Nov 9, 2021
2 parents 13d59ce + 207fcd9 commit b3da8a5
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 92 deletions.
29 changes: 16 additions & 13 deletions app/core/static/js/main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function createMessage(msg){
function createMessage(msg, alert_class){
divAlert = document.createElement('div');
divAlert.classList.add('alert', 'alert-danger', 'alert-dismissible', 'fade', 'show', 'is-no-rounded', 'm-0', 'p-2');
divAlert.classList.add('alert', alert_class, 'alert-dismissible', 'fade', 'show', 'is-no-rounded', 'm-0', 'p-2');
divAlert.setAttribute('role', 'alert');

divContainer = document.createElement('div');
Expand Down Expand Up @@ -34,31 +34,34 @@ function ingressPackageDownloadToggleSpinner(){
function ingressPackageDownloadCreateTable(data){
tableBody = document.getElementById('resultSearchPackagesTableBody')

counter = 1
for (k in data['doc_pkgs']){
els = data['doc_pkgs'][k];
row = tableBody.insertRow(-1);

aResult = document.createElement('a')
aResult.text = els['name'];
aResult.href = els['uri'];
aResult.classList.add('link');

tdUri = row.insertCell(-1);
tdUri.appendChild(aResult);
tdUri.innerHTML = counter;

aPkgName = document.createElement('a')
aPkgName.text = els['name'];
aPkgName.href = els['uri'];
aPkgName.classList.add('link');

tdPkgName = row.insertCell(-1);
tdPkgName.appendChild(aPkgName);

tdCreated = row.insertCell(-1);
tdCreated.innerHTML = els['created'];
tdCreated = row.insertCell(-1)
tdCreated.innerHTML = new Date(els['created']);

tdUpdated = row.insertCell(-1);
tdUpdated.innerHTML = els['updated'];
counter += 1;
}

if (data['doc_pkgs'].length > 0) {
document.getElementById('resultSearchPackages').style.display = 'block';
} else {
var divBaseMessages = document.getElementById('baseMessages');
for (k in data['errors']){
element_message = createMessage(data['errors'][k]);
element_message = createMessage(data['errors'][k], 'alert-danger');
divBaseMessages.append(element_message);
}
}
Expand Down
10 changes: 0 additions & 10 deletions app/static/css/style.css

This file was deleted.

1 change: 0 additions & 1 deletion app/static/img/logo-scielo.svg

This file was deleted.

68 changes: 0 additions & 68 deletions app/static/js/main.js

This file was deleted.

0 comments on commit b3da8a5

Please sign in to comment.