diff --git a/inc/html.php b/inc/html.php index b4cf27d614223645c15be4450a1297fd55789e6c..e256291eec2e432d3a341eb4bd2a8a808591ae03 100644 --- a/inc/html.php +++ b/inc/html.php @@ -483,8 +483,10 @@ function html_revisions($first=0, $media_id = false){ $form->addElement($id); $form->addElement(form_makeCloseTag('a')); + if ($media_id) $form->addElement(form_makeOpenTag('div')); + $form->addElement(form_makeOpenTag('span', array('class' => 'sum'))); - $form->addElement(' – '); + if (!$media_id) $form->addElement(' – '); if (!$media_id) $form->addElement(htmlspecialchars($INFO['sum'])); $form->addElement(form_makeCloseTag('span')); @@ -502,6 +504,9 @@ function html_revisions($first=0, $media_id = false){ $form->addElement(form_makeCloseTag('span')); $form->addElement('('.$lang['current'].')'); + + if ($media_id) $form->addElement(form_makeCloseTag('div')); + $form->addElement(form_makeCloseTag('div')); $form->addElement(form_makeCloseTag('li')); } @@ -555,8 +560,10 @@ function html_revisions($first=0, $media_id = false){ $form->addElement($id); } + if ($media_id) $form->addElement(form_makeOpenTag('div')); + $form->addElement(form_makeOpenTag('span', array('class' => 'sum'))); - $form->addElement(' – '); + if (!$media_id) $form->addElement(' – '); $form->addElement(htmlspecialchars($info['sum'])); $form->addElement(form_makeCloseTag('span')); @@ -571,6 +578,8 @@ function html_revisions($first=0, $media_id = false){ } $form->addElement(form_makeCloseTag('span')); + if ($media_id) $form->addElement(form_makeCloseTag('div')); + $form->addElement(form_makeCloseTag('div')); $form->addElement(form_makeCloseTag('li')); } diff --git a/lib/scripts/media.js b/lib/scripts/media.js index 00a4821d08513ce057f3b74237de6170824bfbd8..a6f6c25d4a11af4e3a7d0b3f63491a51774e35dc 100644 --- a/lib/scripts/media.js +++ b/lib/scripts/media.js @@ -373,7 +373,7 @@ var dw_mediamanager = { dw_mediamanager.update_resizable(0); dw_mediamanager.opacity_slider(); dw_mediamanager.portions_slider(); - + addInitEvent(revisionsForm); }, 'html' ); diff --git a/lib/scripts/script.js b/lib/scripts/script.js index b44d95d6f06148462ea59358dd49bd1a5768567b..33916a92ec201bfd34364b9df1acf6e7c3f11a77 100644 --- a/lib/scripts/script.js +++ b/lib/scripts/script.js @@ -285,12 +285,7 @@ function closePopups(){ jQuery('div.JSpopup').hide(); } -/** - * disable multiple revisions checkboxes if two are checked - * - * @author Anika Henke <anika@selfthinker.org> - */ -addInitEvent(function(){ +function revisionsForm(){ var revForm = $('page__revisions'); if (!revForm) return; var elems = revForm.elements; @@ -312,7 +307,15 @@ addInitEvent(function(){ input1.disabled = true; } } -}); +} + + +/** + * disable multiple revisions checkboxes if two are checked + * + * @author Anika Henke <anika@selfthinker.org> + */ +addInitEvent(revisionsForm); /** diff --git a/lib/tpl/default/mediamanager.css b/lib/tpl/default/mediamanager.css index 25cfe07e909a09d94770078d87150d9c05c9c3a8..490d90c62c2d09d9b14536b11bfa60a80bef498f 100644 --- a/lib/tpl/default/mediamanager.css +++ b/lib/tpl/default/mediamanager.css @@ -299,6 +299,24 @@ form.meta textarea.edit { max-width: 95%; } +/* Revisions form */ + +#mediamanager__details #page__revisions ul { + margin-left: 10px; + list-style-type: none; +} + +#mediamanager__details #page__revisions ul li div.li div { + font-size: 12px; + color: gray; + padding-left: 18px; +} + +#mediamanager__details #page__revisions ul li div.li input { + position: relative; + top: 1px; +} + /* File diff */ #mediamanager__diff_table {