Commit b79fca21 authored by joseph.olstad's avatar joseph.olstad Committed by olstjos

Issue #2338233 by Murz, joseph.olstad, RAWDESK: Fix replace file functionality...

Issue #2338233 by Murz, joseph.olstad, RAWDESK: Fix replace file functionality for 'edit' in media browser
parent c8603e90
...@@ -10,11 +10,15 @@ ...@@ -10,11 +10,15 @@
margin: 20px; margin: 20px;
} }
#media-wysiwyg-format-form .media-item { #media-wysiwyg-format-form .media-preview-group {
float: left; float: left;
margin-right: 10px; margin-right: 10px;
} }
#media-wysiwyg-format-form .media-preview-group .edit-file-link {
text-align: center;
}
#media-wysiwyg-format-form .form-item-format label { #media-wysiwyg-format-form .form-item-format label {
display: inline; display: inline;
} }
......
...@@ -164,8 +164,8 @@ function media_wysiwyg_format_form_view_mode(&$form, $form_state, $file) { ...@@ -164,8 +164,8 @@ function media_wysiwyg_format_form_view_mode(&$form, $form_state, $file) {
} }
$form['preview'] = array(); $form['preview'] = array();
$form['preview']['#prefix'] = '<div class="media-item"><div class="media-thumbnail">'; $form['preview']['#prefix'] = '<div class="media-preview-group"><div class="media-item"><div class="media-thumbnail">';
$form['preview']['#suffix'] = '</div><div class="label-wrapper"><label class="media-filename">' . check_plain($file->filename) . '</label></div></div>'; $form['preview']['#suffix'] = '</div><div class="label-wrapper"><label class="media-filename">' . check_plain($file->filename) . '</label></div></div><div class="edit-file-link">' . l(t('Edit file'), 'file/'.$file->fid.'/edit', array('attributes' => array('class' => 'button', 'title' => t('Use for replace file or edit file fields.')))) . '</div></div>';
$form['preview']['thumbnail'] = file_view_file($file, $view_mode); $form['preview']['thumbnail'] = file_view_file($file, $view_mode);
$form['preview']['thumbnail']['#prefix'] = '<div id="media-preview">'; $form['preview']['thumbnail']['#prefix'] = '<div id="media-preview">';
$form['preview']['thumbnail']['#suffix'] = '</div>'; $form['preview']['thumbnail']['#suffix'] = '</div>';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment