Sha256: 600c13f0d669dba71abf91b3c6e6569c3d0b130c6991d0ba3154893d3d1fa9b2
Contents?: true
Size: 1.59 KB
Versions: 7
Compression:
Stored size: 1.59 KB
Contents
<textarea id='page_<%= @page.id %>_content' placeholder='Content' style='width:795px; height:545px;' class='tinymce'><%= raw @page.content %></textarea> <br /> <div id='message'></div> <div id='controls'> <input type='button' value='Close' onclick="modal.close();" /> <input type='button' value='Update' onclick="updateContent();" /> </div> <% content_for :caboose_js do %> <%= javascript_include_tag "caboose/model/all" %> <%= tinymce_assets %> <script type="text/javascript"> var modal = false; $(document).ready(function() { modal = new CabooseModal(800, 700); }); function updateContent() { tinymce.triggerSave(); function log(msg) { setTimeout(function() { throw new Error(msg); }, 0); } // log($('#page_<%= @page.id %>_content').val()); $.ajax({ url: '/pages/<%= @page.id %>', type: 'put', data: { authenticity_token: "<%= form_authenticity_token %>", content: $('#page_<%= @page.id %>_content').val() }, success: function(resp) { if (resp.success) { contentVal = $('#page_<%= @page.id %>_content').val(); parent.$('#editmode_content_container').html(contentVal == null || contentVal.length == 0 ? 'No content.' : contentVal); modal.close(); } if (resp.error) modal.autosize("<p class='note success'>" + resp.error + "</p>"); } }); } </script> <%= tinymce :caboose, width:'795px', height:'545px' # theme_advanced_source_editor_width: '100px', # theme_advanced_source_editor_height: '100px' %> <% end %>
Version data entries
7 entries across 7 versions & 1 rubygems