Skip to content

Commit

Permalink
IBX-2230: [UDW] Hide footer buttons on "Create" from dashboard; Chang…
Browse files Browse the repository at this point in the history
…e border in search to blue;cAllow creating content from search (#309)
  • Loading branch information
GrabowskiM authored Feb 4, 2022
1 parent db1d7d1 commit 70a1a5f
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
cursor: pointer;

.ibexa-table__cell.ibexa-table__cell {
border: calculateRem(2px) solid transparent;
border: calculateRem(1px) solid transparent;
transition: all $ibexa-admin-transition-duration $ibexa-admin-transition;

&:not(:first-child) {
Expand All @@ -20,7 +20,7 @@
box-shadow: calculateRem(4px) calculateRem(22px) calculateRem(47px) 0 rgba($ibexa-color-info, 0.05);

.ibexa-table__cell.ibexa-table__cell {
border-color: $ibexa-color-light;
border-color: $ibexa-color-info;
background-color: $ibexa-color-white;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,41 @@ const ActionsMenu = () => {
{},
'universal_discovery_widget'
);
const isConfirmDisabled = !allowConfirmation || selectedLocations.length === 0;
const isConfirmDisabled = selectedLocations.length === 0;
const renderActionsContent = () => {
if (!allowConfirmation) {
return null;
}

return (
<>
<span className="c-actions-menu__confirm-btn-wrapper">
<button
className="c-actions-menu__confirm-btn btn ibexa-btn ibexa-btn--primary"
type="button"
onClick={() => onConfirm()}
disabled={isConfirmDisabled}
>
{confirmLabel}
</button>
</span>
<span className="c-actions-menu__cancel-btn-wrapper">
<button
className="c-actions-menu__cancel-btn btn ibexa-btn ibexa-btn--secondary"
type="button"
onClick={cancelUDW}
>
{cancelLabel}
</button>
</span>
</>
);
};


return (
<div className="c-actions-menu">
<span className="c-actions-menu__confirm-btn-wrapper">
<button
className="c-actions-menu__confirm-btn btn ibexa-btn ibexa-btn--primary"
type="button"
onClick={() => onConfirm()}
disabled={isConfirmDisabled}
>
{confirmLabel}
</button>
</span>
<span className="c-actions-menu__cancel-btn-wrapper">
<button
className="c-actions-menu__cancel-btn btn ibexa-btn ibexa-btn--secondary"
type="button"
onClick={cancelUDW}
>
{cancelLabel}
</button>
</span>
{renderActionsContent()}
</div>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { TabsConfigContext } from './universal.discovery.module';
const SearchTabModule = () => {
const tabsConfig = useContext(TabsConfigContext);
const actionsDisabledMap = {
'content-create-button': true,
'content-create-button': false,
'sort-switcher': true,
'view-switcher': true,
};
Expand Down

0 comments on commit 70a1a5f

Please sign in to comment.