Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #3084 (closed enhancement: wontfix)

Opened 4 years ago

Last modified 2 years ago

[PATCH] Change css-class to DOM-elements in rjs

Reported by: kristian@delamednoll.se Assigned to: sam@conio.net
Priority: normal Milestone: 1.x
Component: ActionPack Version: edge
Severity: normal Keywords: verified
Cc:

Description

It would be very nice if we could change the css-class of an element when using rjs. If we change the presentation of an element by css-class instead of style-attribute, then presentation is nicely separated from the behavior. This functionality blends where good with the existing functions from the JavaScriptGenerator-class.

Attachments

patch_prototype_helper.txt (0.9 kB) - added by kristian@delamednoll.se on 12/01/05 20:39:07.
patch_prototype_helper_rev2.diff (1.7 kB) - added by josh on 02/22/07 21:55:05.
Updated to patch cleanly into r6209.

Change History

12/01/05 20:39:07 changed by kristian@delamednoll.se

  • attachment patch_prototype_helper.txt added.

12/02/05 10:16:36 changed by anonymous

  • owner changed from Rails to David.
  • component changed from script.aculo.us to ActionPack.

12/02/05 13:23:32 changed by madrobby

  • owner changed from David to sam@conio.net.

02/03/06 05:48:51 changed by anonymous

kj

02/22/07 21:55:05 changed by josh

  • attachment patch_prototype_helper_rev2.diff added.

Updated to patch cleanly into r6209.

02/22/07 21:55:26 changed by josh

  • keywords set to verified tiny.
  • version changed from 0.14.3 to edge.

Added tests and updated for r6209.

05/25/07 08:13:03 changed by danger

Can't we already do this via:

page['my_id'].className = 'new_class_name'
# and
page['my_id'].className = "extra #{page['my_id'].className}"

?

06/04/07 04:31:17 changed by josh

  • keywords changed from verified tiny to verified.
  • status changed from new to closed.
  • resolution set to wontfix.
  • milestone set to 1.x.

This patch is old and danger work around is good enough.