I'm looking for a solution to create a web based application. I've been reviewing various solutions including Appgini.
I'm wondering if I can have 'due dates' in Appgini.
Example: cells where the due date is expired would be red, cells where the due date is 7 days out yellow, cells where due dates are 8+ days out green. Once the item is take care of, then due date updates to either 7 days out, 14 days out, 30 days out, end of the following month, etc.
If Appgini is capable of doing this, please briefly explain. Thanks.
Appgini Pre-sales questions, can Appgini?
Appgini Pre-sales questions, can Appgini?
Appgini 5.50, Revision 835. Mac OSX 10.11 running Windows 10 on VMWare.
Re: Appgini Pre-sales questions, can Appgini?
Although this is not directly supported by AppGini, it can be added by customizing the generated code. Let's assume your table name is 'tasks', the field name is 'due_date', and the date format for that field is 'month/day/year'. You should add code similar to the following in the generated 'hooks/footer-extras.php' file:
Here is sample output that shows how highlighting would look like (assuming the default bootstrap theme):
Code: Select all
$j('td.tasks-due_date a').each(function(){
var ds = $j(this).html();
/* assuming date format of due_date is month/day/year */
var dc = new Date(ds.replace(/(\d{1,2})\/(\d{1,2})\/(\d{4})/, '$3-$1-$2'));
var today = new Date();
var days_ahead = parseInt((dc - today) / 86400 / 1000);
if(days_ahead >= 8){
// 8+ days left, use green highlighting
$j(this).addClass('text-success').parent().addClass('success');
}else if(days_ahead >= 7){
// 7 days left, use yellow highlighting
$j(this).addClass('text-warning').parent().addClass('warning');
}else{
// less than 7 days left, use red highlighting
$j(this).addClass('text-danger').parent().addClass('danger');
}
});
AppGini plugins to add more power to your apps:
- DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
- Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
- Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.
Re: Appgini Pre-sales questions, can Appgini?
Thank you for the response a.gneady. I purchased appgini last night, I'm looking forward to using and supporting the development & support of Appgini.
Appgini 5.50, Revision 835. Mac OSX 10.11 running Windows 10 on VMWare.
Re: Appgini Pre-sales questions, can Appgini?
You're always welcome.
And thanks for your order
And thanks for your order
AppGini plugins to add more power to your apps:
- DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
- Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
- Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.
Re: Appgini Pre-sales questions, can Appgini?
a.gneady wrote:Although this is not directly supported by AppGini, it can be added by customizing the generated code. Let's assume your table name is 'tasks', the field name is 'due_date', and the date format for that field is 'month/day/year'. You should add code similar to the following in the generated 'hooks/footer-extras.php' file:
Here is sample output that shows how highlighting would look like (assuming the default bootstrap theme):Code: Select all
$j('td.tasks-due_date a').each(function(){ var ds = $j(this).html(); /* assuming date format of due_date is month/day/year */ var dc = new Date(ds.replace(/(\d{1,2})\/(\d{1,2})\/(\d{4})/, '$3-$1-$2')); var today = new Date(); var days_ahead = parseInt((dc - today) / 86400 / 1000); if(days_ahead >= 8){ // 8+ days left, use green highlighting $j(this).addClass('text-success').parent().addClass('success'); }else if(days_ahead >= 7){ // 7 days left, use yellow highlighting $j(this).addClass('text-warning').parent().addClass('warning'); }else{ // less than 7 days left, use red highlighting $j(this).addClass('text-danger').parent().addClass('danger'); } });
Doing the above I get the following errors.
Appgini 5.50, Revision 835. Mac OSX 10.11 running Windows 10 on VMWare.
Re: Appgini Pre-sales questions, can Appgini?
@ All, I think I got it working! I'll update momentarily! Yeeeehaw! Making progress with Appgini.
Appgini 5.50, Revision 835. Mac OSX 10.11 running Windows 10 on VMWare.
-
- Posts: 9
- Joined: 2016-08-22 04:18
Re: Appgini Pre-sales questions, can Appgini?
How did you fix that error, I got the same, not sure how to work around it!
I have two more questions about this function please:
I have two more questions about this function please:
- Is it possible to highlight the whole row and not just the due date cell?
- Is it possible to highlight it based on cell content, like if it had the word 'hot' or so?
-
- Moderator
- Posts: 82
- Joined: 2013-11-11 19:21
Re: Appgini Pre-sales questions, can Appgini?
Regarding the above error, make sure the code is inserted in the footer page inside a script tag. You should also make sure it is NOT placed inside a php block.
To highlight an entire row based on a value you can use a code similar to the one below.
For more tips and ideas regarding customizing the generated code, please refer to our AppGini Customization Course at https://www.udemy.com/customizing-appgi ... ode=TENOFF
To highlight an entire row based on a value you can use a code similar to the one below.
Code: Select all
<script>
$j(function(){
$j('td.tablename-fieldname a').each(function(){
var ds = $j(this).html();
if (ds == "trigger value here"){
$j(this).parent().addClass('text-success').parent().addClass('success');
}
}
}
</script>
-
- Posts: 9
- Joined: 2016-08-22 04:18
Re: Appgini Pre-sales questions, can Appgini?
Thank you so much Noha, it is working for me now. However, for some reason I don't get the text effect of the theme when the whole row is selected (see screenshot), it only color the background with the right theme but not the text. Is there a way to fix this?
I checked the preview of your course, it does sound interesting. I'll definitely sign up for it.
I checked the preview of your course, it does sound interesting. I'll definitely sign up for it.
-
- Moderator
- Posts: 82
- Joined: 2013-11-11 19:21
Re: Appgini Pre-sales questions, can Appgini?
This code should do the job:
Code: Select all
<script>
$j(function(){
// change tablename and fieldname below to the actual table and field names ...
$j('td.tablename-fieldname a').each(function(){
var ds = $j(this).html();
if (ds == "trigger value here"){
$j(this).addClass('text-success').parent().parent().addClass('success');
}
}
}
</script>
-
- Posts: 20
- Joined: 2017-03-12 09:32
Re: Appgini Pre-sales questions, can Appgini?
I just found out that it only works on Chrome browser - not other browsers like Microsoft Edge, Firefox, and others. I haven't test on different browsers, just three of them. These highlight colors works on chrome only - is there a way to get it working on other browsers?
Re: Appgini Pre-sales questions, can Appgini?
I have just tried it on IE and Firefox browsers and it works as fine as on Chrome browser.D Campbell wrote: ↑2017-10-25 14:08I just found out that it only works on Chrome browser - not other browsers like Microsoft Edge, Firefox, and others. I haven't test on different browsers, just three of them. These highlight colors works on chrome only - is there a way to get it working on other browsers?