rejetto forum

checkboxes

raybob · 6 · 4439

0 Members and 1 Guest are viewing this topic.

Offline raybob

  • Tireless poster
  • ****
    • Posts: 454
    • View Profile
    • FileSplat.com
Is there a way to make it so that instead of selecting a <tr> by clicking in the blank space, you could replace that with a checkbox input, that when checked set the <tr> class as selected?

If I just add a checkbox input just inside the <td>, clicking the checkbox will highlight the row, but then if you click on the row, it will become unselected while the checkbox will remain checked, so something else needs to be changed that I don't know how to do.

This would greatly add to the ease of use and functionality of HFS . . .

Thanks,
raybob


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
i will do this if i can't get a better idea.
thanks


Offline raybob

  • Tireless poster
  • ****
    • Posts: 454
    • View Profile
    • FileSplat.com
Since I couldn't put in the checkboxes, I settled for this which works fine; click to select, click to deselect:  Next I will figure out how to make it say 'deselect' when the row is already highlighted.


Code: [Select]
[file=folder=link|private]
<tr  class='{.if not|{.or|{.get|can delete.}|{.get|can access.}|{.get|can archive item.}.}|non.}selectable {.if|{.mod|{.count|row.}|2.}|even.}'><td>
{.if|{.get|is new.}|<span class='flag'>&nbsp;NEW&nbsp;</span>.}
{.if not|{.get|can access.}|<img src='/~img_lock'>.}
<a class='the-item' href="%item-url%"><img src="%item-icon%"> %item-name%</a><div style="float:right;"><input type="submit" value="{.!Select.}" style="font-weight:bold;" /></div>
{.if| {.?search.} |{:{.123 if 2|<div class='item-folder'>{.!item folder.} |{.breadcrumbs|{:<a href="%bread-url%">%bread-name%/</a>:}|from={.count substring|/|%folder%.}/breadcrumbs.}|</div>.}:} .}
{.123 if 2|<div class='comment'>|{.commentNL|%item-comment%.}|</div>.}


Screenshot
« Last Edit: February 18, 2011, 09:10:53 PM by raybob95 »



Offline raybob

  • Tireless poster
  • ****
    • Posts: 454
    • View Profile
    • FileSplat.com
What exactly did you change to get the checkboxes?

I can't just copy over the new template because mine is modified and I can't seem to be able to find the new code . . .

Thanks,
Ray


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
the template is a sensible part of the features of HFS, so if you go for a personal one, you should consider that you will loose a part of the updates (those regarding the template) or you will have to keep your tpl up to date.

that's why you should try to use the "diff template" feature, and apply just the changes you need, leaving the source template untouched.
Start with a backup of your template, and then try to focus on what you need to change.
If you need to help with this part, let me know.