-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
153 lines (127 loc) · 5.35 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script type="text/javascript" src="http://static.stackmob.com/js/json2-min.js"></script>
<script type="text/javascript" src="http://static.stackmob.com/js/underscore-1.3.0-min.js"></script>
<script type="text/javascript" src="http://static.stackmob.com/js/backbone-0.5.3-min.js"></script>
<script type="text/javascript" src="http://static.stackmob.com/js/stackmob-js-0.1.1-min.js"></script>
<script type="text/javascript">
/* <![CDATA[ */
//Remember to initialize StackMob before you use other StackMob functionality.
StackMob.init({
appName: 'wikidiscussion', //find this at https://www.stackmob.com/platform/account/apps/reset
clientSubdomain: 'ozfraier',
apiVersion: 0
});
/* ]]> */
</script>
</head>
<body>
<script type="text/javascript">
//Define your user by initializing StackMob.User with your JSON.
var user = new StackMob.User({ username: 'Oz', password: 'Oz', profession:'admin' });
//Creates the user and saves it to StackMob's database asynchronously
user.create();
user.login(false, {
success: function() {
//successful login! no request body is returned.
//StackMob sets an encrypted cookie client side with the logged in information.
//On each request, StackMob decrypts the logged in information to make sure the request is valid.
},
error: function() {
//failed login attempt
//Let's logout a user
user.logout();
}
});
if (Stackmob.isLoggedIn() == false) {
alert ("you're not logged in") ;
}
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Backbone Demo: Todos in CoffeeScript</title>
<link href="todos.css" media="all" rel="stylesheet" type="text/css"/>
<script src="lib/json2.js"></script>
<!-- <script src="lib/jquery-1.5.js"></script> -->
<script src="lib/underscore-1.1.6.js"></script>
<script src="lib/backbone.js"></script>
<script src="lib/backbone-localstorage.js"></script>
<script src="todos.js"></script>
<meta charset="UTF-8" />
</head>
<body>
<!-- Todo App Interface -->
<div id="todoapp">
<div class="title">
<h1>Wikidiscussion (in development)</h1>
<h3>in CoffeeScript</h3>
</div>
<div <class="content">
<h4> הוראות: כתבו טענה חדשה, הצביעו על טענה קיימת, או הוסיפו לטענה קיימת טענה תומכת או מתנגדת בתיבה המתאימה מתחתיה.
1.המערכת לא עובדת עם רווחים, לכן במקום לכתוב "ברווזים הם צהובים" צריך לכתוב "ברווזים-הם-צהובים"
<br>
2.יש ללחוץ על רענון אחרי כל פעולה, אחרת יש תקלות <h4>
<div id="create-todo">
<input id="new-todo" placeholder="Enter proposition" type="text" />
<span class="ui-tooltip-top" style="display:none;">Press Enter to save this task</span>
</div>
<div id="todos">
<ul id="todo-list"></ul>
</div>
<div id="todo-stats"></div>
</div>
</div>
<div id="credits">
Wikidiscussion created by Oz Fraier with thanks to Udi Bauman of <a href="http://ekkli.com">ekkli.com</a>
</div>
<!-- Templates -->
<script type="text/template" id="item-template">
<div class="todo <%= done ? 'done' : '' %>">
<div class="display">
<input class="check" type="checkbox" <%= done ? 'checked="checked"' : '' %> />
<div class="todo-content"></div>
<span class="todo-destroy"></span>
<div class= "agree"><button style="background-color:lightgreen">agree</button> </div>
<div class= "disagree"><button style="background-color:salmon">disagree</button></div>
<div class= "abstained"><button style="background-color:lightyellow">abstain</button> </div>
<input class="negative" type="text" placeholder="enter refuting proposition" />
<ul class ="negative-list"> </ul>
<input class="positive" type="text" placeholder="enter supporting propositon" />
<div class="edit">
<input class="todo-input" type="text" value="" />
</div>
</div>
</script>
<script type="text/template" id="stats-template">
<% if (total) { %>
<span class="todo-count">
<span class="number"><%= remaining %></span>
<span class="word"><%= remaining == 1 ? 'item' : 'items' %></span> left.
</span>
<% } %>
<% if (done) { %>
<span class="todo-clear">
<a href="#">
Clear <span class="number-done"><%= done %></span>
completed <span class="word-done"><%= done == 1 ? 'item' : 'items' %></span>
</a>
</span>
<% } %>
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-8200340-12']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>