Welcome, Guest
Username: Password: Remember me

TOPIC: [ADDED] Request regarding the default grid columns

Request regarding the default grid columns 30 May 2013 21:26 #7262

  • dyoungers
  • dyoungers's Avatar
  • Offline
  • Premium Member
  • Posts: 123
  • Thank you received: 16
  • Karma: 0
In the project I created using the current builder, I had to add a class name in the generated code for the default columns in the grid (NUM and the checkbox) so I could customize those columns using CSS.

It's possible I missed an option somewhere but if not, I think it would be nice if you could generate a default class for each of these columns.

Thanks!
Dave
The administrator has disabled public write access.

Re: Request regarding the default grid columns 03 Jun 2013 12:36 #7286

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
It makes no sense.
You can add a class name for the brick (the table), and then access your columns.

I do not think to add a functionality to apply the same class on all. Cook must stay minimalist in the builder.
Features will grow always, but not specific options such you propose. It is both for the ergonomy and for the user experience, it must stay simple and available to all.

Do you think it is necessary ? In wich case practically ?
Coding is now a piece of cake
The administrator has disabled public write access.

Re: Request regarding the default grid columns 03 Jun 2013 13:03 #7293

  • dyoungers
  • dyoungers's Avatar
  • Offline
  • Premium Member
  • Posts: 123
  • Thank you received: 16
  • Karma: 0
sorry if I wasn't more specific ... and maybe I'm missing something (I'm not a CSS expert by any stretch)

What I'd like to do is class the fields that are automatically generated, i.e. column 1 (NUM) and column 2 (checkbox) because there are cases where I don't want them to be displayed. In some cases the NUM field isn't important to me and just clutters the page, and I also have some list views where I don't have a toolbar so the checkboxes aren't necessary for multiple selection.

Right now I have modified the code and I apply the following CSS:
style="display: none;"

I can't just delete the checkboxes because they are needed when I want to put tasks in the grid, e.g. publish/unpublish, so hiding them is the easiest solution.

While I can add a class to the brick (and I can add classes to all the columns I drop onto the grid), I don't have a way to add a class to the default columns. I don't think it's necessary that I be able to specify the class name but my thought was that generating a unique class for each of those two columns automatically would solve my problem.

I'm certainly open to any suggestions on how to do this in a different manner if there is some CSS magic that I'm missing

Thanks!
Last Edit: 03 Jun 2013 13:04 by dyoungers. Reason: typos
The administrator has disabled public write access.

Re: Request regarding the default grid columns 03 Jun 2013 13:59 #7296

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
For the chechbox, you can apply this with JDom :


For instance with ACLs :

JDom::_(...
aclAccess => 'core.admin'

)

From memory...

For the NUM of the grid, it has been asked many times, and still didn't realized it because too much things on the line.

One again, I put it on top of the priorities. Thanks for remembering me.
Coding is now a piece of cake
The administrator has disabled public write access.

Re: Request regarding the default grid columns 03 Jun 2013 15:05 #7301

  • dyoungers
  • dyoungers's Avatar
  • Offline
  • Premium Member
  • Posts: 123
  • Thank you received: 16
  • Karma: 0
I'll have to think about the JDom change but I'm not sure it would work for me since I also have a case where I have customized the publish/unpublish task in the grid (to make it do something else by overriding the publish code.)

In that case, I don't have a toolbar and the custom task doesn't require admin rights, i.e. any registered user has access, so using ACLs to control it being displayed doesn't work since I need the checkbox to exist in the grid (even if it is not displayed) to carry the cid[] values into the code for processing

And while it's not directly related to this thread, I also noticed a couple of things in the beta that I thought I'd comment on ...

First, there is a class name on the checkbox <td> called "row_id" but no class id on the <th> ... seems they should both be classed so we can style the column heading and the column detail.

Second, the CSS class specified for a column is only added to the <td> and I'd really like to be able to customize the CSS for the <th> as well. Again, if I want to apply styling to an individual column heading (not all headings), it would be nice (and for me the same class could be used for both so no change would be needed in the UI.)

Regardless of what you end up doing, I can use the new support for "forks" to customize the grid views for now and hopefully in the future we can have class names for both the <th> and <td> in the all the automatic columns :)

Thanks for a great tool!
The administrator has disabled public write access.

Re: Request regarding the default grid columns 23 Sep 2013 18:36 #11164

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
Fixed.

Num is now an option in the builder. Hidden per default, and not created at all.

For the checkbox, you can play with the new function in the model :
$model->canSelect();
You can decide what you want to check to see or hide the column.

Hope you you love the latest version :
www.j-cook.pro/index.php/docs/versions/121-2-6
Coding is now a piece of cake
The administrator has disabled public write access.

Re: Request regarding the default grid columns 24 Sep 2013 00:22 #11173

  • dyoungers
  • dyoungers's Avatar
  • Offline
  • Premium Member
  • Posts: 123
  • Thank you received: 16
  • Karma: 0
Thanks! I'll check it out tomorrow :)
The administrator has disabled public write access.
Time to create page: 0.096 seconds

Get Started