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..."%>&nbsp;<%=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

Version Path
spud_cms-1.0.0.rc1.4 app/views/spud/admin/pages/new.html.erb
spud_cms-1.0.0.rc1.3 app/views/spud/admin/pages/new.html.erb
spud_cms-1.0.0.rc1.2 app/views/spud/admin/pages/new.html.erb
spud_cms-1.0.0.rc1.1 app/views/spud/admin/pages/new.html.erb
spud_cms-1.0.0.RC1 app/views/spud/admin/pages/new.html.erb
spud_cms-0.9.21 app/views/spud/admin/pages/new.html.erb
spud_cms-0.9.20 app/views/spud/admin/pages/new.html.erb
spud_cms-0.9.18 app/views/spud/admin/pages/new.html.erb
tb_cms-1.0 app/views/spud/admin/pages/new.html.erb
tb_cms-0.9.18 app/views/spud/admin/pages/new.html.erb
spud_cms-0.9.17 app/views/spud/admin/pages/new.html.erb
spud_cms-0.9.15 app/views/spud/admin/pages/new.html.erb
spud_cms-0.9.14 app/views/spud/admin/pages/new.html.erb
spud_cms-0.8.17 app/views/spud/admin/pages/new.html.erb
spud_cms-0.9.13 app/views/spud/admin/pages/new.html.erb
spud_cms-0.9.12 app/views/spud/admin/pages/new.html.erb
spud_cms-0.9.11 app/views/spud/admin/pages/new.html.erb
spud_cms-0.9.10 app/views/spud/admin/pages/new.html.erb
spud_cms-0.9.9 app/views/spud/admin/pages/new.html.erb
spud_cms-0.9.8 app/views/spud/admin/pages/new.html.erb