[svn r18818] logic changes - network social interface has been changed - (see FS#3750)

skala
Isaac Flores 16 years ago
parent 0f6d985143
commit 718fd5894e
  1. 8
      main/inc/lib/javascript/thickbox.js
  2. 77
      main/social/contacts.inc.php
  3. 8
      main/social/group_contact.inc.php
  4. 11
      main/social/index.php
  5. 59
      main/social/qualify_contact.inc.php
  6. 7
      main/social/show_search_image.inc.php

@ -15,7 +15,13 @@ $(document).ready(function(){
imgLoader = new Image();// preload image
imgLoader.src = tb_pathToImage;
});
//
function load_thick (hrefinfo,textinfo) {
imgLoader = new Image();// preload image
imgLoader.src = tb_pathToImage;
name_user=textinfo.replace(/\+/g," ");
tb_show(name_user,hrefinfo, '');
}
//add thickbox to href & area elements that have a class of .thickbox
function tb_init(domChunk){
$(domChunk).click(function(){

@ -19,12 +19,12 @@ $user_id=api_get_user_id();
$image_path = UserManager::get_user_picture_path_by_id ($user_id,'web',false,true);
?>
<div align="center" >
<table width="750" border="0" cellpadding="0" cellspacing="0" class="social-content-table">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="social-content-table">
<tr>
<td width="750" height="20" valign="top">
<td width="100%" height="20" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="social-title">
<tr>
<td width="750" height="20" valign="top"><?php
<td width="100%" height="20" valign="top"><?php
echo '&nbsp;&nbsp;Dokeos&nbsp;&nbsp;-&nbsp;&nbsp;';
$user_id=api_get_user_id();
$user_info=api_get_user_info($user_id);
@ -34,76 +34,11 @@ $image_path = UserManager::get_user_picture_path_by_id ($user_id,'web',false,tru
</table>
</td>
</tr>
<tr>
<td height="180" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td width="320" height="180" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="320" height="110" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="100" height="110" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="social-content-body">
<tr>
<td width="100" height="110" valign="top">
<img src="<?php echo $image_path['dir']."/".$image_path['file']; ?>" width="90" height="100" style="margin-left:5px ;margin-rigth:5px;margin-top:5px;margin-bottom:5px;" /></td>
</tr>
</table></td>
<td width="220" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="social-align-box">
<tr>
<td width="220" height="110" valign="top">&nbsp;</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="70" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="social-align-box">
<tr>
<td width="320" height="70" valign="top" class="social-info">
<?php
$info_user=api_get_user_info($user_id);
echo '<br/>&nbsp;&nbsp;&nbsp;&nbsp;'.$info_user['mail'].'<br/>';
echo '&nbsp;&nbsp;&nbsp;&nbsp;'.$info_user['username'].PHP_EOL;
?>
</td>
</tr>
</table></td>
</tr>
</table></td>
<td width="430" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="social-content-description">
<tr>
<td width="430" height="180" valign="top" class="social-align-box">
<div align="center" class="social-qualify"><?php echo utf8_encode(get_lang('AttachContactsToGroup')) ?><input type="hidden" class="" name="user_cod_qualify" id="user_cod_qualify" value="0" /></div>
<div align="center" class="social-qualify-display" id="div_info_user"></div>
<div id="div_qualify">
<?php
require_once 'qualify_contact.inc.php';
?>
<div id="div_qualify_image" class="social-display-image"></div>
</div>
</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="25" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="social-subtitle-search">
<tr>
<td width="750" height="25" valign="top" class="social-align-box">&nbsp;&nbsp;<?php echo get_lang('Search').'&nbsp;&nbsp; : &nbsp;&nbsp;'; ?><input class="social-search-image" type="text" class="search-image" id="id_search_image" name="id_search_image" value="" onkeyup="search_image_social(this)" /></td>
<td width="100%" height="25" valign="top" class="social-align-box">&nbsp;&nbsp;<?php echo get_lang('Search').'&nbsp;&nbsp; : &nbsp;&nbsp;'; ?><input class="social-search-image" type="text" class="search-image" id="id_search_image" name="id_search_image" value="" onkeyup="search_image_social(this)" /></td>
</tr>
</table></td>
</tr>
@ -111,10 +46,10 @@ $image_path = UserManager::get_user_picture_path_by_id ($user_id,'web',false,tru
<td height="175" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td width="750" height="22" valign="top">
<td width="100%" height="22" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="social-align-box">
<tr>
<td width="750" height="22" valign="top" class="social-title">&nbsp;&nbsp;<?php echo utf8_encode(get_lang('ContactsList')); ?></td>
<td width="100%" height="22" valign="top" class="social-title">&nbsp;&nbsp;<?php echo utf8_encode(get_lang('ContactsList')); ?></td>
</tr>
</table></td>
</tr>

@ -23,12 +23,12 @@ for ($p=0;$p<count($list_groups);$p++) {
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="social-align-box">
<tr>
<td width="100%" height="20" valign="top">
<td id="<?php echo 'td_'.$list_groups[$p]['id']; ?>" width="100%" height="20" valign="top" onclick="toogle_function(this)">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="social-title">
<tr>
<td width="100%" height="22" valign="top">&nbsp;&nbsp;<?php echo get_lang($list_groups[$p]['title']); ?>
<img id="<?php echo 'btn_'.$list_groups[$p]['id']; ?>" style="float:right;margin-top:-15px" src="../img/visible.gif" onclick="toogle_function(this)"/><input type="hidden" class="hidden" id="id_hd_dame" name="hd_dame" value="0" /></td>
<td width="100%" height="22" valign="top" style="cursor:pointer">&nbsp;&nbsp;<?php echo get_lang($list_groups[$p]['title']); ?>
<img id="<?php echo 'btn_'.$list_groups[$p]['id']; ?>" style="float:right;margin-top:-15px" src="../img/visible.gif" /><input type="hidden" class="hidden" id="id_hd_dame" name="hd_dame" value="0" /></td>
</tr>
</table></td>
</tr>
@ -62,7 +62,7 @@ if (count($list_path_friends)!=0) {
if ($list_friends_file[$j]<>"") {
$user_info=api_get_user_info($list_friends_id[$j]);
$name_user=$user_info['firstName'].' '.$user_info['lastName'];
$friend_html.='&nbsp;<div class="image-social-content" id=div_'.$list_friends_id[$j].' style="float:left" ><img src="'.$list_friends_dir[$j]."/".$list_friends_file[$j].'" width="90" height="110" style="margin-left:3px ;margin-rigth:3px;margin-top:10px;margin-bottom:3px;" id="imgfriend_'.$list_friends_id[$j].'" title="'.$name_user.'" onclick="qualify_friend(this)"/></div>&nbsp;';
$friend_html.='&nbsp;<div class="image-social-content" id=div_'.$list_friends_id[$j].' style="float:left" ><a href="javascript:void(0)" onclick=load_thick("'.$list_friends_dir[$j].$list_friends_file[$j].'","'.urlencode($name_user).'") title="" class="thickbox"><img src="'.$list_friends_dir[$j].$list_friends_file[$j].'" width="90" height="110" style="margin-left:3px ;margin-rigth:3px;margin-top:10px;margin-bottom:3px;" id="imgfriend_'.$list_friends_id[$j].'" title="'.$name_user.'" /></a></div>&nbsp;';
}
$j++;
}

@ -9,6 +9,9 @@ $htmlHeadXtra[] = '<script src="../inc/lib/javascript/jquery.js" type="text/java
$htmlHeadXtra[] = '<script src="../inc/lib/javascript/jquery-1.1.3.1.pack.js" type="text/javascript"></script>';
$htmlHeadXtra[] = '<script src="../inc/lib/javascript/jquery.history_remote.pack.js" type="text/javascript"></script>';
$htmlHeadXtra[] = '<script src="../inc/lib/javascript/jquery.tabs.pack.js" type="text/javascript"></script>';
$htmlHeadXtra[] = '<script src="../inc/lib/javascript/thickbox.js" type="text/javascript" language="javascript"></script>';
//$htmlHeadXtra[] = '<style rel="stylesheet" href="../inc/lib/javascript/thickbox.css" type="text/css" media="projection, screen">';
$htmlHeadXtra[]='<style type="text/css" media="all">@import "'.api_get_path(WEB_LIBRARY_PATH).'javascript/thickbox.css";</style>';
$htmlHeadXtra[] = '<script type="text/javascript">
$(function() {
$("#container-9").tabs({ remote: true});
@ -102,7 +105,7 @@ function set_qualify_friend() {
data: "user_id_friend_q="+user_id_friend+"&type_friend_q="+type_friend,
success: function(datos) {
alert(datos);
clear_form();
//clear_form();
}
});
}
@ -362,6 +365,7 @@ function list_search_hide () {
function hide_search_list () {
$("div#id_div_search").html("");
}
</script>';
$htmlHeadXtra[] = '<link rel="stylesheet" href="../inc/lib/javascript/jquery.tabs.css" type="text/css" media="print, projection, screen">';
$htmlHeadXtra[] = '
@ -394,6 +398,11 @@ code {
font-family: "Courier New", Courier, monospace;
}
</style>';
$htmlHeadXtra[] = '
';
$_SESSION['social_exist']=true;
$_SESSION['social_dest'] = 'index.php';
$interbreadcrumb[]= array (

@ -6,27 +6,56 @@ require_once '../inc/lib/social.lib.php';
$user_friend=$_POST['user_friend'];
$user_info=api_get_user_info($user_friend);
$list_of_options=array();
$img_user=array();
$img_info_user=array();
$list_of_options=UserFriend::show_list_type_friends();
$path_user=str_replace('\\','',$_GET['path_user']);
$img_user =explode('"',$path_user);
$number_list=count($list_of_options);
$user_id =urldecode($_GET['id_user']);
$user_id =str_replace("\\","",$user_id);
$user_friend=str_replace('"',"",$user_id);
$user_friend_relation=UserFriend::get_relation_between_contacts(api_get_user_id(),$user_friend);
?>
<table width="280" border="0">
<tr>
<td>
<table width="280" border="0" cellspacing="0" cellpadding="0">
<input type="hidden" name="user_cod_qualify" id="user_cod_qualify" value="<?php echo $user_friend; ?>"/>
<table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="actions"><?php echo mb_convert_encoding(get_lang('SocialAttachUserInformation'),'UTF-8',$charset);?></td>
</tr>
<tr>
<td>
<table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="600" align="left">
<td width="50%"><br/>
<img style="float:left" src="<?php echo $img_user[1]; ?>" />
</td>
<td width="50%"><div align="left">
<?php
for ($k=0;$k<$number_list;$k++) {
echo '<br/>';
if ($list_of_options[$k]['id']==$user_friend_relation) {
$check='checked="checked"';
} else {
$check='';
}
?>
<tr height="20">
<td width="20"><input type="radio" class="radio" name="list_type_friend" value="<?php echo $list_of_options[$k]['id']; ?>" /></td>
<td width="260"><?php echo utf8_encode(get_lang($list_of_options[$k]['title'])); ?></td>
</tr>
<input <?php echo $check; ?> style="margin-left:50px" type="radio" class="radio" name="list_type_friend" value="<?php echo $list_of_options[$k]['id']; ?>" />
<?php
}
echo mb_convert_encoding(get_lang($list_of_options[$k]['title']),'UTF-8',$charset);
echo '<br/>';
?>
<?php
}
echo '<br/>';
?>
</table>
</td>
</tr>
<tr>
<td><input type="button" value="<?php echo utf8_encode(get_lang('AttachToGroup')); ?>" onclick="set_qualify_friend()"/></td>
</tr>
<input style="margin-left:50px" type="button" value="<?php echo mb_convert_encoding(get_lang('AttachToGroup'),'UTF-8',$charset); ?>" onclick="set_qualify_friend()"/>
</div></td>
</td>
</tr>
</table>
</td>
</tr>
</table>

@ -17,7 +17,7 @@ if (isset($name_search) && $name_search!='undefined') {
$list_path_friends=UserFriend::get_list_path_web_by_user_id($user_id);
}
$friend_html='';
$number_of_images=5;
$number_of_images=8;
$number_friends=0;
$list_friends_id=array();
$list_friends_dir=array();
@ -42,8 +42,11 @@ if (count($list_path_friends)!=0) {
if ($list_friends_file[$j]<>"") {
$user_info=api_get_user_info($list_friends_id[$j]);
$name_user=$user_info['firstName'].' '.$user_info['lastName'];
$friend_html.='&nbsp;<div onMouseover="show_icon_delete(this)" onMouseout="hide_icon_delete(this)" class="image-social-content" id=div_'.$list_friends_id[$j].' style="float:left" >
/*$friend_html.='&nbsp;<div onMouseover="show_icon_delete(this)" onMouseout="hide_icon_delete(this)" class="image-social-content" id=div_'.$list_friends_id[$j].' style="float:left" >
<img src="'.$list_friends_dir[$j]."/".$list_friends_file[$j].'" width="90" height="110" style="margin-left:3px ;margin-rigth:3px;margin-top:10px;margin-bottom:3px;" id="imgfriend_'.$list_friends_id[$j].'" title="'.$name_user.'" onclick="qualify_friend(this)"/>
<img onclick="delete_friend (this)" id=img_'.$list_friends_id[$j].' src="../img/blank.gif" alt="" title="" class="image-delete" /></div>&nbsp;'; */
$friend_html.='&nbsp;<div onMouseover="show_icon_delete(this)" onMouseout="hide_icon_delete(this)" class="image-social-content" id=div_'.$list_friends_id[$j].' style="float:left" >
<img src="'.$list_friends_dir[$j].$list_friends_file[$j].'" width="90" height="110" style="margin-left:3px ;margin-rigth:3px;margin-top:10px;margin-bottom:3px;" id="imgfriend_'.$list_friends_id[$j].'" title="'.$name_user.'" onclick=load_thick(\'/main/social/qualify_contact.inc.php?path_user="'.urlencode($list_friends_dir[$j].$list_friends_file[$j]).'&amp;id_user="'.$list_friends_id[$j].'"\',"'.urlencode($name_user).'") />
<img onclick="delete_friend (this)" id=img_'.$list_friends_id[$j].' src="../img/blank.gif" alt="" title="" class="image-delete" /></div>&nbsp;';
}
$j++;

Loading…
Cancel
Save