MDL-38016 Themes - Add a bootstrap theme to core
This theme has been contributed by: Bas Brands <[email protected]> David Scotson <[email protected]> Michael Aherne <[email protected]> Stuart Lamour <[email protected]> Thanks for your hard work.
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
YUI().use('gallery-bootstrap');
|
||||
|
||||
YUI.add('gallery-bootstrap', function(Y) {
|
||||
|
||||
var NS = Y.namespace('Bootstrap');
|
||||
|
||||
NS.initializer = function(e) {
|
||||
//console.log('initializer!');
|
||||
NS.dropdown_delegation();
|
||||
NS.expandable_delegation();
|
||||
};
|
||||
|
||||
NS.expandable_delegation = function() {
|
||||
Y.delegate('click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var target = e.currentTarget;
|
||||
if ( ! target.collapse ) {
|
||||
target.plug( Y.Bootstrap.Collapse );
|
||||
}
|
||||
target.collapse.toggle();
|
||||
}, document.body, '*[data-toggle="collapse"]' );
|
||||
};
|
||||
|
||||
Y.on('domready', NS.initializer);
|
||||
|
||||
}, '@VERSION@' ,{requires:[ 'gallery-bootstrap-dropdown', 'gallery-bootstrap-collapse', 'gallery-bootstrap-engine']});
|
||||
;
|
||||
Reference in New Issue
Block a user