Progress Bar Field
I often need my entries to show the progress.
I started by making the progress being shown as a number, through the javascript field.
But I wanted something more graphical, then I tried something diffetent on javascript, and this is what I came up with:
var pg = (field("Current Page")/field("Total of Pages")*100)
if(field("My Readings")=='Read'){
pg = 100
}
else{
pg.toFixed(2)
}
if(pg<=0){
"□□□□□□□□□□"}
else if(pg<=10){
"■□□□□□□□□□"}
else if(pg<=20){
"■■□□□□□□□□"}
else if(pg<=30){
"■■■□□□□□□□"}
else if(pg<=40){
"■■■■□□□□□□"}
else if(pg<=50){
"■■■■■□□□□□"}
else if(pg<=60){
"■■■■■■□□□□"}
else if(pg<=70){
"■■■■■■■□□□"}
else if(pg<=80){
"■■■■■■■■□□"}
else if(pg<=90){
"■■■■■■■■■□"}
else{
"■■■■■■■■■■"}
This shows the progress through a bar, depending on which page I am in relation to the total of pages of the book I'm reading.
It would be better If memento database had a progress bar field that worked from 0 to 100, like in the percentage case of how much of the book I've read... I mean, it would be way better and more practical if we had this implementei in the app.
