Progress bars
Progress bars
Hello
I am looking for the way to create a progress bar inside a column. Is that possible.
Thank you
I am looking for the way to create a progress bar inside a column. Is that possible.
Thank you
Re: Progress bars
Hi,
yes you can
add something like
to your table column where you calculate the width according to your definition.
yes you can
add something like
Code: Select all
.addClass('progress-bar progress-bar-warning').attr({'role':"progressbar"}).css({"width": width})
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Progress bars
Hello
Thank you for your reply, I am going to try it.
Regards,
Thank you for your reply, I am going to try it.
Regards,
Re: Progress bars
that is very cool. where exactly does the code have to be inserted?
- landinialejandro
- AppGini Super Hero
- Posts: 126
- Joined: 2016-03-06 00:59
- Location: Argentina
- Contact:
Re: Progress bars
use this code inside your tablename-tv.js
Code: Select all
$j(function () {
const max = 300;
$j("td.tablename-fieldname").each(function () {
var obj = $j(this);
obj.css({position:"relative"});
obj.children('a').css({position:"absolute","z-index":"1"});
var value = obj.text();
var rel = value / max;
var w = obj.width();
var h = obj.height();
var $container = $j("<div/>", {
"style": "border:1px solid #d3d3d3; position:absolute; top:3px; left:3px; z-index:0;"
}).width(w).height(h);
var $bar = $j("<div/>",{class:"bg-info"}).width(rel*100+"%").height("100%");
obj.append($container.append($bar))
});
});
Alejandro.
AppGini 5.98 - Linux OpenSuse Tumblewweed.
Some of my posts that may interest you:
Landini Admin Template: Template for Appgini like AdminLTE
Profile image plugin: add and changue image user profile
Field editor in table view: Configurable fast edit fields in TV
my personal page
AppGini 5.98 - Linux OpenSuse Tumblewweed.
Some of my posts that may interest you:




Re: Progress bars
Thank you so much. It works fantastic 
Kai

Kai
Re: Progress bars
Can you maybe tell me how I can adjust the height of the bar?
Thanks again, Kai
Thanks again, Kai
- landinialejandro
- AppGini Super Hero
- Posts: 126
- Joined: 2016-03-06 00:59
- Location: Argentina
- Contact:
Re: Progress bars
hi! this example get de height of container in
var h = obj.height();
there you can put your own value.
Alejandro.
AppGini 5.98 - Linux OpenSuse Tumblewweed.
Some of my posts that may interest you:
Landini Admin Template: Template for Appgini like AdminLTE
Profile image plugin: add and changue image user profile
Field editor in table view: Configurable fast edit fields in TV
my personal page
AppGini 5.98 - Linux OpenSuse Tumblewweed.
Some of my posts that may interest you:




Re: Progress bars
Hi, Thanks much!!
I tried this before.
But then the bar disappears completely. I guess I got that wrong. I have tried:
But unfortunately it doesn't work for me.
I tried this before.
But then the bar disappears completely. I guess I got that wrong. I have tried:
Code: Select all
var h = obj.height (10px); and
var h = obj.height (100%);
- landinialejandro
- AppGini Super Hero
- Posts: 126
- Joined: 2016-03-06 00:59
- Location: Argentina
- Contact:
Re: Progress bars
the obj.height() function only return the container object define in var obj = $j(this);SkayyHH wrote: ↑2020-11-08 14:43Hi, Thanks much!!
I tried this before.
But then the bar disappears completely. I guess I got that wrong. I have tried:
But unfortunately it doesn't work for me.Code: Select all
var h = obj.height (10px); and var h = obj.height (100%);
only put a value
var h = "20px";
or
var h = "100%";
in this case yo need to re-define :
top:3px; left:3px ---> top:0px; left:0px
the bar is floating inside the td container, if you exceed the height the view is bad. so, 100% and obj.height() must be the max value to be get. without change the td container.
Alejandro.
AppGini 5.98 - Linux OpenSuse Tumblewweed.
Some of my posts that may interest you:
Landini Admin Template: Template for Appgini like AdminLTE
Profile image plugin: add and changue image user profile
Field editor in table view: Configurable fast edit fields in TV
my personal page
AppGini 5.98 - Linux OpenSuse Tumblewweed.
Some of my posts that may interest you:




Re: Progress bars
Hello
Thank you very much, works as a charm for me
Regards,
Thank you very much, works as a charm for me
Regards,
Re: Progress bars
This is exactly what i was looking for. Thank you very much!
Kai
Kai