Remove "No records available" msg

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
BLOMASKY
Posts: 1471
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

Remove "No records available" msg

Post by BLOMASKY »

Now, in queries, in build 2920, it has a large, fat row saying "NO RECORDS AVAILABLE". In previous versions, there was nothing. Can I remove this msg and revert to the way it was before? My customers are getting confused as to the message.

Thanks

Bruce
PointsWell
Posts: 1457
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Remove "No records available" msg

Post by PointsWell »

Also message is inconsistent between standard and custom queries
BLOMASKY
Posts: 1471
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

Re: Remove "No records available" msg

Post by BLOMASKY »

you can turn it off in individual queries by putting the following in the init script:

config.noRecords = false;


However, I think any changes to the UI, which means they can confuse existing customers, should be optional and by default be off. (or have a global switch to change them). Just my 0.02 cents worth.

Bruce
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Remove "No records available" msg

Post by aware_support »

You are right - we will do it better in next builds by having a special setting in a query. It will be off for existing queries by default and will be on for new ones by default.
Aware IM Support Team
BLOMASKY
Posts: 1471
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

Re: Remove "No records available" msg

Post by BLOMASKY »

Sounds PERFECT.

Thank You
Bruce
customaware
Posts: 2396
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: Remove "No records available" msg

Post by customaware »

aware_support wrote: Thu May 27, 2021 1:32 am You are right - we will do it better in next builds by having a special setting in a query. It will be off for existing queries by default and will be on for new ones by default.
Have the setting in the Global Business Space Settings so we as developers can set it either Always Default On or Always Default Off...
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Remove "No records available" msg

Post by aware_support »

This has been implemented in build 2921
Aware IM Support Team
joben
Posts: 224
Joined: Wed Nov 06, 2019 9:49 pm
Location: Sweden
Contact:

Re: Remove "No records available" msg

Post by joben »

Any plans to let us modify the message content? I only have the option to enable or disable the message.

I tried to write an init script, but it doesn't work:
config.messages.noRecords= "abc";
Regards, Joakim

Image
hpl123
Posts: 2588
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: Remove "No records available" msg

Post by hpl123 »

joben wrote: Fri Oct 13, 2023 1:27 pm config.messages.noRecords= "abc";
Try some variations on the script and also possibly put it as a render script. This has worked before i.e we can change it via scripts, I don't use it any more and can't remember how unfortunately.
Henrik (V8 Developer Ed. - Windows)
joben
Posts: 224
Joined: Wed Nov 06, 2019 9:49 pm
Location: Sweden
Contact:

Re: Remove "No records available" msg

Post by joben »

hpl123 wrote: Fri Oct 13, 2023 3:55 pm
joben wrote: Fri Oct 13, 2023 1:27 pm config.messages.noRecords= "abc";
Try some variations on the script and also possibly put it as a render script. This has worked before i.e we can change it via scripts, I don't use it any more and can't remember how unfortunately.
No luck with that so far.

There is an script that sort of works:

Code: Select all

setTimeout(function(){
$(".aw-empty-data").text('Hittade inga uppdrag.');
},1000)
It replaces the "No records available" text after 1000 milliseconds.
If you lower the value too much, it won't execute if the browser/internet connection is slow.
That means you always get a visible delay before the message is replaced.
It also doesn't work if you have set the query to auto-refresh. The auto-refresh will overwrite your custom text.
Regards, Joakim

Image
hpl123
Posts: 2588
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: Remove "No records available" msg

Post by hpl123 »

:!:
joben wrote: Mon Oct 16, 2023 6:33 am
hpl123 wrote: Fri Oct 13, 2023 3:55 pm
joben wrote: Fri Oct 13, 2023 1:27 pm config.messages.noRecords= "abc";
Try some variations on the script and also possibly put it as a render script. This has worked before i.e we can change it via scripts, I don't use it any more and can't remember how unfortunately.
No luck with that so far.

There is an script that sort of works:

Code: Select all

