adding container around the dates in the event slider
authorAnthony Talarico <talarico@gaslightmedia.com>
Fri, 8 Feb 2019 15:34:46 +0000 (10:34 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Fri, 8 Feb 2019 15:34:46 +0000 (10:34 -0500)
glm-member-db-events/views/front/events/eventsFeed.html

index 6df8954..9e8d125 100644 (file)
     
                 <p class="event-intro-text">{$event.intro}</p>
             </div>
-            
-             {foreach from=$event.times key=myId item=i name=time}
-                {if $smarty.foreach.time.first}
-                  
-                    <span class="front-event-date">{$i.start_time.timestamp|date_format:"%B %e"}</span>
-                    {assign var=first value=$i.start_time.timestamp}
+            <span class="front-event-date-container">
+                {foreach from=$event.times key=myId item=i name=time}
+                    {if $smarty.foreach.time.first}
                     
-                {/if}
-                {if $smarty.foreach.time.last}
-                    {if $first != $i.start_time.timestamp}
-                       <span class="front-event-date"> - {$i.start_time.timestamp|date_format:"%B %e"} </span>
+                        <span class="front-event-date">{$i.start_time.timestamp|date_format:"%B %e"}</span>
+                        {assign var=first value=$i.start_time.timestamp}
+                        
                     {/if}
-                {/if}
-             {/foreach}
+                    {if $smarty.foreach.time.last}
+                        {if $first != $i.start_time.timestamp}
+                        <span class="front-event-date"> - {$i.start_time.timestamp|date_format:"%B %e"} </span>
+                        {/if}
+                    {/if}
+                {/foreach}
+             </span>
               <a class="front-event-button" href="{$siteBaseUrl}event-detail/{$event.name_slug}/">MORE</a>
             <div class="event-border"></div>
         </div>
                     currentDiv,
                     topPosition = 0;
                     $(container).each(function() {
-                       console.log( $(this) );                 
-                    $el = $(this);
-                    $($el).height('auto'); 
-                    topPosition = $el.position().top;
-                    if (currentRowStart != topPosition) {
+       
+                        $el = $(this);
+                        $($el).height('auto'); 
+                        topPosition = $el.position().top;
+                        if (currentRowStart != topPosition) {
+                            for (currentDiv = 0 ; currentDiv < rowDivs.length ; currentDiv++) {
+                            rowDivs[currentDiv].height(currentTallest);
+
+                            }
+                            rowDivs.length = 0; // empty the array
+                            currentRowStart = topPosition;
+                            currentTallest = $el.height();
+        
+                            rowDivs.push($el);
+                        } else {
+                            rowDivs.push($el);
+                            currentTallest = (currentTallest < $el.height()) ? ($el.height()) : (currentTallest);
+                        }
+        
                         for (currentDiv = 0 ; currentDiv < rowDivs.length ; currentDiv++) {
-                        rowDivs[currentDiv].height(currentTallest);
-                       console.log(currentTallest);
+                            rowDivs[currentDiv].height(currentTallest);
                         }
-                        rowDivs.length = 0; // empty the array
-                        currentRowStart = topPosition;
-                        currentTallest = $el.height();
-    
-                        rowDivs.push($el);
-                    } else {
-                        rowDivs.push($el);
-                        currentTallest = (currentTallest < $el.height()) ? ($el.height()) : (currentTallest);
-                    }
-    
-                    for (currentDiv = 0 ; currentDiv < rowDivs.length ; currentDiv++) {
-                        rowDivs[currentDiv].height(currentTallest);
-                    }
                     });
                 }
              equalheight( $('.event.feed-block .event-title-intro') );