/data/html/event-log.html

http://github.com/hbons/SparkleShare · HTML · 326 lines · 271 code · 53 blank · 2 comment · 0 complexity · 80465060245383a1b0490d2949bbce7c MD5 · raw file

  1. <!doctype html>
  2. <html>
  3. <head>
  4. <title>SparkleShare Event Log</title>
  5. <script type="text/javascript">
  6. <!-- $jquery -->
  7. </script>
  8. <script type="text/javascript">
  9. $(document).ready(function () {
  10. // Update the Today and Yesterday labels after midnight
  11. var midnight_interval = setInterval (function(){
  12. var date = new Date();
  13. if ((date.getTime() / 1000) >= <!-- $midnight -->) {
  14. $("#today").html($("#today").attr("name"));
  15. $("#yesterday").html($("#yesterday").attr("name"));
  16. clearInterval(midnight_interval);
  17. }
  18. }, 60 * 1000);
  19. $('.comments-section').each (function () {
  20. if ($(this).find ('.comments').children ().size () < 1) {
  21. $(this).hide ();
  22. }
  23. });
  24. $('.buddy-icon').each (function () {
  25. if ($(this).css('backgroundImage').indexOf ('@') != -1) {
  26. $(this).css ('backgroundColor', '#fff');
  27. }
  28. });
  29. // Show the form when 'Add note' is clicked
  30. $('.note').click(function () {
  31. $(this).parent ().find ('.comments-section').show ();
  32. });
  33. // Hide the 'Show all' link when there are less than 10 events
  34. $('.show').each (function () {
  35. var entries = $(this).parent ().find ('dl').children ().length;
  36. if (entries <= 10) {
  37. $(this).hide ();
  38. } else {
  39. // Append the number of entries
  40. $(this).html ('Show all ' + entries);
  41. }
  42. });
  43. // When 'Show all' is clicked, show all collapsed events
  44. $('.show').click(function () {
  45. $(this).parent ().find ('dl').children ().show ();
  46. $(this).hide ();
  47. });
  48. $("input").click(function () {
  49. textarea = $(this).parent ().find ('textarea');
  50. text = textarea.val ();
  51. if (text == '')
  52. return;
  53. // Clear the textarea
  54. textarea.val ('');
  55. table = $(this).parent ().find (".comments");
  56. comments = table.html ();
  57. // Add the note to the html
  58. comments += '<div class="comment-text">' +
  59. '<p class="comment-author"' +
  60. ' style="background-image: url(\'<!-- $user-avatar-url -->\');">' +
  61. '<!-- $username --></p>' +
  62. text +
  63. '</div>';
  64. table.html (comments);
  65. // Feed the note to the backend
  66. location = this.id + '~' + text;
  67. });
  68. });
  69. </script>
  70. <style>
  71. * {
  72. box-sizing: border-box;
  73. -webkit-box-sizing: border-box;
  74. }
  75. body {
  76. background-color: #fff;
  77. color: <!-- $body-color -->;
  78. font-size: <!-- $body-font-size -->;
  79. font-family: <!-- $body-font-family -->;
  80. margin: 0;
  81. padding: 18px;
  82. -webkit-user-select: none;
  83. }
  84. small {
  85. font-size: <!-- $small-font-size -->;
  86. color: <!-- $secondary-font-color -->;
  87. }
  88. .moved-arrow {
  89. color: <!-- $secondary-font-color -->;
  90. }
  91. .comment-text {
  92. font-size: 90%;
  93. padding: 12px;
  94. background-color: #FFF4DB;
  95. margin-bottom: 2px;
  96. }
  97. .day-entry-header {
  98. color: #aaa;
  99. margin-left: auto;
  100. margin-right: auto;
  101. display: block;
  102. text-align: center;
  103. margin-bottom: 36px;
  104. font-weight: bold;
  105. }
  106. .day-entry-content .event-entry:last-child {
  107. border: none;
  108. }
  109. a {
  110. color: <!-- $a-color -->;
  111. text-decoration: none;
  112. }
  113. a:hover {
  114. color: <!-- $a-hover-color -->;
  115. }
  116. .event-timestamp {
  117. float: left;
  118. font-size: 80%;
  119. color: <!-- $secondary-font-color -->;
  120. }
  121. .event-user-name {
  122. float: left;
  123. font-weight: bold;
  124. }
  125. .event-folder {
  126. float: right;
  127. color: <!-- $secondary-font-color -->;
  128. }
  129. .event-entry {
  130. margin-bottom: 24px;
  131. padding-bottom: 24px;
  132. border-bottom: 1px <!-- $secondary-font-color --> solid;
  133. width: 95%;
  134. margin-left: auto;
  135. margin-right: auto;
  136. padding-left: 72px;
  137. padding-right: 12px;
  138. background-repeat: no-repeat;
  139. background-position: 12px top;
  140. display: block;
  141. }
  142. .action {
  143. font-size: 80%;
  144. margin-left: 15px;
  145. float: right;
  146. margin-bottom: 9px;
  147. color: <!-- $a-color -->;
  148. }
  149. .action:hover {
  150. color: <!-- $a-hover-color -->;
  151. cursor: pointer;
  152. }
  153. .clearer {
  154. clear: both;
  155. backround-color: blue;
  156. margin: 0;
  157. padding: 0;
  158. height: 0;
  159. }
  160. .separator {
  161. clear: both;
  162. border-bottom: 1px #ccc solid;
  163. margin-top: 24px;
  164. margin-bottom: 24px;
  165. }
  166. dl {
  167. padding : 0;
  168. margin: 0;
  169. margin-bottom: 12px;
  170. padding-top: 6px;
  171. clear: both;
  172. }
  173. dd {
  174. display: none;
  175. overflow: hidden;
  176. text-overflow: ellipsis;
  177. width: 90%;
  178. padding: 0;
  179. padding-top: 2px;
  180. padding-bottom: 2px;
  181. padding-left: 20px;
  182. margin: 0;
  183. margin-bottom: 1px;
  184. background-repeat: no-repeat;
  185. background-position: center left;
  186. }
  187. dl dd:nth-child(-n+10) {
  188. display: block;
  189. }
  190. .document {
  191. text-overflow: ellipsis;
  192. width: 100%;
  193. white-space: nowrap;
  194. }
  195. .added {
  196. background-image: url('<!-- $document-added-background-image -->');
  197. }
  198. .deleted {
  199. background-image: url('<!-- $document-deleted-background-image -->');
  200. }
  201. .edited {
  202. background-image: url('<!-- $document-edited-background-image -->');
  203. }
  204. .moved {
  205. background-image: url('<!-- $document-moved-background-image -->');
  206. }
  207. .no-buddy-icon {
  208. position: relative;
  209. top: 0;
  210. left: 0;
  211. float: left;
  212. margin-right: 12px;
  213. width: 48px;
  214. background-image: url('<!-- $no-buddy-icon-background-image -->');
  215. background-repeat: no-repeat;
  216. background-position: top center;
  217. }
  218. .buddy-icon {
  219. width: 48px;
  220. height: 48px;
  221. }
  222. .comments {
  223. width: 100%;
  224. font-size: 90%;
  225. margin-bottom: 9px;
  226. }
  227. .comment-author {
  228. font-size: 90%;
  229. font-weight: bold;
  230. margin: 0;
  231. margin-bottom: 9px;
  232. background-repeat: no-repeat;
  233. background-position: bottom left;
  234. background-size: 24px;
  235. height: 24px;
  236. padding-left: 30px;
  237. line-height: 24px;
  238. }
  239. .comment-timestamp {
  240. color: <!-- $secondary-font-color -->;
  241. text-align: right;
  242. }
  243. .comment-button {
  244. float:right;
  245. margin-top: 6px;
  246. }
  247. .comment-textarea {
  248. box-sizing: border-box;
  249. -webkit-box-sizing: border-box;
  250. width: 100%;
  251. height: 3em;
  252. padding-bottom: 6px;
  253. }
  254. .comments-section {
  255. box-sizing: border-box;
  256. -webkit-box-sizing: border-box;
  257. width: 100%;
  258. }
  259. .comments-wrapper {
  260. box-sizing: border-box;
  261. -webkit-box-sizing: border-box;
  262. width: 100%;
  263. margin-top: 12px;
  264. }
  265. .comment-text {
  266. padding-bottom: 15px;
  267. }
  268. </style>
  269. </head>
  270. <body>
  271. <!-- $event-log-content -->
  272. </body>
  273. </html>