You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2013/07/19 23:55:27 UTC
[1/4] git commit: Position the help-block for the Palette component
undernear the other Palette content
Updated Branches:
refs/heads/master 4f12ba2f5 -> 1cbec694d
Position the help-block for the Palette component undernear the other Palette content
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/85812ae7
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/85812ae7
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/85812ae7
Branch: refs/heads/master
Commit: 85812ae7cf69a3c392d7b3909f94ed5519cbce61
Parents: 4f12ba2
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Fri Jul 19 14:31:04 2013 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Fri Jul 19 14:31:04 2013 -0700
----------------------------------------------------------------------
tapestry-core/src/main/resources/META-INF/assets/core/Palette.css | 2 +-
.../resources/org/apache/tapestry5/corelib/components/Palette.tml | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/85812ae7/tapestry-core/src/main/resources/META-INF/assets/core/Palette.css
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/resources/META-INF/assets/core/Palette.css b/tapestry-core/src/main/resources/META-INF/assets/core/Palette.css
index fe8b62f..fad5e15 100644
--- a/tapestry-core/src/main/resources/META-INF/assets/core/Palette.css
+++ b/tapestry-core/src/main/resources/META-INF/assets/core/Palette.css
@@ -39,6 +39,6 @@ DIV.palette-selected {
clear: right;
}
-DIV.palette-spacer {
+DIV.palette > .help-block {
clear: left;
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/85812ae7/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/Palette.tml
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/Palette.tml b/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/Palette.tml
index cff60a1..bdf009a 100644
--- a/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/Palette.tml
+++ b/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/Palette.tml
@@ -50,6 +50,5 @@
<t:remove>Starts empty, populated on the client side.</t:remove>
</select>
</div>
- <div class="t-palette-spacer"/>
<p class="help-block" data-error-block-for="${clientId}"/>
</div>
[3/4] git commit: TAP5-1914: Alerts needs a parameter to show/hide
"Dismiss all"
Posted by hl...@apache.org.
TAP5-1914: Alerts needs a parameter to show/hide "Dismiss all"
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/bbc3412d
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/bbc3412d
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/bbc3412d
Branch: refs/heads/master
Commit: bbc3412dc3627f16a02ef109e29d6912a668a21c
Parents: da4f665
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Fri Jul 19 14:52:14 2013 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Fri Jul 19 14:52:14 2013 -0700
----------------------------------------------------------------------
.../META-INF/modules/t5/core/alert.coffee | 18 +++++++++++-------
.../tapestry5/corelib/components/Alerts.java | 12 +++++++++++-
.../org/apache/tapestry5/core.properties | 3 +++
3 files changed, 25 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/bbc3412d/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee
index 3ca552b..aed174a 100644
--- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee
+++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee
@@ -57,10 +57,14 @@ define ["./dom", "./console", "./messages", "./ajax", "underscore"],
parameters: { id }
success: -> removeAlert container, alert
- setupUI = (container) ->
+ setupUI = (outer) ->
- container.update """
- <div data-container-type="inner"></div>
+ outer.update """
+ <div data-container-type="inner"></div>
+ """
+
+ if (outer.attribute "data-show-dismiss-all") is "true"
+ outer.append """
<div class="row-fluid">
<button class="btn btn-mini pull-right" data-action="dismiss-all">
<strong>×</strong>
@@ -69,12 +73,12 @@ define ["./dom", "./console", "./messages", "./ajax", "underscore"],
</div>
"""
- container.on "click", "[data-action=dismiss-all]", ->
- dismissAll container
+ outer.on "click", "[data-action=dismiss-all]", ->
+ dismissAll outer
return false
- container.on "click", "button.close", ->
- dismissOne container, this
+ outer.on "click", "button.close", ->
+ dismissOne outer, this
return false
findInnerContainer = ->
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/bbc3412d/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java
index a39b0fb..6e8a045 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java
@@ -1,4 +1,4 @@
-// Copyright 2011, 2012 The Apache Software Foundation
+// Copyright 2011-2013 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -49,6 +49,15 @@ public class Alerts extends BaseClientElement
@Parameter(value = "message:core-dismiss-label", defaultPrefix = BindingConstants.LITERAL)
private String dismissText;
+
+ /**
+ * If set to true, then the "dismiss all" button will not be rendered on the client.
+ *
+ * @since 5.4
+ */
+ @Parameter(value = "message:core-alerts-show-dismiss-all", defaultPrefix = BindingConstants.LITERAL)
+ private boolean showDismissAll;
+
@SessionState(create = false)
private AlertStorage storage;
@@ -66,6 +75,7 @@ public class Alerts extends BaseClientElement
storeElement(writer.element("div",
"data-container-type", "alerts",
+ "data-show-dismiss-all", showDismissAll,
"data-dismiss-url", dismissLink));
resources.renderInformalParameters(writer);
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/bbc3412d/tapestry-core/src/main/resources/org/apache/tapestry5/core.properties
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/core.properties b/tapestry-core/src/main/resources/org/apache/tapestry5/core.properties
index 941adf7..e78df6c 100644
--- a/tapestry-core/src/main/resources/org/apache/tapestry5/core.properties
+++ b/tapestry-core/src/main/resources/org/apache/tapestry5/core.properties
@@ -119,3 +119,6 @@ core-components.beaneditform.class=well
# Submit component cssClass parameter default:
core-components.submit.class=btn btn-primary
+
+# Default for showDismissAll parameter of Alerts
+core-alerts-show-dismiss-all=true
\ No newline at end of file
[3/4] git commit: TAP5-1914: Alerts needs a parameter to show/hide
"Dismiss all"
Posted by hl...@apache.org.
TAP5-1914: Alerts needs a parameter to show/hide "Dismiss all"
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/bbc3412d
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/bbc3412d
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/bbc3412d
Branch: refs/heads/master
Commit: bbc3412dc3627f16a02ef109e29d6912a668a21c
Parents: da4f665
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Fri Jul 19 14:52:14 2013 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Fri Jul 19 14:52:14 2013 -0700
----------------------------------------------------------------------
.../META-INF/modules/t5/core/alert.coffee | 18 +++++++++++-------
.../tapestry5/corelib/components/Alerts.java | 12 +++++++++++-
.../org/apache/tapestry5/core.properties | 3 +++
3 files changed, 25 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/bbc3412d/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee
index 3ca552b..aed174a 100644
--- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee
+++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee
@@ -57,10 +57,14 @@ define ["./dom", "./console", "./messages", "./ajax", "underscore"],
parameters: { id }
success: -> removeAlert container, alert
- setupUI = (container) ->
+ setupUI = (outer) ->
- container.update """
- <div data-container-type="inner"></div>
+ outer.update """
+ <div data-container-type="inner"></div>
+ """
+
+ if (outer.attribute "data-show-dismiss-all") is "true"
+ outer.append """
<div class="row-fluid">
<button class="btn btn-mini pull-right" data-action="dismiss-all">
<strong>×</strong>
@@ -69,12 +73,12 @@ define ["./dom", "./console", "./messages", "./ajax", "underscore"],
</div>
"""
- container.on "click", "[data-action=dismiss-all]", ->
- dismissAll container
+ outer.on "click", "[data-action=dismiss-all]", ->
+ dismissAll outer
return false
- container.on "click", "button.close", ->
- dismissOne container, this
+ outer.on "click", "button.close", ->
+ dismissOne outer, this
return false
findInnerContainer = ->
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/bbc3412d/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java
index a39b0fb..6e8a045 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java
@@ -1,4 +1,4 @@
-// Copyright 2011, 2012 The Apache Software Foundation
+// Copyright 2011-2013 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -49,6 +49,15 @@ public class Alerts extends BaseClientElement
@Parameter(value = "message:core-dismiss-label", defaultPrefix = BindingConstants.LITERAL)
private String dismissText;
+
+ /**
+ * If set to true, then the "dismiss all" button will not be rendered on the client.
+ *
+ * @since 5.4
+ */
+ @Parameter(value = "message:core-alerts-show-dismiss-all", defaultPrefix = BindingConstants.LITERAL)
+ private boolean showDismissAll;
+
@SessionState(create = false)
private AlertStorage storage;
@@ -66,6 +75,7 @@ public class Alerts extends BaseClientElement
storeElement(writer.element("div",
"data-container-type", "alerts",
+ "data-show-dismiss-all", showDismissAll,
"data-dismiss-url", dismissLink));
resources.renderInformalParameters(writer);
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/bbc3412d/tapestry-core/src/main/resources/org/apache/tapestry5/core.properties
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/core.properties b/tapestry-core/src/main/resources/org/apache/tapestry5/core.properties
index 941adf7..e78df6c 100644
--- a/tapestry-core/src/main/resources/org/apache/tapestry5/core.properties
+++ b/tapestry-core/src/main/resources/org/apache/tapestry5/core.properties
@@ -119,3 +119,6 @@ core-components.beaneditform.class=well
# Submit component cssClass parameter default:
core-components.submit.class=btn btn-primary
+
+# Default for showDismissAll parameter of Alerts
+core-alerts-show-dismiss-all=true
\ No newline at end of file
[2/4] git commit: Put the message of the alert inside a so
that it can be located easily for testing
Posted by hl...@apache.org.
Put the message of the alert inside a <span> so that it can be located easily for testing
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/da4f6650
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/da4f6650
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/da4f6650
Branch: refs/heads/master
Commit: da4f6650fa9574321185eb2537b02bab648e2c20
Parents: 85812ae
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Fri Jul 19 14:35:25 2013 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Fri Jul 19 14:35:25 2013 -0700
----------------------------------------------------------------------
.../src/main/coffeescript/META-INF/modules/t5/core/alert.coffee | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/da4f6650/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee
index b0f4076..3ca552b 100644
--- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee
+++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee
@@ -108,13 +108,13 @@ define ["./dom", "./console", "./messages", "./ajax", "underscore"],
# Note that `data-dismiss=alert` is purposely excluded
# - we want to handle closes w/ notifications to the server if not transient
# - we don't want to rely on bootstrap.js, as that will drag jQuery into the application
-
+ # Also, the <span> tag makes it easier to pull out just the content when doing tests.
element = dom.create "div",
"data-alert-id": data.id
class: className
"""
<button class="close">×</button>
- #{content}
+ <span>#{content}</span>
"""
container.append element
[4/4] git commit: TAP5-2064: Add 'info' style to info alerts
Posted by hl...@apache.org.
TAP5-2064: Add 'info' style to info alerts
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/1cbec694
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/1cbec694
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/1cbec694
Branch: refs/heads/master
Commit: 1cbec694d94b54324cb8131e3ab0c918a51f5d41
Parents: bbc3412
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Fri Jul 19 14:54:48 2013 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Fri Jul 19 14:54:48 2013 -0700
----------------------------------------------------------------------
.../src/main/coffeescript/META-INF/modules/t5/core/alert.coffee | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/1cbec694/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee
index aed174a..0466687 100644
--- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee
+++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee
@@ -20,6 +20,7 @@ define ["./dom", "./console", "./messages", "./ajax", "underscore"],
(dom, console, messages, ajax, _) ->
severityToClass =
+ info: "alert alert-info"
success: "alert alert-success"
warn: "alert alert-warning"
error: "alert alert-error"
[4/4] git commit: TAP5-2064: Add 'info' style to info alerts
Posted by hl...@apache.org.
TAP5-2064: Add 'info' style to info alerts
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/1cbec694
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/1cbec694
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/1cbec694
Branch: refs/heads/master
Commit: 1cbec694d94b54324cb8131e3ab0c918a51f5d41
Parents: bbc3412
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Fri Jul 19 14:54:48 2013 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Fri Jul 19 14:54:48 2013 -0700
----------------------------------------------------------------------
.../src/main/coffeescript/META-INF/modules/t5/core/alert.coffee | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/1cbec694/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee
index aed174a..0466687 100644
--- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee
+++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee
@@ -20,6 +20,7 @@ define ["./dom", "./console", "./messages", "./ajax", "underscore"],
(dom, console, messages, ajax, _) ->
severityToClass =
+ info: "alert alert-info"
success: "alert alert-success"
warn: "alert alert-warning"
error: "alert alert-error"
[2/4] git commit: Put the message of the alert inside a so
that it can be located easily for testing
Posted by hl...@apache.org.
Put the message of the alert inside a <span> so that it can be located easily for testing
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/da4f6650
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/da4f6650
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/da4f6650
Branch: refs/heads/master
Commit: da4f6650fa9574321185eb2537b02bab648e2c20
Parents: 85812ae
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Fri Jul 19 14:35:25 2013 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Fri Jul 19 14:35:25 2013 -0700
----------------------------------------------------------------------
.../src/main/coffeescript/META-INF/modules/t5/core/alert.coffee | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/da4f6650/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee
index b0f4076..3ca552b 100644
--- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee
+++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee
@@ -108,13 +108,13 @@ define ["./dom", "./console", "./messages", "./ajax", "underscore"],
# Note that `data-dismiss=alert` is purposely excluded
# - we want to handle closes w/ notifications to the server if not transient
# - we don't want to rely on bootstrap.js, as that will drag jQuery into the application
-
+ # Also, the <span> tag makes it easier to pull out just the content when doing tests.
element = dom.create "div",
"data-alert-id": data.id
class: className
"""
<button class="close">×</button>
- #{content}
+ <span>#{content}</span>
"""
container.append element