[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 | |
---|
| 45 | var form_add_user = "<span><b>Selecione uma Organização .: </b><select id='ImSelOrg' name='ImSelOrg' onchange='Preferences.SearchContacts();'></select>" + |
---|
| 46 | "</span>"+ |
---|
| 47 | "<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%' >"+ |
---|
| 48 | "<tr><td><b>"+IM.get_lang('Jid Contact')+".:</b></td><td><input id='text0' type='text' size='40' maxlength='40'></td></tr>"+ |
---|
| 49 | "<tr><td><b>"+IM.get_lang('Nickname')+".:</b></td><td><input id='text1' type='text' size='20' maxlength='20'></td></tr>"+ |
---|
| 50 | "<tr><td><b>"+IM.get_lang('Group')+".:</b></td><td><input id='text2' type='text' size='20' maxlength='20'></td></tr>"+ |
---|
| 51 | "<tr><td colspan='2'><input type='button' value='"+IM.get_lang('Add')+"' onclick='Preferences.Add_user(\"divAddUser_im\")'></td></tr>"+ |
---|
| 52 | "</table>" |
---|
| 53 | _this.conf_form("divAddUser",500,285,form_add_user,":: " + IM.get_lang('Add New Contact') + " - Expresso ::"); |
---|
| 54 | } |
---|
| 55 | |
---|
| 56 | /* |
---|
| 57 | * Del Usuario |
---|
| 58 | */ |
---|
| 59 | |
---|
| 60 | Templates.prototype.remove_user = function() |
---|
| 61 | { |
---|
| 62 | var _this = this; |
---|
| 63 | var form_del_user = "<div style='margin-left:20px;margin-top:20px'>"+ |
---|
| 64 | "<span>"+IM.get_lang('Contact')+" .: </span>"+ |
---|
| 65 | "<span style='margin-left:20px'><select id='sel_contact'></select></span><br>"+ |
---|
| 66 | "<p><span><input type='button' value='"+IM.get_lang('Remove')+"' onclick='javascript:Preferences.Remove_user()'></span>"+ |
---|
| 67 | "</div>"; |
---|
| 68 | |
---|
| 69 | _this.conf_form("divDelUser",400,110,form_del_user,":: " + IM.get_lang('Remove Contact') + " - Expresso ::"); |
---|
| 70 | } |
---|
| 71 | |
---|
| 72 | /* |
---|
| 73 | * Update Usuario |
---|
| 74 | */ |
---|
| 75 | |
---|
| 76 | Templates.prototype.update_user = function() |
---|
| 77 | { |
---|
| 78 | if(document.getElementById("divChildrenFormAuthUser") != null){ |
---|
| 79 | im_win.windowClose("divFormAuthUser_im"); |
---|
| 80 | } |
---|
| 81 | |
---|
| 82 | var _this = this; |
---|
| 83 | var form_update_user = "<table border='0' cellpadding='1' cellspacing='2' align='center' width='90%'>"+ |
---|
| 84 | "<tr><td><input id='text0' type='hidden' size='40' maxlength='40'></td></tr>"+ |
---|
| 85 | "<tr><td><b>Contato .:</b></td><td><span id='span0'></span></td></tr>"+ |
---|
| 86 | "<tr><td><b>"+IM.get_lang('Nickname')+".:</b></td><td><input id='text1' type='text' size='20' maxlength='20'></td></tr>"+ |
---|
| 87 | "<tr><td><b>"+IM.get_lang('Group')+".:</b></td><td><input id='text2' type='text' size='20' maxlength='20'></td></tr>"+ |
---|
| 88 | "<tr><td colspan='2'><input type='button' value='"+IM.get_lang('Update')+"' onclick='Preferences.Add_user(\"divUpdateUser_im\")'></td></tr>"+ |
---|
| 89 | "</table>"; |
---|
| 90 | _this.conf_form("divUpdateUser",300,110,form_update_user,":: Adicionar Contato - Expresso ::"); |
---|
| 91 | } |
---|
| 92 | |
---|
| 93 | Templates.prototype.Users_Not_Auth = function () |
---|
| 94 | { |
---|
| 95 | var _this = this; |
---|
| 96 | var form_auth_user = "<div style='margin-left:10px;margin-top:5'>" + |
---|
| 97 | "<br>"+ |
---|
| 98 | "<b>O(s) contato(s) abaixo aguarda(m) sua autorização." + |
---|
| 99 | "<br>Para adicionar este(s) novo(s) contato(s), basta dar um " + |
---|
| 100 | "<br>clique em cima do contato." + |
---|
| 101 | "<p>Contato(s) :" + |
---|
| 102 | "</b><br>" + |
---|
| 103 | "<div id='divChildrenFormAuthUser'>" + |
---|
| 104 | "<p>" + document.getElementById('not_aut').innerHTML + |
---|
| 105 | "</div></div>"; |
---|
| 106 | |
---|
| 107 | _this.conf_form("divFormAuthUser",370,200,form_auth_user, ":: Contatos sem Cadastro - Expresso ::"); |
---|
| 108 | |
---|
| 109 | } |
---|
| 110 | |
---|
| 111 | /* |
---|
| 112 | * Vcard Usuario |
---|
| 113 | */ |
---|
| 114 | |
---|
| 115 | Templates.prototype.information_user = function() |
---|
| 116 | { |
---|
| 117 | var _this = this; |
---|
| 118 | var form_info_user = "<table border='0' cellpadding='1' cellspacing='2' width='90%' style='margin-top:10px'>"+ |
---|
| 119 | "<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>"+ |
---|
| 120 | "<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>"+ |
---|
| 121 | "<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>"+ |
---|
| 122 | "<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>"+ |
---|
| 123 | "<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>"+ |
---|
| 124 | "<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>"+ |
---|
| 125 | "<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>"+ |
---|
| 126 | "</table>"+ |
---|
| 127 | "<table border='0' cellpading='1' cellspacing='2' width='100%'>"+ |
---|
| 128 | "<tr><input type='button' value='"+IM.get_lang('save')+"' onclick='javascript:Preferences.vCardAdd();'></tr>"+ |
---|
| 129 | "</table>"; |
---|
| 130 | _this.conf_form("divInfoUser",400,220,form_info_user, ":: " + IM.get_lang('Information User') + " - Expresso ::"); |
---|
| 131 | } |
---|
| 132 | |
---|
| 133 | Templates.prototype.information_Contact = function() |
---|
| 134 | { |
---|
| 135 | var _this = this; |
---|
| 136 | var form_info_contact = '<table border="0" cellpading="1" cellspacing="2" width="90%" style="margin-top:10px">'+ |
---|
| 137 | '<tr><td width="30%" align="right">'+IM.get_lang('Full Name')+' .: </td><td width="70%" align="left"><label id="_lbl_FN"></label></td></tr>'+ |
---|
| 138 | '<tr><td width="30%" align="right">'+IM.get_lang('NickName')+' .: </td><td width="70%" align="left"><label id="_lbl_Nickname"></label></td></tr>'+ |
---|
| 139 | '<tr><td width="30%" align="right">'+IM.get_lang('Orgunit')+' .: </td><td width="70%" align="left"><label id="_lbl_Orgunit"></label></td></tr>'+ |
---|
| 140 | '<tr><td width="30%" align="right">'+IM.get_lang('Role')+' .: </td><td width="70%" align="left"><label id="_lbl_Role"></label></td></tr>'+ |
---|
| 141 | '<tr><td width="30%" align="right">'+IM.get_lang('Birthday')+' .: </td><td width="70%" align="left"><label id="_lbl_Birthday"></label></td></tr>'+ |
---|
| 142 | '<table>'; |
---|
| 143 | _this.conf_form("divInfoContact",400,130,form_info_contact,":: Informações do Contato - Expresso ::"); |
---|
| 144 | |
---|
| 145 | } |
---|
| 146 | |
---|
| 147 | Templates.prototype.emotions = function() |
---|
| 148 | { |
---|
| 149 | grid = ''; |
---|
| 150 | grid += '<table cellpadding="0" cellspacing="0" border="0">'; |
---|
| 151 | grid += ' <tr>'; |
---|
| 152 | 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>'; |
---|
| 153 | 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>'; |
---|
| 154 | 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>'; |
---|
| 155 | 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>'; |
---|
| 156 | 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>'; |
---|
| 157 | 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>'; |
---|
| 158 | 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>'; |
---|
| 159 | 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>'; |
---|
| 160 | 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>'; |
---|
| 161 | 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>'; |
---|
| 162 | 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>'; |
---|
| 163 | 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>'; |
---|
| 164 | 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>'; |
---|
| 165 | 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>'; |
---|
| 166 | 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>'; |
---|
| 167 | 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>'; |
---|
| 168 | 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>'; |
---|
| 169 | 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>'; |
---|
| 170 | grid += ' </tr>'; |
---|
| 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_19.src + '" /></div></td>'; |
---|
| 173 | 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>'; |
---|
| 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_21.src + '" /></div></td>'; |
---|
| 175 | 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>'; |
---|
| 176 | 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>'; |
---|
| 177 | 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>'; |
---|
| 178 | 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>'; |
---|
| 179 | 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>'; |
---|
| 180 | 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>'; |
---|
| 181 | 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>'; |
---|
| 182 | 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>'; |
---|
| 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_30.src + '" /></div></td>'; |
---|
| 184 | 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>'; |
---|
| 185 | 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>'; |
---|
| 186 | 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>'; |
---|
| 187 | 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>'; |
---|
| 188 | 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>'; |
---|
| 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_36.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(\'(b)\')" id="sendMessageMenuId"><img alt="(b)" width="19" height="19" src="' + smile_37.src + '" /></div></td>'; |
---|
| 193 | 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>'; |
---|
| 194 | 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>'; |
---|
| 195 | 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>'; |
---|
| 196 | 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>'; |
---|
| 197 | 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>'; |
---|
| 198 | 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>'; |
---|
| 199 | 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>'; |
---|
| 200 | 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>'; |
---|
| 201 | 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>'; |
---|
| 202 | 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>'; |
---|
| 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_48.src + '" /></div></td>'; |
---|
| 204 | 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>'; |
---|
| 205 | 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>'; |
---|
| 206 | 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>'; |
---|
| 207 | 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>'; |
---|
| 208 | 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_53.src + '" /></div></td>'; |
---|
| 209 | 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>'; |
---|
| 210 | grid += ' </tr>'; |
---|
| 211 | grid += ' <tr>'; |
---|
| 212 | 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>'; |
---|
| 213 | grid += ' </tr>'; |
---|
| 214 | grid += ' <tr>'; |
---|
| 215 | grid += ' </tr>'; |
---|
| 216 | 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>'; |
---|
| 217 | grid += ' </tr>'; |
---|
| 218 | grid += '</table>'; |
---|
| 219 | |
---|
| 220 | return grid; |
---|
| 221 | } |
---|
| 222 | |
---|
| 223 | Templates.prototype.font_name = function() |
---|
| 224 | { |
---|
| 225 | grid = ''; |
---|
| 226 | 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>'; |
---|
| 227 | 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>'; |
---|
| 228 | 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>'; |
---|
| 229 | grid += '<div style="background:#cccccc;margin:1px"><img src="../images/blank.gif" height="1" width="1" border="0"/></div>'; |
---|
| 230 | 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>'; |
---|
| 231 | |
---|
| 232 | return grid; |
---|
| 233 | } |
---|
| 234 | |
---|
| 235 | Templates.prototype.font_size = function() |
---|
| 236 | { |
---|
| 237 | grid = ''; |
---|
| 238 | 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>'; |
---|
| 239 | 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>'; |
---|
| 240 | 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>'; |
---|
| 241 | 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>'; |
---|
| 242 | 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>'; |
---|
| 243 | 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>'; |
---|
| 244 | 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>'; |
---|
| 245 | grid += '<div style="background:#cccccc;margin:1px"><img src="../images/blank.gif" height="1" width="1" border="0"/></div>'; |
---|
| 246 | 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>'; |
---|
| 247 | |
---|
| 248 | return grid; |
---|
| 249 | } |
---|
| 250 | |
---|
| 251 | Templates.prototype.font_color = function() |
---|
| 252 | { |
---|
| 253 | grid = ''; |
---|
| 254 | 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>'; |
---|
| 255 | 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>'; |
---|
| 256 | 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>'; |
---|
| 257 | 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>'; |
---|
| 258 | 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>'; |
---|
| 259 | 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>'; |
---|
| 260 | 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>'; |
---|
| 261 | 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>'; |
---|
| 262 | grid += '<div style="background:#cccccc;margin:1px"><img src="../images/blank.gif" height="1" width="1" border="0"/></div>'; |
---|
| 263 | 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>'; |
---|
| 264 | |
---|
| 265 | return grid; |
---|
| 266 | } |
---|
| 267 | |
---|
| 268 | Templates.prototype.font_style = function() |
---|
| 269 | { |
---|
| 270 | grid = ''; |
---|
| 271 | 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>'; |
---|
| 272 | 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>'; |
---|
| 273 | 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>'; |
---|
| 274 | grid += '<div style="background:#cccccc;margin:1px"><img src="../images/blank.gif" height="1" width="1" border="0"/></div>'; |
---|
| 275 | 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>'; |
---|
| 276 | |
---|
| 277 | return grid; |
---|
| 278 | } |
---|
| 279 | |
---|
| 280 | /* |
---|
| 281 | * Send File |
---|
| 282 | */ |
---|
| 283 | |
---|
| 284 | Templates.prototype.Send_file = function(pJid) |
---|
| 285 | { |
---|
| 286 | var _this = this; |
---|
| 287 | var form_send_file = '<iframe style="display:none;" name="send_file"></iframe>'+ |
---|
| 288 | '<div id="div_send_file_im" style="margin-left:5px;margin-top:10px;display:block;">'+ |
---|
| 289 | '<span>.: Enviar Arquivo :.</span><br>'+ |
---|
| 290 | '<form method="POST" target="send_file" action="'+im_path+'inc/class.upload.inc.php" enctype="multipart/form-data">'+ |
---|
| 291 | '<input id="to_jid_im" type="hidden" value="' + pJid + '" name="to">'+ |
---|
| 292 | '<input id="send_file_im" type="file" size="40" name="file">'+ |
---|
| 293 | '<br><br><input type="submit" value="'+IM.get_lang('Send')+'" onclick="javascript:Templates.Wait_file(\'' + pJid + '\');return true;">'+ |
---|
| 294 | '</form></div>'+ |
---|
| 295 | '<div id="status_upload" style="margin-left:5px;margin-top:10px;display:none;">' + |
---|
| 296 | '<span>.: Status da Transferência :.</span>'+ |
---|
| 297 | '<br><br>'+ |
---|
| 298 | '<div id="progressbar_p" style="border:1px solid #C9D9E8;width:70%;height:12%">'+ |
---|
| 299 | '<div id="progressbar_f" style="border:1px solid #000;width:0%;height:100%;background-color:#C9D9E8;text-align:right">'+ |
---|
| 300 | '<font style="font-size:8pt"><span id="porcent_im">100%</span></font>'+ |
---|
| 301 | '</div></div></div>'; |
---|
| 302 | _this.conf_form("divSendFile",360,110,form_send_file,":: Envio de Arquivo - Expresso ::"); |
---|
| 303 | } |
---|
| 304 | |
---|
| 305 | Templates.prototype.Wait_file = function(pJid) |
---|
| 306 | { |
---|
| 307 | if(document.getElementById("send_file_im").value != ""){ |
---|
| 308 | document.getElementById("div_send_file_im").style.display = "none"; |
---|
| 309 | document.getElementById("status_upload").style.display = "block"; |
---|
| 310 | this.UpdateStatusSendFile(pJid); |
---|
| 311 | }else{ |
---|
| 312 | alert("É necessário informar um arquivo para envio!"); |
---|
| 313 | } |
---|
| 314 | } |
---|
| 315 | |
---|
| 316 | Templates.prototype.UpdateStatusSendFile = function(pJid) |
---|
| 317 | { |
---|
| 318 | var _this = this; |
---|
| 319 | this.time_set = setTimeout("Templates.Wait_file('" + pJid + "')",80); |
---|
| 320 | if(this.transfer == 100){ |
---|
| 321 | clearTimeout(this.time_set); |
---|
| 322 | document.getElementById("div_send_file_im").style.display = "block"; |
---|
| 323 | document.getElementById("status_upload").style.display = "none"; |
---|
| 324 | document.getElementById("send_file_im").value = ""; |
---|
| 325 | this.transfer = 0; |
---|
| 326 | this.time_set = ""; |
---|
| 327 | // Envia a Mensagem para a baixa do arquivo; |
---|
| 328 | var h_name_file = function(data){ |
---|
| 329 | //var pJID = "alexandrecorreia@im.pr.gov.br"; |
---|
| 330 | var pJID = pJid; |
---|
| 331 | var message_conf = '<iframe name="IM_down_file" style="display:none"></iframe>'+ |
---|
| 332 | '<b>VOCÊ ACABA DE RECEBER UM ARQUIVO !!!! </b>'+ |
---|
| 333 | '<a href="../instant_messenger/inc/class.download.inc.php?file=' + data + '" target="IM_down_file">Clique aqui</a>'; |
---|
| 334 | var Conf_send_file = function(data){ |
---|
| 335 | if(!data) |
---|
| 336 | alert(data); |
---|
| 337 | } |
---|
| 338 | cIM.cExecute("$this.Ujabber.SendMessage",Conf_send_file,"to="+pJID+"&body="+url_encode(encodeURI(message_conf))); |
---|
| 339 | } |
---|
| 340 | cIM.cExecute("$this.upload.name_file",h_name_file); |
---|
| 341 | }else{ |
---|
| 342 | var h_size_file = function(data){ |
---|
| 343 | _this.transfer++; |
---|
| 344 | document.getElementById("progressbar_f").style.width = _this.transfer + "%"; |
---|
| 345 | document.getElementById("porcent_im").innerHTML = _this.transfer + "%"; |
---|
| 346 | } |
---|
| 347 | cIM.cExecute("$this.upload.size_file",h_size_file); |
---|
| 348 | } |
---|
| 349 | } |
---|
| 350 | |
---|
| 351 | //Templates |
---|
| 352 | var Templates = new Templates(); |
---|