AutoCommit Don Jul 2 13:03:01 CEST 2015

This commit is contained in:
Andreas Stephanides
2015-07-02 13:03:01 +02:00
parent 7e5e8ea688
commit 783ba0d030
4 changed files with 4 additions and 5 deletions

View File

@@ -115,6 +115,7 @@ class BeispieleController < ApplicationController
respond_to do |format|
if @beispiel.update_attributes(params[:beispiel])
format.html { redirect_to @backlink, notice: 'Beispiel was successfully updated.' }
format.js {render action: "show"}
format.json { head :no_content }
else
format.html { render action: "edit" }

View File

@@ -1,2 +1 @@
alert("<%=@beispiel.divid%>");
$("<%= '#' + @beispiel.divid %>").replaceWith("<%= escape_javascript render @beispiel %>");

View File

@@ -1,10 +1,10 @@
<div id="<%= beispiel.divid %>" class="contentbox">
<%= semantic_form_for @beispiel, :html => { :multipart => true } do |f| %>
<%= semantic_form_for @beispiel, :html => { :multipart => true }, :remote=>true do |f| %>
<div class="row-fluid">
<div class="span5" >
<%= f.input :name, label: false %> <%=f.input :datum , :as => :datetimepicker, :label=> false %>
<%= f.input :name, label: false %> <%=f.input :datum , :as => :string, :label=> false %>
<%= f.input :desc, label: false %>
<b><%link_to ffi1_icon("note20")+" " + beispiel_form.name + " " + I18n.l(beispiel_form.datum), beispiel_form.beispieldatei.url, title: beispiel_form.desc %></b>
</div>

View File

@@ -1,2 +1 @@
alert("<%=@beispiel.divid%>");
$("<%= '#' + @beispiel.divid %>").replaceWith("<%= escape_javascript render(partial: "beispiele/beispiel_form", object: @beispiel, locals: {:beispiel=> @beispiel}) %>")