From c88725e0fe751c4a6e784315e5686a13c8214afe Mon Sep 17 00:00:00 2001 From: llaffont <llaffont@afi-sa.fr> Date: Wed, 3 Feb 2016 12:22:10 +0100 Subject: [PATCH] dev #37100 better permalink window --- library/ZendAfi/View/Helper/Permalink.php | 29 +++++++++++------------ public/opac/css/global.css | 1 - 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/library/ZendAfi/View/Helper/Permalink.php b/library/ZendAfi/View/Helper/Permalink.php index 79d18c48eec..7e19456f18a 100644 --- a/library/ZendAfi/View/Helper/Permalink.php +++ b/library/ZendAfi/View/Helper/Permalink.php @@ -26,22 +26,21 @@ class ZendAfi_View_Helper_Permalink extends ZendAfi_View_Helper_BaseHelper { ? $profil->getUrlImage($icon) : URL_ADMIN_IMG . 'reseaux/permalink.gif'; - $lien_permanent = $this->translate()->_('Lien permanent'); - $html = $this->view->tagImgHover($icon_url, - ['class' => 'permalien-img', - 'title' => $lien_permanent, - 'alt' => $lien_permanent, - 'onclick' => '$(this).next().children().first().toggle()']); + $dialog = $this->view->tag('div', + $this->view->tag('p', $this->view->_('Copiez le lien suivant') . ':') + . $this->view->tag('input', + '', + ['type' => 'url', + 'readonly' => 'readonly', + 'value' => $url, + 'style' => 'width: 100%']), + ['title' => $this->view->_('Lien permanent')]); - $html .= '<div><div style="display:none; z-index: 101;">'; - $html .= '<div>' . $lien_permanent . '</div>'; - $html .= '<div>' . - '<a href="#" onclick="$(this).parent().parent().hide(); return false">» ' . $this->translate()->_('fermer cette fenêtre') . '</a>'. - '</div>'; - $html .= $this->view->tag('span', $url, ['class' => 'permalink-url']); - $html .='</div></div>'; - - return $html; + return $this->view->tagImgHover($icon_url, + ['class' => 'permalien-img', + 'title' => $lien_permanent, + 'alt' => $lien_permanent, + 'onclick' => '$(\'' . htmlentities($dialog) . '\').dialog({width:500, height:150})']); } } diff --git a/public/opac/css/global.css b/public/opac/css/global.css index 8fd4e4843da..0f9dc2908db 100644 --- a/public/opac/css/global.css +++ b/public/opac/css/global.css @@ -2256,7 +2256,6 @@ button.vodeclic_link + img { float:left; } -.permalink-url, .embed-code-to-copy { margin:5px; border:1px solid #C8C8C8; -- GitLab