+++ /dev/null
- -----
- 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
--- /dev/null
+<?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>
+
+