Javascript

Events happening in the community are now at Drupal community events on www.drupal.org.

All you Javascript crazed developers out there, this is the group for you.

Drupal is in need of some usability improvements and after a few meetings and a lot of discussion, it is now time to take advantage of our new JQuery library in Drupal.

Ahah Forms v1.5 - Secure Dynamic Subforms

Posted by starbow on April 7, 2007 at 6:45am

At the Drupal Summit, chx & eaton let me know that avoiding the FormAPI security by directly accessing $_POST was a bad idea. So I dropped the slide out of my presentation that talked about how to create dynamic subforms, and spend the last two weeks hacking like mad. I now have an approach that I believe combines convience and security. It is packaged up in Ahah Forms v1.5 as the dynamic_subform.module. It uses the same basic algorithm as drupal_get_form when #multistep is true (but is incompatible with #multistep, so don't try to use both of them).

I have a full write up at: Secure Dynamic Forms and Subforms, but here is an example of the functions in use:

Read more
6 comments Categories: , ,

How do I iterate over the jsAC objects in autocomplete?

Posted by victorkane on April 3, 2007 at 12:50pm

Hi everyone.

As you can see from a cursory view of my "Practical Dojo Lesson: An autocomplete nodereference field that is dependent upon a choice made in another" (http://groups.drupal.org/node/3471), I was able to redefine autocomplete handlers (to be triggered by uri registered with menu callback), but I was not able to get rid of the "old" (created on page load, or "ready" event) handlers. I had to send the latter to the bytebucket.

Read more

Practical lesson: An autocomplete nodereference field that is dependent upon a choice made in another

Posted by victorkane on April 3, 2007 at 5:40am
Last updated by victorkane on Tue, 2007年04月03日 14:51

(Introducing the shiny new "Dojo Practical Lesson" format)

Problem statement

If you need to do this, feel free to use this code. If you can think of ways of improving it, please join in.

So I have three content types with additional fields added through CCK.

Content type one: Company

Content type two: Contact

Content type three: Ticket

The Company content type has a nodereference field where Contacts can be filled in (multiple autocomplete field).

Read more

Multi-Publisher Project Proposal

Posted by Veggieryan on March 26, 2007 at 3:19am
</style></head><body dir="ltr"><p class="P1">Application for Summer of Code 2007: MultiPublisher Module</p><p class="P1"> by Ryan Grace <a href="http://www.thefractal.org/">www.thefractal.org</a> :: ryan@thefractal.org </p><p class="P2"> </p><p class="P2">Synopsis </p>
Read more

Views and Ahah Forms 1.3 released

Posted by starbow on March 14, 2007 at 9:13pm

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.

Read more
14 comments Categories:

hook_ajax

Posted by dwees on March 12, 2007 at 10:21pm

I don't know if this is a bit of a foolish plan or not, but I was wondering about the feasibility of creating a framework for allowing modules to relatively easily create Ajax-loadable content.

Basically I envision is a module that creates a new hook (called hook_ajax) for lack of a better name. This module would also include an API for module developers to make the dynamic creation a bit easier (for instance a version of the l() function, but one that modifies the URL to point at our module's MENU_CALLBACK, perhaps with some additional information attached).

Read more
8 comments Categories:

Views / Tabs / Panels - Dynamic Loading

Posted by discursives-gdo on February 28, 2007 at 10:11pm

Hello DOJO!

I want to be a Drupal ninja!

I have seen so many cool sites lately! There's one functionality set that has really caught my eye. I can't figure out how to do it, though. Can someone here give a hint? I've been through all the searches I can think of on Drupal.org and this is the first time I'm really asking, so I hope I give enough information! Here's a recent question verging on this: http://drupal.org/node/115058

What I'd like to do is display a view in a tab in a panel, and have the view be created by a stored argument that is autogenerated from the node ID.

Read more
21 comments Categories: , , ,

JS for auto-switching tabs

Posted by jasonwhat on February 28, 2007 at 7:13am

I've used the tabs module from the JS tools module before and interested in doing this again with a slight addition. I'd like to have tabs on the front page change automatically, as seen here http://news.aol.com/ .

I'm not sure if js tools is using jquery for the tabs, or something else, but does anyone know of a jquery tabs plugin that automtically switches? I've seen it done for image galleries with jquery, but not tabs. Has anyone tried something like this?

Read more
1 comment Categories:

plugin compatibility with jquery.js

Posted by sime on February 27, 2007 at 11:29pm

There was a little discussion on the webmasters mailing list, with a suggestion that nedjo was going to make a case on dev list about 3rd party, GPL, jquery plugins in contrib.

Quoting karthik:

Thus far, to the best of my knowledge, 3rd party GPL code has not been
allowed in the repository.. We have also turned down applications
based on this guideline. However, I've noticed that the jquery
_module_ [1] and the jstools [2] modules both include (or apparently
plan to, in the case of the former) 3rd party plug-ins.

Please advise ...

Read more

Notes on jQuery 1.0 Compatibility Plugin && Interface Elements

Posted by joshk on February 27, 2007 at 11:07pm

As I noted before, after some sleuthing, I discovered that there is a compatibility plugin (click here for source) which is designed to allow code written for jQuery 1.0 to run under jQuery 1.1. Mainly what it does is re-implement a number of deprecated functions. I'm interested in it because I would like to use several elements from the Interface Elements library.

So far so good! I've replaced the stock jquery.js with version 1.1.1, and I am including the compatibility script afterwards. Interface Elements perform fine, and I have only found (so far) one bug with Drupal core's javascripts.

Read more
3 comments Categories: ,

Drag-and-drop testing: interface for jQuery

Posted by agentrickard on February 25, 2007 at 9:37pm

I could use some excellent JS eyes to look at the right way to implement Drag-and-Drop using jQuery/Interface.

I've released a version for the MySite module (in the current HEAD release). See http://drupal.org/node/101471#comment-203584 for what I don't like about my implementation. Three points to emphasize to this audience:

1) I'd prefer to have a universal library; not one that is specific to my module. So the jQuery module http://drupal.org/project/jquery seems the right path to me.

Read more
5 comments Categories: ,

Updating jquery.js?

Posted by joshk on February 16, 2007 at 11:51pm

UPDATE: There is a jQuery 1.0 compatibility plugin .

Has anyone else felt the need to update the jquery.js file? In seeking to implement some functions from the Interface Elements for jQuery I found that jQuery 1.0 wasn't up to the task. There are a couple functions which were added in jQuery 1.1 that it uses.

Read more

jquery module--a place for jQuery plugins and extensions

Posted by nedjo on February 13, 2007 at 10:13pm

As more of us start using jQuery, we're getting the same jQuery plugin included in two, three, or more modules. Personally I've included tabs, cookie, and history in the jstools package. I've now seen the form plugin in three different modules. As well as duplicating work and code, we get swollen pageloads that load multiple copies of the same file from different locations (one for each module). And, potentially, problems if two different modules use different versions of the same plugin, and one overwrites the other.

Read more
11 comments Categories: ,

AHAH Forms Framework released as a module

Posted by starbow on February 13, 2007 at 9:02pm

Sorry if I am spamming this group. My brain has been on fire, and I am hoping to get some feedback. Has anyone had time to look over the code and see if they think my approach is sound? Anyway, I will probably settle down soon :)

