Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#21807 closed task (blessed) (fixed)

Caption editing in the media modal library view

Reported by: koopersmith's profile koopersmith Owned by: koopersmith's profile koopersmith
Milestone: 3.5 Priority: normal
Severity: normal Version: 3.5
Component: Media Keywords:
Focuses: Cc:

Description

When inserting an attachment into a post or creating a gallery, the user should be able to easily change the caption of any attachment via a text box immediately below the attachment's thumbnail. This caption will then be synced to the database as soon as the text field is deselected.

Currently, the attachment template in the media modal library view contains a div with the "describe" class, but nothing more. What we need now is…

  • An option in the workflow controller to support inline caption editing.
  • The caption rendered in the attachment template.
  • The caption synced to the database on save.

Change History (10)

#1 follow-up: @azaozz
12 years ago

Editing a caption would also need to sync/reload the gallery preview in MCE (if there is a gallery).

#2 in reply to: ↑ 1 @koopersmith
12 years ago

Replying to azaozz:

Editing a caption would also need to sync/reload the gallery preview in MCE (if there is a gallery).

For galleries, yes. This should happen automatically with #21815.

For attachments, I'm not so sure; it's actually one of the pieces that's up for debate. I think the most recent resolution was that once an attachment is inserted into a post, it is no longer synced with the database.

#3 @azaozz
12 years ago

Right, image attachments that are inserted in a post stop being "attachments" and become part of the post. The size, alignment, caption can be edited as part of the post.

Last edited 12 years ago by azaozz (previous) (diff)

#4 @koopersmith
12 years ago

In [22045]:

Media JS: Give the master Workspace view control over which Attachment view it uses. see #21390, #21807, #21809.

#20 @koopersmith
12 years ago

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

In [22173]:

Caption editing in the media modal library.

  • Adds a describe option to the workflow controller to support inline caption editing.
  • For images, descriptions are mapped to the caption attribute.
  • For other media items, descriptions are mapped to the title attribute.
  • Descriptions are saved when the textarea's change event fires (i.e. when the textarea is blurred).

fixes #21807, see #21390.

#21 @koopersmith
12 years ago

In [22174]:

Add caption and title default values for the attachment view template. see #21390, #21807.

#22 @koopersmith
12 years ago

In [22178]:

Media Modal: Reduce height on the attachment captions from three lines to two. see #21390, #21807.

#23 @koopersmith
12 years ago

In [22200]:

Media Modal: Check for empty keys when saving attachment captions. see #21390, #21807.

#24 @koopersmith
12 years ago

In [22212]:

Add a nonce to wp_ajax_save_attachment. see #21390, #21807.

#25 @blepoxp
12 years ago

Hi,
I see that description gets mapped to different fields depending on the type of attachment. Will we be adding the ability to specifically modify individual fields from here in the future (like the image title and alt tag fields) or will that be restricted to the main Media Library interface? If so, is there a better ticket to ask this question or track progress for that?

Thanks

Note: See TracTickets for help on using tickets.