Permalink
Browse files

MDL-36990 - item-position text change on dragdrop

  • Loading branch information...
1 parent 590378b commit f94e501b2311da5662969645a6c3e73ed441dc44 @grabs grabs committed Dec 3, 2012
Showing with 10 additions and 3 deletions.
  1. +3 −2 mod/feedback/edit.php
  2. +7 −1 mod/feedback/module.js
@@ -165,7 +165,8 @@
'fullpath' => '/mod/feedback/module.js',
'requires' => array('io', 'json-parse', 'dd-constrain', 'dd-proxy', 'dd-drop'),
'strings' => array(array('pluginname', 'feedback'),
- array('move_item', 'feedback'))
+ array('move_item', 'feedback'),
+ array('position', 'feedback'))
);
$yuibase = $CFG->httpswwwroot.'/lib/yuilib/'.$CFG->yui3version . '/build/';
@@ -316,7 +317,7 @@
}
echo $OUTPUT->box_start('box boxalign_'.$align);
echo $OUTPUT->box_start('feedback_item_commands_'.$align);
- echo '<span class="feedback_item_commands">';
+ echo '<span class="feedback_item_commands position">';
echo '('.get_string('position', 'feedback').':'.$itempos .')';
echo '</span>';
//print the moveup-button
@@ -67,8 +67,13 @@ M.mod_feedback.init = function(Y, id, sesskey, yuibase, ajaxscript, moodlebase)
drop.appendChild(drag);
}
myElements = '';
+ counter = 1;
drop.get('children').each(function(v, k) {
+ poslabeltext = '(' + M.util.get_string('position', 'feedback') + ':' + counter + ')';
+ poslabel = v.one('.feedback_item_commands.position');
+ poslabel.setHTML(poslabeltext);
myElements = myElements + ',' + get_node_id(v.get('id'));
+ counter++;
});
var spinner = M.util.add_spinner(Y, dragnode);
saveposition(Y, this, id, myElements, sesskey, spinner);
@@ -164,7 +169,8 @@ M.mod_feedback.init = function(Y, id, sesskey, yuibase, ajaxscript, moodlebase)
};
- var iconname = MOVEICON.pix;
+ //~ var iconname = MOVEICON.pix;
+ var iconname = MOVEICON.largepix;
var dragicon = Y.Node.create('<img />')
.setStyle('cursor', 'move')
.setAttrs({

0 comments on commit f94e501

Please sign in to comment.