[geeklog-devel] Feature Request: ADMIN_list (2 requests)
Oliver Spiesshofer
oliver at spiesshofer.com
Tue Aug 21 21:21:32 EDT 2007
And I thought the whole Adminlist was complicated enough already :-)
Can you tell me what you want to do? I do not want to blow this up into
a monster where no one can handle the code afterwards anymore.
I would prefer to allow the codewriter to add things through templates
or so instead of making the main function even more complex.
You want to have several checkboxes and then also for the next row
another button on the end of the row?
Oliver
Joe Mucchiello wrote:
> Can you make it possible to name checkboxes used in the delete option?
>
> if (is_array($options) AND $options['chkdelete']) {
> $delitemtext = isset($options['chkitem']) ?
> $options['chkitem'] : 'delitem'; // new line
> $admin_templates->set_var('class', "admin-list-field");
> $admin_templates->set_var('itemtext', '<input
> type="checkbox" name="'.$delitemtext.'[]" value="' .
> $A[$options['chkfield']].'">');
> $admin_templates->parse('item_field', 'field', true);
> }
>
> if (is_array($options) AND $options['chkdelete']) {
> $delitemtext = isset($options['chkitem']) ?
> $options['chkitem'] : 'delitem'; // new line
> $admin_templates->set_var('header_text', '<input
> type="checkbox" name="chk_selectall" title="'.$LANG01[126].'"
> onclick="caItemsExt(this.form,'."'$delitemtext'".');">');
>
> Probably would need to make a second caItems javascript function so
> you don't have to modify all the calls to caItems throughout the code.
>
> function caItemsExt(f, delitem) {
> var n=f.elements.length;
> for (i=0;i<n; i++) {
> var field=f.elements[i];
> if (field.type == 'checkbox' && field.name.match(delitem)) {
> if (f.chk_selectall.checked) {
> field.checked=true;
> } else {
> field.checked=false;
> }
> }
> }
> }
>
> Another ADMIN_list request: How about making a way to add more buttons
> to the row where the trash can appears? I believe it is in
> admin/lists/list.thtml. Perhaps add an $options['buttons_below'] and
> then put a {buttons_below} into that thtml:
>
> <div style="padding:5px 0px 0px
> 9px;{show_deleteimage}">
> <input type="image"
> src="{layout_url}/images/deleteitem.png" title="{lang_deleteall}"
> onclick="return confirm('{lang_delconfirm}');">
> {buttons_below}
> </div>
>
> // and then something like would be necessary
> if (count($data_arr) > 1 AND is_array($options) AND
> ($options['chkdelete'] OR $options['buttons_below']) {
> if ($options['chkdelete']) {
> $admin_templates->set_var('header_text', '<input
> type="checkbox" name="chk_selectall" title="'.$LANG01[126].'"
> onclick="caItems(this.form);">');
> $admin_templates->set_var('show_deleteimage', '');
> }
> if ($options['buttons_below']) {
> $admin_templates->set_var('buttons_below',
> $options['buttons_below']);
> }
> $admin_templates->set_var('class', "admin-list-headerfield");
> $admin_templates->parse('header_row', 'header', true);
> $admin_templates->clear_var('on_click');
> } else {
> $admin_templates->set_var('show_deleteimage','display:none;');
> }
>
>
> ----
> Joe Mucchiello
> Throwing Dice Games
> http://www.throwingdice.com
> _______________________________________________
> geeklog-devel mailing list
> geeklog-devel at lists.geeklog.net
> http://eight.pairlist.net/mailman/listinfo/geeklog-devel
>
>
More information about the geeklog-devel
mailing list