@zzish/sdk-js 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/socket.html ADDED
@@ -0,0 +1,84 @@
1
+ <!doctype html>
2
+
3
+ <html lang="en">
4
+ <head>
5
+ <meta charset="utf-8">
6
+
7
+ <title>Zzish Quick Javascript Client SDK</title>
8
+
9
+ <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
10
+ <script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
11
+
12
+ <style>
13
+ .help {
14
+ display: none;
15
+ }
16
+ </style>
17
+
18
+ <script src="zzish.js"></script>
19
+ <script>
20
+ var activityId;
21
+ var init = false;
22
+
23
+ function initApp() {
24
+ if (!init) {
25
+ if ($("#appId").val()!="") {
26
+ var initParams = $("#appId").val();
27
+ Zzish.init(initParams);
28
+ init = true;
29
+ console.log("App Initalized with id",$("#appId").val());
30
+ }
31
+ else {
32
+ alert ("Please enter your API KEY from http://www.zzish.co.uk/developer/")
33
+ }
34
+ }
35
+ return init;
36
+ }
37
+
38
+ function opencallback() {
39
+ console.log("CONNECTED");
40
+ }
41
+
42
+ function errorcallback(err) {
43
+ console.log("ERR", err);
44
+ }
45
+
46
+ function messagecallback(message) {
47
+ console.log("CONNECTED", message);
48
+ }
49
+
50
+
51
+ function connect() {
52
+ if (initApp()) {
53
+ Zzish.connectToSocket = function(opencallback, errorcallback, messagecallback);
54
+ }
55
+ else {
56
+ alert ("Please init with your APP_ID from http://www.zzish.co.uk/developer/")
57
+ }
58
+ }
59
+
60
+ function postMessage() {
61
+ if (initApp()) {
62
+ Zzish.postToSocket($("#pmessage").val());
63
+ }
64
+ else {
65
+ alert ("Please init with your APP_ID from http://www.zzish.co.uk/developer/")
66
+ }
67
+ }
68
+ </script>
69
+ </head>
70
+
71
+ <body>
72
+ <input type="text" id="appId" name="appId" placeholder="Your API Key" value="" size="40"/><br/>
73
+
74
+ <h1>Connect</h1>
75
+ <input type="button" onclick="connect()" value="Connect" id="connectButton"/><br/>
76
+ <span class="help">This is a simple name that will be shown on the teacher dashboard.</span>
77
+ <br/>
78
+ <h1>Post</h1>
79
+ <textarea id="pmessage" name="pmessage" placeholder="JSON Message to Post" value="">
80
+ </textarea><br/>
81
+ <input type="button" onclick="postMessage()" value="POST" id="postMessageButton"/><br/>
82
+
83
+ </body>
84
+ </html>
@@ -0,0 +1,70 @@
1
+ .highlight .hll { background-color: #ffffcc }
2
+ .highlight { background: #f0f3f3; }
3
+ .highlight .c { color: #0099FF; font-style: italic } /* Comment */
4
+ .highlight .err { color: #AA0000; background-color: #FFAAAA } /* Error */
5
+ .highlight .k { color: #006699; font-weight: bold } /* Keyword */
6
+ .highlight .o { color: #555555 } /* Operator */
7
+ .highlight .cm { color: #0099FF; font-style: italic } /* Comment.Multiline */
8
+ .highlight .cp { color: #009999 } /* Comment.Preproc */
9
+ .highlight .c1 { color: #0099FF; font-style: italic } /* Comment.Single */
10
+ .highlight .cs { color: #0099FF; font-weight: bold; font-style: italic } /* Comment.Special */
11
+ .highlight .gd { background-color: #FFCCCC; border: 1px solid #CC0000 } /* Generic.Deleted */
12
+ .highlight .ge { font-style: italic } /* Generic.Emph */
13
+ .highlight .gr { color: #FF0000 } /* Generic.Error */
14
+ .highlight .gh { color: #003300; font-weight: bold } /* Generic.Heading */
15
+ .highlight .gi { background-color: #CCFFCC; border: 1px solid #00CC00 } /* Generic.Inserted */
16
+ .highlight .go { color: #AAAAAA } /* Generic.Output */
17
+ .highlight .gp { color: #000099; font-weight: bold } /* Generic.Prompt */
18
+ .highlight .gs { font-weight: bold } /* Generic.Strong */
19
+ .highlight .gu { color: #003300; font-weight: bold } /* Generic.Subheading */
20
+ .highlight .gt { color: #99CC66 } /* Generic.Traceback */
21
+ .highlight .kc { color: #006699; font-weight: bold } /* Keyword.Constant */
22
+ .highlight .kd { color: #006699; font-weight: bold } /* Keyword.Declaration */
23
+ .highlight .kn { color: #006699; font-weight: bold } /* Keyword.Namespace */
24
+ .highlight .kp { color: #006699 } /* Keyword.Pseudo */
25
+ .highlight .kr { color: #006699; font-weight: bold } /* Keyword.Reserved */
26
+ .highlight .kt { color: #007788; font-weight: bold } /* Keyword.Type */
27
+ .highlight .m { color: #FF6600 } /* Literal.Number */
28
+ .highlight .s { color: #CC3300 } /* Literal.String */
29
+ .highlight .na { color: #330099 } /* Name.Attribute */
30
+ .highlight .nb { color: #336666 } /* Name.Builtin */
31
+ .highlight .nc { color: #00AA88; font-weight: bold } /* Name.Class */
32
+ .highlight .no { color: #336600 } /* Name.Constant */
33
+ .highlight .nd { color: #9999FF } /* Name.Decorator */
34
+ .highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */
35
+ .highlight .ne { color: #CC0000; font-weight: bold } /* Name.Exception */
36
+ .highlight .nf { color: #CC00FF } /* Name.Function */
37
+ .highlight .nl { color: #9999FF } /* Name.Label */
38
+ .highlight .nn { color: #00CCFF; font-weight: bold } /* Name.Namespace */
39
+ .highlight .nt { color: #330099; font-weight: bold } /* Name.Tag */
40
+ .highlight .nv { color: #003333 } /* Name.Variable */
41
+ .highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */
42
+ .highlight .w { color: #bbbbbb } /* Text.Whitespace */
43
+ .highlight .mf { color: #FF6600 } /* Literal.Number.Float */
44
+ .highlight .mh { color: #FF6600 } /* Literal.Number.Hex */
45
+ .highlight .mi { color: #FF6600 } /* Literal.Number.Integer */
46
+ .highlight .mo { color: #FF6600 } /* Literal.Number.Oct */
47
+ .highlight .sb { color: #CC3300 } /* Literal.String.Backtick */
48
+ .highlight .sc { color: #CC3300 } /* Literal.String.Char */
49
+ .highlight .sd { color: #CC3300; font-style: italic } /* Literal.String.Doc */
50
+ .highlight .s2 { color: #CC3300 } /* Literal.String.Double */
51
+ .highlight .se { color: #CC3300; font-weight: bold } /* Literal.String.Escape */
52
+ .highlight .sh { color: #CC3300 } /* Literal.String.Heredoc */
53
+ .highlight .si { color: #AA0000 } /* Literal.String.Interpol */
54
+ .highlight .sx { color: #CC3300 } /* Literal.String.Other */
55
+ .highlight .sr { color: #33AAAA } /* Literal.String.Regex */
56
+ .highlight .s1 { color: #CC3300 } /* Literal.String.Single */
57
+ .highlight .ss { color: #FFCC33 } /* Literal.String.Symbol */
58
+ .highlight .bp { color: #336666 } /* Name.Builtin.Pseudo */
59
+ .highlight .vc { color: #003333 } /* Name.Variable.Class */
60
+ .highlight .vg { color: #003333 } /* Name.Variable.Global */
61
+ .highlight .vi { color: #003333 } /* Name.Variable.Instance */
62
+ .highlight .il { color: #FF6600 } /* Literal.Number.Integer.Long */
63
+
64
+ .type-csharp .highlight .k { color: #0000FF }
65
+ .type-csharp .highlight .kt { color: #0000FF }
66
+ .type-csharp .highlight .nf { color: #000000; font-weight: normal }
67
+ .type-csharp .highlight .nc { color: #2B91AF }
68
+ .type-csharp .highlight .nn { color: #000000 }
69
+ .type-csharp .highlight .s { color: #A31515 }
70
+ .type-csharp .highlight .sc { color: #A31515 }
@@ -0,0 +1,425 @@
1
+ /*******************************************************************************
2
+ Slate Theme for GitHub Pages
3
+ by Jason Costello, @jsncostello
4
+ *******************************************************************************/
5
+
6
+ @import url(pygment_trac.css);
7
+
8
+ /*******************************************************************************
9
+ MeyerWeb Reset
10
+ *******************************************************************************/
11
+
12
+ html, body, div, span, applet, object, iframe,
13
+ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
14
+ a, abbr, acronym, address, big, cite, code,
15
+ del, dfn, em, img, ins, kbd, q, s, samp,
16
+ small, strike, strong, sub, sup, tt, var,
17
+ b, u, i, center,
18
+ dl, dt, dd, ol, ul, li,
19
+ fieldset, form, label, legend,
20
+ table, caption, tbody, tfoot, thead, tr, th, td,
21
+ article, aside, canvas, details, embed,
22
+ figure, figcaption, footer, header, hgroup,
23
+ menu, nav, output, ruby, section, summary,
24
+ time, mark, audio, video {
25
+ margin: 0;
26
+ padding: 0;
27
+ border: 0;
28
+ font: inherit;
29
+ vertical-align: baseline;
30
+ }
31
+
32
+ /* HTML5 display-role reset for older browsers */
33
+ article, aside, details, figcaption, figure,
34
+ footer, header, hgroup, menu, nav, section {
35
+ display: block;
36
+ }
37
+
38
+ ol, ul {
39
+ list-style: none;
40
+ }
41
+
42
+ table {
43
+ border-collapse: collapse;
44
+ border-spacing: 0;
45
+ }
46
+
47
+ /*******************************************************************************
48
+ Theme Styles
49
+ *******************************************************************************/
50
+
51
+ body {
52
+ box-sizing: border-box;
53
+ color:#373737;
54
+ background: #212121;
55
+ font-size: 16px;
56
+ font-family: 'Myriad Pro', Calibri, Helvetica, Arial, sans-serif;
57
+ line-height: 1.5;
58
+ -webkit-font-smoothing: antialiased;
59
+ }
60
+
61
+ h1, h2, h3, h4, h5, h6 {
62
+ margin: 10px 0;
63
+ font-weight: 700;
64
+ color:#222222;
65
+ font-family: 'Lucida Grande', 'Calibri', Helvetica, Arial, sans-serif;
66
+ letter-spacing: -1px;
67
+ }
68
+
69
+ h1 {
70
+ font-size: 36px;
71
+ font-weight: 700;
72
+ }
73
+
74
+ h2 {
75
+ padding-bottom: 10px;
76
+ font-size: 32px;
77
+ background: url('../images/bg_hr.png') repeat-x bottom;
78
+ }
79
+
80
+ h3 {
81
+ font-size: 24px;
82
+ }
83
+
84
+ h4 {
85
+ font-size: 21px;
86
+ }
87
+
88
+ h5 {
89
+ font-size: 18px;
90
+ }
91
+
92
+ h6 {
93
+ font-size: 16px;
94
+ }
95
+
96
+ p {
97
+ margin: 10px 0 15px 0;
98
+ }
99
+
100
+ footer p {
101
+ color: #f2f2f2;
102
+ }
103
+
104
+ a {
105
+ text-decoration: none;
106
+ color: #007edf;
107
+ text-shadow: none;
108
+
109
+ transition: color 0.5s ease;
110
+ transition: text-shadow 0.5s ease;
111
+ -webkit-transition: color 0.5s ease;
112
+ -webkit-transition: text-shadow 0.5s ease;
113
+ -moz-transition: color 0.5s ease;
114
+ -moz-transition: text-shadow 0.5s ease;
115
+ -o-transition: color 0.5s ease;
116
+ -o-transition: text-shadow 0.5s ease;
117
+ -ms-transition: color 0.5s ease;
118
+ -ms-transition: text-shadow 0.5s ease;
119
+ }
120
+
121
+ a:hover, a:focus {text-decoration: underline;}
122
+
123
+ footer a {
124
+ color: #F2F2F2;
125
+ text-decoration: underline;
126
+ }
127
+
128
+ em {
129
+ font-style: italic;
130
+ }
131
+
132
+ strong {
133
+ font-weight: bold;
134
+ }
135
+
136
+ img {
137
+ position: relative;
138
+ margin: 0 auto;
139
+ max-width: 739px;
140
+ padding: 5px;
141
+ margin: 10px 0 10px 0;
142
+ border: 1px solid #ebebeb;
143
+
144
+ box-shadow: 0 0 5px #ebebeb;
145
+ -webkit-box-shadow: 0 0 5px #ebebeb;
146
+ -moz-box-shadow: 0 0 5px #ebebeb;
147
+ -o-box-shadow: 0 0 5px #ebebeb;
148
+ -ms-box-shadow: 0 0 5px #ebebeb;
149
+ }
150
+
151
+ p img {
152
+ display: inline;
153
+ margin: 0;
154
+ padding: 0;
155
+ vertical-align: middle;
156
+ text-align: center;
157
+ border: none;
158
+ }
159
+
160
+ pre, code {
161
+ width: 100%;
162
+ color: #222;
163
+ background-color: #fff;
164
+
165
+ font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
166
+ font-size: 14px;
167
+
168
+ border-radius: 2px;
169
+ -moz-border-radius: 2px;
170
+ -webkit-border-radius: 2px;
171
+ }
172
+
173
+ pre {
174
+ width: 100%;
175
+ padding: 10px;
176
+ box-shadow: 0 0 10px rgba(0,0,0,.1);
177
+ overflow: auto;
178
+ }
179
+
180
+ code {
181
+ padding: 3px;
182
+ margin: 0 3px;
183
+ box-shadow: 0 0 10px rgba(0,0,0,.1);
184
+ }
185
+
186
+ pre code {
187
+ display: block;
188
+ box-shadow: none;
189
+ }
190
+
191
+ blockquote {
192
+ color: #666;
193
+ margin-bottom: 20px;
194
+ padding: 0 0 0 20px;
195
+ border-left: 3px solid #bbb;
196
+ }
197
+
198
+
199
+ ul, ol, dl {
200
+ margin-bottom: 15px
201
+ }
202
+
203
+ ul {
204
+ list-style-position: inside;
205
+ list-style: disc;
206
+ padding-left: 20px;
207
+ }
208
+
209
+ ol {
210
+ list-style-position: inside;
211
+ list-style: decimal;
212
+ padding-left: 20px;
213
+ }
214
+
215
+ dl dt {
216
+ font-weight: bold;
217
+ }
218
+
219
+ dl dd {
220
+ padding-left: 20px;
221
+ font-style: italic;
222
+ }
223
+
224
+ dl p {
225
+ padding-left: 20px;
226
+ font-style: italic;
227
+ }
228
+
229
+ hr {
230
+ height: 1px;
231
+ margin-bottom: 5px;
232
+ border: none;
233
+ background: url('../images/bg_hr.png') repeat-x center;
234
+ }
235
+
236
+ table {
237
+ border: 1px solid #373737;
238
+ margin-bottom: 20px;
239
+ text-align: left;
240
+ }
241
+
242
+ th {
243
+ font-family: 'Lucida Grande', 'Helvetica Neue', Helvetica, Arial, sans-serif;
244
+ padding: 10px;
245
+ background: #373737;
246
+ color: #fff;
247
+ }
248
+
249
+ td {
250
+ padding: 10px;
251
+ border: 1px solid #373737;
252
+ }
253
+
254
+ form {
255
+ background: #f2f2f2;
256
+ padding: 20px;
257
+ }
258
+
259
+ /*******************************************************************************
260
+ Full-Width Styles
261
+ *******************************************************************************/
262
+
263
+ .outer {
264
+ width: 100%;
265
+ }
266
+
267
+ .inner {
268
+ position: relative;
269
+ max-width: 640px;
270
+ padding: 20px 10px;
271
+ margin: 0 auto;
272
+ }
273
+
274
+ #forkme_banner {
275
+ display: block;
276
+ position: absolute;
277
+ top:0;
278
+ right: 10px;
279
+ z-index: 10;
280
+ padding: 10px 50px 10px 10px;
281
+ color: #fff;
282
+ background: url('../images/blacktocat.png') #0090ff no-repeat 95% 50%;
283
+ font-weight: 700;
284
+ box-shadow: 0 0 10px rgba(0,0,0,.5);
285
+ border-bottom-left-radius: 2px;
286
+ border-bottom-right-radius: 2px;
287
+ }
288
+
289
+ #header_wrap {
290
+ background: #212121;
291
+ background: -moz-linear-gradient(top, #373737, #212121);
292
+ background: -webkit-linear-gradient(top, #373737, #212121);
293
+ background: -ms-linear-gradient(top, #373737, #212121);
294
+ background: -o-linear-gradient(top, #373737, #212121);
295
+ background: linear-gradient(top, #373737, #212121);
296
+ }
297
+
298
+ #header_wrap .inner {
299
+ padding: 50px 10px 30px 10px;
300
+ }
301
+
302
+ #project_title {
303
+ margin: 0;
304
+ color: #fff;
305
+ font-size: 42px;
306
+ font-weight: 700;
307
+ text-shadow: #111 0px 0px 10px;
308
+ }
309
+
310
+ #project_tagline {
311
+ color: #fff;
312
+ font-size: 24px;
313
+ font-weight: 300;
314
+ background: none;
315
+ text-shadow: #111 0px 0px 10px;
316
+ }
317
+
318
+ #downloads {
319
+ position: absolute;
320
+ width: 210px;
321
+ z-index: 10;
322
+ bottom: -40px;
323
+ right: 0;
324
+ height: 70px;
325
+ background: url('../images/icon_download.png') no-repeat 0% 90%;
326
+ }
327
+
328
+ .zip_download_link {
329
+ display: block;
330
+ float: right;
331
+ width: 90px;
332
+ height:70px;
333
+ text-indent: -5000px;
334
+ overflow: hidden;
335
+ background: url(../images/sprite_download.png) no-repeat bottom left;
336
+ }
337
+
338
+ .tar_download_link {
339
+ display: block;
340
+ float: right;
341
+ width: 90px;
342
+ height:70px;
343
+ text-indent: -5000px;
344
+ overflow: hidden;
345
+ background: url(../images/sprite_download.png) no-repeat bottom right;
346
+ margin-left: 10px;
347
+ }
348
+
349
+ .zip_download_link:hover {
350
+ background: url(../images/sprite_download.png) no-repeat top left;
351
+ }
352
+
353
+ .tar_download_link:hover {
354
+ background: url(../images/sprite_download.png) no-repeat top right;
355
+ }
356
+
357
+ #main_content_wrap {
358
+ background: #f2f2f2;
359
+ border-top: 1px solid #111;
360
+ border-bottom: 1px solid #111;
361
+ }
362
+
363
+ #main_content {
364
+ padding-top: 40px;
365
+ }
366
+
367
+ #footer_wrap {
368
+ background: #212121;
369
+ }
370
+
371
+
372
+
373
+ /*******************************************************************************
374
+ Small Device Styles
375
+ *******************************************************************************/
376
+
377
+ @media screen and (max-width: 480px) {
378
+ body {
379
+ font-size:14px;
380
+ }
381
+
382
+ #downloads {
383
+ display: none;
384
+ }
385
+
386
+ .inner {
387
+ min-width: 320px;
388
+ max-width: 480px;
389
+ }
390
+
391
+ #project_title {
392
+ font-size: 32px;
393
+ }
394
+
395
+ h1 {
396
+ font-size: 28px;
397
+ }
398
+
399
+ h2 {
400
+ font-size: 24px;
401
+ }
402
+
403
+ h3 {
404
+ font-size: 21px;
405
+ }
406
+
407
+ h4 {
408
+ font-size: 18px;
409
+ }
410
+
411
+ h5 {
412
+ font-size: 14px;
413
+ }
414
+
415
+ h6 {
416
+ font-size: 12px;
417
+ }
418
+
419
+ code, pre {
420
+ min-width: 320px;
421
+ max-width: 480px;
422
+ font-size: 11px;
423
+ }
424
+
425
+ }
package/success.html ADDED
@@ -0,0 +1,11 @@
1
+ <!doctype html>
2
+
3
+ <html lang="en">
4
+ <head>
5
+ <meta charset="utf-8">
6
+ <title>Zzish Login Success</title>
7
+ </head>
8
+
9
+ <body>
10
+ </body>
11
+ </html>