Modify ↓
Opened 16 years ago
Closed 16 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 |
Attachments (1)
Change History (5)
Changed 16 years ago by
Attachment: | customfieldadmin_r5022.diff added |
---|
comment:1 Changed 16 years ago by
Owner: | changed from osimons to Catalin BALAN |
---|
comment:2 Changed 16 years ago by
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:4 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [5032]) CustomFieldAdminPlugin: Javscript rewrite using jQuery. All code from cbalan.
Closes #4295.
Note: See
TracTickets for help on using
tickets.
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.