Updating the days of the week.
authorSteve Sutton <steve@gaslightmedia.com>
Fri, 21 Apr 2017 19:18:29 +0000 (15:18 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Mon, 24 Apr 2017 15:59:24 +0000 (11:59 -0400)
Need to shorten them so they don't overlap the title.
Also updated the width of the dates and title.

models/front/events/list.php

index 50ba325..e6d39e5 100644 (file)
@@ -26,14 +26,14 @@ class GlmMembersFront_events_list extends GlmMembersFront_events_baseAction
     const PDF_BOTTOM_Y   = 80;
     const LINE_HEIGHT    = 10;
     const PDF_WIDTH      = 570;
-    const DATE_WIDTH     = 290;
-    const TITLE_WIDTH    = 250;
+    const DATE_WIDTH     = 300;
+    const TITLE_WIDTH    = 230;
     const PDF_FONT_SIZE  = 8;
     const PDF_LOGO_SCALE = 1.45;
     const PDF_LOGO_X     = 20;
     const PDF_LOGO_Y     = 760;
     const PDF_LFT_COL_X  = 20;
-    const PDF_RGT_COL_X  = 300;
+    const PDF_RGT_COL_X  = 320;
 
     private $pages = array();
     /**
@@ -430,7 +430,11 @@ class GlmMembersFront_events_list extends GlmMembersFront_events_baseAction
                         if ( count($rec['day_of_week']['names']) < 7 && count($rec['day_of_week']['names']) > 0 ) {
                             $eventDates .= " ( ";
                             foreach ( $rec['day_of_week']['names'] as $day ) {
-                                $eventDates .= substr( $day, 0, 3 ) . ' ';
+                                if ( in_array( $day, array( 'Saturday', 'Tuesday', 'Thursday', 'Sunday' ) ) ) {
+                                    $eventDates .= substr( $day, 0, 2 ) . ' ';
+                                } else {
+                                    $eventDates .= substr( $day, 0, 1 ) . ' ';
+                                }
                             }
                             $eventDates .= ")";
                         }