<commit_before><% -%>
<% @hours = ['12am', '1am', '2am', '3am', '4am', '5am', '6am', '7am', '8am', '9am', '10am', '11am', '12pm', '1pm', 
            '2pm', '3pm', '4pm', '5pm', '6pm', '7pm', '8pm', '9pm', '10pm', '11pm']
             -%>
<% entries = @entries[Date.civil(@year, @month, @day)] -%>
<% entries.sort!{|a,b| a.start_time <=> b.start_time} if entries and !entries.empty? -%>
<% entries.sort!{|a,b| a.end_time <=> b.end_time} if entries and !entries.empty? -%>
<%= javascript_include_tag 'jquery', 'jqModal' %>
<%= stylesheet_link_tag 'jqModal' %>
<script language="javascript">
  var $j = jQuery.noConflict();
  $j(document).ready(function() {
    $j('#calendar_modal').jqm({ajax: '@href', trigger: 'a.entry', toTop: true});
    if(<%= @admin %>) {
      $j('#calendar_modal_2').jqm({ajax: '@id', trigger: 'th.hour_header', toTop: true});
      $j('#calendar_modal_3').jqm({ajax: '@id', trigger: 'td.link_to_new', toTop: true});
    }
    // Close Button Highlighting. IE doesn\'t support :hover. Surprise?
    if($j.browser.msie) {
      $j('div.jqmClose')
      .hover(
        function(){ $j(this).addClass('jqmCloseHover'); },
        function(){ $j(this).removeClass('jqmCloseHover'); });
    }
  });
</script>
<div class="jqmWindow" id="calendar_modal" style="display:none;"></div>
<div class="jqmWindow" id="calendar_modal_2" style="display:none;"></div>
<div class="jqmWindow" id="calendar_modal_3" style="display:none;"></div>

<table class="cal">
  <tr>
    <td class="filler"><!-- style="background-color: #800000; border: none;"-->&nbsp;</td>
  </tr>
  <tr>
    <th style="border: none;"><%= @date.strftime('%A, %B') %> <%= @date.day %></th>
  </tr>  
</table>
<div class="day_scroll">
<table id="day_cal_table" class="day_cal" style="width:100%">
  <% @hours.each_with_index do |hour, i| %>
    <tr class="week_days top">
     <th class="hour_header" id="<%= home_path + new_simple_calendar_entry_path %>/<%= Date.new(@year, @month, @day) %>?mode=day&hour=<%= i %>">
        <%= hour %>
      </th>
      <% if entries and !entries.empty? -%>
        <% entries.each do |entry| -%>
          <% if entry.start_time.between?(some_time(@date, i, 00), some_time(@date, i, 29)) -%>
            <td id="entry_<%= entry.id %>" class="day_entry" rowspan="<%= entry.span %>" width="<%= (100 / entry.all_touching(entries).size) %>%" colspan="<%= 10 / entry.all_touching(entries).size %>">
              <% javascript_tag("$('entry_#{entry.id}').width = ($('day_cal_table').getWidth() - $('week_days_row').getWidth() - 5) / #{entry.all_touching(entries).size};") %>
              <%= entry.time %> - <%= entry.e_time %>
              <br clear="right" />
              <%= link_to entry.name, simple_calendar_entry_path(entry) + "?mode=#{@mode}", {:class => 'entry'} %>
              -
              <%= entry.detail %>
            </td>
          <% end -%>
        <% end -%>
      <% end -%>
      <td class="link_to_new" id="<%= home_path + new_simple_calendar_entry_path %>/<%= Date.new(@year, @month, @day) %>?mode=day&hour=<%= i %>" width="100%" colspan="11"></td>
    </tr>
    <tr class="week_days bottom">
      <th class="hour_header" id="<%= home_path + new_simple_calendar_entry_path %>/<%= Date.new(@year, @month, @day) %>?mode=day&hour=<%= i %>&mins=30">&nbsp;</th>
      <% if entries and !entries.empty? -%>
        <% entries.each do |entry| -%>
          <% if entry.start_time.between?(some_time(@date, i, 30), some_time(@date, i, 59)) -%>
            <td id="entry_<%= entry.id %>" class="day_entry" rowspan="<%= entry.span %>" width="<%= (100 / entry.all_touching(entries).size) %>%" colspan="<%= 10 / entry.all_touching(entries).size %>">
              <% javascript_tag("$('entry_#{entry.id}').width = ($('day_cal_table').getWidth() - $('day_cal_table').down(2).getWidth() - 5) / #{entry.all_touching(entries).size};") %>
              <%= entry.time %> - <%= entry.e_time %>
              <br />
              <%= link_to entry.name, simple_calendar_entry_path(entry) + "?mode=#{@mode}", {:class => 'entry'} %>
              -
              <%= entry.detail %>
            </td>
          <% end -%>
        <% end -%>
      <% end -%>
      <td class="link_to_new" id="<%= home_path + new_simple_calendar_entry_path %>/<%= Date.new(@year, @month, @day) %>?mode=day&hour=<%= i %>&mins=30" width="100%" colspan="11"></td>
    </tr>
  <% end %>
