mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-04 12:17:41 +08:00
Halo - Selected table row hides information on permission #PL-5431
This commit is contained in:
parent
bef8da87a9
commit
b2ed2e6016
@ -43,7 +43,7 @@ public class AttributePermissionsFrameCompanion implements AttributePermissionsF
|
||||
if (i > 0)
|
||||
builder.append(", ");
|
||||
|
||||
builder.append("<span style=\"color:").append(permissionVariant.getColor()).append(";\">")
|
||||
builder.append("<span class=\"role-permission-").append(permissionVariant.getColor()).append("\">")
|
||||
.append(attributeTarget.getId()).append("</span>");
|
||||
} else {
|
||||
builder.append(", ...");
|
||||
|
@ -48,7 +48,7 @@ public class EntityPermissionsFrameCompanion implements EntityPermissionsFrame.C
|
||||
|
||||
StringBuilder builder = new StringBuilder();
|
||||
if (permissionVariant != PermissionVariant.NOTSET) {
|
||||
builder.append("<span style=\"color:").append(permissionVariant.getColor()).append(";\">")
|
||||
builder.append("<span class=\"role-permission-").append(permissionVariant.getColor()).append("\">")
|
||||
.append(messages.getMessage(permissionVariant)).append("</span>");
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ public class ScreenPermissionsFrameCompanion implements ScreenPermissionsFrame.C
|
||||
PermissionVariant permissionVariant = entity.getPermissionVariant();
|
||||
|
||||
if (permissionVariant != PermissionVariant.NOTSET) {
|
||||
builder.append("<span style=\"color:").append(permissionVariant.getColor()).append(";\">")
|
||||
builder.append("<span class=\"role-permission-").append(permissionVariant.getColor()).append("\">")
|
||||
.append(messages.getMessage(permissionVariant)).append("</span>");
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ public class SpecificPermissionsFrameCompanion implements SpecificPermissionsFra
|
||||
PermissionVariant permissionVariant = entity.getPermissionVariant();
|
||||
|
||||
if (permissionVariant != PermissionVariant.NOTSET) {
|
||||
builder.append("<span style=\"color:").append(permissionVariant.getColor()).append(";\">")
|
||||
builder.append("<span class=\"role-permission-").append(permissionVariant.getColor()).append("\">")
|
||||
.append(messages.getMessage(permissionVariant)).append("</span>");
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ public class UiPermissionsFrameCompanion implements UiPermissionsFrame.Companion
|
||||
UiPermissionVariant permissionVariant = entity.getPermissionVariant();
|
||||
|
||||
if (permissionVariant != UiPermissionVariant.NOTSET) {
|
||||
builder.append("<span style=\"color:").append(permissionVariant.getColor()).append(";\">")
|
||||
builder.append("<span style=\"role-permission-").append(permissionVariant.getColor()).append("\">")
|
||||
.append(messages.getMessage(permissionVariant)).append("</span>");
|
||||
}
|
||||
|
||||
|
@ -17,22 +17,22 @@ import com.vaadin.ui.ComboBox;
|
||||
public class WebComponentsUtils {
|
||||
|
||||
public static void allowHtmlContent(Label label) {
|
||||
com.vaadin.ui.Label vLabel = (com.vaadin.ui.Label) WebComponentsHelper.unwrap(label);
|
||||
com.vaadin.ui.Label vLabel = WebComponentsHelper.unwrap(label);
|
||||
vLabel.setContentMode(ContentMode.HTML);
|
||||
}
|
||||
|
||||
public static void disallowHtmlContent(Label label) {
|
||||
com.vaadin.ui.Label vLabel = (com.vaadin.ui.Label) WebComponentsHelper.unwrap(label);
|
||||
com.vaadin.ui.Label vLabel = WebComponentsHelper.unwrap(label);
|
||||
vLabel.setContentMode(ContentMode.TEXT);
|
||||
}
|
||||
|
||||
public static void allowNullSelection(LookupField lookupField) {
|
||||
ComboBox vCombobox = (ComboBox) WebComponentsHelper.unwrap(lookupField);
|
||||
ComboBox vCombobox = WebComponentsHelper.unwrap(lookupField);
|
||||
vCombobox.setNullSelectionAllowed(true);
|
||||
}
|
||||
|
||||
public static void disallowNullSelection(LookupField lookupField) {
|
||||
ComboBox vCombobox = (ComboBox) WebComponentsHelper.unwrap(lookupField);
|
||||
ComboBox vCombobox = WebComponentsHelper.unwrap(lookupField);
|
||||
vCombobox.setNullSelectionAllowed(false);
|
||||
}
|
||||
}
|
39
modules/web/themes/halo/app/role-editor.scss
Normal file
39
modules/web/themes/halo/app/role-editor.scss
Normal file
@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright (c) 2008-2015 Haulmont. All rights reserved.
|
||||
* Use is subject to license terms, see http://www.cuba-platform.com/license for details.
|
||||
*/
|
||||
|
||||
// Version: $Id$// Version: $Id$
|
||||
|
||||
@mixin cuba-role-editor {
|
||||
.role-permission-red {
|
||||
color: #ff0000;
|
||||
}
|
||||
|
||||
.role-permission-green {
|
||||
color: green;
|
||||
}
|
||||
|
||||
.role-permission-black {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.role-permission-blue {
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.role-permission-red,
|
||||
.role-permission-green,
|
||||
.role-permission-blue,
|
||||
.role-permission-black {
|
||||
padding: round($v-unit-size/10) round($v-unit-size/3);
|
||||
}
|
||||
|
||||
.v-selected .role-permission-red,
|
||||
.v-selected .role-permission-green,
|
||||
.v-selected .role-permission-blue,
|
||||
.v-selected .role-permission-black {
|
||||
border-radius: round($v-unit-size/5);
|
||||
background: $v-table-background-color or valo-table-background-color();
|
||||
}
|
||||
}
|
@ -50,6 +50,7 @@
|
||||
// Application specific
|
||||
@import "app/log-control";
|
||||
@import "app/login-window";
|
||||
@import "app/role-editor";
|
||||
@import "app/report-wizard";
|
||||
@import "app/breadcrumbs";
|
||||
@import "app/generic-filter";
|
||||
@ -102,6 +103,7 @@
|
||||
|
||||
@include cuba-log-control;
|
||||
@include cuba-login-window;
|
||||
@include cuba-role-editor;
|
||||
@include cuba-report-wizard;
|
||||
@include cuba-breadcrumbs;
|
||||
@include cuba-generic-filter;
|
||||
|
24
modules/web/themes/havana/app/role-editor.scss
Normal file
24
modules/web/themes/havana/app/role-editor.scss
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright (c) 2008-2015 Haulmont. All rights reserved.
|
||||
* Use is subject to license terms, see http://www.cuba-platform.com/license for details.
|
||||
*/
|
||||
|
||||
// Version: $Id$// Version: $Id$
|
||||
|
||||
@mixin cuba-role-editor {
|
||||
.role-permission-red {
|
||||
color: #ff0000;
|
||||
}
|
||||
|
||||
.role-permission-green {
|
||||
color: green;
|
||||
}
|
||||
|
||||
.role-permission-black {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.role-permission-blue {
|
||||
color: blue;
|
||||
}
|
||||
}
|
@ -72,6 +72,7 @@
|
||||
@import "app/folders-pane";
|
||||
@import "app/log-control";
|
||||
@import "app/jmx-console";
|
||||
@import "app/role-editor";
|
||||
@import "app/report-wizard";
|
||||
|
||||
@mixin havana {
|
||||
@ -135,5 +136,6 @@
|
||||
@include cuba-breadcrumbs;
|
||||
@include cuba-log-control;
|
||||
@include cuba-jmx-console;
|
||||
@include cuba-role-editor;
|
||||
@include cuba-report-wizard;
|
||||
}
|
Loading…
Reference in New Issue
Block a user