Welcome, Guest
Username: Password: Remember me

TOPIC: [FIXED] Fly class not in generated code

Fly class not in generated code 03 Jan 2013 04:19 #6334

  • djod
  • djod's Avatar
  • Offline
  • New Member
  • Posts: 11
  • Thank you received: 1
  • Karma: 0
Being so new to all this, I may have this wrong, but...

I have a front end item layout that includes 4 separate fly blocks. This works fine, and provides me with a segmented view of the data.

I was planning to later the layout a little and added CSS classes to the fly properties, with the intention of then adding extra CSS styles to match and alter the presentation.

However when I do this, the classes are not evident in the resulting code.

I can see:
<fieldset class="fieldsform">
	<legend><?php echo JText::_('VARIABLESTARS_FIELDSET_TARGET_DETAILS') ?></legend>
	<dl>
		<dt>
			<label for="_target_star_gcvs_identifier">
				<?php echo JText::_( "VARIABLESTARS_FIELD_GCVS_ID" ); ?> :
			</label>
		</dt>
		<dd>
			<?php echo JDom::_('html.fly', array(
				'dataKey' => '_target_star_gcvs_identifier',
				'dataObject' => $this->item
				));
			?>
		</dd>
etc

I would have expected an encompassing div to perhaps have been added given that the formset already has a class?

Am I missing something or is this a feature not yet implemented?

I have generated the code with the 2.0 beta.
Clear skies...
David

Amateur astronomer, former programmer and apprentice cook!
Last Edit: 03 Jan 2013 04:20 by djod.
The administrator has disabled public write access.

Re: Fly class not in generated code 03 Jan 2013 11:07 #6339

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
Should work.

is your var $this->item->_target_star_gcvs_identifier available ?

It must be populated in prepareQuery() in the right model.
Coding is now a piece of cake
The administrator has disabled public write access.

Re: Fly class not in generated code 03 Jan 2013 12:07 #6344

  • djod
  • djod's Avatar
  • Offline
  • New Member
  • Posts: 11
  • Thank you received: 1
  • Karma: 0
Yes, the data is fine. It isn't the fields that are the issue, but the CCS class applied to the Fly block which becomes the <fieldset>

Below is a screen shot of the setting I made in Cook.



I had expected this to give me something like:
<fieldset class="fieldsform">
    <div class="rt-block rt-dark-block">
	<legend><?php echo JText::_('VARIABLESTARS_FIELDSET_TARGET_DETAILS') ?></legend>
etc

or
<fieldset class="fieldsform rt-block rt-dark-block">
    <div class="rt-block rt-dark-block">
	<legend><?php echo JText::_('VARIABLESTARS_FIELDSET_TARGET_DETAILS') ?></legend>
etc

If neither of these is expected, what is the expected result of applying the CSS class to the fly via the properties?

Thanks in advance.
Clear skies...
David

Amateur astronomer, former programmer and apprentice cook!
Last Edit: 03 Jan 2013 12:08 by djod.
The administrator has disabled public write access.

Re: Fly class not in generated code 11 Jan 2013 23:42 #6421

  • djod
  • djod's Avatar
  • Offline
  • New Member
  • Posts: 11
  • Thank you received: 1
  • Karma: 0
Can anybody explain what I am doing wrong? Or what should occur in this instance?
Clear skies...
David

Amateur astronomer, former programmer and apprentice cook!
The administrator has disabled public write access.

Re: Fly class not in generated code 12 Jan 2013 10:14 #6422

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
I too have tried this but have found that the CSS classes that I input aren't rendered. It's not that big of a deal really as you can write your enclosing div tags in the foreach loop and they will render fine!

Obviously, it would be nice to have but, in your case, I don't think it would yield quite the results that you are expecting as RT templates use specific input overrides, not Dl definitions for inputs.

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The administrator has disabled public write access.

Re: Fly class not in generated code 12 Jan 2013 10:27 #6423

  • djod
  • djod's Avatar
  • Offline
  • New Member
  • Posts: 11
  • Thank you received: 1
  • Karma: 0
