NetTalk Central

Author Topic: sync button manual (disconnected web)  (Read 4740 times)

agustinh2000

  • Jr. Member
  • **
  • Posts: 86
    • View Profile
    • Email
sync button manual (disconnected web)
« on: January 15, 2019, 07:45:10 AM »
Hello Bruce, how are you ?,

how can I include an item in the menu to call syncall so that the user is sure that he synchronized the information.

I understand that the idbSync () function is in nt-idb.js but I do not know what the call to that function is

Thank you

Agustin

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11251
    • View Profile
Re: sync button manual (disconnected web)
« Reply #1 on: January 15, 2019, 11:42:21 PM »
Hi Augustin,

the correct JavaScript call to make would be
syncDatabase();

That's generated for you into database.js, and includes embed points and so on.

You can attach JavaScript to any menu item, by setting the onClick (JavaScript) template option (on the Click tab of the menu item settings.)

In this case just set it to
'syncDatabase();'

for additional credit you can add a display field to your footer to show the "last sync time". In my app I not only show the time, but if you press on that time it does an immediate sync. And I've also tweaked the "busy graphic" so the user can see both the progress, and status of the sync.

All of this will be covered in my training this year at CIDC (along with a bunch of other stuff) but if you need to see it a bit sooner then ask in a webinar and I'll show you what I've done.

cheers
Bruce


cheers
Bruce

agustinh2000

  • Jr. Member
  • **
  • Posts: 86
    • View Profile
    • Email
Re: sync button manual (disconnected web)
« Reply #2 on: January 16, 2019, 04:13:42 AM »
thank you Bruce, it's great to see the display in the footer, I'll be attentive to that topic...