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

« back to all changes in this revision

Viewing changes to groupchat_invite_dialog.html.en

  • Committer: Bazaar Package Importer
  • Author(s): Lincoln de Sousa, Lincoln de Sousa, Marcelo Jorge Vieira
  • Date: 2010-09-16 11:42:28 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20100916114228-5s5ne28n1w6wrfbl
Tags: 1.0+dfsg-1
[Lincoln de Sousa]

* Switch to dpkg-source 3.0 (quilt) format
* Migrating package from cdbs to debhelper 7.0.50~
* Changing the rule get-orig-source to generate a dfsg compatible
  package striping swf files from the orig (Closes: #591962)
* Updated Standards-Version to 3.9.1
* Removing po-debconf from the Build-Depends-Indep list.

[Marcelo Jorge Vieira]

* Fixing the default backend
* Fixing Debugger dependency
* Changing information about packaging from old maintainers to
  Debian XMPP Team.
* Removing sound support.
* Setting a port for apache VirtualHost.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
 
<html>
3
 
    <head>
4
 
    <title>Invite Users</title>
5
 
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
6
 
    <script src="switchStyle.js"></script>
7
 
    <script src="jsjac.js"></script>
8
 
    <script>
9
 
      <!--
10
 
 
11
 
function doSub() {
12
 
        var users_selector = document.getElementById('users_selector');
13
 
 
14
 
        for (var i=0; i < users_selector.options.length; i++) {
15
 
                if (users_selector.options[i].selected) {
16
 
                  var aMessage = new JSJaCMessage();
17
 
                  aMessage.setTo(opener.parent.jid);
18
 
                  var x = aMessage.appendNode('x', {'xmlns': 'http://jabber.org/protocol/muc#user'});
19
 
                  var aNode = x.appendChild(aMessage.getDoc().createElement('invite'));
20
 
                  aNode.setAttribute('to',users_selector.options[i].value);
21
 
                  if (document.forms[0].reason.value != '')
22
 
                        aNode.appendChild(aMessage.getDoc().createElement('reason')).appendChild(aMessage.getDoc().createTextNode(document.forms[0].reason.value));
23
 
                  srcW.Debug.log(aMessage.getDoc().xml);
24
 
                  srcW.con.send(aMessage);
25
 
                }
26
 
        }
27
 
 
28
 
        window.close();
29
 
}
30
 
 
31
 
var srcW;
32
 
function init() {
33
 
        srcW = opener.parent.srcW;
34
 
 
35
 
        // fill selector with users from main roster
36
 
        var users_selector = document.getElementById('users_selector');
37
 
        var optidx = 0;
38
 
        for (var i=0; i<srcW.roster.users.length; i++) {
39
 
                if (typeof(srcW.roster.users[i].roster) != 'undefined' || srcW.isGateway(srcW.roster.users[i].jid)) // skip groupchats and gateways
40
 
                        continue;
41
 
                users_selector[optidx++] = new Option(srcW.roster.users[i].name,srcW.roster.users[i].jid);
42
 
        }
43
 
        
44
 
        document.title = "Invite Users to "+opener.parent.jid;
45
 
}
46
 
 
47
 
function keyPressed(e) {
48
 
  if (e.ctrlKey && e.keyCode == 13)
49
 
    return doSub();
50
 
  else if (e.keyCode == 27)
51
 
    close();
52
 
}
53
 
 
54
 
onkeydown = keyPressed;
55
 
onload = init;
56
 
      //-->
57
 
    </script>
58
 
    <script for="document" event="onkeydown()" language="JScript">
59
 
      <!--
60
 
       if (window.event.ctrlKey && window.event.keyCode == 13)
61
 
         return doSub();
62
 
       if (window.event.keyCode == 27)
63
 
          window.close();
64
 
      //-->
65
 
    </script>
66
 
  </head>
67
 
  <body style="margin: 8px;">
68
 
                <table width="100%" height="100%">
69
 
                        <form name="invite_form">
70
 
                                <tr>
71
 
                                        <td valign=top nowrap>Select User(s):</td><td align=left width="100%"><select name="users_selector" id="users_selector" size=3 multiple style="width:100%;"></select></td>
72
 
                                </tr>
73
 
                                <tr><td colspan=2>Reason:</td></tr>
74
 
                                <tr><td width="100%" height="100%" colspan=2><textarea name="reason" style="width:100%;height:100%"></textarea></td></tr>
75
 
                                <tr><td colspan=2><hr noshade size=1></td></tr>
76
 
                                <tr>
77
 
                                        <td align=right colspan=2>
78
 
                                                <button type=submit onClick="return doSub();">Invite</button>
79
 
                                        </td>
80
 
                                </tr>
81
 
                        </form>
82
 
                </table>
83
 
  </body>
84
 
</html>