~azzar1/unity/add-show-desktop-key

170 by mattgiuca
browser: Added CSS and JS files (not much in them).
1
/* IVLE - Informatics Virtual Learning Environment
2
 * Copyright (C) 2007-2008 The University of Melbourne
3
 *
4
 * This program is free software; you can redistribute it and/or modify
5
 * it under the terms of the GNU General Public License as published by
6
 * the Free Software Foundation; either version 2 of the License, or
7
 * (at your option) any later version.
8
 *
9
 * This program is distributed in the hope that it will be useful,
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 * GNU General Public License for more details.
13
 *
14
 * You should have received a copy of the GNU General Public License
15
 * along with this program; if not, write to the Free Software
16
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17
 *
18
 * Module: File Browser (client)
19
 * Author: Matt Giuca
20
 * Date: 11/1/2008
21
 */
22
188 by mattgiuca
browser.js: Can now (shakily) handle directory listings. (lots of code!)
23
/* Url names for apps */
24
this_app = "files";
208 by mattgiuca
dispatch.html, ivle.css: "apptabs" is now an ID, not a class.
25
edit_app = "edit";
188 by mattgiuca
browser.js: Can now (shakily) handle directory listings. (lots of code!)
26
service_app = "fileservice";
205 by mattgiuca
browser.js: Added appropriate handlers for error, text, and binary data.
27
serve_app = "serve";
28
download_app = "download";
188 by mattgiuca
browser.js: Can now (shakily) handle directory listings. (lots of code!)
29
183 by mattgiuca
browser: Added top level of response handling. Now determines handler type and
30
/* Mapping MIME types onto handlers.
31
 * "text" : When navigating to a text file, the text editor is opened.
32
 * "image" : When navigating to an image, the image is displayed (rather than
33
 *              going to the text editor).
34
 * "audio" : When navigating to an audio file, a "play" button is presented.
35
 * "binary" : When navigating to a binary file, offer it as a download through
36
 *              "serve".
37
 *
38
 * If a file is not on the list, its default action is determined by the first
39
 * part of its content type, where "text/*", "image/*" and "audio/*" are
40
 * treated as above, and other types are simply treated as binary.
41
 */
42
type_handlers = {
43
    "application/x-javascript" : "text",
44
    "application/javascript" : "text",
45
    "application/json" : "text",
489 by agdimech
browser.js, editor.js: Fixed the syntax error which was resulting due to a trailing comma.
46
    "application/xml" : "text"
183 by mattgiuca
browser: Added top level of response handling. Now determines handler type and
47
};
48
190 by mattgiuca
util: Added function dom_make_img, creates <img> elements.
49
/* Mapping MIME types to icons, just the file's basename */
50
type_icons = {
51
    "text/directory": "dir.png",
489 by agdimech
browser.js, editor.js: Fixed the syntax error which was resulting due to a trailing comma.
52
    "text/x-python": "py.png"
190 by mattgiuca
util: Added function dom_make_img, creates <img> elements.
53
};
54
55
default_type_icon = "txt.png";
56
57
/* Relative to IVLE root */
58
type_icons_path = "media/images/mime";
59
type_icons_path_large = "media/images/mime/large";
60
61
/* Mapping SVN status to icons, just the file's basename */
62
svn_icons = {
230 by mattgiuca
Removed "unversioned" icon from subversion status. Now unversioned files do
63
    "unversioned": null,
190 by mattgiuca
util: Added function dom_make_img, creates <img> elements.
64
    "normal": "normal.png",
213 by mattgiuca
Fileservice / Files (Python and JS files):
65
    "added": "added.png",
66
    "missing": "missing.png",
67
    "deleted": "deleted.png",
578 by dcoles
fileservice: Added code to allow browing of past revisons in the File Browser
68
    "modified": "modified.png",
69
    "revision": "revision.png"
190 by mattgiuca
util: Added function dom_make_img, creates <img> elements.
70
};
71
213 by mattgiuca
Fileservice / Files (Python and JS files):
72
/* Mapping SVN status to "nice" strings */
73
svn_nice = {
74
    "unversioned": "Temporary file",
75
    "normal": "Permanent file",
76
    "added": "Temporary file (scheduled to be added)",
77
    "missing": "Permanent file (missing)",
78
    "deleted": "Permanent file (scheduled for deletion)",
79
    "replaced": "Permanent file (replaced)",
80
    "modified": "Permanent file (modified)",
81
    "merged": "Permanent file (merged)",
578 by dcoles
fileservice: Added code to allow browing of past revisons in the File Browser
82
    "conflicted": "Permanent file (conflicted)",
83
    "revision": "Past Permanent file (revision)"
213 by mattgiuca
Fileservice / Files (Python and JS files):
84
};
85
230 by mattgiuca
Removed "unversioned" icon from subversion status. Now unversioned files do
86
default_svn_icon = null;
213 by mattgiuca
Fileservice / Files (Python and JS files):
87
default_svn_nice = "Unknown status";
190 by mattgiuca
util: Added function dom_make_img, creates <img> elements.
88
89
svn_icons_path = "media/images/svn";
90
269 by mattgiuca
browser: Added publish functionality to JavaScript client side.
91
published_icon = "media/images/interface/published.png";
92
183 by mattgiuca
browser: Added top level of response handling. Now determines handler type and
93
/* List of MIME types considered "executable" by the system.
94
 * Executable files offer a "run" link, implying that the "serve"
95
 * application can interpret them.
96
 */
