Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Original blob of shit:
- :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' } )"
- ## Polished blob of shit:
- ## ( It's now it's own rjs file )
- page << "if($('#{"edit_div_" + @article.id.to_s}').style.display != 'none') {"
- page.visual_effect :blind_up, "edit_div_" + @article.id.to_s
- page << "}"
- page << "new Effect.Parallel( [
- #{visual_effect(:fade,"admin_div_title_#{@article.id}", { :sync => "true" } ).gsub(/;/, "")},
- #{visual_effect(:fade,"admin_div_excerpt_#{@article.id}", { :sync => "true" } ).gsub(/;/, "")},
- #{visual_effect(:fade,"admin_div_buttons_#{@article.id}", { :sync => "true" } ).gsub(/;/, "")}
- ],
- { duration: 0.5,
- afterFinish: function() {
- $('admin_row_#{@article.id}').style.display = 'none';
- },
- queue: 'end'
- }
- )"
Add Comment
Please, Sign In to add comment