Logic Machine Forum
Smartphone and Wiser - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Application Store (https://forum.logicmachine.net/forumdisplay.php?fid=11)
+--- Thread: Smartphone and Wiser (/showthread.php?tid=3710)



Smartphone and Wiser - G.K. - 26.11.2021

Hello Everyone,

How can I change the color of the button. I'd like it red.

Also
Can I change the symbols (in the button) I'd like to swap them.
I've checked if the object can change polarity - it can't.


https://imgbb.com/upload

Thanks


RE: Smartphone and Wiser - admin - 26.11.2021

You didn't provide a screenshot.


RE: Smartphone and Wiser - G.K. - 26.11.2021

There it is.
https://ibb.co/QQynYPb


RE: Smartphone and Wiser - admin - 26.11.2021

Set Additional class to btn-inversed

Add to Custom CSS:
Code:
.touch .btn-inversed .btn-success {
  background-image: none;
  background-color: red;
}

Add to Custom JavaScript:
Code:
$(function() {
  $('.touch .btn-inversed').each(function(_, el) {
    var $el = $(el), addr = $el.data('status-object'), btn = $el.find('.btn');
    
    grp.listen(addr, function(obj) {
      setTimeout(function() {
        btn.text(obj.value ? '×' : '✓');
      }, 1);
    });
  });
});



RE: Smartphone and Wiser - G.K. - 26.11.2021

Excellent
Thank you Big Grin