public
Fork of halorgium/mephisto
Description: A mirror of the mephisto code-base
Homepage: http://mephistoblog.com/
Clone URL: git://github.com/technoweenie/mephisto.git
Click here to lend your support to: mephisto and make a donation at www.pledgie.com !
show flash messages in the section admin

git-svn-id: http://svn.techno-weenie.net/projects/mephisto/trunk@1425 
567b1171-46fb-0310-a4c9-b4bef9110e78
technoweenie (author)
Tue Jul 25 20:39:48 -0700 2006
commit  be66e53318dd36f250b740b5d959c355951f5d8e
tree    9281512a49e7bc9c916fa5354df225d7cd1567bd
parent  b4e83b91a5a44c0727c9b9f6f882b151d4b925cc
...
22
23
24
25
26
27
28
29
30
31
...
22
23
24
 
 
 
 
25
26
27
0
@@ -22,10 +22,6 @@ class Admin::SectionsController < Admin::BaseController
0
 
0
   def update
0
     @section.update_attributes params[:section]
0
- render :update do |page|
0
- page.replace_html "section_#{params[:id]}", :partial => 'section'
0
- page.visual_effect :highlight, "section_#{params[:id]}"
0
- end
0
   end
0
 
0
   def order
...
1
 
2
3
4
...
 
1
2
3
4
0
@@ -1,4 +1,4 @@
0
-<% form_remote_for :section, @section,
0
+<% form_remote_for :section,
0
      :url => { :action => (@section.new_record? ? 'create' : 'update'), :id => @section }, :html => { :id => 'section-form' } do |f| %>
0
 <div class="group">
0
   <dl>
...
1
 
2
3
4
...
 
1
2
3
4
0
@@ -1,4 +1,4 @@
0
-<li id="section-<%= section.id %>">
0
+<li id="<%= section.dom_id %>">
0
   <%= link_to_remote image_tag('/images/icons/trash.gif', :class => 'iconb red'), {
0
         :url => { :controller => 'sections', :action => 'destroy', :id => section },
0
         :confirm => "Are you sure?"},
...
1
2
3
 
4
5
6
7
...
1
2
3
4
5
6
7
8
0
@@ -1,6 +1,7 @@
0
 unless @section.new_record?
0
   page.insert_html :bottom, 'sections', :partial => 'section'
0
   page << "$('section_name').value = ''"
0
+ page.call 'Flash.notice', "Section '#{h @section.name}' created."
0
 else
0
   page.visual_effect :shake, 'section_name'
0
 end
0
\ No newline at end of file

Comments

    No one has commented yet.