Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
skublik committed Jun 14, 2022
2 parents 6872e98 + 8e4a54f commit 979ecca
Show file tree
Hide file tree
Showing 109 changed files with 2,137 additions and 808 deletions.
58 changes: 58 additions & 0 deletions gui/admin-gui/src/frontend/js/list-group-menu.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
* Copyright (c) 2022 Evolveum and contributors
*
* This work is dual-licensed under the Apache License 2.0
* and European Union Public License. See LICENSE file for details.
*/
import $ from 'jquery';

const NAME = 'list-group-menu'
const VERSION = '0.1'
const DATA_KEY = 'mp.list-group-menu'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
const JQUERY_NO_CONFLICT = $.fn[NAME]

// todo implement properly
class ListGroupMenu {

constructor(element, config) {
}

static get VERSION() {
return VERSION
}

static get Default() {
return Default
}

static _jQueryInterface(config) {

}
}

$.fn[NAME] = ListGroupMenu._jQueryInterface
$.fn[NAME].Constructor = ListGroupMenu
$.fn[NAME].noConflict = () => {
$.fn[NAME] = JQUERY_NO_CONFLICT
return ListGroupMenu._jQueryInterface
}

export default ListGroupMenu;

$(document).ready(function () {
$('.list-group-menu').find('.chevron').parent().click(function (event) {
event.preventDefault();

var link = $(this);
var item = link.parent();
var submenu = item.find('.list-group-submenu');
if (!submenu.is(':visible')) {
$(submenu).slideDown();
} else {
console.info('visible');
$(submenu).slideUp();
}
});
});
1 change: 1 addition & 0 deletions gui/admin-gui/src/frontend/js/midpoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import MidPointTheme from './midpoint-theme';
import MidPointAceEditor from "./ace-editor";
import "./list-group-menu";

window.MidPointTheme = new MidPointTheme();
window.MidPointAceEditor = new MidPointAceEditor();
1 change: 1 addition & 0 deletions gui/admin-gui/src/frontend/scss/_list-group-menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ $list-group-item-padding-sm-x: 1rem;

