lenya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From flor...@apache.org
Subject svn commit: r1196068 - in /lenya/contributions/2_0_X/modules/lenyaDocWriting: client/js/ client/js/jquery-1.6.min.js client/simple-client.html sitemap.xmap
Date Tue, 01 Nov 2011 15:53:34 GMT
Author: florent
Date: Tue Nov  1 15:53:33 2011
New Revision: 1196068

URL: http://svn.apache.org/viewvc?rev=1196068&view=rev
Log:
LenyaDocWriting, REST module for adding document

Added:
    lenya/contributions/2_0_X/modules/lenyaDocWriting/client/js/
    lenya/contributions/2_0_X/modules/lenyaDocWriting/client/js/jquery-1.6.min.js
Modified:
    lenya/contributions/2_0_X/modules/lenyaDocWriting/client/simple-client.html
    lenya/contributions/2_0_X/modules/lenyaDocWriting/sitemap.xmap

Added: lenya/contributions/2_0_X/modules/lenyaDocWriting/client/js/jquery-1.6.min.js
URL: http://svn.apache.org/viewvc/lenya/contributions/2_0_X/modules/lenyaDocWriting/client/js/jquery-1.6.min.js?rev=1196068&view=auto
==============================================================================
--- lenya/contributions/2_0_X/modules/lenyaDocWriting/client/js/jquery-1.6.min.js (added)
+++ lenya/contributions/2_0_X/modules/lenyaDocWriting/client/js/jquery-1.6.min.js Tue Nov
 1 15:53:33 2011
@@ -0,0 +1,16 @@
+/*!
+ * jQuery JavaScript Library v1.6
+ * http://jquery.com/
+ *
+ * Copyright 2011, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2011, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Mon May 2 13:50:00 2011 -0400
+ */

[... 3 lines stripped ...]
Modified: lenya/contributions/2_0_X/modules/lenyaDocWriting/client/simple-client.html
URL: http://svn.apache.org/viewvc/lenya/contributions/2_0_X/modules/lenyaDocWriting/client/simple-client.html?rev=1196068&r1=1196067&r2=1196068&view=diff
==============================================================================
--- lenya/contributions/2_0_X/modules/lenyaDocWriting/client/simple-client.html (original)
+++ lenya/contributions/2_0_X/modules/lenyaDocWriting/client/simple-client.html Tue Nov  1
15:53:33 2011
@@ -1,6 +1,4 @@
 <!DOCTYPE HTML>
-<html class="dj_gecko dj_ff3 dj_contentbox mobile"><head>
-<meta http-equiv="content-type" content="text/html; charset=UTF-8">
 <!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
@@ -17,38 +15,79 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-
-  
-    <meta charset="utf-8">
+<html>
+  <head>
     <title>LenyaMobile</title>
+    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+    <meta charset="utf-8">
+    <script type="text/javascript" src="js/jquery-1.6.min.js"></script>
+    <script>
+      $(document).ready(function(){
+
+      $("#editForm").submit(function(){
+      
+      var ld = $('#requestFormat');
+            
+      if($("#cTitle").val() == ""){
+      alert("Please fill a title for your document");
+      return false;
+      }
+      else{
+      ld.find("lenyadoc\\:navtitle").replaceWith("<lenyadoc:navtitle>"+$("#cTitle").val()+"</lenyadoc:navtitle>").html();
+      }
+      ld.find("xhtml\\:body").replaceWith("<xhtml:body>"+$("#formContent").val()+"</xhtml:body>").html();
+      
+      $("#formProcessing").val(ld.html());
+            
+      return true;
+      
+      });
+      
+      });
+
+    </script>
   </head>
   <body style="visibility: visible;" class="android">
-  
-      <form name="lenyaEditorForm" method="post" enctype="multipart/form-data" action="http://193.196.240.56:8080/lenya/default/modules/lenyaDocWriting/create">
-        <input name="processing-old" id="formContent" value='' type="hidden">
-        <label for="cTitle">Title: </label>
-        <input id="cTitle" type="text">
-        <textarea style="display: none;" id="mce_0">&lt;p&gt;This is some content
that will be editable with TinyMCE.&lt;/p&gt;</textarea>
-	<textarea name="processing"><?xml version="1.0" encoding="UTF-8"?>         
                
-<lenyadoc:lenyadoc xmlns:lenyadoc="http://4sengines/lenyadoc/0.1" xmlns:xhtml="http://www.w3.org/1999/xhtml">
                                                          
