forked from moodlehq/moodlemobile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
262 lines (248 loc) · 10.1 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
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="css/layout.css">
<link rel="stylesheet" href="css/styles.css">
<link rel="stylesheet" href="css/ui-lightness/jquery-ui-1.9.1.custom.css">
<script type="text/javascript">
// Support for Node Webkit.
window.requireNode = window.require;
window.require = undefined;
</script>
<script src="cordova.js"></script>
<script src="childbrowser.js"></script>
<script src="PushNotification.js"></script>
<script src="webintent.js"></script>
<script src="externallib/jquery-1.8.1.min.js"></script>
<script src="externallib/jquery.touchSwipe.min.js"></script>
<script src="externallib/md5.js"></script>
<script src="externallib/matchMedia.js"></script>
<script src="externallib/matchMedia.addListener.js"></script>
<script src="externallib/underscore.js"></script>
<script src="externallib/backbone.js"></script>
<script src="externallib/backbone-localstorage.js"></script>
<script src="lib/mm.js"></script>
<script src="lib/mm.panels.js"></script>
<script src="lib/mm.util.js"></script>
<script src="lib/mm.lang.js"></script>
<script src="lib/mm.db.js"></script>
<script src="lib/mm.tpl.js"></script>
<script src="lib/mm.cache.js"></script>
<script src="lib/mm.settings.js"></script>
<script src="lib/mm.widgets.js"></script>
<script src="lib/mm.sync.js"></script>
<script src="lib/mm.cordova.js"></script>
<script src="lib/mm.rdebugger.js"></script>
<script src="lib/mm.fs.js"></script>
<script data-main="lib/app.js" src="externallib/require.js"></script>
<script language="javascript">
// We should wait to phonegap, if not, we get errors like:
// http://rickluna.com/wp/2012/04/solving-the-connection-to-the-server-was-unsuccessful-error-in-androidphonegap/
$(document).bind('deviceready', function() {
MM.log('Deviceready fired');
MM.deviceReady = true;
// Disable the back button, exists the app.
document.addEventListener("backbutton", function() {
MM.panels.goBack();
}, false);
MM.fs.init();
if (MM.plugins.notifications) {
// Register the device in the Apple notifications server, retrieve tokens
MM.plugins.notifications.registerDevice();
setTimeout(function() {
// Finaly, register the device for push notifications from Moodle.
// We wait sometime until the site is loaded
MM.plugins.notifications.registerForPushNotification();
}, 10000);
}
});
</script>
<!-- Uncomment to display errors in xcode -->
<!--script type="text/javascript">
window.onerror = function(message, url, lineNumber) {
console.log("Error: "+message+" in "+url+" at line "+lineNumber);
}
</script-->
<style id="mobilecssurl"></style>
</head>
<body>
<div id="add-site" style="display: none">
</div>
<div id="main-wrapper" style="display: none">
<div class="header-wrapper">
<header class="header-main">
<nav class="nav-main">
<ul class="nav">
<li class="nav-item home menu-home">
<a href="#" class="ir" id="mainmenu">
Home
</a>
</li>
</ul>
<span id="page-title"></span>
</nav>
</header>
</div>
<div id="panel-left" class="panel user-menu"></div>
<div id="panel-center" class="panel"></div>
<div id="panel-right" class="panel"></div>
</div>
<div id="app-dialog">
<div>
<div class="modalHeader">
</div>
<div class="modalContent">
</div>
<div class="modalFooter">
</div>
<div class="modalClear"></div>
</div>
</div>
<script type="text/template" id="menu_template">
<header>
<div class="media">
<div class="refresh"><a href="#refresh"><img width="16" height="16" src="img/reload.png" border="0"></a></div>
<div class="img"><img src="<%= MM.util.getMoodleFilePath(user.profileimageurl) %>" border="0"></div>
<div class="bd">
<h1><%= user.fullname %></h1>
</div>
</div>
</header>
<ul class="nav nav-v js-accordion">
<% _.each(plugins, function(plugin) { %>
<% if (typeof plugin.subMenus == "undefined" || plugin.subMenus.length == 0) { %>
<li class="nav-item no-submenu">
<a href="<%= plugin.menuURL %>" class="alink touch-row">
<% if (plugin.icon) { %>
<div class="plugin-ico"><img src="<%= plugin.icon %>" border="0"></div>
<% } %>
<div class="plugin-name"><%= MM.lang.pluginName(plugin.name) %></div>
</a>
</li>
<% } else { %>
<li class="nav-item">
<% if (plugin.toogler) { %>
<a class="toogler expand touch-row">
<% } else { %>
<a>
<% } %>
<% if (plugin.icon) { %>
<div class="plugin-ico"><img src="<%= plugin.icon %>" border="0"></div>
<% } %>
<div class="plugin-name"><%= MM.lang.pluginName(plugin.name) %></div>
</a>
<% if (plugin.toogler) { %>
<ul class="nav submenu">
<% } else { %>
<ul class="nav">
<% } %>
<% _.each(plugin.subMenus, function(menu) { %>
<li class="nav-item">
<a href="<%= menu.menuURL %>" class="alink touch-row">
<% if (menu.icon) { %>
<div class="plugin-ico"><img src="<%= menu.icon %>" border="0"></div>
<% } %>
<div class="plugin-name"><%= MM.lang.s(menu.name) %></div>
</a>
</li>
<% }); %>
</ul>
</li>
<% } %>
<% }); %>
</ul>
<h2><%= MM.lang.s("mycourses") %></h2>
<div id="mycourses">
<ul class="nav nav-v js-accordion">
<% _.each(courses, function(course) { %>
<li class="nav-item">
<a href="#" class="toogler expand touch-row">
<div class="course-ico"><img src="img/ico-course.png" border="0"></div>
<div class="plugin-name"><%= course.fullname %></div>
</a>
<ul class="nav submenu">
<% _.each(coursePlugins, function(plugin) { %>
<li class="nav-item">
<a href="<%= plugin.menuURL %><%= course.id %>" class="touch-row">
<% if (plugin.icon) { %>
<div class="plugin-ico"><img src="<%= plugin.icon %>" border="0"></div>
<% } %>
<div class="plugin-name"><%= MM.lang.pluginName(plugin.name) %></div>
</a>
</li>
<% }); %>
</ul>
</li>
<% }); %>
</ul>
<h2></h2>
<ul id="general-menu" class="nav nav-v js-accordion">
<li class="nav-item no-arrow">
<a href="<%= siteurl%>" target="_blank" class="touch-row">
<span><img src="img/ico-network.png" border="0"></span>
<%= MM.lang.s("website") %>
</a>
</li>
<li class="nav-item no-arrow">
<a href="<%= MM.lang.s("docsurl") %>" target="_blank" class="touch-row">
<span><img src="img/ico-help.png" border="0"></span>
<%= MM.lang.s("help") %>
</a>
</li>
<li class="nav-item no-submenu">
<a href="#settings" class="touch-row">
<span><img src="img/ico-settings.png" border="0"></span>
<%= MM.lang.s("settings") %>
</a>
</li>
</ul>
</div>
</script>
<script type="text/template" id="settings_template">
<div class="settings-list">
<ul class="nav nav-v">
<li class="nav-item">
<a href="#settings/sites/" class="menu1 touch-row"><%= MM.lang.s("sites") %><br></a>
</li>
<li class="nav-item">
<a href="#settings/sync/" class="menu1 touch-row"><%= MM.lang.s("synchronization") %><br></a>
</li>
<li class="nav-item">
<a href="#settings/development/" class="menu1 touch-row"><%= MM.lang.s("development") %><br></a>
</li>
<li class="nav-item">
<a href="#settings/reportbug/" class="menu1 touch-row"><%= MM.lang.s("reportabug") %><br></a>
</li>
<% _.each(plugins, function(plugin) { %>
<li class="nav-item">
<a href="#settings/plugin.menuURL" class="menu1 touch-row"><%= MM.lang.s(plugin.name) %><br></a>
</li>
<% }); %>
</ul>
</div>
</script>
<script type="text/template" id="add-site_template">
<h1><img src="img/login-logo.png" alt="Moodle"></h1>
<form action="">
<p>
<input type="url" id="url" autocapitalize="off" autocorrect="off" placeholder="<%= MM.lang.s("siteurl") %>">
</p>
<p>
<input type="text" id="username" autocapitalize="off" autocorrect="off" placeholder="<%= MM.lang.s("username") %>">
</p>
<p>
<input type="password" id="password" placeholder="<%= MM.lang.s("password") %>">
</p>
<p>
<input type="submit" name="add" id="addsitebutton" value="<%= MM.lang.s("add") %>">
</p>
</form>
<div id= "helplogin">
<a href="#helpmelogin"><%= MM.lang.s("icantlogin") %></a>
</div>
</script>
</body>
</html>