new jquery version and several fixes

This commit is contained in:
That-Guy 2012-04-03 11:22:42 +02:00
parent 0c6e8cac8d
commit 466ba4cf65
2 changed files with 31 additions and 176 deletions

173
jquery.js vendored Executable file → Normal file

File diff suppressed because one or more lines are too long

View file

@ -225,7 +225,6 @@ tbody td.center
#header-title > span, #header-connection, #header-host, #header-title > span, #header-connection, #header-host,
#nav, #nav,
th, th,
#login > input, #login > button,
p, p,
label label
{ {
@ -233,6 +232,11 @@ label
text-transform: uppercase; text-transform: uppercase;
} }
#login > input, #login > button
{
font: normal bold 11pt Arial, sans-serif;
}
td td
{ {
@ -301,7 +305,6 @@ td
['str_kbps_max', 'Maximum bitrate'] ['str_kbps_max', 'Maximum bitrate']
]; ];
$(document).ready(function() $(document).ready(function()
{ {
$('#nav').children().each(function() $('#nav').children().each(function()
@ -326,13 +329,20 @@ td
}); });
// format date to something pretty // format date to something pretty
function formatDate(date) function formatDate(date)
{ {
var d = new Date(date * 1000); var d = new Date(date * 1000);
return d.toUTCString(); // TODO return [
('00' + d.getMonth()).slice(-2),
('00' + d.getDate()).slice(-2),
d.getFullYear()
].join('/') + ' ' + [
('00' + d.getHours()).slice(-2),
('00' + d.getMinutes()).slice(-2),
('00' + d.getSeconds()).slice(-2)
].join(':');
} }
@ -378,6 +388,11 @@ td
"command": JSON.stringify(data) "command": JSON.stringify(data)
}, },
'dataType': 'jsonp', 'dataType': 'jsonp',
'timeout': 2500,
'error': function()
{
setHeaderState('disconnected');
},
'success': function(d) 'success': function(d)
{ {
console.log('RECV', d); console.log('RECV', d);
@ -453,9 +468,11 @@ td
switch(name) switch(name)
{ {
case 'login': case 'login':
//TODO fixme login creds
var host = $('<input>').attr('type', 'text').attr('placeholder', 'http://localhost:4242'); var host = $('<input>').attr('type', 'text').attr('placeholder', 'http://localhost:4242');
var user = $('<input>').attr('type', 'text').attr('placeholder', 'username'); var user = $('<input>').attr('type', 'text').attr('placeholder', 'USERNAME');/*.attr('value', 'testaccount'); */
var pass = $('<input>').attr('type', 'password').attr('placeholder', 'password'); var pass = $('<input>').attr('type', 'password').attr('placeholder', 'PASSWORD');/*.attr('value', 'pisvlek'); */
var conn = $('<button>').click(function() var conn = $('<button>').click(function()
{ {
// get login info // get login info
@ -715,7 +732,10 @@ $('#page').append( $('<p>').text('TODO stream settings: ' + sname + ' / ' + stre
logs = settings.settings.log, logs = settings.settings.log,
len = logs.length; len = logs.length;
logs.reverse(); if(len >= 2 && settings.settings.log[0][0] < settings.settings.log[len - 1][0])
{
logs.reverse();
}
$tbody.html(''); $tbody.html('');