From: Olivier Lamy Date: Mon, 23 Jan 2012 21:25:52 +0000 (+0000) Subject: start adding documentation on common javascript functions X-Git-Tag: archiva-1.4-M3~1495 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=57ae3fdc6a2eed03ff90f4851fa9d2200be88208;p=archiva.git start adding documentation on common javascript functions git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1234993 13f79535-47bb-0310-9956-ffa450edef68 --- 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 index 25ff1bb08..000000000 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/site/apt/generics-js.apt +++ /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 index 000000000..253b279b4 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 index 000000000..1f417ff59 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 index 000000000..d64aa292b 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 index 000000000..f538e8e21 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/site/xdoc/generics-js.xml @@ -0,0 +1,71 @@ + + + + Generics Javascript + Olivier Lamy + + + + + + + + + + +
+

Some common/generic javascript methods are available.

+ +

A div "user-messages" is reserved for user messages.

+ +

+ Javascript function: + +displaySuccessMessage($.i18n.prop('managedrepository.added')); +// the second parameter is optionnal by default user-messages id is used +displaySuccessMessage=function(text,idToAppend){ + + +
+ Success Message +
+

+
+ + +

+ Javascript function: + +displayErrorMessage($.i18n.prop('managedrepository.added')); +// the second parameter is optionnal by default user-messages id is used +displayErrorMessage=function(text,idToAppend){ + + +
+ Error Message +
+

+
+
+ +

+ Javascript function: + +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) + + +
+ Modal Confirm dialog +
+

+
+
+ +
+ +