From 90ebdf654b06d65b8e55e008fc25f1761d7f425e Mon Sep 17 00:00:00 2001 From: vyshane Date: Tue, 21 Nov 2006 04:19:01 +0000 Subject: [PATCH] Merged from 1.7. --- course/lib.php | 63 +++++++++++++++++++------------------ lib/ajax/ajaxcourse.js | 1 + lib/ajax/section_classes.js | 12 +++---- 3 files changed, 40 insertions(+), 36 deletions(-) diff --git a/course/lib.php b/course/lib.php index 3869afa98dd..a23096959c3 100644 --- a/course/lib.php +++ b/course/lib.php @@ -1882,16 +1882,16 @@ function make_editing_buttons($mod, $absolute=false, $moveselect=true, $indent=- static $sesskey; if (!isset($str)) { - $str->delete = get_string("delete"); - $str->move = get_string("move"); - $str->moveup = get_string("moveup"); - $str->movedown = get_string("movedown"); - $str->moveright = get_string("moveright"); - $str->moveleft = get_string("moveleft"); - $str->update = get_string("update"); - $str->duplicate = get_string("duplicate"); - $str->hide = get_string("hide"); - $str->show = get_string("show"); + $str->delete = get_string("delete"); + $str->move = get_string("move"); + $str->moveup = get_string("moveup"); + $str->movedown = get_string("movedown"); + $str->moveright = get_string("moveright"); + $str->moveleft = get_string("moveleft"); + $str->update = get_string("update"); + $str->duplicate = get_string("duplicate"); + $str->hide = get_string("hide"); + $str->show = get_string("show"); $str->clicktochange = get_string("clicktochange"); $str->forcedmode = get_string("forcedmode"); $str->groupsnone = get_string("groupsnone"); @@ -1913,32 +1913,35 @@ function make_editing_buttons($mod, $absolute=false, $moveselect=true, $indent=- } if ($mod->visible) { - $hideshow = ' '; + ' border="0" alt="'.$str->hide.'" />'."\n"; } else { - $hideshow = ' '; + ' border="0" alt="'.$str->show.'" />'."\n"; } if ($mod->groupmode !== false) { if ($mod->groupmode == SEPARATEGROUPS) { $grouptitle = $str->groupsseparate; + $groupclass = 'editing_groupseparate'; $groupimage = $CFG->pixpath.'/t/groups.gif'; $grouplink = $path.'/mod.php?id='.$mod->id.'&groupmode=0&sesskey='.$sesskey; } else if ($mod->groupmode == VISIBLEGROUPS) { $grouptitle = $str->groupsvisible; + $groupclass = 'editing_groupvisible'; $groupimage = $CFG->pixpath.'/t/groupv.gif'; $grouplink = $path.'/mod.php?id='.$mod->id.'&groupmode=1&sesskey='.$sesskey; } else { $grouptitle = $str->groupsnone; + $groupclass = 'editing_groupsnone'; $groupimage = $CFG->pixpath.'/t/groupn.gif'; $grouplink = $path.'/mod.php?id='.$mod->id.'&groupmode=2&sesskey='.$sesskey; } if ($mod->groupmodelink) { - $groupmode = ''. + $groupmode = ''. ''.$grouptitle.''; } else { @@ -1951,44 +1954,44 @@ function make_editing_buttons($mod, $absolute=false, $moveselect=true, $indent=- } if ($moveselect) { - $move = ''; + ' border="0" alt="'.$str->move.'" />'."\n"; } else { - $move = ''. - ''."\n". + ''; + ' border="0" alt="'.$str->movedown.'" />'."\n"; } $leftright = ""; if ($indent > 0) { - $leftright .= ''; + ' border="0" alt="'.$str->moveleft.'" />'."\n"; } if ($indent >= 0) { - $leftright .= ''; + ' border="0" alt="'.$str->moveright.'" />'."\n"; } - return ''.$leftright.$move. - ''."\n".$leftright.$move. + ''. - 'update.'" />'."\n". + ''.$hideshow.$groupmode.''; + ' alt="'.$str->delete.'" />'."\n".$hideshow.$groupmode."\n".''; } /** diff --git a/lib/ajax/ajaxcourse.js b/lib/ajax/ajaxcourse.js index 3346e6a5636..0ac21766728 100644 --- a/lib/ajax/ajaxcourse.js +++ b/lib/ajax/ajaxcourse.js @@ -164,6 +164,7 @@ main_class.prototype.mk_button = function(tag, imgSrc, attributes, imgAttributes image.setAttribute(imgAttributes[c][0], imgAttributes[c][1]); } } + image.setAttribute('hspace', '3'); return container; } diff --git a/lib/ajax/section_classes.js b/lib/ajax/section_classes.js index d7b60984617..e2179cb2c2d 100755 --- a/lib/ajax/section_classes.js +++ b/lib/ajax/section_classes.js @@ -561,17 +561,17 @@ resource_class.prototype.init_buttons = function() { var updateButton = null; for (var x=0; x