Przeglądaj źródła

Adding jquery-ui in the template + adding an option to show or hide text near the icons (a constant in the display class) I turn it on just for tests

Julio Montoya 13 lat temu
rodzic
commit
7358413fc0
54 zmienionych plików z 202 dodań i 218 usunięć
  1. 0 1
      index.php
  2. 1 1
      main/admin/career_dashboard.php
  3. 1 1
      main/admin/careers.php
  4. 1 2
      main/admin/index.php
  5. 1 1
      main/admin/promotions.php
  6. 1 1
      main/admin/session_list.php
  7. 1 1
      main/admin/skills.php
  8. 1 1
      main/admin/skills_gradebook.php
  9. 0 1
      main/admin/skills_profile.php
  10. 0 2
      main/admin/user_list.php
  11. 1 3
      main/admin/usergroups.php
  12. 0 2
      main/auth/courses.php
  13. 0 1
      main/auth/my_progress.php
  14. 0 1
      main/calendar/agenda.php
  15. 0 4
      main/calendar/myagenda.php
  16. 0 2
      main/course_info/infocours.php
  17. 0 3
      main/course_progress/index.php
  18. 61 1
      main/css/base.css
  19. 1 40
      main/css/base_chamilo.css
  20. 3 26
      main/document/document.inc.php
  21. 2 4
      main/document/document.php
  22. 1 5
      main/document/document_lite.php
  23. 0 4
      main/exercice/admin.php
  24. 4 4
      main/exercice/exercice.php
  25. 1 1
      main/exercice/exercise_report.php
  26. 0 2
      main/exercice/exercise_submit.php
  27. 1 1
      main/exercice/live_stats.php
  28. 1 1
      main/forum/index.php
  29. 1 1
      main/forum/viewforum.php
  30. 1 1
      main/forum/viewforumcategory.php
  31. 2 3
      main/inc/introductionSection.inc.php
  32. 1 1
      main/inc/lib/banner.lib.php
  33. 4 4
      main/inc/lib/course.lib.php
  34. 6 3
      main/inc/lib/course_home.lib.php
  35. 14 8
      main/inc/lib/display.lib.php
  36. 1 1
      main/inc/lib/glossary.lib.php
  37. 4 1
      main/inc/lib/main_api.lib.php
  38. 29 33
      main/inc/lib/social.lib.php
  39. 1 1
      main/inc/lib/sortabletable.class.php
  40. 17 4
      main/inc/lib/template.lib.php
  41. 4 7
      main/inc/lib/userportal.lib.php
  42. 0 2
      main/mySpace/access_details.php
  43. 0 2
      main/newscorm/lp_add_item.php
  44. 0 2
      main/newscorm/lp_admin_view.php
  45. 9 10
      main/newscorm/lp_list.php
  46. 0 1
      main/newscorm/lp_view.php
  47. 1 1
      main/session/index.php
  48. 0 2
      main/social/group_topics.php
  49. 1 5
      main/social/groups.php
  50. 1 1
      main/social/home.php
  51. 1 1
      main/social/skills_tree.php
  52. 20 3
      main/template/default/layout/head.tpl
  53. 1 1
      main/work/work.lib.php
  54. 0 2
      user_portal.php

+ 0 - 1
index.php

@@ -25,7 +25,6 @@ if (!api_is_anonymous()) {
 	$header_title = " ";
 }
 
-$htmlHeadXtra[] = api_get_jquery_ui_js();
 $htmlHeadXtra[] = api_get_jquery_libraries_js(array('bxslider'));
 $htmlHeadXtra[] ='
 <script type="text/javascript">

+ 1 - 1
main/admin/career_dashboard.php

@@ -18,7 +18,7 @@ api_protect_admin_script();
 $this_section = SECTION_PLATFORM_ADMIN;
 
 //Adds the JS needed to use the jqgrid
-$htmlHeadXtra[] = api_get_jquery_ui_js(true);
+$htmlHeadXtra[] = api_get_jqgrid_js();
 
 // setting breadcrumbs
 $interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('PlatformAdmin'));

+ 1 - 1
main/admin/careers.php

@@ -18,7 +18,7 @@ api_protect_admin_script();
 
 
 //Add the JS needed to use the jqgrid
-$htmlHeadXtra[] = api_get_jquery_ui_js(true);
+$htmlHeadXtra[] = api_get_jqgrid_js();
 
 // setting breadcrumbs
 $interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('PlatformAdmin'));

+ 1 - 2
main/admin/index.php

@@ -24,7 +24,6 @@ $this_section = SECTION_PLATFORM_ADMIN;
 api_protect_admin_script(true);
 
 $nameTools = get_lang('PlatformAdmin');
-$htmlHeadXtra[] = api_get_jquery_ui_js();
 
 // Displaying the header
 $message = '';
@@ -132,7 +131,7 @@ if (api_is_platform_admin()) {
     
     
     $search_form = ' <form method="get" action="settings.php" class="form-search">
-							<input type="text" name="search_field" value="">
+							<input type="text" name="search_field" value="" >
                             <input type="hidden" value="search_setting" name="category">
 							<button class="search" type="submit">'.get_lang('Search').'</button>
 	            		</form>';

+ 1 - 1
main/admin/promotions.php

@@ -18,7 +18,7 @@ $this_section = SECTION_PLATFORM_ADMIN;
 api_protect_admin_script();
 
 //Adds the JS needed to use the jqgrid
-$htmlHeadXtra[] = api_get_jquery_ui_js(true);
+$htmlHeadXtra[] = api_get_jqgrid_js();
 // setting breadcrumbs
 $interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('PlatformAdmin'));
 $interbreadcrumb[]=array('url' => 'career_dashboard.php','name' => get_lang('CareersAndPromotions'));

+ 1 - 1
main/admin/session_list.php

@@ -10,7 +10,7 @@ $this_section = SECTION_PLATFORM_ADMIN;
 api_protect_admin_script(true);
 
 //Add the JS needed to use the jqgrid
-$htmlHeadXtra[] = api_get_jquery_ui_js(true);
+$htmlHeadXtra[] = api_get_jqgrid_js();
 
 $action = $_REQUEST['action'];
 $idChecked = $_REQUEST['idChecked'];

+ 1 - 1
main/admin/skills.php

@@ -17,7 +17,7 @@ $this_section = SECTION_PLATFORM_ADMIN;
 api_protect_admin_script();
 
 //Adds the JS needed to use the jqgrid
-$htmlHeadXtra[] = api_get_jquery_ui_js(true);
+$htmlHeadXtra[] = api_get_jqgrid_js();
 $htmlHeadXtra[] = api_get_js('jquery.jsPlumb.all.js');
 $htmlHeadXtra[] = api_get_js('skills.js');
 

+ 1 - 1
main/admin/skills_gradebook.php

@@ -17,7 +17,7 @@ $this_section = SECTION_PLATFORM_ADMIN;
 
 api_protect_admin_script();
 //Adds the JS needed to use the jqgrid
-$htmlHeadXtra[] = api_get_jquery_ui_js(true);
+$htmlHeadXtra[] = api_get_jqgrid_js();
 
 $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'display';
 

+ 0 - 1
main/admin/skills_profile.php

@@ -17,7 +17,6 @@ api_protect_admin_script();
 
 $htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/jquery.fcbkcomplete.js" type="text/javascript" language="javascript"></script>';
 $htmlHeadXtra[] = '<link  href="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/style.css" rel="stylesheet" type="text/css" />';
-$htmlHeadXtra[] = api_get_jquery_ui_js();
 
 $interbreadcrumb[] = array('url' => 'index.php',"name" => get_lang('PlatformAdmin'));
 

+ 0 - 2
main/admin/user_list.php

