Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/static/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@
}
#sidebar > .btn{
width: 100%;
}
a {
cursor: pointer;
}
7 changes: 4 additions & 3 deletions app/static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ String.prototype.niceify = function() {
// App Logic
$.getJSON('plugins', function(data) {
console.log(data);
document.getElementById("navbar").innerHTML = '<a href="/" class="p-2 border-2 border-danger sat-plugins border-bottom">Home</button>';
data.forEach((element) => {
document.getElementById("navbar").innerHTML +='<a href="#'+element+'" id="nav_item_'+element+'" class="p-2 border-2 border-danger sat-plugins" onclick="load_content(\''+element+'\')">'+element.niceify()+'</a>'
});
Expand Down Expand Up @@ -44,10 +45,10 @@ function start_feature_read(plugin, feature, id) {
document.getElementById("results").innerHTML = tablecode
}
else {
tablecode = '<table class="table"><thead><tr>'
tablecode = '<table class="table"><thead><tr><th></th><th></th>'
Object.keys(data['table'][0]).forEach((element) => tablecode+='<th scope="col">'+element+'</th>');
tablecode += '<th></th><th></th></tr></thead><tbody>'
data['table'].forEach((element) => tablecode+='<tr><td>'+Object.values(element).join('</td><td>')+'</td><td><a onclick="start_feature_read(\''+plugin+'\', \''+feature+'\', \''+element['id']+'\')">Edit</a></td><td><a onclick="start_feature_delete(\''+plugin+'\', \''+feature+'\', \''+element['id']+'\')">Delete</a></td></tr>');
tablecode += '</tr></thead><tbody>'
data['table'].forEach((element) => tablecode+='<tr><td><a onclick="start_feature_read(\''+plugin+'\', \''+feature+'\', \''+element['id']+'\')">Edit</a></td><td><a onclick="start_feature_delete(\''+plugin+'\', \''+feature+'\', \''+element['id']+'\')">Delete</a></td><td>'+Object.values(element).join('</td><td>')+'</td></tr>');
// tablecode+='<tr><td>NEW</td>';
// Object.keys(data['table'][0]).forEach((element) => tablecode+='<td></td>');
// tablecode += '<td></td></tr>'
Expand Down
2 changes: 1 addition & 1 deletion app/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
, filename:'SAT-export.pdf'}).from(document.getElementById('results')).save()">Export</button>-->
</div>

<div id="output" class="d-flex flex-column w-75 mh-100 py-2" style="overflow-y: scroll;;position:fixed;">
<div id="output" class="d-flex flex-column mh-100 py-2">
<!-- <div class="col-10 ps-5 mh-100 overflow-auto py-2"> -->
<pre class="section-to-print" id="results">
<h2>Welcome to SimpleSignageProxy</h2>
Expand Down