Need one-click toggle of row in list

Status
Not open for further replies.

tcranford

Member
I would like to have the ability to select an individual cell in a list and toggle a value on or off, for example...given a list of customers have a column called "Watch" where the end user can toggle the state (to watch or not watch) a given customer.

I've tried in-line editing (too many clicks to change the state) and using the Update_Col plugin which gets me closest to where I want to be. If update_col is the best way to accomplish this there are two overrides that I'd like to make and I'd like advice on the best way to do this:
1) Override the list behavior by removing the update_col ability to make an update to the entire list for a column. Ideally this would be to remove the checkbox column as well as the icon button at the top of the column (see list-toggle attachment). Would this be a css override or would I need to copy the update_col plugin to modify the behavior?

2) I was able to set the "on" state for the cell but how to change to the "off" state by using another click? The second attachment, update-col-eval, shows my settings in the update_col list plugin. Within the plugin I've tried setting the value to "!{customer___watch}" and setting Eval to Yes but that doesn't work.

I'm running J! 3.3.6 and F 3.2.

Thanks!
 

Attachments

  • list-toggle.png
    list-toggle.png
    66.8 KB · Views: 254
  • update-col-eval.png
    update-col-eval.png
    39.1 KB · Views: 263
Yes, the easiest way to hide the checkboxes/header-col would be CSS.

As the tooltip of the "Select" says you can't use placeholders.
So I think you have to use 2 update_col plugins (setting on and off) or you can add a php list plugin to do it on your own.
 
Thanks Troester,
Don't know why I didn't look at the php list plugin. That all worked perfectly with solutions below:
1) Used php list plugin with php code that edited the watch field in my db table changing the state (1 or 0)
2) Added CSS overrides to my template custom.css file to remove checkbox column as well as the column select button. I used firebug to identify the selectors.

Thanks again!
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top