[Hastymail-cvs] SF.net SVN: hastymail:[1314] trunk/hastymail2
Brought to you by:
sailfrog,
slushpupie
From: <sai...@us...> - 2010-01-20 14:19:17
|
Revision: 1314 http://hastymail.svn.sourceforge.net/hastymail/?rev=1314&view=rev Author: sailfrog Date: 2010-01-20 14:18:44 +0000 (Wed, 20 Jan 2010) Log Message: ----------- updates to how the order of fields in message lists are defined Modified Paths: -------------- trunk/hastymail2/index.php trunk/hastymail2/lib/site_page_class.php trunk/hastymail2/lib/url_action_classes/new.php trunk/hastymail2/lib/url_action_classes/search.php trunk/hastymail2/themes/albook_sepia/templates/mailbox.php trunk/hastymail2/themes/albook_sepia/templates/thread_view.php trunk/hastymail2/themes/buuf/templates/mailbox.php trunk/hastymail2/themes/buuf/templates/thread_view.php trunk/hastymail2/themes/default/templates/mailbox.php trunk/hastymail2/themes/default/templates/thread_view.php Modified: trunk/hastymail2/index.php =================================================================== --- trunk/hastymail2/index.php 2010-01-20 12:06:31 UTC (rev 1313) +++ trunk/hastymail2/index.php 2010-01-20 14:18:44 UTC (rev 1314) @@ -391,6 +391,15 @@ 'expunge' => 68, ); +/* message list field order */ +$msg_list_flds = array( + 'indicators_cell', + 'subject_cell', + 'from_cell', + 'date_cell', + 'size_cell', +); + /* contact list per page count on the compose page */ $contacts_per_page = 20; Modified: trunk/hastymail2/lib/site_page_class.php =================================================================== --- trunk/hastymail2/lib/site_page_class.php 2010-01-20 12:06:31 UTC (rev 1313) +++ trunk/hastymail2/lib/site_page_class.php 2010-01-20 14:18:44 UTC (rev 1314) @@ -833,7 +833,7 @@ } return $data; } -function print_mailbox_list($cols=array('checkbox_cell', 'indicators_cell', 'subject_cell', 'from_cell', 'date_cell', 'size_cell'), $onclick=false) { +function print_mailbox_list($cols, $onclick=false) { $data = $this->print_mailbox_list_rows($cols, $this->pd['header_list'], $onclick, $this->pd['mailbox']); $_SESSION['toggle_all'] = false; $_SESSION['toggle_uids'] = array(); @@ -1049,6 +1049,7 @@ $date_cell = $c_start.'<td '.$js.' class="'.$xtra_class.$class_prefix.'date" >'. $c_end.print_time2($vals['date'], $date_format, $date_format_2).$td_end.$s_start.'<br /><br />'.$s_end; $size_cell = $c_start.'<td '.$js.' class="'.$xtra_class.$class_prefix.'size">'.format_size($vals['size']/1024).'</td>'.$c_end; + $data .= $checkbox_cell; foreach ($cols as $v) { if (isset($$v)) { $data .= $$v; Modified: trunk/hastymail2/lib/url_action_classes/new.php =================================================================== --- trunk/hastymail2/lib/url_action_classes/new.php 2010-01-20 12:06:31 UTC (rev 1313) +++ trunk/hastymail2/lib/url_action_classes/new.php 2010-01-20 14:18:44 UTC (rev 1314) @@ -77,7 +77,8 @@ } class site_page_new extends site_page { -function print_new_content($cols=array('checkbox_cell', 'subject_cell', 'indicators_cell', 'from_cell', 'date_cell', 'size_cell'), $onclick=false) { +function print_new_content($onclick=false) { + global $msg_list_flds; global $page_id; $n = 1; $data = ''; @@ -93,9 +94,7 @@ $data .= '<complex-'.$page_id.'><table class="unread_mailbox_table" cellpadding="0" cellspacing="0" width="100%">'; $data .= '<tr><th><input onclick="toggle_all(); return false;" '. 'id="toggle_all_button" type="submit" name="toggle_all_button" value="X" /></th>'; - $header_cols = $cols; - array_shift($header_cols); - $data .= $this->print_mailbox_list_headers($header_cols); + $data .= $this->print_mailbox_list_headers($msg_list_flds); $data .= '</tr></complex-'.$page_id.'>'; foreach ($this->pd['new_page_data'] as $i => $array) { if (!isset($this->pd['folders'][$i]) || !isset($this->pd['folders'][$i]['basename'])) { @@ -123,7 +122,7 @@ } $data .= '</td></tr></complex-'.$page_id.'>'; if (!empty($array['headers'])) { - $data .= $this->print_mailbox_list_rows($cols, $array['headers'], $onclick, $i, $n); + $data .= $this->print_mailbox_list_rows($msg_list_flds, $array['headers'], $onclick, $i, $n); $n += count($array['headers']); } else { Modified: trunk/hastymail2/lib/url_action_classes/search.php =================================================================== --- trunk/hastymail2/lib/url_action_classes/search.php 2010-01-20 12:06:31 UTC (rev 1313) +++ trunk/hastymail2/lib/url_action_classes/search.php 2010-01-20 14:18:44 UTC (rev 1314) @@ -120,7 +120,8 @@ } class site_page_search extends site_page { -function print_search_res($cols=array('checkbox_cell', 'subject_cell', 'indicators_cell', 'from_cell', 'date_cell', 'size_cell'), $onclick=false) { +function print_search_res($onclick=false) { + global $msg_list_flds; $n = 1; $data = '<div id="search_page_inner">'; $empty = true; @@ -133,9 +134,7 @@ if (!$empty) { $data .= '<table class="search_res_table" cellpadding="0" cellspacing="0" width="100%"><tr><th> <input onclick="toggle_all(); return false;" id="toggle_all_button" type="submit" name="toggle_all_button" value="X" /></th>'; - $header_cols = $cols; - array_shift($header_cols); - $data .= $this->print_mailbox_list_headers($header_cols).'</tr>'; + $data .= $this->print_mailbox_list_headers($msg_list_flds).'</tr>'; foreach ($this->pd['search_results'] as $i => $array) { if (!isset($array['total'])) { $array['total'] = 0; @@ -143,7 +142,7 @@ $data .= '<tr><td colspan="6"><h4>'.$array['total'].'  <a title="'.$this->user->htmlsafe($i, 0, 0, 1).'" href="?page=mailbox&mailbox='.urlencode($i).'">'. $this->user->htmlsafe($this->pd['folders'][$i]['basename'], 0, 0, 1).'</a></h4></td></tr>'; if (!empty($array['headers'])) { - $data .= $this->print_mailbox_list_rows($cols, $array['headers'], $onclick, $i, $n); + $data .= $this->print_mailbox_list_rows($msg_list_flds, $array['headers'], $onclick, $i, $n); $n += count($array['headers']); } else { Modified: trunk/hastymail2/themes/albook_sepia/templates/mailbox.php =================================================================== --- trunk/hastymail2/themes/albook_sepia/templates/mailbox.php 2010-01-20 12:06:31 UTC (rev 1313) +++ trunk/hastymail2/themes/albook_sepia/templates/mailbox.php 2010-01-20 14:18:44 UTC (rev 1314) @@ -26,6 +26,7 @@ exit; } global $sticky_url; +global $msg_list_flds; ?> @@ -73,13 +74,13 @@ '" /><input onclick="toggle_all(); return false;" id="toggle_all_button" type="submit" name="toggle_all_button" value="X" /> </complex-'.$page_id.'>' ?> </th> - <?php echo $pd->print_mailbox_list_headers(array('subject_cell', 'indicators_cell', 'from_cell', 'date_cell', 'size_cell')) ?> + <?php echo $pd->print_mailbox_list_headers($msg_list_flds) ?> </tr> <!-- mailbox table rows --> - <?php echo $pd->print_mailbox_list(array('checkbox_cell', 'subject_cell', 'indicators_cell', 'from_cell', 'date_cell', 'size_cell')) ?> + <?php echo $pd->print_mailbox_list($msg_list_flds) ?> </table> </div> <div class="message_controls2"> Modified: trunk/hastymail2/themes/albook_sepia/templates/thread_view.php =================================================================== --- trunk/hastymail2/themes/albook_sepia/templates/thread_view.php 2010-01-20 12:06:31 UTC (rev 1313) +++ trunk/hastymail2/themes/albook_sepia/templates/thread_view.php 2010-01-20 14:18:44 UTC (rev 1314) @@ -26,6 +26,7 @@ exit; } global $sticky_url; +global $msg_list_flds; ?> @@ -50,9 +51,9 @@ 'page=thread_view&mailbox_page=1&sort_by='.$pd->pd['sort_by'].'&mailbox='. urlencode($pd->pd['mailbox']).'&toggle_all=1">X</a>' ?> </th> - <th><?php echo $pd->print_mailbox_list_headers(array('subject_cell', 'indicators_cell', 'from_cell', 'date_cell', 'size_cell')) ?> + <th><?php echo $pd->print_mailbox_list_headers($msg_list_flds) ?> </tr> - <?php echo $pd->print_mailbox_list(array('checkbox_cell', 'subject_cell', 'indicators_cell', 'from_cell', 'date_cell', 'size_cell')) ?> + <?php echo $pd->print_mailbox_list($msg_list_flds) ?> </table> </div> </form> Modified: trunk/hastymail2/themes/buuf/templates/mailbox.php =================================================================== --- trunk/hastymail2/themes/buuf/templates/mailbox.php 2010-01-20 12:06:31 UTC (rev 1313) +++ trunk/hastymail2/themes/buuf/templates/mailbox.php 2010-01-20 14:18:44 UTC (rev 1314) @@ -26,6 +26,7 @@ exit; } global $sticky_url; +global $msg_list_flds; ?> @@ -74,13 +75,13 @@ '" /><input onclick="toggle_all(); return false;" id="toggle_all_button" type="submit" name="toggle_all_button" value="X" /> </complex-'.$page_id.'>' ?> </th> - <?php echo $pd->print_mailbox_list_headers(array('subject_cell', 'indicators_cell', 'from_cell', 'date_cell', 'size_cell')) ?> + <?php echo $pd->print_mailbox_list_headers($msg_list_flds) ?> </tr> <!-- mailbox table rows --> - <?php echo $pd->print_mailbox_list(array('checkbox_cell', 'subject_cell', 'indicators_cell', 'from_cell', 'date_cell', 'size_cell')) ?> + <?php echo $pd->print_mailbox_list($msg_list_flds) ?> </table> </div> <div class="message_controls2"> Modified: trunk/hastymail2/themes/buuf/templates/thread_view.php =================================================================== --- trunk/hastymail2/themes/buuf/templates/thread_view.php 2010-01-20 12:06:31 UTC (rev 1313) +++ trunk/hastymail2/themes/buuf/templates/thread_view.php 2010-01-20 14:18:44 UTC (rev 1314) @@ -26,6 +26,7 @@ exit; } global $sticky_url; +global $msg_list_flds; ?> @@ -49,9 +50,9 @@ $pd->pd['thread_count'].'" /><a onclick="toggle_all(); return false;" style="padding-left: 12px;" href="?'. 'page=thread_view&mailbox_page=1&sort_by='.$pd->pd['sort_by'].'&mailbox='. urlencode($pd->pd['mailbox']).'&toggle_all=1">X</a>' ?> - </th><?php echo $pd->print_mailbox_list_headers(array('subject_cell', 'indicators_cell', 'from_cell', 'date_cell', 'size_cell')) ?> + </th><?php echo $pd->print_mailbox_list_headers($msg_list_flds) ?> </tr> - <?php echo $pd->print_mailbox_list(array('checkbox_cell', 'subject_cell', 'indicators_cell', 'from_cell', 'date_cell', 'size_cell')) ?> + <?php echo $pd->print_mailbox_list($msg_list_flds) ?> </table> </div> </form> Modified: trunk/hastymail2/themes/default/templates/mailbox.php =================================================================== --- trunk/hastymail2/themes/default/templates/mailbox.php 2010-01-20 12:06:31 UTC (rev 1313) +++ trunk/hastymail2/themes/default/templates/mailbox.php 2010-01-20 14:18:44 UTC (rev 1314) @@ -27,6 +27,7 @@ } global $sticky_url; global $page_id; +global $msg_list_flds; ?> @@ -77,14 +78,14 @@ <th class="mailbox_header_left"><?php echo '<input type="hidden" id="page_count" name="page_count" value="'.$pd->pd['page_count']. '" /><input onclick="toggle_all(); return false;" id="toggle_all_button" type="submit" name="toggle_all_button" value="X" />'; ?> </th> - <?php echo $pd->print_mailbox_list_headers(array('subject_cell', 'indicators_cell', 'from_cell', 'date_cell', 'size_cell')) ?> + <?php echo $pd->print_mailbox_list_headers($msg_list_flds) ?> </tr> <!-- mailbox table rows --> <?php echo '</complex-'.$page_id.'><simple-'.$page_id.'><br /></simple-'.$page_id.'> - '.$pd->print_mailbox_list(array('checkbox_cell', 'subject_cell', 'indicators_cell', 'from_cell', 'date_cell', 'size_cell')). + '.$pd->print_mailbox_list($msg_list_flds). '<complex-'.$page_id.'>'; ?> </table> <?php echo '</complex-'.$page_id.'>'; ?> Modified: trunk/hastymail2/themes/default/templates/thread_view.php =================================================================== --- trunk/hastymail2/themes/default/templates/thread_view.php 2010-01-20 12:06:31 UTC (rev 1313) +++ trunk/hastymail2/themes/default/templates/thread_view.php 2010-01-20 14:18:44 UTC (rev 1314) @@ -26,6 +26,7 @@ exit; } global $sticky_url; +global $msg_list_flds; ?> @@ -50,9 +51,9 @@ 'page=thread_view&mailbox_page=1&sort_by='.$pd->pd['sort_by'].'&mailbox='. urlencode($pd->pd['mailbox']).'&toggle_all=1">X</a>' ?> </th> - <?php echo $pd->print_mailbox_list_headers(array('subject_cell', 'indicators_cell', 'from_cell', 'date_cell', 'size_cell')) ?> + <?php echo $pd->print_mailbox_list_headers($msg_list_flds) ?> </tr> - <?php echo $pd->print_mailbox_list(array('checkbox_cell', 'subject_cell', 'indicators_cell', 'from_cell', 'date_cell', 'size_cell')) ?> + <?php echo $pd->print_mailbox_list($msg_list_flds) ?> </table> </div> </form> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |