Skip to content
Browse files

MDL-36990 mod_feedback - moved drag styles into styles.css

  • Loading branch information...
1 parent 3fa1aec commit e6c4d66910697c0f097a5359155f8d47fed1904e @grabs grabs committed Jan 18, 2013
Showing with 11 additions and 6 deletions.
  1. +8 −0 mod/feedback/styles.css
  2. +3 −6 mod/feedback/yui/dragdrop/dragdrop.js
View
8 mod/feedback/styles.css
@@ -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;
View
9 mod/feedback/yui/dragdrop/dragdrop.js
@@ -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')
});
@@ -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

0 comments on commit e6c4d66

Please sign in to comment.
Something went wrong with that request. Please try again.