Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/support/3.0' into develop
Browse files Browse the repository at this point in the history
# Conflicts:
#	css/backoffice/pages/_csv-import.scss
#	pages/ajax.render.php
  • Loading branch information
bdalsass committed Mar 3, 2023
2 parents a048373 + 93c0b98 commit 7ae86a8
Show file tree
Hide file tree
Showing 18 changed files with 242 additions and 57 deletions.
12 changes: 7 additions & 5 deletions application/ui.extkeywidget.class.inc.php
Expand Up @@ -5,6 +5,7 @@
*/

use Combodo\iTop\Application\UI\Base\Component\Form\FormUIBlockFactory;
use Combodo\iTop\Application\UI\Base\Component\Input\InputUIBlockFactory;
use Combodo\iTop\Application\UI\Base\Layout\UIContentBlockUIBlockFactory;
use Combodo\iTop\Core\MetaModel\FriendlyNameType;

Expand Down Expand Up @@ -323,12 +324,12 @@ public function DisplaySelect(WebPage $oPage, $iMaxComboLength, $bAllowTargetCre
EOF
);
$sHTMLValue .= "<div class=\"ibo-input-select--action-buttons\">";
$sHTMLValue .= " <div class=\"ibo-input-select--action-button ibo-input-select--action-button--clear ibo-is-hidden\" id=\"mini_clear_{$this->iId}\" onClick=\"oACWidget_{$this->iId}.Clear();\" data-tooltip-content='".Dict::S('UI:Button:Clear')."'><i class=\"fas fa-times\"></i></div>";
$sHTMLValue .= " <a href=\"#\" class=\"ibo-input-select--action-button ibo-input-select--action-button--clear ibo-is-hidden\" id=\"mini_clear_{$this->iId}\" onClick=\"oACWidget_{$this->iId}.Clear();\" data-tooltip-content='".Dict::S('UI:Button:Clear')."'><i class=\"fas fa-times\"></i></a>";
}
if ($bCreate && $bExtensions) {
$sCallbackName = (MetaModel::IsAbstract($this->sTargetClass)) ? 'SelectObjectClass' : 'CreateObject';

$sHTMLValue .= "<div class=\"ibo-input-select--action-button ibo-input-select--action-button--create\" id=\"mini_add_{$this->iId}\" onClick=\"oACWidget_{$this->iId}.{$sCallbackName}();\" data-tooltip-content='".Dict::S('UI:Button:Create')."'><i class=\"fas fa-plus\"></i></div>";
$sHTMLValue .= "<a href=\"#\" class=\"ibo-input-select--action-button ibo-input-select--action-button--create\" id=\"mini_add_{$this->iId}\" onClick=\"oACWidget_{$this->iId}.{$sCallbackName}();\" data-tooltip-content='".Dict::S('UI:Button:Create')."'><i class=\"fas fa-plus\"></i></a>";
$oPage->add_ready_script(
<<<JS
if ($('#ajax_{$this->iId}').length == 0)
Expand All @@ -339,7 +340,7 @@ public function DisplaySelect(WebPage $oPage, $iMaxComboLength, $bAllowTargetCre
);
}
if ($bExtensions && MetaModel::IsHierarchicalClass($this->sTargetClass) !== false) {
$sHTMLValue .= "<div class=\"ibo-input-select--action-button ibo-input-select--action-button--hierarchy\" id=\"mini_tree_{$this->iId}\" onClick=\"oACWidget_{$this->iId}.HKDisplay();\" data-tooltip-content='".Dict::S('UI:Button:SearchInHierarchy')."'><i class=\"fas fa-sitemap\"></i></div>";
$sHTMLValue .= "<a href=\"#\" class=\"ibo-input-select--action-button ibo-input-select--action-button--hierarchy\" id=\"mini_tree_{$this->iId}\" onClick=\"oACWidget_{$this->iId}.HKDisplay();\" data-tooltip-content='".Dict::S('UI:Button:SearchInHierarchy')."'><i class=\"fas fa-sitemap\"></i></a>";
$oPage->add_ready_script(
<<<JS
if ($('#ac_tree_{$this->iId}').length == 0)
Expand All @@ -350,7 +351,7 @@ public function DisplaySelect(WebPage $oPage, $iMaxComboLength, $bAllowTargetCre
);
}
if ($oAllowedValues->CountExceeds($iMaxComboLength)) {
$sHTMLValue .= " <div class=\"ibo-input-select--action-button ibo-input-select--action-button--search\" id=\"mini_search_{$this->iId}\" onClick=\"oACWidget_{$this->iId}.Search();\" data-tooltip-content='".Dict::S('UI:Button:Search')."'><i class=\"fas fa-search\"></i></div>";
$sHTMLValue .= " <a href=\"#\" class=\"ibo-input-select--action-button ibo-input-select--action-button--search\" id=\"mini_search_{$this->iId}\" onClick=\"oACWidget_{$this->iId}.Search();\" data-tooltip-content='".Dict::S('UI:Button:Search')."'><i class=\"fas fa-search\"></i></a>";
}
$sHTMLValue .= "</div>";
$sHTMLValue .= "</div>";
Expand Down Expand Up @@ -904,7 +905,7 @@ public function GetClassSelectionForm(WebPage $oPage)
{
// For security reasons: check that the "proposed" class is actually a subclass of the linked class
// and that the current user is allowed to create objects of this class
$aSubClasses = MetaModel::EnumChildClasses($this->sTargetClass);
$aSubClasses = MetaModel::EnumChildClasses($this->sTargetClass, ENUM_CHILD_CLASSES_ALL);
$aPossibleClasses = array();
foreach($aSubClasses as $sCandidateClass)
{
Expand All @@ -924,6 +925,7 @@ public function GetClassSelectionForm(WebPage $oPage)
$sDialogTitleEscaped = addslashes($sDialogTitle);
$oPage->add_ready_script("$('#ac_create_$this->iId').dialog({ width: 'auto', height: 'auto', maxHeight: $(window).height() - 50, autoOpen: false, modal: true, title: '$sDialogTitleEscaped'});\n");
$oPage->add_ready_script("$('#ac_create_{$this->iId} form').removeAttr('onsubmit');");
$oPage->add_ready_script("$('#ac_create_{$this->iId} form').find('select').attr('id', 'ac_create_{$this->iId}_select');");
$oPage->add_ready_script("$('#ac_create_{$this->iId} form').on('submit.uilinksWizard', oACWidget_{$this->iId}.DoSelectObjectClass);");
}

Expand Down
2 changes: 1 addition & 1 deletion application/ui.searchformforeignkeys.class.inc.php
Expand Up @@ -60,7 +60,7 @@ public function ShowModalSearchForeignKeys($oPage, $sTitle)

$oPage->add(<<<HTML
<form id="ObjectsAddForm_{$this->m_iInputId}">
<div id="SearchResultsToAdd_{$this->m_iInputId}" style="vertical-align:top;background: #fff;height:100%;overflow:auto;padding:0;border:0;">
<div id="SearchResultsToAdd_{$this->m_iInputId}" style="vertical-align:top;height:100%;overflow:auto;padding:0;border:0;">
<div style="background: #fff; border:0; text-align:center; vertical-align:middle;"><p>{$sEmptyList}</p></div>
</div>
<input type="hidden" id="count_{$this->m_iInputId}" value="0"/>
Expand Down
@@ -1,46 +1,60 @@
/*
* @copyright Copyright (C) 2010-2021 Combodo SARL
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/

$ibo-table-preview--header-cell--padding: $ibo-spacing-200 $ibo-spacing-600 $ibo-spacing-200 $ibo-spacing-200 !default;
$ibo-table-preview--header-cell--background-color: $ibo-color-white-200 !default;
$ibo-table-preview--header-cell--border-width: 1px 1px 0 !default;

$ibo-table-preview--body-cell--padding-x: $ibo-spacing-200 !default;
$ibo-table-preview--body-cell--border-width: 0 1px !default;
$ibo-table-preview--body-cell--last--border-bottom-width: 1px !default;

$ibo-preview-header--margin-bottom: $ibo-spacing-200 !default;
$ibo-table-preview--remove-column--top: $ibo-spacing-300 !default;
$ibo-table-preview--remove-column--right: $ibo-spacing-300 !default;
$ibo-table-preview--remove-column--font-size: 8px !default;

$ibo-form-part-interactive-fields--margin-top: $ibo-spacing-600 !default;

.ibo-table-preview {
margin-top: 20px;
overflow-x: auto;

th {
position: relative;
padding: 5px;
padding-right: $ibo-spacing-600;
border-width: 1px 1px 0;
padding: $ibo-table-preview--header-cell--padding;
border-width: $ibo-table-preview--header-cell--border-width;
border-style: groove groove none;
background: $ibo-color-white-200;
background: $ibo-table-preview--header-cell--background-color;
}

td {
padding-right: 5px;
padding-left: 5px;
border-width: 0 1px;
padding-right: $ibo-table-preview--body-cell--padding-x;
padding-left: $ibo-table-preview--body-cell--padding-x;
border-width: $ibo-table-preview--body-cell--border-width;
border-style: none groove;
}

tr:last-child td {
border-bottom-width: 1px;
border-bottom-width: $ibo-table-preview--body-cell--last--border-bottom-width;
border-bottom-style: groove;
}
}

.ibo-preview-header {
margin-bottom: 5px;
margin-bottom: $ibo-preview-header--margin-bottom;
}
.ibo-table-preview--remove-column {
position: absolute;
top: $ibo-spacing-300;
right: $ibo-spacing-300;
top: $ibo-table-preview--remove-column--top;
right: $ibo-table-preview--remove-column--right;
display: inline-block;
cursor: pointer;
font-size: 8px;
font-size: $ibo-table-preview--remove-column--font-size;
}

#form_part_interactive_fields_xlsx, #form_part_interactive_fields_csv, #form_part_interactive_fields_pdf {
margin-top: $ibo-spacing-600;
margin-top: $ibo-form-part-interactive-fields--margin-top;
}
3 changes: 3 additions & 0 deletions css/backoffice/components/_field.scss
Expand Up @@ -237,3 +237,6 @@ $ibo-field--enable-bulk--checkbox--margin-left: $ibo-spacing-300 !default;
margin-left: $ibo-field--enable-bulk--checkbox--margin-left;
}

.ibo-input-select--action-buttons a {
@extend %ibo-hyperlink-inherited-colors;
}
2 changes: 1 addition & 1 deletion css/backoffice/components/datatable/_datatable.scss
Expand Up @@ -20,7 +20,7 @@ $ibo-datatable--row--background-color--is-selected: $ibo-color-primary-300 !defa
$ibo-datatable--selection-validation-buttons-toolbar--margin-top: 10px !default;
$ibo-list-column--max-height: 150px !default;

$ibo-datatable--sort-order--color: $ibo-color-orange-600 !default;
$ibo-datatable--sort-order--color: $ibo-color-primary-600 !default;

$ibo-fieldsorter--selected--background-color: $ibo-color-blue-200 !default;

Expand Down
34 changes: 23 additions & 11 deletions css/backoffice/pages/_csv-import.scss
Expand Up @@ -3,40 +3,52 @@
* @license http://opensource.org/licenses/AGPL-3.0
*/

$ibo-csv-import--cell-message-padding:3px;
$ibo-csv-import--cell-message--padding-top: 3px !default;
$ibo-csv-import--cell-modified--color: $ibo-color-blue-700 !default;
$ibo-csv-import--cell-error--color: $ibo-color-red-700 !default;
$ibo-csv-import--row--border-color: $ibo-color-grey-400 !default;
$ibo-csv-import--row-error--background-color: $ibo-color-red-200 !default;
$ibo-csv-import--download-file--color: $ibo-color-primary-400 !default;
$ibo-csv-import--download-file--font-size: 4em !default;
$ibo-csv-import--download-file--margin: 20px !default;

#tabs1-import .ibo-field--label {
max-width: 50%;
}

div.ibo-csv-import--cell-modified {
font-weight: bold;
color: $ibo-color-blue-700;
color: $ibo-csv-import--cell-modified--color;
}

div.ibo-csv-import--cell-error {
font-weight: bold;
color: $ibo-color-red-700;
color: $ibo-csv-import--cell-error--color;
}

div.ibo-csv-import--cell-message {
padding-top: $ibo-csv-import--cell-message-padding;
padding-top: $ibo-csv-import--cell-message--padding-top;
}

tr.ibo-csv-import--row-unchanged td {
border-bottom: 1px $ibo-color-grey-400 solid;
border-bottom: 1px $ibo-csv-import--row--border-color solid;
}

.wizContainer table tr.ibo-csv-import--row-error td {
border-bottom: 1px $ibo-csv-import--row--border-color solid;
background-color: $ibo-csv-import--row-error--background-color;
}

tr.ibo-csv-import--row-modified td {
border-bottom: 1px $ibo-color-grey-400 solid;
border-bottom: 1px $ibo-csv-import--row--border-color solid;
}

tr.ibo-csv-import--row-added td {
border-bottom: 1px $ibo-color-grey-400 solid;
border-bottom: 1px $ibo-csv-import--row--border-color solid;
}

.ibo-csv-import--download-file {
font-size: 4em;
color: $ibo-color-primary-400;
margin: 20px;
}
font-size: $ibo-csv-import--download-file--font-size;
color: $ibo-csv-import--download-file--color;
margin: $ibo-csv-import--download-file--margin;
}
13 changes: 13 additions & 0 deletions css/backoffice/pages/_datamodel-viewer.scss
Expand Up @@ -6,6 +6,10 @@
$ibo-datamodel-viewer--parent--spacer--padding-y: $ibo-spacing-0 !default;
$ibo-datamodel-viewer--parent--spacer--padding-x: $ibo-spacing-300 !default;

$ibo-datamodel-viewer--classes-list--selectize-input--background-color: $ibo-color-white-100 !default;
$ibo-datamodel-viewer--classes-list--selectize-input--color: $ibo-color-grey-800 !default;
$ibo-datamodel-viewer--classes-list--selectize-input--border-color: $ibo-color-grey-500 !default;

$ibo-datamodel-viewer--attributes-table--first-column--width: 3px !default;

$ibo-datamodel-viewer--origin-cell--diameter: 8px !default;
Expand Down Expand Up @@ -45,6 +49,15 @@ $ibo-datamodel-viewer--lifecycle-image--margin-bottom: $ibo-spacing-500 !default
padding: $ibo-datamodel-viewer--parent--spacer--padding-y $ibo-datamodel-viewer--parent--spacer--padding-x;
}

// Overwrite selectize rules with !important
.ibo-datamodel-viewer--classes-list .selectize-input{
background-color: $ibo-datamodel-viewer--classes-list--selectize-input--background-color !important;
background-image: none !important;
color: $ibo-datamodel-viewer--classes-list--selectize-input--color;
box-shadow: none !important;
border-color: $ibo-datamodel-viewer--classes-list--selectize-input--border-color !important;
}

#ibo-datamodel-viewer--attributes-table{
> tbody tr td:first-child{
width: $ibo-datamodel-viewer--attributes-table--first-column--width;
Expand Down
3 changes: 2 additions & 1 deletion css/backoffice/utils/variables/colors/_all.scss
Expand Up @@ -6,4 +6,5 @@
@import "base";
@import "base-palette";
@import "semantic-palette";
@import "lifecycle-palette";
@import "lifecycle-palette";
@import "skeleton-palette";
17 changes: 17 additions & 0 deletions css/backoffice/utils/variables/colors/_skeleton-palette.scss
@@ -0,0 +1,17 @@
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/

/* Skeleton palette */
/* - Colors used by skeletons svg to display placeholders */

$ibo-skeleton-start-color: $ibo-color-grey-200 !default;
$ibo-skeleton-stop-color: $ibo-color-blue-grey-100 !default;

/* CSS variables */
/* Skeleton CSS3 variables are not ibo prefixed as they are not iTop backoffice exclusives*/
:root {
--skeleton-start-color: #{$ibo-skeleton-start-color};
--skeleton-stop-color: #{$ibo-skeleton-stop-color};
}
Expand Up @@ -12,6 +12,7 @@
<stylesheets>
<stylesheet id="fullmoon">../css/backoffice/main.scss</stylesheet>
<stylesheet id="editor">combodo-backoffice-darkmoon-theme/scss/editor.scss</stylesheet>
<stylesheet id="ace_editor">combodo-backoffice-darkmoon-theme/scss/ace_editor.scss</stylesheet>
</stylesheets>
<precompiled_stylesheet>combodo-backoffice-darkmoon-theme/precompiled-themes/main.css</precompiled_stylesheet>
</theme>
Expand Down
@@ -0,0 +1,90 @@
.ace-eclipse .ace_gutter {
background: unset !important;
border-right: unset !important;
color: $ibo-color-grey-400 !important;
}
.ace-eclipse .ace_print-margin {
width: 1px !important;
background: $ibo-color-grey-500 !important;
}
.ace-eclipse {
background-color: $ibo-color-grey-800 !important;
color: $ibo-color-grey-200 !important;
}
.ace-eclipse .ace_entity.ace_other.ace_attribute-name,
.ace-eclipse .ace_storage {
color: $ibo-color-grey-200 !important;
}
.ace-eclipse .ace_cursor {
color: $ibo-color-grey-200 !important;
}
.ace-eclipse .ace_string.ace_regexp {
color: $ibo-color-red-600 !important;
}
.ace-eclipse .ace_marker-layer .ace_active-line {
background: $ibo-color-grey-600 !important;
}
.ace-eclipse .ace_marker-layer .ace_selection {
background: $ibo-color-grey-600 !important;
}
.ace-eclipse.ace_multiselect .ace_selection.ace_start {
box-shadow: 0 0 3px 0px $ibo-color-grey-800 !important;
}
.ace-eclipse .ace_marker-layer .ace_step {
background: $nord13 !important;
}
.ace-eclipse .ace_marker-layer .ace_bracket {
margin: -1px 0 0 -1px !important;
border: 1px solid $ibo-color-primary-300 !important;
}
.ace-eclipse .ace_gutter-active-line {
background-color: $ibo-color-grey-600 !important;
}
.ace-eclipse .ace_marker-layer .ace_selected-word {
border: 1px solid $ibo-color-primary-300 !important;
}
.ace-eclipse .ace_invisible {
color: $ibo-color-grey-500 !important;
}
.ace-eclipse .ace_keyword,
.ace-eclipse .ace_meta,
.ace-eclipse .ace_support.ace_class,
.ace-eclipse .ace_support.ace_type {
color: $ibo-color-primary-500 !important;
}
.ace-eclipse .ace_constant.ace_character,
.ace-eclipse .ace_constant.ace_other {
color: $ibo-color-grey-200 !important;
}
.ace-eclipse .ace_constant.ace_language {
color: $ibo-color-primary-800 !important;
}
.ace-eclipse .ace_constant.ace_escape {
color: $nord13 !important;
}
.ace-eclipse .ace_constant.ace_numeric {
color: $nord15 !important;
}
.ace-eclipse .ace_fold {
background-color: $ibo-color-grey-500 !important;
border-color: $ibo-color-grey-200 !important;
}
.ace-eclipse .ace_entity.ace_name.ace_function,
.ace-eclipse .ace_entity.ace_name.ace_tag,
.ace-eclipse .ace_support.ace_function,
.ace-eclipse .ace_variable,
.ace-eclipse .ace_variable.ace_language {
color: #8fbcbb !important;
}
.ace-eclipse .ace_string {
color: $nord14 !important;
}
.ace-eclipse .ace_comment {
color: $nord7 !important;
}
.ace-eclipse .ace_indent-guide {
box-shadow: inset -1px 0 0 0 $ibo-color-grey-600 !important;
}
.ace-eclipse .ace_indent-guide-active {
box-shadow: inset -1px 0 0 0 $ibo-color-grey-400 !important;
}

0 comments on commit 7ae86a8

Please sign in to comment.