Commit b4d7390b authored by Ghislain Loas's avatar Ghislain Loas
Browse files

Merge branch...

Merge branch 'hotline#75198_affichage_kiosque_dans_article_sans_correspondance_avec_nom_domaine' into 'hotline'

Hotline#75198 affichage kiosque dans article sans correspondance avec nom domaine

See merge request afi/opacce!2659
parents 78549e5b 75d98eb7
- ticket #75198 : Administration : correction du composant de sélection de domaines ou de paniers dans les écrans de configuration.
\ No newline at end of file
......@@ -243,15 +243,8 @@ class Admin_CatalogueController extends ZendAfi_Controller_Action {
public function domainesPaniersJsonAction() {
$this->_helper->viewRenderer->setNoRender();
$data = [];
$data[] = $this->_user->getPaniersJson();
$data[] = (new Class_Catalogue())->getDomainesJson();
$data[] = (new Class_PanierNotice())->getPaniersAdminsNotInCatalogueJson();
$JSON = json_encode($data);
$this->getResponse()->setHeader('Content-Type', 'application/json; charset=utf-8');
$this->getResponse()->setBody($JSON);
$this->_helper->json([$this->_user->getPaniersJson(),
(new Class_Catalogue())->getDomainesJson(),
(new Class_PanierNotice())->getPaniersAdminsNotInCatalogueJson()]);
}
}
\ No newline at end of file
......@@ -24,7 +24,7 @@ class ZendAfi_Form_Element_DomainePanier extends ZendAfi_Form_Element_TreeSelect
public function __construct($spec, $options = null) {
$options = array_merge(['UrlDataSource' => Class_Url::assemble(['module' => 'admin',
'controller' => 'catalogue',
'action' => 'domaines-paniers']).'.json',
'action' => 'domaines-paniers-json']),
'MultipleSelection' => false,
'InputIdCategoriesName' => 'id_catalogue',
'InputIdItemsName' => 'id_panier',
......
......@@ -9,12 +9,18 @@
vertical-align: top;
}
.ui-treeselect-items-tree,
.ui-treeselect-items-tree {
overflow-y: scroll;
}
.ui-treeselect-selected-items {
max-height: 300px;
overflow-y: auto;
overflow-y: scroll;
}
.ui-treeselect-items-tree ,
.ui-treeselect-selected-items {
max-height: 400px;
}
.ui-treeselect-items-tree {
width: 65%;
......@@ -64,7 +70,6 @@
}
.ui-treeselect li {
padding: 2px 0px 2px 0px;
list-style-type: none;
}
......@@ -73,12 +78,16 @@
}
.ui-treeselect-selected-items .hint {
float: right;
position: absolute;
margin-top: -5px;
margin-left: 50px;
padding: 10px;
width: 200px;
z-index: 1;
top: 28px;
left: -1px;
padding: 1ex 0.5em;
max-width: 200px;
overflow: hidden;
border: 1px solid !important;
border-radius: 5px;
background-color: #EEE;
}
.ui-treeselect-selected-items .hint li {
......@@ -96,14 +105,34 @@
.ui-treeselect-selected-items li {
padding: 0px;
display: block;
width: 100%;
}
.ui-treeselect-selected-items ul > li {
padding: 0.5ex 0.3em;
margin-bottom: 0.5ex;
border: 1px solid;
position: relative;
}
.ui-treeselect-selected-items li a {
padding: 5px 20px 5 px 5px;
margin-left: auto;
margin-right: auto;
display: block;
display: inline-block;
width: 85%;
background: none !important;
overflow: hidden;
text-overflow: ellipsis;
vertical-align: top;
border: none !important;
padding: 0;
white-space: nowrap;
}
.ui-treeselect-selected-items ul > li:last-child {
margin-bottom: 80px;
}
.ui-treeselect-selected-items li a img {
margin-right: 0.3em;
vertical-align: top;
}
......@@ -114,11 +143,10 @@
.remove_button {
background: url('remove.gif') no-repeat center center;
display: block;
width: 20px;
height: 20px;
float: right;
margin: -25px 5px 0px 0px;
display: inline-block;
width: 16px;
height: 16px;
vertical-align: top;
}
......
This diff is collapsed.
......@@ -128,7 +128,7 @@ class WidgetControllerKiosqueTest extends WidgetControllerDispatchWidgetConfigur
/** @test */
public function domainesPaniersJsonUrlShouldResetActionParameters() {
$this->assertXPathContentContains('//script', 'getJSON("/admin/catalogue/domaines-paniers.json",');
$this->assertXPathContentContains('//script', 'getJSON("/admin/catalogue/domaines-paniers-json",');
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment