Browse Source

[svn r10347] upload_ppt.php : align="left" for normal and error messages
lp_list.php : new visible/invisible icons
learnpath.class.php : basic view (delete the description column)

Eric Marguin 18 years ago
parent
commit
25bc91510e

BIN
main/img/invisible_LP_list.gif


BIN
main/img/message_error.gif


BIN
main/img/visible_LP_list.gif


+ 10 - 8
main/newscorm/learnpath.class.php

@@ -4237,8 +4237,8 @@ class learnpath {
 		
 			$return .= "\t" . '<tr class="header">' . "\n";
 			
-				$return .= "\t" . '<th>'.get_lang("Title").'</th>' . "\n";
-				$return .= "\t" . '<th>'.get_lang("Description").'</th>' . "\n";
+				$return .= "\t" . '<th width="75%">'.get_lang("Title").'</th>' . "\n";
+				//$return .= "\t" . '<th>'.get_lang("Description").'</th>' . "\n";
 				$return .= "\t" . '<th>'.get_lang("Move").'</th>' . "\n";
 				$return .= "\t" . '<th>'.get_lang("Actions").'</th>' . "\n";
 			
@@ -4252,7 +4252,7 @@ class learnpath {
 				$return .= "\t" . '<tr>' . "\n";
 					
 					$return .= "\t\t" . '<td class="title" style="padding-left:' . $arrLP[$i]['depth'] * 10 . 'px;"><img align="left" src="img/lp_' . $arrLP[$i]['item_type'] . '.png" style="margin-right:3px;" />' . stripslashes($arrLP[$i]['title']) . '</td>' . "\n";
-					$return .= "\t\t" . '<td>' . stripslashes($arrLP[$i]['description']) . '</td>' . "\n";
+					//$return .= "\t\t" . '<td>' . stripslashes($arrLP[$i]['description']) . '</td>' . "\n";
 					
 					if(api_is_allowed_to_edit())
 					{
@@ -4759,7 +4759,7 @@ class learnpath {
 		
 		//TODO: add a path filter
 		if($iframe)
-			$return .= '<iframe frameborder="0" src="' . api_get_path(WEB_COURSE_PATH) . $_course['path'] . '/document' . $row_doc['path'] . '" style="background:#FFFFFF; border:1px solid #CCCCCC; height:475px; width:100%;"></iframe>';
+			$return .= '<iframe frameborder="0" src="' . api_get_path(WEB_COURSE_PATH) . $_course['path'] . '/document' . $row_doc['path'] . '" style="background:#FFFFFF; border:1px solid #CCCCCC; height:490px; width:100%;"></iframe>';
 		else
 			$return .= file_get_contents(api_get_path(SYS_COURSE_PATH) . $_course['path'] . '/document' . $row_doc['path']);
 			
@@ -5189,17 +5189,19 @@ class learnpath {
 		
 		$path_parts = pathinfo($extra_info[16]);
 		
+		$no_display_edit_textarea=false;
+		
 		//If action==edit document
 		//We don't display the document form if it's not an editable document (html or txt file)
 		if($action=="edit"){
 			if(is_array($extra_info)){
 				if($path_parts['extension']!="txt" && $path_parts['extension']!="html"){
-					return "&nbsp;";
+					$no_display_edit_textarea=true;
 				}
 			}
 		}
 		
-		$no_display=false;
+		$no_display_add=false;
 		
 		//If action==add an existing document
 		//We don't display the document form if it's not an editable document (html or txt file)
@@ -5213,7 +5215,7 @@ class learnpath {
 				$path_parts = pathinfo($path_file);
 				
 				if($path_parts['extension']!="txt" && $path_parts['extension']!="html"){
-					$no_display=true;
+					$no_display_add=true;
 				}
 			}
 		}
@@ -5300,7 +5302,7 @@ class learnpath {
 				$return .= '</div>';
 			}
 			
-			if($no_display==true){
+			if($no_display_add==true){
 				$return .= '<div class="lp_message" style="margin-bottom:15px;">';
 				$return .= get_lang("CantEditDocument");
 				$return .= '</div>';

+ 2 - 2
main/newscorm/learnpath.css

@@ -71,10 +71,10 @@ table.lp_overview{font-size:12px; width:100%;}
 
 table.lp_overview td{border-bottom:1px solid #999999; border-top:1px solid #999999; height:20px; padding:3px; vertical-align:middle; width:auto;}
 table.lp_overview td.title{width:200px;}
-table.lp_overview td.actions{text-align:right; width:100px;}
+table.lp_overview td.actions{text-align:center; width:100px;}
 table.lp_overview td.move{text-align:center; width:50px;}
 
-table.lp_overview th{background:#FFFFFF; padding-left:3px; text-align:left;}
+table.lp_overview th{background:#FFFFFF; padding-left:3px; text-align:center;}
 
 table.lp_overview tr{background:#F8F8F8;}
 table.lp_overview tr:hover{background:#E5EDF9;}

+ 4 - 3
main/newscorm/lp_list.php

@@ -249,14 +249,14 @@ if (is_array($flat_list))
 			if ($details['lp_visibility'] == "i")
 			{
 		        $dsp_visible =	"<a href=\"".$_SERVER['PHP_SELF']."?".api_get_cidreq()."&lp_id=$id&action=toggle_visible&new_status=v\">" .
-				"<img src=\"../img/invisible.gif\" border=\"0\" title=\"".get_lang('_publish')."\" />" .
+				"<img src=\"../img/invisible_LP_list.gif\" border=\"0\" title=\"".get_lang('_publish')."\" />" .
 				"</a>" .
 				"";
 			}
 			else
 			{
 				$dsp_visible =	"<a href='".$_SERVER['PHP_SELF']."?".api_get_cidreq()."&lp_id=$id&action=toggle_visible&new_status=i'>" .
-				"<img src=\"../img/visible.gif\" border=\"0\" title=\"".get_lang('_no_publish')."\" />" .
+				"<img src=\"../img/visible_LP_list.gif\" border=\"0\" title=\"".get_lang('_no_publish')."\" />" .
 				"</a>".
 				"";
 			}
@@ -306,7 +306,8 @@ if (is_array($flat_list))
 		
 	    }	// end if($is_allowedToEdit)
 	    //echo $dsp_line.$dsp_desc.$dsp_export.$dsp_edit.$dsp_delete.$dsp_visible;
-	    echo $dsp_line.$dsp_progress.$dsp_desc.$dsp_export.$dsp_edit.$dsp_build.$dsp_visible.$dsp_reinit.$dsp_default_view.$dsp_force_commit.$dsp_debug.$dsp_delete;
+	    //echo $dsp_line.$dsp_progress.$dsp_desc.$dsp_export.$dsp_edit.$dsp_build.$dsp_visible.$dsp_reinit.$dsp_default_view.$dsp_force_commit.$dsp_debug.$dsp_delete;
+	    echo $dsp_line.$dsp_progress.$dsp_desc.$dsp_export.$dsp_edit.$dsp_build.$dsp_visible.$dsp_reinit.$dsp_default_view.$dsp_force_commit.$dsp_delete;
 	    echo	"</tr>\n";
       
 	}	// end foreach ($flat_list)

+ 31 - 2
main/upload/upload_ppt.php

@@ -62,10 +62,39 @@ $message=get_lang("WelcomeOogieConverter");
 
 echo '<br>';
 
-Display::display_normal_message($message);
+$s_style="border-width: 1px;
+		 border-style: solid;
+		 margin-left: 0;
+		 margin-top: 10px;
+		 margin-bottom: 10px;
+		 min-height: 30px;
+		 padding: 5px;
+		 position: relative;
+		 width: 500px;
+		 background-color: #E5EDF9;
+		 border-color: #4171B5;
+		 color: #000;";
+
+$s_style_error="border-width: 1px;
+		 border-style: solid;
+		 margin-left: 0;
+		 margin-top: 10px;
+		 margin-bottom: 10px;
+		 min-height: 30px;
+		 padding: 5px;
+		 position: relative;
+		 width: 500px;
+		 background-color: #FFD1D1;
+		 border-color: #FF0000;
+		 color: #000;";
+
+//Display::display_normal_message($message);
+
+echo '<div style="'.$s_style.'"><div style="float:left; margin-right:10px;"><img src="'.api_get_path(WEB_IMG_PATH)."message_normal.gif".'" alt="'.$alt_text.'" '.$attribute_list.'  /></div><div style="margin-left: 43px">'.$message.'</div></div>';
 
 if(!empty($errorMessage)){
-	Display::display_error_message($errorMessage);
+	//Display::display_error_message($errorMessage);
+	echo '<div style="'.$s_style_error.'"><div style="float:left; margin-right:10px;"><img src="'.api_get_path(WEB_IMG_PATH)."message_error.gif".'" alt="'.$alt_text.'" '.$attribute_list.'  /></div><div style="margin-left: 43px">'.$errorMessage.'</div></div>';
 }
 
 echo '<div id="dynamic_div" style="display:block;margin-left:40%;margin-top:10px;height:50px;"></div>';