Opened 6 years ago

Closed 6 years ago

#4295 closed enhancement (fixed)

[patch] More jQuery like js actions

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


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 cbalan 6 years ago.

Download all attachments as: .zip

Change History (5)

Changed 6 years ago by cbalan

comment:1 Changed 6 years ago by osimons

  • Owner changed from osimons to cbalan

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 6 years ago by osimons

  • Owner changed from cbalan 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();
            case 1: // select
                label('#options, #cols, #rows').show();
            case 2: // checkbox
                label('#options, #cols, #rows').hide();
            case 3: // radio
                label('#cols, #rows').hide();
            case 4: // textarea
                label('#cols, #rows').show();

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 6 years ago by cbalan

yeah, that ok.

Thank you, Catalin Balan

comment:4 Changed 6 years ago by osimons

  • Resolution set to fixed
  • Status changed from new to closed

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

Closes #4295.

Add Comment

Modify Ticket

as closed The owner will remain osimons.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.