Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
YUI.add('sortable-scroll', function (Y, NAME) {
2
 
3
 
4
    /**
5
     * Plugin for sortable to handle scrolling lists.
6
     * @module sortable
7
     * @submodule sortable-scroll
8
     */
9
    /**
10
     * Plugin for sortable to handle scrolling lists.
11
     * @class SortScroll
12
     * @extends Base
13
     * @constructor
14
     * @namespace Plugin
15
     */
16
 
17
    var SortScroll = function() {
18
        SortScroll.superclass.constructor.apply(this, arguments);
19
    };
20
 
21
    Y.extend(SortScroll, Y.Base, {
22
        initializer: function() {
23
            var host = this.get('host');
24
            host.plug(Y.Plugin.DDNodeScroll, {
25
                node: host.get('container')
26
            });
27
            host.delegate.on('drop:over', function(e) {
28
                if (this.dd.nodescroll && e.drag.nodescroll) {
29
                    e.drag.nodescroll.set('parentScroll', Y.one(this.get('container')));
30
                }
31
            });
32
        }
33
    }, {
34
        ATTRS: {
35
            host: {
36
                value: ''
37
            }
38
        },
39
        /**
40
        * @property NAME
41
        * @default SortScroll
42
        * @readonly
43
        * @protected
44
        * @static
45
        * @description The name of the class.
46
        * @type {String}
47
        */
48
        NAME: 'SortScroll',
49
        /**
50
        * @property NS
51
        * @default scroll
52
        * @readonly
53
        * @protected
54
        * @static
55
        * @description The scroll instance.
56
        * @type {String}
57
        */
58
        NS: 'scroll'
59
    });
60
 
61
 
62
    Y.namespace('Y.Plugin');
63
    Y.Plugin.SortableScroll = SortScroll;
64
 
65
 
66
 
67
}, '3.18.1', {"requires": ["dd-scroll", "sortable"]});