continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r365946 - in /maven/continuum/trunk/continuum-webapp/src/main/resources: ./ template/ template/default/
Date Wed, 04 Jan 2006 17:10:37 GMT
Author: evenisse
Date: Wed Jan  4 09:10:24 2006
New Revision: 365946

URL: http://svn.apache.org/viewcvs?rev=365946&view=rev
Log:
Add templating (need to configure with continuum style)

Added:
    maven/continuum/trunk/continuum-webapp/src/main/resources/template/
    maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/
    maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/checkbox.vm
  (with props)
    maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/checkboxlist.vm
  (with props)
    maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/combobox.vm
  (with props)
    maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/controlfooter.vm
  (with props)
    maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/controlheader.vm
  (with props)
    maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/doubleselect.vm
  (with props)
    maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/empty.vm  
(with props)
    maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/file.vm   (with
props)
    maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/form-close.vm
  (with props)
    maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/form.vm   (with
props)
    maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/hidden.vm 
 (with props)
    maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/label.vm  
(with props)
    maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/password.vm
  (with props)
    maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/radiomap.vm
  (with props)
    maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/select.vm 
 (with props)
    maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/styles.css
  (with props)
    maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/submit.vm 
 (with props)
    maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/tabbedpane.vm
  (with props)
    maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/table.vm  
(with props)
    maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/text.vm   (with
props)
    maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/textarea.vm
  (with props)
    maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/token.vm  
(with props)
    maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/validation.vm
  (with props)
Modified:
    maven/continuum/trunk/continuum-webapp/src/main/resources/webwork.properties

