Skip to content

Commit

Permalink
Merge branch 'hotfix/fix_codestyle' into 'release/2.3.0'
Browse files Browse the repository at this point in the history
Fix code style

See merge request metamodels/core!359
  • Loading branch information
zonky2 committed Nov 20, 2024
2 parents bcdcba6 + 8a303cb commit 90f1669
Show file tree
Hide file tree
Showing 4 changed files with 144 additions and 102 deletions.
168 changes: 103 additions & 65 deletions src/CoreBundle/Resources/public/scss/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,117 +29,148 @@ $icon_filter_setting: url('../images/icons/filter_settings.png');
$icon_locale: url('../images/icons/locale.png');

.header_css_fields {
padding: 2px 0 3px 20px;
background-image: $icon_fields;
background-position: left center;
background-repeat: no-repeat;
padding: 2px 0 3px 20px;
background-image: $icon_fields;
background-position: left center;
background-repeat: no-repeat;
margin-left: 15px;
}

.header_add_all {
padding: 2px 0 3px 20px;
background-image: $icon_dca_add;
background-position: left center;
background-repeat: no-repeat;
padding: 2px 0 3px 20px;
background-image: $icon_dca_add;
background-position: left center;
background-repeat: no-repeat;
margin-left: 15px;
}

.rendersetting_add_all {
background-image: $icon_rendersettings_add;
background-image: $icon_rendersettings_add;
}

.dca_palette {
color: rgba(138, 184, 88, 1);
margin: 6px 0;
padding-left: 24px;
background: $icon_pal_open 3px center no-repeat;
color: rgba(138, 184, 88, 1);
margin: 6px 0;
padding-left: 24px;
background: $icon_pal_open 3px center no-repeat;
}

.mm_problem_display {
margin-bottom: 30px;
ul {
padding: 0;
list-style: none;
}
margin-bottom: 30px;

ul {
padding: 0;
list-style: none;
}
}

.tl_subdca {
> legend {
margin: 0;
padding: 10px 0 10px 23px;
background: $icon_filter_setting no-repeat left center;
}
legend label {
font-weight: bold;
}
> legend {
margin: 0;
padding: 10px 0 10px 23px;
background: $icon_filter_setting no-repeat left center;
}

legend label {
font-weight: bold;
}
}

.list_view {
li:first-child .tl_content {
border-top: 1px solid rgba(235, 235, 228, 1);
}
.tl_content > div:first-child {
float: left;
}
li:first-child .tl_content {
border-top: 1px solid rgba(235, 235, 228, 1);
}

.tl_content > div:first-child {
float: left;
}
}

.tl_class {
color: rgba(198, 198, 198, 1);
color: rgba(198, 198, 198, 1);
}

.tl_formbody {
position: relative;
position: relative;
}

input[readonly] {
background-color: rgba(235, 235, 228, 1);
&:focus {
background-color: rgba(235, 235, 228, 1);
}
background-color: rgba(235, 235, 228, 1);

&:focus {
background-color: rgba(235, 235, 228, 1);
}
}

textarea[readonly] {
background-color: rgba(235, 235, 228, 1);
&:focus {
background-color: rgba(235, 235, 228, 1);
}
background-color: rgba(235, 235, 228, 1);

&:focus {
background-color: rgba(235, 235, 228, 1);
}
}

.wc_info {
margin: 0;
margin: 0;
}

.wc_label {
width: 31px;
display: inline-block;
width: 31px;
display: inline-block;
}

.clx {
overflow: visible;
overflow: visible;
}

.w50x {
height: auto;
height: auto;
}

#table_tl_metamodel_dcasetting_ tr.odd td {
background-color: transparent;
background-color: transparent;
}

.dca_combine.widget td:empty {
display: none;
display: none;
}

form[id*="tl_metamodel_"] .wizard {
a[data-lightbox] img {
margin-top: 3px;
}
a[onclick] img {
margin-top: 3px;
}
a[data-lightbox] img {
margin-top: 3px;
}

a[onclick] img {
margin-top: 3px;
}
}

div[class*="table_tl_metamodel_"] .tl_file_list {
padding: 4px 0 6px;
padding: 4px 0 6px;
}

