~ubuntu-branches/ubuntu/trusty/jwchat/trusty

« back to all changes in this revision

Viewing changes to groupchat_iroster.html.html

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2008-08-24 15:02:53 UTC
  • mfrom: (3.1.4 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080824150253-h0z39rzjmo4lc1k5
Tags: 1.0beta3-3
* Clean up README.Debian. (Closes: #481320)
* Add brazilian debconf messages translation. (Closes: #481522)
* Add swedish debconf messages translation. (Closes: #494887)
* Add italian debconf messages translation. (Closes: #495780)
* Add russian debconf messages translation. (Closes: #495573)
* Add finnish debconf messages translation. (Closes: #496227)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
<html>
3
3
  <head>
4
4
    <title>JWChat - Roster</title>
5
 
                <meta http-equiv="content-type" content="text/html; charset=utf-8">
 
5
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
6
6
    <script src="switchStyle.js"></script>
7
7
    <script language="JavaScript1.2">
8
 
      function toggleGrp(name) {
9
 
      parent.top.user.roster.toggleGrp(name);
10
 
      }
 
8
function toggleGrp(name) {
 
9
  parent.top.user.roster.toggleGrp(name);
 
10
}
11
11
 
12
 
      function updateStyleIE() {
13
 
      if (parent.top.user && parent.top.user.roster)
14
 
      parent.top.user.roster.updateStyleIE();
15
 
      }
16
 
      onresize = updateStyleIE;
 
12
function updateStyleIE() {
 
13
  if (parent.top.user && parent.top.user.roster)
 
14
    parent.top.user.roster.updateStyleIE();
 
15
}
 
16
onresize = updateStyleIE;
17
17
    </script>
18
18
    <style>
19
 
      body { background-color: white; }
 
19
    body { background-color: white; }
20
20
    </style>
21
21
  </head>
22
 
        <body>
23
 
                <div id="ie5menu" class="skin0" onMouseover="highlightie5(event)" onMouseout="lowlightie5(event)" onClick="jumptoie5(event)" display:none>
24
 
                        <nobr><div class="menuitems" func="user.roster.openChat">Start Chat</div></nobr>
25
 
    <hr noshade size=1>
26
 
                        <nobr><div class="menuitems" func="changeRole" param="'none',1">Kick</div></nobr>
27
 
                        <nobr><div class="menuitems" func="changeAffiliation" param="'outcast',1">Ban</div></nobr>
28
 
                        <nobr><div class="menuitems" func="changeRole" param="'participant'">Grant Voice</div></nobr>
29
 
                        <nobr><div class="menuitems" func="changeRole" param="'visitor'">Revoke Voice</div></nobr>
30
 
                        <nobr><div class="menuitems" func="changeAffiliation" param="'member'">Grant Membership</div></nobr>
31
 
                        <nobr><div class="menuitems" func="changeAffiliation" param="'none'">Revoke Membership</div></nobr>
32
 
                        <nobr><div class="menuitems" func="changeRole" param="'moderator'">Grant Moderator Privilege</div></nobr>
33
 
                        <nobr><div class="menuitems" func="changeRole" param="'participant'">Revoke Moderator Privilege</div></nobr>
34
 
                        <nobr><div class="menuitems" func="changeAffiliation" param="'admin'">Grant Administrative Privilege</div></nobr>
35
 
                        <nobr><div class="menuitems" func="changeAffiliation" param="'member'">Revoke Administrative Privilege</div></nobr>
36
 
    <hr noshade size=1>
37
 
                        <nobr><div class="menuitems" func="srcW.openUserInfo">Show Info</div></nobr>
38
 
                </div>
39
 
 
40
 
                <div id="roster" class="roster">
41
 
                </div>
42
 
 
43
 
                <script language="JavaScript1.2">
44
 
                        
45
 
                        //set this variable to 1 if you wish the URLs of the highlighted menu to be displayed in the status bar
46
 
                        var display_url=0;
47
 
                        
48
 
                        var ie5=document.all&&document.getElementById;
49
 
                        var ns6=document.getElementById&&!document.all;
50
 
                        if (ie5||ns6)
51
 
                                var menuobj=document.getElementById("ie5menu");
52
 
                        
53
 
                        var selobj;
54
 
                        function showmenuie5(e){
55
 
                                var firingobj=ie5? event.srcElement : e.target;
56
 
                                while (firingobj && (!firingobj.className || (firingobj.className != "rosterUser" && firingobj.className != "rosterUserSelected")))
57
 
                                        firingobj = firingobj.parentNode;
58
 
                                if (!firingobj || (firingobj.className != "rosterUser" && firingobj.className != "rosterUserSelected"))
59
 
                                        return false;
60
 
 
61
 
                                selobj = firingobj;
62
 
                                selectUser(selobj);
63
 
                                //Find out how close the mouse is to the corner of the window
64
 
                                var rightedge=ie5? document.body.clientWidth-event.clientX : window.innerWidth-e.clientX;
65
 
                                var bottomedge=ie5? document.body.clientHeight-event.clientY : window.innerHeight-e.clientY;
66
 
                                
67
 
                                //if the horizontal distance isn't enough to accomodate the width of the context menu
68
 
                                if (rightedge<menuobj.offsetWidth) {
69
 
                                        //move the horizontal position of the menu to the left by it's width
70
 
                                        menuobj.style.left=ie5? document.body.scrollLeft+event.clientX-menuobj.offsetWidth : window.pageXOffset+e.clientX-menuobj.offsetWidth;
71
 
                                        if (menuobj.style.left < "2px")
72
 
                                                menuobj.style.left = "2px";
73
 
                                }
74
 
                                else
75
 
                                //position the horizontal position of the menu where the mouse was clicked
76
 
                                menuobj.style.left=ie5? document.body.scrollLeft+event.clientX : window.pageXOffset+e.clientX
77
 
                                
78
 
                                //same concept with the vertical position
79
 
                                if (bottomedge<menuobj.offsetHeight) {
80
 
                                menuobj.style.top=ie5? document.body.scrollTop+event.clientY-menuobj.offsetHeight : window.pageYOffset+e.clientY-menuobj.offsetHeight
81
 
                          if (menuobj.style.top < "2px")
82
 
                          menuobj.style.top = "2px";
83
 
                          }
84
 
                                else
85
 
                                menuobj.style.top=ie5? document.body.scrollTop+event.clientY : window.pageYOffset+e.clientY
86
 
                                
87
 
                                menuobj.style.visibility="visible"
88
 
                                return false
89
 
                        }
90
 
 
91
 
                        function hidemenuie5(e){
92
 
                                menuobj.style.visibility="hidden"
93
 
                        }
94
 
 
95
 
                        function highlightie5(e){
96
 
                                var firingobj=ie5? event.srcElement : e.target;
97
 
                                if (firingobj.className=="menuitems"||ns6&&firingobj.parentNode.className=="menuitems"){
98
 
                                        if (ns6&&firingobj.parentNode.className=="menuitems") firingobj=firingobj.parentNode; //up one node
99
 
                                        firingobj.style.backgroundColor="highlight";
100
 
                                        firingobj.style.color="white";
101
 
                                        if (display_url==1)
102
 
                                                window.status=event.srcElement.url;
103
 
                                }
104
 
                        }
105
 
                        
106
 
                        function lowlightie5(e){
107
 
                                var firingobj=ie5? event.srcElement : e.target;
108
 
                                if (firingobj.className=="menuitems"||ns6&&firingobj.parentNode.className=="menuitems"){
109
 
                                        if (ns6&&firingobj.parentNode.className=="menuitems") firingobj=firingobj.parentNode; //up one node
110
 
                                        firingobj.style.backgroundColor="";
111
 
                                        firingobj.style.color="black";
112
 
                                        window.status='';
113
 
                                }
114
 
                        }
115
 
                        
116
 
                        function jumptoie5(e){
117
 
                                var firingobj=ie5? event.srcElement : e.target;
118
 
                                if (firingobj.className=="menuitems"||ns6&&firingobj.parentNode.className=="menuitems"){
119
 
                                        if (ns6&&firingobj.parentNode.className=="menuitems") firingobj=firingobj.parentNode;
120
 
                                        if (firingobj.getAttribute("func")) {
121
 
                                                var jid = selobj.id.substring(0,selobj.id.lastIndexOf("/"));
122
 
                                                eval("parent.top."+firingobj.getAttribute("func")+"('"+jid+"',"+firingobj.getAttribute("param")+")");
123
 
                                        }
124
 
                                }
125
 
                        }
126
 
 
127
 
                        var lastUserSelected;
128
 
                        function selectUser(el) {
129
 
                                if(lastUserSelected)
130
 
                                        lastUserSelected.className = "rosterUser";
131
 
                                el.className = "rosterUserSelected";
132
 
                                lastUserSelected = el;
133
 
                        }
134
 
 
135
 
                        function userClicked(el,jid) {
136
 
                                selectUser(el);
137
 
                                return parent.top.user.roster.openChat(jid);
138
 
                        }
139
 
                        if (ie5||ns6){
140
 
                                menuobj.style.display='';
141
 
                                document.oncontextmenu=showmenuie5;
142
 
                                document.onclick=hidemenuie5;
143
 
                        }
144
 
                </script>
145
 
        </body>
 
22
  <body>
 
23
    <div id="ie5menu" class="skin0" onMouseover="highlightie5(event)" onMouseout="lowlightie5(event)" onClick="jumptoie5(event)" display:none>
 
24
      <nobr><div class="menuitems" func="user.roster.openChat">Start Chat</div></nobr>
 
25
    <hr noshade size=1>
 
26
    <nobr><div class="menuitems" func="changeRole" param="'none',1">Kick</div></nobr>
 
27
    <nobr><div class="menuitems" func="changeAffiliation" param="'outcast',1">Ban</div></nobr>
 
28
    <nobr><div class="menuitems" func="changeRole" param="'participant'">Grant Voice</div></nobr>
 
29
    <nobr><div class="menuitems" func="changeRole" param="'visitor'">Revoke Voice</div></nobr>
 
30
    <nobr><div class="menuitems" func="changeAffiliation" param="'member'">Grant Membership</div></nobr>
 
31
    <nobr><div class="menuitems" func="changeAffiliation" param="'none'">Revoke Membership</div></nobr>
 
32
    <nobr><div class="menuitems" func="changeRole" param="'moderator'">Grant Moderator Privilege</div></nobr>
 
33
    <nobr><div class="menuitems" func="changeRole" param="'participant'">Revoke Moderator Privilege</div></nobr>
 
34
    <nobr><div class="menuitems" func="changeAffiliation" param="'admin'">Grant Administrative Privilege</div></nobr>
 
35
    <nobr><div class="menuitems" func="changeAffiliation" param="'member'">Revoke Administrative Privilege</div></nobr>
 
36
    <hr noshade size=1>
 
37
    <nobr><div class="menuitems" func="srcW.openUserInfo">Show Info</div></nobr>
 
38
  </div>
 
39
    
 
40
    <div id="roster" class="roster">
 
41
    </div>
 
42
    
 
43
    <script language="JavaScript1.2">
 
44
      
 
45
                                                                                                  //set this variable to 1 if you wish the URLs of the highlighted menu to be displayed in the status bar
 
46
var display_url=0;
 
47
 
 
48
var ie5=document.all&&document.getElementById;
 
49
var ns6=document.getElementById&&!document.all;
 
50
if (ie5||ns6)
 
51
  var menuobj=document.getElementById("ie5menu");
 
52
      
 
53
var selobj;
 
54
function showmenuie5(e){
 
55
  var firingobj=ie5? event.srcElement : e.target;
 
56
  while (firingobj && (!firingobj.className || (firingobj.className != "rosterUser" && firingobj.className != "rosterUserSelected")))
 
57
    firingobj = firingobj.parentNode;
 
58
  if (!firingobj || (firingobj.className != "rosterUser" && firingobj.className != "rosterUserSelected"))
 
59
    return false;
 
60
  
 
61
  selobj = firingobj;
 
62
  selectUser(selobj);
 
63
  //Find out how close the mouse is to the corner of the window
 
64
  var rightedge=ie5? document.body.clientWidth-event.clientX : window.innerWidth-e.clientX;
 
65
  var bottomedge=ie5? document.body.clientHeight-event.clientY : window.innerHeight-e.clientY;
 
66
  
 
67
  //if the horizontal distance isn't enough to accomodate the width of the context menu
 
68
  if (rightedge<menuobj.offsetWidth) {
 
69
    //move the horizontal position of the menu to the left by it's width
 
70
    menuobj.style.left=ie5? document.body.scrollLeft+event.clientX-menuobj.offsetWidth : window.pageXOffset+e.clientX-menuobj.offsetWidth;
 
71
    if (menuobj.style.left < "2px")
 
72
      menuobj.style.left = "2px";
 
73
  }
 
74
  else
 
75
    //position the horizontal position of the menu where the mouse was clicked
 
76
    menuobj.style.left=ie5? document.body.scrollLeft+event.clientX : window.pageXOffset+e.clientX
 
77
      
 
78
      //same concept with the vertical position
 
79
      if (bottomedge<menuobj.offsetHeight) {
 
80
        menuobj.style.top=ie5? document.body.scrollTop+event.clientY-menuobj.offsetHeight : window.pageYOffset+e.clientY-menuobj.offsetHeight
 
81
        if (menuobj.style.top < "2px")
 
82
          menuobj.style.top = "2px";
 
83
      }
 
84
      else
 
85
        menuobj.style.top=ie5? document.body.scrollTop+event.clientY : window.pageYOffset+e.clientY
 
86
          
 
87
          menuobj.style.visibility="visible"
 
88
          return false
 
89
          }
 
90
 
 
91
function hidemenuie5(e){
 
92
  menuobj.style.visibility="hidden"
 
93
    }
 
94
 
 
95
function highlightie5(e){
 
96
  var firingobj=ie5? event.srcElement : e.target;
 
97
  if (firingobj.className=="menuitems"||ns6&&firingobj.parentNode.className=="menuitems"){
 
98
    if (ns6&&firingobj.parentNode.className=="menuitems") firingobj=firingobj.parentNode; //up one node
 
99
    firingobj.style.backgroundColor="highlight";
 
100
    firingobj.style.color="white";
 
101
    if (display_url==1)
 
102
      window.status=event.srcElement.url;
 
103
  }
 
104
}
 
105
 
 
106
function lowlightie5(e){
 
107
  var firingobj=ie5? event.srcElement : e.target;
 
108
  if (firingobj.className=="menuitems"||ns6&&firingobj.parentNode.className=="menuitems"){
 
109
    if (ns6&&firingobj.parentNode.className=="menuitems") firingobj=firingobj.parentNode; //up one node
 
110
    firingobj.style.backgroundColor="";
 
111
    firingobj.style.color="black";
 
112
    window.status='';
 
113
  }
 
114
}
 
115
 
 
116
function jumptoie5(e){
 
117
  var firingobj=ie5? event.srcElement : e.target;
 
118
  if (firingobj.className=="menuitems"||ns6&&firingobj.parentNode.className=="menuitems"){
 
119
    if (ns6&&firingobj.parentNode.className=="menuitems") firingobj=firingobj.parentNode;
 
120
    if (firingobj.getAttribute("func")) {
 
121
      var jid = selobj.id.substring(0,selobj.id.lastIndexOf("/"));
 
122
      eval("parent.top."+firingobj.getAttribute("func")+"('"+jid+"',"+firingobj.getAttribute("param")+")");
 
123
    }
 
124
  }
 
125
}
 
126
 
 
127
var lastUserSelected;
 
128
function selectUser(el) {
 
129
  if(lastUserSelected)
 
130
    lastUserSelected.className = "rosterUser";
 
131
  el.className = "rosterUserSelected";
 
132
  lastUserSelected = el;
 
133
}
 
134
 
 
135
function userClicked(el,jid) {
 
136
  selectUser(el);
 
137
  return parent.top.user.roster.openChat(jid);
 
138
}
 
139
if (ie5||ns6){
 
140
  menuobj.style.display='';
 
141
  document.oncontextmenu=showmenuie5;
 
142
  document.onclick=hidemenuie5;
 
143
}
 
144
    </script>
 
145
  </body>
146
146
</html>