]> source.dussan.org Git - archiva.git/commitdiff
match returns a boolean,start fixing jquery selector
authorOlivier Lamy <olamy@apache.org>
Fri, 24 Aug 2012 08:11:38 +0000 (08:11 +0000)
committerOlivier Lamy <olamy@apache.org>
Fri, 24 Aug 2012 08:11:38 +0000 (08:11 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1376854 13f79535-47bb-0310-9956-ffa450edef68

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

index 8b0fb49d7a8bfdfd41dc22935215ac4ff7c8efc7..d7745ac10db9932986722fdde4b5068e27acebee 100644 (file)
@@ -22,7 +22,7 @@ appendArchivaVersion=function(){
 }
 
 timestampNoCache=function(){
-  if (window.archivaRuntimeInfo.version.match("SNAPSHOT$")=="SNAPSHOT"){
+  if (window.archivaRuntimeInfo.version.match("SNAPSHOT$")){
     return "&archivaTimestamp="+window.archivaRuntimeInfo.timestamp+(window.archivaRuntimeInfo.devMode?"&_="+jQuery.now():"");
   }
   return "";
@@ -107,7 +107,7 @@ $.ajax({
                           window.archivaJavascriptLog=data.javascriptLog;
                           window.archivaRuntimeInfo=data;
 
-                          require(['sammy','jquery','jquery.tmpl','archiva.main','utils','domReady!'],function (domReady) {
+                          require(['sammy','jquery','jquery.tmpl','archiva.main','utils','domReady!'],function () {
                               startArchivaApplication();
                               $("#loadingDiv").hide();
                               drawQuickSearchAutocomplete();
index ed10423fb9928d4005cdea39ceed589075778a72..8553878479482fcf6f2db925e8b2f7e27e90814a 100644 (file)
@@ -72,7 +72,7 @@ function(jquery,ui,sammy,tmpl) {
           return item.name();
         });
 
-        $("#topbar-menu-container [redback-permissions]").each(function(element){
+        $("#topbar-menu-container").find("[redback-permissions]").each(function(element){
           checkElementKarma(this);
         });
         $("#sidebar-content [redback-permissions]").each(function(element){
@@ -105,7 +105,7 @@ function(jquery,ui,sammy,tmpl) {
       $(this).hide();
     });
 
-    $("#sidebar-content [redback-permissions]").each(function(element){
+    $("#sidebar-content").find("[redback-permissions]").each(function(element){
       $(this).hide();
     });
     $.log("hideElementWithKarma");