Commit 7294c001649f0faefe0b3b80f18bbc65a7e17f3b
Adding more variables to C object.
- index.html 85 -----------------------------------------++++++++++++++++++++++++++++++++++++++++++++
| | | | 1 | <html> | 1 | <html> |
---|
2 | <head> | 2 | <head> |
---|
3 | <link rel="stylesheet" | 3 | <link rel="stylesheet" |
---|
4 | href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" | | href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" |
---|
5 | type="text/css" media="screen" /> | | type="text/css" media="screen" /> |
---|
| | 4 | href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" | | | 5 | type="text/css" media="screen" /> |
---|
6 | </head> | 6 | </head> |
---|
7 | <body class="container"> | 7 | <body class="container"> |
---|
8 | <p>Comment below</p> | 8 | <p>Comment below</p> |
---|
9 | <div id="comments"> | | <div id="comments"> |
---|
| | 9 | <div id="comment-container"> | | | 10 | <div id="comments"> |
---|
10 | | 11 | |
---|
11 | </div> | | </div> |
---|
| | 12 | </div> | 12 | | 13 | |
---|
13 | <div id="commented"> | | <div id="commented"> |
---|
| | 14 | <div id="commented"> | 14 | | 15 | |
---|
15 | </div> | | </div> |
---|
16 | <script type="text/template" id="commented-template"> | | <script type="text/template" id="commented-template"> |
---|
17 | <div class="comment"> | | <div class="comment"> |
---|
18 | <div id=<%= id %> replyTo=<%= how.replyTo %>><%= how.comment %></div> | | <div id=<%= id %> replyTo=<%= how.replyTo %>><%= how.comment %></div> |
---|
19 | <button class="btn btn-primary" for=<%= id %>>Reply</button> | | <button class="btn btn-primary" for=<%= id %>>Reply</button> |
---|
20 | </div> | 16 | </div> |
---|
21 | </script> | | </script> |
---|
22 | <script type="text/template" id="comment-template"> | | <script type="text/template" id="comment-template"> |
---|
23 | <div class="new-comment"> | | <div class="new-comment"> |
---|
24 | <textarea class="form-control"><%= how.comment %></textarea> | | <textarea class="form-control"><%= how.comment %></textarea> |
---|
25 | <button class="btn btn-primary btn-danger cancel">Cancel</button> | | <button class="btn btn-primary btn-danger cancel">Cancel</button> |
---|
26 | <button class="btn btn-primary save">Save</button> | | <button class="btn btn-primary save">Save</button> |
---|
27 | </div> | | </div> |
---|
28 | </script> | | </script> |
---|
29 | <div class="modal fade" id="loginModal" tabindex="-1" role="dialog" aria-labelledby="ModalLabel" aria-hidden="true"> | | <div class="modal fade" id="loginModal" tabindex="-1" role="dialog" aria-labelledby="ModalLabel" aria-hidden="true"> |
---|
30 | <div class="modal-dialog"> | | <div class="modal-dialog"> |
---|
31 | <div class="modal-content"> | | <div class="modal-content"> |
---|
32 | <div class="modal-header"> | | <div class="modal-header"> |
---|
33 | <h4 class="modal-title" id="ModalLabel">Sign in!</h4> | | <h4 class="modal-title" id="ModalLabel">Sign in!</h4> |
---|
34 | </div> | | </div> |
---|
35 | <div class="modal-body"> | | <div class="modal-body"> |
---|
36 | <div class="form-group"> | | <div class="form-group"> |
---|
37 | <label class="sr-only" for="username">Username</label> | | <label class="sr-only" for="username">Username</label> |
---|
38 | <input type="text" class="form-control" id="username" placeholder="Enter username"> | | <input type="text" class="form-control" id="username" placeholder="Enter username"> |
---|
| | 17 | <script type="text/template" id="commented-template"> | | | 18 | <div class="comment"> |
---|
| | 19 | <div id=<%= id %> replyTo=<%= how.replyTo %>><%= how.comment %></div> |
---|
| | 20 | <button class="btn btn-primary" for=<%= id %>>Reply</button> |
---|
| | 21 | </div> |
---|
| | 22 | </script> |
---|
| | 23 | <script type="text/template" id="comment-template"> |
---|
| | 24 | <div class="new-comment"> |
---|
| | 25 | <textarea class="form-control"><%= how.comment %></textarea> |
---|
| | 26 | <button class="btn btn-primary btn-danger cancel">Cancel</button> |
---|
| | 27 | <button class="btn btn-primary save">Save</button> |
---|
| | 28 | </div> |
---|
| | 29 | </script> |
---|
| | 30 | <div class="modal fade" id="loginModal" tabindex="-1" role="dialog" aria-labelledby="ModalLabel" aria-hidden="true"> |
---|
| | 31 | <div class="modal-dialog"> |
---|
| | 32 | <div class="modal-content"> |
---|
| | 33 | <div class="modal-header"> |
---|
| | 34 | <h4 class="modal-title" id="ModalLabel">Sign in!</h4> |
---|
39 | </div> | 35 | </div> |
---|
40 | <div class="form-group"> | | <div class="form-group"> |
---|
41 | <label class="sr-only" for="password">Password</label> | | <label class="sr-only" for="password">Password</label> |
---|
42 | <input type="password" class="form-control" id="password" placeholder="Password"> | | <input type="password" class="form-control" id="password" placeholder="Password"> |
---|
| | 36 | <div class="modal-body"> | | | 37 | <div class="form-group"> |
---|
| | 38 | <label class="sr-only" for="username">Username</label> |
---|
| | 39 | <input type="text" class="form-control" id="username" placeholder="Enter username"> |
---|
| | 40 | </div> |
---|
| | 41 | <div class="form-group"> |
---|
| | 42 | <label class="sr-only" for="password">Password</label> |
---|
| | 43 | <input type="password" class="form-control" id="password" placeholder="Password"> |
---|
| | 44 | </div> |
---|
43 | </div> | 45 | </div> |
---|
| | 46 | <div class="modal-footer"> |
---|
| | 47 | <button type="button" class="btn btn-default" |
---|
| | 48 | data-dismiss="modal">Close</button> |
---|
| | 49 | <button type="button" id="saveButton" class="btn btn-primary" |
---|
| | 50 | data-dismiss="modal">Login</button> |
---|
| | 51 | </div> |
---|
44 | </div> | 52 | </div> |
---|
45 | <div class="modal-footer"> | | <div class="modal-footer"> |
---|
46 | <button type="button" class="btn btn-default" | | <button type="button" class="btn btn-default" |
---|
47 | data-dismiss="modal">Close</button> | | data-dismiss="modal">Close</button> |
---|
48 | <button type="button" id="saveButton" class="btn btn-primary" | | <button type="button" id="saveButton" class="btn btn-primary" |
---|
49 | data-dismiss="modal">Login</button> | | data-dismiss="modal">Login</button> |
---|
50 | </div> | | </div> |
---|
51 | </div> | 53 | </div> |
---|
52 | </div> | 54 | </div> |
---|
53 | <script type="text/javascript" | 55 | <script type="text/javascript" |
---|
54 | src="//code.jquery.com/jquery-1.11.0.min.js"></script> | | src="//code.jquery.com/jquery-1.11.0.min.js"></script> |
---|
| | 56 | src="//code.jquery.com/jquery-1.11.0.min.js"></script> | 55 | <script type="text/javascript" | 57 | <script type="text/javascript" |
---|
56 | src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script> | | src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script> |
---|
| | 58 | src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script> | 57 | <script type="text/javascript"> | 59 | <script type="text/javascript"> |
---|
58 | window.C = window.C || {}; | 60 | window.C = window.C || {}; |
---|
59 | window.onload = function(){ | 61 | window.onload = function(){ |
---|
60 | C.what = "swaracomment"; | 62 | C.what = "swaracomment"; |
---|
61 | C.url = "http://127.0.0.1:5001"; | 63 | C.url = "http://127.0.0.1:5001"; |
---|
| | 64 | C.auth = "/authenticate"; |
---|
62 | C.sweet= "/sweets"; | 65 | C.sweet= "/sweets"; |
---|
63 | C.get = "/sweets/q"; | 66 | C.get = "/sweets/q"; |
---|
64 | C.init(); } | 67 | C.init(); } |
---|
65 | </script> | 68 | </script> |
---|
66 | <script type="text/javascript" src="http://underscorejs.org/underscore-min.js"></script> | | <script type="text/javascript" src="http://underscorejs.org/underscore-min.js"></script> |
---|
67 | <script type="text/javascript" src="http://backbonejs.org/backbone-min.js"></script> | | <script type="text/javascript" src="http://backbonejs.org/backbone-min.js"></script> |
---|
| | 69 | <script type="text/javascript" src="http://underscorejs.org/underscore.js"></script> | | | 70 | <script type="text/javascript" src="http://backbonejs.org/backbone.js"></script> |
---|
68 | <script type="text/javascript" src="app.js"></script> | 71 | <script type="text/javascript" src="app.js"></script> |
---|
69 | | 72 | |
---|
70 | </body> | 73 | </body> |
---|