Thanks Gez. Wasn't planning to use the RT stuff - it was just a test at the time.

But am struggling thru with taking this all to the next level - am even going get my hands grubby with PHP code. Was hoping to avoid that as much as possible of course, but some things can't be avoided!

Once again, thanks for you confirmation.
Clear skies...
David

Amateur astronomer, former programmer and apprentice cook!
The administrator has disabled public write access.

Re: Fly class not in generated code 15 Feb 2013 07:44 #6760

  • organicwebs
  • organicwebs's Avatar
  • Offline
  • Premium Member
  • Chris
  • Posts: 133
  • Thank you received: 21
  • Karma: 4
Hi - I can across this bug too today!

1) User defined Classes in the Fly bricks via the jCook interface are being ignored. :whistle:

2) User defined Classes for the Form Brick input fields are generally working ok ...
But these Classes are not being applied to the Labels of the Form bricks as you would expect.

3) User defined Classes for the Form Brick combo boxes are being ignored.

Workaround is to manually edit the code (like Gez says) - but that's another file to compare changes during revisions.

Can we move this thread to a DeBug ticket?

Jcook V2.0
JS Framework:Jquery
Embed Framework:No
Form Style: Condensed
Features: JDom Complete (so I don't get those todo graphics)
Todo:No
DB Auto: Model

Cheers
Chris
Just call me Chris :)
Last Edit: 15 Feb 2013 08:24 by organicwebs.
The administrator has disabled public write access.
The following user(s) said Thank You: JoomGuy

Re: Fly class not in generated code 15 Feb 2013 11:00 #6762

  • BTB300
  • BTB300's Avatar
  • Offline
  • Moderator
  • Posts: 415
  • Thank you received: 132
  • Karma: 47
+ 1 Same here...

Config
Jcook V2.0
JS Framework:Jquery
Embed Framework:yes
Form Style: Condensed
Features: reduced
Todo:No
DB Auto: Model

I did notice that fly views have a class of fieldsform as well...
<fieldset class="fieldsform">

shoud fly views not be
<fieldset class="fieldsfly">

And one final question
should i find the custom css class definition in the Cook css files or is this there just simply to allow you to intergrate with the template css??

in other words if i define a fly view CSS as fieldsfly-left

should i expect to see the following in my com_componentname/css/componentname.ccs file?
.fieldsfly-left {
	background-color:#fff;
}

Thanks in advance
The administrator has disabled public write access.

Re: Fly class not in generated code 15 Feb 2013 15:16 #6766

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
Hi Chris (@bottomupwebs)bottomupwebs wrote:
Can we move this thread to a DeBug ticket?
I'm reluctant to move this into new tickets at present as I know that @admin is slaving over testing Cook 2.5 - yes, I said, "2.5" - and I'm unclear whether or not this is one of the multitude of features, fixes and enhancements that he is adding (or has added).

As far as I understand, it is very very close to completion and unfortunately a fix for this could only be provided by @admin - i.e. there is no 'workaround' that we can suggest for the moment.

Is that OK with you?

I'll post this to @admin to ask if it is on the list and I'm sure that in due course, with the 2.5 release (or shortly after), a fix will be forthcoming.

Is that OK with you?

Many thanks!

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The administrator has disabled public write access.
The following user(s) said Thank You: organicwebs

Re: Fly class not in generated code 23 Sep 2013 18:17 #11159

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
Since 2.6, the CSS classes are applied.

They applies once on the biggest object that contains the whole element.
So when you want to access a sub element, always you can reach it by CSS namespace.

Also every field contain a different class name 'field-xxxx', where xxxx is the alias of the field.

With that it should cover all your needs.
The only not customizable is the backend Joomla native toolbar.

For any other requirement or issue about CSS classes since 2.6, please reopen a new topic.
Coding is now a piece of cake
The administrator has disabled public write access.
Time to create page: 0.090 seconds

Get Started