archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1295910 - /archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js
Date Thu, 01 Mar 2012 21:29:24 GMT
Author: olamy
Date: Thu Mar  1 21:29:24 2012
New Revision: 1295910

URL: http://svn.apache.org/viewvc?rev=1295910&view=rev
Log:
cleanup handling of special query params really execute at the end of application loading

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

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js?rev=1295910&r1=1295909&r2=1295910&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js
Thu Mar  1 21:29:24 2012
@@ -63,6 +63,34 @@ $(function() {
     });
   }
 
+  // handle url with registration link
+  var checkUrlParams=function() {
+    var validateMeId = $.urlParam('validateMe');
+    if (validateMeId) {
+      validateKey(validateMeId);
+      return;
+    }
+
+    var browse = $.urlParam('browse');
+    if (browse){
+      displayBrowseGroupId(browse);
+      return;
+    }
+
+    var screen = $.urlParam('screen');
+    $.log("screen:"+screen+',operations:'+window.redbackModel.operatioNames);
+    if(screen){
+
+      if(screen='proxy-connectors'&& $.inArray('archiva-manage-configuration',window.redbackModel.operatioNames)>=0){
+        displayProxyConnectors();
+        return;
+      }
+    }
+
+    // by default display search screen
+    displaySearch();
+  }
+
   decorateMenuWithKarma=function(user) {
     var username = user.username;
     // we can receive an observable user so take if it's a function or not
@@ -86,6 +114,7 @@ $(function() {
         $("#sidebar-content [redback-permissions]").each(function(element){
           checkElementKarma(this);
         });
+        checkUrlParams();
       }
     });
   }
@@ -156,6 +185,8 @@ $(function() {
     });
   }
 
+
+
   startArchivaApplication = function(){
     $.log("startArchivaApplication");
     $('#topbar-menu-container').html($("#topbar-menu"));
@@ -193,28 +224,14 @@ $(function() {
 
       }
 		});
+  }
+
 
 
-  }
   startArchivaApplication();
 
 
-  // handle url with registration link
-  $(document).ready(function() {
-    var validateMeId = $.urlParam('validateMe');
-    if (validateMeId) {
-      validateKey(validateMeId);
-      return;
-    }
 
-    var browse = $.urlParam('browse');
-    if (browse){
-      displayBrowseGroupId(browse);
-      return;
-    }
-    // by default display search screen
-    displaySearch();
-  });
 })
 });
 



Mime
View raw message