Skip to content

Commit

Permalink
Merge branch 'MDL-36990_master-neu' of git://github.com/grabs/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
Aparup Banerjee committed Mar 13, 2013
2 parents 2a28b5d + 205c618 commit e186442
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 30 deletions.
36 changes: 20 additions & 16 deletions mod/feedback/edit.php
Expand Up @@ -159,14 +159,16 @@
$PAGE->set_title(format_string($feedback->name));

//Adding the javascript module for the items dragdrop.
if ($do_show == 'edit' and $CFG->enableajax) {
$PAGE->requires->strings_for_js(array(
'pluginname',
'move_item',
'position',
), 'feedback');
$PAGE->requires->yui_module('moodle-mod_feedback-dragdrop', 'M.mod_feedback.init_dragdrop',
array(array('cmid' => $cm->id)));
if (count($feedbackitems) > 1) {
if ($do_show == 'edit' and $CFG->enableajax) {
$PAGE->requires->strings_for_js(array(
'pluginname',
'move_item',
'position',
), 'feedback');
$PAGE->requires->yui_module('moodle-mod_feedback-dragdrop', 'M.mod_feedback.init_dragdrop',
array(array('cmid' => $cm->id)));
}
}

echo $OUTPUT->header();
Expand Down Expand Up @@ -333,14 +335,16 @@
echo '</span>';
}
//Print the move-button
echo '<span class="feedback_item_command_move">';
$moveurl = new moodle_url($url, array('moveitem'=>$feedbackitem->id));
$buttonlink = $moveurl->out();
$strbutton = get_string('move_item', 'feedback');
echo '<a class="editing_move" title="'.$strbutton.'" href="'.$buttonlink.'">
<img alt="'.$strbutton.'" src="'.$OUTPUT->pix_url('t/move') . '" />
</a>';
echo '</span>';
if (count($feedbackitems) > 1) {
echo '<span class="feedback_item_command_move">';
$moveurl = new moodle_url($url, array('moveitem'=>$feedbackitem->id));
$buttonlink = $moveurl->out();
$strbutton = get_string('move_item', 'feedback');
echo '<a class="editing_move" title="'.$strbutton.'" href="'.$buttonlink.'">
<img alt="'.$strbutton.'" src="'.$OUTPUT->pix_url('t/move') . '" />
</a>';
echo '</span>';
}
//Print the button to edit the item
if ($feedbackitem->typ != 'pagebreak') {
echo '<span class="feedback_item_command_edit">';
Expand Down
4 changes: 4 additions & 0 deletions mod/feedback/styles.css
Expand Up @@ -96,3 +96,7 @@ ul#feedback_draglist {
padding: 0;
margin: 0;
}

div#feedback_dragarea {
width:95%;
}
14 changes: 0 additions & 14 deletions mod/feedback/yui/dragdrop/dragdrop.js
Expand Up @@ -192,20 +192,6 @@ YUI.add('moodle-mod_feedback-dragdrop', function(Y) {
}
},

/**
* Handles the drag:dropmiss event.
*
* @param e the event
* @return void
*/
drag_dropmiss_handler : function(e) {
var msg = {
name : 'dropmiss',
message : 'dropmiss'
};
return new M.core.exception(msg);
},

/**
* Save the new item order.
*
Expand Down

0 comments on commit e186442

Please sign in to comment.