]> source.dussan.org Git - archiva.git/commitdiff
[MRM-1598] use bootstrap css 2.x fix repositories tabs/pills
authorOlivier Lamy <olamy@apache.org>
Thu, 2 Feb 2012 22:44:22 +0000 (22:44 +0000)
committerOlivier Lamy <olamy@apache.org>
Thu, 2 Feb 2012 22:44:22 +0000 (22:44 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1239896 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/repositories.html

index 0ca226fd1ba83df0dc65733c36e261327fb4e969..5f9eb9e78319dbda56a5cc45e23c491b6357e27b 100644 (file)
@@ -724,7 +724,7 @@ $(function() {
     clearUserMessages();
     $("#main-content").html(mediumSpinnerImg());
     $("#main-content").html($("#repositoriesMain").tmpl());
-    $("#main-content #repositories-tabs").tabs();
+    $("#main-content #repositories-tabs a:first").tab("show");
 
     $("#main-content #managed-repositories-content").append(mediumSpinnerImg());
     $("#main-content #remote-repositories-content").append(mediumSpinnerImg());
@@ -761,8 +761,7 @@ $(function() {
             }
           });
           ko.applyBindings(managedRepositoriesViewModel,$("#main-content #managed-repositories-table").get(0));
-          $("#main-content #managed-repositories-pills").pills();
-          $("#managed-repositories-view").addClass("active");
+          $("#main-content #managed-repositories-pills a:first").tab('show');
           removeMediumSpinnerImg("#main-content #managed-repositories-content");
           activateManagedRepositoriesGridTab();
         }
@@ -802,8 +801,7 @@ $(function() {
             }
           });
           ko.applyBindings(remoteRepositoriesViewModel,$("#main-content #remote-repositories-table").get(0));
-          $("#main-content #remote-repositories-pills").pills();
-          $("#remote-repositories-view").addClass("active");
+          $("#main-content #remote-repositories-pills a:first").tab('show')
           removeMediumSpinnerImg("#main-content #remote-repositories-content");
         }
       }
@@ -811,7 +809,7 @@ $(function() {
 
 
 
-    $("#main-content #managed-repositories-pills").bind('change', function (e) {
+    $("#main-content #managed-repositories-pills").on('show', function (e) {
       if ($(e.target).attr("href")=="#managed-repository-edit") {
         var viewModel = new ManagedRepositoryViewModel(new ManagedRepository(),false,managedRepositoriesViewModel);
         ko.applyBindings(viewModel,$("#main-content #managed-repository-edit").get(0));
@@ -823,7 +821,7 @@ $(function() {
 
     });
 
-    $("#main-content #remote-repositories-pills").bind('change', function (e) {
+    $("#main-content #remote-repositories-pills").on('show', function (e) {
       if ($(e.target).attr("href")=="#remote-repository-edit") {
         $.ajax("restServices/archivaServices/networkProxyService/getNetworkProxies", {
             type: "GET",
index d3654e212b794e5d0a079f58cf2f459684334fdf..bc290a51f097ac4a8a30499dd83d564d186cbb7d 100644 (file)
       <h2>${$.i18n.prop('administration.repositories')}</h2>
     </div>
 
-      <ul id="repositories-tabs" class="tabs">
+      <ul id="repositories-tabs" class="nav nav-tabs">
         <li class="active">
-          <a href="#managed-repositories-content">${$.i18n.prop('managedrepositories.grid.head')}</a>
+          <a data-toggle="tab" href="#managed-repositories-content">${$.i18n.prop('managedrepositories.grid.head')}</a>
         </li>  
         <li>
-          <a href="#remote-repositories-content">${$.i18n.prop('remoterepositories.grid.head')}</a>
+          <a data-toggle="tab" href="#remote-repositories-content">${$.i18n.prop('remoterepositories.grid.head')}</a>
         </li>
       </ul>  
       <div class="tab-content">
-       <div id="managed-repositories-content" class="active">
-            <ul id="managed-repositories-pills" class="pills">
+       <div id="managed-repositories-content" class="tab-pane active">
+            <ul id="managed-repositories-pills" class="nav nav-pills">
               <li class="active" id="managed-repositories-view-li">
-                <a href="#managed-repositories-view">${$.i18n.prop('managedrepositories.grid.tab.title')}</a>
+                <a data-toggle="tab" href="#managed-repositories-view">${$.i18n.prop('managedrepositories.grid.tab.title')}</a>
               </li>
               <li id="managed-repository-edit-li">
-                <a href="#managed-repository-edit">${$.i18n.prop('add')}</a>
+                <a data-toggle="tab" href="#managed-repository-edit">${$.i18n.prop('add')}</a>
               </li>
             </ul>
             <div id="managed-repositories-tabs-content" class="pill-content">
-              <div id="managed-repositories-view" class="active">
+              <div id="managed-repositories-view" class="pill-pane active">
                   <table class="table table-striped table-bordered" id="managed-repositories-table"
                          data-bind="simpleGrid: gridViewModel,simpleGridTemplate:'ko_managed-repositoriesGrid',pageLinksId:'managed-repositoriesPagination',data:'managedRepositories'">
                   </table>
                   <div id="managed-repositoriesPagination"></div>
                   <div id="managed-repositories-pom-snippet"></div>
               </div>
-              <div id="managed-repository-edit" data-bind='template: {name:"managed-repository-edit-tmpl"}'>
+              <div id="managed-repository-edit" class="pill-pane" data-bind='template: {name:"managed-repository-edit-tmpl"}'>
               </div>
             </div>
        </div>
 
 
-       <div id="remote-repositories-content">
-            <ul id="remote-repositories-pills" class="pills">
+       <div id="remote-repositories-content" class="tab-pane">
+            <ul id="remote-repositories-pills" class="nav nav-pills">
               <li class="active" id="remote-repositories-view-li">
-                <a href="#remote-repositories-view">${$.i18n.prop('remoterepositories.grid.tab.title')}</a>
+                <a data-toggle="tab" href="#remote-repositories-view">${$.i18n.prop('remoterepositories.grid.tab.title')}</a>
               </li>
               <li id="remote-repository-edit-li">
-                <a href="#remote-repository-edit">${$.i18n.prop('add')}</a>
+                <a data-toggle="tab" href="#remote-repository-edit">${$.i18n.prop('add')}</a>
               </li>
             </ul>
             <div id="remote-repositories-tabs-content" class="pill-content">
-              <div id="remote-repositories-view" class="active">
+              <div id="remote-repositories-view" class="pill-pane active">
                   <table class="table table-striped table-bordered" id="remote-repositories-table"
                          data-bind="simpleGrid: gridViewModel,simpleGridTemplate:'ko_remote-repositoriesGrid',pageLinksId:'remote-repositoriesPagination',data:'remoteRepositories'">
                   </table>
                   <div id="remote-repositoriesPagination"></div>
               </div>
-              <div id="remote-repository-edit" data-bind='template: {name:"remote-repository-edit-tmpl"}'>
+              <div id="remote-repository-edit" class="pill-pane" data-bind='template: {name:"remote-repository-edit-tmpl"}'>
               </div>
             </div>
        </div>