97
types_exec = [
489 by agdimech
browser.js, editor.js: Fixed the syntax error which was resulting due to a trailing comma.
98
    "text/x-python"
183 by mattgiuca
browser: Added top level of response handling. Now determines handler type and
99
];
100
211 by mattgiuca
fileservice/listing: Slight change to date format.
101
102
/* Global variables */
103
104
current_path = "";
105
181 by mattgiuca
browser.js: Added functions do_action, navigate, handle_response (stubs).
106
/** Calls the server using Ajax, performing an action on the server side.
107
 * Receives the response from the server and performs a refresh of the page
108
 * contents, updating it to display the returned data (such as a directory
109
 * listing, file preview, or editor pane).
110
 * Always makes a POST request.
111
 * No return value.
112
 *
113
 * \param action String. Name of the action to perform, as defined in the
114
 *     fileservice API.
115
 * \param path URL path to make the request to, within the application.
116
 * \param args Argument object, as described in util.parse_url and friends.
117
 *      This should contain the arguments to the action, but NOT the action
118
 *      itself. (Also a minor side-effect; the "args" object will be mutated
119
 *      to include the action attribute).
120
 * \param content_type String, optional.
121
 *      May be "application/x-www-form-urlencoded" or "multipart/form-data".
122
 *      Defaults to "application/x-www-form-urlencoded".
123
 *      "multipart/form-data" is recommended for large uploads.
124
 */
385 by mattgiuca
browser/editor: Clicking "Save" in the editor does not cause a page refresh
125
function do_action(action, path, args, content_type, ignore_response)
181 by mattgiuca
browser.js: Added functions do_action, navigate, handle_response (stubs).
126
{
127
    args.action = action;
559 by mattgiuca
Major JavaScript refactor: util.ajax_call is now asynchronous, not
128
    /* Callback action, when the server returns */
129
    var callback = function(response)
130
        {
131
            /* Check for action errors reported by the server, and report them
132
             * to the user */
133
            var error = response.getResponseHeader("X-IVLE-Action-Error");
134
            if (error != null)
135
                alert("Error: " + error.toString() + ".");
136
            /* Now read the response and set up the page accordingly */
137
            if (ignore_response != true)
138
                handle_response(path, response);
139
        }
181 by mattgiuca
browser.js: Added functions do_action, navigate, handle_response (stubs).
140
    /* Call the server and perform the action. This mutates the server. */
559 by mattgiuca
Major JavaScript refactor: util.ajax_call is now asynchronous, not
141
    ajax_call(callback, service_app, path, args, "POST", content_type);
181 by mattgiuca
browser.js: Added functions do_action, navigate, handle_response (stubs).
142
}
143
144
/** Calls the server using Ajax, requesting a directory listing. This should
145
 * not modify the server in any way. Receives the response from the server and
146
 * performs a refresh of the page contents, updating it to display the
147
 * returned data (such as a directory listing, file preview, or editor pane).
148
 * Called "navigate", can also be used for a simple refresh.
149
 * Always makes a GET request.
150
 * No return value.
208 by mattgiuca
dispatch.html, ivle.css: "apptabs" is now an ID, not a class.
151
 * \param editmode Optional boolean. If true, then the user navigated here
152
 * with an "edit" URL so we should favour using the editor.
181 by mattgiuca
browser.js: Added functions do_action, navigate, handle_response (stubs).
153
 */
