浏览代码

Should already be loaded by this time

Andy Baugh 6 年之前
父节点
当前提交
b48c31e7a2
共有 1 个文件被更改,包括 9 次插入9 次删除
  1. 9 9
      notification-center/notification-center.tt

+ 9 - 9
notification-center/notification-center.tt

@@ -17,7 +17,9 @@
 -%]
 [% PROCESS '_pkg_hover.tmpl' -%]
 [% PROCESS '_ajaxapp_header.tmpl' -%]
+<style>
 
+</style>
 <table class="table table-striped responsive-table" border="1" cellspacing="0" cellpadding="2" >
     <thead>
         <tr>
@@ -46,15 +48,13 @@
 
 <script type="text/javascript">
     //Localize all the timestamps on the page
-    window.onload = function () {
-        var timestamps = document.querySelectorAll('.timestamp');
-        for (var i=0; i < timestamps.length; i++) {
-            var timestamp = timestamps[i].innerText.replace('/','');
-            var t = new Date(0)
-            t.setUTCSeconds(timestamp);
-            timestamps[i].innerText = t.toLocaleDateString() + " " + t.toLocaleTimeString();
-        }
-    };
+    var timestamps = document.querySelectorAll('.timestamp');
+    for (var i=0; i < timestamps.length; i++) {
+        var timestamp = timestamps[i];
+        var t = new Date(0)
+        t.setUTCSeconds(timestamp);
+        timestamps[i].innerText = t.toLocaleDateString() + " " + t.toLocaleTimeString();
+    }
 
     function toggleContentDisplay(id) {
         var dstatus   = document.getElementById(id).style.display;