Skip to content
Browse files

open last tab on tab close and visual changes to tabs

  • Loading branch information...
1 parent 43a0067 commit a22309749dd5cac12820a82ef3928546a241624a Kyle Smith committed Feb 27, 2014
View
2 app/views/application/main.html.erb
@@ -32,7 +32,7 @@
<!-- connectionWindow tabs -->
<div id='navigation_tabs'>
<ul class='nav nav-tabs'>
- <li ng-repeat='connectionWindow in connectionWindows'>
+ <li ng-repeat='connectionWindow in connectionWindows' class='{{connectionWindow.active}}'>
<a href=#{{connectionWindow.id}} data-toggle='tab' ng-click='showTab(connectionWindow.id)'>{{connectionWindow.title}}&nbsp&nbsp<span
class="glyphicon glyphicon-remove-circle" ng-click='closeConnectionWindow(connectionWindow.id)'></a>
</li>
View
1 public/javascripts/controllers/connection_windows.js
@@ -22,6 +22,7 @@ function connectionWindowsController($scope, $http, $rootScope, $modal) {
return connectionWindow.id != connectionWindowId;
});
resizeConnectionWindows();
+ $scope.connectionWindows[$scope.connectionWindows.length - 1].active = 'active';
};
$scope.submitQuery = function(connectionWindowId, sqlQuery){
View
4 public/stylesheets/base.css
@@ -85,4 +85,8 @@ th {
ul.nav, ul.nav-tabs {
border-style: none;
+}
+
+li.active {
+ font-weight: bold;
}

0 comments on commit a223097

Please sign in to comment.
Something went wrong with that request. Please try again.