Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.19 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3.  
  4. <head>
  5. <meta charset="utf-8" />
  6. <title>Messages</title>
  7. <link rel="stylesheet" type="text/css" href="css/messages.css" />
  8. <script
  9. src="https://code.jquery.com/jquery-3.1.1.min.js"
  10. integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
  11. crossorigin="anonymous"></script>
  12. <script src="scripts/app.js"></script>
  13. </head>
  14.  
  15. <body onload="startApp()">
  16.  
  17. <div id="app">
  18. <header id="menu">
  19. <a href="#" class="anonymous" id="linkMenuAppHome">Home</a>
  20. <a href="#" class="anonymous" id="linkMenuLogin">Login</a>
  21. <a href="#" class="anonymous" id="linkMenuRegister">Register</a>
  22.  
  23. <a href="#" class="useronly" id="linkMenuUserHome">Home</a>
  24. <a href="#" class="useronly" id="linkMenuMyMessages">My Messages</a>
  25. <a href="#" class="useronly" id="linkMenuArchiveSent">Archive (Sent)</a>
  26. <a href="#" class="useronly" id="linkMenuSendMessage">Send Message</a>
  27. <a href="#" class="useronly" id="linkMenuLogout">Logout</a>
  28.  
  29. <span class="useronly" id="spanMenuLoggedInUser">Welcome, {user}!</span>
  30. </header>
  31.  
  32. <main>
  33. <div id="loadingBox">Loading ...</div>
  34.  
  35. <div id="infoBox">Info</div>
  36.  
  37. <div id="errorBox">Error</div>
  38.  
  39. <section id="viewAppHome">
  40. <h1>Welcome</h1>
  41. Welcome to our messaging system.
  42. </section>
  43.  
  44. <section id="viewLogin">
  45. <h1>Please login</h1>
  46. <form id="formLogin">
  47. <label>
  48. <div>Username:</div>
  49. <input type="text" name="username" id="loginUsername" required />
  50. </label>
  51. <label>
  52. <div>Password:</div>
  53. <input type="password" name="password" id="loginPasswd" required />
  54. </label>
  55. <div>
  56. <input type="submit" value="Login" />
  57. </div>
  58. </form>
  59. </section>
  60.  
  61. <section id="viewRegister">
  62. <h1>Please register here</h1>
  63. <form id="formRegister">
  64. <label>
  65. <div>Username:</div>
  66. <input type="text" name="username" id="registerUsername" required />
  67. </label>
  68. <label>
  69. <div>Password:</div>
  70. <input type="password" name="password" id="registerPasswd" required />
  71. </label>
  72. <label>
  73. <div>Name:</div>
  74. <input type="text" name="name" id="registerName" />
  75. </label>
  76. <div>
  77. <input type="submit" value="Register" />
  78. </div>
  79. </form>
  80. </section>
  81.  
  82. <section id="viewUserHome">
  83. <h1 id="viewUserHomeHeading">Welcome, {user}!</h1>
  84. <a href="#" id="linkUserHomeMyMessages">My Messages</a>
  85. <a href="#" id="linkUserHomeSendMessage">Send Message</a>
  86. <a href="#" id="linkUserHomeArchiveSent">Archive (Sent)</a>
  87. </section>
  88.  
  89. <section id="viewMyMessages">
  90. <h1>My Messages</h1>
  91. <div class="messages" id="myMessages">
  92. <table>
  93. <thead>
  94. <tr>
  95. <th>From</th>
  96. <th>Message</th>
  97. <th>Date Received</th>
  98. </tr>
  99. </thead>
  100. <tbody>
  101. <tr>
  102. <td>Maria Ivanova (maria)</td>
  103. <td>Hi, Peter</td>
  104. <td>29.11.2016 9:43:18</td>
  105. </tr>
  106. <tr>
  107. <td>todor</td>
  108. <td>Pesho, how are you?</td>
  109. <td>29.11.2016 11:53:44</td>
  110. </tr>
  111. <tr>
  112. <td>Maria Ivanova (maria)</td>
  113. <td>Peter, please reply.</td>
  114. <td>1.11.2016 14:08:03</td>
  115. </tr>
  116. <tr>
  117. <td>Marin Marinov</td>
  118. <td>Peter, I am Marin from Varna.</td>
  119. <td>1.03.2015 4:18:43</td>
  120. </tr>
  121. <tr>
  122. <td>Kiril (kiro)</td>
  123. <td>Happy new year!</td>
  124. <td>1.1.2017 0:00:01</td>
  125. </tr>
  126. <!-- TODO: more messages will come here -->
  127. </tbody>
  128. </table>
  129. </div>
  130. </section>
  131.  
  132. <section id="viewArchiveSent">
  133. <h1>Archive (Sent Messages)</h1>
  134. <div class="messages" id="sentMessages">
  135. <table>
  136. <thead>
  137. <tr>
  138. <th>To</th>
  139. <th>Message</th>
  140. <th>Date Sent</th>
  141. <th>Actions</th>
  142. </tr>
  143. </thead>
  144. <tbody>
  145. <tr>
  146. <td>peter</td>
  147. <td>Hi, Peter</td>
  148. <td>29.11.2016 9:43:18</td>
  149. <td><button>Delete</button></td>
  150. </tr>
  151. <tr>
  152. <td>todor</td>
  153. <td>Todor, how are you?</td>
  154. <td>3.07.2016 8:06:03</td>
  155. <td><button>Delete</button></td>
  156. </tr>
  157. <tr>
  158. <td>maria</td>
  159. <td>Party this evening?</td>
  160. <td>9.06.2016 19:55:59</td>
  161. <td><button>Delete</button></td>
  162. </tr>
  163. <!-- TODO: more messages will come here -->
  164. </tbody>
  165. </table>
  166. </div>
  167. </section>
  168.  
  169. <section id="viewSendMessage">
  170. <h1>Send Message</h1>
  171. <form id="formSendMessage">
  172. <div>Recipient:</div>
  173. <div>
  174. <select name="recipient" required id="msgRecipientUsername">
  175. <option value="maria">Maria Georgieva (maria)</option>
  176. <option value="guest">guest</option>
  177. <option value="peter">Peter Ivanova (peter)</option>
  178. <option value="todor">todor</option>
  179. <!-- TODO: more users will come here -->
  180. </select>
  181. </div>
  182. <div>Message Text:</div>
  183. <div><input type="text" name="text" required id="msgText" /></div>
  184. <div><input type="submit" value="Send" /></div>
  185. </form>
  186. </section>
  187. </main>
  188.  
  189. <footer>Messaging System - Simple SPA Application</footer>
  190. </div>
  191.  
  192. </body>
  193.  
  194. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement