diff --git a/application/modules/admin/views/scripts/widget/versions.phtml b/application/modules/admin/views/scripts/widget/versions.phtml index 63168da3ac2f5dfadd7ab86b45bff29303e19153..cfdbc95c3c0f423325e7200b75aa365a5dbccc1d 100644 --- a/application/modules/admin/views/scripts/widget/versions.phtml +++ b/application/modules/admin/views/scripts/widget/versions.phtml @@ -13,7 +13,7 @@ $details = ['url' => '/admin/widget/version/id_profil/' . $this->widget->getProf if ($this->isPopup()) { $details['url'] .= '/render/popup'; - $details['anchorOptions'] = ['onclick' => 'opacDialogClose(); opacDialogFromUrl(this.href); return false;']; + $details['anchorOptions'] = ['onclick' => 'opacDialogFromUrl(this.href); return false;']; } $confirm = $this->_('Êtes-vous sur de vouloir supprimer cette version de l\\\'historique ?'); @@ -25,9 +25,8 @@ $delete = ['url' => '/admin/widget/version-delete/id_profil/'. $this->widget->ge if ($this->isPopup()) { $delete['url'] .= '/render/popup'; - $delete['anchorOptions'] = ['onclick' => sprintf("if (confirm('%s')) { %s }; return false;", - htmlspecialchars($confirm), - "opacDialogClose(); opacDialogFromUrl(this.href);")]; + $delete['anchorOptions'] = ['onclick' => sprintf("if (confirm('%s')) { opacDialogFromUrl(this.href); }; return false;", + htmlspecialchars($confirm))]; } $actions = [$details, $delete]; diff --git a/library/ZendAfi/Controller/Action/Helper/ViewRenderer.php b/library/ZendAfi/Controller/Action/Helper/ViewRenderer.php index d7bf0b1d2c1093b0a5d4888fc47ba8c7a8e03872..f07249841a12e065ed6c41d19f6d41b3fd40ab3a 100644 --- a/library/ZendAfi/Controller/Action/Helper/ViewRenderer.php +++ b/library/ZendAfi/Controller/Action/Helper/ViewRenderer.php @@ -18,18 +18,14 @@ * along with BOKEH; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -//////////////////////////////////////////////////////////////////////////////////////////// -// OPAC3 : MECANISME DE BASE POUR LE RENDU DU SITE -//////////////////////////////////////////////////////////////////////////////////////////// + class ZendAfi_Controller_Action_Helper_ViewRenderer extends Zend_Controller_Action_Helper_ViewRenderer { protected $_layoutScript = 'module.phtml', $_render_popup = false; -//------------------------------------------------------------------------------- -// Constructeur -//------------------------------------------------------------------------------- + public function __construct() { $options['viewSuffix'] = 'phtml'; $view = new ZendAfi_Controller_Action_Helper_View(); @@ -46,9 +42,7 @@ class ZendAfi_Controller_Action_Helper_ViewRenderer extends Zend_Controller_Acti return ('embed' === $this->getRouteName()); } -//------------------------------------------------------------------------------- -// Initialisation du view : Rajout des chemins sur helpers et skin courant -//------------------------------------------------------------------------------- + public function preDispatch() { $this->_initializeHelperPaths(); @@ -110,12 +104,12 @@ class ZendAfi_Controller_Action_Helper_ViewRenderer extends Zend_Controller_Acti $this->view->bePopup(); $this->setLayoutScript('popup.phtml'); $this->getResponse()->setHeader('Content-Type', 'application/json'); + Class_Admin_Skin::current()->renderJQueryCssOn(Class_ScriptLoader::getInstance()); + return $this; } -//------------------------------------------------------------------------------- -// Rendu du contenu html du site (layout + script courant) -//------------------------------------------------------------------------------- + public function renderScript($script, $name = null) { $this->view->actionScript = $script; $layoutScript = $this->getLayoutScript(); @@ -137,6 +131,4 @@ class ZendAfi_Controller_Action_Helper_ViewRenderer extends Zend_Controller_Acti $this->getResponse()->setBody(json_encode($result)); } } - } - -?> \ No newline at end of file +} diff --git a/library/ZendAfi/Form/VersionHelper.php b/library/ZendAfi/Form/VersionHelper.php index 53efef690568f7574b489b824a7c1dfdee2f0688..27dc2b51b2156de59d5ecdac57c3e5ef3c494ee6 100644 --- a/library/ZendAfi/Form/VersionHelper.php +++ b/library/ZendAfi/Form/VersionHelper.php @@ -22,6 +22,7 @@ class ZendAfi_Form_VersionHelper { public function prepare($form, $datas) { + $form->setAttrib('tabindex', '0'); foreach($form->getElements() as $element) $this->_prepareElement($element, $datas); } diff --git a/library/ZendAfi/View/Helper/Admin/RenderVersionForm.php b/library/ZendAfi/View/Helper/Admin/RenderVersionForm.php index 84cd32674ed602d2352a8726435c78c8e0ff4eb6..9d933a19387013f616feec10ee9517ae5d595da4 100644 --- a/library/ZendAfi/View/Helper/Admin/RenderVersionForm.php +++ b/library/ZendAfi/View/Helper/Admin/RenderVersionForm.php @@ -90,7 +90,7 @@ $('#" . $form->getId() . "').find('fieldset').each(function(i, elem) { $back ->setUrl($this->view->url(['key' => $previous->getId()])) ->setAttribs($this->view->isPopup() - ? ['onclick' => 'opacDialogClose(); opacDialogFromUrl(\''.$back->getUrl().'\'); return false;'] + ? ['onclick' => 'opacDialogFromUrl(\''.$back->getUrl().'\'); return false;'] : []); } @@ -110,7 +110,7 @@ $('#" . $form->getId() . "').find('fieldset').each(function(i, elem) { $forward ->setUrl($this->view->url(['key' => $next->getId()])) ->setAttribs($this->view->isPopup() - ? ['onclick' => 'opacDialogClose(); opacDialogFromUrl(\''.$forward->getUrl().'\'); return false;'] + ? ['onclick' => 'opacDialogFromUrl(\''.$forward->getUrl().'\'); return false;'] : []); return $this->view->Button($forward); @@ -126,7 +126,7 @@ $('#" . $form->getId() . "').find('fieldset').each(function(i, elem) { ['style' => 'filter: invert();'])); if ($this->view->isPopup()) - $list->setAttribs(['onclick' => 'opacDialogClose(); opacDialogFromUrl(\''.$list->getUrl().'\'); return false;']); + $list->setAttribs(['onclick' => 'opacDialogFromUrl(\''.$list->getUrl().'\'); return false;']); return $this->view->Button($list); }