You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by ol...@apache.org on 2011/12/19 23:38:16 UTC

svn commit: r1220981 - /archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js

Author: olamy
Date: Mon Dec 19 22:38:16 2011
New Revision: 1220981

URL: http://svn.apache.org/viewvc?rev=1220981&view=rev
Log:
add a bit of doc in js

Modified:
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js?rev=1220981&r1=1220980&r2=1220981&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js (original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js Mon Dec 19 22:38:16 2011
@@ -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,idTo
   $(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('');