diff --git a/theme/bootstrapbase/amd/build/bootstrap.min.js b/theme/bootstrapbase/amd/build/bootstrap.min.js new file mode 100644 index 00000000000..f1febc252ea --- /dev/null +++ b/theme/bootstrapbase/amd/build/bootstrap.min.js @@ -0,0 +1 @@ +define(["jquery"],function(a){function b(){a(".dropdown-backdrop").remove(),a(k).each(function(){c(a(this)).removeClass("open")})}function c(b){var c,d=b.attr("data-target");return d||(d=b.attr("href"),d=d&&/#/.test(d)&&d.replace(/.*(?=#[^\s]*$)/,"")),c=d&&a(d),c&&c.length||(c=b.parent()),c}function d(b,c){var d,e=a.proxy(this.process,this),f=a(a(b).is("body")?window:b);this.options=a.extend({},a.fn.scrollspy.defaults,c),this.$scrollElement=f.on("scroll.scroll-spy.data-api",e),this.selector=(this.options.target||(d=a(b).attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=a("body"),this.refresh(),this.process()}a(".h1").hide(),a(function(){a.support.transition=function(){var a=function(){var a,b=document.createElement("bootstrap"),c={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(a in c)if(void 0!==b.style[a])return c[a]}();return a&&{end:a}}()});var e='[data-dismiss="alert"]',f=function(b){a(b).on("click",e,this.close)};f.prototype.close=function(b){function c(){d.trigger("closed").remove()}var d,e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,"")),d=a(f),b&&b.preventDefault(),d.length||(d=e.hasClass("alert")?e:e.parent()),d.trigger(b=a.Event("close")),b.isDefaultPrevented()||(d.removeClass("in"),a.support.transition&&d.hasClass("fade")?d.on(a.support.transition.end,c):c())};var g=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var c=a(this),d=c.data("alert");d||c.data("alert",d=new f(this)),"string"==typeof b&&d[b].call(c)})},a.fn.alert.Constructor=f,a.fn.alert.noConflict=function(){return a.fn.alert=g,this},a(document).on("click.alert.data-api",e,f.prototype.close);var h=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.button.defaults,c)};h.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.data(),e=c.is("input")?"val":"html";a+="Text",d.resetText||c.data("resetText",c[e]()),c[e](d[a]||this.options[a]),setTimeout(function(){"loadingText"==a?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},h.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons-radio"]');a&&a.find(".active").removeClass("active"),this.$element.toggleClass("active")};var g=a.fn.button;a.fn.button=function(b){return this.each(function(){var c=a(this),d=c.data("button"),e="object"==typeof b&&b;d||c.data("button",d=new h(this,e)),"toggle"==b?d.toggle():b&&d.setState(b)})},a.fn.button.defaults={loadingText:"loading..."},a.fn.button.Constructor=h,a.fn.button.noConflict=function(){return a.fn.button=g,this},a(document).on("click.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle")});var i=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};i.prototype={cycle:function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(b){var c=this.getActiveIndex(),d=this;if(!(b>this.$items.length-1||0>b))return this.sliding?this.$element.one("slid",function(){d.to(b)}):c==b?this.pause().cycle():this.slide(b>c?"next":"prev",a(this.$items[b]))},pause:function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this},next:function(){return this.sliding?void 0:this.slide("next")},prev:function(){return this.sliding?void 0:this.slide("prev")},slide:function(b,c){var d,e=this.$element.find(".item.active"),f=c||e[b](),g=this.interval,h="next"==b?"left":"right",i="next"==b?"first":"last",j=this;if(this.sliding=!0,g&&this.pause(),f=f.length?f:this.$element.find(".item")[i](),d=a.Event("slide",{relatedTarget:f[0],direction:h}),!f.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var b=a(j.$indicators.children()[j.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(d),d.isDefaultPrevented())return;f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),this.$element.one(a.support.transition.end,function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),j.sliding=!1,setTimeout(function(){j.$element.trigger("slid")},0)})}else{if(this.$element.trigger(d),d.isDefaultPrevented())return;e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return g&&this.cycle(),this}}};var g=a.fn.carousel;a.fn.carousel=function(b){return this.each(function(){var c=a(this),d=c.data("carousel"),e=a.extend({},a.fn.carousel.defaults,"object"==typeof b&&b),f="string"==typeof b?b:e.slide;d||c.data("carousel",d=new i(this,e)),"number"==typeof b?d.to(b):f?d[f]():e.interval&&d.pause().cycle()})},a.fn.carousel.defaults={interval:5e3,pause:"hover"},a.fn.carousel.Constructor=i,a.fn.carousel.noConflict=function(){return a.fn.carousel=g,this},a(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d,e=a(this),f=a(e.attr("data-target")||(c=e.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),g=a.extend({},f.data(),e.data());f.carousel(g),(d=e.attr("data-slide-to"))&&f.data("carousel").pause().to(d).cycle(),b.preventDefault()});var j=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.collapse.defaults,c),this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};j.prototype={constructor:j,dimension:function(){var a=this.$element.hasClass("width");return a?"width":"height"},show:function(){var b,c,d,e;if(!this.transitioning&&!this.$element.hasClass("in")){if(b=this.dimension(),c=a.camelCase(["scroll",b].join("-")),d=this.$parent&&this.$parent.find("> .accordion-group > .in"),d&&d.length){if(e=d.data("collapse"),e&&e.transitioning)return;d.collapse("hide"),e||d.data("collapse",null)}this.$element[b](0),this.transition("addClass",a.Event("show"),"shown"),a.support.transition&&this.$element[b](this.$element[0][c])}},hide:function(){var b;!this.transitioning&&this.$element.hasClass("in")&&(b=this.dimension(),this.reset(this.$element[b]()),this.transition("removeClass",a.Event("hide"),"hidden"),this.$element[b](0))},reset:function(a){var b=this.dimension();return this.$element.removeClass("collapse")[b](a||"auto")[0].offsetWidth,this.$element[null!==a?"addClass":"removeClass"]("collapse"),this},transition:function(b,c,d){var e=this,f=function(){"show"==c.type&&e.reset(),e.transitioning=0,e.$element.trigger(d)};this.$element.trigger(c),c.isDefaultPrevented()||(this.transitioning=1,this.$element[b]("in"),a.support.transition&&this.$element.hasClass("collapse")?this.$element.one(a.support.transition.end,f):f())},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var g=a.fn.collapse;a.fn.collapse=function(b){return this.each(function(){var c=a(this),d=c.data("collapse"),e=a.extend({},a.fn.collapse.defaults,c.data(),"object"==typeof b&&b);d||c.data("collapse",d=new j(this,e)),"string"==typeof b&&d[b]()})},a.fn.collapse.defaults={toggle:!0},a.fn.collapse.Constructor=j,a.fn.collapse.noConflict=function(){return a.fn.collapse=g,this},a(document).on("click.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e).data("collapse")?"toggle":d.data();d[a(e).hasClass("in")?"addClass":"removeClass"]("collapsed"),a(e).collapse(f)});var k="[data-toggle=dropdown]",l=function(b){var c=a(b).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){c.parent().removeClass("open")})};l.prototype={constructor:l,toggle:function(){var d,e,f=a(this);if(!f.is(".disabled, :disabled"))return d=c(f),e=d.hasClass("open"),b(),e||("ontouchstart"in document.documentElement&&a('
').insertBefore(a(this)).on("click",b),d.toggleClass("open")),f.focus(),!1},keydown:function(b){var d,e,f,g,h;if(/(38|40|27)/.test(b.keyCode)&&(d=a(this),b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled"))){if(f=c(d),g=f.hasClass("open"),!g||g&&27==b.keyCode)return 27==b.which&&f.find(k).focus(),d.click();e=a("[role=menu] li:not(.divider):visible a",f),e.length&&(h=e.index(e.filter(":focus")),38==b.keyCode&&h>0&&h--,40==b.keyCode&&hdata-toggle=collapse on any element.
-
-However, it can be manually plugged into any node or node list.
-
-@example
-
- var node = Y.one('.someNode');
- node.plug( Y.Bootstrap.Collapse, config );
-
- node.collapse.show();
-
-@class Bootstrap.Collapse
-**/
-
-function CollapsePlugin() {
- CollapsePlugin.superclass.constructor.apply(this, arguments);
-}
-
-CollapsePlugin.NAME = 'Bootstrap.Collapse';
-CollapsePlugin.NS = 'collapse';
-
-Y.extend(CollapsePlugin, Y.Plugin.Base, {
- defaults : {
- duration : 0.25,
- easing : 'ease-in',
- showClass : 'in',
- hideClass : 'out',
-
- groupSelector : '> .accordion-group > .in'
- },
-
- transitioning: false,
-
- initializer : function(config) {
- this._node = config.host;
-
- this.config = Y.mix( config, this.defaults );
-
- this.publish('show', { preventable : true, defaultFn : this.show });
- this.publish('hide', { preventable : true, defaultFn : this.hide });
-
- this._node.on('click', this.toggle, this);
- },
-
- _getTarget: function() {
- var node = this._node,
- container;
-
- if ( node.getData('target') ) {
- container = Y.one( node.getData('target') );
- }
- else if ( node.getAttribute('href').indexOf('#') >= 0 ) {
- Y.log('No target, looking at href: ' + node.getAttribute('href'), 'debug', 'Bootstrap.Collapse');
- container = Y.one( node.getAttribute('href').substr( node.getAttribute('href').indexOf('#') ) );
- }
- return container;
- },
-
- /**
- * @method hide
- * @description Hide the collapsible target, specified by the host's
- * data-target or href attribute.
- */
- hide: function() {
- var node = this._getTarget();
-
- if ( this.transitioning ) {
- return;
- }
-
- if ( node ) {
- this._hideElement(node);
- }
- },
-
- /**
- * @method show
- * @description Show the collapsible target, specified by the host's
- * data-target or href attribute.
- */
- show: function() {
- var node = this._getTarget(),
- host = this._node,
- self = this,
- parent,
- group_selector = this.config.groupSelector;
-
- if ( this.transitioning ) {
- return;
- }
-
- if ( host.getData('parent') ) {
- parent = Y.one( host.getData('parent') );
- if ( parent ) {
- parent.all(group_selector).each( function(el) {
- Y.log('Hiding element: ' + el, 'debug', 'Bootstrap.Collapse');
- self._hideElement(el);
- });
- }
- }
- this._showElement(node);
- },
-
- /**
- @method toggle
- @description Toggle the state of the collapsible target, specified
- by the host's data-target or href
- attribute. Calls the show or hide method.
- **/
- toggle : function(e) {
- if ( e && Y.Lang.isFunction(e.preventDefault) ) {
- e.preventDefault();
- }
-
- var target = this._getTarget();
-
- if ( target.hasClass( this.config.showClass ) ) {
- this.fire('hide');
- } else {
- this.fire('show');
- }
- },
-
- /**
- @method _transition
- @description Handles the transition between showing and hiding.
- @protected
- @param node {Node} node to apply transitions to
- @param method {String} 'hide' or 'show'
- **/
- _transition : function(node, method) {
- var self = this,
- config = this.config,
- duration = config.duration,
- easing = config.easing,
- // If we are hiding, then remove the show class.
- removeClass = method === 'hide' ? config.showClass : config.hideClass,
- // And if we are hiding, add the hide class.
- addClass = method === 'hide' ? config.hideClass : config.showClass,
-
- to_height = method === 'hide' ? 0 : null,
- event = method === 'hide' ? 'hidden' : 'shown',
-
- complete = function() {
- node.removeClass(removeClass);
- node.addClass(addClass);
- self.transitioning = false;
- this.fire( event );
- };
-
- if ( to_height === null ) {
- to_height = 0;
- node.all('> *').each(function(el) {
- to_height += el.get('scrollHeight');
- });
- }
-
- this.transitioning = true;
-
- node.transition({
- height : to_height +'px',
- duration : duration,
- easing : easing
- }, complete);
- },
-
- /**
- @method _hideElement
- @description Calls the _transition method to hide a node.
- @protected
- @param node {Node} node to hide.
- **/
- _hideElement : function(node) {
- this._transition(node, 'hide');
-/*
- var showClass = this.showClass,
- hideClass = this.hideClass;
-
- node.removeClass(showClass);
- node.addClass(hideClass);
-*/
- },
-
- /**
- @method _showElement
- @description Calls the _transition method to show a node.
- @protected
- @param node {Node} node to show.
- **/
- _showElement : function(node) {
- this._transition(node, 'show');
-/*
- var showClass = this.showClass,
- hideClass = this.hideClass;
- node.removeClass(hideClass);
- node.addClass(showClass);
-*/
- }
-});
-
-Y.namespace('Bootstrap').Collapse = CollapsePlugin;
-
-
-
-}, '@VERSION@' ,{requires:['plugin','transition','event','event-delegate']});
-
-YUI.add('gallery-bootstrap-dropdown', function(Y) {
-
-/**
-A Plugin which provides dropdown behaviors for dropdown buttons and menu
-groups. This utilizes the markup from the Twitter Bootstrap Project.
-
-@module gallery-bootstrap-dropdown
-**/
-
-/**
-A Plugin which provides dropdown behaviors for dropdown buttons and menu
-groups. This utilizes the markup from the Twitter Bootstrap Project.
-
-To automatically gain this functionality, you can simply add the
-data-toggle=dropdown attribute to any element.
-
-It can also be plugged into any node or node list.
-
-@example
-
- var node = Y.one('.someNode');
- node.plug( Y.Bootstrap.Dropdown );
- node.dropdown.show();
-
-@class Bootstrap.Dropdown
-**/
-
-var NS = Y.namespace('Bootstrap');
-
-function DropdownPlugin() {
- DropdownPlugin.superclass.constructor.apply(this, arguments);
-}
-
-DropdownPlugin.NAME = 'Bootstrap.Dropdown';
-DropdownPlugin.NS = 'dropdown';
-
-Y.extend( DropdownPlugin, Y.Plugin.Base, {
- defaults : {
- className : 'open',
- target : 'target',
- selector : ''
- },
- initializer : function(config) {
- this._node = config.host;
-
- this.config = Y.mix( config, this.defaults );
-
- this.publish('show', { preventable : true, defaultFn : this.show });
- this.publish('hide', { preventable : true, defaultFn : this.hide });
-
- this._node.on('click', this.toggle, this);
- },
-
- toggle : function() {
- var target = this.getTarget(),
- className = this.config.className;
-
- target.toggleClass( className );
- target.once('clickoutside', function() {
- target.toggleClass( className );
- });
- },
-
- show : function() {
- this.getTarget().addClass( this.config.className );
- },
- hide : function() {
- this.getTarget().removeClass( this.config.className );
- },
- open : function() {
- this.getTarget().addClass( this.config.className );
- },
- close : function() {
- this.getTarget().removeClass( this.config.className );
- },
-
- /**
- @method getTarget
- @description Fetches a Y.NodeList or Y.Node that should be used to modify class names
- **/
- getTarget : function() {
- var node = this._node,
- selector = node.getData( this.config.target ),
- target;
-
- if ( !selector ) {
- selector = node.getAttribute('href');
- selector = target && target.replace(/.*(?=#[^\s]*$)/, ''); //strip for ie7
- }
-
- target = Y.all(selector);
- if ( target.size() === 0 ) {
- target = node.get('parentNode');
- }
-
- return target;
- }
-});
-
-NS.Dropdown = DropdownPlugin;
-NS.dropdown_delegation = function() {
- Y.delegate('click', function(e) {
- var target = e.currentTarget;
- e.preventDefault();
-
- if ( typeof e.target.dropdown === 'undefined' ) {
- target.plug( DropdownPlugin );
- target.dropdown.toggle();
- }
- }, document.body, '*[data-toggle=dropdown]' );
-};
-
-
-}, '@VERSION@' ,{requires:['plugin','event','event-outside']});
-YUI.add('moodle-theme_bootstrapbase-bootstrap', function (Y, NAME) {
-
-/**
-The Moodle Bootstrap theme's bootstrap JavaScript
-
-@namespace Moodle
-@module theme_bootstrapbase-bootstrap
-**/
-
-/**
-The Moodle Bootstrap theme's bootstrap JavaScript
-
-@class Moodle.theme_bootstrapbase.bootstrap
-@uses node
-@uses selector-css3
-@constructor
-**/
-var CSS = {
- ACTIVE: 'active'
- },
- SELECTORS = {
- NAVBAR_BUTTON: '.btn-navbar',
- // FIXME This is deliberately wrong because of a breaking issue in the upstream library.
- TOGGLECOLLAPSE: '*[data-disabledtoggle="collapse"]'
- },
- NS = Y.namespace('Moodle.theme_bootstrapbase.bootstrap');
-
-/**
- * Initialise the Moodle Bootstrap theme JavaScript
- *
- * @method init
- */
-NS.init = function() {
- // We must use these here and *must not* add them to the list of dependencies until
- // Moodle fully supports the gallery.
- // When debugging is disabled and we seed the Loader with out configuration, if these
- // are in the requires array, then the Loader will try to load them from the CDN. It
- // does not know that we have added them to the module rollup.
- Y.use('gallery-bootstrap-dropdown',
- 'gallery-bootstrap-collapse',
- 'gallery-bootstrap-engine', function() {
-
- // Set up expandable and show.
- NS.setup_toggle_expandable();
- NS.setup_toggle_show();
-
- // Set up upstream dropdown delegation.
- Y.Bootstrap.dropdown_delegation();
- });
-};
-
-/**
- * Setup toggling of the Toggle Collapse
- *
- * @method setup_toggle_expandable
- * @private
- */
-NS.setup_toggle_expandable = function() {
- Y.delegate('click', this.toggle_expandable, Y.config.doc, SELECTORS.TOGGLECOLLAPSE, this);
-};
-
-/**
- * Use the Y.Bootstrap.Collapse plugin to toggle collapse.
- *
- * @method toggle_expandable
- * @private
- * @param {EventFacade} e
- */
-NS.toggle_expandable = function(e) {
- if (typeof e.currentTarget.collapse === 'undefined') {
- // Only plug if we haven't already.
- e.currentTarget.plug(Y.Bootstrap.Collapse);
-
- // The plugin will now catch the click and handle the toggle.
- // We only need to do this when we plug the node for the first
- // time.
- e.currentTarget.collapse.toggle();
- e.preventDefault();
- }
-};
-
-/**
- * Set up the show toggler for activating the navigation bar
- *
- * @method setup_toggle_show
- * @private
- */
-NS.setup_toggle_show = function() {
- Y.delegate('click', this.toggle_show, Y.config.doc, SELECTORS.NAVBAR_BUTTON);
-};
-
-/**
- * Toggle hiding of the navigation bar
- *
- * @method toggle_show
- * @private
- * @param {EventFacade} e
- */
-NS.toggle_show = function(e) {
- // Toggle the active class on both the clicked .btn-navbar and the
- // associated target, defined by a CSS selector string set as the
- // data-target attribute on the .btn-navbar element in question.
- var navButtons = Y.all(SELECTORS.NAVBAR_BUTTON);
- var currentOpen = this.hasClass(CSS.ACTIVE);
-
- // Close all nav sections.
- Y.each(navButtons, function(navButton) {
- Y.all(navButton.getAttribute('data-target')).removeClass(CSS.ACTIVE);
- });
- navButtons.removeClass(CSS.ACTIVE);
-
- if (!currentOpen) {
- // Open the current Nav section
- this.addClass(CSS.ACTIVE);
- Y.all(this.getAttribute('data-target')).addClass(CSS.ACTIVE);
- }
-};
-
-
-}, '@VERSION@', {"requires": ["node", "selector-css3"]});
diff --git a/theme/bootstrapbase/yui/build/moodle-theme_bootstrapbase-bootstrap/moodle-theme_bootstrapbase-bootstrap-min.js b/theme/bootstrapbase/yui/build/moodle-theme_bootstrapbase-bootstrap/moodle-theme_bootstrapbase-bootstrap-min.js
deleted file mode 100644
index b171a8e5b34..00000000000
--- a/theme/bootstrapbase/yui/build/moodle-theme_bootstrapbase-bootstrap/moodle-theme_bootstrapbase-bootstrap-min.js
+++ /dev/null
@@ -1 +0,0 @@
-YUI.add("gallery-bootstrap-engine",function(e){function n(){n.superclass.constructor.apply(this,arguments)}var t="host";e.mix(n,{NAME:"bootstrap",ATTRS:{container:{getter:function(e){var n=this.get(t);return n&&n.one(e)}},iframe:{getter:function(){var e=this.get("container");return e&&e.one("iframe")}},host:{readyOnly:!0},ready:{value:!1,readyOnly:!0}}}),e.extend(n,e.Base,{EXTRAS:[],initializer:function(){var n=this,r,i,s,o=e.Array(n.EXTRAS),u,a=function(){e.later(0,n,function(){n._boot()})};try{r=e.config.win.parent,i=r&&r.window,s=i&&i.document}catch(f){}r&&i&&s?(u=YUI({bootstrap:!1,win:i,doc:s}),o.push("node",function(){a()}),n._set(t,u.use.apply(u,o))):a()},_boot:function(){var e=this,t;t=e._connect(),e._styleIframe(),e._init(),e._bind(),t&&e._ready(),e._set("ready",!0)},_connect:function(){var n=e.config.guid,r=this.get(t),i=r&&r.config.win,s=n&&i&&i.YUI&&i.YUI.Env[n];return s?s(this):!1},_init:function(){},_bind:function(){},_ready:function(){},_styleIframe:function(){var t=this.get("iframe");t&&e.each(["border","marginWidth","marginHeight","leftMargin","topMargin"],function(e){t.setAttribute(e,0)})}}),e.BootstrapEngine=n},"@VERSION@",{requires:["node","base-base"]}),YUI.add("gallery-bootstrap-collapse",function(e){function t(){t.superclass.constructor.apply(this,arguments)}t.NAME="Bootstrap.Collapse",t.NS="collapse",e.extend(t,e.Plugin.Base,{defaults:{duration:.25,easing:"ease-in",showClass:"in",hideClass:"out",groupSelector:"> .accordion-group > .in"},transitioning:!1,initializer:function(t){this._node=t.host,this.config=e.mix(t,this.defaults),this.publish("show",{preventable:!0,defaultFn:this.show}),this.publish("hide",{preventable:!0,defaultFn:this.hide}),this._node.on("click",this.toggle,this)},_getTarget:function(){var t=this._node,n;return t.getData("target")?n=e.one(t.getData("target")):t.getAttribute("href").indexOf("#")>=0&&(n=e.one(t.getAttribute("href").substr(t.getAttribute("href").indexOf("#")))),n},hide:function(){var e=this._getTarget();if(this.transitioning)return;e&&this._hideElement(e)},show:function(){var t=this._getTarget(),n=this._node,r=this,i,s=this.config.groupSelector;if(this.transitioning)return;n.getData("parent")&&(i=e.one(n.getData("parent")),i&&i.all(s).each(function(e){r._hideElement(e)})),this._showElement(t)},toggle:function(t){t&&e.Lang.isFunction(t.preventDefault)&&t.preventDefault();var n=this._getTarget();n.hasClass(this.config.showClass)?this.fire("hide"):this.fire("show")},_transition:function(e,t){var n=this,r=this.config,i=r.duration,s=r.easing,o=t==="hide"?r.showClass:r.hideClass,u=t==="hide"?r.hideClass:r.showClass,a=t==="hide"?0:null,f=t==="hide"?"hidden":"shown",l=function(){e.removeClass(o),e.addClass(u),n.transitioning=!1,this.fire(f)};a===null&&(a=0,e.all("> *").each(function(e){a+=e.get("scrollHeight")})),this.transitioning=!0,e.transition({height:a+"px",duration:i,easing:s},l)},_hideElement:function(e){this._transition(e,"hide")},_showElement:function(e){this._transition(e,"show")}}),e.namespace("Bootstrap").Collapse=t},"@VERSION@",{requires:["plugin","transition","event","event-delegate"]}),YUI.add("gallery-bootstrap-dropdown",function(e){function n(){n.superclass.constructor.apply(this,arguments)}var t=e.namespace("Bootstrap");n.NAME="Bootstrap.Dropdown",n.NS="dropdown",e.extend(n,e.Plugin.Base,{defaults:{className:"open",target:"target",selector:""},initializer:function(t){this._node=t.host,this.config=e.mix(t,this.defaults),this.publish("show",{preventable:!0,defaultFn:this.show}),this.publish("hide",{preventable:!0,defaultFn:this.hide}),this._node.on("click",this.toggle,this)},toggle:function(){var e=this.getTarget(),t=this.config.className;e.toggleClass(t),e.once("clickoutside",function(){e.toggleClass(t)})},show:function(){this.getTarget().addClass(this.config.className)},hide:function(){this.getTarget().removeClass(this.config.className)},open:function(){this.getTarget().addClass(this.config.className)},close:function(){this.getTarget().removeClass(this.config.className)},getTarget:function(){var t=this._node,n=t.getData(this.config.target),r;return n||(n=t.getAttribute("href"),n=r&&r.replace(/.*(?=#[^\s]*$)/,"")),r=e.all(n),r.size()===0&&(r=t.get("parentNode")),r}}),t.Dropdown=n,t.dropdown_delegation=function(){e.delegate("click",function(e){var t=e.currentTarget;e.preventDefault(),typeof e.target.dropdown=="undefined"&&(t.plug(n),t.dropdown.toggle())},document.body,"*[data-toggle=dropdown]")}},"@VERSION@",{requires:["plugin","event","event-outside"]}),YUI.add("moodle-theme_bootstrapbase-bootstrap",function(e,t){var n={ACTIVE:"active"},r={NAVBAR_BUTTON:".btn-navbar",TOGGLECOLLAPSE:'*[data-disabledtoggle="collapse"]'},i=e.namespace("Moodle.theme_bootstrapbase.bootstrap");i.init=function(){e.use("gallery-bootstrap-dropdown","gallery-bootstrap-collapse","gallery-bootstrap-engine",function(){i.setup_toggle_expandable(),i.setup_toggle_show(),e.Bootstrap.dropdown_delegation()})},i.setup_toggle_expandable=function(){e.delegate("click",this.toggle_expandable,e.config.doc,r.TOGGLECOLLAPSE,this)},i.toggle_expandable=function(t){typeof t.currentTarget.collapse=="undefined"&&(t.currentTarget.plug(e.Bootstrap.Collapse),t.currentTarget.collapse.toggle(),t.preventDefault())},i.setup_toggle_show=function(){e.delegate("click",this.toggle_show,e.config.doc,r.NAVBAR_BUTTON)},i.toggle_show=function(t){var i=e.all(r.NAVBAR_BUTTON),s=this.hasClass(n.ACTIVE);e.each(i,function(t){e.all(t.getAttribute("data-target")).removeClass(n.ACTIVE)}),i.removeClass(n.ACTIVE),s||(this.addClass(n.ACTIVE),e.all(this.getAttribute("data-target")).addClass(n.ACTIVE))}},"@VERSION@",{requires:["node","selector-css3"]});
diff --git a/theme/bootstrapbase/yui/build/moodle-theme_bootstrapbase-bootstrap/moodle-theme_bootstrapbase-bootstrap.js b/theme/bootstrapbase/yui/build/moodle-theme_bootstrapbase-bootstrap/moodle-theme_bootstrapbase-bootstrap.js
deleted file mode 100644
index 8f47b80df5f..00000000000
--- a/theme/bootstrapbase/yui/build/moodle-theme_bootstrapbase-bootstrap/moodle-theme_bootstrapbase-bootstrap.js
+++ /dev/null
@@ -1,718 +0,0 @@
-YUI.add('gallery-bootstrap-engine', function(Y) {
-
-/**
- * Bootstrap Engine for Plug and Play widgets. This class is meant to be used in
- * conjuntion with the Injection Engine (gallery-bootstrap-engine). It facilitates the use of
- * an iframe as a sandbox to execute certain tasks and/or a presention element.
- *
- * @module gallery-bootstrap-engine
- * @requires node, base-base
- * @class Y.BootstrapEngine
- * @param config {Object} Configuration object
- * @extends Y.Base
- * @constructor
- */
-
-///////////////////////////////////////////////////////////////////////////
-//
-// Private shorthands, constants and variables
-//
-///////////////////////////////////////////////////////////////////////////
-
-var ATTR_HOST = 'host';
-
-///////////////////////////////////////////////////////////////////////////
-//
-// Class definition
-//
-///////////////////////////////////////////////////////////////////////////
-
-function BootstrapEngine () {
- BootstrapEngine.superclass.constructor.apply(this, arguments);
-}
-
-Y.mix(BootstrapEngine, {
-
- /**
- * The identity of the class.
- * @property BootstrapEngine.NAME
- * @type string
- * @static
- * @final
- * @readOnly
- * @default 'bootstrap'
- */
- NAME: 'bootstrap',
-
- /**
- * Static property used to define the default attribute configuration of
- * the class.
- * @property BootstrapEngine.ATTRS
- * @type Object
- * @protected
- * @static
- */
- ATTRS: {
- /**
- * @attribute container
- * @type {Selector|Node}
- * @writeOnce
- * @description selector or node for the iframe's container. This is relative to the parent document.
- */
- container: {
- getter: function (v) {
- var host = this.get(ATTR_HOST);
- return host && host.one( v );
- }
- },
- /**
- * @attribute iframe
- * @type {Node}
- * @readyOnly
- * @description Node reference to the iframe on the parent document.
- */
- iframe: {
- getter: function () {
- var c = this.get('container');
- return c && c.one('iframe' );
- }
- },
- /**
- * @attribute host
- * @type {Object}
- * @readyOnly
- * @description A "Y" reference bound to the parent document.
- */
- host: {
- readyOnly: true
- },
- /**
- * @attribute ready
- * @type {Boolean}
- * @readyOnly
- * @description A "Y" reference bound to the parent document.
- */
- ready: {
- value: false,
- readyOnly: true
- }
- }
-
-});
-
-Y.extend(BootstrapEngine, Y.Base, {
- /**
- * Any extra YUI module that you want to use by default in HOST YUI instance.
- * "node" module will be added automatically since it's required by bootstrap.
- * @property EXTRAS
- * @type Array
- * @default []
- */
- EXTRAS: [],
-
- /**
- * Construction logic executed during Bootstrap Engine instantiation.
- *
- * @method initializer
- * @param cfg {Object} Initial configuration
- * @protected
- */
- initializer: function () {
- var instance = this,
- parent, win, doc,
- use = Y.Array(instance.EXTRAS),
- host,
- callBootFn = function () {
- // finishing the initialization process async to facilitate
- // addons to hook into _boot/_init/_bind/_ready if needed.
- // todo: after migrating to 3.4 this is not longer needed, and we can use initializer and destroyer
- // in each extension
- Y.later(0, instance, function() {
- instance._boot();
- });
- };
-
- try {
- parent = Y.config.win.parent;
- win = parent && parent.window;
- doc = win && win.document;
- } catch(e) {
- }
-
- // parent is optional to facilitate testing and headless execution
- if (parent && win && doc) {
- host = YUI({
- bootstrap: false,
- win: win,
- doc: doc
- });
- use.push('node', function() {
- callBootFn();
- });
-
- // Creating a new YUI instance bound to the parent window
- instance._set(ATTR_HOST, host.use.apply(host, use));
- } else {
- callBootFn();
- }
- },
-
- /**
- * Basic initialization routine, styling the iframe, binding events and
- * connecting the bootstrap engine with the injection engine.
- *
- * @method _boot
- * @protected
- */
- _boot: function () {
- var instance = this,
- auto;
- // connecting with the injection engine before doing anything else
- auto = instance._connect();
- // adjust the iframe container in preparation for the first display action
- instance._styleIframe();
- // create some objects and markup
- instance._init();
- // binding some extra events
- instance._bind();
- // if the connect process wants to automatically execute the _ready, it should returns true.
- if (auto) {
- // connecting the bootstrap with the injection engine
- instance._ready();
- }
- // marking the system as ready
- instance._set('ready', true);
- },
-
- /**
- * Connects the bootstrap with the injection engine running in the parent window. This method
- * defines the hand-shake process between them. This method is meant to be called by
- * the bootstrap engine _init method to start the connection.
- *
- * @method _connect
- * @protected
- */
- _connect: function () {
- var guid = Y.config.guid, // injection engine guid value
- host = this.get(ATTR_HOST),
- pwin = host && host.config.win,
- // getting a reference to the parent window callback function to notify
- // to the injection engine that the bootstrap is ready
- callback = guid && pwin && pwin.YUI && pwin.YUI.Env[guid];
-
- // connecting bootstrap with the injection engines
- return ( callback ? callback ( this ) : false );
- },
-
- /**
- * Basic initialization routine, usually to create markup, new objects and attributes, etc.
- * Overrides/Extends this prototype method to do your mojo.
- *
- * @method _init
- * @protected
- */
- _init: function () {
- },
-
- /**
- * Defines the binding logic for the bootstrap engine, listening for some attributes
- * that might change, and defining the set of events that can be exposed to the injection engine.
- * Overrides/Extends this prototype method to do your mojo.
- *
- * @method _bind
- * @protected
- */
- _bind: function () {
- },
-
- /**
- * This method will be called only if the connect response with "true", you can use this
- * to control the state of the initialization from the injection engine since it might
- * take some time to load the stuff in the iframe, and the user might interact with the page
- * invalidating the initialization routine.
- * Overrides/Extends this prototype method to do your mojo.
- *
- * @method _ready
- * @protected
- */
- _ready : function () {
- },
-
- /**
- * The iframe that holds the bootstrap engine sometimes is used as a UI overlay.
- * In this case, you can style it through this method. By default, it will set
- * border, frameBorder, marginWidth, marginHeight, leftMargin and topMargin to
- * cero, and allowTransparency to true.
- *
- * @method _styleIframe
- * @protected
- */
- _styleIframe: function () {
- var iframe = this.get('iframe');
- // making the iframe optional to facilitate tests
- if (iframe) {
- Y.each (['border', 'marginWidth', 'marginHeight', 'leftMargin', 'topMargin'], function (name) {
- iframe.setAttribute(name, 0);
- });
- }
- }
-
-});
-
-Y.BootstrapEngine = BootstrapEngine;
-
-
-}, '@VERSION@' ,{requires:['node','base-base']});
-
-YUI.add('gallery-bootstrap-collapse', function(Y) {
-
-/**
-A Plugin which provides collapsing/expanding behaviors on a Node with
-compatible syntax and markup from Twitter's Bootstrap project.
-
-@module gallery-bootstrap-collapse
-**/
-
-/**
-A Plugin which provides collapsing and expanding behaviors on a Node with
-compatible syntax and markup from Twitter's Bootstrap project.
-
-It possible to have dynamic behaviors without incorporating any
-JavaScript by setting data-toggle=collapse on any element.
-
-However, it can be manually plugged into any node or node list.
-
-@example
-
- var node = Y.one('.someNode');
- node.plug( Y.Bootstrap.Collapse, config );
-
- node.collapse.show();
-
-@class Bootstrap.Collapse
-**/
-
-function CollapsePlugin() {
- CollapsePlugin.superclass.constructor.apply(this, arguments);
-}
-
-CollapsePlugin.NAME = 'Bootstrap.Collapse';
-CollapsePlugin.NS = 'collapse';
-
-Y.extend(CollapsePlugin, Y.Plugin.Base, {
- defaults : {
- duration : 0.25,
- easing : 'ease-in',
- showClass : 'in',
- hideClass : 'out',
-
- groupSelector : '> .accordion-group > .in'
- },
-
- transitioning: false,
-
- initializer : function(config) {
- this._node = config.host;
-
- this.config = Y.mix( config, this.defaults );
-
- this.publish('show', { preventable : true, defaultFn : this.show });
- this.publish('hide', { preventable : true, defaultFn : this.hide });
-
- this._node.on('click', this.toggle, this);
- },
-
- _getTarget: function() {
- var node = this._node,
- container;
-
- if ( node.getData('target') ) {
- container = Y.one( node.getData('target') );
- }
- else if ( node.getAttribute('href').indexOf('#') >= 0 ) {
- container = Y.one( node.getAttribute('href').substr( node.getAttribute('href').indexOf('#') ) );
- }
- return container;
- },
-
- /**
- * @method hide
- * @description Hide the collapsible target, specified by the host's
- * data-target or href attribute.
- */
- hide: function() {
- var node = this._getTarget();
-
- if ( this.transitioning ) {
- return;
- }
-
- if ( node ) {
- this._hideElement(node);
- }
- },
-
- /**
- * @method show
- * @description Show the collapsible target, specified by the host's
- * data-target or href attribute.
- */
- show: function() {
- var node = this._getTarget(),
- host = this._node,
- self = this,
- parent,
- group_selector = this.config.groupSelector;
-
- if ( this.transitioning ) {
- return;
- }
-
- if ( host.getData('parent') ) {
- parent = Y.one( host.getData('parent') );
- if ( parent ) {
- parent.all(group_selector).each( function(el) {
- self._hideElement(el);
- });
- }
- }
- this._showElement(node);
- },
-
- /**
- @method toggle
- @description Toggle the state of the collapsible target, specified
- by the host's data-target or href
- attribute. Calls the show or hide method.
- **/
- toggle : function(e) {
- if ( e && Y.Lang.isFunction(e.preventDefault) ) {
- e.preventDefault();
- }
-
- var target = this._getTarget();
-
- if ( target.hasClass( this.config.showClass ) ) {
- this.fire('hide');
- } else {
- this.fire('show');
- }
- },
-
- /**
- @method _transition
- @description Handles the transition between showing and hiding.
- @protected
- @param node {Node} node to apply transitions to
- @param method {String} 'hide' or 'show'
- **/
- _transition : function(node, method) {
- var self = this,
- config = this.config,
- duration = config.duration,
- easing = config.easing,
- // If we are hiding, then remove the show class.
- removeClass = method === 'hide' ? config.showClass : config.hideClass,
- // And if we are hiding, add the hide class.
- addClass = method === 'hide' ? config.hideClass : config.showClass,
-
- to_height = method === 'hide' ? 0 : null,
- event = method === 'hide' ? 'hidden' : 'shown',
-
- complete = function() {
- node.removeClass(removeClass);
- node.addClass(addClass);
- self.transitioning = false;
- this.fire( event );
- };
-
- if ( to_height === null ) {
- to_height = 0;
- node.all('> *').each(function(el) {
- to_height += el.get('scrollHeight');
- });
- }
-
- this.transitioning = true;
-
- node.transition({
- height : to_height +'px',
- duration : duration,
- easing : easing
- }, complete);
- },
-
- /**
- @method _hideElement
- @description Calls the _transition method to hide a node.
- @protected
- @param node {Node} node to hide.
- **/
- _hideElement : function(node) {
- this._transition(node, 'hide');
-/*
- var showClass = this.showClass,
- hideClass = this.hideClass;
-
- node.removeClass(showClass);
- node.addClass(hideClass);
-*/
- },
-
- /**
- @method _showElement
- @description Calls the _transition method to show a node.
- @protected
- @param node {Node} node to show.
- **/
- _showElement : function(node) {
- this._transition(node, 'show');
-/*
- var showClass = this.showClass,
- hideClass = this.hideClass;
- node.removeClass(hideClass);
- node.addClass(showClass);
-*/
- }
-});
-
-Y.namespace('Bootstrap').Collapse = CollapsePlugin;
-
-
-
-}, '@VERSION@' ,{requires:['plugin','transition','event','event-delegate']});
-
-YUI.add('gallery-bootstrap-dropdown', function(Y) {
-
-/**
-A Plugin which provides dropdown behaviors for dropdown buttons and menu
-groups. This utilizes the markup from the Twitter Bootstrap Project.
-
-@module gallery-bootstrap-dropdown
-**/
-
-/**
-A Plugin which provides dropdown behaviors for dropdown buttons and menu
-groups. This utilizes the markup from the Twitter Bootstrap Project.
-
-To automatically gain this functionality, you can simply add the
-data-toggle=dropdown attribute to any element.
-
-It can also be plugged into any node or node list.
-
-@example
-
- var node = Y.one('.someNode');
- node.plug( Y.Bootstrap.Dropdown );
- node.dropdown.show();
-
-@class Bootstrap.Dropdown
-**/
-
-var NS = Y.namespace('Bootstrap');
-
-function DropdownPlugin() {
- DropdownPlugin.superclass.constructor.apply(this, arguments);
-}
-
-DropdownPlugin.NAME = 'Bootstrap.Dropdown';
-DropdownPlugin.NS = 'dropdown';
-
-Y.extend( DropdownPlugin, Y.Plugin.Base, {
- defaults : {
- className : 'open',
- target : 'target',
- selector : ''
- },
- initializer : function(config) {
- this._node = config.host;
-
- this.config = Y.mix( config, this.defaults );
-
- this.publish('show', { preventable : true, defaultFn : this.show });
- this.publish('hide', { preventable : true, defaultFn : this.hide });
-
- this._node.on('click', this.toggle, this);
- },
-
- toggle : function() {
- var target = this.getTarget(),
- className = this.config.className;
-
- target.toggleClass( className );
- target.once('clickoutside', function() {
- target.toggleClass( className );
- });
- },
-
- show : function() {
- this.getTarget().addClass( this.config.className );
- },
- hide : function() {
- this.getTarget().removeClass( this.config.className );
- },
- open : function() {
- this.getTarget().addClass( this.config.className );
- },
- close : function() {
- this.getTarget().removeClass( this.config.className );
- },
-
- /**
- @method getTarget
- @description Fetches a Y.NodeList or Y.Node that should be used to modify class names
- **/
- getTarget : function() {
- var node = this._node,
- selector = node.getData( this.config.target ),
- target;
-
- if ( !selector ) {
- selector = node.getAttribute('href');
- selector = target && target.replace(/.*(?=#[^\s]*$)/, ''); //strip for ie7
- }
-
- target = Y.all(selector);
- if ( target.size() === 0 ) {
- target = node.get('parentNode');
- }
-
- return target;
- }
-});
-
-NS.Dropdown = DropdownPlugin;
-NS.dropdown_delegation = function() {
- Y.delegate('click', function(e) {
- var target = e.currentTarget;
- e.preventDefault();
-
- if ( typeof e.target.dropdown === 'undefined' ) {
- target.plug( DropdownPlugin );
- target.dropdown.toggle();
- }
- }, document.body, '*[data-toggle=dropdown]' );
-};
-
-
-}, '@VERSION@' ,{requires:['plugin','event','event-outside']});
-YUI.add('moodle-theme_bootstrapbase-bootstrap', function (Y, NAME) {
-
-/**
-The Moodle Bootstrap theme's bootstrap JavaScript
-
-@namespace Moodle
-@module theme_bootstrapbase-bootstrap
-**/
-
-/**
-The Moodle Bootstrap theme's bootstrap JavaScript
-
-@class Moodle.theme_bootstrapbase.bootstrap
-@uses node
-@uses selector-css3
-@constructor
-**/
-var CSS = {
- ACTIVE: 'active'
- },
- SELECTORS = {
- NAVBAR_BUTTON: '.btn-navbar',
- // FIXME This is deliberately wrong because of a breaking issue in the upstream library.
- TOGGLECOLLAPSE: '*[data-disabledtoggle="collapse"]'
- },
- NS = Y.namespace('Moodle.theme_bootstrapbase.bootstrap');
-
-/**
- * Initialise the Moodle Bootstrap theme JavaScript
- *
- * @method init
- */
-NS.init = function() {
- // We must use these here and *must not* add them to the list of dependencies until
- // Moodle fully supports the gallery.
- // When debugging is disabled and we seed the Loader with out configuration, if these
- // are in the requires array, then the Loader will try to load them from the CDN. It
- // does not know that we have added them to the module rollup.
- Y.use('gallery-bootstrap-dropdown',
- 'gallery-bootstrap-collapse',
- 'gallery-bootstrap-engine', function() {
-
- // Set up expandable and show.
- NS.setup_toggle_expandable();
- NS.setup_toggle_show();
-
- // Set up upstream dropdown delegation.
- Y.Bootstrap.dropdown_delegation();
- });
-};
-
-/**
- * Setup toggling of the Toggle Collapse
- *
- * @method setup_toggle_expandable
- * @private
- */
-NS.setup_toggle_expandable = function() {
- Y.delegate('click', this.toggle_expandable, Y.config.doc, SELECTORS.TOGGLECOLLAPSE, this);
-};
-
-/**
- * Use the Y.Bootstrap.Collapse plugin to toggle collapse.
- *
- * @method toggle_expandable
- * @private
- * @param {EventFacade} e
- */
-NS.toggle_expandable = function(e) {
- if (typeof e.currentTarget.collapse === 'undefined') {
- // Only plug if we haven't already.
- e.currentTarget.plug(Y.Bootstrap.Collapse);
-
- // The plugin will now catch the click and handle the toggle.
- // We only need to do this when we plug the node for the first
- // time.
- e.currentTarget.collapse.toggle();
- e.preventDefault();
- }
-};
-
-/**
- * Set up the show toggler for activating the navigation bar
- *
- * @method setup_toggle_show
- * @private
- */
-NS.setup_toggle_show = function() {
- Y.delegate('click', this.toggle_show, Y.config.doc, SELECTORS.NAVBAR_BUTTON);
-};
-
-/**
- * Toggle hiding of the navigation bar
- *
- * @method toggle_show
- * @private
- * @param {EventFacade} e
- */
-NS.toggle_show = function(e) {
- // Toggle the active class on both the clicked .btn-navbar and the
- // associated target, defined by a CSS selector string set as the
- // data-target attribute on the .btn-navbar element in question.
- var navButtons = Y.all(SELECTORS.NAVBAR_BUTTON);
- var currentOpen = this.hasClass(CSS.ACTIVE);
-
- // Close all nav sections.
- Y.each(navButtons, function(navButton) {
- Y.all(navButton.getAttribute('data-target')).removeClass(CSS.ACTIVE);
- });
- navButtons.removeClass(CSS.ACTIVE);
-
- if (!currentOpen) {
- // Open the current Nav section
- this.addClass(CSS.ACTIVE);
- Y.all(this.getAttribute('data-target')).addClass(CSS.ACTIVE);
- }
-};
-
-
-}, '@VERSION@', {"requires": ["node", "selector-css3"]});
diff --git a/theme/bootstrapbase/yui/src/bootstrap/build.json b/theme/bootstrapbase/yui/src/bootstrap/build.json
deleted file mode 100644
index 6854b964afe..00000000000
--- a/theme/bootstrapbase/yui/src/bootstrap/build.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "name": "moodle-theme_bootstrapbase-bootstrap",
- "builds": {
- "moodle-theme_bootstrapbase-bootstrap": {
- "prependfiles": [
- "bootstrapengine.js",
- "bootstrapcollapse.js",
- "bootstrapdropdown.js"
- ],
- "jsfiles": [
- "bootstrap.js"
- ]
- }
- }
-}
diff --git a/theme/bootstrapbase/yui/src/bootstrap/js/bootstrap.js b/theme/bootstrapbase/yui/src/bootstrap/js/bootstrap.js
deleted file mode 100644
index ad082cf0690..00000000000
--- a/theme/bootstrapbase/yui/src/bootstrap/js/bootstrap.js
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
-The Moodle Bootstrap theme's bootstrap JavaScript
-
-@namespace Moodle
-@module theme_bootstrapbase-bootstrap
-**/
-
-/**
-The Moodle Bootstrap theme's bootstrap JavaScript
-
-@class Moodle.theme_bootstrapbase.bootstrap
-@uses node
-@uses selector-css3
-@constructor
-**/
-var CSS = {
- ACTIVE: 'active'
- },
- SELECTORS = {
- NAVBAR_BUTTON: '.btn-navbar',
- // FIXME This is deliberately wrong because of a breaking issue in the upstream library.
- TOGGLECOLLAPSE: '*[data-disabledtoggle="collapse"]'
- },
- NS = Y.namespace('Moodle.theme_bootstrapbase.bootstrap');
-
-/**
- * Initialise the Moodle Bootstrap theme JavaScript
- *
- * @method init
- */
-NS.init = function() {
- // We must use these here and *must not* add them to the list of dependencies until
- // Moodle fully supports the gallery.
- // When debugging is disabled and we seed the Loader with out configuration, if these
- // are in the requires array, then the Loader will try to load them from the CDN. It
- // does not know that we have added them to the module rollup.
- Y.use('gallery-bootstrap-dropdown',
- 'gallery-bootstrap-collapse',
- 'gallery-bootstrap-engine', function() {
-
- // Set up expandable and show.
- NS.setup_toggle_expandable();
- NS.setup_toggle_show();
-
- // Set up upstream dropdown delegation.
- Y.Bootstrap.dropdown_delegation();
- });
-};
-
-/**
- * Setup toggling of the Toggle Collapse
- *
- * @method setup_toggle_expandable
- * @private
- */
-NS.setup_toggle_expandable = function() {
- Y.delegate('click', this.toggle_expandable, Y.config.doc, SELECTORS.TOGGLECOLLAPSE, this);
-};
-
-/**
- * Use the Y.Bootstrap.Collapse plugin to toggle collapse.
- *
- * @method toggle_expandable
- * @private
- * @param {EventFacade} e
- */
-NS.toggle_expandable = function(e) {
- if (typeof e.currentTarget.collapse === 'undefined') {
- // Only plug if we haven't already.
- e.currentTarget.plug(Y.Bootstrap.Collapse);
-
- // The plugin will now catch the click and handle the toggle.
- // We only need to do this when we plug the node for the first
- // time.
- e.currentTarget.collapse.toggle();
- e.preventDefault();
- }
-};
-
-/**
- * Set up the show toggler for activating the navigation bar
- *
- * @method setup_toggle_show
- * @private
- */
-NS.setup_toggle_show = function() {
- Y.delegate('click', this.toggle_show, Y.config.doc, SELECTORS.NAVBAR_BUTTON);
-};
-
-/**
- * Toggle hiding of the navigation bar
- *
- * @method toggle_show
- * @private
- * @param {EventFacade} e
- */
-NS.toggle_show = function(e) {
- // Toggle the active class on both the clicked .btn-navbar and the
- // associated target, defined by a CSS selector string set as the
- // data-target attribute on the .btn-navbar element in question.
- var navButtons = Y.all(SELECTORS.NAVBAR_BUTTON);
- var currentOpen = this.hasClass(CSS.ACTIVE);
-
- // Close all nav sections.
- Y.each(navButtons, function(navButton) {
- Y.all(navButton.getAttribute('data-target')).removeClass(CSS.ACTIVE);
- });
- navButtons.removeClass(CSS.ACTIVE);
-
- if (!currentOpen) {
- // Open the current Nav section
- this.addClass(CSS.ACTIVE);
- Y.all(this.getAttribute('data-target')).addClass(CSS.ACTIVE);
- }
-};
diff --git a/theme/bootstrapbase/yui/src/bootstrap/js/bootstrapcollapse.js b/theme/bootstrapbase/yui/src/bootstrap/js/bootstrapcollapse.js
deleted file mode 100644
index f62230aa380..00000000000
--- a/theme/bootstrapbase/yui/src/bootstrap/js/bootstrapcollapse.js
+++ /dev/null
@@ -1,219 +0,0 @@
-YUI.add('gallery-bootstrap-collapse', function(Y) {
-
-/**
-A Plugin which provides collapsing/expanding behaviors on a Node with
-compatible syntax and markup from Twitter's Bootstrap project.
-
-@module gallery-bootstrap-collapse
-**/
-
-/**
-A Plugin which provides collapsing and expanding behaviors on a Node with
-compatible syntax and markup from Twitter's Bootstrap project.
-
-It possible to have dynamic behaviors without incorporating any
-JavaScript by setting data-toggle=collapse on any element.
-
-However, it can be manually plugged into any node or node list.
-
-@example
-
- var node = Y.one('.someNode');
- node.plug( Y.Bootstrap.Collapse, config );
-
- node.collapse.show();
-
-@class Bootstrap.Collapse
-**/
-
-function CollapsePlugin() {
- CollapsePlugin.superclass.constructor.apply(this, arguments);
-}
-
-CollapsePlugin.NAME = 'Bootstrap.Collapse';
-CollapsePlugin.NS = 'collapse';
-
-Y.extend(CollapsePlugin, Y.Plugin.Base, {
- defaults : {
- duration : 0.25,
- easing : 'ease-in',
- showClass : 'in',
- hideClass : 'out',
-
- groupSelector : '> .accordion-group > .in'
- },
-
- transitioning: false,
-
- initializer : function(config) {
- this._node = config.host;
-
- this.config = Y.mix( config, this.defaults );
-
- this.publish('show', { preventable : true, defaultFn : this.show });
- this.publish('hide', { preventable : true, defaultFn : this.hide });
-
- this._node.on('click', this.toggle, this);
- },
-
- _getTarget: function() {
- var node = this._node,
- container;
-
- if ( node.getData('target') ) {
- container = Y.one( node.getData('target') );
- }
- else if ( node.getAttribute('href').indexOf('#') >= 0 ) {
- Y.log('No target, looking at href: ' + node.getAttribute('href'), 'debug', 'Bootstrap.Collapse');
- container = Y.one( node.getAttribute('href').substr( node.getAttribute('href').indexOf('#') ) );
- }
- return container;
- },
-
- /**
- * @method hide
- * @description Hide the collapsible target, specified by the host's
- * data-target or href attribute.
- */
- hide: function() {
- var node = this._getTarget();
-
- if ( this.transitioning ) {
- return;
- }
-
- if ( node ) {
- this._hideElement(node);
- }
- },
-
- /**
- * @method show
- * @description Show the collapsible target, specified by the host's
- * data-target or href attribute.
- */
- show: function() {
- var node = this._getTarget(),
- host = this._node,
- self = this,
- parent,
- group_selector = this.config.groupSelector;
-
- if ( this.transitioning ) {
- return;
- }
-
- if ( host.getData('parent') ) {
- parent = Y.one( host.getData('parent') );
- if ( parent ) {
- parent.all(group_selector).each( function(el) {
- Y.log('Hiding element: ' + el, 'debug', 'Bootstrap.Collapse');
- self._hideElement(el);
- });
- }
- }
- this._showElement(node);
- },
-
- /**
- @method toggle
- @description Toggle the state of the collapsible target, specified
- by the host's data-target or href
- attribute. Calls the show or hide method.
- **/
- toggle : function(e) {
- if ( e && Y.Lang.isFunction(e.preventDefault) ) {
- e.preventDefault();
- }
-
- var target = this._getTarget();
-
- if ( target.hasClass( this.config.showClass ) ) {
- this.fire('hide');
- } else {
- this.fire('show');
- }
- },
-
- /**
- @method _transition
- @description Handles the transition between showing and hiding.
- @protected
- @param node {Node} node to apply transitions to
- @param method {String} 'hide' or 'show'
- **/
- _transition : function(node, method) {
- var self = this,
- config = this.config,
- duration = config.duration,
- easing = config.easing,
- // If we are hiding, then remove the show class.
- removeClass = method === 'hide' ? config.showClass : config.hideClass,
- // And if we are hiding, add the hide class.
- addClass = method === 'hide' ? config.hideClass : config.showClass,
-
- to_height = method === 'hide' ? 0 : null,
- event = method === 'hide' ? 'hidden' : 'shown',
-
- complete = function() {
- node.removeClass(removeClass);
- node.addClass(addClass);
- self.transitioning = false;
- this.fire( event );
- };
-
- if ( to_height === null ) {
- to_height = 0;
- node.all('> *').each(function(el) {
- to_height += el.get('scrollHeight');
- });
- }
-
- this.transitioning = true;
-
- node.transition({
- height : to_height +'px',
- duration : duration,
- easing : easing
- }, complete);
- },
-
- /**
- @method _hideElement
- @description Calls the _transition method to hide a node.
- @protected
- @param node {Node} node to hide.
- **/
- _hideElement : function(node) {
- this._transition(node, 'hide');
-/*
- var showClass = this.showClass,
- hideClass = this.hideClass;
-
- node.removeClass(showClass);
- node.addClass(hideClass);
-*/
- },
-
- /**
- @method _showElement
- @description Calls the _transition method to show a node.
- @protected
- @param node {Node} node to show.
- **/
- _showElement : function(node) {
- this._transition(node, 'show');
-/*
- var showClass = this.showClass,
- hideClass = this.hideClass;
- node.removeClass(hideClass);
- node.addClass(showClass);
-*/
- }
-});
-
-Y.namespace('Bootstrap').Collapse = CollapsePlugin;
-
-
-
-}, '@VERSION@' ,{requires:['plugin','transition','event','event-delegate']});
diff --git a/theme/bootstrapbase/yui/src/bootstrap/js/bootstrapdropdown.js b/theme/bootstrapbase/yui/src/bootstrap/js/bootstrapdropdown.js
deleted file mode 100644
index 7d1f3b1f68e..00000000000
--- a/theme/bootstrapbase/yui/src/bootstrap/js/bootstrapdropdown.js
+++ /dev/null
@@ -1,114 +0,0 @@
-YUI.add('gallery-bootstrap-dropdown', function(Y) {
-
-/**
-A Plugin which provides dropdown behaviors for dropdown buttons and menu
-groups. This utilizes the markup from the Twitter Bootstrap Project.
-
-@module gallery-bootstrap-dropdown
-**/
-
-/**
-A Plugin which provides dropdown behaviors for dropdown buttons and menu
-groups. This utilizes the markup from the Twitter Bootstrap Project.
-
-To automatically gain this functionality, you can simply add the
-data-toggle=dropdown attribute to any element.
-
-It can also be plugged into any node or node list.
-
-@example
-
- var node = Y.one('.someNode');
- node.plug( Y.Bootstrap.Dropdown );
- node.dropdown.show();
-
-@class Bootstrap.Dropdown
-**/
-
-var NS = Y.namespace('Bootstrap');
-
-function DropdownPlugin() {
- DropdownPlugin.superclass.constructor.apply(this, arguments);
-}
-
-DropdownPlugin.NAME = 'Bootstrap.Dropdown';
-DropdownPlugin.NS = 'dropdown';
-
-Y.extend( DropdownPlugin, Y.Plugin.Base, {
- defaults : {
- className : 'open',
- target : 'target',
- selector : ''
- },
- initializer : function(config) {
- this._node = config.host;
-
- this.config = Y.mix( config, this.defaults );
-
- this.publish('show', { preventable : true, defaultFn : this.show });
- this.publish('hide', { preventable : true, defaultFn : this.hide });
-
- this._node.on('click', this.toggle, this);
- },
-
- toggle : function() {
- var target = this.getTarget(),
- className = this.config.className;
-
- target.toggleClass( className );
- target.once('clickoutside', function() {
- target.toggleClass( className );
- });
- },
-
- show : function() {
- this.getTarget().addClass( this.config.className );
- },
- hide : function() {
- this.getTarget().removeClass( this.config.className );
- },
- open : function() {
- this.getTarget().addClass( this.config.className );
- },
- close : function() {
- this.getTarget().removeClass( this.config.className );
- },
-
- /**
- @method getTarget
- @description Fetches a Y.NodeList or Y.Node that should be used to modify class names
- **/
- getTarget : function() {
- var node = this._node,
- selector = node.getData( this.config.target ),
- target;
-
- if ( !selector ) {
- selector = node.getAttribute('href');
- selector = target && target.replace(/.*(?=#[^\s]*$)/, ''); //strip for ie7
- }
-
- target = Y.all(selector);
- if ( target.size() === 0 ) {
- target = node.get('parentNode');
- }
-
- return target;
- }
-});
-
-NS.Dropdown = DropdownPlugin;
-NS.dropdown_delegation = function() {
- Y.delegate('click', function(e) {
- var target = e.currentTarget;
- e.preventDefault();
-
- if ( typeof e.target.dropdown === 'undefined' ) {
- target.plug( DropdownPlugin );
- target.dropdown.toggle();
- }
- }, document.body, '*[data-toggle=dropdown]' );
-};
-
-
-}, '@VERSION@' ,{requires:['plugin','event','event-outside']});
diff --git a/theme/bootstrapbase/yui/src/bootstrap/js/bootstrapengine.js b/theme/bootstrapbase/yui/src/bootstrap/js/bootstrapengine.js
deleted file mode 100644
index b424595c600..00000000000
--- a/theme/bootstrapbase/yui/src/bootstrap/js/bootstrapengine.js
+++ /dev/null
@@ -1,273 +0,0 @@
-YUI.add('gallery-bootstrap-engine', function(Y) {
-
-/**
- * Bootstrap Engine for Plug and Play widgets. This class is meant to be used in
- * conjuntion with the Injection Engine (gallery-bootstrap-engine). It facilitates the use of
- * an iframe as a sandbox to execute certain tasks and/or a presention element.
- *
- * @module gallery-bootstrap-engine
- * @requires node, base-base
- * @class Y.BootstrapEngine
- * @param config {Object} Configuration object
- * @extends Y.Base
- * @constructor
- */
-
-///////////////////////////////////////////////////////////////////////////
-//
-// Private shorthands, constants and variables
-//
-///////////////////////////////////////////////////////////////////////////
-
-var ATTR_HOST = 'host';
-
-///////////////////////////////////////////////////////////////////////////
-//
-// Class definition
-//
-///////////////////////////////////////////////////////////////////////////
-
-function BootstrapEngine () {
- BootstrapEngine.superclass.constructor.apply(this, arguments);
-}
-
-Y.mix(BootstrapEngine, {
-
- /**
- * The identity of the class.
- * @property BootstrapEngine.NAME
- * @type string
- * @static
- * @final
- * @readOnly
- * @default 'bootstrap'
- */
- NAME: 'bootstrap',
-
- /**
- * Static property used to define the default attribute configuration of
- * the class.
- * @property BootstrapEngine.ATTRS
- * @type Object
- * @protected
- * @static
- */
- ATTRS: {
- /**
- * @attribute container
- * @type {Selector|Node}
- * @writeOnce
- * @description selector or node for the iframe's container. This is relative to the parent document.
- */
- container: {
- getter: function (v) {
- var host = this.get(ATTR_HOST);
- return host && host.one( v );
- }
- },
- /**
- * @attribute iframe
- * @type {Node}
- * @readyOnly
- * @description Node reference to the iframe on the parent document.
- */
- iframe: {
- getter: function () {
- var c = this.get('container');
- return c && c.one('iframe' );
- }
- },
- /**
- * @attribute host
- * @type {Object}
- * @readyOnly
- * @description A "Y" reference bound to the parent document.
- */
- host: {
- readyOnly: true
- },
- /**
- * @attribute ready
- * @type {Boolean}
- * @readyOnly
- * @description A "Y" reference bound to the parent document.
- */
- ready: {
- value: false,
- readyOnly: true
- }
- }
-
-});
-
-Y.extend(BootstrapEngine, Y.Base, {
- /**
- * Any extra YUI module that you want to use by default in HOST YUI instance.
- * "node" module will be added automatically since it's required by bootstrap.
- * @property EXTRAS
- * @type Array
- * @default []
- */
- EXTRAS: [],
-
- /**
- * Construction logic executed during Bootstrap Engine instantiation.
- *
- * @method initializer
- * @param cfg {Object} Initial configuration
- * @protected
- */
- initializer: function () {
- var instance = this,
- parent, win, doc,
- use = Y.Array(instance.EXTRAS),
- host,
- callBootFn = function () {
- // finishing the initialization process async to facilitate
- // addons to hook into _boot/_init/_bind/_ready if needed.
- // todo: after migrating to 3.4 this is not longer needed, and we can use initializer and destroyer
- // in each extension
- Y.later(0, instance, function() {
- instance._boot();
- });
- };
-
- try {
- parent = Y.config.win.parent;
- win = parent && parent.window;
- doc = win && win.document;
- } catch(e) {
- Y.log ('Parent window is not available or is a different domain', 'warn', 'bootstrap');
- }
-
- Y.log ('Initialization', 'info', 'bootstrap');
- // parent is optional to facilitate testing and headless execution
- if (parent && win && doc) {
- host = YUI({
- bootstrap: false,
- win: win,
- doc: doc
- });
- use.push('node', function() {
- callBootFn();
- });
-
- // Creating a new YUI instance bound to the parent window
- instance._set(ATTR_HOST, host.use.apply(host, use));
- } else {
- callBootFn();
- }
- },
-
- /**
- * Basic initialization routine, styling the iframe, binding events and
- * connecting the bootstrap engine with the injection engine.
- *
- * @method _boot
- * @protected
- */
- _boot: function () {
- var instance = this,
- auto;
- Y.log ('Boot', 'info', 'bootstrap');
- // connecting with the injection engine before doing anything else
- auto = instance._connect();
- // adjust the iframe container in preparation for the first display action
- instance._styleIframe();
- // create some objects and markup
- instance._init();
- // binding some extra events
- instance._bind();
- // if the connect process wants to automatically execute the _ready, it should returns true.
- if (auto) {
- // connecting the bootstrap with the injection engine
- instance._ready();
- }
- // marking the system as ready
- instance._set('ready', true);
- },
-
- /**
- * Connects the bootstrap with the injection engine running in the parent window. This method
- * defines the hand-shake process between them. This method is meant to be called by
- * the bootstrap engine _init method to start the connection.
- *
- * @method _connect
- * @protected
- */
- _connect: function () {
- var guid = Y.config.guid, // injection engine guid value
- host = this.get(ATTR_HOST),
- pwin = host && host.config.win,
- // getting a reference to the parent window callback function to notify
- // to the injection engine that the bootstrap is ready
- callback = guid && pwin && pwin.YUI && pwin.YUI.Env[guid];
-
- Y.log ('Bootstrap connect', 'info', 'bootstrap');
- // connecting bootstrap with the injection engines
- return ( callback ? callback ( this ) : false );
- },
-
- /**
- * Basic initialization routine, usually to create markup, new objects and attributes, etc.
- * Overrides/Extends this prototype method to do your mojo.
- *
- * @method _init
- * @protected
- */
- _init: function () {
- Y.log ('Init bootstrap', 'info', 'bootstrap');
- },
-
- /**
- * Defines the binding logic for the bootstrap engine, listening for some attributes
- * that might change, and defining the set of events that can be exposed to the injection engine.
- * Overrides/Extends this prototype method to do your mojo.
- *
- * @method _bind
- * @protected
- */
- _bind: function () {
- Y.log ('Binding bootstrap', 'info', 'bootstrap');
- },
-
- /**
- * This method will be called only if the connect response with "true", you can use this
- * to control the state of the initialization from the injection engine since it might
- * take some time to load the stuff in the iframe, and the user might interact with the page
- * invalidating the initialization routine.
- * Overrides/Extends this prototype method to do your mojo.
- *
- * @method _ready
- * @protected
- */
- _ready : function () {
- Y.log ('Bootstrap is ready', 'info', 'bootstrap');
- },
-
- /**
- * The iframe that holds the bootstrap engine sometimes is used as a UI overlay.
- * In this case, you can style it through this method. By default, it will set
- * border, frameBorder, marginWidth, marginHeight, leftMargin and topMargin to
- * cero, and allowTransparency to true.
- *
- * @method _styleIframe
- * @protected
- */
- _styleIframe: function () {
- var iframe = this.get('iframe');
- // making the iframe optional to facilitate tests
- if (iframe) {
- Y.log ('Styling the iframe', 'info', 'bootstrap');
- Y.each (['border', 'marginWidth', 'marginHeight', 'leftMargin', 'topMargin'], function (name) {
- iframe.setAttribute(name, 0);
- });
- }
- }
-
-});
-
-Y.BootstrapEngine = BootstrapEngine;
-
-
-}, '@VERSION@' ,{requires:['node','base-base']});
diff --git a/theme/bootstrapbase/yui/src/bootstrap/meta/bootstrap.json b/theme/bootstrapbase/yui/src/bootstrap/meta/bootstrap.json
deleted file mode 100644
index a82a4600a87..00000000000
--- a/theme/bootstrapbase/yui/src/bootstrap/meta/bootstrap.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "moodle-theme_bootstrapbase-bootstrap": {
- "requires": [
- "node",
- "selector-css3"
- ]
- }
-}
diff --git a/theme/clean/layout/columns3.php b/theme/clean/layout/columns3.php
index 742acf91957..50536699ce6 100644
--- a/theme/clean/layout/columns3.php
+++ b/theme/clean/layout/columns3.php
@@ -63,7 +63,7 @@ echo $OUTPUT->doctype() ?>
shortname, true, array('context' => context_course::instance(SITEID)));
?>
-
+