setTimeout(function(){
$(".aw-empty-data").text('Hittade inga uppdrag.');
},1000)
It replaces the "No records available" text after 1000 milliseconds.
If you lower the value too much, it won't execute if the browser/internet connection is slow.
That means you always get a visible delay before the message is replaced.
It also doesn't work if you have set the query to auto-refresh. The auto-refresh will overwrite your custom text.
If nothing else, try setInterval instead with the lowest possible interval. That SHOULD change it then as soon as its created in the DOM and the user will probably not see the change. Optionally clear the interval after a few seconds (of have a JS script check if the text is the Swedish sentence and the clear it) if having the loop bothers you or creates other issues.
Henrik (V8 Developer Ed. - Windows)
hpl123
Posts: 2588
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: Remove "No records available" msg

Post by hpl123 »

I found this old post where I wrote about enabling/disabling it and can maybe be a starting point:https://www.awareim.com/forum/viewtopic ... rds#p53733.

This script still works i.e we can still access that part of Kendo via scripts, the thing is just to figure out the script to change the actual text. I looked at the Kendo UI reference for this briefly and you may have to access the template to be able to do this change: https://docs.telerik.com/kendo-ui/api/j ... /norecords
Henrik (V8 Developer Ed. - Windows)
johntalbott
Posts: 619
Joined: Wed Jun 17, 2015 11:16 pm
Location: Omaha, Nebraska
Contact:

Re: Remove "No records available" msg

Post by johntalbott »

Init Script

config.noRecords.template = function(e) {
var t = `<div class="k-grid-norecords"><div class="k-grid-norecords-template" style="margin: 0px auto; position: static;">blah blah blah.</div></div>`
return t
}
VocalDay Solutions - Agility - Predictability - Quality

We specialize in enabling business through the innovative use of technology.

AwareIM app with beautiful UI/UX - https://screencast-o-matic.com/watch/crfUrrVeB3t
joben
Posts: 224
Joined: Wed Nov 06, 2019 9:49 pm
Location: Sweden
Contact:

Re: Remove "No records available" msg

Post by joben »

hpl123 wrote: Mon Oct 16, 2023 2:01 pm This script still works i.e we can still access that part of Kendo via scripts, the thing is just to figure out the script to change the actual text. I looked at the Kendo UI reference for this briefly and you may have to access the template to be able to do this change: https://docs.telerik.com/kendo-ui/api/j ... /norecords
Interesting find. So there is a config.messages.noRecords a well as config.noRecords.template. And they seem to do the same thing.
I tried turning that into an init script but no luck.
johntalbott wrote: Mon Oct 16, 2023 3:14 pm Init Script

config.noRecords.template = function(e) {
var t = `<div class="k-grid-norecords"><div class="k-grid-norecords-template" style="margin: 0px auto; position: static;">blah blah blah.</div></div>`
return t
}
Thanks for the example, but this does not work unfortunately.
I copied the whole thing into init scripts for the query. I don't get console log messages either, so no clue whats wrong.
Regards, Joakim

Image
hpl123
Posts: 2588
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: Remove "No records available" msg

Post by hpl123 »

joben wrote: Tue Oct 17, 2023 7:15 am
hpl123 wrote: Mon Oct 16, 2023 2:01 pm This script still works i.e we can still access that part of Kendo via scripts, the thing is just to figure out the script to change the actual text. I looked at the Kendo UI reference for this briefly and you may have to access the template to be able to do this change: https://docs.telerik.com/kendo-ui/api/j ... /norecords
Interesting find. So there is a config.messages.noRecords a well as config.noRecords.template. And they seem to do the same thing.
I tried turning that into an init script but no luck.
Yes, the template is a bit different as far as I understand it and is an option to customize more of how the message should be displayed e.g adding styles etc.. The messages thing is just to change the actual text string.

Here are 2 working scripts:

Change via messages i.e only actual text string:

Code: Select all

config.messages= {
    noRecords: 'blah blah blah.'
}
Change via template i.e change text string + have an option to change style:

Code: Select all

config.noRecords= {
    template: '<div class="k-grid-norecords"><div class="k-grid-norecords-template" style="margin: 0px auto; position: static;">blah blah blah.</div></div>'
}
Henrik (V8 Developer Ed. - Windows)
Post Reply