Fix checkboxes with new angular version

pull/2/head
Michael Crosby 2014-01-07 09:18:38 -08:00
parent 172d32e276
commit aa1c15bcc0
5 changed files with 70 additions and 63 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
logs/*
!.gitkeep
dockerui
*.esproj/*

View File

@ -1,101 +1,110 @@
body {
body {
padding-top: 20px;
padding-bottom: 60px;
}
}
.container {
.container {
margin: 0 auto;
max-width: 1000px;
}
.container > hr {
margin: 60px 0;
}
}
.jumbotron {
.container > hr {
margin: 60px 0;
}
.jumbotron {
margin: 80px 0;
text-align: center;
}
.jumbotron h1 {
}
.jumbotron h1 {
font-size: 100px;
line-height: 1;
}
.jumbotron .lead {
}
.jumbotron .lead {
font-size: 24px;
line-height: 1.25;
}
.jumbotron .btn {
}
.jumbotron .btn {
font-size: 21px;
padding: 14px 24px;
}
}
.marketing {
.marketing {
margin: 60px 0;
}
.marketing p + h4 {
margin-top: 28px;
}
}
.navbar .navbar-inner {
.marketing p + h4 {
margin-top: 28px;
}
.navbar .navbar-inner {
padding: 0;
}
.navbar .nav {
}
.navbar .nav {
margin: 0;
}
.navbar .nav li {
}
.navbar .nav li {
display: table-cell;
width: 1%;
float: none;
}
.navbar .nav li a {
}
.navbar .nav li a {
font-weight: bold;
text-align: center;
border-left: 1px solid rgba(255,255,255,.75);
border-right: 1px solid rgba(0,0,0,.1);
}
.navbar .nav li:first-child a {
}
.navbar .nav li:first-child a {
border-left: 0;
border-radius: 3px 0 0 3px;
}
.navbar .nav li:last-child a {
}
.navbar .nav li:last-child a {
border-right: 0;
border-radius: 0 3px 3px 0;
}
}
.btn-group button {
.btn-group button {
margin: 3px;
}
}
.detail {
.detail {
width: 80%;
margin: 0 auto;
}
}
.center {
.center {
width: 80%;
margin: 0 auto;
}
}
.btn-remove {
.btn-remove {
margin: 0 auto;
max-width: 70%;
}
}
.actions {
.actions {
margin: 0 auto;
}
}
.container-bottom {
height: 50px;
}
.container-bottom {
height: 50px;
}
.footer {
.footer {
max-height:6px;
}
}
#response {
#response {
width: 80%;
margin: 0 auto;
}
}
#editor {
height: 300px;

View File

@ -213,14 +213,15 @@ function ContainerController($scope, $routeParams, $location, Container, Message
// Controller for the list of containers
function ContainersController($scope, Container, Settings, Messages, ViewSpinner) {
$scope.displayAll = Settings.displayAll;
$scope.predicate = '-Created';
$scope.toggle = false;
$scope.toggle = false;
$scope.displayAll = Settings.displayAll;
var update = function(data) {
ViewSpinner.spin();
Container.query(data, function(d) {
$scope.containers = d.map(function(item) { return new ContainerViewModel(item); });
$scope.containers = d.map(function(item) {
return new ContainerViewModel(item); });
ViewSpinner.stop();
});
};
@ -257,13 +258,8 @@ function ContainersController($scope, Container, Settings, Messages, ViewSpinner
};
$scope.toggleGetAll = function() {
Settings.displayAll = $scope.displayAll;
var data = {all: 0};
if ($scope.displayAll) {
data.all = 1;
}
update(data);
Settings.displayAll = $scope.displayAll;
update({all: Settings.displayAll ? 1 : 0});
};
$scope.startAction = function() {
@ -282,7 +278,7 @@ function ContainersController($scope, Container, Settings, Messages, ViewSpinner
batch($scope.containers, Container.remove, "Removed");
};
update({all: $scope.displayAll ? 1 : 0});
update({all: Settings.displayAll ? 1 : 0});
}
// Controller for the list of images

View File

@ -15,13 +15,14 @@
</ul>
<div class="pull-right">
<input type="checkbox" ng-model="displayAll" ng-click="toggleGetAll()"/> Display All
<input type="checkbox" ng-model="displayAll"
ng-change="toggleGetAll()"/> Display All
</div>
</div>
<table class="table table-striped">
<thead>
<tr>
<th><input type="checkbox" ng-model="toggle" ng-click="toggleSelectAll()" /> Action</th>
<th><input type="checkbox" ng-model="toggle" ng-change="toggleSelectAll()" /> Action</th>
<th>Name</th>
<th>Image</th>
<th>Command</th>

View File

@ -14,7 +14,7 @@
<table class="table table-striped">
<thead>
<tr>
<th><input type="checkbox" ng-model="toggle" ng-click="toggleSelectAll()" /> Action</th>
<th><input type="checkbox" ng-model="toggle" ng-change="toggleSelectAll()" /> Action</th>
<th>Id</th>
<th>Repository</th>
<th>Created</th>