Title: [waffle-scm] [452] trunk: WAFFLE-46: Created Waffle Resources module.
Revision
452
Author
mauro
Date
2007-12-08 09:57:46 -0600 (Sat, 08 Dec 2007)

Log Message

WAFFLE-46:  Created Waffle Resources module.  Added js/waffle/*.js to replace myscript.js. 

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/examples/freemarker-example/resources/people/editperson.htm (451 => 452)

--- trunk/examples/freemarker-example/resources/people/editperson.htm	2007-12-07 17:13:26 UTC (rev 451)
+++ trunk/examples/freemarker-example/resources/people/editperson.htm	2007-12-08 15:57:46 UTC (rev 452)
@@ -40,8 +40,8 @@
     </div>-->
 
     <br/>
-    <a href="" |
-    <a href=""
+    <a href="" |
+    <a href=""
 
     <#include "../fielderrors.htm" parse="true">
 

Modified: trunk/examples/freemarker-example/resources/people/person.htm (451 => 452)

--- trunk/examples/freemarker-example/resources/people/person.htm	2007-12-07 17:13:26 UTC (rev 451)
+++ trunk/examples/freemarker-example/resources/people/person.htm	2007-12-08 15:57:46 UTC (rev 452)
@@ -9,7 +9,7 @@
     <script src="" type="text/_javascript_">
         // keep this space
     </script>
-    <script src="" type="text/_javascript_">
+    <script src="" type="text/_javascript_">
         // keep this space
     </script>
 </head>
@@ -40,7 +40,7 @@
         </#list>
     </table>
 
-    <a href=""
+    <a href=""
 
     <!-- Example of partial page -->
     <div id="editArea">

Deleted: trunk/examples/freemarker-example/resources/scripts/myscript.js (451 => 452)

--- trunk/examples/freemarker-example/resources/scripts/myscript.js	2007-12-07 17:13:26 UTC (rev 451)
+++ trunk/examples/freemarker-example/resources/scripts/myscript.js	2007-12-08 15:57:46 UTC (rev 452)
@@ -1,14 +0,0 @@
-function fireMethod(methodName) {
-    createElementSubmitForm(document.forms[0], methodName);
-}
-
-function createElementSubmitForm(form, methodName) {
-    var method = document.createElement("input");
-    method.setAttribute("type", "hidden");
-    method.setAttribute("name", "method");
-    method.value = methodName;
-
-    form.appendChild(method);
-    form.submit();
-    return true;
-}

Modified: trunk/examples/jruby-example/resources/edit_person.rhtml (451 => 452)

--- trunk/examples/jruby-example/resources/edit_person.rhtml	2007-12-07 17:13:26 UTC (rev 451)
+++ trunk/examples/jruby-example/resources/edit_person.rhtml	2007-12-08 15:57:46 UTC (rev 452)
@@ -24,7 +24,7 @@
   </div>
 
   <br/>
-  <a href="" |
-  <a href=""
+  <a href="" |
+  <a href=""
 
 </div>
\ No newline at end of file

Modified: trunk/examples/jruby-example/resources/person.rhtml (451 => 452)

--- trunk/examples/jruby-example/resources/person.rhtml	2007-12-07 17:13:26 UTC (rev 451)
+++ trunk/examples/jruby-example/resources/person.rhtml	2007-12-08 15:57:46 UTC (rev 452)
@@ -9,7 +9,7 @@
     @import "stylesheets/style.css";
   </style>
   <script src="" type="text/_javascript_"></script>
-  <script src="" type="text/_javascript_"></script>
+  <script src="" type="text/_javascript_"></script>
 </head>
 
 <body>

Deleted: trunk/examples/jruby-example/resources/scripts/myscript.js (451 => 452)

--- trunk/examples/jruby-example/resources/scripts/myscript.js	2007-12-07 17:13:26 UTC (rev 451)
+++ trunk/examples/jruby-example/resources/scripts/myscript.js	2007-12-08 15:57:46 UTC (rev 452)
@@ -1,26 +0,0 @@
-function fireMethod(methodName) {
-    createElementSubmitForm(document.forms[0], methodName);
-}
-
-function createElementSubmitForm(form, methodName) {
-    var method = document.createElement("input");
-    method.setAttribute("type", "hidden");
-    method.setAttribute("name", "method");
-    method.value = methodName;
-
-    form.appendChild(method);
-    form.submit();
-    return true;
-}
-
-function makeDraggable(className) {
-    var items = document.getElementsByClassName(className);
-    for (var i = 0; i < items.length; i++) {
-        new Draggable(items[i].id, {ghosting:true, revert:true})
-    }
-}
-
-function handleDrop(element, dropon, event) {
-    var pars = 'method=' + element.id;
-    new Ajax.Updater({success: 'selection'}, "ajaxexample.waffle", {method: 'get', parameters: pars, evalScripts:true});
-}
\ No newline at end of file

Modified: trunk/examples/migration-example/resources/calendar.jspx (451 => 452)

--- trunk/examples/migration-example/resources/calendar.jspx	2007-12-07 17:13:26 UTC (rev 451)
+++ trunk/examples/migration-example/resources/calendar.jspx	2007-12-08 15:57:46 UTC (rev 452)
@@ -9,7 +9,7 @@
 
 
 <head>
-    <script src="" type="text/_javascript_">
+    <script src="" type="text/_javascript_">
         // keep this space
     </script>
 </head>
@@ -39,7 +39,7 @@
             </select></th>
         </tr>
     </table>
-    <a href=""
+    <a href=""
         Months</a></form>
 
 <table>

Modified: trunk/examples/mydvds-example/pom.xml (451 => 452)

--- trunk/examples/mydvds-example/pom.xml	2007-12-07 17:13:26 UTC (rev 451)
+++ trunk/examples/mydvds-example/pom.xml	2007-12-08 15:57:46 UTC (rev 452)
@@ -17,11 +17,6 @@
       <scope>runtime</scope>
     </dependency>
     <dependency>
-      <groupId>commons-logging</groupId>
-      <artifactId>commons-logging</artifactId>
-      <scope>runtime</scope>
-    </dependency>
-    <dependency>
       <groupId>org.hibernate</groupId>
       <artifactId>hibernate</artifactId>
       <version>3.2.4.ga</version>

Modified: trunk/examples/paranamer-example/resources/ajaxexample.jspx (451 => 452)

--- trunk/examples/paranamer-example/resources/ajaxexample.jspx	2007-12-07 17:13:26 UTC (rev 451)
+++ trunk/examples/paranamer-example/resources/ajaxexample.jspx	2007-12-08 15:57:46 UTC (rev 452)
@@ -18,9 +18,12 @@
     <script src="" type="text/_javascript_">
         //
     </script>
-    <script src="" type="text/_javascript_">
+    <script src="" type="text/_javascript_">
         //
     </script>
+    <script src="" type="text/_javascript_">
+        //
+    </script>
 
     <style type="text/css" title="currentStyle" media="screen">
         @import "stylesheets/style.css";

Modified: trunk/examples/paranamer-example/resources/calculator.jspx (451 => 452)

--- trunk/examples/paranamer-example/resources/calculator.jspx	2007-12-07 17:13:26 UTC (rev 451)
+++ trunk/examples/paranamer-example/resources/calculator.jspx	2007-12-08 15:57:46 UTC (rev 452)
@@ -13,7 +13,7 @@
     <style type="text/css" title="currentStyle" media="screen">
         @import "stylesheets/style.css";
     </style>
-    <script src="" type="text/_javascript_">
+    <script src="" type="text/_javascript_">
         // keep this space
     </script>
 </head>
@@ -40,9 +40,9 @@
         <br style="clear:both"/>
     </div>
 
-    <a href="" |
-    <a href="" |
-    <a href=""
+    <a href="" |
+    <a href="" |
+    <a href=""
 
 </form>
 </body>

Modified: trunk/examples/paranamer-example/resources/people/editperson.jspx (451 => 452)

--- trunk/examples/paranamer-example/resources/people/editperson.jspx	2007-12-07 17:13:26 UTC (rev 451)
+++ trunk/examples/paranamer-example/resources/people/editperson.jspx	2007-12-08 15:57:46 UTC (rev 452)
@@ -43,8 +43,8 @@
     </div>
 
     <br/>
-    <a href="" |
-    <a href=""
+    <a href="" |
+    <a href=""
 
     <jsp:directive.include file="../fielderrors.jspx"/>
 

Modified: trunk/examples/paranamer-example/resources/people/person.jspx (451 => 452)

--- trunk/examples/paranamer-example/resources/people/person.jspx	2007-12-07 17:13:26 UTC (rev 451)
+++ trunk/examples/paranamer-example/resources/people/person.jspx	2007-12-08 15:57:46 UTC (rev 452)
@@ -17,7 +17,7 @@
     <script src="" type="text/_javascript_">
         // keep this space
     </script>
-    <script src="" type="text/_javascript_">
+    <script src="" type="text/_javascript_">
         // keep this space
     </script>
 </head>
@@ -48,7 +48,7 @@
         </c:forEach>
     </table>
 
-    <a href=""
+    <a href=""
 
     <!-- Example of partial page -->
     <div id="editArea">

Deleted: trunk/examples/paranamer-example/resources/scripts/myscript.js (451 => 452)

--- trunk/examples/paranamer-example/resources/scripts/myscript.js	2007-12-07 17:13:26 UTC (rev 451)
+++ trunk/examples/paranamer-example/resources/scripts/myscript.js	2007-12-08 15:57:46 UTC (rev 452)
@@ -1,26 +0,0 @@
-function fireMethod(methodName) {
-    createElementSubmitForm(document.forms[0], methodName);
-}
-
-function createElementSubmitForm(form, methodName) {
-    var method = document.createElement("input");
-    method.setAttribute("type", "hidden");
-    method.setAttribute("name", "method");
-    method.value = methodName;
-
-    form.appendChild(method);
-    form.submit();
-    return true;
-}
-
-function makeDraggable(className) {
-    var items = document.getElementsByClassName(className);
-    for (var i = 0; i < items.length; i++) {
-        new Draggable(items[i].id, {ghosting:true, revert:true})
-    }
-}
-
-function handleDrop(element, dropon, event) {
-    var pars = 'method=' + element.id;
-    new Ajax.Updater({success: 'selection'}, "ajaxexample.waffle", {method: 'get', parameters: pars, evalScripts:true});
-}
\ No newline at end of file

Modified: trunk/examples/pom.xml (451 => 452)

--- trunk/examples/pom.xml	2007-12-07 17:13:26 UTC (rev 451)
+++ trunk/examples/pom.xml	2007-12-08 15:57:46 UTC (rev 452)
@@ -50,6 +50,16 @@
       <artifactId>standard</artifactId>
       <scope>runtime</scope>
     </dependency>    
+    <dependency>
+      <groupId>commons-logging</groupId>
+      <artifactId>commons-logging</artifactId>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>log4j</groupId>
+      <artifactId>log4j</artifactId>
+      <version>1.2.14</version>      
+    </dependency>
   </dependencies>
 
   <build>
@@ -59,6 +69,33 @@
          <artifactId>maven-war-plugin</artifactId>
        </plugin>
        <plugin>
+         <groupId>org.apache.maven.plugins</groupId>
+         <artifactId>maven-dependency-plugin</artifactId>
+         <executions>
+           <execution>
+             <id>unpack-resources</id>
+             <phase>process-resources</phase>
+             <goals>
+               <goal>unpack</goal>
+             </goals>
+             <configuration>
+               <outputDirectory>
+                 ${project.build.directory}/${pom.artifactId}-${pom.version}
+               </outputDirectory>
+               <overWriteReleases>false</overWriteReleases>
+               <overWriteSnapshots>true</overWriteSnapshots>
+               <artifactItems>
+                 <artifactItem>
+                   <groupId>${pom.groupId}</groupId>
+                   <artifactId>waffle-resources</artifactId>
+                   <version>${pom.version}</version>
+                 </artifactItem>
+               </artifactItems>
+             </configuration>
+           </execution>
+         </executions>
+       </plugin>
+       <plugin>
         <groupId>org.codehaus.mojo.groovy</groupId>
         <artifactId>groovy-maven-plugin</artifactId>
         <executions>

Modified: trunk/examples/simple-example/pom.xml (451 => 452)

--- trunk/examples/simple-example/pom.xml	2007-12-07 17:13:26 UTC (rev 451)
+++ trunk/examples/simple-example/pom.xml	2007-12-08 15:57:46 UTC (rev 452)
@@ -27,16 +27,6 @@
       <artifactId>commons-io</artifactId>
       <scope>runtime</scope>
     </dependency>
-    <dependency>
-      <groupId>commons-logging</groupId>
-      <artifactId>commons-logging</artifactId>
-      <scope>runtime</scope>
-    </dependency>
-    <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
-      <version>1.2.14</version>
-    </dependency>
   </dependencies>
-
+ 
 </project>

Modified: trunk/examples/simple-example/resources/ajaxexample.jspx (451 => 452)

--- trunk/examples/simple-example/resources/ajaxexample.jspx	2007-12-07 17:13:26 UTC (rev 451)
+++ trunk/examples/simple-example/resources/ajaxexample.jspx	2007-12-08 15:57:46 UTC (rev 452)
@@ -18,9 +18,12 @@
     <script src="" type="text/_javascript_">
         //
     </script>
-    <script src="" type="text/_javascript_">
+    <script src="" type="text/_javascript_">
         // 
     </script>
+    <script src="" type="text/_javascript_">
+        // 
+    </script>
 
     <style type="text/css" title="currentStyle" media="screen">
         @import "stylesheets/style.css";

Modified: trunk/examples/simple-example/resources/calculator.jspx (451 => 452)

--- trunk/examples/simple-example/resources/calculator.jspx	2007-12-07 17:13:26 UTC (rev 451)
+++ trunk/examples/simple-example/resources/calculator.jspx	2007-12-08 15:57:46 UTC (rev 452)
@@ -13,8 +13,8 @@
     <style type="text/css" title="currentStyle" media="screen">
         @import "stylesheets/style.css";
     </style>
-    <script src="" type="text/_javascript_">
-        // keep this space
+    <script src="" type="text/_javascript_">
+        // 
     </script>
 </head>
 
@@ -40,9 +40,9 @@
         <br style="clear:both"/>
     </div>
 
-    <a href="" |
-    <a href="" |
-    <a href=""
+    <a href="" |
+    <a href="" |
+    <a href=""
 
 </form>
 </body>

Modified: trunk/examples/simple-example/resources/editperson.jspx (451 => 452)

--- trunk/examples/simple-example/resources/editperson.jspx	2007-12-07 17:13:26 UTC (rev 451)
+++ trunk/examples/simple-example/resources/editperson.jspx	2007-12-08 15:57:46 UTC (rev 452)
@@ -43,8 +43,8 @@
     </div>
 
     <br/>
-    <a href="" |
-    <a href=""
+    <a href="" |
+    <a href=""
 
     <jsp:directive.include file="fielderrors.jspx"/>
 

Modified: trunk/examples/simple-example/resources/person.jspx (451 => 452)

--- trunk/examples/simple-example/resources/person.jspx	2007-12-07 17:13:26 UTC (rev 451)
+++ trunk/examples/simple-example/resources/person.jspx	2007-12-08 15:57:46 UTC (rev 452)
@@ -17,7 +17,7 @@
     <script src="" type="text/_javascript_">
         // keep this space
     </script>
-    <script src="" type="text/_javascript_">
+    <script src="" type="text/_javascript_">
         // keep this space
     </script>
 </head>
@@ -48,7 +48,7 @@
         </c:forEach>
     </table>
 
-    <a href=""
+    <a href=""
 
     <!-- Example of partial page -->
     <div id="editArea">

Deleted: trunk/examples/simple-example/resources/scripts/myscript.js (451 => 452)

--- trunk/examples/simple-example/resources/scripts/myscript.js	2007-12-07 17:13:26 UTC (rev 451)
+++ trunk/examples/simple-example/resources/scripts/myscript.js	2007-12-08 15:57:46 UTC (rev 452)
@@ -1,33 +0,0 @@
-function fireMethod(methodName) {
-    createElementSubmitForm(document.forms[0], methodName);
-}
-
-function fireMultipartMethod(methodName) {
-	var form = document.forms[0];
-	form.method="post";
-    form.encoding="multipart/form-data";
-	createElementSubmitForm(form, methodName);
-}
-
-function createElementSubmitForm(form, methodName) {
-    var method = document.createElement("input");
-    method.setAttribute("type", "hidden");
-    method.setAttribute("name", "method");
-    method.value = methodName;
-
-    form.appendChild(method);
-    form.submit();
-    return true;
-}
-
-function makeDraggable(className) {
-    var items = document.getElementsByClassName(className);
-    for (var i = 0; i < items.length; i++) {
-        new Draggable(items[i].id, {ghosting:true, revert:true})
-    }
-}
-
-function handleDrop(element, dropon, event) {
-    var pars = 'method=' + element.id;
-    new Ajax.Updater({success: 'selection'}, "ajaxexample.waffle", {method: 'get', parameters: pars, evalScripts:true});
-}
\ No newline at end of file

Modified: trunk/examples/simple-example/resources/upload.jspx (451 => 452)

--- trunk/examples/simple-example/resources/upload.jspx	2007-12-07 17:13:26 UTC (rev 451)
+++ trunk/examples/simple-example/resources/upload.jspx	2007-12-08 15:57:46 UTC (rev 452)
@@ -14,12 +14,9 @@
     <style type="text/css" title="currentStyle" media="screen">
         @import "stylesheets/style.css";
     </style>
-    <script src="" type="text/_javascript_">
+    <script src="" type="text/_javascript_">
         // keep this space
     </script>
-    <script src="" type="text/_javascript_">
-        // keep this space
-    </script>
 </head>
 
 <body>
@@ -29,7 +26,7 @@
 
     <input type="file" name="importFile"/>
     
-    <a href="" File</a>
+    <a href="" File</a>
 
     <br/>
 

Modified: trunk/pom.xml (451 => 452)

--- trunk/pom.xml	2007-12-07 17:13:26 UTC (rev 451)
+++ trunk/pom.xml	2007-12-08 15:57:46 UTC (rev 452)
@@ -20,6 +20,7 @@
   <modules>
     <module>waffle-core</module>
     <module>waffle-mock</module>
+    <module>waffle-resources</module>
     <module>waffle-taglib</module>
   </modules>
 
@@ -265,9 +266,9 @@
           <version>2.1</version>
         </plugin>
         <plugin>
-          <groupId>org.codehaus.mojo</groupId>
-          <artifactId>dependency-maven-plugin</artifactId>
-          <version>1.0</version>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-dependency-plugin</artifactId>
+          <version>2.0-alpha-4</version>
         </plugin>
         <plugin>
           <groupId>org.codehaus.mojo.groovy</groupId>

Property changes: trunk/waffle-resources

Name: svn:ignore
   + target

Added: trunk/waffle-resources/pom.xml (0 => 452)

--- trunk/waffle-resources/pom.xml	                        (rev 0)
+++ trunk/waffle-resources/pom.xml	2007-12-08 15:57:46 UTC (rev 452)
@@ -0,0 +1,17 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.codehaus.waffle</groupId>
+    <artifactId>waffle</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+  <packaging>jar</packaging>
+  <artifactId>waffle-resources</artifactId>
+  <name>Waffle Resources</name>
+  <description>
+    A collection of distributable Waffle webapp resources.
+  </description>
+
+</project>

Added: trunk/waffle-resources/src/main/resources/js/waffle/action.js (0 => 452)

--- trunk/waffle-resources/src/main/resources/js/waffle/action.js	                        (rev 0)
+++ trunk/waffle-resources/src/main/resources/js/waffle/action.js	2007-12-08 15:57:46 UTC (rev 452)
@@ -0,0 +1,31 @@
+/*****************************************************************************
+ * Copyright (C) 2005,2006 Michael Ward                                      *
+ * All rights reserved.                                                      *
+ * ------------------------------------------------------------------------- *
+ * The software in this package is published under the terms of the BSD      *
+ * style license a copy of which has been included with this distribution in *
+ * the LICENSE.txt file.                                                     *
+ *****************************************************************************/
+
+function fireActionMethod(methodName) {
+	var form = document.forms[0];
+    submitInputMethod(form, methodName);
+}
+
+function fireMultipartActionMethod(methodName) {
+	var form = document.forms[0];
+	form.method="post";
+    form.encoding="multipart/form-data";
+	submitInputMethod(form, methodName);
+}
+
+function submitInputMethod(form, methodName) {
+    var method = document.createElement("input");
+    method.setAttribute("type", "hidden");
+    method.setAttribute("name", "method");
+    method.value = methodName;
+
+    form.appendChild(method);
+    form.submit();
+    return true;
+}
\ No newline at end of file

Added: trunk/waffle-resources/src/main/resources/js/waffle/dnd.js (0 => 452)

--- trunk/waffle-resources/src/main/resources/js/waffle/dnd.js	                        (rev 0)
+++ trunk/waffle-resources/src/main/resources/js/waffle/dnd.js	2007-12-08 15:57:46 UTC (rev 452)
@@ -0,0 +1,20 @@
+/*****************************************************************************
+ * Copyright (C) 2005,2006 Michael Ward                                      *
+ * All rights reserved.                                                      *
+ * ------------------------------------------------------------------------- *
+ * The software in this package is published under the terms of the BSD      *
+ * style license a copy of which has been included with this distribution in *
+ * the LICENSE.txt file.                                                     *
+ *****************************************************************************/
+ 
+function makeDraggable(className) {
+    var items = document.getElementsByClassName(className);
+    for (var i = 0; i < items.length; i++) {
+        new Draggable(items[i].id, {ghosting:true, revert:true})
+    }
+}
+
+function handleDrop(element, dropon, event) {
+    var pars = 'method=' + element.id;
+    new Ajax.Updater({success: 'selection'}, "waffle", {method: 'get', parameters: pars, evalScripts:true});
+}
\ No newline at end of file


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to