error.js
Go to the documentation of this file.
1 /* error.js
2  * This will be loaded into the error window, and performs all actions in it.
3  */
4 // Make a namespace.
5 if (typeof foldersync == 'undefined') {
6  var foldersync = {};
7 };
8 
9 /* Error Dialog Controller
10  * Controller for all actions in the error dialog.
11  */
12 foldersync.errorDialog = {
13  /* Startup code for the error dialog
14  * error (string): The short description of the error
15  * message (string): The full error message
16  */
17  onLoad: function(e, error, message){
18  // Display the error
19  document.getElementById("foldersync-error-description").textContent=error;
20  // Display the lines of the message
21  if (message.toString() != "")
22  {
23  var sMessage = message.split("\n");
24  for each (var cLine in sMessage)
25  {
26  var clabel = document.getElementById("foldersync-error-messagebox").
27  appendChild(document.createElement("label"));
28  clabel.setAttribute("width","200");
29  clabel.setAttribute("style","-moz-user-select:text; cursor: text");
30  clabel.textContent=cLine;
31  }
32  } else {
33  document.getElementById("foldersync-error-message").
34  removeChild(document.
35  getElementById("foldersync-error-messagegroup"));
36  }
37  },
38 
39  // Shutdown code for the error dialog
40  onUnload: function(e){
41 
42  },
43 };
44 
45 window.addEventListener("load",
46  function(e){
47  foldersync.errorDialog.onLoad(e,
48  window.arguments[0],
49  window.arguments[1]);
50  },
51  false);
52 window.addEventListener("unload",
53  function(e){
54  foldersync.errorDialog.onUnload(e);
55  },
56  false);
imageContainer appendChild(newImage)
document getElementById("theimagecontainer").collapsed
let window
Lastfm onLoad
Definition: mini.js:36
imageContainer removeChild(oldImage)
GstMessage * message
function onUnload()
onUnload - called when the cover preview window unloads.
Definition: coverPreview.js:36