-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
226 lines (193 loc) · 5.95 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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="handheldfriendly" content="true" />
<meta name="mobileoptimized" content="width" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="Hello.js client side OAuth2 SDK profile SSL demo via MobileSiteOS!" />
<meta name="keywords" content="OAuth2, hellojs, OAuth2 login, javascript oauth2" />
<meta name="author" content="Dwight Vietzke" />
<title>Hello.js Demo</title>
<style type="text/css">
/*
* Note: Using an external file is fine, but it is best to leave this css here!
* This prevents a "blank page" showing on slow connections.
*/
html, body, table, div, article, section, fieldset {
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
}
html, body {
background-color: #A1A1A1;
}
body {
background-image: url(../mobilesiteos/images/grid_bg.png);
background-repeat: repeat-x;
}
#body {
display: none;
visibility: hidden;
}
/* Std MSOS CSS: notify popup */
#notify_container {
position: absolute;
width: 18em;
z-index: 9999;
}
.notify {
background-color: #111;
border-radius: 0.4em;
margin-bottom: 1em;
opacity: 0.9;
padding: 1.2em;
}
.notify:hover {
opacity: 1;
}
.notify_title {
font-weight: bold;
}
.notify_title,
.notify_msg {
color: #FFF;
font-size: larger;
margin-bottom: 0.4em;
padding: 0 0.4em;
}
.notify > i {
float: left;
}
.notify_display > button {
float: right;
}
.notify > i.info {
color: blue;
}
.notify > i.warning {
color: yellow;
}
.notify > i.error {
color: red;
}
.notify > i.success {
color: green;
}
.notify > i.loading {
color: orange;
}
.notify {
-webkit-box-shadow: 0 0 12px #999;
box-shadow: 0 0 12px #999;
}
.notify:hover {
-webkit-box-shadow: 0 0 12px #000;
box-shadow: 0 0 12px #000;
}
/* Std MSOS CSS: No JavaScript message */
#no_javascript {
background-color: #FFF;
border: 2px solid #999;
border-radius: 0.4em;
margin-left: auto;
margin-right: auto;
width: 60%;
}
#no_javascript > i {
color: red;
}
#social_login {
width: 400px;
}
#social_login > ul > li {
margin-top: 0.5em;
}
#social_login > ul > li > button {
width: 380px;
text-align: left;
font-size: medium;
}
</style>
<link rel="icon" href="../mobilesiteos/images/favicon.png" type="image/png" />
<link rel="shortcut icon" href="./favicon.ico" />
<script src="../mobilesiteos/msos/base.min.js"></script>
<script defer src="../mobilesiteos/config.js"></script>
</head>
<body>
<noscript>
<h3 id="no_javascript">
<i class="fa fa-ban"></i> We're sorry, but this site requires JavaScript be enabled!
</h3>
</noscript>
<div id='body'>
<div id="marquee">
<ins id="google_ad" class="adsbygoogle osm-responsive-2014" style="display:inline-block" data-ad-client="ca-pub-0581487774111572" data-ad-slot="2083707378"></ins>
<h1 id='branding'>OpenSiteMobile</h1>
<div id='slogan'>Open source software for the mobile web!</div>
</div>
<div id="header" class="msos_navbar">
<ul><li style="display: inline;"><a style="float: left;" class="btn btn-msos" href="../" title="Site index page"><i class="fa fa-home"></i></a></li></ul>
<ul>
<li style="display: inline;"><a style="float: right;" class="btn btn-msos" href="https://github.com/OpenSiteMobile2/mobilesiteos/" title="Module code url"><i class="fa fa-external-link"></i> Module Code</a></li>
<li style="display: inline;"><a style="float: right;" class="btn btn-msos" href="https://github.com/OpenSiteMobile2/hellojs/" title="Page code url"><i class="fa fa-external-link"></i> Page Code</a></li>
</ul>
</div>
<h2>Demo hello.api('/me')</h2>
<div class="pgrph well">
This is a test page for our adapted version of the HelloJS (http://adodson.com/hello.js/) client side Javascript
SDK for making OAuth2 authenticated logins. Our version is an OAuth2 only adaptation, which is also streamlined for
just our needs.
</div>
<div id="social_login" class="well">
<ul>
<li><button class='btn btn-msos' id='google' > google</button></li>
<li><button class='btn btn-msos' id='facebook' > facebook</button></li>
<li><button class='btn btn-msos' id='windows' > windows</button></li>
<li><button class='btn btn-msos' id='instagram' > instagram</button></li>
<li><button class='btn btn-msos' id='foursquare'> foursquare</button></li>
</ul>
</div>
<textarea id="event_log" class="msos_display msos_height msos_width"></textarea>
</div> <!-- end 'body' div -->
<script>
msos.onload_func_pre.push(
function () {
"use strict";
// Load all the interface modules you use above
msos.require("hello.to.facebook");
msos.require("hello.to.windows");
msos.require("hello.to.google");
msos.require("hello.to.instagram");
msos.require("hello.to.foursquare");
}
);
msos.onload_functions.push(
function () {
"use strict";
var temp_hm = 'Page: index.html -> ',
db = msos.config.debug,
$event_log = jQuery('#event_log');
msos.console.info(temp_hm + 'loaded!');
$event_log.text("Debugging Output:\n");
function log(name, obj) {
$event_log.text($event_log.text() + "\n" + name + ': ' + JSON.stringify(obj, true, 2));
if (db) { msos.console.debug(temp_hm + operation); }
}
// We can load this late
msos.require("hello.to.monitor");
jQuery('#social_login').find('button').click(
function () {
var network_id = this.id;
msos.console.debug(temp_hm + 'clicked: ' + network_id);
hello(network_id).login(
function (input_obj) {
log(network_id, input_obj);
}
);
}
);
jQuery('#body').css({'display': 'block', 'visibility': 'visible'});
}
);
</script>
</body>
</html>