Sha256: 54c3c37ae72ae4559a1bebea0aa2a9ccc1ded20ca7277ba2ea53e07dde4d6441
Contents?: true
Size: 1001 Bytes
Versions: 36
Compression:
Stored size: 1001 Bytes
Contents
<%=form_for @page,:url => spud_admin_pages_path(),:html=>{:class=>"form-horizontal page_form"} do |f|%> <%=render :partial => "form",:locals => {:f => f}%> <div class="form-actions"> <%=f.submit "Create Page", :class=>"btn btn-primary form-btn btn-save","data-loading-text"=>"Saving..."%> <%=f.submit "Preview", :class=>"btn btn-primary btn-preview"%> or <%=link_to "cancel",spud_admin_pages_path,:class => "btn"%> </div> <%end%> <script type="text/javascript"> $(document).ready(function() { $('input[type=submit].btn-preview').click(function(evt) { $(this).button('reset') $('#preview').val(1); var form = $('form.page_form')[0]; form.onsubmit = function() { window.open('about:blank','preview_window','width=500,height=400') }; form.target = 'preview_window'; }); $('input[type=submit].btn-save').click(function(evt) { $('#preview').val(0); var form = $('form.page_form')[0]; form.onsubmit = null; form.target = null; }); }); </script>
Version data entries
36 entries across 36 versions & 2 rubygems