File: mobile.js

package info (click to toggle)
webcit 917-dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 9,164 kB
  • sloc: ansic: 34,213; sh: 4,455; makefile: 346; xml: 91; sed: 9
file content (31 lines) | stat: -rw-r--r-- 940 bytes parent folder | download | duplicates (4)
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
/*
 * Copyright 2005 - 2009 The Citadel Team
 * Licensed under the GPL V3
 */

var currentMsgDisplay = null;
function CtdlLoadMsgMouseDown(event, msgnum) {
  /* 	if (currentMsgDisplay != null) {
		currentMsgDisplay.style.display = "none";
	} 
	var id = "m_"+msgnum;
var preview_pane = document.getElementById(id);
preview_pane.style.display = "block";
preview_pane.innerHTML = "<i>Loading message</i>";
currentMsgDisplay = preview_pane;
var req = new XMLHttpRequest();
req.open('GET', '/msg/'+msgnum, true);
req.onreadystatechange = function (aEvt) {
  if (req.readyState == 4) {
     if(req.status == 200)
      currentMsgDisplay.innerHTML = "<button onMouseDown=\"CtdlHideMsg()\">(Hide message)</button><br>"+req.responseText;
     else
      currentMsgDisplay.innerHTML = "Error loading message";
  }
};
req.send(null); */
  window.location = "/mobilemsg/"+msgnum;
}
function CtdlHideMsg() {
	currentMsgDisplay.style.display = "none";
}