@@ -21,8 +21,6 @@ if (isset($_configuration['deny_delete_users']) &&  $_configuration['deny_delete
 
 $iam_a_global_admin = api_is_global_platform_admin(); 
 
-$htmlHeadXtra[] = api_get_jquery_ui_js();
-
 $htmlHeadXtra[] = '<script type="text/javascript">
 function load_course_list (div_course,my_user_id) {
 	 $.ajax({

+ 1 - 3
main/admin/usergroups.php

@@ -13,12 +13,10 @@ require_once '../inc/global.inc.php';
 require_once api_get_path(LIBRARY_PATH).'usergroup.lib.php';
 
 $this_section = SECTION_PLATFORM_ADMIN;
-
 api_protect_admin_script();
 
-
 //Add the JS needed to use the jqgrid
-$htmlHeadXtra[] = api_get_jquery_ui_js(true);
+$htmlHeadXtra[] = api_get_jqgrid_js();
 // setting breadcrumbs
 $interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('PlatformAdmin'));
 $action = $_GET['action'];

+ 0 - 2
main/auth/courses.php

@@ -22,8 +22,6 @@ require_once 'courses_controller.php';
 require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';
 
 if (api_get_setting('show_courses_descriptions_in_catalog') == 'true') {
-
-	$htmlHeadXtra[] = api_get_jquery_ui_js();
     $htmlHeadXtra[] = '
     <script type="text/javascript">
     	$(document).ready(function() {

+ 0 - 1
main/auth/my_progress.php

@@ -22,7 +22,6 @@ $nameTools = get_lang('MyProgress');
 
 api_block_anonymous_users();
 
-$htmlHeadXtra[] = api_get_jquery_ui_js();
 $htmlHeadXtra[] = api_get_js('jquery.timelinr-0.9.5.js');
 
 $htmlHeadXtra[] = '

+ 0 - 1
main/calendar/agenda.php

@@ -103,7 +103,6 @@ if (!empty($_GET['isStudentView']) and $_GET['isStudentView']=="false") {
 	api_session_unregister("group");
 }*/
 
-$htmlHeadXtra[] = api_get_jquery_ui_js();
 $htmlHeadXtra[] = to_javascript();
 $htmlHeadXtra[] = user_group_filter_javascript();
 

+ 0 - 4
main/calendar/myagenda.php

@@ -28,12 +28,8 @@ if (!empty ($course_path)) {
 	$interbreadcrumb[] = array ('url' => api_get_path(WEB_COURSE_PATH).urlencode($course_path).'/index.php', 'name' => Security::remove_XSS($_GET['courseCode']));
 }
 // this loads the javascript that is needed for the date popup selection
-$htmlHeadXtra[] = api_get_jquery_ui_js();
 $htmlHeadXtra[] = to_javascript();
-
 $htmlHeadXtra[] = "<script src=\"tbl_change.js\" type=\"text/javascript\" language=\"javascript\"></script>";
-
-
 $htmlHeadXtra[] = "<script>
 $(function() {  
     $(\".dialog\").dialog(\"destroy\");        

+ 0 - 2
main/course_info/infocours.php

@@ -476,8 +476,6 @@ if ($form->validate() && is_settings_editable()) {
 
 /*	Header */
 
-$htmlHeadXtra[] = api_get_jquery_ui_js();
-
 Display :: display_header($nameTools, MODULE_HELP_NAME);
 if ($show_delete_watermark_text_message) {
     Display :: display_normal_message(get_lang('FileDeleted'));

+ 0 - 3
main/course_progress/index.php

@@ -75,11 +75,8 @@ if (!empty($thematic_id)) {
 // get default thematic plan title
 $default_thematic_plan_title = $thematic->get_default_thematic_plan_title();
 
-$htmlHeadXtra[] = api_get_jquery_ui_js();
-
 // Only when I see the 3 columns. Avoids double or triple click binding for onclick event 
  
-	
 $htmlHeadXtra[] = '<script type="text/javascript">
 	
 $(document).ready(function() {

+ 61 - 1
main/css/base.css

@@ -2087,7 +2087,6 @@ border-top: 1px solid #E2E2E2;
     font-size:130%;
     font-weight:bold;
     padding: 0px 8px 0px 8px;
-
 }
 
 #social-thread {
@@ -3542,4 +3541,65 @@ a:active{
 
 #course_tools .row h3 {
     margin-top:10px;
+}
+
+.td_actions {
+ 	background:#efefef;
+    border:1px solid #ccc; 
+    margin-bottom: 5px;    
+    padding:2px;     
+    vertical-align:middle;        
+    width: 250px;
+}
+
+/*
+ This is set in the template
+.td_actions a {
+    float:left;
+    width:100%;
+}
+*/
+.forum_message_left {
+    width: 150px;
+    vertical-align: top;    
+    border-right: 1px solid #aaa;
+    background-color: #F7F7F7;
+}
+
+.forum_message_left a {
+    float:left;
+    width:100%;
+}
+                      
+.forum_message_left_2_be_approved {
+    width: 150px;
+    vertical-align: top;    
+    border-right: 1px solid #aaa;
+    background-color: #F7F7F7;
+    color: #999;
+}
+.forum_message_post_title {
+    /*border-bottom: 1px solid #666666;*/
+    font-weight: bold;
+    background-color: #F7F7F7;
+    height: 20px;
+    font-size:20px;
+}
+.forum_message_post_title_2_be_approved {
+    /*border-bottom: 1px solid #666666;*/
+    color: #999;
+    font-weight: bold;
+    background-color: #F7F7F7;
+    height: 20px;
+}
+.forum_message_post_text {
+    /*border-bottom: 1px solid #666666;*/
+    margin-bottom: 10px;
+    vertical-align: top;
+}
+.forum_message_post_text_2_be_approved {
+    /*border-bottom: 1px solid #666666;*/
+    color: #999;
+    margin-bottom: 10px;
+    vertical-align: top;
 }

+ 1 - 40
main/css/base_chamilo.css

@@ -1012,46 +1012,7 @@ tr.forum_threadheader td {
 .quote {
     background-color: #a0e5fc;
 }
-.forum_message_left {
-    width: 150px;
-    vertical-align: top;
-    /*border-bottom: 1px solid #666666;*/
-    border-right: 1px solid #aaa;
-    background-color: #F7F7F7;
-}
-.forum_message_left_2_be_approved {
-    width: 150px;
-    vertical-align: top;
-    /*border-bottom: 1px solid #666666;*/
-    border-right: 1px solid #aaa;
-    background-color: #F7F7F7;
-    color: #999;
-}
-.forum_message_post_title {
-    /*border-bottom: 1px solid #666666;*/
-    font-weight: bold;
-    background-color: #F7F7F7;
-    height: 20px;
-    font-size:20px;
-}
-.forum_message_post_title_2_be_approved {
-    /*border-bottom: 1px solid #666666;*/
-    color: #999;
-    font-weight: bold;
-    background-color: #F7F7F7;
-    height: 20px;
-}
-.forum_message_post_text {
-    /*border-bottom: 1px solid #666666;*/
-    margin-bottom: 10px;
-    vertical-align: top;
-}
-.forum_message_post_text_2_be_approved {
-    /*border-bottom: 1px solid #666666;*/
-    color: #999;
-    margin-bottom: 10px;
-    vertical-align: top;
-}
+
 .current {
     font-weight: bold;
 }

+ 3 - 26
main/document/document.inc.php

@@ -429,7 +429,8 @@ function build_document_icon_tag($type, $path) {
         }
     }
 
-    return Display::return_icon($icon, $basename, array());
+    //return Display::return_icon($icon, $basename, array());
+    return Display::return_icon($icon, null, array());
 }
 
 /**
@@ -765,29 +766,6 @@ function create_dir_form($current_dir_id) {
     $form->addElement('text', 'dirname', get_lang('NewDir'));
     $form->addElement('style_submit_button', 'submit', get_lang('CreateFolder'), 'class="add"');
     $new_folder_text = $form->return_form();
-    
-    /*
-    $new_folder_text = '<form action="'.api_get_self().'" method="post">';
-    $new_folder_text .= '<input type="hidden" name="dir_id" value="'.intval($document_id).'" />';
-    $new_folder_text .= '<input type="hidden" name="id" value="'.intval($current_dir_id).'" />';
-
-    // Form title
-    $new_folder_text .= '<legend>'.get_lang('CreateDir').'</legend>';
-
-    // Folder field
-    $new_folder_text .= '<div class="row">';
-    $new_folder_text .= '<div class="label"><span class="form_required">*</span>'.get_lang('NewDir').'</div>';
-    $new_folder_text .= '<div class="formw"><input type="text" name="dirname" /></div>';
-    $new_folder_text .= '</div>';
-
-    // Submit button
-    $new_folder_text .= '<div class="row">';
-    $new_folder_text .= '<div class="label">&nbsp;</div>';
-    $new_folder_text .= '<div class="formw"><button type="submit" class="add" name="create_dir">'.get_lang('CreateFolder').'</button></div>';
-    $new_folder_text .= '</div>';
-    $new_folder_text .= '</form>';
-    $new_folder_text .= '<div style="clear: both; margin-bottom: 10px;"></div>';*/
-
     return $new_folder_text;
 }
 
@@ -934,6 +912,5 @@ function is_browser_viewable($file_extension) {
 	elseif ($file_extension=="webm"){
 		return api_browser_support('webm');
 	}
-
     return $result;
-}
+}

+ 2 - 4
main/document/document.php

@@ -469,7 +469,6 @@ if (empty($document_data['parents'])) {
 if (isset($_GET['createdir'])) {
     $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('CreateDir'));
 }
-$htmlHeadXtra[] = api_get_jquery_ui_js();
 
 $js_path 		= api_get_path(WEB_LIBRARY_PATH).'javascript/';
 /*
@@ -909,7 +908,7 @@ if (!$is_certificate_mode) {
     $form = new FormValidator('search_document', 'get', '', '', null, false);
     $renderer = & $form->defaultRenderer();
     $renderer->setElementTemplate('<span>{element}</span> ');
-    $form->add_textfield('keyword', '', false);
+    $form->add_textfield('keyword', '', false, array('class'=>'span2'));
     $form->addElement('style_submit_button', 'submit', get_lang('Search'), 'class="search"');
     $form->display();
     echo '</span>';
@@ -1186,7 +1185,6 @@ if (count($row) == 12) {
 $default_column = $is_allowed_to_edit ? 2 : 1;
 $tablename = $is_allowed_to_edit ? 'teacher_table' : 'student_table';
 
-//var_dump($column_show,$column_order);
 $table = new SortableTableFromArrayConfig($sortable_data, $default_column, 20, $tablename, $column_show, $column_order, 'ASC', true);
 
 if(isset($_GET['keyword'])) {
@@ -1212,7 +1210,7 @@ $table->set_header($column++, get_lang('Size'),true, array('style' => 'width:50p
 $table->set_header($column++, get_lang('Date'),true, array('style' => 'width:105px;'));
 // Admins get an edit column
 if ($is_allowed_to_edit || $group_member_with_upload_rights || is_my_shared_folder(api_get_user_id(), $curdirpath, $session_id)) {
-    $table->set_header($column++, get_lang('Actions'), false, array ('style' => 'width:160px;'));
+    $table->set_header($column++, get_lang('Actions'), false, array ('style' => 'width:160px;'), array('class' => 'td_actions'));
 }
 
 // Actions on multiple selected documents

+ 1 - 5
main/document/document_lite.php

@@ -22,9 +22,7 @@ require_once $lib_path.'tablesort.lib.php';
 
 api_protect_course_script(true);
 
-$htmlHeadXtra[] = api_get_jquery_ui_js(true);
-
-
+$htmlHeadXtra[] = api_get_jqgrid_js();
 
 $course_info 	 = api_get_course_info();
 $course_dir      = $course_info['path'].'/document';
@@ -245,8 +243,6 @@ if (empty($document_data['parents'])) {
 if (isset($_GET['createdir'])) {
     $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('CreateDir'));
 }
-$htmlHeadXtra[] = api_get_jquery_ui_js();
-
 $js_path 		= api_get_path(WEB_LIBRARY_PATH).'javascript/';
 /*
 $htmlHeadXtra[] = '<script type="text/javascript" src="'.$js_path.'yoxview/yox.js"></script>';

+ 0 - 4
main/exercice/admin.php

@@ -299,10 +299,6 @@ if($modifyIn == 'thisExercise') {
 		$noPHP_SELF=true;
 	}
 }
-
-
-$htmlHeadXtra[] = api_get_jquery_ui_js();
-
 $htmlHeadXtra[] = '<script type="text/javascript"> 
         
 function multiple_answer_true_false_onchange(variable) {

+ 4 - 4
main/exercice/exercice.php

@@ -22,7 +22,6 @@ require_once '../gradebook/lib/be.inc.php';
 // Setting the tabs
 $this_section = SECTION_COURSES;
 
-$htmlHeadXtra[] = api_get_jquery_ui_js();
 $htmlHeadXtra[] = api_get_js('qtip2/jquery.qtip.min.js');
 $htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/qtip2/jquery.qtip.min.css');
 
@@ -417,7 +416,7 @@ while ($row = Database :: fetch_array($result,'ASSOC')) {
     $exercise_list[] = $row;
 } 
 
-echo '<table class="data_table">';    
+echo '<table class="'.Display::return_default_table_class().'">';    
 if (!empty($exercise_list)) {  
     /*  Listing exercises  */
     
@@ -745,8 +744,9 @@ if (!empty($exercise_list)) {
                 $class = 'row_odd';
             }
             
-            if ($is_allowedToEdit)
-                $item .=  Display::tag('td', $actions);                    
+            if ($is_allowedToEdit) {
+                $item .=  Display::tag('td', $actions, array('class' => 'td_actions'));                    
+            }
             echo Display::tag('tr',$item, array('class'=>$class));
                    
             $count++;

+ 1 - 1
main/exercice/exercise_report.php

@@ -22,7 +22,7 @@ require_once '../gradebook/lib/be.inc.php';
 // Setting the tabs
 $this_section = SECTION_COURSES;
 
-$htmlHeadXtra[] = api_get_jquery_ui_js(true);
+$htmlHeadXtra[] = api_get_jqgrid_js();
 
 // Access control
 api_protect_course_script(true);

+ 0 - 2
main/exercice/exercise_submit.php

@@ -48,8 +48,6 @@ api_protect_course_script(true);
 
 $is_allowedToEdit = api_is_allowed_to_edit(null,true);
 
-$htmlHeadXtra[] = api_get_jquery_ui_js();
-
 if (api_get_setting('show_glossary_in_extra_tools') == 'true') {
     $htmlHeadXtra[] = api_get_js('glossary.js'); //Glossary
     $htmlHeadXtra[] = api_get_js('jquery.highlight.js'); //highlight

+ 1 - 1
main/exercice/live_stats.php

@@ -28,7 +28,7 @@ $interbreadcrumb[] = array ("url" => "exercice.php?gradebook=$gradebook", "name"
 $interbreadcrumb[] = array ("url" => "admin.php?exerciseId=$exercise_id","name" => $objExercise->name);
 
 //Add the JS needed to use the jqgrid
-$htmlHeadXtra[] = api_get_jquery_ui_js(true);
+$htmlHeadXtra[] = api_get_jqgrid_js();
 
 // The header.
 Display::display_header($tool_name);

+ 1 - 1
main/forum/index.php

@@ -384,7 +384,7 @@ if (is_array($forum_categories_list)) {
                             echo api_convert_and_format_date($forum['last_post_date']).'<br /> '.get_lang('By').' '.display_user_link($poster_id, $name, '', $username);
                         }
                         echo '</td>';
-                        echo '<td nowrap="nowrap" align="center">';
+                        echo '<td class="td_actions">';
                         if (api_is_allowed_to_edit(false, true) && !($forum['session_id'] == 0 && intval($session_id) != 0)) {
                             echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&amp;gradebook='.$gradebook.'&amp;action=edit&amp;content=forum&amp;id='.$forum['forum_id'].'">'.Display::return_icon('edit.png',get_lang('Edit'), array(), ICON_SIZE_SMALL).'</a>';
                             echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&amp;gradebook='.$gradebook.'&amp;action=delete&amp;content=forum&amp;id='.$forum['forum_id']."\" onclick=\"javascript:if(!confirm('".addslashes(api_htmlentities(get_lang('DeleteForum'), ENT_QUOTES))."')) return false;\">".Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL).'</a>';

+ 1 - 1
main/forum/viewforum.php

@@ -418,7 +418,7 @@ if (is_array($threads)) {
             }
 
             echo '<td>'.$last_post.'</td>';
-            echo '<td>';
+            echo '<td class="td_actions">';
             // Get attachment id.
             $attachment_list = get_attachment($row['post_id']);
             $id_attach = !empty($attachment_list) ? $attachment_list['id'] : '';

+ 1 - 1
main/forum/viewforumcategory.php

@@ -319,7 +319,7 @@ if ($action_forums != 'add') {
                     echo $forum['last_post_date'].' '.get_lang('By').' '.display_user_link($poster_id, $name);
                 }
                 echo '</td>';
-                echo '<td nowrap align="center">';
+                echo '<td class="td_actions">';
 
                 if (api_is_allowed_to_edit(false, true) && !($forum['session_id'] == 0 && intval(isset($_SESSION['id_session']) ? $_SESSION['id_session'] : null) != 0)) {
                     echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&amp;forumcategory='.Security::remove_XSS($_GET['forumcategory']).'&amp;action=edit&amp;content=forum&amp;id='.$forum['forum_id'].'">'.Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL).'</a>';

+ 2 - 3
main/inc/introductionSection.inc.php

@@ -240,9 +240,8 @@ if ($intro_dispCommand) {
 		// Displays "Add intro" commands
 		$introduction_section .=  "<div id=\"courseintro_empty\">";
 		if (!empty ($GLOBALS['_cid'])) {			
-			$introduction_section .=  "<a href=\"".api_get_self()."?".api_get_cidreq()."&amp;intro_cmdAdd=1\">";
-			$introduction_section .=  Display::return_icon('introduction_add.gif', get_lang('AddIntro')).' ';
-			$introduction_section .=  get_lang('AddIntro');			
+			$introduction_section .=  "<a href=\"".api_get_self()."?".api_get_cidreq()."&amp;intro_cmdAdd=1\">";            
+            $introduction_section .=  Display::return_icon('introduction_add.gif', get_lang('AddIntro')).' ';            		
 			$introduction_section .=  "</a>";
 		} else {
 			$introduction_section .= "<a href=\"".api_get_self()."?intro_cmdAdd=1\">\n".get_lang('AddIntro')."</a>";

+ 1 - 1
main/inc/lib/banner.lib.php

@@ -183,7 +183,7 @@ function show_header_2() {
         // Display the who's online of the platform
         if ($number) {
             if ((api_get_setting('showonline', 'world') == 'true' AND !$user_id) OR (api_get_setting('showonline', 'users') == 'true' AND $user_id)) {
-                $html .= '<li><a href="'.api_get_path(WEB_PATH).'whoisonline.php" target="_top" title="'.get_lang('UsersOnline').'" ><img width="13px" src="'.api_get_path(WEB_IMG_PATH).'members.gif" title="'.get_lang('UsersOnline').'"> '.$number.'</a></li>';
+                $html .= '<li><a href="'.api_get_path(WEB_PATH).'whoisonline.php" target="_top" title="'.get_lang('UsersOnline').'" >'.Display::return_icon('members.gif', get_lang('UsersOnline'), array('width'=>'13px')).' '.$number.'</a></li>';
             }
         }
     

+ 4 - 4
main/inc/lib/course.lib.php

@@ -2779,7 +2779,7 @@ class CourseManager {
                         $course['status'] = $user_info['status'];
                     }
 
-                    $status_icon = Display::return_icon('blackboard.png', get_lang('Course'), array(), ICON_SIZE_LARGE);
+                    $status_icon = Display::return_icon('blackboard.png', null, array(), ICON_SIZE_LARGE);
                     
                     $params['right_actions'] = '';
                     if (api_is_platform_admin()) {
@@ -2861,7 +2861,7 @@ class CourseManager {
             $params = array();
             
             // We simply display the title of the category.
-            $params['icon'] = Display::return_icon('folder_yellow.png', get_lang('Category'), array(), ICON_SIZE_LARGE);
+            $params['icon'] = Display::return_icon('folder_yellow.png', null, array(), ICON_SIZE_LARGE);
             $params['title'] = $row['title'];            
             $html .= self::course_item_parent(self::course_item_html($params), self :: display_courses_in_category($row['id'], $load_dirs));
         }
@@ -2924,7 +2924,7 @@ class CourseManager {
             // (something that would have changed since the user's last visit).
             $show_notification = Display :: show_notification($my_course);
             // New code displaying the user's status in respect to this course.
-            $status_icon = Display::return_icon('blackboard.png', get_lang('Course'), array(), ICON_SIZE_LARGE);
+            $status_icon = Display::return_icon('blackboard.png', null, array(), ICON_SIZE_LARGE);
             
             $params = array();
             $params['right_actions'] = '';
@@ -3140,7 +3140,7 @@ class CourseManager {
         $s_course_status = $my_course['status'];
         $is_coach = api_is_coach($my_course['id_session'], $course['code']);
             
-        $s_htlm_status_icon = Display::return_icon('blackboard_blue.png', get_lang('Course'), array(), ICON_SIZE_LARGE);
+        $s_htlm_status_icon = Display::return_icon('blackboard_blue.png', null, array(), ICON_SIZE_LARGE);
         
         // Display course entry.        
         // Show a hyperlink to the course, unless the course is closed and user is not course admin.

+ 6 - 3
main/inc/lib/course_home.lib.php

@@ -638,12 +638,14 @@ class CourseHome {
                 if ($is_allowed_to_edit && !api_is_coach()) {
 
                     if ($tool['visibility'] == '1' && $tool['admin'] != '1') {
-                        $link['name'] = Display::return_icon('visible.gif', get_lang('Deactivate'), array('id' => 'linktool_'.$tool['id']));
+                        //$link['name'] = Display::return_icon('visible.gif', get_lang('Deactivate'), array('id' => 'linktool_'.$tool['id']));
+                        $link['name'] = Display::return_icon('visible.gif', null, array('id' => 'linktool_'.$tool['id']));
                         $link['cmd'] = 'hide=yes';
                         $lnk[] = $link;
                     }
                     if ($tool['visibility'] == '0' && $tool['admin'] != '1') {
-                        $link['name'] = Display::return_icon('invisible.gif', get_lang('Activate'), array('id' => 'linktool_'.$tool['id']));
+                        //$link['name'] = Display::return_icon('invisible.gif', get_lang('Activate'), array('id' => 'linktool_'.$tool['id']));
+                        $link['name'] = Display::return_icon('invisible.gif', null, array('id' => 'linktool_'.$tool['id']));
                         $link['cmd'] = 'restore=yes';
                         $lnk[] = $link;
                     }                    
@@ -725,7 +727,8 @@ class CourseHome {
                     }
                 }                
                 $tool_name = self::translate_tool_name($tool);
-                $icon = Display::return_icon($tool['image'], $tool_name, array('class' => 'tool-icon', 'id' => 'toolimage_'.$tool['id']));
+                //$icon = Display::return_icon($tool['image'], $tool_name, array('class' => 'tool-icon', 'id' => 'toolimage_'.$tool['id']));
+                $icon = Display::return_icon($tool['image'], null, array('class' => 'tool-icon', 'id' => 'toolimage_'.$tool['id']));
 
                 // Validacion when belongs to a session
                 $session_img = api_get_session_image($tool['session_id'], $_user['status']);

+ 14 - 8
main/inc/lib/display.lib.php

@@ -25,6 +25,8 @@ define('ICON_SIZE_LARGE',   48);
 define('ICON_SIZE_BIG',     64);
 define('ICON_SIZE_HUGE',    128);
 
+define('SHOW_TEXT_NEAR_ICONS', true);
+
         
 /**
  * Display class
@@ -427,7 +429,7 @@ class Display {
             $i }).';';
         }
         // icon html code
-        $icon_html_source = Display::return_icon($icon_file, $hmail, '', $icon_size);
+        $icon_html_source = self::return_icon($icon_file, $hmail, '', $icon_size);
         // Return encrypted mailto hyperlink
         return '<a href="'.$hmail.'"'.$style_class.' id="clickable_email_link">'.$icon_html_source.'</a>';
     }
@@ -565,10 +567,7 @@ class Display {
         $size_extra = '';
         
         if (isset($size)) {
-            $size = intval($size);
-            /*if (in_array($size,array(16, 22, 32, 48, 64,128))) {
-                $size_extra = $size.'/';
-            }*/
+            $size = intval($size);            
             $size_extra = $size.'/';
         }
         
@@ -581,8 +580,12 @@ class Display {
         } else {
             //Checking the img/ folder
             $icon = $w_code_path.'img/'.$image;
+        }        
+        $img = self::img($icon, $alt_text, $additional_attributes);
+        if (SHOW_TEXT_NEAR_ICONS == true and !empty($alt_text)) {
+            $img = "$img $alt_text";
         }
-        return self::img($icon, $alt_text, $additional_attributes);
+        return $img;
     }
 
     /**
@@ -1325,7 +1328,10 @@ class Display {
         if ($add_div_wrapper) {
 			$html = Display::div($html, array('id' => 'rating_wrapper_'.$id));
 		}
-        return $html;
-        
+        return $html;        
+    }
+    
+    function return_default_table_class() {
+        return 'data_table';
     }
 } //end class Display

+ 1 - 1
main/inc/lib/glossary.lib.php

@@ -308,7 +308,7 @@ class GlossaryManager {
 			$table->set_header(0, get_lang('TermName'), true);
 			$table->set_header(1, get_lang('TermDefinition'), true);			
 			if (api_is_allowed_to_edit(null,true)) {			         
-				$table->set_header(2, get_lang('Actions'), false, 'width=90px');
+				$table->set_header(2, get_lang('Actions'), false, 'width=90px', array('class' => 'td_actions'));
 				$table->set_column_filter(2, array('GlossaryManager','actions_filter'));
 			}
 			$table->display();

+ 4 - 1
main/inc/lib/main_api.lib.php

@@ -5459,7 +5459,6 @@ function api_get_css($file) {
 	return '<link rel="stylesheet" href="'.$file.'" type="text/css" />'."\n";	
 }
 
-
 /**
  * Returns the js header to include the jquery library
  */
@@ -5482,6 +5481,10 @@ function api_get_jquery_ui_js($include_jqgrid = false) {
     return api_get_jquery_libraries_js($libraries);
 }
 
+function api_get_jqgrid_js() {    
+    return api_get_jquery_libraries_js(array('jqgrid'));
+}
+
 /**
  * Returns the jquery library js and css headers 
  * 

+ 29 - 33
main/inc/lib/social.lib.php

@@ -152,9 +152,7 @@ class SocialManager extends UserManager {
 	 * @param int user id
 	 * @return array
 	 */
-	public static function get_list_web_path_user_invitation_by_user_id ($user_id) {
-		$list_paths=array();
-		$list_path_friend=array();
+	public static function get_list_web_path_user_invitation_by_user_id ($user_id) {		
 		$list_ids = self::get_list_invitation_of_friends_by_user_id((int)$user_id);
 		$list_path_image_friend = array();
 		foreach ($list_ids as $values_ids) {
@@ -613,40 +611,38 @@ class SocialManager extends UserManager {
 
 	  		//--- User image
 			
-				$html .= '<div class="social-background-content" onmouseout="hide_icon_edit()" onmouseover="show_icon_edit()">';
-
-					if ($img_array['file'] != 'unknown.jpg') {
-		    	  		$html .= '<a class="thickbox" href="'.$big_image.'"><img src='.$normal_image.' /> </a>';
-					} else {
-						$html .= '<img src='.$normal_image.' width="110px" />';
-					}
-					if (api_get_user_id() == $user_id) {
-						$html .= '<div id="edit_image" class="hidden_message" style="display:none">';
-						$html .= '<a href="'.api_get_path(WEB_PATH).'main/auth/profile.php">'.get_lang('EditProfile').'</a></div>';
-					}
-	    	  	$html .= '</div>';
-		  	
+            $html .= '<div class="social-background-content" onmouseout="hide_icon_edit()" onmouseover="show_icon_edit()">';
+                if ($img_array['file'] != 'unknown.jpg') {
+                    $html .= '<a class="thickbox" href="'.$big_image.'"><img src='.$normal_image.' /> </a>';
+                } else {
+                    $html .= '<img src='.$normal_image.' width="110px" />';
+                }
+                if (api_get_user_id() == $user_id) {
+                    $html .= '<div id="edit_image" class="hidden_message" style="display:none">';
+                    $html .= '<a href="'.api_get_path(WEB_PATH).'main/auth/profile.php">'.get_lang('EditProfile').'</a></div>';
+                }
+            $html .= '</div>';		  	
 	  	}
 
 		if (!in_array($show, array('shared_profile', 'groups', 'group_edit', 'member_list','waiting_list','invite_friends'))) {			
 
 	        $html .= '<div class="social_menu_items"><ul>';	        	                	
-            $html .= '<li><a href="'.api_get_path(WEB_PATH).'main/social/home.php">'.Display::return_icon('home.png',get_lang('Home'),array('hspace'=>'6')).'<span class="'.($show=='home'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Home').'</span></a></li>';
-            $html .= '<li><a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php?f=social">'.Display::return_icon('instant_message.png',get_lang('Messages'),array('hspace'=>'6')).'<span class="'.($show=='messages'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Messages').$count_unread_message.'</span></a></li>';
+            $html .= '<li><a href="'.api_get_path(WEB_PATH).'main/social/home.php">'.Display::return_icon('home.png',null,array('hspace'=>'6')).'<span class="'.($show=='home'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Home').'</span></a></li>';
+            $html .= '<li><a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php?f=social">'.Display::return_icon('instant_message.png',null,array('hspace'=>'6')).'<span class="'.($show=='messages'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Messages').$count_unread_message.'</span></a></li>';
 
 	        //Invitations
-	        $html .= '<li><a href="'.api_get_path(WEB_PATH).'main/social/invitations.php">'.Display::return_icon('invitation.png',get_lang('Invitations'),array('hspace'=>'6')).'<span class="'.($show=='invitations'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Invitations').$total_invitations.'</span></a></li>';
+	        $html .= '<li><a href="'.api_get_path(WEB_PATH).'main/social/invitations.php">'.Display::return_icon('invitation.png',null,array('hspace'=>'6')).'<span class="'.($show=='invitations'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Invitations').$total_invitations.'</span></a></li>';
 			
 			//Shared profile and groups
-	        $html .= '<li><a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'.Display::return_icon('my_shared_profile.png',get_lang('ViewMySharedProfile'),array('hspace'=>'6')).'<span class="'.($show=='shared_profile'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('ViewMySharedProfile').'</span></a></li>
-	        	  <li><a href="'.api_get_path(WEB_PATH).'main/social/friends.php">'.Display::return_icon('friend.png',get_lang('Friends'),array('hspace'=>'6')).'<span class="'.($show=='friends'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Friends').'</span></a></li>
-	              <li><a href="'.api_get_path(WEB_PATH).'main/social/groups.php">'.Display::return_icon('group.png',get_lang('SocialGroups'),array('hspace'=>'6')).'<span class="'.($show=='browse_groups'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('SocialGroups').'</span></a></li>';
+	        $html .= '<li><a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'.Display::return_icon('my_shared_profile.png',null,array('hspace'=>'6')).'<span class="'.($show=='shared_profile'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('ViewMySharedProfile').'</span></a></li>
+	        	  <li><a href="'.api_get_path(WEB_PATH).'main/social/friends.php">'.Display::return_icon('friend.png',null,array('hspace'=>'6')).'<span class="'.($show=='friends'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Friends').'</span></a></li>
+	              <li><a href="'.api_get_path(WEB_PATH).'main/social/groups.php">'.Display::return_icon('group.png',null,array('hspace'=>'6')).'<span class="'.($show=='browse_groups'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('SocialGroups').'</span></a></li>';
 
 			//Search users
-	        $html .= '<li><a href="'.api_get_path(WEB_PATH).'main/social/search.php">'.Display::return_icon('zoom.png',get_lang('Search'),array('hspace'=>'6')).'<span class="'.($show=='search'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Search').'</span></a></li>';
+	        $html .= '<li><a href="'.api_get_path(WEB_PATH).'main/social/search.php">'.Display::return_icon('zoom.png',null,array('hspace'=>'6')).'<span class="'.($show=='search'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Search').'</span></a></li>';
             		
 			//My files
-			$html .= '<li><a href="'.api_get_path(WEB_PATH).'main/social/myfiles.php">'.Display::return_icon('briefcase.png',get_lang('MyFiles'),array('hspace'=>'6'),16).'<span class="'.($show=='myfiles'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('MyFiles').'</span></a></li>';	
+			$html .= '<li><a href="'.api_get_path(WEB_PATH).'main/social/myfiles.php">'.Display::return_icon('briefcase.png',null,array('hspace'=>'6'),16).'<span class="'.($show=='myfiles'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('MyFiles').'</span></a></li>';	
 	        $html .='</ul>
 				  </div>';	     
 		}
@@ -662,14 +658,14 @@ class SocialManager extends UserManager {
 
     	  	// My own profile
     	  	if ($show_full_profile && $user_id == intval(api_get_user_id())) {
-	        	$html .= '<li><a href="'.api_get_path(WEB_PATH).'main/social/home.php">'.Display::return_icon('home.png',get_lang('Home'),array('hspace'=>'6')).'<span class="social-menu-text4" >'.get_lang('Home').'</span></a></li>
-	                  <li><a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php?f=social">'.Display::return_icon('instant_message.png',get_lang('Messages'),array('hspace'=>'6')).'<span class="social-menu-text4" >'.get_lang('Messages').$count_unread_message.'</span></a></li>';
-	        	$html .= '<li><a href="'.api_get_path(WEB_PATH).'main/social/invitations.php">'.Display::return_icon('invitation.png',get_lang('Invitations'),array('hspace'=>'6')).'<span class="'.($show=='invitations'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Invitations').$total_invitations.'</span></a></li>';
-	        	$html .= '<li><a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'.Display::return_icon('my_shared_profile.png',get_lang('ViewMySharedProfile'),array('hspace'=>'6','style'=>'float:left')).'<span class="social-menu-text-active" >'.get_lang('ViewMySharedProfile').'</span></a></li>
-	        		  <li><a href="'.api_get_path(WEB_PATH).'main/social/friends.php">'.Display::return_icon('friend.png',get_lang('Friends'),array('hspace'=>'6')).'<span class="social-menu-text4" >'.get_lang('Friends').'</span></a></li>
-	                  <li><a href="'.api_get_path(WEB_PATH).'main/social/groups.php">'.Display::return_icon('group.png',get_lang('SocialGroups'),array('hspace'=>'6')).'<span class="social-menu-text4" >'.get_lang('SocialGroups').'</span></a></li>';
-	        	$html .= '<li><a href="'.api_get_path(WEB_PATH).'main/social/search.php">'.Display::return_icon('zoom.png',get_lang('Search'),array('hspace'=>'6')).'<span class="'.($show=='search'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Search').'</span></a></li>';
-				$html .= '<li><a href="'.api_get_path(WEB_PATH).'main/social/myfiles.php">'.Display::return_icon('briefcase.png',get_lang('MyFiles'),array('hspace'=>'6'),16).'<span class="'.($show=='myfiles'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('MyFiles').'</span></a></li>';
+	        	$html .= '<li><a href="'.api_get_path(WEB_PATH).'main/social/home.php">'.Display::return_icon('home.png',null,array('hspace'=>'6')).'<span class="social-menu-text4" >'.get_lang('Home').'</span></a></li>
+	                  <li><a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php?f=social">'.Display::return_icon('instant_message.png',null,array('hspace'=>'6')).'<span class="social-menu-text4" >'.get_lang('Messages').$count_unread_message.'</span></a></li>';
+	        	$html .= '<li><a href="'.api_get_path(WEB_PATH).'main/social/invitations.php">'.Display::return_icon('invitation.png',null,array('hspace'=>'6')).'<span class="'.($show=='invitations'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Invitations').$total_invitations.'</span></a></li>';
+	        	$html .= '<li><a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'.Display::return_icon('my_shared_profile.png',null,array('hspace'=>'6','style'=>'float:left')).'<span class="social-menu-text-active" >'.get_lang('ViewMySharedProfile').'</span></a></li>
+	        		  <li><a href="'.api_get_path(WEB_PATH).'main/social/friends.php">'.Display::return_icon('friend.png',null,array('hspace'=>'6')).'<span class="social-menu-text4" >'.get_lang('Friends').'</span></a></li>
+	                  <li><a href="'.api_get_path(WEB_PATH).'main/social/groups.php">'.Display::return_icon('group.png',null,array('hspace'=>'6')).'<span class="social-menu-text4" >'.get_lang('SocialGroups').'</span></a></li>';
+	        	$html .= '<li><a href="'.api_get_path(WEB_PATH).'main/social/search.php">'.Display::return_icon('zoom.png',null,array('hspace'=>'6')).'<span class="'.($show=='search'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Search').'</span></a></li>';
+				$html .= '<li><a href="'.api_get_path(WEB_PATH).'main/social/myfiles.php">'.Display::return_icon('briefcase.png',null,array('hspace'=>'6'),16).'<span class="'.($show=='myfiles'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('MyFiles').'</span></a></li>';
     	  	}
 			
     	  	// My friend profile
@@ -709,7 +705,7 @@ class SocialManager extends UserManager {
 				if (is_array($personal_course_list)) {
 					foreach ($personal_course_list as $my_course) {
 						if ($i<=10) {
-							$list[] = SocialManager::get_logged_user_course_html($my_course,$i);
+							//$list[] = SocialManager::get_logged_user_course_html($my_course,$i);
 							$course_list_code[] = array('code'=>$my_course['k']);
 						} else {
 							break;

+ 1 - 1
main/inc/lib/sortabletable.class.php

@@ -954,7 +954,7 @@ class SortableTableFromArrayConfig extends SortableTable {
 	 * Get table data to show on current page
 	 * @see SortableTable#get_table_data
 	 */
-	public function get_table_data ($from = 1, $per_page = null, $column = null, $direction = null, $sort = true) {	    
+	public function get_table_data($from = 1, $per_page = null, $column = null, $direction = null, $sort = true) {	    
 		$content = TableSort :: sort_table_config($this->table_data, $this->column, $this->direction == 'ASC' ? SORT_ASC : SORT_DESC, $this->column_show, $this->column_order, SORT_REGULAR, $this->doc_filter);
 		return array_slice($content, $from, $this->per_page);
 	}

+ 17 - 4
main/inc/lib/template.lib.php

@@ -334,9 +334,9 @@ class Template extends Smarty {
 			'dtree/dtree.js',
 			'email_links.lib.js.php',
 			'bootstrap/bootstrap-dropdown.js',            
-            'bootstrap/bootstrap-collapse.js'
+            'bootstrap/bootstrap-collapse.js'            
 		);
-	
+        
 		if (api_get_setting('allow_global_chat') == 'true') {            
             if (!api_is_anonymous()) {
                 $js_files[] = 'chat/js/chat.js';
@@ -378,15 +378,28 @@ class Template extends Smarty {
 		foreach ($css_files  as $css_file) {
 			$css_file_to_string .= api_get_css($css_file);
 		}
+        
+        if (SHOW_TEXT_NEAR_ICONS == true) {
+            $css_file_to_string .= '<style>
+                .td_actions a {
+                    float:left;
+                    width:100%;
+                }
+                }
+                </style>';
+        }
 	
 		global $this_section;        
         
 		$this->assign('css_file_to_string', $css_file_to_string);
 		$this->assign('js_file_to_string',  $js_file_to_string);		
 		$this->assign('text_direction',	    api_get_text_direction());					
-		$this->assign('section_name',       'section-'.$this_section);
+		$this->assign('section_name',       'section-'.$this_section);        
+        
+        //Adding jquery ui by default
+        $extra_headers = api_get_jquery_ui_js();
 		
-		$extra_headers = '';		
+		//$extra_headers = '';		
 		if (isset($htmlHeadXtra) && $htmlHeadXtra) {
 		    foreach ($htmlHeadXtra as & $this_html_head) {
 		        $extra_headers .= $this_html_head;

+ 4 - 7
main/inc/lib/userportal.lib.php

@@ -1222,7 +1222,7 @@ class IndexManager {
 		
 						if ($count_courses_session > 0) {
 							$params = array();                            							
-							$params['icon'] =  Display::return_icon('window_list.png', get_lang('Expand').'/'.get_lang('Hide'), array('id' => 'session_img_'.$session['details']['id']), ICON_SIZE_LARGE);
+							$params['icon'] =  Display::return_icon('window_list.png', null, array('id' => 'session_img_'.$session['details']['id']), ICON_SIZE_LARGE);
 		
 							$s = Display :: get_session_title_box($session['details']['id']);
 							$extra_info = (!empty($s['coach']) ? $s['coach'].' | ' : '').$s['dates'];							
@@ -1274,11 +1274,8 @@ class IndexManager {
                             $params = array();
                             
 							if ($count > 0) {
-								$s = Display :: get_session_title_box($session['details']['id']);
-								//$html_sessions .= '<ul class="sub_session_box" id="session_'.$session['details']['id'].'">';
-								//$html_sessions .= '<li class="sub_session_box_title" id="session_'.$session['details']['id'].'">';								
-								//$html_sessions .= Display::return_icon('window_list.png', get_lang('Expand').'/'.get_lang('Hide'), array('width' => '48px', 'align' => 'absmiddle', 'id' => 'session_img_'.$session['details']['id'])) . ' ';
-                                $params['icon'] = Display::return_icon('window_list.png', get_lang('Expand').'/'.get_lang('Hide'), array('width' => '48px', 'align' => 'absmiddle', 'id' => 'session_img_'.$session['details']['id'])) . ' ';
+								$s = Display :: get_session_title_box($session['details']['id']);								
+                                $params['icon'] = Display::return_icon('window_list.png', null, array('width' => '48px', 'align' => 'absmiddle', 'id' => 'session_img_'.$session['details']['id'])) . ' ';
 		
 								$session_link = Display::tag('a',$s['title'], array('href'=>api_get_path(WEB_CODE_PATH).'session/?session_id='.$session['details']['id']));
 								$params['title'] .=  $session_link;
@@ -1295,7 +1292,7 @@ class IndexManager {
 		
 						if ($count_courses_session > 0) {
                             $params = array();				
-							$params['icon'] = Display::return_icon('folder_blue.png', get_lang('SessionCategory'), array(), ICON_SIZE_LARGE);
+							$params['icon'] = Display::return_icon('folder_blue.png', null, array(), ICON_SIZE_LARGE);
                             
 							if (api_is_platform_admin()) {
 								$params['right_actions'] .= '<a href="'.api_get_path(WEB_CODE_PATH).'admin/session_category_edit.php?&id='.$category['details']['id'].'">'.Display::return_icon('edit.png', get_lang('Edit'), array(),22).'</a>';

+ 0 - 2
main/mySpace/access_details.php

@@ -37,8 +37,6 @@ $connections = MySpace::get_connections_to_course($user_id, $course_code, $sessi
 
 $quote_simple = "'";
 
-$htmlHeadXtra[] = api_get_jquery_ui_js();
-
 $htmlHeadXtra[] = '<script src="slider.js" type="text/javascript"></script>';
 $htmlHeadXtra[] = '<link rel="stylesheet" href="slider.css" />';
 

+ 0 - 2
main/newscorm/lp_add_item.php

@@ -132,8 +132,6 @@ $(function() {
     });        
 });
 </script>';
-        
-$htmlHeadXtra[] =  api_get_jquery_ui_js(); //jQuery
 
 /* Constants and variables */
 

+ 0 - 2
main/newscorm/lp_admin_view.php

@@ -91,8 +91,6 @@ if (isset($_REQUEST['updateaudio'])) {
 $show_learn_path = true;
 $lp_theme_css = $_SESSION['oLP']->get_theme();
 
-$htmlHeadXtra[] = api_get_jquery_ui_js();
-
 Display::display_header(null, 'Path');
 //api_display_tool_title($therow['name']);
 

+ 9 - 10
main/newscorm/lp_list.php

@@ -267,7 +267,7 @@ if (!empty($flat_list)) {
         }   
         
         
-        $dsp_edit = '<td align="center">';
+        $dsp_edit = '<td class="td_actions">';
         $dsp_edit_close = '</td>';
         
         if ($is_allowed_to_edit) {
@@ -362,19 +362,18 @@ if (!empty($flat_list)) {
       */
             if ($current_session == $details['lp_session']) {
               if ($details['seriousgame_mode'] == 1 && $details['lp_prevent_reinit'] == 1) { //seriousgame mode | next = single
-                $dsp_reinit = '<a href="lp_controller.php?'.api_get_cidreq().'&action=switch_attempt_mode&lp_id='.$id.'">' .
-                  '<img src="../img/gamepad.gif" border="0" alt="Prevent reinit" title="'.get_lang("PreventMultipleAttempts").'"/>' .
-                  '</a>&nbsp;';
+                $dsp_reinit = '<a href="lp_controller.php?'.api_get_cidreq().'&action=switch_attempt_mode&lp_id='.$id.'">' .                  
+                    Display::return_icon('kaboodleloop.gif', get_lang('PreventMultipleAttempts'),'',ICON_SIZE_SMALL).
+                  '</a>';
               }
               if ($details['seriousgame_mode'] == 0 && $details['lp_prevent_reinit'] == 1) { //single mode | next = multiple
-                $dsp_reinit = '<a href="lp_controller.php?'.api_get_cidreq().'&action=switch_attempt_mode&lp_id='.$id.'">' .
-                  '<img src="../img/kaboodleloop_gray.gif" border="0" alt="Allow reinit" title="'.get_lang("AllowMultipleAttempts").'"/>' .
-                  '</a>&nbsp;';
+                $dsp_reinit = '<a href="lp_controller.php?'.api_get_cidreq().'&action=switch_attempt_mode&lp_id='.$id.'">' .                  
+                   Display::return_icon('kaboodleloop_gray.gif', get_lang('AllowMultipleAttempts'),'',ICON_SIZE_SMALL).
+                  '</a>';
               }
               if ($details['seriousgame_mode'] == 0 && $details['lp_prevent_reinit'] == 0) { //multiple mode | next = seriousgame
-                $dsp_reinit = '<a href="lp_controller.php?'.api_get_cidreq().'&action=switch_attempt_mode&lp_id='.$id.'">' .
-                  '<img src="../img/kaboodleloop.gif" border="0" alt="Serious game mode" title="'.get_lang("SeriousGameMode").'"/>' .
-                  '</a>&nbsp;';
+                $dsp_reinit = '<a href="lp_controller.php?'.api_get_cidreq().'&action=switch_attempt_mode&lp_id='.$id.'">' .Display::return_icon('kaboodleloop.gif', get_lang('AllowMultipleAttempts'),'',ICON_SIZE_SMALL).                  
+                  '</a>';
               }
             } else {
                 $dsp_reinit = Display::return_icon('kaboodleloop_gray.png', get_lang('AllowMultipleAttempts'),'',ICON_SIZE_SMALL);

+ 0 - 1
main/newscorm/lp_view.php

@@ -41,7 +41,6 @@ $user_id        = api_get_user_id();
 $platform_theme = api_get_setting('stylesheets'); // Plataform's css.
 $my_style       = $platform_theme;
 
-$htmlHeadXtra[] = api_get_jquery_ui_js();
 $htmlHeadXtra[] = '<script  src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.lp_minipanel.js" type="text/javascript" language="javascript"></script>';
 
 if (api_get_setting('show_glossary_in_documents') == 'ismanual' || api_get_setting('show_glossary_in_documents') == 'isautomatic' ) {

+ 1 - 1
main/session/index.php

@@ -20,7 +20,7 @@ require_once api_get_path(SYS_CODE_PATH).'exercice/exercise.class.php';
 api_block_anonymous_users(); // Only users who are logged in can proceed.
 
 $this_section = SECTION_COURSES;
-$htmlHeadXtra[] = api_get_jquery_ui_js(true);
+$htmlHeadXtra[] = api_get_jqgrid_js();
 
 if (empty($_GET['session_id'])) {
 	api_not_allowed();

+ 0 - 2
main/social/group_topics.php

@@ -77,8 +77,6 @@ if (isset($_POST['token']) && $_POST['token'] === $_SESSION['sec_token']) {
 	}
 }
 
-
-$htmlHeadXtra[] = api_get_jquery_ui_js();
 $htmlHeadXtra[] = '<script type="text/javascript"> 
 
 var counter_image = 1;

+ 1 - 5
main/social/groups.php

@@ -33,7 +33,6 @@ if (isset($_GET['anchor_topic'])) {
 	}
 	$anchor = 'topic_'.$match[1];
 }
-$htmlHeadXtra[] = api_get_jquery_ui_js();
 $htmlHeadXtra[] = '<script type="text/javascript"> 
 
 var counter_image = 1;
@@ -362,10 +361,7 @@ if ($group_id != 0 ) {
 				} else {
 					$item_2 = '<div class="box_description_group_title" ><span class="social-groups-text2"></span></div>';
 					$item_3 = '<div class="box_description_group_content" ></div>';
-				}
-				
-                /*$join_url = '<a href="groups.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'.Display::return_icon('group_join.png', get_lang('JoinGroup'), array('hspace'=>'6')).''.get_lang('JoinGroup').'</a> ';                
-				$item_4 = '<div class="box_description_group_actions" >'.$join_url. $url_open.get_lang('SeeMore').$url_close.'</div>';*/				
+				}							
 				$grid_item_2 = $item_0.$item_1.$item_2.$item_3;
 				$grid_my_groups[]= array($grid_item_2);
 			}

+ 1 - 1
main/social/home.php

@@ -83,7 +83,7 @@ $social_left_content = SocialManager::show_social_menu('home');
                   </div>
                   <div class="box_description_group_actions">
                     <a href="'.api_get_path(WEB_PATH).'main/auth/profile.php">
-                        '.Display::return_icon('profile_edit.png', get_lang('EditProfile'), array('hspace'=>'6')).get_lang('EditProfile').'
+                        '.Display::return_icon('profile_edit.png', null, array('hspace'=>'6')).get_lang('EditProfile').'
                    </a>
                   </div>';
                   

+ 1 - 1
main/social/skills_tree.php

@@ -18,7 +18,7 @@ $this_section = SECTION_MYPROFILE;
 api_block_anonymous_users();
 
 //Adds the JS needed to use the jqgrid
-$htmlHeadXtra[] = api_get_jquery_ui_js(true);
+$htmlHeadXtra[] = api_get_jqgrid_js();
 $htmlHeadXtra[] = api_get_js('jquery.jsPlumb.all.js');
 $htmlHeadXtra[] = api_get_js('skills.js');
 

+ 20 - 3
main/template/default/layout/head.tpl

@@ -59,8 +59,7 @@ var disconnect_lang = '{"ChatDisconnected"|get_lang}';
 <script type="text/javascript">
 
 $(document).scroll(function() {
-    // If has not activated (has no attribute "data-top"
-
+    // Top bar scroll effect
     if($('body').width() > 959) {
     if ($('.subnav').length) {
         if (!$('.subnav').attr('data-top')) {
@@ -79,9 +78,11 @@ $(document).scroll(function() {
     }
 });
 
-
 $(document).ready(function() {       
+    //Dropdown effect
     $('.dropdown-toggle').dropdown();   
+    
+    //Responsive effect 
     $(".collapse").collapse();
     
     $('.ajax').on('click', function() {
@@ -105,6 +106,22 @@ $(document).ready(function() {
             //prevent the browser to follow the link
             return false;
     });
+    
+    /*
+    $(".td_actions").hide();    
+    
+    $(".td_actions").parent('tr').mouseover(function() {
+       $(".td_actions").show();
+    });
+    
+    $(".td_actions").parent('tr').mouseout(function() {
+        $(".td_actions").hide();
+    });*/
+    
+    
+    
+    
+    
 });
 </script>
 {$header_extra_content}

+ 1 - 1
main/work/work.lib.php

@@ -448,7 +448,7 @@ function display_student_publications_list($id, $link_target_parameter, $dateFor
 	$table_header[] = array(get_lang('Date'), true, 'style="width:200px"');
 
 	if ($is_allowed_to_edit) {
-		$table_header[] = array(get_lang('Actions'), false, 'style="width:90px"');
+		$table_header[] = array(get_lang('Actions'), false, 'style="width:90px"', array('class'=>'td_actions'));
 		$table_has_actions_column = true;
 	}
 	// the following column name seems both undefined and unused

+ 0 - 2
user_portal.php

@@ -34,8 +34,6 @@ if (isset($_SESSION['this_section']))
 require_once './main/inc/global.inc.php';
 require_once api_get_path(LIBRARY_PATH).'userportal.lib.php';
 
-$htmlHeadXtra[] = api_get_jquery_ui_js();
-
 api_block_anonymous_users(); // Only users who are logged in can proceed.
 
 /* Constants and CONFIGURATION parameters */