Skip to content

Commit

Permalink
Add loading style; fix random pet generator.
Browse files Browse the repository at this point in the history
  • Loading branch information
bennadel committed Jan 12, 2013
1 parent 6c761f5 commit 8a59647
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 4 deletions.
4 changes: 2 additions & 2 deletions assets/app/controllers/pets/detail/random-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
$scope.isLoading = true;

var promise = petService.getRandomPetExcluding( $scope.categoryID, $scope.petID );

promise.then(
function( response ) {

Expand Down Expand Up @@ -53,7 +53,7 @@


// Get the render context local to this controller (and relevant params).
var renderContext = requestContext.getRenderContext( "standard.pets.detail.random", [ "categoryID", "petID" ] );
var renderContext = requestContext.getRenderContext( "standard.pets.detail", [ "categoryID", "petID" ] );


// --- Define Scope Variables. ---------------------- //
Expand Down
18 changes: 18 additions & 0 deletions assets/app/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,24 @@ h4 {
a {
color: #333333 ;
}
div.l-loading {
background-color: #262626 ;
bottom: 0px ;
left: 0px ;
position: fixed ;
right: 0px ;
top: 0px ;
}
div.l-loading p {
color: #F0F0F0 ;
font-size: 12px ;
font-style: italic ;
left: 0px ;
position: absolute ;
text-align: center ;
top: 48% ;
width: 100% ;
}
div.l-splash {
margin: 30px auto 50px auto ;
width: 600px ;
Expand Down
20 changes: 20 additions & 0 deletions assets/app/less/loading.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

div.l-loading {
background-color: #262626 ;
bottom: 0px ;
left: 0px ;
position: fixed ;
right: 0px ;
top: 0px ;

p {
color: #F0F0F0 ;
font-size: 12px ;
font-style: italic ;
left: 0px ;
position: absolute ;
text-align: center ;
top: 48% ;
width: 100% ;
}
}
1 change: 1 addition & 0 deletions assets/app/less/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
@import "core.less" ;

// Layouts.
@import "loading.less" ;
@import "splash.less" ;
@import "standard.less" ;

Expand Down
4 changes: 2 additions & 2 deletions index.htm
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
the page. Once the app kicks in, however, the calculated subview will determine the
appropriate layout to render.
-->
<div ng-switch-when="loading">
<div ng-switch-when="loading" class="l-loading">

<p>
Loading.
Loading Application
</p>

</div>
Expand Down

0 comments on commit 8a59647

Please sign in to comment.