Welcome, Guest
Username: Password: Remember me

TOPIC: [FIXED] html.fly.bool vs html.grid.bool

html.fly.bool vs html.grid.bool 22 Nov 2016 23:41 #14722

  • Ferm
  • Ferm's Avatar
  • Offline
  • Junior Member
  • Posts: 39
  • Thank you received: 6
  • Karma: 2
Edit: I posted this in the wrong forum by mistake. So I am re-posting in in the debug forum with an update as well.

I have a number of tables with boolean fields. In the front end in the collection view, they used to be either empty (=false) or have a tick mark on a white background (=true). The html for the boolean fields int he front end was generated by a call to html.fly.bool in the JDOM library.

This no longer works and it seems that the html.fly.bool used to adding the class icon-ok to the element if the value was true and this caused the correct offset for the tick mark in the image glyphicons-halflings.png. In more recent builds, the class icon-ok is not assign and the offset is not correct and the field remains blank even if the value is true.

However, in some tables int he recent builds, the call is not to html.fly.bool but to html.grid.bool and the classes/icons that are used for published/unpublished are used for booleans in lists. So the classes icon-unpublish and icon-published are assigned when the html is generated by html.gris.bool. This works fine too.

The problem is that for some tables the call is to html.fly.bool (which doesn't work anymore) and for other tables it is to html.grid.bool which does work.

I can't see any difference between the tables. How can I make the builder use html.grid.bool instead of html.fly.bool?

Grateful for any help!!!

This does not work:
	<td style="text-align:left">
					<?php echo JDom::_('html.fly.bool', array(
						'dataKey' => 'passport_checked',
						'dataObject' => $row,
						'togglable' => false,
						'viewType' => 'icon'
					));?>
				</td>

This does work:
	<td style="text-align:center">
					<?php echo JDom::_('html.grid.bool', array(
						'dataKey' => 'flyer_done',
						'dataObject' => $row,
						'viewType' => 'icon'
					));?>
				</td>
Last Edit: 23 Nov 2016 13:38 by Ferm.
The administrator has disabled public write access.

html.fly.bool vs html.grid.bool 23 Nov 2016 13:39 #14729

  • organicwebs
  • organicwebs's Avatar
  • Offline
  • Premium Member
  • Chris
  • Posts: 133
  • Thank you received: 21
  • Karma: 4
Sorry - I don't have your answer - maybe this might help...

My generated code (that works) is as per your first example
<?php echo JDom::_('html.fly.bool', array(
						'dataKey' => 'unrestricted_bypass',
						'dataObject' => $row,
						'togglable' => false,
						'viewType' => 'icon'
					));?>
.



This is what it shoudl look like with Protostar ...





Ideas...
*) Test using the Protostar template
*) Rebuild the JCook component - rename the fork folder (to clear mods) - then check the graphics.

These are my settings...
Just call me Chris :)
The administrator has disabled public write access.
The following user(s) said Thank You: admin

html.fly.bool vs html.grid.bool 23 Nov 2016 17:30 #14736

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
I am not sure to understand, but I have tested and I found when a bool of a list is NOT togglable, it was appearing as a disabled button.
I changed that in the last version of JDom.
Now when you are using html.grid.bool, you must specify 'togglable' => true if you want a button.

So it might fix your problem.
In a grid, better to use html.grid, even if it renders as a fly with no action. You keep the abstraction consistent.
Coding is now a piece of cake
The administrator has disabled public write access.
Time to create page: 0.098 seconds

Get Started