Plugin Directory

Changeset 3130722


Ignore:
Timestamp:
08/04/2024 10:47:28 PM (18 months ago)
Author:
mrdenny
Message:
  • Correct and made consistant the logic around the notes and expeses fields in settings
  • Made display notes description more specific
  • Added a check all option to the invoicing queue
Location:
time-sheets
Files:
376 added
4 edited

Legend:

Unmodified
Added
Removed
  • time-sheets/trunk/queue-invoice.php

    r3122661 r3130722  
    283283
    284284        if ($timesheets) {
    285 
     285            echo "<script type='text/javascript'>
     286
     287            function check_all() {
     288                ";
     289
     290                foreach ($timesheets as $timesheet) {
     291                    echo "document.getElementById('timesheet_{$timesheet->timesheet_id}').checked = true;
     292                    ";
     293                }
     294                echo "
     295            }
     296            </script>
     297            ";
    286298           
    287299
     
    290302                echo "<td>Reject</td>";
    291303            }
    292             echo "<td>View</td><td>Completed</td><td>Invoice Number</td><td>User</td>";
     304            echo "<td>View</td><td><a href='#' onclick='check_all()'>Completed</a></td><td>Invoice Number</td><td>User</td>";
    293305            if (isset($options['allow_money_based_retainers'])) {
    294306                echo "<TD>Users Title</TD>";
     
    304316                    $invoice_id = '';
    305317                }
    306                 echo "<td align='center'><a href='./admin.php?page=invoice_timesheet&timesheet_id={$timesheet->timesheet_id}&action=preinvoice' target='_blank'><img src='". plugins_url( 'view.png' , __FILE__) ."' width='15' height='15'></a></td><td align='center'><input type='checkbox' name='timesheet_{$timesheet->timesheet_id}' value=1></td><td align='center'><input type='text' name='timesheet_{$timesheet->timesheet_id}_invoice' value='{$invoice_id}' size='6' autocomplete='off'></td><td>{$common->replace(' ', '&nbsp;', $timesheet->display_name)}</td>";
     318                echo "<td align='center'><a href='./admin.php?page=invoice_timesheet&timesheet_id={$timesheet->timesheet_id}&action=preinvoice' target='_blank'><img src='". plugins_url( 'view.png' , __FILE__) ."' width='15' height='15'></a></td><td align='center'><input type='checkbox' id='timesheet_{$timesheet->timesheet_id}' name='timesheet_{$timesheet->timesheet_id}' value=1></td><td align='center'><input type='text' name='timesheet_{$timesheet->timesheet_id}_invoice' value='{$invoice_id}' size='6' autocomplete='off'></td><td>{$common->replace(' ', '&nbsp;', $timesheet->display_name)}</td>";
    307319                if (isset($options['allow_money_based_retainers'])) {
    308320                    echo "<TD><div style='white-space: nowrap'>";
  • time-sheets/trunk/readme.txt

    r3127772 r3130722  
    115115
    116116== Changelog ==
     117= 2.1.1 =
     118* Correct and made consistant the logic around the notes and expeses fields in settings
     119* Made display notes description more specific
     120* Added a check all option to the invoicing queue
     121
    117122= 2.1.0 =
    118123* Blocking all cron jobs if the TIMESHEETS_SKIP_CRON setting is set, removing that check from the acutal functions being called by cron
  • time-sheets/trunk/settings.php

    r3122661 r3130722  
    692692        $options = get_option('time_sheets');
    693693
    694         if ($options['display_notes_toggle'] == 'all_except' || $options['display_notes_toggle'] == '') {
    695             $all_except = ' checked';
    696             $only_these = '';
     694        if (isset($options['display_notes_toggle'])) {
     695            if ($options['display_notes_toggle'] == 'all_except') {
     696                $all_except = ' checked';
     697                $only_these = '';
     698            } else {
     699                $all_except = '';
     700                $only_these = ' checked';
     701            }
    697702        } else {
    698703            $all_except = '';
    699704            $only_these = ' checked';
    700705        }
     706
    701707        echo "<input type='radio' name='time_sheets[display_notes_toggle]' value='all_except'{$all_except}> All users except... <BR>
    702708<input type='radio' name='time_sheets[display_notes_toggle]' value='only_these'{$only_these}> Only these users...";
     
    742748        $options = get_option('time_sheets');
    743749
    744         if (!isset($options['display_expenses_toggle'])) {
    745             $all_except = ' checked';
    746             $only_these = '';
     750        if (isset($options['display_expenses_toggle'])) {
     751            if ($options['display_expenses_toggle'] == 'all_except') {
     752                $all_except = ' checked';
     753                $only_these = '';
     754            } else {
     755                $all_except = '';
     756                $only_these = ' checked';
     757            }
    747758        } else {
    748759            $all_except = '';
    749             $only_these = ' checked';
     760            $only_these = '';
    750761        }
    751762        echo "<input type='radio' name='time_sheets[display_expenses_toggle]' value='all_except'{$all_except}> All users except... <BR>
     
    860871           
    861872                add_settings_section('time_sheets_display', __('Display Settings', ''), array(&$this, 'settings_header_display'), 'time_sheets');
    862                 add_settings_field('display_notes_toggle', __('Display notes fields to:', ''), array(&$this, 'display_notes_toggle'), 'time_sheets', 'time_sheets_display');
     873                add_settings_field('display_notes_toggle', __('Display daily notes fields to:', ''), array(&$this, 'display_notes_toggle'), 'time_sheets', 'time_sheets_display');
    863874                add_settings_field('display_notes_list', __('Notes To/Except list (based on prior setting):', ''), array(&$this, 'display_notes_list'), 'time_sheets', 'time_sheets_display');
    864875                add_settings_field('display_expenses_toggle', __('Display expenses fields to:', ''), array(&$this, 'display_expenses_toggle'), 'time_sheets', 'time_sheets_display');
  • time-sheets/trunk/time-sheets.php

    r3122661 r3130722  
    22/*
    33Plugin Name: Time Sheets
    4 Version: 2.1.0
     4Version: 2.1.1
    55Plugin URI: https://www.dcac.com/go/time-sheets
    66Description: Time Sheets application
Note: See TracChangeset for help on using the changeset viewer.