Created
November 9, 2012 15:28
-
-
Save olvap/4046309 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= javascript_include_tag 'assests/news_posts.js' %> | |
<%= form_for @record,:url => news_posts_page_news_posts_path(@page), :remote => true do |f| %> | |
<%= render :partial=>'admin/pages/form_error_messages_area'%> | |
<div id="add-news-post-title" class="record-field required" > | |
<div class="name block">Title</div> | |
<div class="input"> | |
<%= f.text_field :title,:class=>'full-width-input', :maxlength=>"255"%> | |
</div> | |
</div><br/> | |
<div id="add-news-post-content" class="record-field required" > | |
<div class="name block"> Post Content</div> | |
<div class="input"> | |
<%= f.text_area :content,:id=>'add-news-post-content-textarea',:style=>'display:none' %> | |
<%= render :partial=>'admin/pages/wysiwyg_editor', :locals =>{:editorName=>'oEdit3',:height=>'250', :replace_div=>'add-news-post-content-textarea'}%> | |
</div> | |
</div><br/><br/> | |
<div id="add-news-post-post-date" class="record-field" > | |
<div class="name block">Post Date</div> | |
<div class="input"> | |
<%= f.text_field :post_date,:value=>Time.zone.now.strftime("%m/%d/%y")%> | |
<%= f.hidden_field :draft ,:id=>'add-news-post-draft'%> | |
</div> | |
</div> | |
<div id="add-news-post-author" class="record-field required" > | |
<div class="name block">Author (Optional)</div> | |
<div class="input"> | |
<%= f.text_field :author, :maxlength=>"64"%> | |
</div> | |
</div><br/> | |
<%= records_frame_footer(save_button('Publish Post',:onclick=>"$('add-news-post-draft').value=0"),save_button('Save as Draft',:onclick=>"$('add-news-post-draft').value=1"), cancel_button) %> | |
<% end %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Event.observe(window, 'load', function() { | |
$('new_news_post').observe('ajax:before', console.log("ajax:before")); | |
$('new_news_post').observe('ajax:complete', console.log("ajax:complete")); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment