~ubuntu-branches/ubuntu/raring/maas/raring-updates

« back to all changes in this revision

Viewing changes to src/maasserver/static/jslibs/yui/3.4.1/build/event-hover/event-hover.js

  • Committer: Package Import Robot
  • Author(s): Andres Rodriguez
  • Date: 2012-07-03 17:42:37 UTC
  • mfrom: (1.1.13)
  • Revision ID: package-import@ubuntu.com-20120703174237-p8l0keuuznfg721k
Tags: 0.1+bzr709+dfsg-0ubuntu1
* New Upstream release
* debian/control:
  - Depends on python-celery, python-tempita, libjs-yui3-{full,min},
    libjs-raphael
* debian/maas.install:
  - Install apiclient, celeryconfig.py, maas-import-pxe-files, preseeds_v2.
  - Update to install various files from chroot, rather tha manually copy
    them from the source.
* debian/maas.links: symlink celeryconfig.py
* debian/maas.maas-celery.upstart: Add job.
* debian/rules:
  - Install celery upstart job.
  - Do not install jslibs as packages are now used.
  - Drop copying of maas_local_settings_sample.py as source now ships
    a maas_local_settings.py
* debian/patches:
  - 04-maas-http-fix.patch: Drop. Merged upstream.
  - 01-fix-database-settings.patch: Refreshed.
  - 99_enums_js.patch: Added until creation of enum.js / build process
    is fixed.
* debian/maas.postinst: Update bzr version to correctly handle upgrades.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
YUI 3.4.1 (build 4118)
3
 
Copyright 2011 Yahoo! Inc. All rights reserved.
4
 
Licensed under the BSD License.
5
 
http://yuilibrary.com/license/
6
 
*/
7
 
YUI.add('event-hover', function(Y) {
8
 
 
9
 
/**
10
 
 * Adds support for a "hover" event.  The event provides a convenience wrapper
11
 
 * for subscribing separately to mouseenter and mouseleave.  The signature for
12
 
 * subscribing to the event is</p>
13
 
 *
14
 
 * <pre><code>node.on("hover", overFn, outFn);
15
 
 * node.delegate("hover", overFn, outFn, ".filterSelector");
16
 
 * Y.on("hover", overFn, outFn, ".targetSelector");
17
 
 * Y.delegate("hover", overFn, outFn, "#container", ".filterSelector");
18
 
 * </code></pre>
19
 
 *
20
 
 * <p>Additionally, for compatibility with a more typical subscription
21
 
 * signature, the following are also supported:</p>
22
 
 *
23
 
 * <pre><code>Y.on("hover", overFn, ".targetSelector", outFn);
24
 
 * Y.delegate("hover", overFn, "#container", outFn, ".filterSelector");
25
 
 * </code></pre>
26
 
 *
27
 
 * @module event
28
 
 * @submodule event-hover
29
 
 */
30
 
var isFunction = Y.Lang.isFunction,
31
 
    noop = function () {},
32
 
    conf = {
33
 
        processArgs: function (args) {
34
 
            // Y.delegate('hover', over, out, '#container', '.filter')
35
 
            // comes in as ['hover', over, out, '#container', '.filter'], but
36
 
            // node.delegate('hover', over, out, '.filter')
37
 
            // comes in as ['hover', over, containerEl, out, '.filter']
38
 
            var i = isFunction(args[2]) ? 2 : 3;
39
 
 
40
 
            return (isFunction(args[i])) ? args.splice(i,1)[0] : noop;
41
 
        },
42
 
 
43
 
        on: function (node, sub, notifier, filter) {
44
 
            var args = (sub.args) ? sub.args.slice() : [];
45
 
 
46
 
            args.unshift(null);
47
 
 
48
 
            sub._detach = node[(filter) ? "delegate" : "on"]({
49
 
                mouseenter: function (e) {
50
 
                    e.phase = 'over';
51
 
                    notifier.fire(e);
52
 
                },
53
 
                mouseleave: function (e) {
54
 
                    var thisObj = sub.context || this;
55
 
 
56
 
                    args[0] = e;
57
 
 
58
 
                    e.type = 'hover';
59
 
                    e.phase = 'out';
60
 
                    sub._extra.apply(thisObj, args);
61
 
                }
62
 
            }, filter);
63
 
        },
64
 
 
65
 
        detach: function (node, sub, notifier) {
66
 
            sub._detach.detach();
67
 
        }
68
 
    };
69
 
 
70
 
conf.delegate = conf.on;
71
 
conf.detachDelegate = conf.detach;
72
 
 
73
 
Y.Event.define("hover", conf);
74
 
 
75
 
 
76
 
}, '3.4.1' ,{requires:['event-mouseenter']});