46 lines
1.4 KiB
Plaintext
46 lines
1.4 KiB
Plaintext
<div style="clear:both;"></div>
|
|
<% @i = 0 %>
|
|
<%=form_for @file_to_show ,:url=>{:controller=>"patchfiles" ,:action=>"edit"} do |file|%>
|
|
<%= file.fields_for :file_show do |filefield|%>
|
|
<% @file_to_show.file_show.each do |show| %>
|
|
<%if show[1] == 1%>
|
|
<%=filefield.check_box "file_show"+@i.to_s,{:checked=>true,:id=>"checkbox"+@i.to_s,:style=>"float:left;"}%>
|
|
<%else%>
|
|
<%=filefield.check_box "file_show"+@i.to_s,{:checked=>false,:id=>"checkbox"+@i.to_s,:style=>"float:left;"}%>
|
|
<%end%>
|
|
<% @i = @i+1 %>
|
|
<%=show[0]%>
|
|
<div style="clear:both;"></div>
|
|
<%end%>
|
|
<%end%>
|
|
<%=file.submit "#{t(:updatefont)}"%>
|
|
<%end%>
|
|
<li id ="ckeditorFont" class="show_li">
|
|
<a title="CKEDITOR現有字形">CKEDITOR現有字形</a>
|
|
<% @ckicktosee_str = (I18n.locale.to_s == "en") ? "click me to see all font which CKEDITOR have now" : "點擊我來查看編輯器所有目前擁有的字形" %>
|
|
<a id="clicktosee" title="<%= @ckicktosee_str %>" class="Toggleclass"><%= @ckicktosee_str %></a>
|
|
<ul>
|
|
<% @font_array.each do |font|%>
|
|
<li><a title="<%= font %>"><%= font %></a></li>
|
|
<%end%>
|
|
</ul>
|
|
</li>
|
|
<a></a>
|
|
<style type="text/css">
|
|
.show_li,.show_li *{
|
|
list-style:none;
|
|
color:balck;
|
|
}
|
|
.show_li ul{
|
|
display:none;
|
|
}
|
|
#clicktosee{
|
|
color:blue;
|
|
cursor:pointer;
|
|
}
|
|
</style>
|
|
<script>
|
|
$('.Toggleclass').off("click").on("click",function(){
|
|
$(this).parent().find(">ul").slideToggle();
|
|
});
|
|
</script> |