archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1294226 - in /archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva: search.js templates/search.html
Date Mon, 27 Feb 2012 16:58:51 GMT
Author: olamy
Date: Mon Feb 27 16:58:50 2012
New Revision: 1294226

URL: http://svn.apache.org/viewvc?rev=1294226&view=rev
Log:
fix validation and activation of search results tab

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

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=1294226&r1=1294225&r2=1294226&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
Mon Feb 27 16:58:50 2012
@@ -561,10 +561,14 @@ $(function() {
     		  element: $("#main-content #search-basic-form #search-terms" ).get(0)
         }];
         customShowError("#main-content #search-basic-form", null, null, errorList);
+        return;
       } else {
         // cleanup previours error message
         customShowError("#main-content #search-basic-form", null, null, []);
       }
+      $("#main-content #search-results" ).html(mediumSpinnerImg());
+      activateSearchResultsTab();
+
     }
 
     advancedSearch=function(){
@@ -572,6 +576,16 @@ $(function() {
     }
   }
 
+  activateSearchResultsTab=function(){
+    var mainContent=$("#main-content");
+    mainContent.find("#search-form-collapse").removeClass("active");
+    mainContent.find("#search-results").addClass("active");
+
+    mainContent.find("#search-form-collapse-li").removeClass("active");
+    mainContent.find("#search-results-li" ).addClass("active");
+
+  }
+
   displaySearch=function(){
     clearUserMessages();
     var mainContent=$("#main-content");

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/search.html
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/search.html?rev=1294226&r1=1294225&r2=1294226&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/search.html
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/search.html
Mon Feb 27 16:58:50 2012
@@ -157,10 +157,10 @@
   <div id="search-artifacts-tabs">
     <div class="tabbable tabs-below">
       <ul class="nav nav-tabs">
-        <li class="active">
+        <li class="active" id="search-form-collapse-li">
           <a data-toggle="tab" href="#search-form-collapse">${$.i18n.prop('search.artifact.form.header')}</a>
         </li>
-          <li class="">
+          <li id="search-results-li">
             <a data-toggle="tab" href="#search-results">${$.i18n.prop('search.artifact.results.header')}</a>
           </li>
       </ul>



Mime
View raw message