Views and Ahah Forms 1.3 released

Events happening in the community are now at Drupal community events on www.drupal.org.
starbow's picture

I am really excited to announce the release of the work I have been doing to create an Ajax version of Views, by modifying ahah_forms and views_ui to work together . It took weeks longer than I anticipated, and required extending ahah_form.js and tweaking maybe 20% of views_ui, but I am very happy with the result. You can check it out yourself at http://demo.starbowconsulting.com/admin/build/views. The views_ui rewrite is available in the examples directory of ahah_form v1.2 (http://drupal.org/project/ahah_forms)

Update: I have removed the need to login to the site to administer views (some people were having trouble getting in).

Update: v1.3 released: Ok, I am probably just procrastinating reviewing my notes for friday's summit talk, but I have released a much simplified views_ui.module-example. The big thing I realized is that almost everything I really need to do can be done in the theming functions. Also, I have refined the ahah_forms.js visual effects and removed the yellow fade. This allows me to drop the two interface javascript files.

Update:If you are not quite sure what this is all about, the best place to start is: http://starbowconsulting.com/blog/tao/ahah-forms-reloaded

Update: The JavaScript has been tested on FireFox 2 and IE 7. If you aren't seeing cute Ajax effects, please do a shift-reload to make sure your browser hasn't cached an old .js file.

Comments

Whoops

starbow's picture

Looks like I have some reserved words in my javascript, and IE is choking. I am working on a patch.

Good to go!

starbow's picture

With the help of jslint.com (a very cool tool), I got the JavaScript working for IE (at least version 7, which is the only one I have to test). I have made a 1.2 release with these fixes.

If you have been having trouble logging into to the demo site, keep trying. It might not be happy with lots of different people logging in with the same name. Clearing your cookies can be helpful.

Also, I have posted my first follow-up article, going in to detail about the changes I made in views_ui.module, and lessons learned: http://starbowconsulting.com/blog/tao/views-ui-reloaded

Soo nice ...

matt_paz's picture

Views is so much easier to work with this way! I hope this effort gets some traction if it is the right approach.

OT, but I just found this

catch's picture

OT, but I just found this last week - allows you to install IE6, 5.5, 5 and even further back all as standalones from one installer - no messing around either. Works really well (well, as well as IE ever works).

http://tredosoft.com/Multiple_IE

It'd be oh so nice for this

sgriffin's picture

It'd be oh so nice for this to work with cck.

Very very Nice! This is

bcn's picture

Very very Nice!

This is exactly what i've been waiting to see from jquery... Thanks much for your hard work with this!

Heavy Implementation

quicksketch's picture

I really like what I'm seeing here. Integrating all the necessary fields into a single fapi property is fantastic idea. The JS side of things though seems very heavy. A fullscreen, disabling progress bar just to add a form element? 4 javascript files and requiring portions of interface elements is way too much overhead.

I separately developed something similar, but simpler in implementation (http://drupal.org/node/128805) specifically for appending fields, not the ability to completely restructure a series of fields as this implementation is.

Still, this module is showing great ideas. The form integration is fantastic and would be a good addition to core.

Interface.js no longer used

starbow's picture

You are right about not needing interface. In fact, it is not longer being used on the dev branch, which removes two of the js files. I was only using it to give the cute yellow fade, which I have now done away with. The whole thing is about 100 lines of Javascript, plus one really handy function from form.js.

I am not sure "A fullscreen, disabling progress bar" is an accurate description. There is a visual overlay that goes over the part of the screen that is about to be replaced. Making any changes there is a mistake since any the will be lost once the Ahah swap completes, but you can do it if you are quick enough. The only thing that actually gets disabled is the button that is clicked, which prevents accidental doubleclicking.

Thanks for the feedback.

Brilliant

BioALIEN's picture

You have just opened a major can of whoopass with the magic you're cooking up here. I hope we can reach a JS forms framework to extend this sort of functionality over other parts of Drupal core and contrib modules.


BioALIEN
Buy, sell and trade with other webmasters: WebMasterTrader.com

Love it

ximo's picture

Wonderful stuff, I'm also one who hopes something like this will make it to core, it would make for much "snappier" forms and a better user experience :)

I wonder, though, how is the downgradability (or whatever it's called)? What happens if you don't have JavaScript enabled?

Without javascript it

starbow's picture

Without javascript it defaults to the same experience you get without the ahah module installed, ei: the same as views is now

This is Awesome!

OpenChimp's picture

This is Awesome!

Would love to see more forms on drupal operate in this way, like field groups - when creating complex cck datatypes it really helps to clean up the page by collapsing the various field groups on the page. It would be cool if the contents of these forms could just be loaded when the user clicks to open a collapsed form group. This would make the pages load much much faster and help administrators who are on slower computers which can often run slowly on complex drupal admin pages.

Many other uses come to mind. Great stuff...

Kent bye analysis

Ericjohn's picture

Kent Bye, of the echochamberproject.com, has posted a step-by-step analysis of how ahah_forms.js does it's voodoo. Check it out at: http://docs.google.com/Doc?id=dczgjp36_48ctkpt3
Ericjohn, Know about herbal weight loss tea

AJAX

paysansan's picture

Great work. And I love AJAX.

Views Developers

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: