Changeset 2706 for sandbox/jabberit_messenger
- Timestamp:
- 05/04/10 16:36:51 (14 years ago)
- Location:
- sandbox/jabberit_messenger/trophy_expresso
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/jabberit_messenger/trophy_expresso/inc/preferencesJMessenger.php
r2696 r2706 25 25 $preferences .= ";". $pArgs['preferences3']; 26 26 27 if(isset($pArgs['preferences4'])) 28 $preferences .= ";". $pArgs['preferences4']; 29 27 30 return setPreferences($preferences); 28 31 } -
sandbox/jabberit_messenger/trophy_expresso/js/jscode/loadIM.js
r2696 r2706 281 281 } 282 282 283 function getShowContactsOffline() 284 { 285 if( _preferencesIM[3] ) 286 { 287 var showOffline = _preferencesIM[3].split(":"); 288 289 if( showOffline[1] === "true") 290 return true; 291 else 292 return false; 293 } 294 295 return true; 296 } 297 283 298 function getUserCurrent() 284 299 { … … 325 340 while( _elementNext ) 326 341 { 327 if( _elementNext.nodeType == 1 ) 328 _elementNext.style.display = "block"; 342 if( _elementNext.nodeType == 1 && _elementNext.nodeName.toLowerCase() == "div") 343 { 344 var is_off = _elementNext.style.backgroundImage.indexOf("unavailable"); 345 346 if( is_off > 0 && !getShowContactsOffline()) 347 _elementNext.style.display = "none"; 348 else 349 _elementNext.style.display = "block"; 350 } 329 351 330 352 _elementNext = _elementNext.nextSibling; … … 515 537 'lang10' : 'Ausente', 516 538 'lang11' : 'Definir status de ausente depois de', 517 'lang12' : 'minutos', 539 'lang12' : 'minutos', 540 'lang13' : 'Mostrar Contatos', 541 'lang14' : 'Mostrar contatos desconectados', 518 542 'langYes': 'Sim', 519 543 'langNo' : 'Não' … … 525 549 id_window : "jabberit_preferences", 526 550 width : 430, 527 height : 330,551 height : 410, 528 552 top : 150, 529 553 left : 100, … … 571 595 var element3 = document.getElementById(value3[0]); 572 596 element3.value = value3[1]; 597 598 // Element showContactsOfflineJabberit 599 var value4 = _preferencesIM[3].split(':'); 600 var element4 = document.getElementById(value4[0]); 601 var valueSelect4 = value4[1]; 602 for(var i = 0; i < element4.options.length; i++) 603 if( element4.options[i].value == valueSelect4 ) 604 element4.options[i].selected = true; 573 605 } 574 606 … … 757 789 return false; 758 790 } 759 760 791 792 // Element showContactsOfflineJabberit 793 var elementShowOffline = document.getElementById('showContactsOfflineJabberit'); 794 795 for(var i = 0 ; i < elementShowOffline.options.length; i++) 796 if( elementShowOffline.options[i].selected == true) 797 { 798 _preferencesIM[3] = 'showContactsOfflineJabberit:' + elementShowOffline.options[i].value; 799 value += '&preferences4=showContactsOfflineJabberit:' + elementShowOffline.options[i].value; 800 } 801 761 802 // Save Preferences 762 803 conn.go('p.pf.setPreferences', … … 893 934 // Preferences 894 935 _preferencesIM = arguments[1].split(";"); 895 936 937 if( !_preferencesIM[3] ) _preferencesIM[3] = "showContactsOfflineJabberit:false"; 938 896 939 loadScripts(files); 897 940 … … 946 989 loadIM.prototype.configEvents = configEvents; 947 990 loadIM.prototype.getPhotoUser = getPhotoUser; 991 loadIM.prototype.getShowContactsOffline = getShowContactsOffline; 948 992 loadIM.prototype.getUserCurrent = getUserCurrent; 949 993 loadIM.prototype.getZIndex = getZindex; -
sandbox/jabberit_messenger/trophy_expresso/js/trophyim.js
r2678 r2706 1013 1013 var element = arguments[2]; 1014 1014 var index = arguments[3]; 1015 1015 var showOffline = loadscript.getShowContactsOffline(); 1016 1016 1017 var itensJid = document.getElementById( 'itenContact_' + objContact.contact.jid + '_' + index ); 1017 1018 … … 1057 1058 var paramsContact = 1058 1059 { 1059 nameContact : nameContact, 1060 jid : objContact.contact.jid, 1060 divDisplay : "block", 1061 1061 id : 'itenContact_' + objContact.contact.jid + '_' + index , 1062 1062 index : ((index == 0 ) ? "0" : index), 1063 jid : objContact.contact.jid, 1064 nameContact : nameContact, 1063 1065 path_jabberit : path_jabberit, 1064 1066 presence : presence, 1067 spanDisplay : statusDisplay, 1065 1068 status : status, 1066 1069 statusColor : "black", 1067 statusDisplay : statusDisplay,1068 1070 subscription : objContact.contact.subscription 1069 1071 } … … 1205 1207 with ( document.getElementById('span_show_' + 'itenContact_' + objContact.contact.jid + '_' + index ) ) 1206 1208 { 1207 if( is_open > 0 )1209 /*if( is_open > 0 ) 1208 1210 { 1209 1211 style.display = statusDisplay; 1210 1212 style.color = statusColor; 1211 1213 innerHTML = status; 1214 }*/ 1215 1216 if( presence == "unavailable" && !showOffline ) 1217 { 1218 style.display = "none"; 1219 } 1220 else 1221 { 1222 if( is_open > 0 ) 1223 { 1224 style.display = statusDisplay; 1225 style.color = statusColor; 1226 innerHTML = status; 1227 } 1228 } 1229 } 1230 1231 if( presence == "unavailable" && !showOffline ) 1232 itensJid.style.display = "none"; 1233 else 1234 { 1235 if( is_open > 0 ) 1236 { 1237 itensJid.style.display = "block"; 1212 1238 } 1213 1239 } 1214 1240 1215 1241 itensJid.style.background = "url('"+path_jabberit+"templates/default/images/" + presence + ".gif') no-repeat center left"; 1242 } 1243 1244 // Contact OffLine 1245 if( !objContact.presence && !showOffline ) 1246 { 1247 with ( document.getElementById('span_show_' + 'itenContact_' + objContact.contact.jid + '_' + index )) 1248 { 1249 style.display = "none"; 1250 } 1251 1252 with ( document.getElementById('itenContact_' + objContact.contact.jid + '_' + index ) ) 1253 { 1254 style.display = "none"; 1255 } 1216 1256 } 1217 1257 } -
sandbox/jabberit_messenger/trophy_expresso/xsl/contactsList.xsl
r2670 r2706 19 19 <img src="{$path_jabberit}/templates/default/images/users.png"/> 20 20 </button> 21 22 <img style="height:15px; margin-left:10px;cursor:pointer;" alt="Minhas Preferências" title="Minhas Preferências" src="{$path_jabberit}/templates/default/images/preferences.png" onclick="loadscript.preferences();"/> 23 24 <img style="height:16px; margin-left:10px;cursor:pointer;" alt="Help" title="Help" src="{$path_jabberit}/templates/default/images/help.png" onclick="alert('2');" /> 21 25 </div> 22 26 … … 27 31 </div> 28 32 29 <div id="JabberIMRosterLoadingGif" style="position:absolute; left:8 0px; top:72px; display:block;">33 <div id="JabberIMRosterLoadingGif" style="position:absolute; left:85px; top:72px; display:block;"> 30 34 <img src='{$path_jabberit}/templates/default/images/loading.gif' style="width:20px; height:20px;"/> 31 35 <span style="color:red;">Carregando...</span> -
sandbox/jabberit_messenger/trophy_expresso/xsl/itensGroup.xsl
r2670 r2706 3 3 <xsl:output method="html" omit-xml-declaration="yes"/> 4 4 5 <xsl:param name="nameContact" /> 6 <xsl:param name="jid"/> 5 <xsl:param name="divDisplay" /> 7 6 <xsl:param name="id" /> 8 7 <xsl:param name="index" /> 8 <xsl:param name="jid"/> 9 <xsl:param name="nameContact" /> 9 10 <xsl:param name="path_jabberit" /> 10 11 <xsl:param name="presence" /> 12 <xsl:param name="spanDisplay"/> 11 13 <xsl:param name="status"/> 12 14 <xsl:param name="statusColor" /> 13 <xsl:param name="statusDisplay"/>14 15 <xsl:param name="subscription" /> 15 16 16 17 <xsl:template match="itens_group"> 17 18 18 <div id="{$id}" subscription="{$subscription}" onmousedown="loadscript.actionButton(event,'{$jid}','{$index}');" style="background: url('{$path_jabberit}templates/default/images/{$presence}.gif') no-repeat center left; padding-left: 20px; margin:2px 0px 0px 10px; cursor:pointer; font-weight:normal; ">19 <div id="{$id}" subscription="{$subscription}" onmousedown="loadscript.actionButton(event,'{$jid}','{$index}');" style="background: url('{$path_jabberit}templates/default/images/{$presence}.gif') no-repeat center left; padding-left: 20px; margin:2px 0px 0px 10px; cursor:pointer; font-weight:normal; display:{$divDisplay};"> 19 20 <xsl:value-of select="$nameContact"/> 20 21 </div> 21 <span id="span_show_{$id}" style="margin:2px 0px 0px 10px; font-size: 10px; font-style:italic; display:{$s tatusDisplay}; color:{$statusColor};"><xsl:value-of select="$status"/></span>22 <span id="span_show_{$id}" style="margin:2px 0px 0px 10px; font-size: 10px; font-style:italic; display:{$spanDisplay}; color:{$statusColor};"><xsl:value-of select="$status"/></span> 22 23 23 24 </xsl:template> -
sandbox/jabberit_messenger/trophy_expresso/xsl/preferences.xsl
r2696 r2706 14 14 <xsl:param name="lang11" /> 15 15 <xsl:param name="lang12" /> 16 <xsl:param name="lang13" /> 17 <xsl:param name="lang14" /> 16 18 <xsl:param name="langYes" /> 17 19 <xsl:param name="langNo" /> … … 29 31 </select> 30 32 </fieldset> 31 <fieldset style="height:60px;margin- bottom:6px;padding:5px; border:1px solid #cecece;">33 <fieldset style="height:60px;margin-top:6px;padding:5px; border:1px solid #cecece;"> 32 34 <legend><xsl:value-of select="$lang8"/></legend> 33 35 <br/> … … 43 45 <label><xsl:value-of select="$lang11"/><input id="flagAwayIM" type="text" size="2" maxlength="2" style="margin-left:4px; margin-right:4px;" onclick="this.select();" /><xsl:value-of select="$lang12"/></label> 44 46 </fieldset> 47 48 <fieldset style="height:60px;margin-top:6px;padding:5px; border:1px solid #cecece;"> 49 <legend><xsl:value-of select="$lang13"/></legend> 50 <br/> 51 <label><xsl:value-of select="$lang14"/> .: </label> 52 <select id="showContactsOfflineJabberit"> 53 <option value="true"><xsl:value-of select="$langYes"/></option> 54 <option value="false"><xsl:value-of select="$langNo"/></option> 55 </select> 56 </fieldset> 57 45 58 </fieldset> 46 59
Note: See TracChangeset
for help on using the changeset viewer.