Active state land for navigation states

* master:
  Remove CSS folder.
  Ripples shouldn't be widgets.
  Remove width on radios.
master
Addy Osmani 2015-05-31 16:13:56 -07:00
commit f1e6986ad1
7 changed files with 11 additions and 22942 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -104,8 +104,10 @@ var componentHandler = (function() {
callback(element); callback(element);
}); });
if (registeredClass.widget) {
// Assign per element instance for control over API // Assign per element instance for control over API
element.widget = instance; element.widget = instance;
}
} else { } else {
// If component creator forgot to register, try and see if // If component creator forgot to register, try and see if
// it is in global scope. // it is in global scope.
@ -129,6 +131,7 @@ var componentHandler = (function() {
'classConstructor': config.constructor, 'classConstructor': config.constructor,
'className': config.classAsString, 'className': config.classAsString,
'cssClass': config.cssClass, 'cssClass': config.cssClass,
'widget': config.widget === undefined ? true : config.widget,
'callbacks': [] 'callbacks': []
}; };
@ -166,7 +169,6 @@ var componentHandler = (function() {
} }
} }
// Now return the functions that should be made public with their publicly // Now return the functions that should be made public with their publicly
// facing names... // facing names...
return { return {
@ -178,7 +180,6 @@ var componentHandler = (function() {
}; };
})(); })();
window.addEventListener('load', function() { window.addEventListener('load', function() {
'use strict'; 'use strict';
@ -187,11 +188,13 @@ window.addEventListener('load', function() {
* tested, adds a mdl-js class to the <html> element. It then upgrades all MDL * tested, adds a mdl-js class to the <html> element. It then upgrades all MDL
* components requiring JavaScript. * components requiring JavaScript.
*/ */
if ('classList' in document.createElement('div') && 'querySelector' in document && if ('classList' in document.createElement('div') &&
'querySelector' in document &&
'addEventListener' in window && Array.prototype.forEach) { 'addEventListener' in window && Array.prototype.forEach) {
document.documentElement.classList.add('mdl-js'); document.documentElement.classList.add('mdl-js');
componentHandler.upgradeAllRegistered(); componentHandler.upgradeAllRegistered();
} else { } else {
componentHandler.upgradeElement = componentHandler.register = function () { }; componentHandler.upgradeElement =
componentHandler.register = function () { };
} }
}); });

View File

@ -25,7 +25,6 @@
display: inline-block; display: inline-block;
box-sizing: border-box; box-sizing: border-box;
width: 100%;
margin: 12px 0; margin: 12px 0;
padding-left: 0; padding-left: 0;

View File

@ -217,5 +217,6 @@ MaterialRipple.prototype.init = function() {
componentHandler.register({ componentHandler.register({
constructor: MaterialRipple, constructor: MaterialRipple,
classAsString: 'MaterialRipple', classAsString: 'MaterialRipple',
cssClass: 'mdl-js-ripple-effect' cssClass: 'mdl-js-ripple-effect',
widget: false
}); });