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.


git-svn-id: https://develop.svn.wordpress.org/trunk@22173 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Daryl Koopersmith
2012-10-10 23:32:48 +00:00
parent 2a0622aaba
commit d27568e703
8 changed files with 113 additions and 25 deletions
+20 -12
View File
@@ -246,16 +246,9 @@
.attachment {
position: relative;
float: left;
width: 199px;
height: 199px;
padding: 0;
margin: 0 10px 20px;
box-shadow:
inset 0 0 15px rgba( 0, 0, 0, 0.1 ),
inset 0 0 0 1px rgba( 0, 0, 0, 0.05 );
background: #eee;
cursor: pointer;
color: #464646;
-webkit-user-select: none;
@@ -281,12 +274,15 @@
}
.attachment-preview {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
position: relative;
width: 199px;
height: 199px;
overflow: hidden;
box-shadow:
inset 0 0 15px rgba( 0, 0, 0, 0.1 ),
inset 0 0 0 1px rgba( 0, 0, 0, 0.05 );
background: #eee;
cursor: pointer;
}
.attachment .icon,
@@ -390,6 +386,18 @@
display: block;
}
.attachment .describe {
position: relative;
display: block;
width: 100%;
height: 66px;
margin: -1px 0 0;
padding: 8px;
font-size: 12px;
resize: none;
border-radius: 0;
}
/* Square crop with overflow visible on hover. */
/*