LogicMachine Forum
active State Icon - Printable Version

+- LogicMachine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Visualization (https://forum.logicmachine.net/forumdisplay.php?fid=9)
+--- Thread: active State Icon (/showthread.php?tid=4112)



active State Icon - khalil - 27.06.2022

Hello 
What Is the active state icon in the link and how to use it?


RE: active State Icon - admin - 27.06.2022

From LM docs: Icon that is displayed when the link points to the current plan. Can be used in Layouts to create a plan menu.


RE: active State Icon - khalil - 27.06.2022

(27.06.2022, 13:29)admin Wrote: From LM docs: Icon that is displayed when the link points to the current plan. Can be used in Layouts to create a plan menu.

Thanks


RE: active State Icon - batistacaceres - 10.10.2025

(27.06.2022, 13:29)admin Wrote: From LM docs: Icon that is displayed when the link points to the current plan. Can be used in Layouts to create a plan menu.

Hello:

I want to change the element "Link" textColor when tne "Display mode" is in Value mode, Is it posible?, Can I do it using javascript?

I know that element "Link" with "Display mode" as Icon, I can choose the Icon when the page is active, but in Value mode I can not choose any text style when the page is active.

Could you help me about it, I want to change not only the menú Icon I want to change too the text color when the page is active.

Thank you very much, best regards

Roger


RE: active State Icon - Daniel - 10.10.2025

As we have 3 Visualization tools, it would be good to say which one do you use?


RE: active State Icon - batistacaceres - 13.10.2025

(10.10.2025, 10:01)Daniel Wrote: As we have 3 Visualization tools, it would be good to say which one do you use?

I am talking about "scada-vis", visualization for PC/Tablet
thank you very much
Roger


RE: active State Icon - admin - 14.10.2025

For all relevant plan links set Additional classes to plan-link plan-link-123 where 123 is plan id to which the link refers.

Custom JS:
Code:
$(function() {
  var prevId;

  function onshowplan() {
    if (prevId) {
      $('.plan-link-' + prevId).removeClass('active');
    }
    
    if (currentPlanId) {
      $('.plan-link-' + currentPlanId).addClass('active');
        prevId = currentPlanId;
    }
  }
  
  $('body').on('showplan', onshowplan);
  onshowplan();
});

Custom CSS:
Code:
.plan-link.active {
  color: red;
}



RE: active State Icon - batistacaceres - 14.10.2025

(14.10.2025, 08:50)admin Wrote: For all relevant plan links set Additional classes to plan-link plan-link-123 where 123 is plan id to which the link refers.

Custom JS:
Code:
$(function() {
  var prevId;

  function onshowplan() {
    if (prevId) {
      $('.plan-link-' + prevId).removeClass('active');
    }
   
    if (currentPlanId) {
      $('.plan-link-' + currentPlanId).addClass('active');
        prevId = currentPlanId;
    }
  }
 
  $('body').on('showplan', onshowplan);
  onshowplan();
});

Custom CSS:
Code:
.plan-link.active {
  color: red;
}

Thank you very much, it works very well, but I had to add in custom CSS the parameter !important

.plan-link.active {
  color: red !important;
}

Thank you so much, good work,

best regard, Roger