Added: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/checkbox.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/checkbox.vm?rev=365946&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/checkbox.vm
(added)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/checkbox.vm
Wed Jan  4 09:10:24 2006
@@ -0,0 +1,19 @@
+#if( $fieldErrors.get($parameters.name) )
+  #set ($hasFieldErrors = $fieldErrors.get($parameters.name))
+  #foreach ($error in $fieldErrors.get($parameters.name))
+    <tr>
+        <td align="left" valign="top" colspan="2"><span class="errorMessage">$!error</span></td>
+    </tr>
+  #end
+#end
+
+<tr>
+    <td valign="top" colspan="2">
+#* Use an extra table so that the checkbox doesn't align with the other columns. *#
+<table width="100%" border="0" cellpadding="0" cellspacing="0">
+    <tr>
+        <td valign="middle">#parse("/template/simple/checkbox.vm")</td>
+        <td width="100%" valign="middle"><label #if ($parameters.id) for="$!webwork.htmlEncode($parameters.id)"#end#if
($hasFieldErrors) class="checkboxErrorLabel"#else class="checkboxLabel"#end>$!webwork.htmlEncode($parameters.label)</label></td>
+    </tr>
+</table>
+#parse("/template/default/controlfooter.vm")

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/checkbox.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/checkbox.vm
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/checkboxlist.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/checkboxlist.vm?rev=365946&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/checkboxlist.vm
(added)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/checkboxlist.vm
Wed Jan  4 09:10:24 2006
@@ -0,0 +1,28 @@
+#parse( "/template/default/controlheader.vm" )
+#set( $items = $parameters.list )
+#if( $items )
+    #set( $itemCount = 0 )
+    #foreach( $item in $items )
+        #set( $itemCount = $itemCount + 1)
+        $stack.push($item)
+        #if( $parameters.listKey )
+            #set( $itemKey = $stack.findValue($parameters.listKey) )
+        #else
+            #set( $itemKey = $item )
+        #end
+        #if( $parameters.listValue )
+            #set( $itemValue  = $stack.findValue($parameters.listValue) )
+        #else
+            #set( $itemValue = $item )
+        #end
+        <div>
+         <input type="checkbox" name="$!webwork.htmlEncode($parameters.name)" value="$!webwork.htmlEncode($itemKey)"
+         id="$!webwork.htmlEncode($parameters.name)-$itemCount" #if( $tag.contains($parameters.nameValue,
$itemKey) ) checked="checked" #end/>
+         <label for="$!webwork.htmlEncode($parameters.name)-$itemCount" class="checkboxLabel">$!webwork.htmlEncode($itemValue)</label>
+        </div>
+        #set ($trash = $stack.pop())
+    #end
+#else
+  &nbsp;
+#end
+#parse( "/template/default/controlfooter.vm" )
\ No newline at end of file

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/checkboxlist.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/checkboxlist.vm
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/combobox.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/combobox.vm?rev=365946&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/combobox.vm
(added)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/combobox.vm
Wed Jan  4 09:10:24 2006
@@ -0,0 +1 @@
+#parse("/template/default/controlheader.vm")#parse("/template/simple/combobox.vm")#parse("/template/default/controlfooter.vm")
\ No newline at end of file

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/combobox.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/combobox.vm
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/controlfooter.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/controlfooter.vm?rev=365946&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/controlfooter.vm
(added)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/controlfooter.vm
Wed Jan  4 09:10:24 2006
@@ -0,0 +1,2 @@
+$!{parameters.desc} $!{parameters.after}</td>
+</tr>

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/controlfooter.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/controlfooter.vm
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/controlheader.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/controlheader.vm?rev=365946&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/controlheader.vm
(added)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/controlheader.vm
Wed Jan  4 09:10:24 2006
@@ -0,0 +1,27 @@
+## Only show message if errors are available.
+## This will be done if ActionSupport is used.
+#if( $fieldErrors.get($parameters.name) )
+  #set ($hasFieldErrors = $fieldErrors.get($parameters.name))
+  #foreach ($error in $fieldErrors.get($parameters.name))
+    <tr errorFor="$parameters.id">
+        #if ($parameters.labelposition == 'top')<td align="left" valign="top" colspan="2">#else<td
align="center" valign="top" colspan="2">#end<span class="errorMessage">$!webwork.htmlEncode($error)</span></td>
+    </tr>
+  #end
+#end
+## if the label position is top,
+## then give the label it's own row in the table
+<tr>
+#if ($parameters.labelposition && $parameters.labelposition == 'top')<td align="left"
valign="top" colspan="2">#else<td align="right" valign="top">#end#if ($parameters.label)<label
#if ($parameters.id) for="$!webwork.htmlEncode($parameters.id)"#end#if ($hasFieldErrors) class="errorLabel"#else
class="label"#end>#if ($parameters.required)<span class="required">*</span>#end$!webwork.htmlEncode($parameters.label):</label>#end</td>
+## add the extra row
+#if ($parameters.labelposition && $parameters.labelposition == 'top')
+</tr>
+<tr>
+#end
+#if ($parameters.form.validate && $parameters.form.validate == true)
+    #if ($parameters.onblur)
+        #set ($parameters.onblur = "validate(this);${parameters.onblur}")
+    #else
+        #set ($parameters.onblur = "validate(this)")
+    #end
+#end
+    <td>
\ No newline at end of file

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/controlheader.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/controlheader.vm
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/doubleselect.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/doubleselect.vm?rev=365946&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/doubleselect.vm
(added)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/doubleselect.vm
Wed Jan  4 09:10:24 2006
@@ -0,0 +1 @@
+#parse("/template/default/controlheader.vm")#parse("/template/simple/doubleselect.vm")#parse("/template/default/controlfooter.vm")
\ No newline at end of file

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/doubleselect.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/doubleselect.vm
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/empty.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/empty.vm?rev=365946&view=auto
==============================================================================
    (empty)

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/empty.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/empty.vm
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/file.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/file.vm?rev=365946&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/file.vm (added)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/file.vm Wed
Jan  4 09:10:24 2006
@@ -0,0 +1 @@
+#parse("/template/default/controlheader.vm")#parse("/template/simple/file.vm")#parse("/template/default/controlfooter.vm")

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/file.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/file.vm
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/form-close.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/form-close.vm?rev=365946&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/form-close.vm
(added)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/form-close.vm
Wed Jan  4 09:10:24 2006
@@ -0,0 +1,2 @@
+</table>
+#parse("/template/simple/form-close.vm")
\ No newline at end of file

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/form-close.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/form-close.vm
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/form.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/form.vm?rev=365946&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/form.vm (added)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/form.vm Wed
Jan  4 09:10:24 2006
@@ -0,0 +1,2 @@
+#parse("/template/simple/form.vm")
+<table class="wwFormTable">

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/form.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/form.vm
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/hidden.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/hidden.vm?rev=365946&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/hidden.vm (added)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/hidden.vm Wed
Jan  4 09:10:24 2006
@@ -0,0 +1 @@
+#parse("/template/simple/hidden.vm")

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/hidden.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/hidden.vm
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/label.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/label.vm?rev=365946&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/label.vm (added)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/label.vm Wed
Jan  4 09:10:24 2006
@@ -0,0 +1 @@
+#parse("/template/default/controlheader.vm")#parse("/template/simple/label.vm")#parse("/template/default/controlfooter.vm")
\ No newline at end of file

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/label.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/label.vm
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/password.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/password.vm?rev=365946&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/password.vm
(added)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/password.vm
Wed Jan  4 09:10:24 2006
@@ -0,0 +1 @@
+#parse("/template/default/controlheader.vm")#parse("/template/simple/password.vm")#parse("/template/default/controlfooter.vm")
\ No newline at end of file

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/password.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/password.vm
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/radiomap.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/radiomap.vm?rev=365946&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/radiomap.vm
(added)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/radiomap.vm
Wed Jan  4 09:10:24 2006
@@ -0,0 +1 @@
+#parse("/template/default/controlheader.vm")#parse("/template/simple/radiomap.vm")#parse("/template/default/controlfooter.vm")

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/radiomap.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/radiomap.vm
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/select.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/select.vm?rev=365946&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/select.vm (added)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/select.vm Wed
Jan  4 09:10:24 2006
@@ -0,0 +1 @@
+#parse("/template/default/controlheader.vm")#parse("/template/simple/select.vm")#parse("/template/default/controlfooter.vm")

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/select.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/select.vm
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/styles.css
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/styles.css?rev=365946&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/styles.css
(added)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/styles.css
Wed Jan  4 09:10:24 2006
@@ -0,0 +1,7 @@
+.wwFormTable {}
+.label {font-style:italic; }
+.errorLabel {font-style:italic; color:red; }
+.errorMessage {font-weight:bold; text-align: center; color:red; }
+.checkboxLabel {}
+.checkboxErrorLabel {color:red; }
+.required {color:red;}

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/styles.css
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/styles.css
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/submit.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/submit.vm?rev=365946&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/submit.vm (added)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/submit.vm Wed
Jan  4 09:10:24 2006
@@ -0,0 +1,3 @@
+<tr>
+    <td colspan="2"><div #if ($parameters.align) align="$!webwork.htmlEncode($parameters.align)"
#end
+>#parse("/template/simple/submit.vm")</div>#parse( "/template/default/controlfooter.vm"
)

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/submit.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/submit.vm
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/tabbedpane.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/tabbedpane.vm?rev=365946&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/tabbedpane.vm
(added)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/tabbedpane.vm
Wed Jan  4 09:10:24 2006
@@ -0,0 +1 @@
+#parse("/template/simple/tabbedpane.vm")

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/tabbedpane.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/tabbedpane.vm
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/table.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/table.vm?rev=365946&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/table.vm (added)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/table.vm Wed
Jan  4 09:10:24 2006
@@ -0,0 +1 @@
+#parse("/template/simple/table.vm")

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/table.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/table.vm
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/text.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/text.vm?rev=365946&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/text.vm (added)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/text.vm Wed
Jan  4 09:10:24 2006
@@ -0,0 +1 @@
+#parse("/template/default/controlheader.vm")#parse("/template/simple/text.vm")#parse("/template/default/controlfooter.vm")

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/text.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/text.vm
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/textarea.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/textarea.vm?rev=365946&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/textarea.vm
(added)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/textarea.vm
Wed Jan  4 09:10:24 2006
@@ -0,0 +1,2 @@
+#parse("/template/default/controlheader.vm")#parse("/template/simple/textarea.vm")#parse("/template/default/controlfooter.vm")
+

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/textarea.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/textarea.vm
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/token.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/token.vm?rev=365946&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/token.vm (added)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/token.vm Wed
Jan  4 09:10:24 2006
@@ -0,0 +1 @@
+#parse("/template/simple/token.vm")

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/token.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/token.vm
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/validation.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/validation.vm?rev=365946&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/validation.vm
(added)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/validation.vm
Wed Jan  4 09:10:24 2006
@@ -0,0 +1,121 @@
+<script>
+var xmlhttp=false;
+
+/*@cc_on @*/
+/*@if (@_jscript_version >= 5)
+// JScript gives us Conditional compilation, we can cope with old IE versions.
+// and security blocked creation of the objects.
+ try {
+  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");  } catch (e) {
+  try {
+   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
+  } catch (E) {
+   xmlhttp = false;
+  }
+ }
+@end @*/
+
+if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
+  xmlhttp = new XMLHttpRequest();
+}
+
+function validate(e) {
+    // mark the element as touch
+    e.touched = true;
+    xmlhttp.open("POST", "/validation", true);
+    xmlhttp.onreadystatechange = function() {
+        if (xmlhttp.readyState == 4) {
+            var xml = xmlhttp.responseXML;
+            clearErrorRows(e.parentNode.parentNode.parentNode);
+            clearErrorLabels(e.form);
+            var errors = xml.childNodes[0].getElementsByTagName("e");
+            for (var i = 0; i < errors.length; i++) {
+                var error = errors[i];
+                var errorName = error.getAttribute("n");
+                var errorText = error.childNodes[0].textContent;
+                // there was an error, report it
+                var element = e.form.elements[errorName];
+                if (element != null && element.touched && element.touched
== true) {
+                    addError(element, errorText);
+                }
+            }
+        }
+    }
+
+    var req = getValidateXml(e.form);
+    xmlhttp.send(req);
+}
+
+function clearErrorRows(table) {
+    // clear out any rows with an "errorFor" attribute
+    var rows = table.rows;
+    var rowsToDelete = new Array();
+    for(var i = 0; i < rows.length; i++) {
+        var r = rows[i];
+        if (r.getAttribute("errorFor")) {
+            rowsToDelete.push(r);
+        }
+    }
+
+    // now delete the rows
+    for (var i = 0; i < rowsToDelete.length; i++) {
+        var r = rowsToDelete[i];
+        table.deleteRow(r.rowIndex);
+    }
+}
+
+function clearErrorLabels(form) {
+    // set all labels back to the normal class
+    var elements = form.elements;
+    for (var i = 0; i < elements.length; i++) {
+        var e = elements[i];
+        var cells = e.parentNode.parentNode.cells;
+        if (cells && cells.length >= 2) {
+            var label = cells[0].getElementsByTagName("label")[0];
+            if (label) {
+                label.setAttribute("class", "label");
+            }
+        }
+    }
+
+}
+
+function getValidateXml(f) {
+    var actionName = f.name;
+    var namespace = f.getAttribute("namespace");
+    var xml = '<r a="' + actionName + '" ns="' + namespace +'">\n';
+    for (var i = 0; i < f.elements.length; i++) {
+        var e = f.elements[i];
+        xml = xml + '<p n="' + e.name + '">' + e.value + '</p>\n';
+    }
+    xml = xml + '</r>\n';
+    return xml;
+}
+
+function addError(e, errorText) {
+    try {
+        // clear out any rows with an "errorFor" of e.id
+        var row = e.parentNode.parentNode;
+        var table = row.parentNode;
+        var error = document.createTextNode(errorText);
+        var tr = document.createElement("tr");
+        var td = document.createElement("td");
+        var span = document.createElement("span");
+        td.align = "center";
+        td.valign = "top";
+        td.colSpan = 2;
+        span.setAttribute("class", "errorMessage");
+        span.appendChild(error);
+        td.appendChild(span);
+        tr.appendChild(td);
+        tr.setAttribute("errorFor", e.id);;
+        table.insertBefore(tr, row);
+
+        // updat the label too
+        var label = row.cells[0].getElementsByTagName("label")[0];
+        label.setAttribute("class", "errorLabel");
+    } catch (e) {
+        alert(e);
+    }
+}
+</script>
\ No newline at end of file

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/validation.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/validation.vm
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/webwork.properties
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/resources/webwork.properties?rev=365946&r1=365945&r2=365946&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/webwork.properties (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/webwork.properties Wed Jan 
4 09:10:24 2006
@@ -1,6 +1,16 @@
 webwork.tag.altSyntax = true
 
 ##################################
+# Theme
+##################################
+webwork.ui.theme = default
+
+##################################
+# Locale
+##################################
+#webwork.locale=en_EN
+
+##################################
 # Upload
 ##################################
 webwork.multipart.parser = jakarta



Mime
View raw message