store table用div重构

This commit is contained in:
yanxd 2014-03-14 17:29:45 +08:00
parent daed8a1164
commit 6cbd0f874c
2 changed files with 58 additions and 32 deletions

View File

@ -8,28 +8,33 @@
<p> <p>
<%= @str_arr.shift %> <%= @str_arr.shift %>
</p> </p>
<table style="width: 100%">
<thead> <div class="table1">
<tr> <div class='table_row1'>
<td><%=l(:label_attachment)%></td> <div class='table_cell1 filename1' style='text-align: center;'><%=l(:label_attachment)%></div>
<td><%=l(:field_downloads)%></td> <div class='table_cell1 filedown1'><%=l(:field_downloads)%></div>
<td><%=l(:button_download)%></td> <div class='table_cell1 downicon1'><%=l(:button_download)%></div>
</tr> </div>
</thead> </div>
<tbody>
<% k.each do |c1|%> <div class="table1">
<tr class="<%= cycle 'odd', 'even' %>"> <% k.each do |c1|%>
<td class="filename" style="width:62%;"><%= link_to c1.filename, (attachFromUrl c1), {:title => c1.filename, :target => "_blank"} %> </td> <div class="table_row1 <%= cycle 'odd', 'even' %>">
<td style="width:19%; text-align: center;"><%= c1.downloads %> </td> <div class="filename table_cell1 filename1" >
<td class="filename download_icon" style="width:19%; text-align: center;"> <%= link_to c1.filename, (attachFromUrl c1), {:title => c1.filename, :target => "_blank"} %>
<%= link_to_attachment c1, {:download => true, :text => image_tag("/images/button/download.png", width: "22px", alt: l(:button_download)) }%> </div>
</td> <div class="table_cell1 filedown1">
</tr> <%= c1.downloads %>
<% end %> </div>
</tbody> <div class="table_cell1 downicon1 filename download_icon" >
</table> <%= link_to_attachment c1, {:download => true, :text => image_tag("/images/button/download.png", width: "22px", alt: l(:button_download)) }%>
</div>
</div>
<% end -%>
</div>
</div> </div>
<% reset_cycle; end %> <% end; reset_cycle %>
</div> </div>
<script type='text/javascript'> <script type='text/javascript'>
function validate_required(field,alerttxt) function validate_required(field,alerttxt)

View File

@ -458,23 +458,44 @@ table.content-text-list tbody tr td.locked, div.memo-section .locked{
.resource_sum, .line_blo{ .resource_sum, .line_blo{
border: 1px solid #eeeeee; border: 1px solid #eeeeee;
} }
.line_block table{
border: 1px solid #eeeeee;
}
.line_block table thead tr{
/*background-color: #d1d1d1;*/
text-align: center;
}
.line_block table td{
height: 2em;
}
.filename { .filename {
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
max-width: 247px; max-width: 247px;
} }
.line_block .table1{
display: table;
width: 100%;
border-left: 1px solid #eeeeee;
border-right: 1px solid #eeeeee;
border-bottom: 1px solid #eeeeee;
}
.line_block .table_row1{
height: 38px;
display: table-row;
width: 100%;
}
.line_block .table_cell1{
display: table-cell;
padding: 2px;
border: 1px solid #FFFFFF;
vertical-align: middle;
}
.line_block .filename1{
width: 62%;
padding-left: 8px;
}
.line_block .filedown1{
width: 19%;
text-align: center;
}
.line_block .downicon1{
width: 19%;
text-align: center;
}
.blue-color, .blue-color a{ .blue-color, .blue-color a{
color: rgb(109,153,178); color: rgb(109,153,178);
} }