From d8c285ea5e22171a129061832f2bcd456de5363b Mon Sep 17 00:00:00 2001 From: thecoder4eu Date: Mon, 29 Aug 2016 23:57:38 +0200 Subject: [PATCH] Improve build time and components maintainability using only one core CSS instead of per-component CSS ( #496 ). --- .../staticResources/less/bs-alerts.less | 13 ------ .../staticResources/less/bs-badges.less | 13 ------ .../staticResources/less/bs-carousel.less | 13 ------ .../staticResources/less/bs-core.less | 41 +++++++++++++++---- .../staticResources/less/bs-dropdowns.less | 13 ------ .../staticResources/less/bs-icons.less | 13 ------ .../staticResources/less/bs-jumbotron.less | 13 ------ .../staticResources/less/bs-labels.less | 13 ------ .../staticResources/less/bs-list-group.less | 13 ------ .../staticResources/less/bs-media.less | 13 ------ .../staticResources/less/bs-modals.less | 13 ------ .../staticResources/less/bs-panels.less | 27 ------------ .../staticResources/less/bs-popovers.less | 13 ------ .../less/bs-progress-bars.less | 13 ------ .../staticResources/less/bs-thumbnails.less | 23 ----------- .../staticResources/less/bs-tooltip.less | 13 ------ .../staticResources/less/bs-wells.less | 13 ------ .../{bs-navbar.less => customizations.less} | 39 ++++++++++++------ .../component/accordion/Accordion.java | 2 +- .../net/bootsfaces/component/alert/Alert.java | 6 +-- .../net/bootsfaces/component/badge/Badge.java | 2 +- .../component/carousel/Carousel.java | 5 ++- .../component/dropButton/DropButton.java | 6 +-- .../component/dropMenu/DropMenu.java | 6 +-- .../net/bootsfaces/component/growl/Growl.java | 2 +- .../net/bootsfaces/component/icon/Icon.java | 2 +- .../component/inputText/InputText.java | 2 +- .../component/jumbotron/Jumbotron.java | 2 +- .../net/bootsfaces/component/label/Label.java | 8 ++-- .../bootsfaces/component/message/Message.java | 2 +- .../component/messages/Messages.java | 2 +- .../net/bootsfaces/component/modal/Modal.java | 4 +- .../bootsfaces/component/navBar/NavBar.java | 8 ++-- .../net/bootsfaces/component/panel/Panel.java | 2 +- .../component/progressBar/ProgressBar.java | 2 +- .../selectMultiMenu/SelectMultiMenu.java | 8 ++-- .../selectOneMenu/SelectOneMenu.java | 4 +- .../bootsfaces/component/slider/Slider.java | 8 ++-- .../component/thumbnail/Thumbnail.java | 2 +- .../net/bootsfaces/component/tree/Tree.java | 7 ++-- .../net/bootsfaces/component/well/Well.java | 2 +- .../java/net/bootsfaces/render/Tooltip.java | 2 +- 42 files changed, 109 insertions(+), 299 deletions(-) delete mode 100644 gradleResources/staticResources/less/bs-alerts.less delete mode 100644 gradleResources/staticResources/less/bs-badges.less delete mode 100644 gradleResources/staticResources/less/bs-carousel.less delete mode 100644 gradleResources/staticResources/less/bs-dropdowns.less delete mode 100644 gradleResources/staticResources/less/bs-icons.less delete mode 100644 gradleResources/staticResources/less/bs-jumbotron.less delete mode 100644 gradleResources/staticResources/less/bs-labels.less delete mode 100644 gradleResources/staticResources/less/bs-list-group.less delete mode 100644 gradleResources/staticResources/less/bs-media.less delete mode 100644 gradleResources/staticResources/less/bs-modals.less delete mode 100644 gradleResources/staticResources/less/bs-panels.less delete mode 100644 gradleResources/staticResources/less/bs-popovers.less delete mode 100644 gradleResources/staticResources/less/bs-progress-bars.less delete mode 100644 gradleResources/staticResources/less/bs-thumbnails.less delete mode 100644 gradleResources/staticResources/less/bs-tooltip.less delete mode 100644 gradleResources/staticResources/less/bs-wells.less rename gradleResources/staticResources/less/{bs-navbar.less => customizations.less} (68%) diff --git a/gradleResources/staticResources/less/bs-alerts.less b/gradleResources/staticResources/less/bs-alerts.less deleted file mode 100644 index 62d86b108..000000000 --- a/gradleResources/staticResources/less/bs-alerts.less +++ /dev/null @@ -1,13 +0,0 @@ -// -------------------------------- -// This file is part of BootsFaces. -// -------------------------------- - -// Core variables and mixins -@import "variables.less"; -// Extra Variables (override) -@import "extra-variables.less"; - -@import "mixins/alerts.less"; - -@import "alerts.less"; - diff --git a/gradleResources/staticResources/less/bs-badges.less b/gradleResources/staticResources/less/bs-badges.less deleted file mode 100644 index 99bf42f64..000000000 --- a/gradleResources/staticResources/less/bs-badges.less +++ /dev/null @@ -1,13 +0,0 @@ -// -------------------------------- -// This file is part of BootsFaces. -// -------------------------------- - -// Core variables and mixins -@import "variables.less"; -// Extra Variables (override) -@import "extra-variables.less"; - -@import "mixins.less"; - -@import "badges.less"; - diff --git a/gradleResources/staticResources/less/bs-carousel.less b/gradleResources/staticResources/less/bs-carousel.less deleted file mode 100644 index 3ee0f84ee..000000000 --- a/gradleResources/staticResources/less/bs-carousel.less +++ /dev/null @@ -1,13 +0,0 @@ -// -------------------------------- -// This file is part of BootsFaces. -// -------------------------------- - -// Core variables and mixins -@import "variables.less"; -// Extra Variables (override) -@import "extra-variables.less"; - -@import "mixins.less"; - -@import "carousel.less"; - diff --git a/gradleResources/staticResources/less/bs-core.less b/gradleResources/staticResources/less/bs-core.less index 1589be179..57804b5de 100644 --- a/gradleResources/staticResources/less/bs-core.less +++ b/gradleResources/staticResources/less/bs-core.less @@ -4,15 +4,19 @@ // Core variables and mixins @import "variables.less"; +@import "mixins.less"; + // Extra Variables (override) @import "extra-variables.less"; -@import "mixins.less"; - -// Reset +// Reset and dependencies @import "normalize.less"; @import "print.less"; +// Load fonts from this directory. +@icon-font-path: "../../fonts/"; +@import "glyphicons.less"; + // Core CSS @import "scaffolding.less"; @import "type.less"; @@ -21,19 +25,38 @@ @import "tables.less"; @import "forms.less"; @import "buttons.less"; -@import "button-groups.less"; -@import "navs.less"; // Components +@import "component-animations.less"; +@import "dropdowns.less"; +@import "button-groups.less"; +@import "input-groups.less"; +@import "navs.less"; +@import "navbar.less"; @import "breadcrumbs.less"; @import "pagination.less"; @import "pager.less"; +@import "labels.less"; +@import "badges.less"; +@import "jumbotron.less"; +@import "thumbnails.less"; +@import "alerts.less"; +@import "progress-bars.less"; +@import "media.less"; +@import "list-group.less"; +@import "panels.less"; +@import "responsive-embed.less"; +@import "wells.less"; @import "close.less"; -@import "component-animations.less"; -//@import "glyphicons.less"; -@import "input-groups.less"; + +// Components w/ JavaScript +@import "modals.less"; +@import "tooltip.less"; +@import "popovers.less"; +@import "carousel.less"; // Utility classes @import "utilities.less"; @import "responsive-utilities.less"; -@import "responsive-embed.less"; + +@import "customizations.less"; diff --git a/gradleResources/staticResources/less/bs-dropdowns.less b/gradleResources/staticResources/less/bs-dropdowns.less deleted file mode 100644 index 1a51f86a0..000000000 --- a/gradleResources/staticResources/less/bs-dropdowns.less +++ /dev/null @@ -1,13 +0,0 @@ -// -------------------------------- -// This file is part of BootsFaces. -// -------------------------------- - -// Core variables and mixins -@import "variables.less"; -// Extra Variables (override) -@import "extra-variables.less"; - -@import "mixins.less"; - -@import "dropdowns.less"; - diff --git a/gradleResources/staticResources/less/bs-icons.less b/gradleResources/staticResources/less/bs-icons.less deleted file mode 100644 index d5a078e79..000000000 --- a/gradleResources/staticResources/less/bs-icons.less +++ /dev/null @@ -1,13 +0,0 @@ -// -------------------------------- -// This file is part of BootsFaces. -// -------------------------------- - -// Core variables and mixins -@import "variables.less"; -// Extra Variables (override) -@import "extra-variables.less"; - -//** Load fonts from this directory. -@icon-font-path: "../../fonts/"; -@import "glyphicons.less"; - diff --git a/gradleResources/staticResources/less/bs-jumbotron.less b/gradleResources/staticResources/less/bs-jumbotron.less deleted file mode 100644 index 198a92822..000000000 --- a/gradleResources/staticResources/less/bs-jumbotron.less +++ /dev/null @@ -1,13 +0,0 @@ -// -------------------------------- -// This file is part of BootsFaces. -// -------------------------------- - -// Core variables and mixins -@import "variables.less"; -// Extra Variables (override) -@import "extra-variables.less"; - -@import "mixins.less"; - -@import "jumbotron.less"; - diff --git a/gradleResources/staticResources/less/bs-labels.less b/gradleResources/staticResources/less/bs-labels.less deleted file mode 100644 index bf34d6db5..000000000 --- a/gradleResources/staticResources/less/bs-labels.less +++ /dev/null @@ -1,13 +0,0 @@ -// -------------------------------- -// This file is part of BootsFaces. -// -------------------------------- - -// Core variables and mixins -@import "variables.less"; -// Extra Variables (override) -@import "extra-variables.less"; - -@import "mixins.less"; - -@import "labels.less"; - diff --git a/gradleResources/staticResources/less/bs-list-group.less b/gradleResources/staticResources/less/bs-list-group.less deleted file mode 100644 index fe7e4e77c..000000000 --- a/gradleResources/staticResources/less/bs-list-group.less +++ /dev/null @@ -1,13 +0,0 @@ -// -------------------------------- -// This file is part of BootsFaces. -// -------------------------------- - -// Core variables and mixins -@import "variables.less"; -// Extra Variables (override) -@import "extra-variables.less"; - -@import "mixins.less"; - -@import "list-group.less"; - diff --git a/gradleResources/staticResources/less/bs-media.less b/gradleResources/staticResources/less/bs-media.less deleted file mode 100644 index 7eaab9b39..000000000 --- a/gradleResources/staticResources/less/bs-media.less +++ /dev/null @@ -1,13 +0,0 @@ -// -------------------------------- -// This file is part of BootsFaces. -// -------------------------------- - -// Core variables and mixins -@import "variables.less"; -// Extra Variables (override) -@import "extra-variables.less"; - -@import "mixins.less"; - -@import "media.less"; - diff --git a/gradleResources/staticResources/less/bs-modals.less b/gradleResources/staticResources/less/bs-modals.less deleted file mode 100644 index 5fdf87238..000000000 --- a/gradleResources/staticResources/less/bs-modals.less +++ /dev/null @@ -1,13 +0,0 @@ -// -------------------------------- -// This file is part of BootsFaces. -// -------------------------------- - -// Core variables and mixins -@import "variables.less"; -// Extra Variables (override) -@import "extra-variables.less"; - -@import "mixins.less"; - -@import "modals.less"; - diff --git a/gradleResources/staticResources/less/bs-panels.less b/gradleResources/staticResources/less/bs-panels.less deleted file mode 100644 index 77ee11a48..000000000 --- a/gradleResources/staticResources/less/bs-panels.less +++ /dev/null @@ -1,27 +0,0 @@ -// -------------------------------- -// This file is part of BootsFaces. -// -------------------------------- - -// Core variables and mixins -@import "variables.less"; -// Extra Variables (override) -@import "extra-variables.less"; - -@import "mixins.less"; - -@import "panels.less"; - -/* Collapsible panels */ -.panel-heading a:after { - font-family:'Glyphicons Halflings'; - content:"\e114"; - float: right; - color: grey; -} -.panel-heading a.collapsed:after { - content:"\e080"; -} -a.panel-title-link { - outline: thin dotted rgba(255, 255, 255, 0.3); - outline-offset: 3px; -} diff --git a/gradleResources/staticResources/less/bs-popovers.less b/gradleResources/staticResources/less/bs-popovers.less deleted file mode 100644 index 192b5731c..000000000 --- a/gradleResources/staticResources/less/bs-popovers.less +++ /dev/null @@ -1,13 +0,0 @@ -// -------------------------------- -// This file is part of BootsFaces. -// -------------------------------- - -// Core variables and mixins -@import "variables.less"; -// Extra Variables (override) -@import "extra-variables.less"; - -@import "mixins.less"; - -@import "popovers.less"; - diff --git a/gradleResources/staticResources/less/bs-progress-bars.less b/gradleResources/staticResources/less/bs-progress-bars.less deleted file mode 100644 index 0b482a72c..000000000 --- a/gradleResources/staticResources/less/bs-progress-bars.less +++ /dev/null @@ -1,13 +0,0 @@ -// -------------------------------- -// This file is part of BootsFaces. -// -------------------------------- - -// Core variables and mixins -@import "variables.less"; -// Extra Variables (override) -@import "extra-variables.less"; - -@import "mixins.less"; - -@import "progress-bars.less"; - diff --git a/gradleResources/staticResources/less/bs-thumbnails.less b/gradleResources/staticResources/less/bs-thumbnails.less deleted file mode 100644 index 8ea1fdb78..000000000 --- a/gradleResources/staticResources/less/bs-thumbnails.less +++ /dev/null @@ -1,23 +0,0 @@ -// -------------------------------- -// This file is part of BootsFaces. -// -------------------------------- - -// Core variables and mixins -@import "variables.less"; -// Extra Variables (override) -@import "extra-variables.less"; - -@import "mixins.less"; - -// Responsive image -// -// Keep images from scaling beyond the width of their parents. - -.img-responsive { - display: block; - max-width: 100%; // Part 1: Set a maximum relative to the parent - height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching -} - -@import "thumbnails.less"; - diff --git a/gradleResources/staticResources/less/bs-tooltip.less b/gradleResources/staticResources/less/bs-tooltip.less deleted file mode 100644 index d87c5541c..000000000 --- a/gradleResources/staticResources/less/bs-tooltip.less +++ /dev/null @@ -1,13 +0,0 @@ -// -------------------------------- -// This file is part of BootsFaces. -// -------------------------------- - -// Core variables and mixins -@import "variables.less"; -// Extra Variables (override) -@import "extra-variables.less"; - -@import "mixins.less"; - -@import "tooltip.less"; - diff --git a/gradleResources/staticResources/less/bs-wells.less b/gradleResources/staticResources/less/bs-wells.less deleted file mode 100644 index 6dddf5018..000000000 --- a/gradleResources/staticResources/less/bs-wells.less +++ /dev/null @@ -1,13 +0,0 @@ -// -------------------------------- -// This file is part of BootsFaces. -// -------------------------------- - -// Core variables and mixins -@import "variables.less"; -// Extra Variables (override) -@import "extra-variables.less"; - -@import "mixins.less"; - -@import "wells.less"; - diff --git a/gradleResources/staticResources/less/bs-navbar.less b/gradleResources/staticResources/less/customizations.less similarity index 68% rename from gradleResources/staticResources/less/bs-navbar.less rename to gradleResources/staticResources/less/customizations.less index 0a80a7554..07424807c 100644 --- a/gradleResources/staticResources/less/bs-navbar.less +++ b/gradleResources/staticResources/less/customizations.less @@ -1,15 +1,6 @@ -// -------------------------------- -// This file is part of BootsFaces. -// -------------------------------- - -// Core variables and mixins -@import "variables.less"; -// Extra Variables (override) -@import "extra-variables.less"; - -@import "mixins.less"; -@import "utilities.less"; +//BootsFaces Overrides +// NavBar // Inline forms // // Make forms appear inline(-block) by adding the `.form-inline` class. Inline @@ -60,5 +51,29 @@ } } -@import "navbar.less"; +// Panels +/* Collapsible panels */ +.panel-heading a:after { + font-family:'Glyphicons Halflings'; + content:"\e114"; + float: right; + color: grey; +} +.panel-heading a.collapsed:after { + content:"\e080"; +} +a.panel-title-link { + outline: thin dotted rgba(255, 255, 255, 0.3); + outline-offset: 3px; +} + +// Thumbnails +// Responsive image +// +// Keep images from scaling beyond the width of their parents. +.img-responsive { + display: block; + max-width: 100%; // Part 1: Set a maximum relative to the parent + height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching +} diff --git a/src/main/java/net/bootsfaces/component/accordion/Accordion.java b/src/main/java/net/bootsfaces/component/accordion/Accordion.java index 7d9e1c283..a7012f3c8 100644 --- a/src/main/java/net/bootsfaces/component/accordion/Accordion.java +++ b/src/main/java/net/bootsfaces/component/accordion/Accordion.java @@ -41,7 +41,7 @@ public Accordion() { Tooltip.addResourceFiles(); AddResourcesListener.addThemedCSSResource("core.css"); AddResourcesListener.addThemedCSSResource("bsf.css"); - AddResourcesListener.addThemedCSSResource("panels.css"); + //!bs-less//AddResourcesListener.addThemedCSSResource("panels.css"); setRendererType(DEFAULT_RENDERER); } diff --git a/src/main/java/net/bootsfaces/component/alert/Alert.java b/src/main/java/net/bootsfaces/component/alert/Alert.java index 938dbc5b7..9fb12708a 100644 --- a/src/main/java/net/bootsfaces/component/alert/Alert.java +++ b/src/main/java/net/bootsfaces/component/alert/Alert.java @@ -1,8 +1,8 @@ /** * Copyright 2014-16 by Riccardo Massera (TheCoder4.Eu) and Stephan Rauh (http://www.beyondjava.net). - * + * * This file is part of BootsFaces. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -43,7 +43,7 @@ public class Alert extends UIComponentBase implements IHasTooltip, IResponsive { public Alert() { Tooltip.addResourceFiles(); AddResourcesListener.addThemedCSSResource("core.css"); - AddResourcesListener.addThemedCSSResource("alerts.css"); + //!bs-less//AddResourcesListener.addThemedCSSResource("alerts.css"); setRendererType(DEFAULT_RENDERER); } diff --git a/src/main/java/net/bootsfaces/component/badge/Badge.java b/src/main/java/net/bootsfaces/component/badge/Badge.java index 92d4f7466..337fdb42b 100644 --- a/src/main/java/net/bootsfaces/component/badge/Badge.java +++ b/src/main/java/net/bootsfaces/component/badge/Badge.java @@ -38,7 +38,7 @@ public class Badge extends BadgeCore implements net.bootsfaces.render.IHasToolti public Badge() { AddResourcesListener.addThemedCSSResource("core.css"); - AddResourcesListener.addThemedCSSResource("badges.css"); + //!bs-less//AddResourcesListener.addThemedCSSResource("badges.css"); setRendererType(DEFAULT_RENDERER); } diff --git a/src/main/java/net/bootsfaces/component/carousel/Carousel.java b/src/main/java/net/bootsfaces/component/carousel/Carousel.java index 3e30c5324..655412cda 100644 --- a/src/main/java/net/bootsfaces/component/carousel/Carousel.java +++ b/src/main/java/net/bootsfaces/component/carousel/Carousel.java @@ -39,7 +39,8 @@ import net.bootsfaces.utils.BsfUtils; /** This class holds the attributes of <b:carousel />. */ -@ResourceDependencies({ @ResourceDependency(library = "bsf", name = "js/carousel.js", target = "head"), +@ResourceDependencies({ + @ResourceDependency(library = "bsf", name = "js/carousel.js", target = "head"), @ResourceDependency(library = "bsf", name = "js/transition.js", target = "head") }) @FacesComponent("net.bootsfaces.component.carousel.Carousel") @@ -55,7 +56,7 @@ public class Carousel extends UICommand public Carousel() { Tooltip.addResourceFiles(); AddResourcesListener.addThemedCSSResource("bsf.css"); - AddResourcesListener.addThemedCSSResource("carousel.css"); + //!bs-less//AddResourcesListener.addThemedCSSResource("carousel.css"); AddResourcesListener.addThemedCSSResource("core.css"); AddResourcesListener.addResourceToHeadButAfterJQuery(C.BSF_LIBRARY, "jq/ui/core.js"); setRendererType(DEFAULT_RENDERER); diff --git a/src/main/java/net/bootsfaces/component/dropButton/DropButton.java b/src/main/java/net/bootsfaces/component/dropButton/DropButton.java index 199b1ba47..47b6c11cc 100644 --- a/src/main/java/net/bootsfaces/component/dropButton/DropButton.java +++ b/src/main/java/net/bootsfaces/component/dropButton/DropButton.java @@ -1,8 +1,8 @@ /** * Copyright 2014-16 by Riccardo Massera (TheCoder4.Eu) and Stephan Rauh (http://www.beyondjava.net). - * + * * This file is part of BootsFaces. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -41,7 +41,7 @@ public class DropButton extends UIComponentBase implements IHasTooltip, IRespons public DropButton() { // AddResourcesListener.addResourceToHeadButAfterJQuery(C.BSF_LIBRARY, // "jq/jquery.js"); - AddResourcesListener.addThemedCSSResource("dropdowns.css"); + //!bs-less//AddResourcesListener.addThemedCSSResource("dropdowns.css"); AddResourcesListener.addThemedCSSResource("core.css"); Tooltip.addResourceFiles(); AddResourcesListener.addResourceToHeadButAfterJQuery("bsf", "js/dropdown.js"); diff --git a/src/main/java/net/bootsfaces/component/dropMenu/DropMenu.java b/src/main/java/net/bootsfaces/component/dropMenu/DropMenu.java index 9737f103f..a601a7215 100644 --- a/src/main/java/net/bootsfaces/component/dropMenu/DropMenu.java +++ b/src/main/java/net/bootsfaces/component/dropMenu/DropMenu.java @@ -31,7 +31,7 @@ import net.bootsfaces.utils.BsfUtils; /** This class holds the attributes of <b:dropMenu />. */ -@ResourceDependencies({ @ResourceDependency(library = "bsf", name = "js/dropdown.js", target = "body"), }) +@ResourceDependencies({ @ResourceDependency(library = "bsf", name = "js/dropdown.js", target = "body") }) @FacesComponent("net.bootsfaces.component.dropMenu.DropMenu") public class DropMenu extends UIComponentBase implements IHasTooltip, IResponsive { @@ -44,9 +44,9 @@ public class DropMenu extends UIComponentBase implements IHasTooltip, IResponsiv public DropMenu() { Tooltip.addResourceFiles(); // AddResourcesListener.addResourceToHeadButAfterJQuery(C.BSF_LIBRARY, "jq/jquery.js"); - AddResourcesListener.addThemedCSSResource("dropdowns.css"); - AddResourcesListener.addThemedCSSResource("dropdown-submenu.css"); + //!bs-less//AddResourcesListener.addThemedCSSResource("dropdowns.css"); AddResourcesListener.addThemedCSSResource("core.css"); + AddResourcesListener.addThemedCSSResource("dropdown-submenu.css"); setRendererType(DEFAULT_RENDERER); } diff --git a/src/main/java/net/bootsfaces/component/growl/Growl.java b/src/main/java/net/bootsfaces/component/growl/Growl.java index 7dd918e5f..e266743a3 100644 --- a/src/main/java/net/bootsfaces/component/growl/Growl.java +++ b/src/main/java/net/bootsfaces/component/growl/Growl.java @@ -33,7 +33,7 @@ public Growl() { setRendererType("net.bootsfaces.component.GrowlRenderer"); AddResourcesListener.addResourceToHeadButAfterJQuery(C.BSF_LIBRARY, "js/bootstrap-notify.min.js"); AddResourcesListener.addThemedCSSResource("core.css"); - AddResourcesListener.addThemedCSSResource("alerts.css"); + //!bs-less//AddResourcesListener.addThemedCSSResource("alerts.css"); AddResourcesListener.addThemedCSSResource("animate.css"); } diff --git a/src/main/java/net/bootsfaces/component/icon/Icon.java b/src/main/java/net/bootsfaces/component/icon/Icon.java index 43d5713a8..11fc66d27 100644 --- a/src/main/java/net/bootsfaces/component/icon/Icon.java +++ b/src/main/java/net/bootsfaces/component/icon/Icon.java @@ -48,7 +48,7 @@ public class Icon extends IconCore implements net.bootsfaces.render.IHasTooltip, public Icon() { Tooltip.addResourceFiles(); AddResourcesListener.addThemedCSSResource("core.css"); - AddResourcesListener.addThemedCSSResource("icons.css"); + //!bs-less//AddResourcesListener.addThemedCSSResource("icons.css"); setRendererType(DEFAULT_RENDERER); } diff --git a/src/main/java/net/bootsfaces/component/inputText/InputText.java b/src/main/java/net/bootsfaces/component/inputText/InputText.java index 5b35ff55f..b09c9b15b 100644 --- a/src/main/java/net/bootsfaces/component/inputText/InputText.java +++ b/src/main/java/net/bootsfaces/component/inputText/InputText.java @@ -108,7 +108,7 @@ public String getFamily() { public void setTags(boolean _tags) { if (_tags) { AddResourcesListener.addResourceToHeadButAfterJQuery(C.BSF_LIBRARY, "js/bootstrap-tagsinput.min.js"); - AddResourcesListener.addThemedCSSResource("labels.css"); + //!bs-less//AddResourcesListener.addThemedCSSResource("labels.css"); AddResourcesListener.addThemedCSSResource("bootstrap-tagsinput.css"); } diff --git a/src/main/java/net/bootsfaces/component/jumbotron/Jumbotron.java b/src/main/java/net/bootsfaces/component/jumbotron/Jumbotron.java index c17b971df..ff3ecc2d9 100644 --- a/src/main/java/net/bootsfaces/component/jumbotron/Jumbotron.java +++ b/src/main/java/net/bootsfaces/component/jumbotron/Jumbotron.java @@ -40,7 +40,7 @@ public Jumbotron() { Tooltip.addResourceFiles(); AddResourcesListener.addThemedCSSResource("core.css"); - AddResourcesListener.addThemedCSSResource("jumbotron.css"); + //!bs-less//AddResourcesListener.addThemedCSSResource("jumbotron.css"); setRendererType(DEFAULT_RENDERER); } diff --git a/src/main/java/net/bootsfaces/component/label/Label.java b/src/main/java/net/bootsfaces/component/label/Label.java index ac4358687..24eca439d 100644 --- a/src/main/java/net/bootsfaces/component/label/Label.java +++ b/src/main/java/net/bootsfaces/component/label/Label.java @@ -1,8 +1,8 @@ /** * Copyright 2014-16 by Riccardo Massera (TheCoder4.Eu), Dario D'Urzo and Stephan Rauh (http://www.beyondjava.net). - * + * * This file is part of BootsFaces. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -48,7 +48,7 @@ public class Label extends UIComponentBase implements IHasTooltip, IResponsive { public Label() { setRendererType(null); // this component renders itself AddResourcesListener.addThemedCSSResource("core.css"); - AddResourcesListener.addThemedCSSResource("labels.css"); + //!bs-less//AddResourcesListener.addThemedCSSResource("labels.css"); Tooltip.addResourceFiles(); } @@ -56,7 +56,7 @@ public String getFamily() { return COMPONENT_FAMILY; } - /** + /** * Manage EL-expression for snake-case attributes */ public void setValueExpression(String name, ValueExpression binding) { diff --git a/src/main/java/net/bootsfaces/component/message/Message.java b/src/main/java/net/bootsfaces/component/message/Message.java index b5dd87e00..7d6c84b4e 100644 --- a/src/main/java/net/bootsfaces/component/message/Message.java +++ b/src/main/java/net/bootsfaces/component/message/Message.java @@ -40,7 +40,7 @@ public class Message extends UIMessage implements IResponsive { public Message() { setRendererType(DEFAULT_RENDERER); AddResourcesListener.addThemedCSSResource("core.css"); - AddResourcesListener.addThemedCSSResource("alerts.css"); + //!bs-less//AddResourcesListener.addThemedCSSResource("alerts.css"); AddResourcesListener.addThemedCSSResource("bsf.css"); AddResourcesListener.addResourceToHeadButAfterJQuery(C.BSF_LIBRARY, "js/alert.js"); } diff --git a/src/main/java/net/bootsfaces/component/messages/Messages.java b/src/main/java/net/bootsfaces/component/messages/Messages.java index aba197fd3..8c31ea4e3 100644 --- a/src/main/java/net/bootsfaces/component/messages/Messages.java +++ b/src/main/java/net/bootsfaces/component/messages/Messages.java @@ -40,7 +40,7 @@ public class Messages extends javax.faces.component.UIMessages implements IRespo public Messages() { super(); AddResourcesListener.addThemedCSSResource("core.css"); - AddResourcesListener.addThemedCSSResource("alerts.css"); + //!bs-less//AddResourcesListener.addThemedCSSResource("alerts.css"); AddResourcesListener.addThemedCSSResource("bsf.css"); AddResourcesListener.addResourceToHeadButAfterJQuery(C.BSF_LIBRARY, "js/alert.js"); setRendererType("net.bootsfaces.component.messages.MessagesRenderer"); diff --git a/src/main/java/net/bootsfaces/component/modal/Modal.java b/src/main/java/net/bootsfaces/component/modal/Modal.java index d3665e2f5..adc2d79fd 100644 --- a/src/main/java/net/bootsfaces/component/modal/Modal.java +++ b/src/main/java/net/bootsfaces/component/modal/Modal.java @@ -27,7 +27,7 @@ import net.bootsfaces.utils.BsfUtils; /** This class holds the attributes of <b:modal />. */ -@ResourceDependencies({ @ResourceDependency(library = "bsf", name = "js/modal.js", target = "body"), }) +@ResourceDependencies({ @ResourceDependency(library = "bsf", name = "js/modal.js", target = "body") }) @FacesComponent("net.bootsfaces.component.modal.Modal") public class Modal extends ModalCore { @@ -40,7 +40,7 @@ public class Modal extends ModalCore { public Modal() { AddResourcesListener.addThemedCSSResource("core.css"); AddResourcesListener.addThemedCSSResource("bsf.css"); - AddResourcesListener.addThemedCSSResource("modals.css"); + //!bs-less//AddResourcesListener.addThemedCSSResource("modals.css"); setRendererType(DEFAULT_RENDERER); } diff --git a/src/main/java/net/bootsfaces/component/navBar/NavBar.java b/src/main/java/net/bootsfaces/component/navBar/NavBar.java index 13ec8ca6a..cea8efc00 100644 --- a/src/main/java/net/bootsfaces/component/navBar/NavBar.java +++ b/src/main/java/net/bootsfaces/component/navBar/NavBar.java @@ -1,8 +1,8 @@ /** * Copyright 2014-16 by Riccardo Massera (TheCoder4.Eu) and Stephan Rauh (http://www.beyondjava.net). - * + * * This file is part of BootsFaces. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -52,7 +52,7 @@ public NavBar() { // "jq/jquery.js"); Tooltip.addResourceFiles(); AddResourcesListener.addThemedCSSResource("core.css"); - AddResourcesListener.addThemedCSSResource("navbar.css"); + //!bs-less//AddResourcesListener.addThemedCSSResource("navbar.css"); AddResourcesListener.addThemedCSSResource("bsf.css"); setRendererType(DEFAULT_RENDERER); } @@ -62,7 +62,7 @@ public NavBar() { * Dynamically add custom css to manage non-sticky footer. In this way, only * if fixed attribute is "non-sticky" the system load the correct css that * manages all style aspect of this functionlity. - * + * * This is also cross-theme. */ @Override diff --git a/src/main/java/net/bootsfaces/component/panel/Panel.java b/src/main/java/net/bootsfaces/component/panel/Panel.java index 0fd0f73cc..63c40601c 100644 --- a/src/main/java/net/bootsfaces/component/panel/Panel.java +++ b/src/main/java/net/bootsfaces/component/panel/Panel.java @@ -53,7 +53,7 @@ public Panel() { Tooltip.addResourceFiles(); AddResourcesListener.addThemedCSSResource("core.css"); AddResourcesListener.addThemedCSSResource("bsf.css"); - AddResourcesListener.addThemedCSSResource("panels.css"); + //!bs-less//AddResourcesListener.addThemedCSSResource("panels.css"); setRendererType(DEFAULT_RENDERER); } diff --git a/src/main/java/net/bootsfaces/component/progressBar/ProgressBar.java b/src/main/java/net/bootsfaces/component/progressBar/ProgressBar.java index 93237844d..a801b8dda 100644 --- a/src/main/java/net/bootsfaces/component/progressBar/ProgressBar.java +++ b/src/main/java/net/bootsfaces/component/progressBar/ProgressBar.java @@ -38,7 +38,7 @@ public class ProgressBar extends UIOutput implements net.bootsfaces.render.IHasT public static final String DEFAULT_RENDERER = "net.bootsfaces.component.progressBar.ProgressBar"; public ProgressBar() { - AddResourcesListener.addThemedCSSResource("progress-bars.css"); + //!bs-less//AddResourcesListener.addThemedCSSResource("progress-bars.css"); Tooltip.addResourceFiles(); setRendererType(DEFAULT_RENDERER); } diff --git a/src/main/java/net/bootsfaces/component/selectMultiMenu/SelectMultiMenu.java b/src/main/java/net/bootsfaces/component/selectMultiMenu/SelectMultiMenu.java index 268537f6d..1e9e35d09 100644 --- a/src/main/java/net/bootsfaces/component/selectMultiMenu/SelectMultiMenu.java +++ b/src/main/java/net/bootsfaces/component/selectMultiMenu/SelectMultiMenu.java @@ -29,7 +29,8 @@ import net.bootsfaces.utils.BsfUtils; /** This class holds the attributes of <b:selectMultiMenu />. */ -@ResourceDependencies({ @ResourceDependency(library = "bsf", name = "js/bootstrap-multiselect.js", target = "head"), +@ResourceDependencies({ + @ResourceDependency(library = "bsf", name = "js/bootstrap-multiselect.js", target = "head"), @ResourceDependency(library = "bsf", name = "js/dropdown.js", target = "body"), }) @FacesComponent("net.bootsfaces.component.selectMultiMenu.SelectMultiMenu") @@ -43,9 +44,10 @@ public class SelectMultiMenu extends SelectMultiMenuCore implements net.bootsfac public SelectMultiMenu() { Tooltip.addResourceFiles(); - AddResourcesListener.addThemedCSSResource("dropdowns.css"); - AddResourcesListener.addThemedCSSResource("bootstrap-multiselect.css"); + //!bs-less//AddResourcesListener.addThemedCSSResource("dropdowns.css"); AddResourcesListener.addThemedCSSResource("core.css"); + AddResourcesListener.addThemedCSSResource("bootstrap-multiselect.css"); + setRendererType(DEFAULT_RENDERER); } diff --git a/src/main/java/net/bootsfaces/component/selectOneMenu/SelectOneMenu.java b/src/main/java/net/bootsfaces/component/selectOneMenu/SelectOneMenu.java index fa8ddb6d7..c797d10ef 100644 --- a/src/main/java/net/bootsfaces/component/selectOneMenu/SelectOneMenu.java +++ b/src/main/java/net/bootsfaces/component/selectOneMenu/SelectOneMenu.java @@ -45,9 +45,9 @@ public class SelectOneMenu extends SelectOneMenuCore implements net.bootsfaces.r public SelectOneMenu() { Tooltip.addResourceFiles(); - AddResourcesListener.addThemedCSSResource("dropdowns.css"); - AddResourcesListener.addThemedCSSResource("bsf.css"); + //!bs-less//AddResourcesListener.addThemedCSSResource("dropdowns.css"); AddResourcesListener.addThemedCSSResource("core.css"); + AddResourcesListener.addThemedCSSResource("bsf.css"); setRendererType(DEFAULT_RENDERER); } diff --git a/src/main/java/net/bootsfaces/component/slider/Slider.java b/src/main/java/net/bootsfaces/component/slider/Slider.java index f08cc2ee5..e2ca9fdaf 100644 --- a/src/main/java/net/bootsfaces/component/slider/Slider.java +++ b/src/main/java/net/bootsfaces/component/slider/Slider.java @@ -1,8 +1,8 @@ /** * Copyright 2014-16 by Riccardo Massera (TheCoder4.Eu) and Stephan Rauh (http://www.beyondjava.net). - * + * * This file is part of BootsFaces. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -39,7 +39,7 @@ public class Slider extends HtmlInputText implements net.bootsfaces.render.IHasT public static final String DEFAULT_RENDERER = "net.bootsfaces.component.slider.Slider"; public Slider() { - AddResourcesListener.addThemedCSSResource("badges.css"); + //!bs-less//AddResourcesListener.addThemedCSSResource("badges.css"); AddResourcesListener.addThemedCSSResource("jq.ui.core.css"); AddResourcesListener.addThemedCSSResource("jq.ui.theme.css"); AddResourcesListener.addThemedCSSResource("jq.ui.slider.css"); @@ -70,7 +70,7 @@ public String getType() { /** * Method added to prevent AngularFaces from setting the type - * + * * @param type * this parameter is ignored */ diff --git a/src/main/java/net/bootsfaces/component/thumbnail/Thumbnail.java b/src/main/java/net/bootsfaces/component/thumbnail/Thumbnail.java index d552c480a..a656188c5 100644 --- a/src/main/java/net/bootsfaces/component/thumbnail/Thumbnail.java +++ b/src/main/java/net/bootsfaces/component/thumbnail/Thumbnail.java @@ -42,7 +42,7 @@ public Thumbnail() { Tooltip.addResourceFiles(); AddResourcesListener.addThemedCSSResource("core.css"); - AddResourcesListener.addThemedCSSResource("thumbnails.css"); + //!bs-less//AddResourcesListener.addThemedCSSResource("thumbnails.css"); setRendererType(DEFAULT_RENDERER); } diff --git a/src/main/java/net/bootsfaces/component/tree/Tree.java b/src/main/java/net/bootsfaces/component/tree/Tree.java index 1366cdcad..e4ad1fcc2 100644 --- a/src/main/java/net/bootsfaces/component/tree/Tree.java +++ b/src/main/java/net/bootsfaces/component/tree/Tree.java @@ -50,10 +50,11 @@ public class Tree extends TreeCore implements ClientBehaviorHolder, IResponsive */ public Tree() { setRendererType(DEFAULT_RENDERER); + + AddResourcesListener.addThemedCSSResource("core.css"); AddResourcesListener.addThemedCSSResource("bootstrap-treeview.min.css"); AddResourcesListener.addThemedCSSResource("bsf.css"); - AddResourcesListener.addThemedCSSResource("core.css"); - AddResourcesListener.addThemedCSSResource("list-group.css"); + //!bs-less//AddResourcesListener.addThemedCSSResource("list-group.css"); } @Override @@ -80,4 +81,4 @@ public Collection getEventNames() { public String getDefaultEventName() { return "click"; } -} \ No newline at end of file +} diff --git a/src/main/java/net/bootsfaces/component/well/Well.java b/src/main/java/net/bootsfaces/component/well/Well.java index 080b1388f..7b0272c78 100644 --- a/src/main/java/net/bootsfaces/component/well/Well.java +++ b/src/main/java/net/bootsfaces/component/well/Well.java @@ -39,7 +39,7 @@ public class Well extends WellCore implements net.bootsfaces.render.IHasTooltip, public Well() { Tooltip.addResourceFiles(); AddResourcesListener.addThemedCSSResource("core.css"); - AddResourcesListener.addThemedCSSResource("wells.css"); + //!bs-less//AddResourcesListener.addThemedCSSResource("wells.css"); setRendererType(DEFAULT_RENDERER); } diff --git a/src/main/java/net/bootsfaces/render/Tooltip.java b/src/main/java/net/bootsfaces/render/Tooltip.java index 9f7de1532..8f183fbba 100644 --- a/src/main/java/net/bootsfaces/render/Tooltip.java +++ b/src/main/java/net/bootsfaces/render/Tooltip.java @@ -130,7 +130,7 @@ else if (value instanceof Integer) { */ public static void addResourceFiles() { // if (null != getAttributes().get("tooltip")) { - AddResourcesListener.addThemedCSSResource("tooltip.css"); + //!bs-less//AddResourcesListener.addThemedCSSResource("tooltip.css"); AddResourcesListener.addResourceToHeadButAfterJQuery(C.BSF_LIBRARY, "js/tooltip.js"); // } }