From 283fb9bebbd56d777cb4d8212319f20a0f56ed02 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Thu, 7 Apr 2011 20:28:31 +0200 Subject: [PATCH] Improving UI --- main/css/base.css | 31 ++++----- main/css/chamilo/default.css | 2 +- main/img/icons/32/completed.png | Bin 0 -> 1762 bytes main/img/icons/32/compose_message.png | Bin 0 -> 1605 bytes main/img/icons/32/incomplete.png | Bin 0 -> 998 bytes main/img/icons/32/outbox.png | Bin 0 -> 2671 bytes main/inc/lib/message.lib.php | 34 +++++----- main/inc/lib/social.lib.php | 59 +++++++++++------- main/link/link.php | 27 +++----- main/messages/inbox.php | 22 ++++--- main/messages/new_message.php | 46 ++++++-------- main/messages/outbox.php | 25 +++----- .../send_message_to_userfriend.inc.php | 4 +- main/messages/view_message.php | 8 +-- main/social/friends.php | 11 ---- main/social/group_add.php | 9 --- main/social/group_edit.php | 9 --- main/social/group_invitation.php | 15 ----- main/social/group_members.php | 15 ----- main/social/group_waiting_list.php | 15 ----- main/social/groups.php | 13 ---- main/social/invitations.php | 31 +++------ main/social/myfiles.php | 9 --- main/social/profile.php | 11 ---- main/social/search.php | 16 ----- 25 files changed, 129 insertions(+), 283 deletions(-) create mode 100644 main/img/icons/32/completed.png create mode 100644 main/img/icons/32/compose_message.png create mode 100644 main/img/icons/32/incomplete.png create mode 100644 main/img/icons/32/outbox.png diff --git a/main/css/base.css b/main/css/base.css index 7ee8242d7b..74094a24f9 100644 --- a/main/css/base.css +++ b/main/css/base.css @@ -5,43 +5,34 @@ * { outline :none; } -input, select, textarea { +input { -moz-border-radius:5px; -webkit-border-radius:5px; - -border-radius:5px; + border-radius:5px; -x-system-font:none; border:1px solid #CCCCCC; color:#666666; font-family:Arial,Helvetica,sans-serif; - font-size:120%; - font-size-adjust:none; - font-stretch:normal; - font-style:normal; - font-variant:normal; - font-weight:normal; + font-size:120%; line-height:normal; padding:5px; } select, textarea { - color : #000; - border: 1px solid #000; -} -input.checkbox { - border-width: 0; - border-radius:5px; - -moz-border-radius:5px; - -webkit-border-radius:5px; - -opera-border-radius:5px; - - border:1px solid #E1E1E0; + border:1px solid #CCCCCC; + padding:5px; + -moz-border-radius:5px; + -webkit-border-radius:5px; + border-radius:5px; + color:#666666; } + select, input[type=checkbox], input[type=radio], input[type=button], input[type=submit] { cursor: pointer; font-size: 12px; -moz-border-radius:5px; -webkit-border-radius:5px; - border-radius:5px; + -border-radius:5px; border:1px solid #E1E1E0; } diff --git a/main/css/chamilo/default.css b/main/css/chamilo/default.css index 284e429b6b..e86ac20413 100755 --- a/main/css/chamilo/default.css +++ b/main/css/chamilo/default.css @@ -4635,4 +4635,4 @@ padding-top:10px; .progresstext { text-align:center; -} +} \ No newline at end of file diff --git a/main/img/icons/32/completed.png b/main/img/icons/32/completed.png new file mode 100644 index 0000000000000000000000000000000000000000..ceb0352a980ae349eac00f524a99818504b0bdbd GIT binary patch literal 1762 zcmV<81|9i{P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2ipVz z5G)Hz)Rw;h00v@7L_t(o!|j(_Y*g17h1cHu+{SZeJm537$2Y(?Fqy{BK zO=y)uV%n5MNmSZegGf*TwN+46^{HxjYt@#}Dyo8&BASrc>9{kfr8tpsE)Z}GSe>z< z@nw8ruJ+8i?moDpaS5%X#?4Fqrz4%C^R55iTYIeyd|sb%k>v(>ehnh|L2?%X(Seiu z(c<@XIpN-;U?QdKuD^@-*Osr@t}>7K@87UxgZ~yx0BhC_=hXLuKU{rpZTq8_CO#O- zH72i^18|mg0^Xyb0$8(Y*pYqJ2es7oB$*hS^gwF^J11z;hH-AS|fscI3NN z&uDXVa|G1E?A#2o^MnhI*u@BTNZS@fe5#w!`zugEU_srqBb`-yH7jos%duc{3q6C~ zNMsYJ@>TNjOOwRO+mAXHPTVws%9quTJbRZ8|2e2Y|Jix<9?d8i#2`8>YT%8L*D=cy z5H(;z8N*!_ZLpHK*RjAB3GlxpVXPyE@-DX!e7lr!Vl8d#FMtY+wG{GpIr^JxW7xHcHRjV=B>!njk`6%Kuj2LsDsFO7)f&)lrcz($dx`HDbBCxo=#6a zJ2o{F!=J$k02Ci4NblqD9EIDZ$cNekTMyi|@*X^QasN4qix1kwnn>-sSwzKgH+3v0 zm@DKXPc`h;Ksm8t!2!qVL=-7A3C0*?MdJB42$_jZ_Xwh}w~)8ub`%@{Xz@=d()&1+ zpFx!&9x9ir4|J~D!<&^Lwg+~upEu1O5pp2#`=UkgRj>G{Kv;{(t;o06b!vjd2oVXG z$Z$5@2Se1Msw#XdeOwPSG83Eb0mWX^{1+Smh;R^KE~pO#?>kiLDck?`x?Mb@XNk!T zfC8_Moxtm3C(e0X>O+c48INt7L0z}TxXqjMWN%X6ARD4M!fJxEE*+K?uX>I+|TW9?L63CvxTRvG%=_SgX+kWdDQ#rAqZmN zO7_xbS&(1zKkmspj9u3>gc2$kn#hD{KApS{8$a3n*2};E_GBnGG|oJLd0#>&^2CK|_CR^xEC4N>=;bl?pzzucAN;D3iNgVWJ6Oj=GmmcH^e^YV)@W4o$m#^?wH3c9G3M4^>N3AtUKmM>F9p) zWBz{=00151TZ!U!2_>p#9%e6mcGsz=vO7M%Q+{go56KF-CXdiwb^rhX07*qoM6N<$ Ef(j5!=Kufz literal 0 HcmV?d00001 diff --git a/main/img/icons/32/compose_message.png b/main/img/icons/32/compose_message.png new file mode 100644 index 0000000000000000000000000000000000000000..9f51246f1e4fda7c307be20aad49365b0ff76280 GIT binary patch literal 1605 zcmV-L2DGZH~+1fe34D)InGs0bt;cm@f0s4Pk(N)^%sCw4xZx?XH&?fsmY zotblaaJ=k#*G?jkc;HA!GjqTGzjN-rb7$axZ0boGpF4MMCY6l+)c3tl8)J-wLMR4f zgfJAerI#9w+Sks1YQf=_JSY}my3jc`#F1&f}Gb8ELZ(o1o>yxQe z3IJnFUmM41^Q(8x*GhAL`rZqly}AnIP*!rMaoEDJfp+iH3T~+)8;=ce;llS{$mff{ zdG*yd#)BZhaU4Vh5y2SKy{1!&cs#;i|NI?yZhGPOGsRj9rP6@Gm&+L7h2lGB&c2p$T^HAN2ZTigBQ8;Wm1I&elANcy`mJDW>|Qk%AL;C5 zpy6Zu74R1k_wOk8ebT{u)t3<8aXmbTiuaL@q zTZjH?0$tMDI;2qP2+A45bTr@~s!7mU-xuKRi$D1MEvP!YEtmX{B@=j1R0QK(@iJ60i{&CVuJCk4}tFWPknAOJ_69W^*9z z!=@lY8*p|OyNZJ>q4j+v@+D=|#|dMUQK}N6(oyizC@YDPQN36E;>Gi`W233xoj&u` z3CD489EUIr`&>kZmWfE;Sc;XMY@0m3F9~DN-70{H^7}Gy`SRt29Wj46bLO?8=Xo?5 zjRT|Zy$`ib7)A+#7$(}ru!-R=+WI4bc@8Kl$JrPii8ks=na0kx)YU$Kn5`~;;fr5B zqO_*Awe`rf@7{-DNZr-c!;q=T6p4{Z>_`QrZTw&zOZ|;k0}fdm+1sMTt0Z*P;$W|^Lzrd%!) ziA1`Ku+!;ajOjXLL5`z|fytnFfHEHOgio^>5+Tm*JCi;ccR?w_p#T7de1Q)aKjhfc z$4DlV-Hh~#0zJa?Tr(K+9Ev#=mxxU3j?kHlCtbCmFcg6Pw5E06sD0AcH4a!H# zXs!1VGyB{FOdvAO^71lsb0-Lm4Kk?J_a5jSOew|T*~2VcS-|tWfqfqY!9dwwzjf;t zxm=EDG};HaFF;;mQKf9(xwpS*UxX=`E{NDp;09KA+z=@&f_(&UHSUXLe?m53YZ} zd2E2a9ZQEwRMsmz*nYsN7f+E&rn*znJ2fAz zeZ<Q?f^++k?x<-!+Ika*{wHwo(0!+Mu91y3Ygvh0vnhBGC&%LKJ@>l zbpQ+SfCjJ*Z0-FqiT3!=9r7QT03qN%^x=oY|DF8{sI0})3|3t{00000NkvXXu0mjf D5aRw| literal 0 HcmV?d00001 diff --git a/main/img/icons/32/incomplete.png b/main/img/icons/32/incomplete.png new file mode 100644 index 0000000000000000000000000000000000000000..043317cf0604e1829f9b996349a45371f775b594 GIT binary patch literal 998 zcm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Q-!qxf(h*pkMO|Rr&NEt`jXMp3KEF+@ZPKuI8pG^*!E)5>4SEwFXQ*r^u zJQA)-lj!`Gq|sd^mRQwiZ|Y`xi+P%#>CGzrsiN+(mMgYS6(?WOpu&^a=3& zy9~?c`=K0yuK*#3Jy@81rNX-PZ}iMLqORsslGu5qctv_l;kj?K!y|WSm8D}*k!S6S zpon%a`#$s9-S5M;*20klL2T3UG10&deA3awsUL@ytNATMr%GeUHlVHF5wB~zdYMP; zbNk29tt>eI){{}wb^9Wx5)6VJ7Um)4FK`9b5gQ*c7XR~q9%KBSR(ZHR4wq|uBKVyf z1p&Uh!-iiBWS_Fqa2VeTP3Q)1Q0rU12L3Y@7;Pe?yg(4;86H2X84e-;9Ra?z+ZlQP E2UqM4NB{r; literal 0 HcmV?d00001 diff --git a/main/inc/lib/message.lib.php b/main/inc/lib/message.lib.php index cbae99fcf3..b89d6233e6 100755 --- a/main/inc/lib/message.lib.php +++ b/main/inc/lib/message.lib.php @@ -150,7 +150,7 @@ class MessageManager $sql_result = Database::query($sql_query); $i = 0; $message_list = array (); - while ($result = Database::fetch_row($sql_result)) { + while ($result = Database::fetch_row($sql_result)) { if ($request===true) { $message[0] = ''; } else { @@ -171,8 +171,8 @@ class MessageManager $message[2] = ''.str_replace("\\","",$result[3]).''; $message[3] = ''.Display::return_icon('message_reply.png',get_lang('ReplyToMessage')).''. '  '.Display::return_icon('delete.png',get_lang('DeleteMessage')).''; - } else { - if($result[3]==1) { + } else { + if($result[4]==1) { $class = 'class = "unread"'; } else { $class = 'class = "read"'; @@ -745,8 +745,8 @@ class MessageManager '.str_replace("\\","",$row[6]).' -
'.(!empty($files_attachments)?implode(' | ',$files_attachments):'').'
-
'; +
'.(!empty($files_attachments)?implode('
',$files_attachments):'').'
+
'; $social_link = ''; if ($_GET['f'] == 'social') { $social_link = 'f=social'; @@ -1269,19 +1269,19 @@ function outbox_display() { if (isset ($_REQUEST['action'])) { switch ($_REQUEST['action']) { case 'delete' : - $number_of_selected_messages = count($_POST['id']); - if ($number_of_selected_messages!=0) { - foreach ($_POST['id'] as $index => $message_id) { - MessageManager::delete_message_by_user_receiver(api_get_user_id(), $message_id); - } - } - Display::display_normal_message(api_xml_http_response_encode($success),false); - break; + $number_of_selected_messages = count($_POST['id']); + if ($number_of_selected_messages!=0) { + foreach ($_POST['id'] as $index => $message_id) { + MessageManager::delete_message_by_user_receiver(api_get_user_id(), $message_id); + } + } + Display::display_normal_message(api_xml_http_response_encode($success),false); + break; case 'deleteone' : - MessageManager::delete_message_by_user_receiver(api_get_user_id(), $_GET['id']); - Display::display_confirmation_message(api_xml_http_response_encode($success),false); - echo '
'; - break; + MessageManager::delete_message_by_user_receiver(api_get_user_id(), $_GET['id']); + Display::display_confirmation_message(api_xml_http_response_encode($success),false); + echo '
'; + break; } } diff --git a/main/inc/lib/social.lib.php b/main/inc/lib/social.lib.php index 807899580f..4408682c54 100755 --- a/main/inc/lib/social.lib.php +++ b/main/inc/lib/social.lib.php @@ -570,20 +570,33 @@ class SocialManager extends UserManager { }*/ echo ''; - + echo '
'; echo ''; + } elseif(($_GET['action'] == 'addcategory' || $_GET['action'] == 'editcategory') && !$submit_category) { echo '
'; if ($_GET['action'] == 'addcategory') { @@ -327,7 +321,7 @@ if (api_is_allowed_to_edit(null, true) && isset($_GET['action'])) { echo '
'.get_lang('CategoryMod').'
'; $my_cat_title = get_lang('CategoryMod'); } - echo "
\n\n"; + echo "
"; echo '
'; if ($_GET['action'] == 'editcategory') { echo ''; @@ -358,7 +352,6 @@ if (api_is_allowed_to_edit(null, true) && isset($_GET['action'])) { '; - echo "
"; } } diff --git a/main/messages/inbox.php b/main/messages/inbox.php index c578ba8c2e..26f5f7bb7b 100755 --- a/main/messages/inbox.php +++ b/main/messages/inbox.php @@ -122,10 +122,10 @@ Display::display_header(''); $social_parameter = ''; if ($_GET['f']=='social' || api_get_setting('allow_social_tool') == 'true') { - $social_parameter = '?f=social'; + $social_parameter = '?f=social'; } else { - //comes from normal profile - + + //Comes from normal profile echo '
'; if (api_get_setting('allow_social_tool') == 'true' && api_get_setting('allow_message_tool') == 'true') { echo ''.Display::return_icon('shared_profile.png', get_lang('ViewSharedProfile')).' '.get_lang('ViewSharedProfile').''; @@ -156,13 +156,20 @@ echo '
'; $id_content_right = 'social-content-right'; echo '
'; //this include the social menu div - SocialManager::show_social_menu('messages_inbox'); + SocialManager::show_social_menu('messages'); echo '
'; } echo '
'; - if (api_get_setting('allow_social_tool') == 'true'){ + + if (api_get_setting('allow_social_tool') == 'true') { + echo ''; - } - + } echo '
'; echo '
'; diff --git a/main/messages/new_message.php b/main/messages/new_message.php index 97052e5d0b..20e6a4c4ca 100755 --- a/main/messages/new_message.php +++ b/main/messages/new_message.php @@ -34,17 +34,15 @@ $nameTools = api_xml_http_response_encode(get_lang('Messages')); $htmlHeadXtra[]=' '; -//jquery thickbox already called from main/inc/header.inc.php $htmlHeadXtra[] = ''; $htmlHeadXtra[] = ''; @@ -87,7 +85,7 @@ function add_image_form() { id_elem1 = "filepath_"+counter_image; id_elem1 = "\'"+id_elem1+"\'"; //document.getElementById("filepath_"+counter_image).innerHTML = " "; - document.getElementById("filepath_"+counter_image).innerHTML = " "; + document.getElementById("filepath_"+counter_image).innerHTML = " "; if (filepaths.childNodes.length == 6) { var link_attach = document.getElementById("link-more-attach"); if (link_attach) { @@ -108,9 +106,7 @@ div.row div.formw { $nameTools = get_lang('ComposeMessage'); -/* - FUNCTIONS -*/ +/* FUNCTIONS */ /** * Shows the compose area + a list of users to select from. @@ -211,8 +207,8 @@ function manage_form ($default, $select_from_user_list = null) { $form->addElement('html','
'.get_lang('FilesAttachment').'
- - + +
'); $form->addElement('html','
'.get_lang('AddOneMoreFile').' ('.sprintf(get_lang('MaximunFileSizeX'),format_file_size(api_get_setting('message_max_upload_filesize'))).')
'); } @@ -276,10 +272,8 @@ if ($_GET['f']=='social') { Display::display_header(''); - $group_id = intval($_REQUEST['group_id']); - if ($group_id != 0) { echo ''; } else { if ($_GET['f']=='social') { - + } else { echo ''; } - } -echo '
'; +echo '
'; $id_content_right = ''; //LEFT COLUMN if (api_get_setting('allow_social_tool') != 'true') { @@ -319,17 +311,20 @@ echo '
'; } else { require_once api_get_path(LIBRARY_PATH).'social.lib.php'; echo '
'; - //this include the social menu div - SocialManager::show_social_menu('messages_compose'); + //this include the social menu div + SocialManager::show_social_menu('messages'); echo '
'; $id_content_right = 'social-content-right'; } echo '
'; - + //MAIN CONTENT if (api_get_setting('allow_social_tool') == 'true'){ - echo ''; } echo '
'; - echo '
'; /* FOOTER */ diff --git a/main/social/friends.php b/main/social/friends.php index 7187de742c..f2ebed6490 100755 --- a/main/social/friends.php +++ b/main/social/friends.php @@ -79,17 +79,6 @@ function clear_form () { $("div#div_info_user").html(""); } - -function show_icon_edit(element_html) { - ident="#edit_image"; - $(ident).show(); -} - -function hide_icon_edit(element_html) { - ident="#edit_image"; - $(ident).hide(); -} - '; $interbreadcrumb[]= array ('url' =>'profile.php','name' => get_lang('Social')); diff --git a/main/social/group_add.php b/main/social/group_add.php index 58ada91040..ac0ab9736b 100755 --- a/main/social/group_add.php +++ b/main/social/group_add.php @@ -32,15 +32,6 @@ function text_longitud(){ textarea = document.forms[0].description.value; } } -function show_icon_edit(element_html) { - ident="#edit_image"; - $(ident).show(); -} - -function hide_icon_edit(element_html) { - ident="#edit_image"; - $(ident).hide(); -}