Welcome, Guest
Username: Password: Remember me

TOPIC: Request to add classes to brick divs for styling

Request to add classes to brick divs for styling 02 Jul 2013 16:58 #7801

  • jhallock
  • jhallock's Avatar
  • Offline
  • Senior Member
  • Posts: 43
  • Thank you received: 1
  • Karma: 0
I am working on customizing the style of my component. It would be extremely helpful if you could add classes to the <div> tags for the various bricks.

As it stands, there is no easy way for me to style the div containing the filters using css, or just the filter widgets themselves without affecting other elements on the page. (example of filters below) I could add them myself, but then I lose some extensibility - I would need to create forked views for every one of my tables (a lot) and update them if I made changes to my component in cook, sort of defeating the point of forking.

Adding classes to the <div> tags for toolbar, grid, and pagination as well would be ++. Thanks.
<div>

			<!-- BRICK : filters -->
			<div class="pull-left">
				<?php echo $this->filters['filter_facility']->input;?>
			</div>
			<div class="pull-left">
				<?php echo $this->filters['filter_position']->input;?>
			</div>
			<div class="pull-right">
				<?php echo $this->filters['limit']->input;?>
			</div>
			<div class="pull-right">
				<?php echo $this->filters['directionTable']->input;?>
			</div>
			<div class="pull-right">
				<?php echo $this->filters['sortTable']->input;?>
			</div>
			<div class="clearfix"></div>
			<div class="pull-right">
				<?php echo $this->filters['search_search_name']->input;?>
			</div>

		</div>
The administrator has disabled public write access.

Request to add classes to brick divs for styling 02 Jul 2013 17:49 #7804

  • jhallock
  • jhallock's Avatar
  • Offline
  • Senior Member
  • Posts: 43
  • Thank you received: 1
  • Karma: 0
I see now that there is the option to add a class to the brick in j-cook, which is helpful. But I do still think I would be helpful if each brick type also had a default class applied in addition to this. I can go through and add the same class to every filter break etc, but there is a fair amount of redundancy in doing that. Ideally, that would be reserved for customization on a single layout.

Thank you for the consideration.
The administrator has disabled public write access.

Request to add classes to brick divs for styling 02 Jul 2013 18:53 #7806

  • jhallock
  • jhallock's Avatar
  • Offline
  • Senior Member
  • Posts: 43
  • Thank you received: 1
  • Karma: 0
Sorry to keep adding new posts to this thread, but it appears that the css class I designate in the online interface is not applied to my bricks. I added the class "ckfilter" to the default front end list view for a table, and it was not applied to the <div> when I downloaded my component.

I have this setup for the employees front end list in the project "Chronos".
The administrator has disabled public write access.

Request to add classes to brick divs for styling 06 Jul 2013 20:47 #7896

  • VeCrea
  • VeCrea's Avatar
  • Offline
  • Platinum Member
  • Absolute JCook fan
  • Posts: 473
  • Thank you received: 100
  • Karma: 30
I agree, it's not added... It's easy to add it after component is downloaded, obviously, but it would be cooler that it works directly out of the box
The administrator has disabled public write access.

Request to add classes to brick divs for styling 07 Jul 2013 15:30 #7904

  • dyoungers
  • dyoungers's Avatar
  • Offline
  • Premium Member
  • Posts: 123
  • Thank you received: 16
  • Karma: 0
It's easy to add it after component is downloaded, obviously, but it would be cooler that it works directly out of the box

I wholeheartedly agree on that!

Ideally, every HTML element should either have a class generated by default or allow it to be specified so we don't have to add the class info every time we download our components.

For me, I'd like to see the two default columns in the grid (the number and check box columns) have default class names assigned to the TH and TD elements so I can style those columns. I'd be fine with an option to specify my own (as we can do with the columns explicitly added) but we don't have a way to do it in the builder so I'm stuck adding it every download :(

I'm sure there are other elements that this could be said for as well

Thanks!
Dave
The administrator has disabled public write access.

Request to add classes to brick divs for styling 07 Jul 2013 21:24 #7905

  • VeCrea
  • VeCrea's Avatar
  • Offline
  • Platinum Member
  • Absolute JCook fan
  • Posts: 473
  • Thank you received: 100
  • Karma: 30
		<div class="control-group ">
		<div class="control-label">
			<label id="jform_garage_demande-lbl" for="jform_garage_demande" class="">Garage en demande</label>		</div>
	
	    <div class="controls">
			<fieldset id="jform_garage_demande" class="radio btn-group" style="border:0 none;"></fieldset>		</div>
	</div>
Well as you see, if you do a J3 compatible component, there is some kind of markup that could allow to do some things out of the box. But i was really speaking of the brick, that has classes = "fieldsform form-horizontal" and where i would like to see the class i mentionned in the builder ("garages")
The administrator has disabled public write access.

Request to add classes to brick divs for styling 22 May 2014 17:46 #12453

  • andypooz
  • andypooz's Avatar
  • Offline
  • New Member
  • Posts: 18
  • Thank you received: 2
  • Karma: 0
What exactly is the point of having a 'class' option for bricks if they aren't applied to the generated code? I was it just put there to annoy us?

Also PLEASE can you fix 'foreing key' in the data type options to 'foreign key'! Surely it's an easy fix to correct the spelling (I realise English isn't your first language).

Andy
The administrator has disabled public write access.
Time to create page: 0.072 seconds

Get Started