]> source.dussan.org Git - archiva.git/commitdiff
start adding documentation on common javascript functions
authorOlivier Lamy <olamy@apache.org>
Mon, 23 Jan 2012 21:25:52 +0000 (21:25 +0000)
committerOlivier Lamy <olamy@apache.org>
Mon, 23 Jan 2012 21:25:52 +0000 (21:25 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1234993 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp-js/src/site/apt/generics-js.apt [deleted file]
archiva-modules/archiva-web/archiva-webapp-js/src/site/resources/images/error-message.png [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-js/src/site/resources/images/modal-confirm-dialog.png [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-js/src/site/resources/images/success-message.png [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-js/src/site/xdoc/generics-js.xml [new file with mode: 0644]

diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/site/apt/generics-js.apt b/archiva-modules/archiva-web/archiva-webapp-js/src/site/apt/generics-js.apt
deleted file mode 100644 (file)
index 25ff1bb..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
- -----
- Generics Javascript
- -----
- Olivier Lamy
- -----
- 2012-01-19
- -----
-
-~~ Licensed to the Apache Software Foundation (ASF) under one                      
-~~ or more contributor license agreements.  See the NOTICE file                    
-~~ distributed with this work for additional information                           
-~~ regarding copyright ownership.  The ASF licenses this file                      
-~~ to you under the Apache License, Version 2.0 (the                               
-~~ "License"); you may not use this file except in compliance                      
-~~ with the License.  You may obtain a copy of the License at                      
-~~                                                                                 
-~~   http://www.apache.org/licenses/LICENSE-2.0                                    
-~~                                                                                 
-~~ Unless required by applicable law or agreed to in writing,                      
-~~ software distributed under the License is distributed on an                     
-~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY                          
-~~ KIND, either express or implied.  See the License for the                       
-~~ specific language governing permissions and limitations                         
-~~ under the License.                                                              
-
-~~ NOTE: For help with the syntax of this file, see:
-~~ http://maven.apache.org/guides/mini/guide-apt-format.html
-
-Generics Javascript
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/site/resources/images/error-message.png b/archiva-modules/archiva-web/archiva-webapp-js/src/site/resources/images/error-message.png
new file mode 100644 (file)
index 0000000..253b279
Binary files /dev/null and b/archiva-modules/archiva-web/archiva-webapp-js/src/site/resources/images/error-message.png differ
diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/site/resources/images/modal-confirm-dialog.png b/archiva-modules/archiva-web/archiva-webapp-js/src/site/resources/images/modal-confirm-dialog.png
new file mode 100644 (file)
index 0000000..1f417ff
Binary files /dev/null and b/archiva-modules/archiva-web/archiva-webapp-js/src/site/resources/images/modal-confirm-dialog.png differ
diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/site/resources/images/success-message.png b/archiva-modules/archiva-web/archiva-webapp-js/src/site/resources/images/success-message.png
new file mode 100644 (file)
index 0000000..d64aa29
Binary files /dev/null and b/archiva-modules/archiva-web/archiva-webapp-js/src/site/resources/images/success-message.png differ
diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/site/xdoc/generics-js.xml b/archiva-modules/archiva-web/archiva-webapp-js/src/site/xdoc/generics-js.xml
new file mode 100644 (file)
index 0000000..f538e8e
--- /dev/null
@@ -0,0 +1,71 @@
+<?xml version="1.0"?>
+<document>
+  <properties>
+    <title>Generics Javascript</title>
+    <author>Olivier Lamy</author>
+  </properties>
+  <body>
+
+    <script src="js/jquery-1.7.js" type="text/javascript"></script>
+    <script type="text/javascript" src="js/fancy-box-activation.js"></script>
+    <script src="js/jquery.fancybox-1.3.4.pack.js" type="text/javascript"></script>
+    <link rel="stylesheet" href="css/jquery.fancybox-1.3.4.css" type="text/css" media="screen" />
+
+    <macro name="toc"/>
+
+    <section name="Generics Javascript">
+      <p>Some common/generic javascript methods are available.</p>
+      <subsection name="User messages">
+      <p>A div "user-messages" is reserved for user messages.</p>
+        <subsection name="Success message">
+          <p>
+            Javascript function:
+            <source>
+displaySuccessMessage($.i18n.prop('managedrepository.added'));
+// the second parameter is optionnal by default user-messages id is used
+displaySuccessMessage=function(text,idToAppend){
+            </source>
+            <a href="images/success-message.png" class="single_image" title="Success Message">
+              <img src="images/success-message.png" width="150" height="93" style="border: 1px solid silver; margin-left: 0.25em; margin-bottom: 0.25em" alt="" /><br/>
+              Success Message
+            </a>
+          </p>
+        </subsection>
+
+        <subsection name="Error message">
+          <p>
+            Javascript function:
+            <source>
+displayErrorMessage($.i18n.prop('managedrepository.added'));
+// the second parameter is optionnal by default user-messages id is used
+displayErrorMessage=function(text,idToAppend){
+            </source>
+            <a href="images/error-message.png" class="single_image" title="Error Message">
+              <img src="images/error-message.png" width="150" height="93" style="border: 1px solid silver; margin-left: 0.25em; margin-bottom: 0.25em" alt="" /><br/>
+              Error Message
+            </a>
+          </p>
+        </subsection>
+      </subsection>
+      <subsection name="Modal Confirm dialog">
+        <p>
+          Javascript function:
+          <source>
+okFn: function to call in case of ok
+okMessage: message for Ok button
+cancelMessage: message for cancel button
+title: modal title
+bodyText: modal content (can be html)
+openDialogConfirm=function(okFn, okMessage, cancelMessage, title,bodyText)
+          </source>
+          <a href="images/modal-confirm-dialog.png" class="single_image" title="Modal Confirm dialog">
+            <img src="images/modal-confirm-dialog.png" width="150" height="93" style="border: 1px solid silver; margin-left: 0.25em; margin-bottom: 0.25em" alt="" /><br/>
+            Modal Confirm dialog
+          </a>
+        </p>
+      </subsection>
+    </section>
+  </body>
+</document>
+
+