~ubuntu-branches/ubuntu/utopic/moodle/utopic

« back to all changes in this revision

Viewing changes to lib/yui/src/blocks/js/blockregion.js

  • Committer: Package Import Robot
  • Author(s): Thijs Kinkhorst
  • Date: 2014-05-12 16:10:38 UTC
  • mfrom: (36.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20140512161038-puyqf65k4e0s8ytz
Tags: 2.6.3-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
    },
92
92
 
93
93
    /**
94
 
     * Removes the move icons and changes the cursor to a move icon when over the header.
95
 
     * @method remove_block_move_icons
 
94
     * Change the move icons to enhanced drag handles and changes the cursor to a move icon when over the header.
 
95
     * @param M.core.dragdrop the block manager
 
96
     * @method change_block_move_icons
96
97
     */
97
 
    remove_block_move_icons : function() {
 
98
    change_block_move_icons : function(manager) {
 
99
        var handle, icon;
98
100
        this.get('node').all('.'+CSS.BLOCK+' a.'+CSS.EDITINGMOVE).each(function(moveicon){
99
 
            moveicon.ancestor('.'+CSS.BLOCK).one('.'+CSS.HEADER).setStyle('cursor', 'move');
100
 
            moveicon.remove();
 
101
            moveicon.setStyle('cursor', 'move');
 
102
            handle = manager.get_drag_handle(moveicon.getAttribute('title'), '', 'icon', true);
 
103
            icon = handle.one('img');
 
104
            icon.addClass('iconsmall');
 
105
            icon.removeClass('icon');
 
106
            moveicon.replace(handle);
101
107
        });
102
108
    },
103
109