summaryrefslogtreecommitdiffstats
path: root/src/com/gitblit/wicket/panels/BasePanel.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2011-09-12 15:37:55 -0400
committerJames Moger <james.moger@gitblit.com>2011-09-12 15:37:55 -0400
commit831469ba89ea8bca3bfbd1d662dbdd2c9f233798 (patch)
treeb36d770bcaf0c6a2ab8caf865f04ff60734ed71f /src/com/gitblit/wicket/panels/BasePanel.java
parentcbf59502795be12dc0015e05523076a9561df807 (diff)
downloadgitblit-831469ba89ea8bca3bfbd1d662dbdd2c9f233798.tar.gz
gitblit-831469ba89ea8bca3bfbd1d662dbdd2c9f233798.zip
Largely completed, uber-cool federation feature.
Diffstat (limited to 'src/com/gitblit/wicket/panels/BasePanel.java')
-rw-r--r--src/com/gitblit/wicket/panels/BasePanel.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/com/gitblit/wicket/panels/BasePanel.java b/src/com/gitblit/wicket/panels/BasePanel.java
index 02789fb4..9dda03c2 100644
--- a/src/com/gitblit/wicket/panels/BasePanel.java
+++ b/src/com/gitblit/wicket/panels/BasePanel.java
@@ -67,4 +67,23 @@ public abstract class BasePanel extends Panel {
return result;
}
}
+
+ public static class JavascriptTextPrompt extends AttributeModifier {
+
+ private static final long serialVersionUID = 1L;
+
+ public JavascriptTextPrompt(String event, String msg) {
+ super(event, true, new Model<String>(msg));
+ }
+
+ protected String newValue(final String currentValue, final String message) {
+ String result = "var userText = prompt('" + message + "','"
+ + (currentValue == null ? "" : currentValue) + "'); " + "return userText; ";
+ // String result = prefix;
+ // if (currentValue != null) {
+ // result = prefix + currentValue;
+ // }
+ return result;
+ }
+ }
}