diff --git a/application/modules/admin/views/scripts/cms/edit.phtml b/application/modules/admin/views/scripts/cms/edit.phtml index 6fa3862b764ed16c2f03825def6c322c8797d26b..3c45021526c957ab299fe7f4ea4a1a3aad44fde2 100644 --- a/application/modules/admin/views/scripts/cms/edit.phtml +++ b/application/modules/admin/views/scripts/cms/edit.phtml @@ -1,7 +1,8 @@ <?php -if(!$this->_is_popup) - echo $this->partial('cms/_newsform_head.phtml', ['article' => $this->article]); +echo $this->partial('cms/_newsform_head.phtml', ['article' => $this->article]); + if ($this->article->isTraduction()) $this->form->setOriginal($this->article->getArticleOriginal()); + echo $this->renderForm($this->form); ?> diff --git a/public/admin/js/treeselect/treeselect.js b/public/admin/js/treeselect/treeselect.js index a54010fce3faabfbd1c641d01b18e26834c842ad..a60673642a77ecd8c456bbd27f8cfad54222bb13 100644 --- a/public/admin/js/treeselect/treeselect.js +++ b/public/admin/js/treeselect/treeselect.js @@ -298,7 +298,7 @@ this._findConnectedIn(li, this.selectedItems). hide('fast', function(){ $(this).remove()}); - + this.itemsTree.closest('form').find('input').first().change(); li.children('input').removeAttr('checked'); li.find("li input").removeAttr('disabled'); li.children('a').removeClass('ui-state-active'); diff --git a/public/admin/skins/bokeh74/form.css b/public/admin/skins/bokeh74/form.css index 2400d19a8de078b128a4d63455e12ff9915d1737..fa7f74f4122a995220188af44dda771c5ad3086e 100644 --- a/public/admin/skins/bokeh74/form.css +++ b/public/admin/skins/bokeh74/form.css @@ -46,4 +46,28 @@ .admin-form [type="checkbox"] { -webkit-appearance: checkbox; +} + +.content_edit_head dt, +.content_edit_head dd { + display: inline-block; + margin: 0; +} + +.content_edit_head dt { + font-weight: bold; + padding-right: 0.3em; +} + +.content_edit_head dd { + padding-right: 1em; +} + +.content_edit_head dl { + margin: 0.3em 0; +} + +.content_edit_head img { + height: 16px; + margin: 0 0.3em; } \ No newline at end of file diff --git a/public/admin/skins/bokeh74/jquery.css b/public/admin/skins/bokeh74/jquery.css index c67f705ec9aec91ef88f8a2d4bb6a0caa2c2e6ab..068f28dd7be83e97903391c9a8ab558daf785dae 100644 --- a/public/admin/skins/bokeh74/jquery.css +++ b/public/admin/skins/bokeh74/jquery.css @@ -14,7 +14,7 @@ body .ui-tabs .ui-tabs-panel { } body .ui-dialog-titlebar { - background: var(--nav-background); + background: var(--nav-background) !important; } body .ui-dialog-titlebar .ui-dialog-title { @@ -29,9 +29,12 @@ body .ui-widget-content { padding: 0; } -body .ui-dialog { - z-index: 1001; +body .ui-dialog.fixed_popup { position: fixed !important; +} + + +body .ui-dialog { box-shadow: 0 0 15px var(--widget-shadow); border: 2px solid var(--nav-background); border-radius: 0; @@ -163,3 +166,17 @@ body .ui-accordion .ui-accordion-header { body .ui-state-active .ui-accordion-header-icon { transform: rotate(-90deg); } + +body .ui-dialog table td { + border: none !important; +} + +body .ui-dialog table td.gauche *, +body .ui-dialog table td.gauche { + text-align: left !important; +} + +body .ui-dialog table td.droite *, +body .ui-dialog table td.droite { + text-align: right !important; +} \ No newline at end of file diff --git a/public/opac/css/global.css b/public/opac/css/global.css index 5e0e02a7887e11fd815290085dc005df3476797e..dcb76a3f24fcaa0eacd556eb69c2c7507f0ab4f3 100644 --- a/public/opac/css/global.css +++ b/public/opac/css/global.css @@ -3503,6 +3503,7 @@ a.edit_menu { margin: 0; left: 0; top: 3px; + z-index: 101; } a.edit_menu img { diff --git a/public/opac/js/subModal.js b/public/opac/js/subModal.js index 66023fdb51556817ed3f9ee708856294451a67b5..aa3af84ef282d920217765d154133404e5963310 100644 --- a/public/opac/js/subModal.js +++ b/public/opac/js/subModal.js @@ -74,6 +74,9 @@ var onOpen = function() { initializePopups(); addLoadingClass(); + setTimeout(function() { + $('.ui-dialog').addClass('fixed_popup'); + }, 100); } @@ -149,23 +152,19 @@ container[0].innerHTML = data['content']; - if(data['width']) - modal_size['width'] = data['width']; - if (data['show_modal'] && data['show_modal']=='true') show_modal=true; var titre = titre; var modal = container.dialog({ - width:modal_size['width'], - height:modal_size['height'], + width: modal_size.width, + height: modal_size.height, + maxHeight: 800, + maxWidth: 1024, modal:show_modal, dialogClass: dialogClass, close:onClose, open: function() {setTimeout(onOpen, 100);}, - position: {my : 'center bottom', - at : 'center center', - of : window} }).closest('.ui-dialog').find('.ui-dialog-title').html(titre); return modal; } diff --git a/tests/application/modules/admin/controllers/CmsControllerTest.php b/tests/application/modules/admin/controllers/CmsControllerTest.php index 4a593913a843b3454a2174f7f2c8618d8d729d8b..d1a7cf26cd0b8dd5a45dc4c11537a9b859833020 100644 --- a/tests/application/modules/admin/controllers/CmsControllerTest.php +++ b/tests/application/modules/admin/controllers/CmsControllerTest.php @@ -779,6 +779,24 @@ class CmsControllerArticleConcertEditRenderPopupActionTest extends CmsController $this->_xpath = new Storm_Test_XPath(); } + /** @test */ + public function tagPreviewArticleShouldNotHaveRenderPopupInLink() { + $this->_xpath->assertXPath($this->_json->content, + '//a[contains(@href, "cms/articleview/id/4?iframe=true")]'); + } + + + /** @test */ + public function prettyPhotoShouldBeLoaded() { + $this->_xpath->assertXPath($this->_json->content, '//script[contains(@src, "jquery.prettyPhoto")]'); + } + + + /** @test */ + public function linkToEditLangEnShouldHaveDataPopup() { + $this->_xpath->assertXPath($this->_json->content, '//a[contains(@href, "edit/id/4/lang/en")][@data-popup="true"]'); + } + /** @test */ public function boutonRetourShouldCloseThePopup() {