[typo] Admin controller hacking
dusty.jewett at gmail.com
Wed Dec 7 06:44:19 EST 2005
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 <wyldeone at gmail.com> 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
> On 12/3/05, Tracey <tenthconcept at gmail.com> 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>
> > ("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
> > Typo-list at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/typo-list
> Micah Wylde
> Typo-list mailing list
> Typo-list at rubyforge.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Typo-list