You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by hn...@apache.org on 2017/11/28 09:53:14 UTC
[myfaces-tobago] branch master updated: TOBAGO-1830 Remove default
markups (disabled/readonly/required) * readonly checkboxes are now readonly
again * fix tabs * fix speyside * improve tab demo
This is an automated email from the ASF dual-hosted git repository.
hnoeth pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git
The following commit(s) were added to refs/heads/master by this push:
new ed2d782 TOBAGO-1830 Remove default markups (disabled/readonly/required) * readonly checkboxes are now readonly again * fix tabs * fix speyside * improve tab demo
ed2d782 is described below
commit ed2d782bc74ee726a4d535504bb17f11b6e16d39
Author: Henning Noeth <hn...@apache.org>
AuthorDate: Tue Nov 28 10:53:06 2017 +0100
TOBAGO-1830 Remove default markups (disabled/readonly/required)
* readonly checkboxes are now readonly again
* fix tabs
* fix speyside
* improve tab demo
---
.../main/webapp/content/20-component/070-tab/tab.xhtml | 15 ++++++++++++---
.../src/main/scss/_speyside-overwrites.scss | 16 +++-------------
.../standard/tobago-bootstrap/_version/js/tobago-tab.js | 8 +++++---
.../standard/tobago-bootstrap/_version/js/tobago.js | 4 ++--
4 files changed, 22 insertions(+), 21 deletions(-)
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/070-tab/tab.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/070-tab/tab.xhtml
index 7301b3a..af31714 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/070-tab/tab.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/070-tab/tab.xhtml
@@ -34,9 +34,12 @@
<tc:tab label="Tab One">
<p>Content of tab one.</p>
</tc:tab>
- <tc:tab label="Tab Two">
+ <tc:tab label="Tab Two" disabled="true">
<p>Content of tab two.</p>
</tc:tab>
+ <tc:tab label="Tab Three">
+ <p>Content of tab three.</p>
+ </tc:tab>
</tc:tabGroup>
</tc:section>
@@ -46,9 +49,12 @@
<tc:tab label="Tab One">
<p>Content of tab one.</p>
</tc:tab>
- <tc:tab label="Tab Two">
+ <tc:tab label="Tab Two" disabled="true">
<p>Content of tab two.</p>
</tc:tab>
+ <tc:tab label="Tab Three">
+ <p>Content of tab three.</p>
+ </tc:tab>
</tc:tabGroup>
</tc:section>
@@ -58,7 +64,7 @@
<tc:tab label="Tab One">
<p>Content of tab one.</p>
</tc:tab>
- <tc:tab label="Tab Two">
+ <tc:tab label="Tab Two" disabled="true">
<f:facet name="bar">
<tc:link image="fa-remove">
<tc:dataAttribute name="alert-text" value="Not implemented yet!"/>
@@ -66,6 +72,9 @@
</f:facet>
<p>Content of tab two.</p>
</tc:tab>
+ <tc:tab label="Tab Three">
+ <p>Content of tab three.</p>
+ </tc:tab>
</tc:tabGroup>
</tc:section>
</ui:composition>
diff --git a/tobago-theme/tobago-theme-speyside/src/main/scss/_speyside-overwrites.scss b/tobago-theme/tobago-theme-speyside/src/main/scss/_speyside-overwrites.scss
index ce62d89..bcfa154 100644
--- a/tobago-theme/tobago-theme-speyside/src/main/scss/_speyside-overwrites.scss
+++ b/tobago-theme/tobago-theme-speyside/src/main/scss/_speyside-overwrites.scss
@@ -500,17 +500,10 @@ p, .control-label {
background-color: white;
}
}
- .nav-item.tobago-tab-markup-disabled {
+ .nav-item .nav-link.disabled {
background-color: $gray-100;
-
- > a, > button.tobago-link {
- color: $gray-300;
-
- &:hover {
- color: $gray-300;
- cursor: default;
- }
- }
+ color: $gray-300;
+ cursor: default;
}
}
@@ -781,9 +774,6 @@ li:last-child {
// checkboxes and radio buttons
.tobago-selectBooleanCheckbox, .tobago-selectManyCheckbox, .tobago-selectOneRadio {
- &-markup-readonly .form-check-label {
- cursor: default;
- }
.form-check-label {
padding-left: 0;
diff --git a/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/tobago-bootstrap/_version/js/tobago-tab.js b/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/tobago-bootstrap/_version/js/tobago-tab.js
index 9bf1d4c..d647ab5 100644
--- a/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/tobago-bootstrap/_version/js/tobago-tab.js
+++ b/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/tobago-bootstrap/_version/js/tobago-tab.js
@@ -27,7 +27,9 @@ Tobago.TabGroup.init = function(elements) {
// setting the active index
tabGroups.each(function () {
- jQuery(this).find(".tobago-tabGroup-header").first().children(".tobago-tab").not(".tobago-tab-markup-disabled")
+ jQuery(this).find(".tobago-tabGroup-header").first()
+ .children(".tobago-tab").find(".nav-link:not(.disabled)")
+ .parent()
.click(function () {
// Update the hidden field for the active index.
var tab = jQuery(this);
@@ -43,7 +45,7 @@ Tobago.TabGroup.init = function(elements) {
var tabGroup = jQuery(this).parents(".tobago-tabGroup:first");
var selected = tabGroup.find(".tobago-tab-markup-selected");
// the nearest of the previous siblings, which are not disabled
- selected.prevAll(":not(.tobago-tab-markup-disabled):first").click();
+ selected.prevAll(".nav-link:not(.disabled):first").click();
});
// initialize next button
@@ -51,7 +53,7 @@ Tobago.TabGroup.init = function(elements) {
var tabGroup = jQuery(this).parents(".tobago-tabGroup:first");
var selected = tabGroup.find(".tobago-tab-markup-selected");
// the nearest of the next siblings, which are not disabled
- selected.nextAll(":not(.tobago-tab-markup-disabled):first").click();
+ selected.nextAll(".nav-link:not(.disabled):first").click();
});
// init scroll position
diff --git a/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/tobago-bootstrap/_version/js/tobago.js b/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/tobago-bootstrap/_version/js/tobago.js
index 09a466c..8caad1b 100644
--- a/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/tobago-bootstrap/_version/js/tobago.js
+++ b/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/tobago-bootstrap/_version/js/tobago.js
@@ -1222,7 +1222,7 @@ Tobago.registerListener(Tobago.SelectOneListbox.init, Tobago.Phase.AFTER_UPDATE)
Tobago.SelectBooleanCheckbox = {};
Tobago.SelectBooleanCheckbox.init = function(elements) {
- var checkboxes = Tobago.Utils.selectWithJQuery(elements, ".tobago-selectBooleanCheckbox-markup-readonly input");
+ var checkboxes = Tobago.Utils.selectWithJQuery(elements, ".tobago-selectBooleanCheckbox input[readonly]");
checkboxes.each(function() {
// Save the initial state to restore it, when the user tries to manipulate it.
var initial = jQuery(this).is(":checked");
@@ -1240,7 +1240,7 @@ Tobago.registerListener(Tobago.SelectBooleanCheckbox.init, Tobago.Phase.AFTER_UP
Tobago.SelectManyCheckbox = {};
Tobago.SelectManyCheckbox.init = function(elements) {
- var checkboxes = Tobago.Utils.selectWithJQuery(elements, ".tobago-selectManyCheckbox-markup-readonly input");
+ var checkboxes = Tobago.Utils.selectWithJQuery(elements, ".tobago-selectManyCheckbox input[readonly]");
checkboxes.each(function() {
// Save the initial state to restore it, when the user tries to manipulate it.
var initial = jQuery(this).is(":checked");
--
To stop receiving notification emails like this one, please contact
['"commits@myfaces.apache.org" <co...@myfaces.apache.org>'].