Skip to content

Commit

Permalink
MDL-36990 mod_feedback - moved drag styles into styles.css
Browse files Browse the repository at this point in the history
  • Loading branch information
grabs committed Mar 9, 2013
1 parent 3fa1aec commit e6c4d66
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
8 changes: 8 additions & 0 deletions mod/feedback/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ hr.feedback_pagebreak {
border:0px;
}

.drag_target_active {
opacity: .25;
}

.drag_item_active {
opacity: .5;
}

ul#feedback_draglist {
list-style: none;
padding: 0;
Expand Down
9 changes: 3 additions & 6 deletions mod/feedback/yui/dragdrop/dragdrop.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ YUI.add('moodle-mod_feedback-dragdrop', function(Y) {
//Get our drag object
var drag = e.target;
//Set some styles here
drag.get('node').setStyle('opacity', '.25');
drag.get('node').addClass('drag_target_active');
drag.get('dragNode').set('innerHTML', drag.get('node').get('innerHTML'));
drag.get('dragNode').addClass('drag_item_active');
drag.get('dragNode').setStyles({
opacity: '.5',
borderColor: drag.get('node').getStyle('borderColor'),
backgroundColor: drag.get('node').getStyle('backgroundColor')
});
Expand All @@ -72,10 +72,7 @@ YUI.add('moodle-mod_feedback-dragdrop', function(Y) {
Y.DD.DDM.on('drag:end', function(e) {
var drag = e.target;
//Put our styles back
drag.get('node').setStyles({
visibility: '',
opacity: '1'
});
drag.get('node').removeClass('drag_target_active');

});
//Listen for all drag:drophit events
Expand Down

0 comments on commit e6c4d66

Please sign in to comment.