MDL-38016 Theme Bootstrap - Add license information to lib/thirdpartylibs.xml

Also minor formatting cleanup.
This commit is contained in:
Damyon Wiese
2013-04-03 09:43:18 +08:00
parent 8903b17b01
commit c985d1217c
10 changed files with 82 additions and 46 deletions
+35
View File
@@ -273,4 +273,39 @@
<version>1.0</version>
<licenseversion>3.0+</licenseversion>
</library>
<library>
<location>theme/bootstrap/less/bootstrap</location>
<name>Twitter Bootstrap</name>
<license>Apache</license>
<version>2.3.0</version>
<licenseversion>2.0</licenseversion>
</library>
<library>
<location>theme/bootstrap/javascript/html5shiv.js</location>
<name>Html5Shiv</name>
<license>Apache</license>
<version>3.6.2</version>
<licenseversion>2.0</licenseversion>
</library>
<library>
<location>theme/bootstrap/javascript/bootstrapcollapse.js</location>
<name>Gallery Bootstrap Collapse</name>
<license>BSD</license>
<version>2012.08.22-20-00</version>
<licenseversion></licenseversion>
</library>
<library>
<location>theme/bootstrap/javascript/bootstrapdropdown.js</location>
<name>Gallery Bootstrap Dropdown</name>
<license>BSD</license>
<version>2012.08.22-20-00</version>
<licenseversion></licenseversion>
</library>
<library>
<location>theme/bootstrap/javascript/bootstrapengine.js</location>
<name>Gallery Bootstrap Engine</name>
<license>BSD</license>
<version>2012.08.22-20-00</version>
<licenseversion></licenseversion>
</library>
</libraries>
+1 -3
View File
@@ -51,7 +51,6 @@ headercollapse.js
Workaround for the collapse button on the Moodle custom menu. Without this
Submenu items cannot be opened
Updating Twitter bootstrap and Libraries
========================================
@@ -96,7 +95,6 @@ javascript/bootstrap-collapse.js
javascript/bootstrap-dropdown.js
javascript/bootstrap-engine.js
Licenses & Authors
==================
@@ -148,4 +146,4 @@ limitations under the License.
moodlebootstrap.js
------------------
Author: 2013 Bas Brands. www.sonsbeekmedia.nl
license: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
license: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+1 -2
View File
@@ -38,7 +38,6 @@ $THEME->supportscssoptimisation = false;
$THEME->editor_sheets = array('editor');
$THEME->plugins_exclude_sheets = array(
'block' => array(
'settings',
@@ -160,7 +159,7 @@ $THEME->javascripts = array(
'headercollapse',
);
if ( strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 8') || strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 7') ) {
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 8') || strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 7')) {
$THEME->javascripts[] = 'html5shiv';
}
+1 -1
View File
@@ -7,4 +7,4 @@ YUI().use('node', function(Y) {
this.toggleClass('active');
};
Y.delegate('click', toggleShow, Y.config.doc, '.btn-navbar');
});
});
@@ -5,7 +5,6 @@ YUI.add('gallery-bootstrap', function(Y) {
var NS = Y.namespace('Bootstrap');
NS.initializer = function(e) {
//console.log('initializer!');
NS.dropdown_delegation();
NS.expandable_delegation();
};
@@ -25,4 +24,4 @@ NS.expandable_delegation = function() {
Y.on('domready', NS.initializer);
}, '@VERSION@' ,{requires:[ 'gallery-bootstrap-dropdown', 'gallery-bootstrap-collapse', 'gallery-bootstrap-engine']});
;
;
+11 -11
View File
@@ -1,30 +1,30 @@
// strip down core bootstrap for editor
// Strip down core bootstrap for editor.
// Core variables and mixins
@import "bootstrap/variables.less"; // Modify this for custom colors, font-sizes, etc
// Core variables and mixins.
@import "bootstrap/variables.less"; // Modify this for custom colors, font-sizes, etc.
@import "bootstrap/mixins.less";
// CSS Reset
// CSS Reset.
@import "bootstrap/reset.less";
// Base CSS
// Base CSS.
@import "bootstrap/type.less";
@import "bootstrap/code.less";
@import "bootstrap/tables.less";
// Components: common
// Components: common.
@import "bootstrap/sprites.less";
@iconSpritePath: ~"[[pix:theme|glyphicons-halflings]]";
@iconWhiteSpritePath: ~"[[pix:theme|glyphicons-halflings-white]]";
@import "bootstrap/wells.less";
// Components: Buttons & Alerts
// Components: Buttons & Alerts.
@import "bootstrap/buttons.less";
@import "bootstrap/alerts.less"; // Note: alerts share common CSS with buttons and thus have styles in buttons.less
@import "bootstrap/alerts.less"; // Note: alerts share common CSS with buttons and thus have styles in buttons.less.
// Components: Misc
// Components: Misc.
@import "bootstrap/thumbnails.less";
@import "bootstrap/labels-badges.less";
// Utility classes
@import "bootstrap/utilities.less"; // Has to be last to override when necessary
// Utility classes.
@import "bootstrap/utilities.less"; // Has to be last to override when necessary.
+12 -11
View File
@@ -1,5 +1,6 @@
// Old Moodle stuff from base theme.
@import "moodle/core"; // Massive, needs broken up
// Massive, needs broken up.
@import "moodle/core";
@import "moodle/admin";
@import "moodle/calendar";
@import "moodle/course";
@@ -10,24 +11,24 @@
@import "moodle/user";
// Upstream Bootstrap
// Upstream Bootstrap.
@import "bootstrap/bootstrap";
// Set image location
// Set image location.
@iconSpritePath: ~"[[pix:theme|glyphicons-halflings]]";
@iconWhiteSpritePath: ~"[[pix:theme|glyphicons-halflings-white]]";
// Roll back nameclashes
// Roll back nameclashes.
@import "moodle/undo";
// extra padding for fixed nav
// needs to be between bootstrap/bootstrap and
// bootstrap/responsive
// Extra padding for fixed nav.
// Needs to be between bootstrap/bootstrap and
// bootstrap/responsive.
body {
padding-top: 60px;
}
// New Moodle stuff that builds on Bootstrap
// New Moodle stuff that builds on Bootstrap.
@import "moodle/blocks";
@import "moodle/forms";
@import "moodle/tabs";
@@ -36,14 +37,14 @@ body {
@import "moodle/tables";
@import "moodle/buttons";
// anything below this line is considered expendable,
// Anything below this line is considered expendable,
// so it doesn't matter if it doesn't show up in ie < 9
// though at current time (2013-03-13) the whole file is
// picked up in IE8, and IE9 fails at some point during the
// responsive section, cutting off the last 400 selectors.
// the following responsive imports are copied in
// from @import "bootstrap/responsive";
// The following responsive imports are copied in
// from "bootstrap/responsive".
@import "bootstrap/responsive-utilities.less";
@import "bootstrap/responsive-1200px-min.less";
@import "bootstrap/responsive-768px-979px.less";
+6 -4
View File
@@ -11,6 +11,7 @@ To update to the latest release of twitter bootstrap:
* remove all files from less/bootstrap,
* download the new less files and store them in less/bootstrap
* regenerate files using recess: recess --compile --compress moodle.less > ../style/generated.css **
* update lib/thirdpartylibs.xml
** If you want to make changes to the .css generated from these .less files then you
need to install recess (https://github.com/twitter/recess) to compile the .less files,
@@ -24,12 +25,13 @@ This library is available on:
https://github.com/aFarkas/html5shiv/blob/master/src/html5shiv.js
To update to the latest release of html5shiv download and replace:
javascript/html5shiv.js
To update to the latest release of html5shiv:
* download and replace: javascript/html5shiv.js
* update lib/thirdpartylibs.xml
bootstrapcollapse.js, bootstrapdropdown.js, bootstrapengine.js
--------------------------------------------------------------
This them uses YUI ports of the Twitter bootstrap jQuery based libs. These ported files are available on:
This theme uses YUI ports of the Twitter bootstrap jQuery based libs. These ported files are available on:
https://github.com/jshirley/yui3-gallery/blob/master/src/gallery-bootstrap-collapse/js/bootstrap-collapse.js
https://github.com/jshirley/yui3-gallery/blob/master/src/gallery-bootstrap-dropdown/js/bootstrap-dropdown.js
@@ -44,4 +46,4 @@ functionality consider switching to the original jQuery version of these file
If you do want to update use these file locations:
javascript/bootstrap-collapse.js
javascript/bootstrap-dropdown.js
javascript/bootstrap-engine.js
javascript/bootstrap-engine.js
+13 -9
View File
@@ -22,9 +22,12 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class theme_bootstrap_core_renderer extends core_renderer {
/*
* This renders a notification message.
* Uses bootstrap compatible html.
*/
public function notification($message, $classes = 'notifyproblem') {
$message = clean_text($message);
$type = '';
@@ -44,6 +47,10 @@ class theme_bootstrap_core_renderer extends core_renderer {
return "<div class=\"$type\">$message</div>";
}
/*
* This renders the navbar.
* Uses bootstrap compatible html.
*/
public function navbar() {
$items = $this->page->navbar->get_items();
foreach ($items as $item) {
@@ -55,11 +62,12 @@ class theme_bootstrap_core_renderer extends core_renderer {
$title = '<span class="accesshide">'.get_string('pagepath').'</span>';
return $title . "<ul class=\"breadcrumb\">$list_items</ul>";
}
/*
* Overriding the custom_menu function ensures the custom menu is
* always shown, even if no menu items are configured in the global
* theme settings page.
* We use the sitename as the first menu item
* We use the sitename as the first menu item.
*/
public function custom_menu($custommenuitems = '') {
global $CFG;
@@ -71,14 +79,11 @@ class theme_bootstrap_core_renderer extends core_renderer {
return $this->render_custom_menu($custommenu);
}
/*
* This renders the bootstrap top menu
*
* This renderer is needed to enable the Bootstrap style navigation
* This renders the bootstrap top menu.
*
* This renderer is needed to enable the Bootstrap style navigation.
*/
protected function render_custom_menu(custom_menu $menu) {
// If the menu has no children return an empty string.
if (!$menu->has_children()) {
@@ -112,9 +117,8 @@ class theme_bootstrap_core_renderer extends core_renderer {
/*
* This code renders the custom menu items for the
* bootstrap dropdown menu
* bootstrap dropdown menu.
*/
protected function render_custom_menu_item(custom_menu_item $menunode, $level = 0 ) {
static $submenucount = 0;
+1 -3
View File
@@ -27,7 +27,5 @@
defined('MOODLE_INTERNAL') || die;
$plugin->version = 2013032800;
$plugin->requires = 2012110900;
$plugin->maturity = MATURITY_STABLE;
$plugin->release = '2.0 (Build: 2013032800)';
$plugin->requires = 2012112900;
$plugin->component = 'theme_bootstrap';