From db522197f57e6bfbf358de6bce01df5acd281f81 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Thu, 16 Feb 2012 21:27:35 +0000 Subject: [PATCH] jquery optimisation git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1245187 13f79535-47bb-0310-9956-ffa450edef68 --- .../archiva-webapp-js/src/main/webapp/js/archiva/search.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js index b8c3a452d..748dd9a0d 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js @@ -20,7 +20,8 @@ $(function() { BrowseTopViewModel=function(groupIds){ this.groupIds=groupIds; - + var mainContent = $("#main-content"); + mainContent.find("#browse_result").html(mediumSpinnerImg()); displayGroupDetail=function(groupId){ $.log("groupId:"+groupId); $.ajax("restServices/archivaServices/browseService/browseGroupId/"+encodeURIComponent(groupId), { @@ -31,10 +32,10 @@ $(function() { $.map(data.browseGroupIdResult.browseGroupIdEntries,function(item){ return new BrowseGroupIdEntry(item.name, item.project); }): [data.browseGroupIdResult.browseGroupIdEntries]; - $("#main-content #browse_result").html($("#browse-groups-div-tmpl" ).tmpl()); + mainContent.find("#browse_result").html($("#browse-groups-div-tmpl" ).tmpl()); var browseGroupsViewModel = new BrowseGroupsViewModel(browseGroupIdEntryies); - ko.applyBindings(browseGroupsViewModel,$("#main-content #browse-groups-div" ).get(0)); + ko.applyBindings(browseGroupsViewModel,mainContent.find("#browse-groups-div" ).get(0)); } }); } -- 2.39.5