archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1390776 - in /archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva: main.js search.js
Date Wed, 26 Sep 2012 23:27:42 GMT
Author: olamy
Date: Wed Sep 26 23:27:42 2012
New Revision: 1390776

URL: http://svn.apache.org/viewvc?rev=1390776&view=rev
Log:
fix browsing when click on an artifact in dependencies tab

Modified:
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.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=1390776&r1=1390775&r2=1390776&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
Wed Sep 26 23:27:42 2012
@@ -327,6 +327,9 @@ function(jquery,ui,sammy,tmpl) {
         var checkArtifactDetailContent=function(groupId,artifactId,version,repositoryId,tabToActivate,idContentToCheck,contentDisplayFn){
           // no need to recalculate all stuff just activate the tab
           var htmlId = idContentToCheck?idContentToCheck:"browse_artifact_detail";
+          // olamy: cause some issues when browsing so desactivate this fix until more check
+          // navigating from dependencies list or dependency or used by of an artifact to
fix in search.js
+          /*
           var htmlIdSelect = $("#main-content").find("#"+htmlId );
           if(htmlIdSelect.html()!=null){
             if( $.trim(htmlIdSelect.html().length)>0){
@@ -335,7 +338,7 @@ function(jquery,ui,sammy,tmpl) {
               return;
             }
           }
-
+          */
 
           var artifactAvailableUrl="restServices/archivaServices/browseService/artifactAvailable/"+encodeURIComponent(groupId)+"/"+encodeURIComponent(artifactId);
           artifactAvailableUrl+="/"+encodeURIComponent(version);

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js?rev=1390776&r1=1390775&r2=1390776&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js
Wed Sep 26 23:27:42 2012
@@ -224,6 +224,7 @@ define("archiva.search",["jquery","i18n"
   }
 
   displayArtifactVersionDetailViewModel=function(groupId,artifactId,version){
+    $.log("displayArtifactVersionDetailViewModel:"+groupId+":"+artifactId+":"+version);
     var artifactVersionDetailViewModel = new ArtifactVersionDetailViewModel (groupId,artifactId,version)
     artifactVersionDetailViewModel.display();
   }
@@ -444,6 +445,7 @@ define("archiva.search",["jquery","i18n"
     }
 
     displayArtifactVersionDetailViewModel=function(groupId,artifactId,version){
+      $.log("ArtifactVersionDetailViewModel#displayArtifactVersionDetailViewModel:"+groupId+":"+artifactId+":"+version);
       var selectedRepo=getSelectedBrowsingRepository();
       var location ="#artifact";
       if (selectedRepo){
@@ -451,6 +453,11 @@ define("archiva.search",["jquery","i18n"
       }
       location+="/"+groupId+"/"+artifactId+"/"+version;
 
+      self.groupId=groupId;
+      self.artifactId=artifactId;
+      self.version=version;
+      $("#main-content" ).find("#browse_artifact_detail" ).html("");
+
       window.sammyArchivaApplication.setLocation(location);
     }
 



Mime
View raw message