Skip to content

Commit

Permalink
added some indicators and fixed the info and log modals
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevnz committed Mar 6, 2012
1 parent 2f33fc2 commit b10f08f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
11 changes: 9 additions & 2 deletions public/javascripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@

showLogs: function(e) {
e.preventDefault();
$.get('/api/applogs/' + this.model.id, function(res) {
$.get('/api/applogs/' + this.model.get('name'), function(res) {
//TODO Check if no info in logs and display message
if(res.status && res.status === 'failure'){
$('#modal').modal({
Expand All @@ -152,7 +152,7 @@
},
showInfo: function(e) {
e.preventDefault();
var appname= this.model.id;
var appname= this.model.get('name');

panel.router.navigate('apps/'+appname , {trigger: true });

Expand Down Expand Up @@ -332,6 +332,13 @@
$('#modal').on('hidden', function(){
history.back();
});
$('#loader').ajaxStart(function(){
console.log('test');
$(this).show();
}).ajaxStop(function(){
$(this).hide();
})
;
});

})();
6 changes: 6 additions & 0 deletions public/stylesheets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -224,4 +224,10 @@ footer p {
text-decoration:underline;
display:inline-block;
min-width:120px;
}
#loader {
min-width:20px;
min-height:20px;
padding:4px;
background:url('../i/loader.gif') no-repeat 50% top;
}
6 changes: 0 additions & 6 deletions views/index.jade
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
.c
#loader
img(src:"/static/i/loader.gif")
script
$(function(){
// $.getScript('/static/javascripts/main.js"');
});
1 change: 1 addition & 0 deletions views/layout.jade
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ html
| Howdy <strong>#{user}</strong> !
a(href="/logout") Logout
#content_wrapper
#loader
.content
!= body
.cl
Expand Down

0 comments on commit b10f08f

Please sign in to comment.