forked from saurabh/orbit4-5
52 lines
1.6 KiB
Plaintext
52 lines
1.6 KiB
Plaintext
<%#= form_for @part, url: {action: "update"} do |f| %>
|
|
<%#= f.hidden_field :page_part_id, value: @part.id.to_s %>
|
|
<%#= render :partial => "form", :locals => { :f => f } %>
|
|
<%# end %>
|
|
<% content_for :page_specific_css do %>
|
|
<%= stylesheet_link_tag "lib/main-forms" %>
|
|
<% end %>
|
|
<%= form_for @part, url: {action: "update"}, :remote=>true, html: { class: "form-horizontal main-forms"} do |f| %>
|
|
<%= f.hidden_field :page_part_id, value: @part.id.to_s %>
|
|
<%= render :partial => "form", :locals => { :f => f } %>
|
|
<% end %>
|
|
|
|
<script>
|
|
$('.btn-group input[type="radio"]').each(function(index, el) {
|
|
if($(this).prop('checked')) {
|
|
$(this).closest('label').addClass('active');
|
|
$("#" + $(this).val()).addClass('active');
|
|
}
|
|
});
|
|
|
|
$('.btn-group').on("click", 'label', function(event) {
|
|
$(this).find('input').prop('checked', true);
|
|
event.preventDefault();
|
|
});
|
|
|
|
$("#public_r_tag").on("change", "#tag_list select", function() {
|
|
$.getScript($(this).attr('rel') + '?type=' + $(this).val() + "&id=" + "<%= @part.id %>" );
|
|
});
|
|
</script>
|
|
<script>
|
|
function toggleChecked(status) {
|
|
$(".checkbox").each( function() {
|
|
$(this).attr("checked",status);
|
|
})
|
|
}
|
|
</script>
|
|
<script type="text/javascript">
|
|
// $("select.module_name").on("change",function(){
|
|
// var select = $(this);
|
|
// if(select.val()){
|
|
// $.ajax({
|
|
// url : "/page_parts/getwidgets",
|
|
// dataType : "html",
|
|
// data : {"module" : select.val(),"number_of_select" : select.data("number").replace("pp_","")},
|
|
// type : "get"
|
|
// }).done(function(html){
|
|
// $("span[for=" + select.data("number") + "]").html(html);
|
|
// })
|
|
// }
|
|
// })
|
|
|
|
</script> |