.list-group-submenu-item {
@include list-group-menu-item;
border-radius: inherit;

// 3rd level padding
& .list-group-submenu > .list-group-submenu-item > a {
Expand Down
32 changes: 23 additions & 9 deletions gui/admin-gui/src/frontend/scss/_tiles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,17 @@
* Contains all styles for all kinds of tile panels
*/

@mixin selectable-tile {
@mixin tile {
border: 2px solid $white;
border-radius: $border-radius;
background-color: $white;

&.selectable {
@include selectable-tile();
}
}

@mixin selectable-tile {
cursor: pointer;

&:hover,
Expand All @@ -22,11 +29,17 @@
}
}

@mixin selectable-tile-dark-mode {
@mixin tile-dark-mode {
border-color: $secondary-alt;
background-color: lighten($dark, 7.5%) !important;
color: $white !important;

&.selectable {
@include selectable-tile-dark-mode();
}
}

@mixin selectable-tile-dark-mode {
&:hover,
&.active {
border-color: $primary-alt;
Expand All @@ -37,19 +50,20 @@
width: 250px;
height: 250px;

@include selectable-tile();
@include tile();
}

@include dark-mode () {
@include dark-mode() {
.tile-panel {
@include selectable-tile-dark-mode();
@include tile-dark-mode();
}
}

.catalog-tile-panel {
width: 317px;
height: 376px;
@include selectable-tile();

@include tile();

& > .logo {
min-width: 84px;
Expand All @@ -61,8 +75,8 @@
}
}

@include dark-mode () {
.catalog-tile-panel {
@include selectable-tile-dark-mode();
@include dark-mode() {
.catalog-tile-panel.selectable {
@include tile-dark-mode();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -305,12 +305,11 @@ private SideBarMenuItem createSelfServiceMenu(boolean experimentalFeaturesEnable
pageParameters.add(OnePageParameterEncoder.PARAMETER, WebModelServiceUtils.getLoggedInFocusOid());
menu.addMainMenuItem(createMainMenuItem("PageAdmin.menu.profile", GuiStyleConstants.CLASS_ICON_PROFILE,
WebComponentUtil.resolveSelfPage(), pageParameters));
menu.addMainMenuItem(createMainMenuItem("PageAdmin.menu.credentials", GuiStyleConstants.CLASS_ICON_CREDENTIALS,
PageSelfCredentials.class));
/** menu item which leads to new self Credentials page
// old self credentials page is commented
// menu.addMainMenuItem(createMainMenuItem("PageAdmin.menu.credentials", GuiStyleConstants.CLASS_ICON_CREDENTIALS,
// PageSelfCredentials.class));
menu.addMainMenuItem(createMainMenuItem("PageAdmin.menu.credentials", GuiStyleConstants.CLASS_ICON_CREDENTIALS,
com.evolveum.midpoint.gui.impl.page.self.credentials.PageSelfCredentials.class));
*/
if (WebModelServiceUtils.getLoggedInFocus() instanceof UserType) {
menu.addMainMenuItem(createMainMenuItem("PageAdmin.menu.request", GuiStyleConstants.CLASS_ICON_REQUEST,
PageAssignmentShoppingCart.class));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,6 @@ public static <C extends Containerable> PropertySearchItemWrapper createPropert
if (itemDef instanceof PrismReferenceDefinition) {
itemWrapper = new ReferenceSearchItemWrapper((PrismReferenceDefinition)itemDef, type);
itemWrapper.setVisible(isFixedItem);
itemWrapper.setCanConfigure(!isFixedItem);
itemWrapper.setName(WebComponentUtil.getItemDefinitionDisplayNameOrName(itemDef, null));
return itemWrapper;
}
Expand Down Expand Up @@ -488,7 +487,6 @@ public static <C extends Containerable> PropertySearchItemWrapper createPropert
itemWrapper = new TextSearchItemWrapper(path);
}
itemWrapper.setVisible(isFixedItem);
itemWrapper.setCanConfigure(!isFixedItem);
itemWrapper.setValueTypeName(itemDef.getTypeName());
itemWrapper.setName(WebComponentUtil.getItemDefinitionDisplayNameOrName(itemDef, null));
String help = WebPrismUtil.getHelpText(itemDef);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,8 @@

package com.evolveum.midpoint.gui.impl.component.tile;

import com.evolveum.midpoint.gui.api.component.BasePanel;
import com.evolveum.midpoint.gui.impl.component.search.Search;
import com.evolveum.midpoint.gui.impl.component.search.SearchPanel;
import com.evolveum.midpoint.gui.impl.page.self.requestAccess.PageableListView;
import com.evolveum.midpoint.gui.impl.page.self.requestAccess.ViewToggle;
import com.evolveum.midpoint.web.component.data.BoxedTablePanel;
import com.evolveum.midpoint.web.component.data.paging.NavigatorPanel;
import com.evolveum.midpoint.web.component.util.VisibleBehaviour;
import java.io.Serializable;
import java.util.List;

import org.apache.wicket.Component;
import org.apache.wicket.ajax.AjaxRequestTarget;
Expand All @@ -24,9 +18,15 @@
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
import org.jetbrains.annotations.NotNull;

import java.io.Serializable;
import java.util.List;
import com.evolveum.midpoint.gui.api.component.BasePanel;
import com.evolveum.midpoint.gui.impl.component.search.Search;
import com.evolveum.midpoint.gui.impl.component.search.SearchPanel;
import com.evolveum.midpoint.gui.impl.page.self.requestAccess.PageableListView;
import com.evolveum.midpoint.web.component.data.BoxedTablePanel;
import com.evolveum.midpoint.web.component.data.paging.NavigatorPanel;
import com.evolveum.midpoint.web.component.util.VisibleBehaviour;

/**
* Created by Viliam Repan (lazyman).
Expand All @@ -42,13 +42,22 @@ public class TileTablePanel<T extends Tile, O extends Serializable> extends Base

private static final String ID_TILES_PAGING = "tilesPaging";

private IModel<ViewToggle> viewToggleModel = Model.of(ViewToggle.TILE);
private IModel<ViewToggle> viewToggleModel;

private IModel<Search> searchModel;

public TileTablePanel(String id, ISortableDataProvider provider, List<IColumn> columns) {
this(id, provider, columns, null);
}

public TileTablePanel(String id, ISortableDataProvider provider, List<IColumn> columns, IModel<ViewToggle> viewToggle) {
super(id);

if (viewToggle == null) {
viewToggle = Model.of(ViewToggle.TILE);
}
this.viewToggleModel = viewToggle;

initModels();
initLayout(provider, columns);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* and European Union Public License. See LICENSE file for details.
*/

package com.evolveum.midpoint.gui.impl.page.self.requestAccess;
package com.evolveum.midpoint.gui.impl.component.tile;

/**
* Created by Viliam Repan (lazyman).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* and European Union Public License. See LICENSE file for details.
*/

package com.evolveum.midpoint.gui.impl.page.self.requestAccess;
package com.evolveum.midpoint.gui.impl.component.tile;

import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.AjaxLink;
Expand Down

0 comments on commit 979ecca

Please sign in to comment.