2019-09-28 11:48:59 +00:00
|
|
|
<h3 title="CKEDITOR現有字形">CKEDITOR現有字形</h3>
|
|
|
|
<%=form_for @field,:url=>{:controller=>"patchfiles" ,:action=>"newfont"} do |f|%>
|
2019-09-28 15:38:15 +00:00
|
|
|
<div style="padding-left:1em">
|
|
|
|
<%= f.fields_for :font_array do |fontfield|%>
|
|
|
|
<% @arr = @field.font_array.keys %>
|
|
|
|
<% for @i in @arr %>
|
|
|
|
<div style="float:left;">
|
|
|
|
<% if @field.font_array[@i.to_s].values.first == true%>
|
|
|
|
<%=fontfield.check_box @field.font_array[@i.to_s].keys.first,{:checked=>true,:id=>"checkbox"+@i.to_s,:style=>"float:left;"} %>
|
|
|
|
<% else %>
|
|
|
|
<%=fontfield.check_box @field.font_array[@i.to_s].keys.first,{:id=>"checkbox"+@i.to_s,:style=>"float:left;"} %>
|
|
|
|
<% end %>
|
|
|
|
<%=fontfield.label @field.font_array[@i.to_s].keys.first,{:for=>"checkbox"+@i.to_s,:style=>"float:right;"}%>
|
|
|
|
</div>
|
|
|
|
<%end%>
|
2019-09-28 11:48:59 +00:00
|
|
|
<%end%>
|
2019-09-28 15:38:15 +00:00
|
|
|
</div>
|
|
|
|
<div style="clear:both;"></div>
|
|
|
|
<div style="padding-left:1em"><label for="newfont" style="float:left;"><%=t(:newfont)%>:</label><%=f.text_field :new_add_font,{:id=>"newfont",:placeholder=>t(:newfont)}%></div>
|
|
|
|
<%=f.submit "#{t(:updatefont)}",{:id=>"submitbtn"}%>
|
|
|
|
<button id="initialbtn"><%= (I18n.locale.to_s == "zh_tw") ? "點擊來恢復初始狀態" : "click to recovery initial state" %></button>
|
|
|
|
<%=f.text_field :initial_btn, {:id=>"hidden-initial",:type => "hidden",:value=>"false"} %>
|
2019-09-28 11:48:59 +00:00
|
|
|
<%end%>
|
|
|
|
|
|
|
|
<style type="text/css">
|
|
|
|
.show_li,.show_li *{
|
|
|
|
list-style:none;
|
|
|
|
color:black;
|
|
|
|
}
|
|
|
|
.show_li ul{
|
|
|
|
display:none;
|
|
|
|
}
|
|
|
|
#clicktosee{
|
|
|
|
color:blue;
|
|
|
|
cursor:pointer;
|
|
|
|
}
|
2019-09-28 15:38:15 +00:00
|
|
|
</style>
|
|
|
|
<script>
|
|
|
|
$("#initialbtn").off("click").on("click",function(){
|
|
|
|
$("#hidden-initial").val("true");
|
|
|
|
$("#submitbtn").click();
|
|
|
|
});
|
|
|
|
|
|
|
|
</script>
|