Skip to content

Commit

Permalink
MID-6271 trying to fix css for prism forms, not finished yet
Browse files Browse the repository at this point in the history
  • Loading branch information
1azyman committed Apr 20, 2022
1 parent 35f95f3 commit 62b81cc
Show file tree
Hide file tree
Showing 73 changed files with 248 additions and 258 deletions.
3 changes: 0 additions & 3 deletions gui/admin-gui/src/frontend/scss/midpoint-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1391,9 +1391,6 @@ th.countLabel{

.expand-collapse-button, .expand-collapse-button:hover, .expand-collapse-button:focus { //class for expand-collapse button next to title
color: $text-label-color;
width: 22px;
text-align: center;
cursor: pointer;
}

.show-empty-button, .show-empty-button:hover .show-empty-button:focus{ //class for show-empty fields button under properties
Expand Down
5 changes: 1 addition & 4 deletions gui/admin-gui/src/frontend/scss/prism-forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,7 @@
.prism-title {
font-size: 16px;
font-weight: 600;
color: $text-label-color;;
margin-right: 15px;
float: left;
padding-top: 3px;
color: $text-label-color;
cursor: pointer;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public class GuiStyleConstants {
public static final String CLASS_ICON_EXPAND = "fa fa-chevron-left";
public static final String CLASS_ICON_COLLAPSE = "fa fa-chevron-down";
public static final String CLASS_ICON_SORT_AMOUNT_ASC = "fa fa-sort-amount-asc";
public static final String CLASS_ICON_SORT_ALPHA_ASC = "fa fa-sort-alpha-asc";
public static final String CLASS_ICON_SORT_ALPHA_ASC = "fa fa-sort-alpha-down";
public static final String CLASS_ICON_SHOW_EMPTY_FIELDS = "fa fa-square-o";
public static final String CLASS_ICON_NOT_SHOW_EMPTY_FIELDS = "fa fa-square";
public static final String CLASS_ICON_SHOW_METADATA = "fa fa-asterisk";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<div wicket:id="typePanel" class="form-group">
<label><wicket:message key="roleMemberPanel.type" /></label>
<select class="form-control input-sm" wicket:id="type" />
<select class="form-control form-control-sm" wicket:id="type" />
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<wicket:panel>
<div class="autocomplete-parent" style="height:30px; position: relative;">
<div class="col-md-12" style="padding: 0px !important;">
<input wicket:id="input" class="form-control input-sm" type="text" style="padding-right: 16px;"/>
<input wicket:id="input" class="form-control form-control-sm" type="text" style="padding-right: 16px;"/>
</div>
<div style="position: absolute; right: 3px; top: 7px; z-index: 5;">
<a wicket:id="iconButton" style="float:right; cursor: default; color: #555555; font-size: 10.5px;">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
<!DOCTYPE html>
<html xmlns:wicket="http://wicket.apache.org">
<wicket:panel>
<select wicket:id="select" class="form-control input-sm"></select>
<select wicket:id="select" class="form-control form-control-sm"></select>
</wicket:panel>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<div wicket:id="inputContainer">
<div class="password-parent" style="height:30px; position: relative;">
<div class="col-md-12" style="padding: 0px !important;">
<input id="password-input" class="form-control input-sm" wicket:id="password1" wicket:message="placeholder:PasswordPanel.passwordPlaceholder"
<input id="password-input" class="form-control form-control-sm" wicket:id="password1" wicket:message="placeholder:PasswordPanel.passwordPlaceholder"
type="password" autocomplete="new-password" about="password1" style="padding-right: 26px;"/>
<div class="password-validator-popover" wicket:id="validationPanel"/>
</div>
Expand All @@ -49,7 +49,7 @@
</div>
<div class="password-parent" style="height:30px; position: relative;">
<div class="col-md-12" style="padding: 0px !important;">
<input class="form-control input-sm" wicket:id="password2" wicket:message="placeholder:PasswordPanel.repeatPasswordPlaceholder" type="password" autocomplete="new-password" style="padding-right: 26px; padding-bottom: 5px;" about="password2"/>
<input class="form-control form-control-sm" wicket:id="password2" wicket:message="placeholder:PasswordPanel.repeatPasswordPlaceholder" type="password" autocomplete="new-password" style="padding-right: 26px; padding-bottom: 5px;" about="password2"/>
</div>
<div style="position: absolute; right: 8px; top: 8px; z-index: 5;">
<i class="fa fa-eye" style="float:right;cursor: pointer; color: #555555;" onclick="showPassword(this)"></i>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,23 @@
<!DOCTYPE html>
<html xmlns:wicket="http://wicket.apache.org">
<wicket:panel>

<div class="prism-properties">
<div wicket:id="propertiesLabel">
<div class="property-stripe" wicket:id="properties">
<div class="row prism-property" wicket:id="property"/>
</div>

<div class="row">
<div class="col-md-2"/>
<div class="col-md-10" style="padding-left: 70px;">
<div class="show-empty-button" wicket:id="showEmptyButton"/>
</div>
</div>
</div>

<div wicket:id="containersLabel">
<div class="prism-containers" wicket:id="containers">
<div class="row prism-container" wicket:id="container"/>
</div>
</div>
<div class="prism-properties">
<div wicket:id="propertiesLabel">
<div class="property-stripe" wicket:id="properties">
<div class="row prism-property" wicket:id="property"/>
</div>
<div class="row">
<div class="col-md-2"/>
<div class="col-md-10" style="padding-left: 70px;">
<div class="show-empty-button" wicket:id="showEmptyButton"/>
</div>

</div>
</div>
<div wicket:id="containersLabel">
<div class="prism-containers" wicket:id="containers">
<div class="row prism-container" wicket:id="container"/>
</div>
</div>
</div>
</wicket:panel>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@
<!DOCTYPE html>
<html xmlns:wicket="http://wicket.apache.org">
<wicket:panel>
<span wicket:id="label"/>
<span wicket:id="required" style="color: #f00; font-weight: bold;" wicket:message="title:prismPropertyPanel.required">*</span>
<i wicket:id="help"/>
<i wicket:id="deprecated"/>
<i wicket:id="experimental"/>

<span wicket:id="label"/>
<wicket:child/>

<span wicket:id="required" style="color: #f00; font-weight: bold;"
wicket:message="title:prismPropertyPanel.required">*</span>
<i wicket:id="help"/>
<i wicket:id="deprecated"/>
<i wicket:id="experimental"/>
<wicket:child/>


<button wicket:id="add" wicket:message="title:ItemHeaderPanel.addValue" class="btn btn-box-tool fa fa-plus-circle" trigger="hover"/>

<button wicket:id="remove" wicket:message="title:ItemHeaderPanel.removeAll" class="btn btn-box-tool fa fa-minus-circle" trigger="hover"/>
<button wicket:id="add" wicket:message="title:ItemHeaderPanel.addValue" class="btn btn-tool" trigger="hover">
<i class="fa fa-plus-circle"></i>
</button>

<button wicket:id="remove" wicket:message="title:ItemHeaderPanel.removeAll" class="btn btn-tool" trigger="hover">
<i class="fa fa-minus-circle"></i>
</button>
</wicket:panel>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -9,47 +9,45 @@
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
<wicket:panel>
<div wicket:id="localizedValueContainer" class="row">
<div class="col-md-3" style="padding-left: 0px !important; padding-top: 5px;" wicket:id="localizedValueLabel" />
<div wicket:id="localizedValueWithButton" class="input-group" style="position: relative">
<div class="col-md-12 " style="padding: 0px !important;" wicket:id="localizedValue"/>
<div style="position: absolute; right: 12px; top: 8px; z-index: 5;">
<div class="col-3" wicket:id="localizedValueLabel" />
<div wicket:id="localizedValueWithButton" class="input-group">
<div class="col-12" wicket:id="localizedValue"/>
<div style="position: absolute; right: 40px; top: 8px; z-index: 5;">
<i class="fa fa-language" style="float:right;cursor: pointer; color: #555555;" wicket:id="showHideLanguagesLocalized"/>
</div>
</div>
</div>
<div wicket:id="originValueContainer" class="row">
<div class="col-md-3" style="padding-left: 0px !important; padding-top: 5px;" wicket:id="originValueLabel" />
<div wicket:id="origValueWithButton" class="input-group" style="position: relative">
<div class="col-md-12" style="padding: 0px !important;" wicket:id="origValue"/>
<div style="position: absolute; right: 12px; top: 8px; z-index: 5;">
<div class="col-3" wicket:id="originValueLabel" />
<div wicket:id="origValueWithButton" class="input-group">
<div class="col-12" wicket:id="origValue"/>
<div style="position: absolute; right: 40px; top: 8px; z-index: 5;">
<i class="fa fa-language" style="float:right;cursor: pointer; color: #555555;" wicket:id="showHideLanguagesOrig"/>
</div>
</div>
</div>
<div wicket:id="fullDataContainer">
<div class="row prism-property">
<div class="col-md-3" style="padding-left: 0px !important; padding-top: 5px;"><wicket:message key="PolyStringEditorPanel.keyLabel" /></div>
<div class="col-md-9" style="padding: 0px !important;" wicket:id="keyValue"/>
<div class="col-3"><wicket:message key="PolyStringEditorPanel.keyLabel" /></div>
<div class="col-9" wicket:id="keyValue"/>
</div>
<div class="row prism-property">
<div class="col-md-3" style="padding-left: 0px !important;"><wicket:message key="PolyStringEditorPanel.languagesList" /></div>
<div class="col-3"><wicket:message key="PolyStringEditorPanel.languagesList" /></div>
</div>
<div wicket:id="languageEditor" class="row prism-property">
<div class="col-md-3" style="padding-left: 0px !important;" wicket:id="languagesList" />
<div class="col-md-8" style="padding: 0px !important;" wicket:id="valueToAdd"/>
<div class="col-md-1">
<a class="btn btn-box-tool" wicket:id="addLanguageValue"><i class="fa fa-plus-circle"/></a>
<div class="col-3" wicket:id="languagesList" />
<div class="col-8" wicket:id="valueToAdd"/>
<div class="col-1">
<a class="btn btn-tool" wicket:id="addLanguageValue"><i class="fa fa-plus-circle"/></a>
</div>
</div>
<div wicket:id="languagesRepeater" class="row prism-property">
<div class="col-md-3" style="padding-left: 0px !important;" wicket:id="languageName" />
<div class="col-md-8" style="padding: 0px !important;" wicket:id="translation"/>
<div class="col-md-1">
<div class="col-3" wicket:id="languageName" />
<div class="col-8" wicket:id="translation"/>
<div class="col-1">
<a class="btn btn-box-tool" wicket:id="removeLanguageButton"><i class="fa fa-minus-circle"/></a>
</div>
</div>
<!--<div wicket:id="addLanguage" class="show-empty-button" />-->
</div>

</wicket:panel>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public void onClick(AjaxRequestTarget target) {
originValueContainer.add(origValueWithButton);

InputPanel origValuePanel;
IModel<String> origValueModel = new IModel<String>() {
IModel<String> origValueModel = new IModel<>() {
private static final long serialVersionUID = 1L;

@Override
Expand Down Expand Up @@ -271,7 +271,7 @@ protected void onUpdate(AjaxRequestTarget ajaxRequestTarget) {
newLanguageValue.setOutputMarkupId(true);
languageEditorContainer.add(newLanguageValue);

AjaxLink<Void> addLanguageButton = new AjaxLink<Void>(ID_ADD_LANGUAGE_VALUE_BUTTON) {
AjaxLink<Void> addLanguageButton = new AjaxLink<>(ID_ADD_LANGUAGE_VALUE_BUTTON) {
private static final long serialVersionUID = 1L;

@Override
Expand All @@ -288,8 +288,7 @@ public void onClick(AjaxRequestTarget target) {
addLanguageButton.setOutputMarkupId(true);
languageEditorContainer.add(addLanguageButton);

ListView<String> languagesContainer =
new ListView<String>(ID_LANGUAGES_REPEATER, getLanguagesListModel()) {
ListView<String> languagesContainer = new ListView<>(ID_LANGUAGES_REPEATER, getLanguagesListModel()) {
private static final long serialVersionUID = 1L;

@Override
Expand Down Expand Up @@ -346,9 +345,7 @@ public void onClick(AjaxRequestTarget target) {
}
};
showHideLanguagesButton.setOutputMarkupId(true);
// showHideLanguagesButton.add(AttributeAppender.append("style", "cursor: pointer;"));
origValueWithButton.add(showHideLanguagesButton);

}

private String getLocalizedPolyStringValue() {
Expand Down Expand Up @@ -395,21 +392,11 @@ private void showHideLanguagesPerformed(AjaxRequestTarget target) {
}

private AttributeAppender getInputFieldClassAppenderForContainer() {
return AttributeModifier.append("class", new LoadableModel<String>() {
@Override
protected String load() {
return showFullData ? "prism-property" : "";
}
});
return AttributeModifier.append("class", () -> showFullData ? "prism-property" : "");
}

private AttributeAppender getInputFieldClassAppender() {
return AttributeModifier.append("class", new LoadableModel<String>() {
@Override
protected String load() {
return showFullData ? "col-lg-9 col-md-9 col-sm-9" : "col-lg-12 col-md-12 col-sm-12";
}
});
return AttributeModifier.append("class", () -> showFullData ? "col-9" : "col-12");
}

private InputPanel getOrigValuePanel() {
Expand All @@ -421,18 +408,24 @@ private void updateLanguageValue(String language, String value) {
if (StringUtils.isEmpty(language)) {
return;
}
if (getModelObject() == null) {
Map<String, String> languagesMap = new HashMap<>();
getModel().setObject(new PolyString(null, null, null, languagesMap));

PolyString poly = getModelObject();
if (poly == null) {
poly = new PolyString(null, null, null, new HashMap<>());
getModel().setObject(poly);
return;
}
if (getModelObject().getLang() == null) {
getModelObject().setLang(new HashMap<>());

Map<String, String> lang = poly.getLang();
if (lang == null) {
lang = new HashMap<>();
poly.setLang(lang);
}
if (getModelObject().getLang().containsKey(language)) {
getModelObject().getLang().replace(language, value);

if (lang.containsKey(language)) {
lang.replace(language, value);
} else {
getModelObject().getLang().put(language, value);
lang.put(language, value);
}
}

Expand Down Expand Up @@ -494,5 +487,4 @@ protected void onDetach() {
model.detach();
super.onDetach();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,21 @@
<wicket:panel>
<div class="row">
<button wicket:id="expandCollapseButton" wicket:message="title:PrismObjectPanel.expandCollapseContainer"
class="pull-left btn btn-box-tool expand-collapse-button" trigger="hover"></button>
class="btn btn-tool expand-collapse-button" trigger="hover">

</button>
<a class="prism-title" wicket:id="label"/>
<span wicket:id="required" style="color: #f00; font-weight: bold;" wicket:message="title:prismPropertyPanel.required">*</span>
<span wicket:id="required" class="text-danger" style="font-weight: bold;" wicket:message="title:prismPropertyPanel.required">*</span>
<i wicket:id="help"/>
<i wicket:id="deprecated"/>
<i wicket:id="experimental"/>

<button wicket:id="add" wicket:message="title:ItemHeaderPanel.addValue" class="btn btn-box-tool fa fa-plus-circle" trigger="hover" />
<button wicket:id="remove" wicket:message="title:ItemHeaderPanel.removeAll" class="btn btn-box-tool fa fa-minus-circle" trigger="hover" />
<button wicket:id="add" wicket:message="title:ItemHeaderPanel.addValue" class="btn btn-tool" trigger="hover">
<i class="fa fa-plus-circle"></i>
</button>
<button wicket:id="remove" wicket:message="title:ItemHeaderPanel.removeAll" class="btn btn-tool" trigger="hover">
<i class="fa fa-minus-circle"></i>
</button>
</div>
</wicket:panel>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@
<!DOCTYPE html>
<html xmlns:wicket="http://wicket.apache.org">
<wicket:panel>

<div class="prism-header" wicket:id="header"/>
<div class="container-wrapper">
<div wicket:id="values">
<div style="width:100%" wicket:id="value"/>
</div>
<div style="width: 100%;" wicket:id="value"/>
</div>
</div>
</wicket:panel>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@
<wicket:extend>
<wicket:fragment wicket:id="expandCollapseFragment">
<button wicket:id="expandCollapseButton" wicket:message="title:PrismObjectPanel.expandCollapseContainer"
class="btn btn-box-tool expand-collapse-button" trigger="hover"><i class="fa fa-caret-down"></i></button>
class="btn btn-tool expand-collapse-button" trigger="hover"><i class="fa fa-caret-down"></i></button>
</wicket:fragment>
<div class="row">
<div class="col-xs-2">
<button wicket:id="showMetadata" class="btn btn-box-tool"><i class="fa fa-asterisk"></i></button>
<button wicket:id="showMetadata" class="btn btn-tool"><i class="fa fa-asterisk"></i></button>
<button wicket:id="sortProperties" wicket:message="title:PrismObjectPanel.sortProperties"
class="btn btn-box-tool"><i class="fa fa-sort-alpha-asc"></i></button>
class="btn btn-tool"><i class="fa fa-sort-alpha-down"></i></button>
<!-- <button wicket:id="showEmptyFields" wicket:message="title:PrismObjectPanel.showEmpty"
class="btn btn-box-tool" trigger="hover" about="showEmptyFields"><i class="fa fa-arrows-alt"></i>
</button> -->
<button wicket:id="addChildContainer" wicket:message="title:PrismObjectPanel.addChildContainer"
class="btn btn-box-tool" trigger="hover"><i class="fa fa-plus-circle"></i></button>
class="btn btn-tool" trigger="hover"><i class="fa fa-plus-circle"></i></button>
<button wicket:id="removeContainer" wicket:message="title:PrismObjectPanel.deleteContainer"
class="btn btn-box-tool" trigger="hover"><i class="fa fa-minus-circle"></i></button>
class="btn btn-tool" trigger="hover"><i class="fa fa-minus-circle"></i></button>
</div>
<div class="col-xs-3" wicket:id="childContainersSelectorPanel">
<div class="col-xs-10" wicket:id="childContainersList"/>
Expand Down

0 comments on commit 62b81cc

Please sign in to comment.