Sha256: 29d18971735e79a58fa38843d20867177d33583a8d0898686a6b7ddff832a33a
Contents?: true
Size: 692 Bytes
Versions: 9
Compression:
Stored size: 692 Bytes
Contents
//= require jquery //= require jquery.ui.datepicker $ -> $("input[name='posted_at_date']").datepicker dateFormat: "yy-mm-dd" $(".preview-content").click -> $this = $(@).attr "disabled", "disabled" $.ajax url: "/admin/blog/preview_content" type: "post" data: authenticity_token: $("form input[name='authenticity_token']").val() content: $("textarea[name='content']").val() dataType: "text" success: (text) -> $(".preview-content").html text $this.removeAttr "disabled" error: -> $(".preview-content").html '<div style="color: red;">There was an error.</div>' $this.removeAttr "disabled" false
Version data entries
9 entries across 9 versions & 1 rubygems