Needs review
Project:
Mailbuild
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Sep 2008 at 07:22 UTC
Updated:
28 Oct 2008 at 04:22 UTC
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();
});
| Comment | File | Size | Author |
|---|---|---|---|
| mailbuild.module.patch | 8.91 KB | Chris Gillis |
Comments
Comment #1
dragonwize commentedThank you for the patch thekeyper. One of the developers will look into this and post back when we get a chance.
Comment #2
acWe need to implement this so we will test and include it in a release shortly if its all good.
Comment #3
benkant commentedHi 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.