Sha256: eea34e1aca07a944f01bde82599dde248cef46f99a74295239e4acf57b633b3a
Contents?: true
Size: 991 Bytes
Versions: 4
Compression:
Stored size: 991 Bytes
Contents
<%=form_for @page,:url => 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",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
4 entries across 4 versions & 1 rubygems