diff --git a/styles/default/colorbox_style.css b/styles/default/colorbox_style.css index 2517c7f..bd9fb8e 100644 --- a/styles/default/colorbox_style.css +++ b/styles/default/colorbox_style.css @@ -214,3 +214,22 @@ #cboxClose:hover { background-position: -25px -25px; } + +/** + * Colorbox module default style: + * Download link styles + */ +#cboxWrapper { + background: none; +} +#cboxContent a { + color: #000; +} +#cboxDownload { + position: absolute; + bottom: 5px; + right: 24px; +} +#cboxDownload span { + display: none; +} \ No newline at end of file diff --git a/styles/default/colorbox_style.js b/styles/default/colorbox_style.js index 47875ff..477d5f1 100644 --- a/styles/default/colorbox_style.js +++ b/styles/default/colorbox_style.js @@ -16,6 +16,16 @@ Drupal.behaviors.initColorboxDefaultStyle = { $('#cboxTitle', context).hide(); } }); + if ($('#cboxLoadedContent > img').attr('src')) { + var fullHref = $('#cboxLoadedContent > img').attr('src').replace(/styles\/large\/public\//,''); + var fullLink = $(''); + fullLink.attr('href', fullHref); + fullLink.attr('target', 'new'); + fullLink.attr('title', 'Right click to download'); + fullLink.text('Download'); + $('#cboxCurrent').append(" | "); + $('#cboxCurrent').append(fullLink); + } } };