Newest Prototype and script.aculo.us in Radiant

3 views
Skip to first unread message

Mislav Marohnić

unread,
Oct 19, 2007, 7:37:03 PM10/19/07
to radiant...@googlegroups.com
Hello,

I have patched Radiant JavaScripts to be compatible with and leverage the new features of Prototype 1.6.0 and Scriptaculous 1.8
http://dev.radiantcms.org/radiant/attachment/ticket/566/radiant2prototype16.diff

Both frameworks are close to final releases (just a couple of weeks now), but their trunks are production quality.

It would be great if Radiant trunk had them and if the next release contained final versions of Prototype 1.6.0 and script.aculo.us 1.8.

Thanks!

- Mislav

Mislav Marohnić

unread,
Oct 19, 2007, 7:44:29 PM10/19/07
to radiant...@googlegroups.com
On 10/20/07, Mislav Marohnić <mislav....@gmail.com> wrote:

I have patched Radiant JavaScripts to be compatible with and leverage the new features of Prototype 1.6.0 and Scriptaculous 1.8
http://dev.radiantcms.org/radiant/attachment/ticket/566/radiant2prototype16.diff

Ouch, the patch preview is not viewable with normal human vision ... See pastie for nice preview:
http://pastie.caboo.se/109069

Sean Cribbs

unread,
Oct 19, 2007, 10:59:48 PM10/19/07
to radiant...@googlegroups.com
Mislav,

Awesome work.  One element of concern - John had specifically used regex matching in the RuledTable and SiteMap on the class attributes because it was faster than add/remove/has_classname in Prototype.  Has that issue been resolved?

John and I also mused at re-implementing some of the Javascript as LowPro Behaviors.  Would you be interested in contributing to that effort?

Sean

Mislav Marohnić

unread,
Oct 20, 2007, 8:11:33 AM10/20/07
to radiant...@googlegroups.com
On 10/20/07, Sean Cribbs <seanc...@gmail.com> wrote:

Awesome work.  One element of concern - John had specifically used regex matching in the RuledTable and SiteMap on the class attributes because it was faster than add/remove/has_classname in Prototype.  Has that issue been resolved?

Yes, that was the reason I reverted to add/removeClassName.

John and I also mused at re-implementing some of the Javascript as LowPro Behaviors.  Would you be interested in contributing to that effort?

Behaviors are nice, but not needed in Radiant administrative interface. SiteMap currently applies event handlers to each row of the table, which is unnecessary because only one click handler on the whole table is enough. I have not implemented that, though, because with this patch I tried to stay as close to old code as possible. However, I will do that once this initial patch is applied, gladly.

Behaviors might be used in TabControl, but I don't think this tiny usage justifies the inclusion of the whole Prototype add-on.

Mislav Marohnić

unread,
Oct 22, 2007, 10:37:00 AM10/22/07
to radiant...@googlegroups.com
On 10/20/07, Sean Cribbs <seanc...@gmail.com> wrote:
Mislav,

Awesome work.

Sean,

Will this be committed soon? I'd like to make a second patch with a complete cleanup, if you and John agree. Obscure scripts in views bit me already a few times while extending the interface; I'd like to extract to external files and sanitize those.

Sean Cribbs

unread,
Oct 22, 2007, 1:33:41 PM10/22/07
to radiant...@googlegroups.com
Mislav,

Sorry, I'll see if I can get to it tonight.

Sean

Sean Cribbs

unread,
Oct 22, 2007, 9:02:56 PM10/22/07
to radiant...@googlegroups.com
Mislav,

http://dev.radiantcms.org/radiant/changeset/563

I think a general cleanup would be good, perhaps with some modularization.  The whole interface and controller structure is due for a redesign of sorts; however, that probably won't happen until after 0.6.5.  These are not complete and some will have greater priorities than others, but here's my wishlist for the front-end:

* Resourceful, skinny controllers (AR-compatible, too!)
* Better modularization of the Javascripts, fewer intrusions into the markup
* Simpler markup structure in some places (the page-edit screen comes to mind)

Cheers,

Sean

Mislav Marohnić

unread,
Oct 23, 2007, 3:37:43 AM10/23/07
to radiant...@googlegroups.com
On 10/23/07, Sean Cribbs <seanc...@gmail.com> wrote:

I think a general cleanup would be good, perhaps with some modularization.  The whole interface and controller structure is due for a redesign of sorts; however, that probably won't happen until after 0.6.5.  These are not complete and some will have greater priorities than others, but here's my wishlist for the front-end:

* Resourceful, skinny controllers (AR-compatible, too!)
* Better modularization of the Javascripts, fewer intrusions into the markup
* Simpler markup structure in some places (the page-edit screen comes to mind)

I agree. Cleaning away JavaScript is a good first step towards all this. Pistonizing Rails 2.0 in vendor/ is another ;)

I guess I'll be done with what I planned today or tomorrow. I'm going to post patches with Pastie here - Radiant Trac is hard to look with this unfinished light -> dark transition ..

Mislav Marohnić

unread,
Nov 3, 2007, 7:15:14 PM11/3/07
to radiant...@googlegroups.com
Fixing the edit view was harder than I thought. To be honest, it was a nightmare, and even after this patch there is still little inline JavaScript that I might remove in the next iteration.

The patch is here: http://pastie.caboo.se/113808

What have I done?
  • (almost) completely rewritten RuledTable, SiteMap and TabControl
  • upgraded Prototype to latest trunk
  • added admin.js that contains unobtrusive hooks
  • cleaned up index and edit views from inline javascript that did initialization
  • selected content part tab while editing a page is persisted between page views
  • title field no longer receives autofocus on page load (that annoyed me a lot)

Sean Cribbs

unread,
Nov 7, 2007, 11:02:44 AM11/7/07
to radiant...@googlegroups.com
Mislav,

If you have a few minutes today, please find me on Freenode IRC in #radiantcms or email me privately.

Sean

Sean Cribbs

unread,
Nov 7, 2007, 11:20:56 AM11/7/07
to radiant...@googlegroups.com
Mislav,

I discovered the problem I had earlier and fixed it in r582.  Still, I'd like to discuss one change with you briefly if you have time today.

Sean
Reply all
Reply to author
Forward
0 new messages