[geeklog-devel] Feature Request: ADMIN_list (2 requests)

Web Site Master WebSiteMaster at cogeco.net
Tue Aug 21 19:08:14 EDT 2007


Multiple buttons would be a great feature to add to the lists.

-----Original Message-----
From: geeklog-devel-bounces at lists.geeklog.net
[mailto:geeklog-devel-bounces at lists.geeklog.net] On Behalf Of Joe Mucchiello
Sent: August-21-07 3:17 PM
To: Geeklog Development
Subject: [geeklog-devel] Feature Request: ADMIN_list (2 requests)

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

__________ NOD32 2473 (20070821) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com





More information about the geeklog-devel mailing list