fieldset.tl_subdca {
padding: 0;
margin: 0;
border: none;
padding: 0;
margin: 0;
border: none;
}

.multicolumnwizard .fallback_language span {
font-weight: bold;
font-weight: bold;
}

form[id^=mm_] .sort_hint {
display: none;
display: none;
}

.long .chzn-container {
width: 100%;
width: 100%;
}

.widget.translat-attr label {
padding-left: 20px;
display: inline-block;
background: $icon_locale no-repeat left center;
padding-left: 20px;
display: inline-block;
background: $icon_locale no-repeat left center;
}

.tl_formbody_edit .settings {
Expand All @@ -150,24 +181,31 @@ form[id^=mm_] .sort_hint {
.jumpTo_language {
width: 15%;
}

.jumpTo_type {
width: 15%;

select {
width: 100%;
}
}

.jumpTo_page {
width: 15%;

input {
width: 83%;
}
}

.jumpTo_filter {
width: 55%;

select, div.tl_select {
width: 100%;
}
}

.operations {
display: none;
}
Expand Down
70 changes: 35 additions & 35 deletions src/CoreBundle/Resources/public/scss/supportscreen.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file is part of MetaModels/core.
*
* (c) 2012-2019 The MetaModels team.
* (c) 2012-2024 The MetaModels team.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand All @@ -14,7 +14,7 @@
* @author Ingolf Steinhardt <info@e-spin.de>
* @author Sven Baumann <baumann.sv@gmail.com>
* @author Carolina Koehn <ck@kikmedia.de>
* @copyright 2012-2019 The MetaModels team.
* @copyright 2012-2024 The MetaModels team.
* @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later
* @filesource
*/
Expand All @@ -26,36 +26,36 @@ $white: rgba(255, 255, 255, 1);
$url_metamodels: url('https://now.metamodel.me/files/standard/layout/images/metamodels.png');

.mm_support_display {
padding: 15px;
.logo {
display: block;
height: 38px;
text-indent: -99999px;
width: 169px;
background: $white $url_metamodels no-repeat top left;
}
h1 {
margin-bottom: 20px;
}
.colset {
width: 100%;
padding-top: 10px;
padding-bottom: 10px;
overflow: hidden;
clear: both;
form {
padding-top: 10px;
}
.left {
width: 35%;
float: left;
}
.right {
float: right;
width: 60%;
}
}
a {
text-decoration: underline;
}
}
padding: 15px;
.logo {
display: block;
height: 38px;
text-indent: -99999px;
width: 169px;
background: $white $url_metamodels no-repeat top left;
}
h1 {
margin-bottom: 20px;
}
.colset {
width: 100%;
padding-top: 10px;
padding-bottom: 10px;
overflow: hidden;
clear: both;
form {
padding-top: 10px;
}
.left {
width: 35%;
float: left;
}
.right {
float: right;
width: 60%;
}
}
a {
text-decoration: underline;
}
}
7 changes: 6 additions & 1 deletion src/DcGeneral/Data/FilterBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,8 @@ private function buildSearchAttributeFilterRule(IAttribute $attribute, string $v
$languages[] = $metaModel->getActiveLanguage();
}

// FIXME: this does correctly search in the current language but does NOT fall back to the fall back language
// This is a problem when we have selected items that have no translation.
return new SearchAttribute($attribute, $value, \array_filter($languages));
}

Expand All @@ -464,7 +466,10 @@ private function assertValidCompareOperation(array $filter): void
private function assertValidInList(array $filter): void
{
assert(\is_string($filter['property'] ?? null));
assert(\is_string($value = ($filter['value'] ?? null)) || \is_int($value) || \is_float($value));
assert(\is_array($filter['values'] ?? null));
foreach ($filter['values'] as $value) {
assert(\is_string($value) || \is_int($value) || \is_float($value));
}
assert($filter['operation'] === 'IN');
}

Expand Down
1 change: 0 additions & 1 deletion src/Helper/ToolboxFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBagInterface;
use Symfony\Component\HttpFoundation\Session\Session;

/**
* This class provides various methods for handling file collection within Contao.
Expand Down

0 comments on commit 90f1669

Please sign in to comment.