208 by mattgiuca
dispatch.html, ivle.css: "apptabs" is now an ID, not a class.
154
function navigate(path, editmode)
181 by mattgiuca
browser.js: Added functions do_action, navigate, handle_response (stubs).
155
{
559 by mattgiuca
Major JavaScript refactor: util.ajax_call is now asynchronous, not
156
    callback = function(response)
157
        {
158
            /* Read the response and set up the page accordingly */
159
            handle_response(path, response, editmode);
160
        }
578 by dcoles
fileservice: Added code to allow browing of past revisons in the File Browser
161
    /* Get any query strings */
162
    url = parse_url(window.location.href);
163
    
181 by mattgiuca
browser.js: Added functions do_action, navigate, handle_response (stubs).
164
    /* Call the server and request the listing. This mutates the server. */
578 by dcoles
fileservice: Added code to allow browing of past revisons in the File Browser
165
    ajax_call(callback, service_app, path, url.args, "GET");
181 by mattgiuca
browser.js: Added functions do_action, navigate, handle_response (stubs).
166
}
167
211 by mattgiuca
fileservice/listing: Slight change to date format.
168
/** Determines the "handler type" from a MIME type.
169
 * The handler type is a string, either "text", "image", "audio" or "binary".
170
 */
171
function get_handler_type(content_type)
172
{
173
    if (!content_type)
174
        return null;
175
    if (content_type in type_handlers)
176
        return type_handlers[content_type];
177
    else
178
    {   /* Based on the first part of the MIME type */
179
        var handler_type = content_type.split('/')[0];
180
        if (handler_type != "text" && handler_type != "image" &&
181
            handler_type != "audio")
182
            handler_type = "binary";
183
        return handler_type;
184
    }
185
}
186
181 by mattgiuca
browser.js: Added functions do_action, navigate, handle_response (stubs).
187
/** Given an HTTP response object, cleans up and rebuilds the contents of the
188
 * page using the response data. This does not navigate away from the page, it
189
 * merely rebuilds most of the data.
190
 * Note that depending on the type of data returned, this could result in a
191
 * directory listing, an image preview, an editor pane, etc.
192
 * Figures out the type and calls the appropriate function.
193
 * \param path URL path which the request was made for. This can (among other
194
 * things) be used to update the URL in the location bar.
195
 * \param response XMLHttpRequest object returned by the server. Should
196
 * contain all the response data.
208 by mattgiuca
dispatch.html, ivle.css: "apptabs" is now an ID, not a class.
197
 * \param editmode Optional boolean. If true, then the user navigated here
198
 * with an "edit" URL so we should favour using the editor.
181 by mattgiuca
browser.js: Added functions do_action, navigate, handle_response (stubs).
199
 */
