Browse Source

fixing date display in browser

pull/1/head
jngrt 10 years ago
parent
commit
17a82a94fc
  1. 48
      webapp.html

48
webapp.html

@ -10,29 +10,29 @@
<style>
body, html{margin: 0;padding: 0;}
body{
font-size:20px;
text-shadow: 1px 1px orange;
font-family: times, 'times new roman', helvetica,serif;
line-height:1.5em;
color:#444;
background:#fff;
background-image: url(css/marble.jpg);
background:#fff;
background-image: url(css/marble.jpg);
}
textarea{
-webkit-appearance: none; -moz-appearance: none;
display: block;
margin-left: auto;
margin-right: auto;
width: 90%; height: 50px;
line-height: 40px; font-size: 17px;
border: 1px solid #bbb;
-webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px;
background-image: url(css/aqua.jpg);
background-image: url(css/aqua.jpg);
font-family: inherit;
font-size: inherit;
font-size: 20px;
@ -60,18 +60,18 @@
font-size: 20px;
}
h2{
font-size: 40px;
}
hr{
height:10px;
border: 10;
width:87%;
background-image: url(css/bg1.gif);
background-image: url(css/bg1.gif);
}
ul{
@ -80,7 +80,7 @@
padding-left:30px;
}
li{
word-wrap:break-word;
list-style: none;
overflow: visible;
@ -101,7 +101,7 @@
border-bottom-right-radius:123px;
border-bottom-left-radius:123px;
left:-35px;
width:100%;
//overflow:hidden;
position:relative;
@ -117,7 +117,7 @@
text-align: center;
}
#name{
}
</style>
@ -128,28 +128,28 @@
<body>
<div id="header">
<h2>Meshenger</h2>
</div>
<textarea id="name" rows="1" placeholder="Your Name (leave empty for anonymous)"></textarea>
<textarea id="message" rows="3" placeholder="Your Message"></textarea>
<button style="width:100%" id="send">Send</button>
<select id="messagesort" name="messageSort">
<option value="dateReceived">Sort by Date Received</option>
<option value="dateSend">Sort by Date Send</option>
</select>
<ul id="inbox"></ul>
<!--<h2>outbox</h2>-->
<ul id="outbox"></ul>
<script type="text/javascript">
/*
@ -160,7 +160,7 @@ document.getElementById( 'send' ).onclick = function() {
var outStr = localStorage.getItem( 'outbox' ) || '';
if (document.getElementById('name').value == ""){
var namm= "anonymous";
}
}
else{
var namm= document.getElementById('name').value;
}
@ -276,8 +276,8 @@ function updateInboxView() {
continue;
}
var date = new Date(parseInt(orderStorage[i].time));
// date.setHours(date.getHours() + 2);
var datereadable = date.getDate()+"/"+date.getMonth()+"/"+date.getFullYear()+" "+date.getHours()+":"+date.getMinutes();
// date.setHours(date.getHours() + 2);
var datereadable = date.getDate()+"/"+(date.getMonth()+1)+"/"+date.getFullYear()+" "+date.getHours()+":"+date.getMinutes();
contentString += '<li><b>' + datereadable + ' </b>' + ' <i>'+ orderStorage[i].user +'</i><br/> '+orderStorage[i].message+'</li>';
}
document.getElementById( 'inbox' ).innerHTML = contentString;
@ -298,7 +298,7 @@ function onIndex( index ) {
var f = lines[i];
if (f == k){ l = 0; }
}
if (l == 1){
if (l == 1){
localStorage.removeItem(k);
}
}
@ -310,7 +310,7 @@ updateInboxView();
//localStorage.setItem( ts, lines[i].substr(lines[i].indexOf(' ')) );
downloadMessage( fname );
}
}
}

Loading…
Cancel
Save