Closed (fixed)
Project:
Chaos Tool Suite (ctools)
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
1 Jun 2009 at 08:44 UTC
Updated:
4 Aug 2009 at 19:30 UTC
Precision patch ported from this issue
Removed only the:
ctools_ajax_command_data - implementation for $.data jquery data cache attachments. see jQuery explanation
Being able to access the jQuery data chache makes it possible to transfer element specific data from server to client through the powerful command system. This simplifies trying to store unique values per element in Drupal.settings.
Rolled against head, your comments welcome.
| Comment | File | Size | Author |
|---|---|---|---|
| data_command-HEAD.patch | 2.15 KB | nickl |
Comments
Comment #1
merlinofchaos commentedI was completely unaware of the data functionality in jquery. This looks potentially very, very useful. I've committed this.
Can we take this a step farther?
I see a real value in 'ctools_add_data($selector, $key, $value)' that would store this globally.
If theme('page') is called, a hook_preprocess_page() would append javascript to the $scripts variable.
If ctools_ajax_render() is called, the data would automatically be placed here.
We could theoretically do these with some other commands too, but using this system we could completely forego settings for anything we think will be used with AJAX and just use this data() model and things will Just Work with or without ajax.
Comment #2
merlinofchaos commentedI appear to have committed this but not marked the issue fixed.