diff --git a/modules/web/src/com/haulmont/cuba/web/app/ui/security/role/AttributePermissionsFrameCompanion.java b/modules/web/src/com/haulmont/cuba/web/app/ui/security/role/AttributePermissionsFrameCompanion.java index b2d9b57449..1be8a46c1b 100644 --- a/modules/web/src/com/haulmont/cuba/web/app/ui/security/role/AttributePermissionsFrameCompanion.java +++ b/modules/web/src/com/haulmont/cuba/web/app/ui/security/role/AttributePermissionsFrameCompanion.java @@ -43,7 +43,7 @@ public class AttributePermissionsFrameCompanion implements AttributePermissionsF if (i > 0) builder.append(", "); - builder.append("") + builder.append("") .append(attributeTarget.getId()).append(""); } else { builder.append(", ..."); diff --git a/modules/web/src/com/haulmont/cuba/web/app/ui/security/role/EntityPermissionsFrameCompanion.java b/modules/web/src/com/haulmont/cuba/web/app/ui/security/role/EntityPermissionsFrameCompanion.java index 4e0b196194..85c5940533 100644 --- a/modules/web/src/com/haulmont/cuba/web/app/ui/security/role/EntityPermissionsFrameCompanion.java +++ b/modules/web/src/com/haulmont/cuba/web/app/ui/security/role/EntityPermissionsFrameCompanion.java @@ -48,7 +48,7 @@ public class EntityPermissionsFrameCompanion implements EntityPermissionsFrame.C StringBuilder builder = new StringBuilder(); if (permissionVariant != PermissionVariant.NOTSET) { - builder.append("") + builder.append("") .append(messages.getMessage(permissionVariant)).append(""); } diff --git a/modules/web/src/com/haulmont/cuba/web/app/ui/security/role/ScreenPermissionsFrameCompanion.java b/modules/web/src/com/haulmont/cuba/web/app/ui/security/role/ScreenPermissionsFrameCompanion.java index d88779117d..5d224c01ae 100644 --- a/modules/web/src/com/haulmont/cuba/web/app/ui/security/role/ScreenPermissionsFrameCompanion.java +++ b/modules/web/src/com/haulmont/cuba/web/app/ui/security/role/ScreenPermissionsFrameCompanion.java @@ -39,7 +39,7 @@ public class ScreenPermissionsFrameCompanion implements ScreenPermissionsFrame.C PermissionVariant permissionVariant = entity.getPermissionVariant(); if (permissionVariant != PermissionVariant.NOTSET) { - builder.append("") + builder.append("") .append(messages.getMessage(permissionVariant)).append(""); } diff --git a/modules/web/src/com/haulmont/cuba/web/app/ui/security/role/SpecificPermissionsFrameCompanion.java b/modules/web/src/com/haulmont/cuba/web/app/ui/security/role/SpecificPermissionsFrameCompanion.java index 61d5139944..c3a545a6bb 100644 --- a/modules/web/src/com/haulmont/cuba/web/app/ui/security/role/SpecificPermissionsFrameCompanion.java +++ b/modules/web/src/com/haulmont/cuba/web/app/ui/security/role/SpecificPermissionsFrameCompanion.java @@ -39,7 +39,7 @@ public class SpecificPermissionsFrameCompanion implements SpecificPermissionsFra PermissionVariant permissionVariant = entity.getPermissionVariant(); if (permissionVariant != PermissionVariant.NOTSET) { - builder.append("") + builder.append("") .append(messages.getMessage(permissionVariant)).append(""); } diff --git a/modules/web/src/com/haulmont/cuba/web/app/ui/security/role/UiPermissionsFrameCompanion.java b/modules/web/src/com/haulmont/cuba/web/app/ui/security/role/UiPermissionsFrameCompanion.java index e2664aafc2..78b065e9db 100644 --- a/modules/web/src/com/haulmont/cuba/web/app/ui/security/role/UiPermissionsFrameCompanion.java +++ b/modules/web/src/com/haulmont/cuba/web/app/ui/security/role/UiPermissionsFrameCompanion.java @@ -38,7 +38,7 @@ public class UiPermissionsFrameCompanion implements UiPermissionsFrame.Companion UiPermissionVariant permissionVariant = entity.getPermissionVariant(); if (permissionVariant != UiPermissionVariant.NOTSET) { - builder.append("") + builder.append("") .append(messages.getMessage(permissionVariant)).append(""); } diff --git a/modules/web/src/com/haulmont/cuba/web/gui/components/WebComponentsUtils.java b/modules/web/src/com/haulmont/cuba/web/gui/components/WebComponentsUtils.java index 5ef15065f6..02a4194275 100644 --- a/modules/web/src/com/haulmont/cuba/web/gui/components/WebComponentsUtils.java +++ b/modules/web/src/com/haulmont/cuba/web/gui/components/WebComponentsUtils.java @@ -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); } } \ No newline at end of file diff --git a/modules/web/themes/halo/app/role-editor.scss b/modules/web/themes/halo/app/role-editor.scss new file mode 100644 index 0000000000..29db81e21c --- /dev/null +++ b/modules/web/themes/halo/app/role-editor.scss @@ -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(); + } +} \ No newline at end of file diff --git a/modules/web/themes/halo/halo.scss b/modules/web/themes/halo/halo.scss index dccce33c11..daa9e7c88f 100644 --- a/modules/web/themes/halo/halo.scss +++ b/modules/web/themes/halo/halo.scss @@ -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; diff --git a/modules/web/themes/havana/app/role-editor.scss b/modules/web/themes/havana/app/role-editor.scss new file mode 100644 index 0000000000..d86e5b6c5d --- /dev/null +++ b/modules/web/themes/havana/app/role-editor.scss @@ -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; + } +} \ No newline at end of file diff --git a/modules/web/themes/havana/havana.scss b/modules/web/themes/havana/havana.scss index 7ba80d42cf..af4309e419 100644 --- a/modules/web/themes/havana/havana.scss +++ b/modules/web/themes/havana/havana.scss @@ -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; } \ No newline at end of file