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

archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/index.html
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/user-grids.html
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/users.js

index b59396462585fe39b6024c2be158c3eb5ba3b7ab..e089140d3ec2327f4cd105ad1508a77961f79bff 100644 (file)
 
 <div class="container-fluid" style="min-height: 450px">
   <div class="row-fluid">
-    <div class="span2">
+    <div class="span2 columns">
       <div class="well sidebar-nav" id="sidebar-content"></div>
     </div>
-    <div class="span10">
+    <div class="span10 columns">
       <div class="content">
         <div id="user-messages"></div>
         <div id="main-content"></div>
index e92d9da975916eaf8282ac53a32dfbb01eaa8c22..9368620578e8034f4457550be783ccbf37aaafc7 100644 (file)
     <div class="page-header">
       <h2>${$.i18n.prop('users.list')}</h2>
     </div>
-    <ul id="users-view-tabs" class="tabs">
+    <ul id="users-view-tabs" class="nav nav-tabs" data-target="#users-view-tabs-content">
       <li class="active" id="users-view-tabs-li-users-grid">
-        <a href="#users-view">${$.i18n.prop('users.grid.tab.title')}</a>
+        <a data-toggle="tab" href="#users-view">${$.i18n.prop('users.grid.tab.title')}</a>
       </li>
       <li id="users-view-tabs-li-user-edit">
-        <a href="#createUserForm" id="users-view-tabs-li-user-edit-a">${$.i18n.prop('add')}</a>
+        <a data-toggle="tab" href="#createUserForm" id="users-view-tabs-li-user-edit-a">${$.i18n.prop('add')}</a>
       </li>
     </ul>
     <div id="users-view-tabs-content" class="tab-content">
-      <div id="users-view">
+      <div id="users-view" class="tab-pane">
         <button data-bind='click: sortByName'  class="btn">
             ${$.i18n.prop('users.sort.byname')}
         </button>
         </table>
         <div id="usersPagination"></div>
       </div>
-      <div id="createUserForm"></div>
+      <div id="createUserForm" class="tab-pane"></div>
     </div>
 </script>
 
index 75b90146e2ecf00a7763c0256ba7950c92353303..bbbdb921205223913ed301eb13e2ddc243431e99 100644 (file)
@@ -216,8 +216,8 @@ $(function() {
     window.redbackModel.usersViewModel = new usersViewModel();
     window.redbackModel.usersViewModel.loadUsers();
     ko.applyBindings(window.redbackModel.usersViewModel,jQuery("#main-content").get(0));
-    $("#main-content #users-view-tabs").tabs();
-    $("#main-content #users-view-tabs").bind('change', function (e) {
+    $("#main-content").tab('show');//#users-view-tabs
+    $("#main-content a[data-toggle='tab']").on('show', function (e) {
       //$.log( $(e.target).attr("href") ); // activated tab
       //e.relatedTarget // previous tab
       if ($(e.target).attr("href")=="#createUserForm") {