Modify

Opened 15 years ago

Closed 15 years ago

#4295 closed enhancement (fixed)

[patch] More jQuery like js actions

Reported by: Catalin BALAN Owned by: osimons
Priority: normal Component: CustomFieldAdminPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

Hey osimons,

I've created a more jQuery like js actions for this plugin. What do you think ?

Thank you, Catalin Balan

Attachments (1)

customfieldadmin_r5022.diff (4.3 KB) - added by Catalin BALAN 15 years ago.

Download all attachments as: .zip

Change History (5)

Changed 15 years ago by Catalin BALAN

Attachment: customfieldadmin_r5022.diff added

comment:1 Changed 15 years ago by osimons

Owner: changed from osimons to Catalin BALAN

If it works, then by all means - I've never really looked closely at your previous JS code anyway. The new code sure looks cleaner and more readable. Go for it.

comment:2 Changed 15 years ago by osimons

Owner: changed from Catalin BALAN to osimons

Decided to give it a spin anyway, but experienced some issues with the showing and hiding when switching between them when editing the various types. What I found the easiest, and also the most explicit, was simply stating the defaults for each without passing through to next case - no doubt it could be reorganised and tweaked, but this reads well and should be easy to maintain for anyone:

            case 0: // text
                label('#options, #cols, #rows').hide();
                break;
            case 1: // select
                label('#options, #cols, #rows').show();
                break;
            case 2: // checkbox
                label('#options, #cols, #rows').hide();
                break;
            case 3: // radio
                label('#options').show();
                label('#cols, #rows').hide();
                break;      
            case 4: // textarea
                label('#options').hide();
                label('#cols, #rows').show();
                break;

I've now set it up ready to commit, so I'll just go ahead and do it anyway if that is ok with you.

comment:3 Changed 15 years ago by Catalin BALAN

yeah, that ok.

Thank you, Catalin Balan

comment:4 Changed 15 years ago by osimons

Resolution: fixed
Status: newclosed

(In [5032]) CustomFieldAdminPlugin: Javscript rewrite using jQuery. All code from cbalan.

Closes #4295.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain osimons.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.