| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| 2 | <!-- The HTML 4.01 Transitional DOCTYPE declaration--> |
| 3 | <!-- above set at the top of the file will set --> |
| 4 | <!-- the browser's rendering engine into --> |
| 5 | <!-- "Quirks Mode". Replacing this declaration --> |
| 6 | <!-- with a "Standards Mode" doctype is supported, --> |
| 7 | <!-- but may lead to some differences in layout. --> |
| 8 | |
| 9 | <html> |
| 10 | <head> |
| 11 | <meta http-equiv="content-type" content="text/html; charset=UTF-8"> |
| 12 | |
| 13 | |
| 14 | <!-- --> |
| 15 | <!-- Any title is fine --> |
| 16 | <!-- --> |
| 17 | <title>Web Application Starter Project</title> |
| 18 | |
| 19 | <!-- --> |
| 20 | <!-- This script loads your compiled module. --> |
| 21 | <!-- If you add any GWT meta tags, they must --> |
| 22 | <!-- be added before this line. --> |
| 23 | <!-- --> |
| 24 | <script type="text/javascript" language="javascript"> |
| 25 | var spamCall = function(callback) |
| 26 | { |
| 27 | callback(true); |
| 28 | } |
| 29 | </script> |
| 30 | <script type="text/javascript" language="javascript" src="ijab_config.js"></script> |
| 31 | <script type="text/javascript" language="javascript" src="ijab_i18n_en.js"></script> |
| 32 | <script type="text/javascript" language="javascript" src="ijab/ijab.nocache.js"></script> |
| 33 | <style> |
| 34 | * { margin: 0; padding: 0; } |
| 35 | body { font-family: Georgia, serif; background: url(images/login-page-bg.jpg) top center no-repeat #c4c4c4; color: #3a3a3a; } |
| 36 | |
| 37 | .clear { clear: both; } |
| 38 | |
| 39 | form { width: 406px; margin: 170px auto 0; } |
| 40 | |
| 41 | legend { display: none; } |
| 42 | |
| 43 | fieldset { border: 0; } |
| 44 | |
| 45 | label { width: 115px; text-align: right; float: left; margin: 0 10px 0 0; padding: 9px 0 0 0; font-size: 16px; } |
| 46 | |
| 47 | input { width: 220px; display: block; padding: 4px; margin: 0 0 10px 0; font-size: 18px; |
| 48 | color: #3a3a3a; font-family: Georgia, serif;} |
| 49 | input[type=checkbox]{ width: 20px; margin: 0; display: inline-block; } |
| 50 | |
| 51 | .button { background: url(images/button-bg.png) repeat-x top center; border: 1px solid #999; |
| 52 | -moz-border-radius: 5px; padding: 5px; color: black; font-weight: bold; |
| 53 | -webkit-border-radius: 5px; font-size: 13px; width: 70px; } |
| 54 | .button:hover { background: white; color: black; } |
| 55 | </style> |
| 56 | |
| 57 | <script type="text/javascript"> |
| 58 | var loginiJab = function() |
| 59 | { |
| 60 | var userName = document.getElementById("login").value; |
| 61 | var password = document.getElementById("password").value; |
| 62 | if(userName == ""||password=="") |
| 63 | { |
| 64 | alert("username or password is empty!"); |
| 65 | }; |
| 66 | var handler = |
| 67 | { |
| 68 | onBeforeLogin:function() |
| 69 | { |
| 70 | alert("On Before login"); |
| 71 | }, |
| 72 | onEndLogin:function() |
| 73 | { |
| 74 | alert("On end login"); |
| 75 | }, |
| 76 | onError:function(message) |
| 77 | { |
| 78 | iJab.login('test','test'); |
| 79 | }, |
| 80 | onLogout:function() |
| 81 | { |
| 82 | alert("On logout"); |
| 83 | }, |
| 84 | onResume:function() |
| 85 | { |
| 86 | alert("On resume"); |
| 87 | }, |
| 88 | onSuspend:function() |
| 89 | { |
| 90 | alert("On suspend") |
| 91 | }, |
| 92 | onAvatarClicked:function(x,y,username,jid) |
| 93 | { |
| 94 | alert("onAvatarClicked posX:"+x+" posY:"+y+" username:"+username+" jid:"+jid) |
| 95 | }, |
| 96 | onAvatarMouseOver:function(x,y,username,jid) |
| 97 | { |
| 98 | alert("onAvatarMouseOver posX:"+x+" posY:"+y+" username:"+username+" jid:"+jid) |
| 99 | }, |
| 100 | onStatusTextUpdated:function(text) |
| 101 | { |
| 102 | alert(" onStatusTextUpdated:+"+text); |
| 103 | } |
| 104 | }; |
| 105 | iJab.loginWithStatus(userName,password,"STATUS_INVISIBLE"); |
| 106 | } |
| 107 | </script> |
| 108 | </head> |
| 109 | |
| 110 | <!-- --> |
| 111 | <!-- The body can have arbitrary html, or --> |
| 112 | <!-- you can leave the body empty if you want --> |
| 113 | <!-- to create a completely dynamic UI. --> |
| 114 | <!-- --> |
| 115 | <body> |
| 116 | |
| 117 | <!-- OPTIONAL: include this if you want history support --> |
| 118 | <iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe> |
| 119 | <form id="login-form"> |
| 120 | <fieldset> |
| 121 | |
| 122 | <legend>Log in</legend> |
| 123 | |
| 124 | <label for="login">User</label> |
| 125 | <input type="text" id="login" name="login"/> |
| 126 | <div class="clear"></div> |
| 127 | |
| 128 | <label for="password">Password</label> |
| 129 | <input type="password" id="password" name="password"/> |
| 130 | <div class="clear"></div> |
| 131 | |
| 132 | <br /> |
| 133 | |
| 134 | <input type="button" style="margin: -20px 0 0 287px;" class="button" name="commit" value="Log in" onClick="loginiJab();"/> |
| 135 | <input type="button" style="margin: -29px 0 0 200px;" class="button" name="commit" value="Log out" onClick="iJab.logout();"/> |
| 136 | </fieldset> |
| 137 | </form> |
| 138 | <br/> |
| 139 | <br/> |
| 140 | <br/> |
| 141 | <br/> |
| 142 | <br/> |
| 143 | <input type="button" value="talkToTest-abc1" onclick="iJab.talkTo('abc1@anzsoft.com');" /> |
| 144 | <input type="button" value="talkToTest-abc2" onclick="iJab.talkTo('abc2@anzsoft.com');" /> |
| 145 | <input type="button" value="talkToTest-abc3" onclick="iJab.talkTo('abc3@anzsoft.com');" /> |
| 146 | <input type="button" value="talkToTest-abc4" onclick="iJab.talkTo('abc4@anzsoft.com');" /> |
| 147 | <input type="button" value="talkToTest-abc5" onclick="iJab.talkTo('abc5@anzsoft.com');" /> |
| 148 | <div align="left" style="margin-left:200px;margin-right:200px;"> |
| 149 | <p><a href="http://www.ijab.im">iJab</a> is an Ajax-based web based instant messaging program for XMPP/Jabber. It is free software and users can run their own instant messaging without limitations or software cost, complimenting the XMPP philosophy of a distributed network. iJab is interpreted purely by the client webbrowser. It runs solely in a browser and does not require downloading or installation of additional software. iJab also developed iJabBar, a Facebook styled web chat client.</p> |
| 150 | </div> |
| 151 | </body> |
| 152 | </html> |