Guest User

Untitled

a guest
Feb 20th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. ## Original blob of shit:
  2. :onmouseup => "if($('news_edit_div_#{news_article.id}') && $('news_edit_div_#{news_article.id}').style.display != 'none') { #{visual_effect(:blind_up, "edit_div_#{news_article.id}")} } new Effect.Parallel( [#{visual_effect(:fade,"admin_div_title_#{news_article.id}", { :sync => "true" } ).gsub(/;/, "")}, #{visual_effect(:fade,"admin_div_excerpt_#{news_article.id}", { :sync => "true" } ).gsub(/;/, "")}, #{visual_effect(:fade,"admin_div_buttons_#{news_article.id}", { :sync => "true" } ).gsub(/;/, "")}], { duration: 0.5, afterFinish: function() { $('admin_row_#{news_article.id}').style.display = 'none'; }, queue: 'end' } )"
  3.  
  4. ## Polished blob of shit:
  5. ## ( It's now it's own rjs file )
  6. page << "if($('#{"edit_div_" + @article.id.to_s}').style.display != 'none') {"
  7. page.visual_effect :blind_up, "edit_div_" + @article.id.to_s
  8. page << "}"
  9.  
  10. page << "new Effect.Parallel( [
  11. #{visual_effect(:fade,"admin_div_title_#{@article.id}", { :sync => "true" } ).gsub(/;/, "")},
  12. #{visual_effect(:fade,"admin_div_excerpt_#{@article.id}", { :sync => "true" } ).gsub(/;/, "")},
  13. #{visual_effect(:fade,"admin_div_buttons_#{@article.id}", { :sync => "true" } ).gsub(/;/, "")}
  14. ],
  15. { duration: 0.5,
  16. afterFinish: function() {
  17. $('admin_row_#{@article.id}').style.display = 'none';
  18. },
  19. queue: 'end'
  20. }
  21. )"
Add Comment
Please, Sign In to add comment