From e6b6aa055caa7a82892125f3c8cc44aeafb41e29 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Mon, 19 Dec 2011 22:38:16 +0000 Subject: [PATCH] add a bit of doc in js git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1220981 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/webapp/js/archiva/utils.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js index 9c350a04e..26014bde0 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js @@ -16,6 +16,10 @@ * specific language governing permissions and limitations * under the License. */ + +/** + * log message in the console + */ $.log = (function(message) { if (typeof window.console != 'undefined' && typeof window.console.log != 'undefined') { console.log(message); @@ -24,6 +28,10 @@ $.log = (function(message) { } }); +/** + * return value of a param in the url + * @param name + */ $.urlParam = function(name){ var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href); if (results) { @@ -65,11 +73,18 @@ displayWarningMessage=function(text,idToAppend){ $(textId).focus(); } +/** + * clear #main-content and call clearUserMessages + */ screenChange=function(){ $("#main-content").html(""); clearUserMessages(); } +/** + * clear content of id if none clear content of #user-messages + * @param idToAppend + */ clearUserMessages=function(idToAppend){ var textId = idToAppend ? $("#"+idToAppend) : $("#user-messages"); $(textId).html(''); -- 2.39.5