Major Upgrades
thekeyper - September 4, 2008 - 07:22
| Project: | Mailbuild |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Jump to:
Description
I needed functionality to have my lists and custom fields as choices in the block. This patch allows custom fields to be created in the admin interface. It supports radio buttons, select fields, and checkboxes.
It would be great if someone could check it out and give me feedback.
Also, please create a mailbuild.js file with the following code (I wasn't sure how to submit a new file in an issue):
jQuery(function() {
var $ = jQuery; // Scope jQuery as $
var last = {el: null, len: 0};
$('#edit-mblists div:first').children('.form-item')
.each(function() {
var fields = $('~ .form-field:first', this),
len = fields.find(':input').size();
$(':radio:first', this).bind('click', function() {
// Dont animate if last el was me
if (last.el && (last.el == fields))
return;
// Slide up last element
if (last.el && last.len)
last.el.slideUp();
// Update last element
last = {
el: fields,
len: len// leave last comma off
};
// Animate me
// Only do animation if has children
if (last.el && last.len)
last.el.slideDown('slow');
});
fields.hide();
}).end()
// Find first radio and click it
.find('.form-item:first :radio').click();
});| Attachment | Size |
|---|---|
| mailbuild.module.patch | 8.91 KB |

#1
Thank you for the patch thekeyper. One of the developers will look into this and post back when we get a chance.
#2
We need to implement this so we will test and include it in a release shortly if its all good.
#3
Hi thekeyper, thanks for the patch. Can you please recreate your patch as per http://drupal.org/patch/create ?
Essentially:
cvs diff -up mailbuild.module > mailbuild.module.patch
Thanks again.