[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 | } |
---|
[55] | 17 | |
---|
[20] | 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 | var _this = this; |
---|
[55] | 42 | var _XmlAddUser = '<adduser>' + |
---|
| 43 | '<top lang1="'+IM.get_lang('Selecione uma Organização')+'" />' + |
---|
| 44 | '<bottom lang1="'+IM.get_lang('Jid Contact')+'" lang2="'+IM.get_lang('Nickname')+'" lang3="'+IM.get_lang('Group')+'" lang4="'+IM.get_lang('Add')+'"/>' + |
---|
| 45 | '</adduser>'; |
---|
| 46 | |
---|
| 47 | _this.conf_form("divAddUser",515,285,parse_XmlXsl(_XmlAddUser,'add_user.xsl'),":: " + IM.get_lang('Add New Contact') + " - Expresso ::"); |
---|
[20] | 48 | } |
---|
[55] | 49 | |
---|
| 50 | Templates.prototype.AcceptRequestUser = function() |
---|
| 51 | { |
---|
| 52 | var _this = this; |
---|
| 53 | var _XmlupdUser = '<updUser>' + |
---|
| 54 | '<body lang1="'+IM.get_lang('Nickname')+'" lang2="'+IM.get_lang('Group')+'" lang3="'+IM.get_lang('Update')+'" />' + |
---|
| 55 | '</updUser>'; |
---|
| 56 | |
---|
| 57 | _this.conf_form("divUpdateUser",300,110,parse_XmlXsl(_XmlupdUser,'upd_user.xsl'),":: " + IM.get_lang('Add New Contact') + " - Expresso ::"); |
---|
| 58 | } |
---|
[20] | 59 | |
---|
| 60 | /* |
---|
| 61 | * Del Usuario |
---|
| 62 | */ |
---|
| 63 | |
---|
| 64 | Templates.prototype.remove_user = function() |
---|
| 65 | { |
---|
| 66 | var _this = this; |
---|
[55] | 67 | var _XmlDelUser = '<deluser>' + |
---|
| 68 | '<body lang1="'+IM.get_lang('Contact')+'" lang2="'+IM.get_lang('Remove')+'" />' + |
---|
| 69 | '</deluser>'; |
---|
[20] | 70 | |
---|
[55] | 71 | _this.conf_form("divDelUser",300,110,parse_XmlXsl(_XmlDelUser,'del_user.xsl'),":: " + IM.get_lang('Remove Contact') + " - Expresso ::"); |
---|
[20] | 72 | } |
---|
| 73 | |
---|
| 74 | /* |
---|
| 75 | * Update Usuario |
---|
| 76 | */ |
---|
| 77 | |
---|
[55] | 78 | Templates.prototype.Users_Not_Auth = function (jids) |
---|
[20] | 79 | { |
---|
| 80 | var _this = this; |
---|
[55] | 81 | var _XmlUserNAuth = '<jids>'; |
---|
| 82 | for(var i in jids) |
---|
| 83 | { |
---|
| 84 | _XmlUserNAuth += '<item id="im_cell_'+jids[i]+'" jid="'+jids[i]+'" />'; |
---|
[24] | 85 | } |
---|
[55] | 86 | _XmlUserNAuth += '</jids>'; |
---|
| 87 | if(document.getElementById('divFormAuthUser_im') == null){ |
---|
| 88 | _this.conf_form("divFormAuthUser",360,250,parse_XmlXsl(_XmlUserNAuth,'user_not_auth.xsl'), ":: Contatos sem Cadastro - Expresso ::"); |
---|
| 89 | }else{ |
---|
| 90 | document.getElementById('divFormAuthUser_im').innerHTML = ''; |
---|
| 91 | document.getElementById('divFormAuthUser_im').innerHTML = parse_XmlXsl(_XmlUserNAuth,'user_not_auth.xsl'); |
---|
| 92 | } |
---|
[20] | 93 | } |
---|
| 94 | |
---|
| 95 | /* |
---|
| 96 | * Vcard Usuario |
---|
| 97 | */ |
---|
| 98 | |
---|
| 99 | Templates.prototype.information_user = function() |
---|
| 100 | { |
---|
| 101 | var _this = this; |
---|
[55] | 102 | var _XmlInfoUser = '<info_user>' + |
---|
| 103 | '<body lang1="'+IM.get_lang('Full Name')+'" lang2="'+IM.get_lang('NickName')+'" lang3="'+IM.get_lang('Orgname')+'" lang4="'+IM.get_lang('Orgunit')+'" lang5="'+IM.get_lang('Role')+'" lang6="'+IM.get_lang('Birthday')+'" lang7="'+IM.get_lang('your message')+'" />' + |
---|
| 104 | '<bottom lang1="'+IM.get_lang('save')+'" />'+ |
---|
| 105 | '</info_user>'; |
---|
| 106 | _this.conf_form("divInfoUser",400,220,parse_XmlXsl(_XmlInfoUser,'information_user.xsl'), ":: " + IM.get_lang('Information User') + " - Expresso ::"); |
---|
[20] | 107 | } |
---|
| 108 | |
---|
| 109 | Templates.prototype.information_Contact = function() |
---|
| 110 | { |
---|
| 111 | var _this = this; |
---|
[55] | 112 | var _XmlInfoContact = '<info_contact>'+ |
---|
| 113 | '<body lang="'+IM.get_lang('Full Name')+'" label="_lbl_FN" />' + |
---|
| 114 | '<body lang="'+IM.get_lang('NickName')+'" label="_lbl_NICKNAME" />' + |
---|
| 115 | '<body lang="'+IM.get_lang('Orgunit')+'" label="_lbl_ORGUNIT" />' + |
---|
| 116 | '<body lang="'+IM.get_lang('Role')+'" label="_lbl_ROLE" />' + |
---|
| 117 | '<body lang="'+IM.get_lang('Birthday')+'" label="_lbl_BDAY" />' + |
---|
| 118 | '</info_contact>'; |
---|
| 119 | _this.conf_form("divInfoContact",430,110,parse_XmlXsl(_XmlInfoContact,'info_contact.xsl'),":: Informações do Contato - Expresso ::"); |
---|
| 120 | |
---|
[20] | 121 | } |
---|
| 122 | |
---|
| 123 | Templates.prototype.emotions = function() |
---|
| 124 | { |
---|
[55] | 125 | var grid = ''; |
---|
| 126 | grid += '<table cellpadding="0" cellspacing="0" border="0">'; |
---|
| 127 | grid += ' <tr>'; |
---|
| 128 | 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>'; |
---|
| 129 | 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>'; |
---|
| 130 | 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>'; |
---|
| 131 | 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>'; |
---|
| 132 | 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>'; |
---|
| 133 | 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>'; |
---|
| 134 | 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>'; |
---|
| 135 | 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>'; |
---|
| 136 | 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>'; |
---|
| 137 | 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>'; |
---|
| 138 | 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>'; |
---|
| 139 | 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>'; |
---|
| 140 | 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>'; |
---|
| 141 | 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>'; |
---|
| 142 | 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>'; |
---|
| 143 | 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>'; |
---|
| 144 | 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>'; |
---|
| 145 | 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>'; |
---|
| 146 | grid += ' </tr>'; |
---|
| 147 | grid += ' <tr>'; |
---|
| 148 | 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>'; |
---|
| 149 | 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>'; |
---|
| 150 | 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>'; |
---|
| 151 | 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>'; |
---|
| 152 | 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>'; |
---|
| 153 | 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>'; |
---|
| 154 | 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>'; |
---|
| 155 | 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>'; |
---|
| 156 | 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>'; |
---|
| 157 | 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>'; |
---|
| 158 | 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>'; |
---|
| 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_30.src + '" /></div></td>'; |
---|
| 160 | 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>'; |
---|
| 161 | 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>'; |
---|
| 162 | 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>'; |
---|
| 163 | 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>'; |
---|
| 164 | 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>'; |
---|
| 165 | 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>'; |
---|
| 166 | grid += ' </tr>'; |
---|
| 167 | grid += ' <tr>'; |
---|
| 168 | 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>'; |
---|
| 169 | 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>'; |
---|
| 170 | 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>'; |
---|
| 171 | 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>'; |
---|
| 172 | 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>'; |
---|
| 173 | 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>'; |
---|
| 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_43.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_44.src + '" /></div></td>'; |
---|
| 176 | 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>'; |
---|
| 177 | 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>'; |
---|
| 178 | 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>'; |
---|
| 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_48.src + '" /></div></td>'; |
---|
| 180 | 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>'; |
---|
| 181 | 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>'; |
---|
| 182 | 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>'; |
---|
| 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_52.src + '" /></div></td>'; |
---|
| 184 | 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>'; |
---|
| 185 | 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>'; |
---|
| 186 | grid += ' </tr>'; |
---|
| 187 | grid += ' <tr>'; |
---|
| 188 | grid += ' <td colspan="18"><hr style="background:#cccccc;margin:1px:size:1px;"/></td>'; |
---|
| 189 | grid += ' </tr>'; |
---|
| 190 | grid += ' <tr>'; |
---|
| 191 | grid += ' </tr>'; |
---|
| 192 | grid += ' <td colspan="18"><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.hideEmotionSelection()" id="closeEmotionSelectionDiv">Close This Menu</div></td>'; |
---|
| 193 | grid += ' </tr>'; |
---|
| 194 | grid += '</table>'; |
---|
| 195 | |
---|
| 196 | return grid; |
---|
[20] | 197 | } |
---|
| 198 | |
---|
| 199 | Templates.prototype.font_name = function() |
---|
| 200 | { |
---|
[55] | 201 | var grid = ''; |
---|
| 202 | 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>'; |
---|
| 203 | 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>'; |
---|
| 204 | 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>'; |
---|
| 205 | grid += '<hr style="background:#cccccc;margin:1px:size:1px;width:120px;"/>'; |
---|
| 206 | 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>'; |
---|
[20] | 207 | return grid; |
---|
| 208 | } |
---|
| 209 | |
---|
| 210 | Templates.prototype.font_size = function() |
---|
| 211 | { |
---|
[55] | 212 | var grid = ''; |
---|
| 213 | 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>'; |
---|
| 214 | 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>'; |
---|
| 215 | 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>'; |
---|
| 216 | 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>'; |
---|
| 217 | 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>'; |
---|
| 218 | 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>'; |
---|
| 219 | 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>'; |
---|
| 220 | grid += '<hr style="background:#cccccc;margin:1px:size:1px;width:120px;"/>'; |
---|
| 221 | 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>'; |
---|
[20] | 222 | return grid; |
---|
| 223 | } |
---|
| 224 | |
---|
| 225 | Templates.prototype.font_color = function() |
---|
| 226 | { |
---|
[55] | 227 | var grid = ''; |
---|
| 228 | 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>'; |
---|
| 229 | 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>'; |
---|
| 230 | 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>'; |
---|
| 231 | 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>'; |
---|
| 232 | 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>'; |
---|
| 233 | 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>'; |
---|
| 234 | 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>'; |
---|
| 235 | 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>'; |
---|
| 236 | grid += '<hr style="background:#cccccc;margin:1px:size:1px;width:120px;"/>'; |
---|
| 237 | 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>'; |
---|
[20] | 238 | return grid; |
---|
| 239 | } |
---|
| 240 | |
---|
| 241 | Templates.prototype.font_style = function() |
---|
| 242 | { |
---|
[55] | 243 | var grid = ''; |
---|
| 244 | 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>'; |
---|
| 245 | 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>'; |
---|
| 246 | 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>'; |
---|
| 247 | grid += '<hr style="background:#cccccc;margin:1px:size:1px;width:120px;"/>'; |
---|
| 248 | 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>'; |
---|
[20] | 249 | |
---|
| 250 | return grid; |
---|
| 251 | } |
---|
| 252 | |
---|
[55] | 253 | /* |
---|
| 254 | * Preferências do usuário |
---|
| 255 | */ |
---|
| 256 | |
---|
| 257 | Templates.prototype.yourPreferences = function() |
---|
| 258 | { |
---|
| 259 | var _this = this; |
---|
| 260 | var _XmlPreferences = '<preferences />'; |
---|
| 261 | _this.conf_form("divYourPreferences",345,222,parse_XmlXsl(_XmlPreferences,'preferences.xsl'),":: Informações do Contato - Expresso ::"); |
---|
| 262 | IM_Preferences.LoadPreferences(null); |
---|
| 263 | } |
---|
| 264 | |
---|
[20] | 265 | /* |
---|
| 266 | * Send File |
---|
| 267 | */ |
---|
| 268 | |
---|
| 269 | Templates.prototype.Send_file = function(pJid) |
---|
| 270 | { |
---|
| 271 | var _this = this; |
---|
[55] | 272 | var _XmlSendFile = '<send_file path="'+im_path+'" jid="'+pJid+'" lang1="'+IM.get_lang('Send File')+'" lang2="'+IM.get_lang('Send')+'" lang3="'+IM.get_lang('Status of the Transference')+'"/>'; |
---|
| 273 | |
---|
| 274 | _this.conf_form("divSendFile",360,110,parse_XmlXsl(_XmlSendFile,'send_file.xsl'),":: Envio de Arquivo - Expresso ::"); |
---|
| 275 | } |
---|
| 276 | |
---|
| 277 | Templates.prototype.Wait_file = function(pJid) |
---|
| 278 | { |
---|
[20] | 279 | if(document.getElementById("send_file_im").value != ""){ |
---|
| 280 | document.getElementById("div_send_file_im").style.display = "none"; |
---|
[55] | 281 | document.getElementById("status_upload").style.display = "block"; |
---|
[20] | 282 | this.UpdateStatusSendFile(pJid); |
---|
| 283 | }else{ |
---|
| 284 | alert("É necessário informar um arquivo para envio!"); |
---|
| 285 | } |
---|
| 286 | } |
---|
[55] | 287 | |
---|
[20] | 288 | Templates.prototype.UpdateStatusSendFile = function(pJid) |
---|
| 289 | { |
---|
| 290 | var _this = this; |
---|
| 291 | this.time_set = setTimeout("Templates.Wait_file('" + pJid + "')",80); |
---|
| 292 | if(this.transfer == 100){ |
---|
| 293 | clearTimeout(this.time_set); |
---|
| 294 | document.getElementById("div_send_file_im").style.display = "block"; |
---|
| 295 | document.getElementById("status_upload").style.display = "none"; |
---|
[55] | 296 | document.getElementById("send_file_im").value = ""; |
---|
[20] | 297 | this.transfer = 0; |
---|
| 298 | this.time_set = ""; |
---|
| 299 | // Envia a Mensagem para a baixa do arquivo; |
---|
| 300 | var h_name_file = function(data){ |
---|
| 301 | //var pJID = "alexandrecorreia@im.pr.gov.br"; |
---|
[55] | 302 | var pJID = pJid; |
---|
[20] | 303 | var message_conf = '<iframe name="IM_down_file" style="display:none"></iframe>'+ |
---|
| 304 | '<b>VOCÊ ACABA DE RECEBER UM ARQUIVO !!!! </b>'+ |
---|
| 305 | '<a href="../instant_messenger/inc/class.download.inc.php?file=' + data + '" target="IM_down_file">Clique aqui</a>'; |
---|
[55] | 306 | var Conf_send_file = function(data){ |
---|
[20] | 307 | if(!data) |
---|
| 308 | alert(data); |
---|
| 309 | } |
---|
| 310 | cIM.cExecute("$this.Ujabber.SendMessage",Conf_send_file,"to="+pJID+"&body="+url_encode(encodeURI(message_conf))); |
---|
| 311 | } |
---|
| 312 | cIM.cExecute("$this.upload.name_file",h_name_file); |
---|
[55] | 313 | }else{ |
---|
[20] | 314 | var h_size_file = function(data){ |
---|
| 315 | _this.transfer++; |
---|
| 316 | document.getElementById("progressbar_f").style.width = _this.transfer + "%"; |
---|
| 317 | document.getElementById("porcent_im").innerHTML = _this.transfer + "%"; |
---|
| 318 | } |
---|
| 319 | cIM.cExecute("$this.upload.size_file",h_size_file); |
---|
| 320 | } |
---|
[32] | 321 | } |
---|
| 322 | |
---|
[20] | 323 | //Templates |
---|
[55] | 324 | var Templates = new Templates(); |
---|