[svn r19607] Logic changes - Fixed height of items list when you add or edit a html document its content templates looks very low - partial FS#3909

skala
Cristian Fasanando 16 years ago
parent 7adee5a786
commit 8846dfcc54
  1. 14
      main/newscorm/learnpath.class.php
  2. 23
      main/newscorm/lp_add_item.php
  3. 31
      main/newscorm/lp_edit_item.php

@ -4348,6 +4348,7 @@ class learnpath {
'id' => $row['id'],
'item_type' => $row['item_type'],
'title' => $row['title'],
'path' => $row['path'],
'description' => $row['description'],
'parent_item_id' => $row['parent_item_id'],
'previous_item_id' => $row['previous_item_id'],
@ -4469,15 +4470,15 @@ class learnpath {
$return .= "\t\t" . '<td>' . "\n";
if($arrLP[$i]['item_type'] != 'dokeos_chapter' && $arrLP[$i]['item_type'] != 'dokeos_module')
{
$return .= "\t\t\t" . '<a href="' .api_get_self(). '?cidReq=' . $_GET['cidReq'] . '&amp;action=edit_item&amp;view=build&amp;id=' . $arrLP[$i]['id'] . '&amp;lp_id=' . $this->lp_id . '">';
{
$return .= "\t\t\t" . '<a href="' .api_get_self(). '?cidReq=' . $_GET['cidReq'] . '&amp;action=edit_item&amp;view=build&amp;id=' . $arrLP[$i]['id'] . '&amp;lp_id=' . $this->lp_id . '&amp;path_item='.$arrLP[$i]['path'].'">';
$return .= '<img alt="" src="../img/edit.gif" title="' . get_lang('_edit_learnpath_module') . '" />';
$return .= '</a>' . "\n";
}
else
{
$return .= "\t\t\t" . '<a href="' .api_get_self(). '?cidReq=' . $_GET['cidReq'] . '&amp;action=edit_item&amp;id=' . $arrLP[$i]['id'] . '&amp;lp_id=' . $this->lp_id . '">';
$return .= '<img alt="" src="../img/edit.gif" title="' . get_lang('_edit_learnpath_module') . '" />';
{
$return .= "\t\t\t" . '<a href="' .api_get_self(). '?cidReq=' . $_GET['cidReq'] . '&amp;action=edit_item&amp;id=' . $arrLP[$i]['id'] . '&amp;lp_id=' . $this->lp_id . '&amp;path_item='.$arrLP[$i]['path'].'">';
$return .= '<img alt="" src="../img/edit.gif" title="' . get_lang('_edit_learnpath_module') . '" />';
$return .= '</a>' . "\n";
}
@ -7265,7 +7266,8 @@ class learnpath {
}
//commented ":" for message in step
//$return .= $lang.': ';
$return .= '<a href="' .api_get_self(). '?cidReq=' . $_GET['cidReq'] . '&amp;action=edit_item&amp;view=build&amp;id=' . $item_id . '&amp;lp_id=' . $this->lp_id . '" title="'.get_lang('Edit').'"><img align="absbottom" alt="Edit the current item" src="../img/edit.gif" title="'.get_lang("Edit").'" /> '.get_lang("Edit").'</a>';
$return .= '<a href="' .api_get_self(). '?cidReq=' . $_GET['cidReq'] . '&amp;action=edit_item&amp;view=build&amp;id=' . $item_id . '&amp;lp_id=' . $this->lp_id . '&path_item='.$row['path'].'" title="'.get_lang('Edit').'"><img align="absbottom" alt="Edit the current item" src="../img/edit.gif" title="'.get_lang("Edit").'" /> '.get_lang("Edit").'</a>';
$return .= '<a href="' .api_get_self(). '?cidReq=' . $_GET['cidReq'] . '&amp;action=move_item&amp;view=build&amp;id=' . $item_id . '&amp;lp_id=' . $this->lp_id . '" title="Move the current item"><img align="absbottom" alt="Move the current item" src="../img/deplacer_fichier.gif" title="'.get_lang("Move").'" /> '.get_lang("Move").'</a>';
// commented for now as prerequisites cannot be added to chapters
if($item_type != 'dokeos_chapter' && $item_type != 'chapter')

@ -208,18 +208,25 @@ echo '<table cellpadding="0" cellspacing="0" class="lp_build">';
echo '<tr>';
echo '<td class="tree">';
echo '<div class="lp_tree">';
//build the tree with the menu items in it
echo $_SESSION['oLP']->build_tree();
echo '</div>';
// show the template list
echo '<td class="tree">';
// show the template list
if ($_GET['type']=='document')
{
$count_items = count($_SESSION['oLP']->ordered_items);
$style = ($count_items > 12)?' style="height:250px;width:230px;overflow-x : auto; overflow-y : scroll;" ':' class="lp_tree" ';
echo '<div '.$style.'>';
//build the tree with the menu items in it
echo $_SESSION['oLP']->build_tree();
echo '</div>';
// show the template list
echo '<p style="border-bottom:1px solid #999999; margin:0; padding:2px;"></p>'; //line
echo '<br />';
echo '<div id="frmModel" style="display:block; height:890px;width:100px; position:relative;"></div>';
} else {
echo '<div class="lp_tree">';
//build the tree with the menu items in it
echo $_SESSION['oLP']->build_tree();
echo '</div>';
}

@ -203,16 +203,33 @@ echo $_SESSION['oLP']->build_action_menu();
echo '<table cellpadding="0" cellspacing="0" class="lp_build">';
echo '<tr>';
echo '<td class="tree">';
echo '<div class="lp_tree" style="height:90%" >';
//build the tree with the menu items in it
echo $_SESSION['oLP']->build_tree();
$path_item = isset($_GET['path_item'])?$_GET['path_item']:0;
$path_item = Database::escape_string($path_item);
$tbl_doc = Database :: get_course_table(TABLE_DOCUMENT);
$sql_doc = "SELECT path FROM " . $tbl_doc . " WHERE id = " . $path_item;
$res_doc=api_sql_query($sql_doc, __FILE__, __LINE__);
$path_file=Database::result($res_doc,0,0);
$path_parts = pathinfo($path_file);
if (Database::num_rows($res_doc) > 0 && $path_parts['extension']=='html'){
$count_items = count($_SESSION['oLP']->ordered_items);
$style = ($count_items > 12)?' style="height:250px;width:230px;overflow-x : auto; overflow : scroll;" ':' class="lp_tree" ';
echo '<div '.$style.'>';
//build the tree with the menu items in it
echo $_SESSION['oLP']->build_tree();
echo '</div>';
// show the template list
echo '<p style="border-bottom:1px solid #999999; margin:0; padding:2px;"></p>'; //line
echo '<br>';
echo '<div id="frmModel" style="display:block; height:890px;width:100px; position:relative;"></div>';
echo '<br>';
echo '<div id="frmModel" style="display:block; height:890px;width:100px; position:relative;"></div>';
} else {
echo '<div class="lp_tree" style="height:90%" >';
//build the tree with the menu items in it
echo $_SESSION['oLP']->build_tree();
echo '</div>';
}
echo '</td>';
echo '<td class="workspace">';

Loading…
Cancel
Save