you're right, script in the html will break w3c compatibility (though every browser gets it correct, it's still broken)

On 12/3/05, Micah Wylde < [EMAIL PROTECTED]> wrote:
The arguement that the script.aculo.us scripts use refers to the id of the div to which the effect is to be applied. So, to make your example work you would have to have the partial be:

<div id="messages"><p>Changes published</p></div>
My js isn't very good, and I'm not sure that it can be placed just in the body like that. You may need to also place the _javascript_ somewhere else.


On 12/3/05, Tracey <[EMAIL PROTECTED] > wrote:
I have been spending some time learning Rails and I thought one of the easiest
ways is to contribute to typo.  My first thoughts were to clean up the admin
interface.

When you "Publish Changes" in the admin sidebar controller it uses render
:partial=>'publish' to flash the message "Changes published."

I think it would be a good idea to use this in other controllers.  For example,
in the theme controller, you recieve no feedback when you activate a new theme.

Just to do something quick, in themes_controller.rb, I added render
:partial=>'publish' to switchto():

def switchto

    setting = (Setting.find_by_name('theme') or Setting.new("name" => 'theme'))
    setting.value = params[:theme]
    setting.save
    render :partial => 'publish'
    redirect_to :action ="" 'index'

  end

and I then inserted _publish.rhtml in /app/views/admin/themes with this code:

<p>Changes published</p>
<script type="text/_javascript_">new Effect.Highlight("messages");</script>

Nothing happens with these changes.  What could the problem be?  Is there
another way of accomplishing this?  I am new to Rails and programming, so any
help, thoughts or ideas are greatly appreciated.

Tracey
http://52reasons.ath.cx

_______________________________________________
Typo-list mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/typo-list



--
Micah Wylde
_______________________________________________
Typo-list mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/typo-list



_______________________________________________
Typo-list mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/typo-list

Reply via email to