diff --git a/application/ui.extkeywidget.class.inc.php b/application/ui.extkeywidget.class.inc.php index 55347ff7e..da8b8adb9 100644 --- a/application/ui.extkeywidget.class.inc.php +++ b/application/ui.extkeywidget.class.inc.php @@ -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; @@ -323,12 +324,12 @@ EOF EOF ); $sHTMLValue .= "
"; - $sHTMLValue .= "
iId}\" onClick=\"oACWidget_{$this->iId}.Clear();\" data-tooltip-content='".Dict::S('UI:Button:Clear')."'>
"; + $sHTMLValue .= " iId}\" onClick=\"oACWidget_{$this->iId}.Clear();\" data-tooltip-content='".Dict::S('UI:Button:Clear')."'>"; } if ($bCreate && $bExtensions) { $sCallbackName = (MetaModel::IsAbstract($this->sTargetClass)) ? 'SelectObjectClass' : 'CreateObject'; - $sHTMLValue .= "
iId}\" onClick=\"oACWidget_{$this->iId}.{$sCallbackName}();\" data-tooltip-content='".Dict::S('UI:Button:Create')."'>
"; + $sHTMLValue .= "iId}\" onClick=\"oACWidget_{$this->iId}.{$sCallbackName}();\" data-tooltip-content='".Dict::S('UI:Button:Create')."'>"; $oPage->add_ready_script( <<iId}').length == 0) @@ -339,7 +340,7 @@ JS ); } if ($bExtensions && MetaModel::IsHierarchicalClass($this->sTargetClass) !== false) { - $sHTMLValue .= "
iId}\" onClick=\"oACWidget_{$this->iId}.HKDisplay();\" data-tooltip-content='".Dict::S('UI:Button:SearchInHierarchy')."'>
"; + $sHTMLValue .= "iId}\" onClick=\"oACWidget_{$this->iId}.HKDisplay();\" data-tooltip-content='".Dict::S('UI:Button:SearchInHierarchy')."'>"; $oPage->add_ready_script( <<iId}').length == 0) @@ -350,7 +351,7 @@ JS ); } if ($oAllowedValues->CountExceeds($iMaxComboLength)) { - $sHTMLValue .= "
iId}\" onClick=\"oACWidget_{$this->iId}.Search();\" data-tooltip-content='".Dict::S('UI:Button:Search')."'>
"; + $sHTMLValue .= " iId}\" onClick=\"oACWidget_{$this->iId}.Search();\" data-tooltip-content='".Dict::S('UI:Button:Search')."'>"; } $sHTMLValue .= "
"; $sHTMLValue .= ""; @@ -904,7 +905,7 @@ JS { // 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) { @@ -924,6 +925,7 @@ JS $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);"); } diff --git a/application/ui.searchformforeignkeys.class.inc.php b/application/ui.searchformforeignkeys.class.inc.php index 703781654..3a2f0ceca 100644 --- a/application/ui.searchformforeignkeys.class.inc.php +++ b/application/ui.searchformforeignkeys.class.inc.php @@ -60,7 +60,7 @@ class UISearchFormForeignKeys $oPage->add(<< -
+

{$sEmptyList}

diff --git a/css/backoffice/application/tabular-fields/_tabular-fields-selector.scss b/css/backoffice/application/tabular-fields/_tabular-fields-selector.scss index d42242cb2..8215a0e89 100644 --- a/css/backoffice/application/tabular-fields/_tabular-fields-selector.scss +++ b/css/backoffice/application/tabular-fields/_tabular-fields-selector.scss @@ -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; } diff --git a/css/backoffice/components/_field.scss b/css/backoffice/components/_field.scss index 1635a74f1..d732d0907 100644 --- a/css/backoffice/components/_field.scss +++ b/css/backoffice/components/_field.scss @@ -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; +} \ No newline at end of file diff --git a/css/backoffice/components/datatable/_datatable.scss b/css/backoffice/components/datatable/_datatable.scss index 51b18377d..a33f1f168 100644 --- a/css/backoffice/components/datatable/_datatable.scss +++ b/css/backoffice/components/datatable/_datatable.scss @@ -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; diff --git a/css/backoffice/pages/_csv-import.scss b/css/backoffice/pages/_csv-import.scss index b03897a53..de7a079c6 100644 --- a/css/backoffice/pages/_csv-import.scss +++ b/css/backoffice/pages/_csv-import.scss @@ -3,7 +3,14 @@ * @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%; @@ -11,32 +18,37 @@ $ibo-csv-import--cell-message-padding:3px; 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; +} \ No newline at end of file diff --git a/css/backoffice/pages/_datamodel-viewer.scss b/css/backoffice/pages/_datamodel-viewer.scss index 1aec4cce7..fe6f85e7a 100644 --- a/css/backoffice/pages/_datamodel-viewer.scss +++ b/css/backoffice/pages/_datamodel-viewer.scss @@ -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; @@ -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; diff --git a/css/backoffice/utils/variables/colors/_all.scss b/css/backoffice/utils/variables/colors/_all.scss index bc56d42e5..d2dab10ad 100644 --- a/css/backoffice/utils/variables/colors/_all.scss +++ b/css/backoffice/utils/variables/colors/_all.scss @@ -6,4 +6,5 @@ @import "base"; @import "base-palette"; @import "semantic-palette"; -@import "lifecycle-palette"; \ No newline at end of file +@import "lifecycle-palette"; +@import "skeleton-palette"; \ No newline at end of file diff --git a/css/backoffice/utils/variables/colors/_skeleton-palette.scss b/css/backoffice/utils/variables/colors/_skeleton-palette.scss new file mode 100644 index 000000000..9b73f95bf --- /dev/null +++ b/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}; +} \ No newline at end of file diff --git a/datamodels/2.x/combodo-backoffice-darkmoon-theme/datamodel.combodo-backoffice-darkmoon-theme.xml b/datamodels/2.x/combodo-backoffice-darkmoon-theme/datamodel.combodo-backoffice-darkmoon-theme.xml index 42361f371..655d649f1 100644 --- a/datamodels/2.x/combodo-backoffice-darkmoon-theme/datamodel.combodo-backoffice-darkmoon-theme.xml +++ b/datamodels/2.x/combodo-backoffice-darkmoon-theme/datamodel.combodo-backoffice-darkmoon-theme.xml @@ -12,6 +12,7 @@ ../css/backoffice/main.scss combodo-backoffice-darkmoon-theme/scss/editor.scss + combodo-backoffice-darkmoon-theme/scss/ace_editor.scss combodo-backoffice-darkmoon-theme/precompiled-themes/main.css diff --git a/datamodels/2.x/combodo-backoffice-darkmoon-theme/scss/ace_editor.scss b/datamodels/2.x/combodo-backoffice-darkmoon-theme/scss/ace_editor.scss new file mode 100644 index 000000000..41c542db7 --- /dev/null +++ b/datamodels/2.x/combodo-backoffice-darkmoon-theme/scss/ace_editor.scss @@ -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; +} \ No newline at end of file diff --git a/datamodels/2.x/combodo-backoffice-darkmoon-theme/scss/scss-variables.scss b/datamodels/2.x/combodo-backoffice-darkmoon-theme/scss/scss-variables.scss index 690d3af8b..9e55c5f13 100644 --- a/datamodels/2.x/combodo-backoffice-darkmoon-theme/scss/scss-variables.scss +++ b/datamodels/2.x/combodo-backoffice-darkmoon-theme/scss/scss-variables.scss @@ -50,8 +50,8 @@ $text : $ibo-color-grey-100; $text-invert: $ibo-color-grey-800; $text-light : $ibo-color-grey-200; $text-strong: inherit; -$code: $ibo-color-primary-800; -$code-background: $ibo-color-grey-300; +$code: $ibo-color-primary-400; +$code-background: $ibo-color-grey-700; $pre-background: $ibo-color-grey-600; $ibo-scrollbar--scrollbar-track-background-color: $ibo-color-grey-700; @@ -145,6 +145,10 @@ $ibo-vendors-datatables--row--background-color--is-even: $ibo-color-grey-800; $ibo-datatable--row--background-color--is-hover: $ibo-color-blue-900; $ibo-datatable--row--background-color--is-selected: $ibo-color-blue-700; +$ibo-fieldsorter--selected--background-color: $ibo-color-blue-800; + +$ibo-table-preview--header-cell--background-color: $ibo-color-grey-500; + $ibo-field--value--color: $ibo-body-text-color; $ibo-title--text-color: $ibo-body-text-color; @@ -173,8 +177,9 @@ $ibo-input-select-selectize--item--active--text-color: $ibo-color-grey-100; $ibo-input-select-selectize--item--active--background-color: $ibo-color-grey-500; $ibo-vendors-selectize-input--color: $ibo-body-text-color; -$ibo-popover-menu--separator--background-color: $ibo-color-grey-500; +$ibo-popover-menu--item-separator--background-color: $ibo-color-grey-500; $ibo-popover-menu--item--text-color: $ibo-color-grey-200; +$ibo-popover-menu--item--icon--color: $ibo-color-grey-300; $ibo-popover-menu--background-color: $ibo-color-grey-700; $ibo-popover-menu--item--hover-background-color: $ibo-color-grey-500; @@ -189,9 +194,17 @@ $ibo-tab-container--extra-tab-toggler--background-color--on-hover: $ibo-color-gr $ibo-activity-panel--header--background-color: $ibo-color-grey-400; $ibo-activity-panel--tab-toggler--is-active--background-color: $ibo-color-grey-200; $ibo-activity-panel--tab-toolbar--background-color: $ibo-activity-panel--tab-toggler--is-active--background-color; +$ibo-activity-panel--load-entries-button--background-color: $ibo-color-grey-500; $ibo-caselog-entry-form--background-color: $ibo-activity-panel--tab-toolbar--background-color; $ibo-object-details--tag--separator--background-color: $ibo-color-grey-300; +$ibo-skeleton-start-color: $ibo-color-grey-500; +$ibo-skeleton-stop-color: $ibo-color-grey-400; + +$ibo-tab--temporary-remote-content--button--color: $ibo-color-grey-200; +$ibo-tab--temporary-remote-content--button--hover--color: $ibo-color-grey-200; +$ibo-tab--temporary-remote-content--button--hover--background-color: $ibo-color-grey-800; + $ibo-activity-panel--tab-toolbar--text-color: $ibo-color-grey-800; $ibo-activity-panel--tab-toolbar-action--color: $ibo-color-grey-800; @@ -216,7 +229,7 @@ $ibo-search-form-panel--criteria--color: $ibo-color-grey-100; $ibo-search-form-panel--more-criteria--background-color: $ibo-color-grey-800; $ibo-search-form-panel--more-criteria--color: $ibo-color-grey-100; $ibo-search-form-panel--more-criteria--icon--color: $ibo-color-primary-500; -$ibo-search-form-panel--criteria--border-color: $ibo-color-grey-500; +$ibo-search-form-panel--criteria--border-color: $ibo-color-grey-900; $ibo-search-form-panel--multiple-choice--hover--color: $ibo-color-grey-500; $ibo-search-form-panel--items--hover--color: $ibo-search-form-panel--multiple-choice--hover--color; @@ -251,4 +264,16 @@ $ibo-vendors-c3--legend--background-color: $ibo-color-white-100; $ibo-vendors-c3--legend-item--fill: $ibo-color-grey-100; $ibo-vendors-c3--axis--fill: $ibo-color-grey-200; -$ibo-run-query--highlight--background-color: $ibo-color-primary-700; \ No newline at end of file +$ibo-run-query--highlight--background-color: $ibo-color-primary-700; + +$ibo-datamodel-viewer--classes-list--selectize-input--background-color: $ibo-color-grey-700; +$ibo-datamodel-viewer--classes-list--selectize-input--border-color: $ibo-color-grey-500; +$ibo-datamodel-viewer--classes-list--selectize-input--color: $ibo-color-grey-200; +$ibo-datamodel-viewer--lifecycle--code--color: $ibo-color-grey-300; +$ibo-datamodel-viewer--lifecycle--stimuli--color: $ibo-color-blue-300; +$ibo-datamodel-viewer--lifecycle--attribute-option--color: $ibo-color-pink-300; +$ibo-datamodel-viewer--schema--tooltip--fill: $ibo-color-grey-600; + +$ibo-csv-import--row-error--background-color: $ibo-color-red-950; +$ibo-csv-import--cell-error--color: $ibo-color-red-500; +$ibo-csv-import--cell-modified--color: $ibo-color-blue-500; \ No newline at end of file diff --git a/images/placeholders/skeleton-dashboard.svg b/images/placeholders/skeleton-dashboard.svg index d36062b96..3a6bca4df 100644 --- a/images/placeholders/skeleton-dashboard.svg +++ b/images/placeholders/skeleton-dashboard.svg @@ -38,7 +38,7 @@ ($(window).width()-40)) { $('#ac_create_'+me.id).width($(window).width()-40); @@ -714,6 +716,10 @@ function ExtKeyWidget(id, sTargetClass, sFilter, sTitle, bSelectMode, oWizHelper $('#ac_create_'+me.id).dialog("destroy"); $('#ac_create_'+me.id).remove(); $('#ajax_'+me.id).html(''); + // Resetting target class to its original value + // (If not done, closing the dialog and trying to create a object again + // will force it be of the same class as the previous call) + me.sTargetClass = me.sOriginalTargetClass; }; this.DoCreateObject = function () { diff --git a/pages/ajax.render.php b/pages/ajax.render.php index 4030ed9f9..3d27a6400 100644 --- a/pages/ajax.render.php +++ b/pages/ajax.render.php @@ -416,9 +416,10 @@ try $iInputId = utils::ReadParam('iInputId', ''); $sAttCode = utils::ReadParam('sAttCode', ''); $sJson = utils::ReadParam('json', '', false, 'raw_data'); - // Building form, if target class is abstract we ask the user for the desired leaf class + $bTargetClassSelected = utils::ReadParam('bTargetClassSelected', '', false, 'raw_data'); + // Building form, if target class has child classes we ask the user for the desired leaf class, unless we've already done just that $oWidget = new UIExtKeyWidget($sTargetClass, $iInputId, $sAttCode, false); - if (MetaModel::IsAbstract($sTargetClass)) { + if(!$bTargetClassSelected && MetaModel::HasChildrenClasses($sTargetClass)){ $oWidget->GetClassSelectionForm($oPage); } else { $aPrefillFormParam = array();