MDL-40975 Course: Change the activity drag icon to prevent icon flash

This commit is contained in:
Andrew Nicols
2013-11-06 10:59:26 +08:00
parent e3d0acf6ac
commit f549dd64a4
2 changed files with 9 additions and 2 deletions
+8 -1
View File
@@ -2013,9 +2013,16 @@ function course_get_cm_edit_actions(cm_info $mod, $indent = -1, $sr = null) {
// Move.
if ($hasmanageactivities) {
$pixicon = 'i/dragdrop';
if ($mod->course == SITEID) {
// Override for course frontpage until we get drag/drop working there.
$pixicon = 't/move';
}
$actions['move'] = new action_menu_link_primary(
new moodle_url($baseurl, array('copy' => $mod->id)),
new pix_icon('t/move', $str->move, 'moodle', array('class' => 'iconsmall', 'title' => '')),
new pix_icon($pixicon, $str->move, 'moodle', array('class' => 'iconsmall', 'title' => '')),
$str->move,
array('class' => 'editing_move status', 'data-action' => 'move')
);
+1 -1
View File
@@ -277,7 +277,7 @@ YUI.add('moodle-course-dragdrop', function(Y) {
this.groups = ['resource'];
this.samenodeclass = CSS.ACTIVITY;
this.parentnodeclass = CSS.SECTION;
this.resourcedraghandle = this.get_drag_handle(M.str.moodle.move, CSS.EDITINGMOVE, CSS.ICONCLASS);
this.resourcedraghandle = this.get_drag_handle(M.str.moodle.move, CSS.EDITINGMOVE, CSS.ICONCLASS, true);
// Go through all sections
var sectionlistselector = M.course.format.get_section_selector(Y);