]> source.dussan.org Git - archiva.git/commitdiff
cleanup handling of special query params really execute at the end of application...
authorOlivier Lamy <olamy@apache.org>
Thu, 1 Mar 2012 21:29:24 +0000 (21:29 +0000)
committerOlivier Lamy <olamy@apache.org>
Thu, 1 Mar 2012 21:29:24 +0000 (21:29 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1295910 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js

index 4e3fe76d7cb213843bcf0803d9f3894221c217f5..869bceaeb2cc47b89238cb6c1f643d67d19639c3 100644 (file)
@@ -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();
-  });
 })
 });