File: userhist_collections_iframe.html.html

package info (click to toggle)
jwchat 1.0beta3-3
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 6,288 kB
  • ctags: 382
  • sloc: xml: 462; sh: 80; makefile: 6
file content (87 lines) | stat: -rw-r--r-- 2,220 bytes parent folder | download | duplicates (5)
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>JWChat - Collections</title>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <script src="switchStyle.js"></script>
    <script src="xmlextras.js"></script>
    <script src="jsjac.js"></script>
		<script>

var ie5 = document.all&&document.getElementById;

function init() {
  var myTable = document.getElementById('myTable');
  
  if (parent.top.srcW.is.ie) {
    myTable.cellSpacing = 0;
    myTable.cellPadding = 0;
    myTable.border = 0;
    myTable.width = '100%';	
  }

  var rows = myTable.getElementsByTagName("TBODY").item(0).childNodes;
  for (var i=0; i<rows.length; i++) {
    rows[i].onmouseover = highlightRow;
    rows[i].onmouseout = unhighlightRow;
    rows[i].onclick = rowClicked;
    rows[i].title = "click to select collection";
  }
}
function highlightRow(e) {
  var row = ie5 ? event.srcElement.parentNode : e.target.parentNode;
  row.className = 'highlighted';
}
function unhighlightRow(e) {
  var row = ie5 ? event.srcElement.parentNode : e.target.parentNode;
  if (row != selectedRow)
    row.className = '';
}

var selectedRow;
function rowClicked(e) {
  if (selectedRow)
    selectedRow.className = '';
  selectedRow = ie5 ? event.srcElement.parentNode : e.target.parentNode;
  selectedRow.className = 'highlighted';
  
  srcW = parent.srcW;

  // get collection
  var aIQ = new JSJaCIQ();
  aIQ.setType('get');
  aIQ.setTo(srcW.loghost);
  var aNode = aIQ.getNode().appendChild(aIQ.getDoc().createElement('retrieve'));
  aNode.setAttribute('xmlns','http://jabber.org/protocol/archive');
  aNode.setAttribute('with',parent.jid);
  aNode.setAttribute('start',selectedRow.getAttribute('start'));

  srcW.Debug.log(aIQ.xml(),2);
  
  target = parent;

  srcW.con.send(aIQ,target.handleCollGet);
}
		</script>

		<style type="text/css">
			body { background-color: white; }
			th { 
			font-size: 0.8em; 
			border-bottom: 1px solid black;
			padding: 2px;
			}
			td {
			border-bottom: 1px solid black;
			padding: 2px;
			cursor: default;
			}
			tr.highlighted {
			color: highlighttext;
			background-color: highlight;
			}
		</style>
  </head>
  <body>
  </body>
</html>