Alien-Web-ExtJS-V3

 view release on metacpan or  search on metacpan

share/docs/source/EventManager.html  view on Meta::CPAN

        if (Ext.isWebKit) {
            cls.push('ext-webkit');
        }

        if (Ext.isSafari) {
            cls.push("ext-safari " + (Ext.isSafari2 ? 'ext-safari2' : (Ext.isSafari3 ? 'ext-safari3' : 'ext-safari4')));
        } else if(Ext.isChrome) {
            cls.push("ext-chrome");
        }

        if (Ext.isMac) {
            cls.push("ext-mac");
        }
        if (Ext.isLinux) {
            cls.push("ext-linux");
        }

        // add to the parent to allow for selectors like ".ext-strict .ext-ie"
        if (Ext.isStrict || Ext.isBorderBox) {
            var p = bd.parentNode;
            if (p) {
                if (!Ext.isStrict) {
                    Ext.fly(p, '_internal').addClass('x-quirks');
                    if (Ext.isIE9m && !Ext.isStrict) {
                        Ext.isIEQuirks = true;
                    }
                }
                Ext.fly(p, '_internal').addClass(((Ext.isStrict && Ext.isIE ) || (!Ext.enableForcedBoxModel && !Ext.isIE)) ? ' ext-strict' : ' ext-border-box');
            }
        }
        // Forced border box model class applied to all elements. Bypassing javascript based box model adjustments
        // in favor of css.  This is for non-IE browsers.
        if (Ext.enableForcedBoxModel && !Ext.isIE) {
            Ext.isForcedBorderBox = true;
            cls.push("ext-forced-border-box");
        }

        Ext.fly(bd, '_internal').addClass(cls);
        return true;
    };

    if (!initExtCss()) {
        Ext.onReady(initExtCss);
    }
})();

// Code used to detect certain browser feature/quirks/bugs at startup.
(function(){
<span id='Ext-supports'>    /**
</span>     * @class Ext.supports
     * @ignore
     */
    var supports = Ext.apply(Ext.supports, {
<span id='Ext-supports-property-correctRightMargin'>        /**
</span>         * In Webkit, there is an issue with getting the margin right property, see
         * https://bugs.webkit.org/show_bug.cgi?id=13343
         */
        correctRightMargin: true,

<span id='Ext-supports-property-correctTransparentColor'>        /**
</span>         * Webkit browsers return rgba(0, 0, 0) when a transparent color is used
         */
        correctTransparentColor: true,

<span id='Ext-supports-property-cssFloat'>        /**
</span>         * IE uses styleFloat, not cssFloat for the float property.
         */
        cssFloat: true
    });

    var supportTests = function(){
            var div = document.createElement('div'),
                doc = document,
                view,
                last;

            div.innerHTML = '&lt;div style=&quot;height:30px;width:50px;&quot;&gt;&lt;div style=&quot;height:20px;width:20px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;float:left;background-color:transparent;&quot;&gt;';
            doc.body.appendChild(div);
            last = div.lastChild;

            if((view = doc.defaultView)){
                if(view.getComputedStyle(div.firstChild.firstChild, null).marginRight != '0px'){
                    supports.correctRightMargin = false;
                }
                if(view.getComputedStyle(last, null).backgroundColor != 'transparent'){
                    supports.correctTransparentColor = false;
                }
            }
            supports.cssFloat = !!last.style.cssFloat;
            doc.body.removeChild(div);
    };

    if (Ext.isReady) {
        supportTests();
    } else {
        Ext.onReady(supportTests);
    }
})();


<span id='Ext-EventObject'>/**
</span> * @class Ext.EventObject
 * Just as {@link Ext.Element} wraps around a native DOM node, Ext.EventObject
 * wraps the browser's native event-object normalizing cross-browser differences,
 * such as which mouse button is clicked, keys pressed, mechanisms to stop
 * event-propagation along with a method to prevent default actions from taking place.
 * &lt;p&gt;For example:&lt;/p&gt;
 * &lt;pre&gt;&lt;code&gt;
function handleClick(e, t){ // e is not a standard event object, it is a Ext.EventObject
    e.preventDefault();
    var target = e.getTarget(); // same as t (the target HTMLElement)
    ...
}
var myDiv = {@link Ext#get Ext.get}(&quot;myDiv&quot;);  // get reference to an {@link Ext.Element}
myDiv.on(         // 'on' is shorthand for addListener
    &quot;click&quot;,      // perform an action on click of myDiv
    handleClick   // reference to the action handler
);
// other methods to do the same:
Ext.EventManager.on(&quot;myDiv&quot;, 'click', handleClick);
Ext.EventManager.addListener(&quot;myDiv&quot;, 'click', handleClick);
 &lt;/code&gt;&lt;/pre&gt;
 * @singleton
 */
Ext.EventObject = function(){
    var E = Ext.lib.Event,
        clickRe = /(dbl)?click/,
        // safari keypress events for special keys return bad keycodes
        safariKeys = {
            3 : 13, // enter
            63234 : 37, // left
            63235 : 39, // right
            63232 : 38, // up
            63233 : 40, // down
            63276 : 33, // page up
            63277 : 34, // page down
            63272 : 46, // delete
            63273 : 36, // home
            63275 : 35  // end
        },
        // normalize button clicks
        btnMap = Ext.isIE ? {1:0,4:1,2:2} : {0:0,1:1,2:2};

    Ext.EventObjectImpl = function(e){
        if(e){



( run in 1.224 second using v1.01-cache-2.11-cpan-119454b85a5 )