208 by mattgiuca
dispatch.html, ivle.css: "apptabs" is now an ID, not a class.
200
function handle_response(path, response, editmode)
181 by mattgiuca
browser.js: Added functions do_action, navigate, handle_response (stubs).
201
{
183 by mattgiuca
browser: Added top level of response handling. Now determines handler type and
202
    /* TODO: Set location bar to "path" */
211 by mattgiuca
fileservice/listing: Slight change to date format.
203
    current_path = path;
189 by mattgiuca
browser.js: Top-level handler now presents the path nav panel, not dir
204
205
    /* Clear away the existing page contents */
206
    clearpage();
207
    /* Display the path at the top, for navigation */
208
    presentpath(path);
209
183 by mattgiuca
browser: Added top level of response handling. Now determines handler type and
210
    /* Check the status, and if not 200, read the error and handle this as an
211
     * error. */
212
    if (response.status != 200)
213
    {
214
        var error = response.getResponseHeader("X-IVLE-Return-Error");
215
        if (error == null)
216
            error = response.statusText;
217
        handle_error(error);
218
        return;
219
    }
220
221
    /* Check if this is a directory listing or file contents */
222 by mattgiuca
browser.js:
222
    var isdir = response.getResponseHeader("X-IVLE-Return") == "Dir";
223
    if (!editmode && isdir)
183 by mattgiuca
browser: Added top level of response handling. Now determines handler type and
224
    {
225
        var listing = response.responseText;
226
        /* The listing SHOULD be valid JSON text. Parse it into an object. */
227
        try
228
        {
229
            listing = JSON.parse(listing);
230
        }
231
        catch (e)
232
        {
233
            handle_error("The server returned an invalid directory listing");
234
            return;
235
        }
236
        handle_dir_listing(path, listing);
237
    }
238
    else
239
    {
240
        /* Treat this as an ordinary file. Get the file type. */
241
        var content_type = response.getResponseHeader("Content-Type");
211 by mattgiuca
fileservice/listing: Slight change to date format.
242
        var handler_type = get_handler_type(content_type);
208 by mattgiuca
dispatch.html, ivle.css: "apptabs" is now an ID, not a class.
243
        /* If we're in "edit mode", always treat this file as text */
244
        would_be_handler_type = handler_type;
245
        if (editmode) handler_type = "text";
183 by mattgiuca
browser: Added top level of response handling. Now determines handler type and
246
        /* handler_type should now be set to either
247
         * "text", "image", "audio" or "binary". */
248
        switch (handler_type)
249
        {
250
        case "text":
222 by mattgiuca
browser.js:
251
            if (isdir)
252
            {
253
                handle_text(path_join(path, "untitled"), "",
254
                    would_be_handler_type);
255
            }
256
            else
257
            {
258
                handle_text(path, response.responseText,
259
                    would_be_handler_type);
260
            }
183 by mattgiuca
browser: Added top level of response handling. Now determines handler type and
261
            break;
262
        case "image":
263
            /* TODO: Custom image handler */
264
            handle_binary(path, response.responseText);
265
            break;
266
        case "audio":
267
            /* TODO: Custom audio handler */
268
            handle_binary(path, response.responseText);
269
            break;
270
        case "binary":
271
            handle_binary(path);
272
            break;
273
        }
274
    }
275
}
276
188 by mattgiuca
browser.js: Can now (shakily) handle directory listings. (lots of code!)
277
/** Deletes all "dynamic" content on the page.
278
 * This returns the page back to the state it is in when the HTML arrives to
279
 * the browser, ready for another handler to populate it.
280
 */
281
function clearpage()
282
{
203 by mattgiuca
browser: Removed all directory-listing specific HTML from the Python-generated
283
    dom_removechildren(document.getElementById("path"));
284
    dom_removechildren(document.getElementById("filesbody"));
285
}
286
287
/** Deletes all "dynamic" content on the page necessary to navigate from
288
 * one directory listing to another (does not clear as much as clearpage
289
 * does).
290
 * This is the equivalent of calling clearpage() then
291
 * setup_for_dir_listing(), assuming the page is already on a dir listing.
292
 */
293
function clearpage_dir()
294
{
188 by mattgiuca
browser.js: Can now (shakily) handle directory listings. (lots of code!)
295
    dom_removechildren(document.getElementById("path"));
296
    dom_removechildren(document.getElementById("files"));
297
    dom_removechildren(document.getElementById("sidepanel"));
298
}
299
208 by mattgiuca
dispatch.html, ivle.css: "apptabs" is now an ID, not a class.
300
/** Sets the mode to either "file browser" or "text editor" mode.
301
 * This modifies the window icon, and selected tab.
302
 * \param editmode If True, editor mode. Else, file browser mode.
303
 */
304
function setmode(editmode)
305
{
306
    /* Find the DOM elements for the file browser and editor tabs */
307
    var tabs = document.getElementById("apptabs");
308
    var tab_files = null;
309
    var tab_edit = null;
310
    var a;
311
    var href;
312
    for (var i=0; i<tabs.childNodes.length; i++)
313
    {
314
        /* Find the href of the link within */
315
        if (!tabs.childNodes[i].getElementsByTagName) continue;
316
        a = tabs.childNodes[i].getElementsByTagName("a");
317
        if (a.length == 0) continue;
318
        href = a[0].getAttribute("href");
319
        if (href == null) continue;
320
        if (endswith(href, this_app))
321
            tab_files = tabs.childNodes[i];
322
        else if (endswith(href, edit_app))
323
            tab_edit = tabs.childNodes[i];
324
    }
325
326
    if (editmode)
327
    {
328
        tab_files.removeAttribute("class");
329
        tab_edit.setAttribute("class", "thisapp");
330
    }
331
    else
332
    {
333
        tab_edit.removeAttribute("class");
334
        tab_files.setAttribute("class", "thisapp");
335
    }
336
}
337
183 by mattgiuca
browser: Added top level of response handling. Now determines handler type and
338
/*** HANDLERS for different types of responses (such as dir listing, file,
339
 * etc). */
