rejetto forum

Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: raybob on February 12, 2011, 04:11:46 PM

Title: checkboxes
Post by: raybob on February 12, 2011, 04:11:46 PM
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
Title: Re: checkboxes
Post by: rejetto on February 17, 2011, 04:09:08 PM
i will do this if i can't get a better idea.
thanks
Title: Re: checkboxes
Post by: raybob on February 17, 2011, 09:39:56 PM
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 (http://i361.photobucket.com/albums/oo57/RayBob328/Internet-DrivetkBETA-beckr_1298063097673.png)
Title: Re: checkboxes
Post by: rejetto on March 01, 2011, 03:58:20 PM
no need for it.
try the latest beta
http://www.rejetto.com/forum/index.php/topic,9484.new.html
Title: Re: checkboxes
Post by: raybob on March 24, 2011, 02:53:17 PM
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
Title: Re: checkboxes
Post by: rejetto on March 24, 2011, 05:33:30 PM
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.