/usr/share/javascript/yui3/widget-skin/widget-skin.js is in libjs-yui3-full 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 | /*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add('widget-skin', function(Y) {
/**
* Provides skin related utlility methods.
*
* @module widget
* @submodule widget-skin
*/
var BOUNDING_BOX = "boundingBox",
CONTENT_BOX = "contentBox",
SKIN = "skin",
_getClassName = Y.ClassNameManager.getClassName;
/**
* Returns the name of the skin that's currently applied to the widget.
* This is only really useful after the widget's DOM structure is in the
* document, either by render or by progressive enhancement. Searches up
* the Widget's ancestor axis for a class yui3-skin-(name), and returns the
* (name) portion. Otherwise, returns null.
*
* @method getSkinName
* @for Widget
* @return {String} the name of the skin, or null (yui3-skin-sam => sam)
*/
Y.Widget.prototype.getSkinName = function () {
var root = this.get( CONTENT_BOX ) || this.get( BOUNDING_BOX ),
search = new RegExp( '\\b' + _getClassName( SKIN ) + '-(\\S+)' ),
match;
if ( root ) {
root.ancestor( function ( node ) {
match = node.get( 'className' ).match( search );
return match;
} );
}
return ( match ) ? match[1] : null;
};
}, '3.5.1' ,{requires:['widget-base']});
|