This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Link to schedulers page
#1
Hello ,

In visulation design, we can create a link with an icon to schedulers page. But we cannot back to main visulation page. There is no back button or home page button in schedulers page. We don't want to use browser back button because we are using full screen application with a touchscreen.

How we can turn back to our main visulation page from schedulers page ?
Reply
#2
There's a home button which is hidden if Schedulers are shown in a frame.
To make home button act as a "Back" button, you have to add this to Custom JavaScript:
Code:
$(function() {
  if (window.history.length > 1) {
    $('.btn-home').click(function(e) {
      e.preventDefault();
      window.history.back();
    });
  }
});
Reply
#3
Hello,

thank you for the code, working good !
It appears that the home button point to the first page of the visualisation and not the previous page you were on.
Would it be possible to point to a specific page like window.page#4.go() rather than window.history.back() ?
Thank you for your help.

Hippolyte
Reply
#4
You can set a fixed redirect like this:
Code:
$(function() {
  if (window.history.length > 1) {
    $('.btn-home').click(function(e) {
      e.preventDefault();
      window.location = '/scada-vis/';
    });
  }
});
Reply
#5
Thank you for your quick answer but the issue is that /scada-vis/ will always redirect to the first page of the visualisation.
Is it doable to have a /scada-vis/page#4 ?
Reply
#6
Make sure that plan with ID=4 exists:
Code:
window.location = '/scada-vis/#4';
Reply
#7
Perfect thank you so much !
Reply
#8
My suggestion wrap your schedulers and trends to a widget and dynamically change the widget.
Here is how to do it: https://forum.logicmachine.net/showthrea...ler+widget
Because it's infinity times faster than reloading of the whole visu and your user ends always at the correct page of your visu.

LM team please add scheduler and trend objects as you have promised here https://forum.logicmachine.net/showthrea...ler+widget
LM5Lp, firmware: 2018.08.22 and 2021.12.15, FlashSYS v2, ARMv7 Processor rev 5 (v7l), kernel 4.4.151 and 4.4.259
Reply
#9
Hi,

I have a question about home button in trends/schedules.

I´ve different widget to open different trends/schedules and I want back to this widget when I click on "home" button.

Is there any way to do that?

Thanks
Reply


Forum Jump: