LSP - fixes regarding wrong date display and increased width of the editserver div
This commit is contained in:
parent
4a15dff758
commit
2f9ccf366f
3 changed files with 37 additions and 10 deletions
|
@ -16,9 +16,9 @@
|
||||||
function formatDate(date)
|
function formatDate(date)
|
||||||
{
|
{
|
||||||
var d = new Date(date * 1000);
|
var d = new Date(date * 1000);
|
||||||
|
// note: .getMonth() returns the month from 0-11
|
||||||
return [
|
return [
|
||||||
('00' + d.getMonth()).slice(-2),
|
('00' + (d.getMonth()+1)).slice(-2),
|
||||||
('00' + d.getDate()).slice(-2),
|
('00' + d.getDate()).slice(-2),
|
||||||
d.getFullYear()
|
d.getFullYear()
|
||||||
].join('/') + ' ' + [
|
].join('/') + ' ' + [
|
||||||
|
@ -29,6 +29,31 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Format a date to mmm dd /yyyy hh:mm:ss format
|
||||||
|
* @param date the date to format (timestamp)
|
||||||
|
*/
|
||||||
|
months = Array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
|
||||||
|
function formatDateLong(date)
|
||||||
|
{
|
||||||
|
var d = new Date(date * 1000);
|
||||||
|
|
||||||
|
return [
|
||||||
|
months[d.getMonth()],
|
||||||
|
('00' + d.getDate()).slice(-2),
|
||||||
|
d.getFullYear()
|
||||||
|
].join(' ') + ' ' + [
|
||||||
|
('00' + d.getHours()).slice(-2),
|
||||||
|
('00' + d.getMinutes()).slice(-2),
|
||||||
|
('00' + d.getSeconds()).slice(-2)
|
||||||
|
].join(':');
|
||||||
|
}
|
||||||
|
function nameMonth(monthNum)
|
||||||
|
{
|
||||||
|
months = Array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find out what kind of resource an URI is
|
* Find out what kind of resource an URI is
|
||||||
* @param uri the URI to check. If it start with a protocol (ebut not file://) return 'Live', else 'Recorded'
|
* @param uri the URI to check. If it start with a protocol (ebut not file://) return 'Live', else 'Recorded'
|
||||||
|
|
|
@ -136,7 +136,7 @@
|
||||||
}else{
|
}else{
|
||||||
setHeaderState('disconnected');
|
setHeaderState('disconnected');
|
||||||
$('#header-host').text('');
|
$('#header-host').text('');
|
||||||
$('#page').append($('<p>').text(errorstr));
|
$('#page').append($('<p>').text(errorstr));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}).text('login');
|
}).text('login');
|
||||||
|
@ -187,7 +187,7 @@
|
||||||
)
|
)
|
||||||
).append(
|
).append(
|
||||||
$('<label>').text('time').append(
|
$('<label>').text('time').append(
|
||||||
$('<span>').text( formatDate(settings.settings.config.time) )
|
$('<span>').text( formatDateLong(settings.settings.config.time) )
|
||||||
)
|
)
|
||||||
).append(
|
).append(
|
||||||
$('<label>').text('Streams').append(
|
$('<label>').text('Streams').append(
|
||||||
|
@ -1018,7 +1018,7 @@
|
||||||
|
|
||||||
case 'logs':
|
case 'logs':
|
||||||
$table = $('<table>');
|
$table = $('<table>');
|
||||||
$table.html("<thead><th>Date<span class='theadinfo'>(MM/DD/YYYY)</span></th><th>Type</th><th>Message</th></thead>");
|
$table.html("<thead><th>Date<span class='theadinfo'>(MMM DD YYYY)</span></th><th>Type</th><th>Message</th></thead>");
|
||||||
$tbody = $('<tbody>');
|
$tbody = $('<tbody>');
|
||||||
|
|
||||||
if(!settings.settings.log)
|
if(!settings.settings.log)
|
||||||
|
@ -1041,7 +1041,7 @@
|
||||||
cur = settings.settings.log[i];
|
cur = settings.settings.log[i];
|
||||||
|
|
||||||
$tr = $('<tr>').append(
|
$tr = $('<tr>').append(
|
||||||
$('<td>').text(formatDate(cur[0]))
|
$('<td>').text(formatDateLong(cur[0]))
|
||||||
).append(
|
).append(
|
||||||
$('<td>').text(cur[1])
|
$('<td>').text(cur[1])
|
||||||
).append(
|
).append(
|
||||||
|
|
|
@ -245,7 +245,7 @@ label
|
||||||
display: block;
|
display: block;
|
||||||
margin: 6px 0 9px 0;
|
margin: 6px 0 9px 0;
|
||||||
padding: 8px 0 0 0;
|
padding: 8px 0 0 0;
|
||||||
width: 400px;
|
width: 600px;
|
||||||
}
|
}
|
||||||
|
|
||||||
label input,
|
label input,
|
||||||
|
@ -264,7 +264,7 @@ label span
|
||||||
|
|
||||||
#editserver
|
#editserver
|
||||||
{
|
{
|
||||||
width: 400px;
|
width: 600px;
|
||||||
|
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
@ -372,9 +372,9 @@ td
|
||||||
|
|
||||||
#forcesave
|
#forcesave
|
||||||
{
|
{
|
||||||
width: 400px;
|
width: 600px;
|
||||||
float: left;
|
float: left;
|
||||||
margin: 0 0 0 100px;
|
margin-top:20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#forcesave button
|
#forcesave button
|
||||||
|
@ -385,6 +385,8 @@ td
|
||||||
#forcesave p
|
#forcesave p
|
||||||
{
|
{
|
||||||
text-transform: none;
|
text-transform: none;
|
||||||
|
width:500px;
|
||||||
|
float:right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue