Author: olamy
Date: Mon Jun 18 09:50:27 2012
New Revision: 1351252

URL: http://svn.apache.org/viewvc?rev=1351252&view=rev
Log:
add snippet for documentation purpose

Modified:
    
incubator/directmemory/trunk/examples/server-example/src/main/webapp/js/sample.js

Modified: 
incubator/directmemory/trunk/examples/server-example/src/main/webapp/js/sample.js
URL: 
http://svn.apache.org/viewvc/incubator/directmemory/trunk/examples/server-example/src/main/webapp/js/sample.js?rev=1351252&r1=1351251&r2=1351252&view=diff
==============================================================================
--- 
incubator/directmemory/trunk/examples/server-example/src/main/webapp/js/sample.js
 (original)
+++ 
incubator/directmemory/trunk/examples/server-example/src/main/webapp/js/sample.js
 Mon Jun 18 09:50:27 2012
@@ -16,6 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+// NOTE some snippets are used in the web site documentation so take care of 
those blocks :-)
 $(function() {
   Wine=function(name,description){
     this.name=name;
@@ -43,6 +44,7 @@ $(function() {
   }
 
   // X-DirectMemory-ExpiresIn
+  // START SNIPPET: put
   putWineInCache=function(wine,expiresIn,serializer){
     $.ajax({
       url: 'cache/'+encodeURIComponent(wine.name),
@@ -66,7 +68,9 @@ $(function() {
       }
     });
   }
+  // END SNIPPET: put
 
+  // START SNIPPET: delete
   deleteFromCache=function(key){
     $.ajax({
       url: 'cache/'+encodeURIComponent(key),
@@ -86,6 +90,7 @@ $(function() {
       }
     });
   }
+  // END SNIPPET: delete
 
   $(document).ready(function() {
 
@@ -110,7 +115,7 @@ $(function() {
         displayError("key mandatory");
         return;
       }
-
+      // START SNIPPET: get
       $.ajax({
         url: 'cache/'+encodeURIComponent(key),
         cache: false,
@@ -130,6 +135,7 @@ $(function() {
           }
         }
       });
+      // END SNIPPET: get
 
     });
 


Reply via email to