Welcome, Guest
Username: Password: Remember me

TOPIC: [FIXED] Toggle button - undefined

Toggle button - undefined 20 Apr 2016 15:35 #13919

  • krasy
  • krasy's Avatar
  • Offline
  • Premium Member
  • Posts: 90
  • Thank you received: 8
  • Karma: 5
in collection bool values display good icons when not toggable:
null as icon-question-sign
1 as icon-ok
0 as icon-cancel

in collection with toggable button,
null displays as icon-cancel,

I would like to have null as undefined (question mark).
is it here: administrator\components\com_obrady\dom\html\fly\bool.php
?
cant find the right place in code.
The administrator has disabled public write access.

Toggle button - undefined 22 Apr 2016 16:43 #13920

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
This is handled by JDom.
Correct, when you choose togglable, the icons differs. Maybe not the best. Might be unified at least.

The JDom class handling that is :
html.grid.bool.default

located in :
html/grid/bool/default.php

EDIT: You might find easily how to change the icons.
Hope it helps.
Coding is now a piece of cake
Last Edit: 22 Apr 2016 16:44 by admin.
The administrator has disabled public write access.

Toggle button - undefined 23 Apr 2016 21:28 #13921

  • krasy
  • krasy's Avatar
  • Offline
  • Premium Member
  • Posts: 90
  • Thank you received: 8
  • Karma: 5
thx for replay,
if someone would like not to have "undefined" option
than would simply specify the default value as "false" or "true" in the builder.

I ve been changing
libraries\jdom\html\grid\bool\default.php
and:
administrator\components\com_obrady\dom\html\grid\bool\default.php

the the code there doesn't seem to influence the behavior of buttons...
did i miss something?
The administrator has disabled public write access.

Toggle button - undefined 09 May 2016 10:39 #13932

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
Sorry I was wrong.
html.grid.bool.default
is deprecated

When I opened those files again, I saw a big mess. So I rewritten that part.
github.com/Cook-Self-Service/JDom/commit...fd143bc25f13ad9bce8e
You need the last JDom version 2.6.14, included naturally when you download again (no need to do anything). JDom will be automatically updated at install.

It is now much easy to change the icons. You have to edit the file :
html/grid/task/state/bool.php

You will find the icons at the top of the file.
JDom calls does not change at all in your code.
You still can use html.grid.bool which is an alias of html.grid.task.state.bool

Hope it helps.
Coding is now a piece of cake
The administrator has disabled public write access.
The following user(s) said Thank You: krasy

Toggle button - undefined 09 May 2016 14:02 #13936

  • krasy
  • krasy's Avatar
  • Offline
  • Premium Member
  • Posts: 90
  • Thank you received: 8
  • Karma: 5
Thx Jocelyn ;)
now it works out of the box
I don't have to fork anything!
The administrator has disabled public write access.
Time to create page: 0.086 seconds

Get Started