I repackaged the code and released it as a official module, so no more tarballs on my website (http://drupal.org/project/ahah_forms)

Also, I have submitted a proposal for a OSCMS Summit session on this material (http://2007.oscms-summit.org/node/226)

Read more
6 comments Categories:

AHAH goes to the polls

Posted by starbow on February 13, 2007 at 3:32am

In response to my AHAH tutorial on groups.drupal.org, Moshe asked if that module could be used to make the poll module dynamic (http://groups.drupal.org/node/2747#comment-7670). I said "not exactly", but it go me thinking, and that lead me to create the beginnings of an ahah framework. To test it out, I just modified poll.module to use the framework. It went pretty quick. The hardest part was step two getting the form to be dynamic with full page refreshes (and most of that time was stripping out the multiple fields-per-form code from my example).

Read more
2 comments Categories:

Eye-drop Editor creeps to BETA

Posted by sime on February 12, 2007 at 11:18pm

Eye-drop Editor is finally seeing some light. This is a jquery/ajaxy image editor that integrates with server-side image manipulation.

Read more

Towards an AHAH framework / automatic javascript generation

Posted by starbow on February 12, 2007 at 2:02am

I have been having some really exciting ideas about getting the formAPI to generate the bindings to the javascript. I realized that all the javascript I wrote for the tutorial module could be generalized. Then with a bit of glue code, all of the parameters needed to do the event binding could be put in a properties set on the form element. This way Drupal coders could create modules with sophisticated AHAH effects without needing to write any Javascript at all. Here is an example of a button declaration with all of the info needed to do a incremental page update:

Read more
1 comment Categories: ,

Tutorial: A dynamically expanding AJAX/AHAH Drupal form

Posted by starbow on February 10, 2007 at 2:51am

I have spent the last couple of weeks trying to figure out how to cleanly do dynamic forms with incremental page updates. I have put together an example module which is available for download. I have also put together a tutorial that explains my technique and the issues I ran into. I am interested in hear what people think of my approach.

http://www.starbowconsulting.com/blog/tao/dynamically-expanding-ajax-aha...

Read more
15 comments Categories: ,

Anybody working on a ,ドルtabs integration for drupal?

Posted by alex_b on February 7, 2007 at 10:36pm

We're about to use the $.tabs plug in from stilbuero on a site. I ll write a wrapper module for it - anybody up to the same task?

This is a cooking recepie on how to use $.tabs for blocks:

http://drupal.org/node/89338

Read more
7 comments Categories: ,

Getting base_host() into javascript

Posted by starbow on February 2, 2007 at 12:25am

I trying to figure out the best way of getting base_path() into my javascript. I wrote some dynamic form updating code kinda like this:

Read more
Categories:
Subscribe with RSS Syndicate content

Javascript

Group notifications

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

AltStyle によって変換されたページ (->オリジナル) /