Log page simple styling

This commit is contained in:
Ruud
2011-09-28 19:23:12 +02:00
parent f09572b662
commit 3116015e30
2 changed files with 38 additions and 5 deletions
+8 -5
View File
@@ -16,7 +16,7 @@ Page.Log = new Class({
var self = this;
if(self.log) self.log.destroy();
self.log = new Element('div.log', {
self.log = new Element('div.container.loading', {
'text': 'loading...'
}).inject(self.el);
@@ -25,17 +25,20 @@ Page.Log = new Class({
'nr': nr
},
'onComplete': function(json){
self.log.set('html', '<pre>'+json.log+'</pre>')
self.log.set('html', '<pre>'+json.log+'</pre>');
self.log.removeClass('loading');
var nav = new Element('ul.nav').inject(self.log, 'top');
for (var i = 0; i < json.total; i++) {
p(i, json.total);
new Element('li', {
'text': i+1,
'class': nr == i ? 'active': '',
'events': {
'click': function(){ self.getLogs(i); }
'click': function(e){
self.getLogs(e.target.get('text')-1);
}
}
}).inject(nav)
}).inject(nav);
};
}
});