340
341
function handle_error(message)
342
{
208 by mattgiuca
dispatch.html, ivle.css: "apptabs" is now an ID, not a class.
343
    setmode(false);
205 by mattgiuca
browser.js: Added appropriate handlers for error, text, and binary data.
344
    var files = document.getElementById("filesbody");
345
    var txt_elem = dom_make_text_elem("div", "Error: "
188 by mattgiuca
browser.js: Can now (shakily) handle directory listings. (lots of code!)
346
        + message.toString() + ".")
205 by mattgiuca
browser.js: Added appropriate handlers for error, text, and binary data.
347
    txt_elem.setAttribute("class", "padding error");
348
    files.appendChild(txt_elem);
188 by mattgiuca
browser.js: Can now (shakily) handle directory listings. (lots of code!)
349
}
350
351
/** Presents a path list (address bar inside the page) for clicking.
352
 */
353
function presentpath(path)
354
{
355
    var dom_path = document.getElementById("path");
356
    var href_path = make_path(this_app);
200 by mattgiuca
fileservice.listing: Now returns a nicer date format for mtime_nice.
357
    var nav_path = "";
239 by mattgiuca
browser.js: Fixed array loop, made normal for loop (for each loops break
358
    var dir;
188 by mattgiuca
browser.js: Can now (shakily) handle directory listings. (lots of code!)
359
225 by mattgiuca
util.js: Yet more fixes for encoding/decoding URIs. build_url and parse_url
360
    /* Also set the document title */
361
    document.title = path_basename(path) + " - IVLE";
188 by mattgiuca
browser.js: Can now (shakily) handle directory listings. (lots of code!)
362
    /* Create all of the paths */
239 by mattgiuca
browser.js: Fixed array loop, made normal for loop (for each loops break
363
    var pathlist = path.split("/");
364
    for (var i=0; i<pathlist.length; i++)
188 by mattgiuca
browser.js: Can now (shakily) handle directory listings. (lots of code!)
365
    {
239 by mattgiuca
browser.js: Fixed array loop, made normal for loop (for each loops break
366
        dir = pathlist[i];
188 by mattgiuca
browser.js: Can now (shakily) handle directory listings. (lots of code!)
367
        if (dir == "") continue;
368
        /* Make an 'a' element */
224 by mattgiuca
util.js: Removed urlencoding support from "encoded_app_path" (now called
369
        href_path = path_join(href_path, dir);
200 by mattgiuca
fileservice.listing: Now returns a nicer date format for mtime_nice.
370
        nav_path = path_join(nav_path, dir);
371
        var link = dom_make_link_elem("a", dir, "Navigate to " + nav_path,
215 by mattgiuca
listing.js:
372
                href_path/*, "navigate(" + repr(href_path) + ")"*/);
188 by mattgiuca
browser.js: Can now (shakily) handle directory listings. (lots of code!)
373
        dom_path.appendChild(link);
374
        dom_path.appendChild(document.createTextNode("/"));
375
    }
207 by mattgiuca
browser.js: Removed trailing slash from the path list
376
    dom_path.removeChild(dom_path.lastChild);
183 by mattgiuca
browser: Added top level of response handling. Now determines handler type and
377
}
378
190 by mattgiuca
util: Added function dom_make_img, creates <img> elements.
379
/** Given a mime type, returns the path to the icon.
380
 * \param type String, Mime type.
381
 * \param sizelarge Boolean, optional.
382
 * \return Path to the icon. Has applied make_path, so it is relative to site
383
 * root.
384
 */
385
function mime_type_to_icon(type, sizelarge)
386
{
387
    var filename;
388
    if (type in type_icons)
389
        filename = type_icons[type];
390
    else
391
        filename = default_type_icon;
392
    if (sizelarge)
393
        return make_path(path_join(type_icons_path_large, filename));
394
    else
395
        return make_path(path_join(type_icons_path, filename));
396
}
397
398
/** Given an svnstatus, returns the path to the icon.
399
 * \param type String, svn status.
400
 * \return Path to the icon. Has applied make_path, so it is relative to site
230 by mattgiuca
Removed "unversioned" icon from subversion status. Now unversioned files do
401
 * root. May return null to indicate no SVN icon.
190 by mattgiuca
util: Added function dom_make_img, creates <img> elements.
402
 */
403
function svnstatus_to_icon(svnstatus)
404
{
405
    var filename;
406
    if (svnstatus in svn_icons)
407
        filename = svn_icons[svnstatus];
408
    else
409
        filename = default_svn_icon;
230 by mattgiuca
Removed "unversioned" icon from subversion status. Now unversioned files do
410
    if (filename == null) return null;
190 by mattgiuca
util: Added function dom_make_img, creates <img> elements.
411
    return make_path(path_join(svn_icons_path, filename));
412
}
413
213 by mattgiuca
Fileservice / Files (Python and JS files):
414
/** Given an svnstatus, returns the "nice" string.
415
 */
416
function svnstatus_to_string(svnstatus)
417
{
418
    if (svnstatus in svn_nice)
419
        return svn_nice[svnstatus];
420
    else
421
        return default_svn_nice;
422
}
423
183 by mattgiuca
browser: Added top level of response handling. Now determines handler type and
424
/** Displays a download link to the binary file.
425
 */
426
function handle_binary(path)
427
{
208 by mattgiuca
dispatch.html, ivle.css: "apptabs" is now an ID, not a class.
428
    setmode(false);
205 by mattgiuca
browser.js: Added appropriate handlers for error, text, and binary data.
429
    var files = document.getElementById("filesbody");
430
    var div = document.createElement("div");
431
    files.appendChild(div);
432
    div.setAttribute("class", "padding");
224 by mattgiuca
util.js: Removed urlencoding support from "encoded_app_path" (now called
433
    var download_link = app_path(download_app, path);
205 by mattgiuca
browser.js: Added appropriate handlers for error, text, and binary data.
434
    var par1 = dom_make_text_elem("p",
435
        "The file " + path + " is a binary file. To download this file, " +
436
        "click the following link:");
437
    var par2 = dom_make_link_elem("p",
438
        "Download " + path, "Download " + path, download_link);
439
    div.appendChild(par1);
440
    div.appendChild(par2);
181 by mattgiuca
browser.js: Added functions do_action, navigate, handle_response (stubs).
441
}
442
170 by mattgiuca
browser: Added CSS and JS files (not much in them).
443
/** Called when the page loads initially.
444
 */
445
window.onload = function()
446
{
188 by mattgiuca
browser.js: Can now (shakily) handle directory listings. (lots of code!)
447
    /* Navigate (internally) to the path in the URL bar.
448
     * This causes the page to be populated with whatever is at that address,
449
     * whether it be a directory or a file.
450
     */
451
    var path = parse_url(window.location.href).path;
452
    /* Strip out root_dir + "/files" from the front of the path */
208 by mattgiuca
dispatch.html, ivle.css: "apptabs" is now an ID, not a class.
453
    var strip = make_path(this_app);
454
    var editmode = false;
455
    if (path.substr(0, strip.length) == strip)
456
        path = path.substr(strip.length+1);
457
    else
458
    {
459
        /* See if this is an edit path */
460
        strip = make_path(edit_app);
461
        if (path.substr(0, strip.length) == strip)
462
        {
463
            path = path.substr(strip.length+1);
464
            editmode = true;
465
        }
466
    }
188 by mattgiuca
browser.js: Can now (shakily) handle directory listings. (lots of code!)
467
200 by mattgiuca
fileservice.listing: Now returns a nicer date format for mtime_nice.
468
    if (path.length == 0)
469
    {
470
        /* Navigate to the user's home directory by default */
471
        /* TEMP? */
472
        path = username;
473
    }
474
208 by mattgiuca
dispatch.html, ivle.css: "apptabs" is now an ID, not a class.
475
    navigate(path, editmode);
170 by mattgiuca
browser: Added CSS and JS files (not much in them).
476
}