[20] | 1 | /** |
---|
| 2 | * @AUTHOR: Alexandre Correia / Rodrigo Souza |
---|
| 3 | * @DATE: 2006/10/24 17:03:00 |
---|
| 4 | * @LAST CHANGE: Seg 11 Dez 2006 10:21:34 BRST:: |
---|
| 5 | * Instant Messenger |
---|
| 6 | * im_templates.js |
---|
| 7 | **/ |
---|
| 8 | |
---|
| 9 | function Templates(){ |
---|
| 10 | |
---|
| 11 | this.element = document.getElementById("im_expresso"); |
---|
| 12 | this.form = ""; |
---|
| 13 | this.time_set = ""; |
---|
| 14 | this.transfer = 0; |
---|
| 15 | this.arquivo = ""; |
---|
| 16 | } |
---|
| 17 | |
---|
| 18 | /* |
---|
| 19 | * Conf forms |
---|
| 20 | */ |
---|
| 21 | |
---|
| 22 | Templates.prototype.conf_form = function(pName,pWidth,pHeight,pHTML,pTitle) |
---|
| 23 | { |
---|
| 24 | var params = new Array(); |
---|
| 25 | params['body'] = pHTML; |
---|
| 26 | params['height'] = pHeight; |
---|
| 27 | params['id'] = pName; |
---|
| 28 | params['maximize'] = false; |
---|
| 29 | params['minimize'] = false; |
---|
| 30 | params['title'] = pTitle; |
---|
| 31 | params['width'] = pWidth; |
---|
| 32 | im_win.create_window(params); |
---|
| 33 | } |
---|
| 34 | |
---|
| 35 | /* |
---|
| 36 | * Add Usuario |
---|
| 37 | */ |
---|
| 38 | |
---|
| 39 | Templates.prototype.add_user = function() |
---|
| 40 | { |
---|
| 41 | |
---|
| 42 | var _this = this; |
---|
| 43 | var _td = ""; |
---|
| 44 | |
---|
[27] | 45 | var form_add_user = "<span style='display:block'><b>Selecione uma Organização .: </b><select id='ImSelOrg' name='ImSelOrg' onchange='Preferences.SearchContacts();'></select>" + |
---|
| 46 | "<span id='_span_load_im' style='background-color:#cc4444;color:white;visibility:hidden;position:absolute;right:0px'>Carregando .....</span>"+ |
---|
[20] | 47 | "</span>"+ |
---|
| 48 | "<select size='10' id='ImSelAddContact' name='ImSelAddContact' class='add_user' onclick='Preferences.preenche();'></select><table border='0' cellpadding='1' cellspacing='2' align='center' width='100%' >"+ |
---|
| 49 | "<tr><td><b>"+IM.get_lang('Jid Contact')+".:</b></td><td><input id='text0' type='text' size='40' maxlength='40'></td></tr>"+ |
---|
| 50 | "<tr><td><b>"+IM.get_lang('Nickname')+".:</b></td><td><input id='text1' type='text' size='20' maxlength='20'></td></tr>"+ |
---|
| 51 | "<tr><td><b>"+IM.get_lang('Group')+".:</b></td><td><input id='text2' type='text' size='20' maxlength='20'></td></tr>"+ |
---|
[33] | 52 | "<tr><td><input id='text3' type='hidden' size='30' maxlength='30'></td></tr>"+ |
---|
[20] | 53 | "<tr><td colspan='2'><input type='button' value='"+IM.get_lang('Add')+"' onclick='Preferences.Add_user(\"divAddUser_im\")'></td></tr>"+ |
---|
| 54 | "</table>" |
---|
[41] | 55 | _this.conf_form("divAddUser",520,270,form_add_user,":: " + IM.get_lang('Add New Contact') + " - Expresso ::"); |
---|
[20] | 56 | } |
---|
| 57 | |
---|
| 58 | /* |
---|
| 59 | * Del Usuario |
---|
| 60 | */ |
---|
| 61 | |
---|
| 62 | Templates.prototype.remove_user = function() |
---|
| 63 | { |
---|
| 64 | var _this = this; |
---|
| 65 | var form_del_user = "<div style='margin-left:20px;margin-top:20px'>"+ |
---|
| 66 | "<span>"+IM.get_lang('Contact')+" .: </span>"+ |
---|
| 67 | "<span style='margin-left:20px'><select id='sel_contact'></select></span><br>"+ |
---|
| 68 | "<p><span><input type='button' value='"+IM.get_lang('Remove')+"' onclick='javascript:Preferences.Remove_user()'></span>"+ |
---|
| 69 | "</div>"; |
---|
| 70 | |
---|
| 71 | _this.conf_form("divDelUser",400,110,form_del_user,":: " + IM.get_lang('Remove Contact') + " - Expresso ::"); |
---|
| 72 | } |
---|
| 73 | |
---|
| 74 | /* |
---|
| 75 | * Update Usuario |
---|
| 76 | */ |
---|
| 77 | |
---|
| 78 | Templates.prototype.update_user = function() |
---|
| 79 | { |
---|
| 80 | var _this = this; |
---|
| 81 | var form_update_user = "<table border='0' cellpadding='1' cellspacing='2' align='center' width='90%'>"+ |
---|
| 82 | "<tr><td><input id='text0' type='hidden' size='40' maxlength='40'></td></tr>"+ |
---|
| 83 | "<tr><td><b>Contato .:</b></td><td><span id='span0'></span></td></tr>"+ |
---|
| 84 | "<tr><td><b>"+IM.get_lang('Nickname')+".:</b></td><td><input id='text1' type='text' size='20' maxlength='20'></td></tr>"+ |
---|
| 85 | "<tr><td><b>"+IM.get_lang('Group')+".:</b></td><td><input id='text2' type='text' size='20' maxlength='20'></td></tr>"+ |
---|
| 86 | "<tr><td colspan='2'><input type='button' value='"+IM.get_lang('Update')+"' onclick='Preferences.Add_user(\"divUpdateUser_im\")'></td></tr>"+ |
---|
| 87 | "</table>"; |
---|
| 88 | _this.conf_form("divUpdateUser",300,110,form_update_user,":: Adicionar Contato - Expresso ::"); |
---|
| 89 | } |
---|
| 90 | |
---|
| 91 | Templates.prototype.Users_Not_Auth = function () |
---|
| 92 | { |
---|
[27] | 93 | var count = 0; |
---|
[20] | 94 | var _this = this; |
---|
[27] | 95 | var auth_user = ""; |
---|
[24] | 96 | |
---|
[33] | 97 | if(!IM.array_prefe['ch_contacts']) |
---|
| 98 | { |
---|
| 99 | auth_user = '<table border="0" cellpadding="0" cellspacing="0" width="99%">' + |
---|
| 100 | '<tr style="background-color:#cccccc;font-weight:bold;height:20px"><td> Contato</td><td align="center">Detalhes</td><td align="center">Aceitar S/N</td></tr>'; |
---|
| 101 | |
---|
| 102 | for(var i=0 ; i < IM.array_users.length; i++){ |
---|
| 103 | if(IM.array_users[i].group == 'sem_grupo'){ |
---|
| 104 | auth_user += '<tr id="_cell_'+IM.array_users[i].jid+'">'+ |
---|
| 105 | '<td><img src="' + img_not_authorized.src + '">' + decodeURI(IM.array_users[i].name).substr(0,decodeURI(IM.array_users[i].name).indexOf('@')) + '<span id="_span_not_' + IM.array_users[i].jid + '"></span></td>'+ |
---|
| 106 | '<td align="center"><a href="javascript:void(0);" onclick=Preferences.Info_Contact("'+IM.array_users[i].jid+'")> ? </a></td>'+ |
---|
| 107 | '<td align="center"><a href="javascript:void(0);" onclick=Preferences.updateLoad("'+IM.array_users[i].jid+'")> Sim </a>/<a href="javascript:void(0);" onclick=Preferences.Remove_Contact("'+IM.array_users[i].jid+'")> Não </a></td>'+ |
---|
| 108 | '</tr>'; |
---|
| 109 | count++; |
---|
| 110 | } |
---|
[27] | 111 | } |
---|
[33] | 112 | |
---|
| 113 | auth_user += '</table>'; |
---|
| 114 | |
---|
| 115 | if( count > 0 ){ |
---|
| 116 | var form_auth_user = '<div style="margin-left:5px;margin-top:2px">' + |
---|
| 117 | '</br>'+ |
---|
| 118 | '<b>O(s) contato(s) abaixo aguarda(m) sua autorização.' + |
---|
| 119 | '</br>Para adicionar este(s) novo(s) contato(s), basta dar um ' + |
---|
| 120 | 'clique em cima do contato.' + |
---|
| 121 | '<p>Contato(s) :' + |
---|
| 122 | '</b></br>' + |
---|
| 123 | '<div id="divChildrenFormAuthUser">'; |
---|
| 124 | form_auth_user += auth_user + '</div></div>'; |
---|
| 125 | _this.conf_form("divFormAuthUser",360,250,form_auth_user, ":: Contatos sem Cadastro - Expresso ::"); |
---|
| 126 | |
---|
| 127 | } |
---|
[24] | 128 | } |
---|
[20] | 129 | } |
---|
| 130 | |
---|
| 131 | /* |
---|
| 132 | * Vcard Usuario |
---|
| 133 | */ |
---|
| 134 | |
---|
| 135 | Templates.prototype.information_user = function() |
---|
| 136 | { |
---|
| 137 | var _this = this; |
---|
| 138 | var form_info_user = "<table border='0' cellpadding='1' cellspacing='2' width='90%' style='margin-top:10px'>"+ |
---|
| 139 | "<tr><td width='30%' align='right'>"+IM.get_lang("Full Name")+" .: </td><td><input id='FN' type='text name='text0' size='40' maxlength='40'></td></tr>"+ |
---|
| 140 | "<tr><td width='30%' align='right'>"+IM.get_lang("NickName")+" .: </td><td><input id='NICKNAME' type='text name='text1' size='20' maxlength='20'></td></tr>"+ |
---|
| 141 | "<tr><td width='30%' align='right'>"+IM.get_lang("Orgname")+" .: </td><td><input id='ORGNAME' type='text name='text4' size='17' maxlength='17'></td></tr>"+ |
---|
| 142 | "<tr><td width='30%' align='right'>"+IM.get_lang("Orgunit")+" .: </td><td><input id='ORGUNIT' type='text name='text5' size='10' maxlength='10'></td></tr>"+ |
---|
| 143 | "<tr><td width='30%' align='right'>"+IM.get_lang("Role")+" .: </td><td><input id='ROLE' type='text name='text6' size='25' maxlength='25'></td></tr>"+ |
---|
| 144 | "<tr><td width='30%' align='right'>"+IM.get_lang("Birthday")+" .: </td><td><input id='BDAY' type='text name='text7' size='10' maxlength='10'></td></tr>"+ |
---|
| 145 | "<tr><td width='30%' align='right'>"+IM.get_lang("your message")+" .: </td><td><input id='DESC' type='text name='text8' size='40' maxlength='40'></td></tr>"+ |
---|
| 146 | "</table>"+ |
---|
| 147 | "<table border='0' cellpading='1' cellspacing='2' width='100%'>"+ |
---|
| 148 | "<tr><input type='button' value='"+IM.get_lang('save')+"' onclick='javascript:Preferences.vCardAdd();'></tr>"+ |
---|
| 149 | "</table>"; |
---|
| 150 | _this.conf_form("divInfoUser",400,220,form_info_user, ":: " + IM.get_lang('Information User') + " - Expresso ::"); |
---|
| 151 | } |
---|
| 152 | |
---|
| 153 | Templates.prototype.information_Contact = function() |
---|
| 154 | { |
---|
| 155 | var _this = this; |
---|
| 156 | var form_info_contact = '<table border="0" cellpading="1" cellspacing="2" width="90%" style="margin-top:10px">'+ |
---|
| 157 | '<tr><td width="30%" align="right">'+IM.get_lang('Full Name')+' .: </td><td width="70%" align="left"><label id="_lbl_FN"></label></td></tr>'+ |
---|
| 158 | '<tr><td width="30%" align="right">'+IM.get_lang('NickName')+' .: </td><td width="70%" align="left"><label id="_lbl_Nickname"></label></td></tr>'+ |
---|
| 159 | '<tr><td width="30%" align="right">'+IM.get_lang('Orgunit')+' .: </td><td width="70%" align="left"><label id="_lbl_Orgunit"></label></td></tr>'+ |
---|
| 160 | '<tr><td width="30%" align="right">'+IM.get_lang('Role')+' .: </td><td width="70%" align="left"><label id="_lbl_Role"></label></td></tr>'+ |
---|
| 161 | '<tr><td width="30%" align="right">'+IM.get_lang('Birthday')+' .: </td><td width="70%" align="left"><label id="_lbl_Birthday"></label></td></tr>'+ |
---|
| 162 | '<table>'; |
---|
[24] | 163 | _this.conf_form("divInfoContact",430,130,form_info_contact,":: Informações do Contato - Expresso ::"); |
---|
[20] | 164 | |
---|
| 165 | } |
---|
| 166 | |
---|
| 167 | Templates.prototype.emotions = function() |
---|
| 168 | { |
---|
| 169 | grid = ''; |
---|
| 170 | grid += '<table cellpadding="0" cellspacing="0" border="0">'; |
---|
| 171 | grid += ' <tr>'; |
---|
| 172 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\':)\')" id="sendMessageMenuId"><img alt=":)" width="19" height="19" src="' + smile_1.src + '" /></div></td>'; |
---|
| 173 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\':d\')" id="sendMessageMenuId"><img alt=":d" width="19" height="19" src="' + smile_2.src + '" /></div></td>'; |
---|
| 174 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\';)\')" id="sendMessageMenuId"><img alt=";)" width="19" height="19" src="' + smile_3.src + '" /></div></td>'; |
---|
| 175 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\':o\')" id="sendMessageMenuId"><img alt=":o" width="19" height="19" src="' + smile_4.src + '" /></div></td>'; |
---|
| 176 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\':p\')" id="sendMessageMenuId"><img alt=":p" width="19" height="19" src="' + smile_5.src + '" /></div></td>'; |
---|
| 177 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'(h)\')" id="sendMessageMenuId"><img alt="(h)" width="19" height="19" src="' + smile_6.src + '" /></div></td>'; |
---|
| 178 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\':@\')" id="sendMessageMenuId"><img alt=":@" width="19" height="19" src="' + smile_7.src + '" /></div></td>'; |
---|
| 179 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\':$\')" id="sendMessageMenuId"><img alt=":$" width="19" height="19" src="' + smile_8.src + '" /></div></td>'; |
---|
| 180 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\':s\')" id="sendMessageMenuId"><img alt=":s" width="19" height="19" src="' + smile_9.src + '" /></div></td>'; |
---|
| 181 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\':(\')" id="sendMessageMenuId"><img alt=":(" width="19" height="19" src="' + smile_10.src + '" /></div></td>'; |
---|
| 182 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\':\\\'\(\')" id="sendMessageMenuId"><img alt=":\'(" width="19" height="19" src="' + smile_11.src + '" /></div></td>'; |
---|
| 183 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\':|\')" id="sendMessageMenuId"><img alt=":|" width="19" height="19" src="' + smile_12.src + '" /></div></td>'; |
---|
| 184 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'(6)\')" id="sendMessageMenuId"><img alt="(6)" width="19" height="19" src="' + smile_13.src + '" /></div></td>'; |
---|
| 185 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'(a)\')" id="sendMessageMenuId"><img alt="(a)" width="19" height="19" src="' + smile_14.src + '" /></div></td>'; |
---|
| 186 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'(l)\')" id="sendMessageMenuId"><img alt="(l)" width="19" height="19" src="' + smile_15.src + '" /></div></td>'; |
---|
| 187 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'(u)\')" id="sendMessageMenuId"><img alt="(u)" width="19" height="19" src="' + smile_16.src + '" /></div></td>'; |
---|
| 188 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'(m)\')" id="sendMessageMenuId"><img alt="(m)" width="19" height="19" src="' + smile_17.src + '" /></div></td>'; |
---|
| 189 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'(@)\')" id="sendMessageMenuId"><img alt="(@)" width="19" height="19" src="' + smile_18.src + '" /></div></td>'; |
---|
| 190 | grid += ' </tr>'; |
---|
| 191 | grid += ' <tr>'; |
---|
| 192 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'(&)\')" id="sendMessageMenuId"><img alt="(&)" width="19" height="19" src="' + smile_19.src + '" /></div></td>'; |
---|
| 193 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'(S)\')" id="sendMessageMenuId"><img alt="(S)" width="19" height="19" src="' + smile_20.src + '" /></div></td>'; |
---|
| 194 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'(*)\')" id="sendMessageMenuId"><img alt="(*)" width="19" height="19" src="' + smile_21.src + '" /></div></td>'; |
---|
| 195 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'(~)\')" id="sendMessageMenuId"><img alt="(~)" width="19" height="19" src="' + smile_22.src + '" /></div></td>'; |
---|
| 196 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'(8)\')" id="sendMessageMenuId"><img alt="(8)" width="19" height="19" src="' + smile_23.src + '" /></div></td>'; |
---|
| 197 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'(e)\')" id="sendMessageMenuId"><img alt="(e)" width="19" height="19" src="' + smile_24.src + '" /></div></td>'; |
---|
| 198 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'(f)\')" id="sendMessageMenuId"><img alt="(f)" width="19" height="19" src="' + smile_25.src + '" /></div></td>'; |
---|
| 199 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'(w)\')" id="sendMessageMenuId"><img alt="(w)" width="19" height="19" src="' + smile_26.src + '" /></div></td>'; |
---|
| 200 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'(o)\')" id="sendMessageMenuId"><img alt="(o)" width="19" height="19" src="' + smile_27.src + '" /></div></td>'; |
---|
| 201 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'(k)\')" id="sendMessageMenuId"><img alt="(k)" width="19" height="19" src="' + smile_28.src + '" /></div></td>'; |
---|
| 202 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'(g)\')" id="sendMessageMenuId"><img alt="(g)" width="19" height="19" src="' + smile_29.src + '" /></div></td>'; |
---|
| 203 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'(^)\')" id="sendMessageMenuId"><img alt="(^)" width="19" height="19" src="' + smile_30.src + '" /></div></td>'; |
---|
| 204 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'(p)\')" id="sendMessageMenuId"><img alt="(p)" width="19" height="19" src="' + smile_31.src + '" /></div></td>'; |
---|
| 205 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'(i)\')" id="sendMessageMenuId"><img alt="(i)" width="19" height="19" src="' + smile_32.src + '" /></div></td>'; |
---|
| 206 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'(c)\')" id="sendMessageMenuId"><img alt="(c)" width="19" height="19" src="' + smile_33.src + '" /></div></td>'; |
---|
| 207 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'(t)\')" id="sendMessageMenuId"><img alt="(t)" width="19" height="19" src="' + smile_34.src + '" /></div></td>'; |
---|
| 208 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'({)\')" id="sendMessageMenuId"><img alt="({)" width="19" height="19" src="' + smile_35.src + '" /></div></td>'; |
---|
| 209 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'(})\')" id="sendMessageMenuId"><img alt="(})" width="19" height="19" src="' + smile_36.src + '" /></div></td>'; |
---|
| 210 | grid += ' </tr>'; |
---|
| 211 | grid += ' <tr>'; |
---|
| 212 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'(b)\')" id="sendMessageMenuId"><img alt="(b)" width="19" height="19" src="' + smile_37.src + '" /></div></td>'; |
---|
| 213 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'(d)\')" id="sendMessageMenuId"><img alt="(d)" width="19" height="19" src="' + smile_38.src + '" /></div></td>'; |
---|
| 214 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'(z)\')" id="sendMessageMenuId"><img alt="(z)" width="19" height="19" src="' + smile_39.src + '" /></div></td>'; |
---|
| 215 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'(x)\')" id="sendMessageMenuId"><img alt="(x)" width="19" height="19" src="' + smile_40.src + '" /></div></td>'; |
---|
| 216 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'(y)\')" id="sendMessageMenuId"><img alt="(y)" width="19" height="19" src="' + smile_41.src + '" /></div></td>'; |
---|
| 217 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'(n)\')" id="sendMessageMenuId"><img alt="(n)" width="19" height="19" src="' + smile_42.src + '" /></div></td>'; |
---|
| 218 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\':[\')" id="sendMessageMenuId"><img alt=":[" width="19" height="19" src="' + smile_43.src + '" /></div></td>'; |
---|
| 219 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'(?)\')" id="sendMessageMenuId"><img alt="(?)" width="19" height="19" src="' + smile_44.src + '" /></div></td>'; |
---|
| 220 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'(%)\')" id="sendMessageMenuId"><img alt="(%)" width="19" height="19" src="' + smile_45.src + '" /></div></td>'; |
---|
| 221 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'(#)\')" id="sendMessageMenuId"><img alt="(#)" width="19" height="19" src="' + smile_46.src + '" /></div></td>'; |
---|
| 222 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'(r)\')" id="sendMessageMenuId"><img alt="(r)" width="19" height="19" src="' + smile_47.src + '" /></div></td>'; |
---|
| 223 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\':-#\')" id="sendMessageMenuId"><img alt=":-#" width="19" height="19" src="' + smile_48.src + '" /></div></td>'; |
---|
| 224 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'8o|\')" id="sendMessageMenuId"><img alt="8o|" width="19" height="19" src="' + smile_49.src + '" /></div></td>'; |
---|
| 225 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'8-|\')" id="sendMessageMenuId"><img alt="8-|" width="19" height="19" src="' + smile_50.src + '" /></div></td>'; |
---|
| 226 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'^o)\')" id="sendMessageMenuId"><img alt="^o)" width="19" height="19" src="' + smile_51.src + '" /></div></td>'; |
---|
| 227 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\':-*\')" id="sendMessageMenuId"><img alt=":-*" width="19" height="19" src="' + smile_52.src + '" /></div></td>'; |
---|
[24] | 228 | grid += ' <td><div class="emotionItem" onMouseover="im_win.hAuthorizationighlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'+o(\')" id="sendMessageMenuId"><img alt="+o(" width="19" height="19" src="' + smile_53.src + '" /></div></td>'; |
---|
[20] | 229 | grid += ' <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'(sn)\')" id="sendMessageMenuId"><img alt=(sn)"" width="19" height="19" src="' + smile_54.src + '" /></div></td>'; |
---|
| 230 | grid += ' </tr>'; |
---|
| 231 | grid += ' <tr>'; |
---|
| 232 | grid += ' <td colspan="18"><div style="background:#cccccc;margin:1px"><img src="templates/default/images/img/blank.gif" height="1" width="1" border="0"/></div></td>'; |
---|
| 233 | grid += ' </tr>'; |
---|
| 234 | grid += ' <tr>'; |
---|
| 235 | grid += ' </tr>'; |
---|
| 236 | grid += ' <td colspan="18"><div class="emotionItem" !style="width:100%" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.hideEmotionSelection()" id="closeEmotionSelectionDiv">Close This Menu</div></td>'; |
---|
| 237 | grid += ' </tr>'; |
---|
| 238 | grid += '</table>'; |
---|
| 239 | |
---|
| 240 | return grid; |
---|
| 241 | } |
---|
| 242 | |
---|
| 243 | Templates.prototype.font_name = function() |
---|
| 244 | { |
---|
| 245 | grid = ''; |
---|
| 246 | grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_conf_font.changeFont(\'Arial\')" id="fontStyle1" style="width:120px;font-family:arial">Arial</div>'; |
---|
| 247 | grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_conf_font.changeFont(\'Courier\')" id="fontStyle1" style="width:120px;font-family:Courier">Courier</div>'; |
---|
[36] | 248 | grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_conf_font.changeFont(\'Times\')" id="fontStyle1" style="width:120px;font-family:Times New Roman">Times New Roman</div>'; |
---|
[20] | 249 | grid += '<div style="background:#cccccc;margin:1px"><img src="../images/blank.gif" height="1" width="1" border="0"/></div>'; |
---|
| 250 | grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.hideFontNameSelection()" id="fontStyle1" style="width:120px">Close This Menu</div>'; |
---|
| 251 | |
---|
| 252 | return grid; |
---|
| 253 | } |
---|
| 254 | |
---|
| 255 | Templates.prototype.font_size = function() |
---|
| 256 | { |
---|
| 257 | grid = ''; |
---|
| 258 | grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_conf_font.changeSizeFont(\'9pt\');" id="fontStyle1" style="width:100px">9</div>'; |
---|
| 259 | grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_conf_font.changeSizeFont(\'10pt\');" id="fontStyle1" style="width:100px">10</div>'; |
---|
| 260 | grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_conf_font.changeSizeFont(\'11pt\');" id="fontStyle1" style="width:100px">11</div>'; |
---|
| 261 | grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_conf_font.changeSizeFont(\'12pt\');" id="fontStyle1" style="width:100px">12</div>'; |
---|
| 262 | grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_conf_font.changeSizeFont(\'14pt\');" id="fontStyle1" style="width:1!00px">14</div>'; |
---|
| 263 | grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_conf_font.changeSizeFont(\'16pt\');" id="fontStyle1" style="width:100px">16</div>'; |
---|
| 264 | grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_conf_font.changeSizeFont(\'18pt\');" id="fontStyle1" style="width:100px">18</div>'; |
---|
| 265 | grid += '<div style="background:#cccccc;margin:1px"><img src="../images/blank.gif" height="1" width="1" border="0"/></div>'; |
---|
| 266 | grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.hideFontSizeSelection()" id="fontStyle1" style="width:100px">Close This Menu</div>'; |
---|
| 267 | |
---|
| 268 | return grid; |
---|
| 269 | } |
---|
| 270 | |
---|
| 271 | Templates.prototype.font_color = function() |
---|
| 272 | { |
---|
| 273 | grid = ''; |
---|
| 274 | grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_conf_font.changeFontColor(\'#000000\')" id="fontStyle1" style="width:100px">Black</div>'; |
---|
| 275 | grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_conf_font.changeFontColor(\'#c0c0c0\')" id="fontStyle1" style="width:100px">Silver</div>'; |
---|
| 276 | grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_conf_font.changeFontColor(\'#ffff00\')" id="fontStyle1" style="width:100px">Yellow</div>'; |
---|
| 277 | grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_conf_font.changeFontColor(\'#ff0000\')" id="fontStyle1" style="width:100px">Red</div>'; |
---|
| 278 | grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_conf_font.changeFontColor(\'#ff00ff\')" id="fontStyle1" style="width:100px">Pink</div>'; |
---|
| 279 | grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_conf_font.changeFontColor(\'#00ff00\')" id="fontStyle1" style="width:100px">Green</div>'; |
---|
| 280 | grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_conf_font.changeFontColor(\'#1111ff\')" id="fontStyle1" style="width:100px">Blue</div>'; |
---|
| 281 | grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_conf_font.changeFontColor(\'#800080\')" id="fontStyle1" style="width:100px">Magenta</div>'; |
---|
| 282 | grid += '<div style="background:#cccccc;margin:1px"><img src="../images/blank.gif" height="1" width="1" border="0"/></div>'; |
---|
| 283 | grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.hideFontColorSelection()" id="fontStyle1" style="width:100px">Close This Menu</div>'; |
---|
| 284 | |
---|
| 285 | return grid; |
---|
| 286 | } |
---|
| 287 | |
---|
| 288 | Templates.prototype.font_style = function() |
---|
| 289 | { |
---|
| 290 | grid = ''; |
---|
| 291 | grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_conf_font.changeFontStyle(\'normal\')" id="fontStyle1" style="width:100px">Regular</div>'; |
---|
| 292 | grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_conf_font.changeFontStyle(\'italic\')" id="fontStyle1" style="width:100px"><i>Italic</i></div>'; |
---|
| 293 | grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_conf_font.changeFontStyle(\'bold\')" id="fontStyle1" style="width:100px"><b>Bold</b></div>'; |
---|
| 294 | grid += '<div style="background:#cccccc;margin:1px"><img src="../images/blank.gif" height="1" width="1" border="0"/></div>'; |
---|
| 295 | grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.hideFontStyleSelection()" id="fontStyle1" style="width:100px">Close This Menu</div>'; |
---|
| 296 | |
---|
| 297 | return grid; |
---|
| 298 | } |
---|
| 299 | |
---|
| 300 | /* |
---|
| 301 | * Send File |
---|
| 302 | */ |
---|
| 303 | |
---|
| 304 | Templates.prototype.Send_file = function(pJid) |
---|
| 305 | { |
---|
| 306 | var _this = this; |
---|
| 307 | var form_send_file = '<iframe style="display:none;" name="send_file"></iframe>'+ |
---|
| 308 | '<div id="div_send_file_im" style="margin-left:5px;margin-top:10px;display:block;">'+ |
---|
| 309 | '<span>.: Enviar Arquivo :.</span><br>'+ |
---|
| 310 | '<form method="POST" target="send_file" action="'+im_path+'inc/class.upload.inc.php" enctype="multipart/form-data">'+ |
---|
| 311 | '<input id="to_jid_im" type="hidden" value="' + pJid + '" name="to">'+ |
---|
| 312 | '<input id="send_file_im" type="file" size="40" name="file">'+ |
---|
| 313 | '<br><br><input type="submit" value="'+IM.get_lang('Send')+'" onclick="javascript:Templates.Wait_file(\'' + pJid + '\');return true;">'+ |
---|
| 314 | '</form></div>'+ |
---|
| 315 | '<div id="status_upload" style="margin-left:5px;margin-top:10px;display:none;">' + |
---|
| 316 | '<span>.: Status da Transferência :.</span>'+ |
---|
| 317 | '<br><br>'+ |
---|
| 318 | '<div id="progressbar_p" style="border:1px solid #C9D9E8;width:70%;height:12%">'+ |
---|
| 319 | '<div id="progressbar_f" style="border:1px solid #000;width:0%;height:100%;background-color:#C9D9E8;text-align:right">'+ |
---|
| 320 | '<font style="font-size:8pt"><span id="porcent_im">100%</span></font>'+ |
---|
| 321 | '</div></div></div>'; |
---|
| 322 | _this.conf_form("divSendFile",360,110,form_send_file,":: Envio de Arquivo - Expresso ::"); |
---|
| 323 | } |
---|
| 324 | |
---|
| 325 | Templates.prototype.Wait_file = function(pJid) |
---|
| 326 | { |
---|
| 327 | if(document.getElementById("send_file_im").value != ""){ |
---|
| 328 | document.getElementById("div_send_file_im").style.display = "none"; |
---|
| 329 | document.getElementById("status_upload").style.display = "block"; |
---|
| 330 | this.UpdateStatusSendFile(pJid); |
---|
| 331 | }else{ |
---|
| 332 | alert("É necessário informar um arquivo para envio!"); |
---|
| 333 | } |
---|
| 334 | } |
---|
| 335 | |
---|
| 336 | Templates.prototype.UpdateStatusSendFile = function(pJid) |
---|
| 337 | { |
---|
| 338 | var _this = this; |
---|
| 339 | this.time_set = setTimeout("Templates.Wait_file('" + pJid + "')",80); |
---|
| 340 | if(this.transfer == 100){ |
---|
| 341 | clearTimeout(this.time_set); |
---|
| 342 | document.getElementById("div_send_file_im").style.display = "block"; |
---|
| 343 | document.getElementById("status_upload").style.display = "none"; |
---|
| 344 | document.getElementById("send_file_im").value = ""; |
---|
| 345 | this.transfer = 0; |
---|
| 346 | this.time_set = ""; |
---|
| 347 | // Envia a Mensagem para a baixa do arquivo; |
---|
| 348 | var h_name_file = function(data){ |
---|
| 349 | //var pJID = "alexandrecorreia@im.pr.gov.br"; |
---|
| 350 | var pJID = pJid; |
---|
| 351 | var message_conf = '<iframe name="IM_down_file" style="display:none"></iframe>'+ |
---|
| 352 | '<b>VOCÊ ACABA DE RECEBER UM ARQUIVO !!!! </b>'+ |
---|
| 353 | '<a href="../instant_messenger/inc/class.download.inc.php?file=' + data + '" target="IM_down_file">Clique aqui</a>'; |
---|
| 354 | var Conf_send_file = function(data){ |
---|
| 355 | if(!data) |
---|
| 356 | alert(data); |
---|
| 357 | } |
---|
| 358 | cIM.cExecute("$this.Ujabber.SendMessage",Conf_send_file,"to="+pJID+"&body="+url_encode(encodeURI(message_conf))); |
---|
| 359 | } |
---|
| 360 | cIM.cExecute("$this.upload.name_file",h_name_file); |
---|
| 361 | }else{ |
---|
| 362 | var h_size_file = function(data){ |
---|
| 363 | _this.transfer++; |
---|
| 364 | document.getElementById("progressbar_f").style.width = _this.transfer + "%"; |
---|
| 365 | document.getElementById("porcent_im").innerHTML = _this.transfer + "%"; |
---|
| 366 | } |
---|
| 367 | cIM.cExecute("$this.upload.size_file",h_size_file); |
---|
| 368 | } |
---|
| 369 | } |
---|
| 370 | |
---|
[32] | 371 | /* |
---|
| 372 | * Preferências do usuário |
---|
| 373 | */ |
---|
| 374 | Templates.prototype.yourPreferences = function() |
---|
| 375 | { |
---|
| 376 | var form_your_prefe = '<div style="margin-left:10px;margin-top:5px"><dl>' + |
---|
[33] | 377 | '<fieldset><legend> Opções :</legend>'+ |
---|
| 378 | '<dt><input id="ch_time" type="checkbox"> Mostar marcação de tempo </dt> ' + |
---|
| 379 | '<dt><input id="ch_offline" type="checkbox"> Exibir amigos desconectados </dt> ' + |
---|
| 380 | '<dt><input id="ch_contacts" type="checkbox"> Desativar aviso de novos contatos </dt> ' + |
---|
| 381 | '<dl></fieldset></div>' + |
---|
| 382 | '<div style="margin-left:10px;margin-top:5px">' + |
---|
| 383 | '<fieldset><legend> Ativar aviso de mensagens recebidas :</legend>'+ |
---|
| 384 | '<input id="rd_nm" type="radio" name="rd_aviso"> Normal <i>(Função Indisponível)</i></br>' + |
---|
| 385 | '<input id="rd_al" type="radio" name="rd_aviso"> Com Alertas <i>(Função Indisponível)</i></br>' + |
---|
| 386 | '<input id="rd_ch" type="radio" name="rd_aviso"> Treme Tela <i>(Função Indisponível)</i>' + |
---|
| 387 | '</fieldset>'+ |
---|
| 388 | '</div>'+ |
---|
| 389 | '<div style="margin-left:10px;margin-top:5px">'+ |
---|
| 390 | '<font style="size:8pt;color:red">* É necessário salvar as opções *</p>'+ |
---|
| 391 | '<input type="button" value="Salvar" onclick="javascript:Preferences.SetPreferences()">'+ |
---|
| 392 | '<input type="button" value="Cancelar" onclick="javascript:im_win.windowClose(\'divYourPrefe_im_window\')">'+ |
---|
| 393 | '</div>'; |
---|
| 394 | |
---|
| 395 | this.conf_form("divYourPrefe",345,230,form_your_prefe,":: " + IM.get_lang('Preferences') + " - Expresso ::"); |
---|
[32] | 396 | } |
---|
| 397 | |
---|
[20] | 398 | //Templates |
---|
| 399 | var Templates = new Templates(); |
---|