/usr/share/javascript/yui3/shim-plugin/shim-plugin-debug.js is in libjs-yui3-debug 3.5.1-1ubuntu3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | /*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add('shim-plugin', function(Y) {
/**
* Provides shimming support for Node via a Plugin.
* This fixes SELECT bleedthrough for IE6 & Mac scrollbars
* @module shim-plugin
*/
/**
* Node plugin which can be used to add shim support.
*
* @class Plugin.Shim
* @param {Object} User configuration object
*/
function Shim(config) {
this.init(config);
}
/**
* Default class used to mark the shim element
*
* @property CLASS_NAME
* @type String
* @static
* @default "yui-node-shim"
*/
// TODO: use ClassNameManager
Shim.CLASS_NAME = 'yui-node-shim';
/**
* Default markup template used to generate the shim element.
*
* @property TEMPLATE
* @type String
* @static
*/
Shim.TEMPLATE = '<iframe class="' + Shim.CLASS_NAME +
'" frameborder="0" title="Node Stacking Shim"' +
'src="javascript:false" tabindex="-1" role="presentation"' +
'style="position:absolute; z-index:-1;"></iframe>';
Shim.prototype = {
init: function(config) {
this._host = config.host;
this.initEvents();
this.insert();
this.sync();
},
initEvents: function() {
this._resizeHandle = this._host.on('resize', this.sync, this);
},
getShim: function() {
return this._shim || (
this._shim = Y.Node.create(
Shim.TEMPLATE,
this._host.get('ownerDocument')
)
);
},
insert: function() {
var node = this._host;
this._shim = node.insertBefore( this.getShim(),
node.get('firstChild'));
},
/**
* Updates the size of the shim to fill its container
* @method sync
*/
sync: function() {
var shim = this._shim,
node = this._host;
if (shim) {
shim.setAttrs({
width: node.getStyle('width'),
height: node.getStyle('height')
});
}
},
/**
* Removes the shim and destroys the plugin
* @method destroy
*/
destroy: function() {
var shim = this._shim;
if (shim) {
shim.remove(true);
}
this._resizeHandle.detach();
}
};
Shim.NAME = 'Shim';
Shim.NS = 'shim';
Y.namespace('Plugin');
Y.Plugin.Shim = Shim;
}, '3.5.1' ,{requires:['node-style', 'node-pluginhost']});
|