~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-resize/event-resize-debug.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-resize', function(Y) {
8
 
 
9
 
/**
10
 
 * Adds a window resize event that has its behavior normalized to fire at the
11
 
 * end of the resize rather than constantly during the resize.
12
 
 * @module event
13
 
 * @submodule event-resize
14
 
 */
15
 
 
16
 
 
17
 
/**
18
 
 * Old firefox fires the window resize event once when the resize action
19
 
 * finishes, other browsers fire the event periodically during the
20
 
 * resize.  This code uses timeout logic to simulate the Firefox 
21
 
 * behavior in other browsers.
22
 
 * @event windowresize
23
 
 * @for YUI
24
 
 */
25
 
 
26
 
var domEventProxies = Y.Env.evt.dom_wrappers,
27
 
    win = Y.config.win,
28
 
    key = 'event:' + Y.stamp(win) + 'resizenative',
29
 
    config;
30
 
    
31
 
 
32
 
Y.Event.define('windowresize', {
33
 
 
34
 
    on: (Y.UA.gecko && Y.UA.gecko < 1.91) ?
35
 
        function (node, sub, notifier) {
36
 
            sub._handle = Y.Event._attach(['resize', function (e) {
37
 
                notifier.fire(
38
 
                    new Y.DOMEventFacade(e, win, domEventProxies[key]));
39
 
            }], { facade: false });
40
 
        } :
41
 
        function (node, sub, notifier) {
42
 
            // interval bumped from 40 to 100ms as of 3.4.1
43
 
            var delay = Y.config.windowResizeDelay || 100;
44
 
 
45
 
            sub._handle = Y.Event._attach(['resize', function (e) {
46
 
                if (sub._timer) {
47
 
                    sub._timer.cancel();
48
 
                }
49
 
 
50
 
                sub._timer = Y.later(delay, Y, function () {
51
 
                    notifier.fire(
52
 
                        new Y.DOMEventFacade(e, win, domEventProxies[key]));
53
 
                });
54
 
            }], { facade: false });
55
 
        },
56
 
 
57
 
    detach: function (node, sub) {
58
 
        if (sub._timer) {
59
 
            sub._timer.cancel();
60
 
        }
61
 
        sub._handle.detach();
62
 
    }
63
 
    // delegate methods not defined because this only works for window
64
 
    // subscriptions, so...yeah.
65
 
});
66
 
 
67
 
 
68
 
}, '3.4.1' ,{requires:['event-synthetic']});