</table>
</div><commit_msg>use floating divs instead of spanning tables<commit_after><% -%>
<% @hours = ['12am', '1am', '2am', '3am', '4am', '5am', '6am', '7am', '8am', '9am', '10am', '11am', '12pm', '1pm', 
            '2pm', '3pm', '4pm', '5pm', '6pm', '7pm', '8pm', '9pm', '10pm', '11pm']
             -%>
<% entries = @entries[Date.civil(@year, @month, @day)] -%>
<% entries.sort!{|a,b| a.start_time <=> b.start_time} if entries and !entries.empty? -%>
<%= javascript_include_tag 'jquery', 'jqModal' %>
<%= stylesheet_link_tag 'jqModal' %>
<script language="javascript">
  var $j = jQuery.noConflict();
  $j(document).ready(function() {
    $j('#calendar_modal').jqm({ajax: '@href', trigger: 'a.entry', toTop: true});
    if(<%= @admin %>) {
      $j('#calendar_modal_2').jqm({ajax: '@id', trigger: 'th.hour_header', toTop: true});
      $j('#calendar_modal_3').jqm({ajax: '@id', trigger: 'td.link_to_new', toTop: true});
    }
    // Close Button Highlighting. IE doesn\'t support :hover. Surprise?
    if($j.browser.msie) {
      $j('div.jqmClose')
      .hover(
        function(){ $j(this).addClass('jqmCloseHover'); },
        function(){ $j(this).removeClass('jqmCloseHover'); });
    }
  });
</script>
<div class="jqmWindow" id="calendar_modal" style="display:none;"></div>
<div class="jqmWindow" id="calendar_modal_2" style="display:none;"></div>
<div class="jqmWindow" id="calendar_modal_3" style="display:none;"></div>

<table class="cal">
  <tr>
    <td class="filler">&nbsp;</td>
  </tr>
  <tr>
    <th style="border: none;"><%= @date.strftime('%A, %B') %> <%= @date.day %></th>
  </tr>  
</table>
<div class="day_scroll">
  <table id="day_cal_table" class="day_cal" style="width:100%">
    <% @hours.each_with_index do |hour, i| %>
      <tr class="week_days top" <%= "style=\"height: 29pt\"" if request.env["HTTP_USER_AGENT"] =~ /msie/i %>>
       <th class="hour_header" id="<%= home_path + new_simple_calendar_entry_path %>/<%= Date.new(@year, @month, @day) %>?mode=day&hour=<%= i %>">
          <%= hour %>
        </th>
        <td class="link_to_new" id="<%= home_path + new_simple_calendar_entry_path %>/<%= Date.new(@year, @month, @day) %>?mode=day&hour=<%= i %>" width="100%"></td>
      </tr>
      <tr class="week_days bottom" <%= "style=\"height: 29pt\"" if request.env["HTTP_USER_AGENT"] =~ /msie/i %>>
        <th class="hour_header" id="<%= home_path + new_simple_calendar_entry_path %>/<%= Date.new(@year, @month, @day) %>?mode=day&hour=<%= i %>&mins=30">&nbsp;</th>
        <td class="link_to_new" id="<%= home_path + new_simple_calendar_entry_path %>/<%= Date.new(@year, @month, @day) %>?mode=day&hour=<%= i %>&mins=30" width="100%"></td>
      </tr>
    <% end %>
  </table>
  <% if entries and !entries.empty? -%>
    <% entries.each do |entry| -%>
      <% logger.error "Entry: #{entry.name}" %>
      <% logger.error "ALL TOUCHING: #{entry.all_touching(entries).map{|e| [e.name, e.id] }}" %>
      <% logger.error "Total Time: #{entry.total_time_minutes}\n\n" %>
      <div id="entry_<%= entry.id %>" class="day_entry" 
           style="display: block; 
                  top: <%= entry.top %>pt;
                  height: <%= entry.height %>pt;
                  width: <%= entry.width(@day, @month, @year) %>%;
                  left: <%= entry.left(@day, @month, @year) %>%;"> 

        <%= entry.time %> - <%= entry.e_time %>
        <br clear="right" />
        <%= link_to entry.name, simple_calendar_entry_path(entry) + "?mode=#{@mode}", {:class => 'entry'} %>
        -
        <%= entry.detail %>
      </div>
    <% end -%>
  <% end -%>
</div>
{'fraction_non_alphanumeric': 0.2472417251755266, 'fraction_numerical': 0.016173520561685056, 'mean_word_length': 3.3805601317957166, 'pattern_counts': {'":': 0, '<': 181, '<?xml version=': 0, '>': 184, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '744926', 'n_tokens_mistral': 3184, 'n_tokens_neox': 2922, 'n_words': 531}