-<lenyadoc:parameters>                                                             
                                                                                     
-<lenyadoc:resourcetype>xhtml</lenyadoc:resourcetype>                        
                                                                                         
 
-<lenyadoc:pubname>default</lenyadoc:pubname>                                
                                                                                         
 
-<lenyadoc:parentpath>/tutorial</lenyadoc:parentpath>                        
                                                                                         
 
-<lenyadoc:language>en</lenyadoc:language>                                   
                                                                                         
 
-<lenyadoc:navtitle>resta </lenyadoc:navtitle>                               
                                                                                         
 
-</lenyadoc:parameters>
-<lenyadoc:content>                                                                
                                                                                     
-<lenyadoc:contentpath>html</lenyadoc:contentpath>                           
                                                                                         
 
-<lenyadoc:replacepath>body</lenyadoc:replacepath>                           
                                                                                         
 
-<lenyadoc:fragment>                                                               
                                                                                     
-<xhtml:body>                                                                      
                                                                                     
-<xhtml:p>This is some content that will be editable with TinyMCE.</xhtml:p></xhtml:body>
                                                                               
-</lenyadoc:fragment>                                                              
                                                                                     
-</lenyadoc:content>                                                               
                                                                                     
-</lenyadoc:lenyadoc>
-	</textarea>
-	<button id="btn1" type="submit">Save</button>
-      </form>
+    
+    <form id="editForm" name="lenyaEditorForm" method="post" enctype="multipart/form-data"
action="http://localhost:8080/lenya/default/modules/lenyaDocWriting/create">
+      <input name="processing" id="formProcessing" value='' type="hidden">
+      <p>
+      <label for="cTitle">Title: </label>
+      <input id="cTitle" type="text">
+      </p>
+      <p>
+	<label for="processing">Your text: </label>
+      </p>
+      <p>
+	<textarea name="textContent" id="formContent" style="width: 400px; height: 400px;">
+	<p>Please type your html content here</p>
+      </textarea>
+      </p>
+      <p>
+      <button id="saveBtn" type="submit">Save</button>
+      </p>
+    </form>
+    
+    <div id="requestFormat" style="visibility:hidden">
+      <lenyadoc:lenyadoc xmlns:lenyadoc="http://4sengines/lenyadoc/0.1" xmlns:xhtml="http://www.w3.org/1999/xhtml">
+	  <lenyadoc:parameters>
+	    <lenyadoc:resourcetype>xhtml</lenyadoc:resourcetype>
+	    <lenyadoc:pubname>default</lenyadoc:pubname>
+	    <lenyadoc:parentpath>/tutorial</lenyadoc:parentpath>
+	    <lenyadoc:language>en</lenyadoc:language>
+	    <lenyadoc:navtitle>resta </lenyadoc:navtitle>
+	  </lenyadoc:parameters>
+	  <lenyadoc:content>
+	    <lenyadoc:contentpath>html</lenyadoc:contentpath>
+	    <lenyadoc:replacepath>body</lenyadoc:replacepath>
+	    <lenyadoc:fragment>
+	      <xhtml:body>
+		<xhtml:p>This is some content that will be editable with TinyMCE.</xhtml:p>
+	      </xhtml:body>
+	    </lenyadoc:fragment>
+	  </lenyadoc:content>
+	</lenyadoc:lenyadoc>
+    </div>
+    
   </body>
 </html>

Modified: lenya/contributions/2_0_X/modules/lenyaDocWriting/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/contributions/2_0_X/modules/lenyaDocWriting/sitemap.xmap?rev=1196068&r1=1196067&r2=1196068&view=diff
==============================================================================
--- lenya/contributions/2_0_X/modules/lenyaDocWriting/sitemap.xmap (original)
+++ lenya/contributions/2_0_X/modules/lenyaDocWriting/sitemap.xmap Tue Nov  1 15:53:33 2011
@@ -25,7 +25,9 @@
     <map:pipeline type="noncaching">
       
       <map:match pattern="create">
-	<map:generate src="{request-param:processing}"/>
+	<map:generate type="stream">
+	  <map:parameter name="form-name" value="processing"/>
+	</map:generate>
 	<map:transform type="lenyadoc-writing">
 	  <map:parameter name="serializer" value="xml" />
 	</map:transform>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org


Mime
View raw message