Renaming all WSK to MDL

master
Jonathan Garbee 2015-04-24 07:37:28 -04:00
parent 97fd0c3a42
commit 86cb3f2e28
17 changed files with 60 additions and 60 deletions

View File

@ -15,8 +15,8 @@
*/ */
/** /**
* Class constructor for Animation WSK component. * Class constructor for Animation MDL component.
* Implements WSK component design pattern defined at: * Implements MDL component design pattern defined at:
* https://github.com/jasonmayes/mdl-component-design-pattern * https://github.com/jasonmayes/mdl-component-design-pattern
* @param {HTMLElement} element The element that will be upgraded. * @param {HTMLElement} element The element that will be upgraded.
*/ */

View File

@ -15,8 +15,8 @@
*/ */
/** /**
* Class constructor for Button WSK component. * Class constructor for Button MDL component.
* Implements WSK component design pattern defined at: * Implements MDL component design pattern defined at:
* https://github.com/jasonmayes/mdl-component-design-pattern * https://github.com/jasonmayes/mdl-component-design-pattern
* @param {HTMLElement} element The element that will be upgraded. * @param {HTMLElement} element The element that will be upgraded.
*/ */

View File

@ -15,8 +15,8 @@
*/ */
/** /**
* Class constructor for Checkbox WSK component. * Class constructor for Checkbox MDL component.
* Implements WSK component design pattern defined at: * Implements MDL component design pattern defined at:
* https://github.com/jasonmayes/mdl-component-design-pattern * https://github.com/jasonmayes/mdl-component-design-pattern
* @param {HTMLElement} element The element that will be upgraded. * @param {HTMLElement} element The element that will be upgraded.
*/ */

View File

@ -15,8 +15,8 @@
*/ */
/** /**
* Class constructor for Column Layout WSK component. * Class constructor for Column Layout MDL component.
* Implements WSK component design pattern defined at: * Implements MDL component design pattern defined at:
* https://github.com/jasonmayes/mdl-component-design-pattern * https://github.com/jasonmayes/mdl-component-design-pattern
* @param {HTMLElement} element The element that will be upgraded. * @param {HTMLElement} element The element that will be upgraded.
*/ */

View File

@ -15,8 +15,8 @@
*/ */
/** /**
* Class constructor for icon toggle WSK component. * Class constructor for icon toggle MDL component.
* Implements WSK component design pattern defined at: * Implements MDL component design pattern defined at:
* https://github.com/jasonmayes/mdl-component-design-pattern * https://github.com/jasonmayes/mdl-component-design-pattern
* @param {HTMLElement} element The element that will be upgraded. * @param {HTMLElement} element The element that will be upgraded.
*/ */

View File

@ -15,8 +15,8 @@
*/ */
/** /**
* Class constructor for Layout WSK component. * Class constructor for Layout MDL component.
* Implements WSK component design pattern defined at: * Implements MDL component design pattern defined at:
* https://github.com/jasonmayes/mdl-component-design-pattern * https://github.com/jasonmayes/mdl-component-design-pattern
* @param {HTMLElement} element The element that will be upgraded. * @param {HTMLElement} element The element that will be upgraded.
*/ */

View File

@ -143,7 +143,7 @@ var componentHandler = (function() {
/** /**
* Allows user to be alerted to any upgrades that are performed for a given * Allows user to be alerted to any upgrades that are performed for a given
* component type * component type
* @param {string} jsClass The class name of the WSK component we wish * @param {string} jsClass The class name of the MDL component we wish
* to hook into for any upgrades performed. * to hook into for any upgrades performed.
* @param {function} callback The function to call upon an upgrade. This * @param {function} callback The function to call upon an upgrade. This
* function should expect 1 parameter - the HTMLElement which got upgraded. * function should expect 1 parameter - the HTMLElement which got upgraded.
@ -184,7 +184,7 @@ window.addEventListener('load', function() {
/** /**
* Performs a "Cutting the mustard" test. If the browser supports the features * Performs a "Cutting the mustard" test. If the browser supports the features
* tested, adds a mdl-js class to the <html> element. It then upgrades all WSK * 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 &&

View File

@ -15,8 +15,8 @@
*/ */
/** /**
* Class constructor for dropdown WSK component. * Class constructor for dropdown MDL component.
* Implements WSK component design pattern defined at: * Implements MDL component design pattern defined at:
* https://github.com/jasonmayes/mdl-component-design-pattern * https://github.com/jasonmayes/mdl-component-design-pattern
* @param {HTMLElement} element The element that will be upgraded. * @param {HTMLElement} element The element that will be upgraded.
*/ */

View File

@ -15,8 +15,8 @@
*/ */
/** /**
* Class constructor for Progress WSK component. * Class constructor for Progress MDL component.
* Implements WSK component design pattern defined at: * Implements MDL component design pattern defined at:
* https://github.com/jasonmayes/mdl-component-design-pattern * https://github.com/jasonmayes/mdl-component-design-pattern
* @param {HTMLElement} element The element that will be upgraded. * @param {HTMLElement} element The element that will be upgraded.
*/ */

View File

@ -15,8 +15,8 @@
*/ */
/** /**
* Class constructor for Radio WSK component. * Class constructor for Radio MDL component.
* Implements WSK component design pattern defined at: * Implements MDL component design pattern defined at:
* https://github.com/jasonmayes/mdl-component-design-pattern * https://github.com/jasonmayes/mdl-component-design-pattern
* @param {HTMLElement} element The element that will be upgraded. * @param {HTMLElement} element The element that will be upgraded.
*/ */

View File

@ -15,8 +15,8 @@
*/ */
/** /**
* Class constructor for Ripple WSK component. * Class constructor for Ripple MDL component.
* Implements WSK component design pattern defined at: * Implements MDL component design pattern defined at:
* https://github.com/jasonmayes/mdl-component-design-pattern * https://github.com/jasonmayes/mdl-component-design-pattern
* @param {HTMLElement} element The element that will be upgraded. * @param {HTMLElement} element The element that will be upgraded.
*/ */

View File

@ -15,8 +15,8 @@
*/ */
/** /**
* Class constructor for Slider WSK component. * Class constructor for Slider MDL component.
* Implements WSK component design pattern defined at: * Implements MDL component design pattern defined at:
* https://github.com/jasonmayes/mdl-component-design-pattern * https://github.com/jasonmayes/mdl-component-design-pattern
* @param {HTMLElement} element The element that will be upgraded. * @param {HTMLElement} element The element that will be upgraded.
*/ */

View File

@ -15,8 +15,8 @@
*/ */
/** /**
* Class constructor for Spinner WSK component. * Class constructor for Spinner MDL component.
* Implements WSK component design pattern defined at: * Implements MDL component design pattern defined at:
* https://github.com/jasonmayes/mdl-component-design-pattern * https://github.com/jasonmayes/mdl-component-design-pattern
* @param {HTMLElement} element The element that will be upgraded. * @param {HTMLElement} element The element that will be upgraded.
*/ */
@ -35,7 +35,7 @@ function MaterialSpinner(element) {
* @private * @private
*/ */
MaterialSpinner.prototype.Constant_ = { MaterialSpinner.prototype.Constant_ = {
WSK_SPINNER_LAYER_COUNT: 4 MDL_SPINNER_LAYER_COUNT: 4
}; };
/** /**
@ -46,12 +46,12 @@ MaterialSpinner.prototype.Constant_ = {
* @private * @private
*/ */
MaterialSpinner.prototype.CssClasses_ = { MaterialSpinner.prototype.CssClasses_ = {
WSK_SPINNER_LAYER: 'mdl-spinner__layer', MDL_SPINNER_LAYER: 'mdl-spinner__layer',
WSK_SPINNER_CIRCLE_CLIPPER: 'mdl-spinner__circle-clipper', MDL_SPINNER_CIRCLE_CLIPPER: 'mdl-spinner__circle-clipper',
WSK_SPINNER_CIRCLE: 'mdl-spinner__circle', MDL_SPINNER_CIRCLE: 'mdl-spinner__circle',
WSK_SPINNER_GAP_PATCH: 'mdl-spinner__gap-patch', MDL_SPINNER_GAP_PATCH: 'mdl-spinner__gap-patch',
WSK_SPINNER_LEFT: 'mdl-spinner__left', MDL_SPINNER_LEFT: 'mdl-spinner__left',
WSK_SPINNER_RIGHT: 'mdl-spinner__right' MDL_SPINNER_RIGHT: 'mdl-spinner__right'
}; };
/** /**
@ -61,25 +61,25 @@ MaterialSpinner.prototype.createLayer = function(index) {
'use strict'; 'use strict';
var layer = document.createElement('div'); var layer = document.createElement('div');
layer.classList.add(this.CssClasses_.WSK_SPINNER_LAYER); layer.classList.add(this.CssClasses_.MDL_SPINNER_LAYER);
layer.classList.add(this.CssClasses_.WSK_SPINNER_LAYER + '-' + index); layer.classList.add(this.CssClasses_.MDL_SPINNER_LAYER + '-' + index);
var leftClipper = document.createElement('div'); var leftClipper = document.createElement('div');
leftClipper.classList.add(this.CssClasses_.WSK_SPINNER_CIRCLE_CLIPPER); leftClipper.classList.add(this.CssClasses_.MDL_SPINNER_CIRCLE_CLIPPER);
leftClipper.classList.add(this.CssClasses_.WSK_SPINNER_LEFT); leftClipper.classList.add(this.CssClasses_.MDL_SPINNER_LEFT);
var gapPatch = document.createElement('div'); var gapPatch = document.createElement('div');
gapPatch.classList.add(this.CssClasses_.WSK_SPINNER_GAP_PATCH); gapPatch.classList.add(this.CssClasses_.MDL_SPINNER_GAP_PATCH);
var rightClipper = document.createElement('div'); var rightClipper = document.createElement('div');
rightClipper.classList.add(this.CssClasses_.WSK_SPINNER_CIRCLE_CLIPPER); rightClipper.classList.add(this.CssClasses_.MDL_SPINNER_CIRCLE_CLIPPER);
rightClipper.classList.add(this.CssClasses_.WSK_SPINNER_RIGHT); rightClipper.classList.add(this.CssClasses_.MDL_SPINNER_RIGHT);
var circleOwners = [leftClipper, gapPatch, rightClipper]; var circleOwners = [leftClipper, gapPatch, rightClipper];
for (var i = 0; i < circleOwners.length; i++) { for (var i = 0; i < circleOwners.length; i++) {
var circle = document.createElement('div'); var circle = document.createElement('div');
circle.classList.add(this.CssClasses_.WSK_SPINNER_CIRCLE); circle.classList.add(this.CssClasses_.MDL_SPINNER_CIRCLE);
circleOwners[i].appendChild(circle); circleOwners[i].appendChild(circle);
} }
@ -120,7 +120,7 @@ MaterialSpinner.prototype.init = function() {
'use strict'; 'use strict';
if (this.element_) { if (this.element_) {
for (var i = 1; i <= this.Constant_.WSK_SPINNER_LAYER_COUNT; i++) { for (var i = 1; i <= this.Constant_.MDL_SPINNER_LAYER_COUNT; i++) {
this.createLayer(i); this.createLayer(i);
} }

View File

@ -15,8 +15,8 @@
*/ */
/** /**
* Class constructor for Checkbox WSK component. * Class constructor for Checkbox MDL component.
* Implements WSK component design pattern defined at: * Implements MDL component design pattern defined at:
* https://github.com/jasonmayes/mdl-component-design-pattern * https://github.com/jasonmayes/mdl-component-design-pattern
* @param {HTMLElement} element The element that will be upgraded. * @param {HTMLElement} element The element that will be upgraded.
*/ */

View File

@ -15,8 +15,8 @@
*/ */
/** /**
* Class constructor for Tabs WSK component. * Class constructor for Tabs MDL component.
* Implements WSK component design pattern defined at: * Implements MDL component design pattern defined at:
* https://github.com/jasonmayes/mdl-component-design-pattern * https://github.com/jasonmayes/mdl-component-design-pattern
* @param {HTMLElement} element The element that will be upgraded. * @param {HTMLElement} element The element that will be upgraded.
*/ */
@ -52,10 +52,10 @@ MaterialTabs.prototype.CssClasses_ = {
ACTIVE_CLASS: 'is-active', ACTIVE_CLASS: 'is-active',
UPGRADED_CLASS: 'is-upgraded', UPGRADED_CLASS: 'is-upgraded',
WSK_JS_RIPPLE_EFFECT: 'mdl-js-ripple-effect', MDL_JS_RIPPLE_EFFECT: 'mdl-js-ripple-effect',
WSK_RIPPLE_CONTAINER: 'mdl-tabs__ripple-container', MDL_RIPPLE_CONTAINER: 'mdl-tabs__ripple-container',
WSK_RIPPLE: 'mdl-ripple', MDL_RIPPLE: 'mdl-ripple',
WSK_JS_RIPPLE_EFFECT_IGNORE_EVENTS: 'mdl-js-ripple-effect--ignore-events' MDL_JS_RIPPLE_EFFECT_IGNORE_EVENTS: 'mdl-js-ripple-effect--ignore-events'
}; };
/** /**
@ -65,9 +65,9 @@ MaterialTabs.prototype.CssClasses_ = {
MaterialTabs.prototype.initTabs_ = function(e) { MaterialTabs.prototype.initTabs_ = function(e) {
'use strict'; 'use strict';
if (this.element_.classList.contains(this.CssClasses_.WSK_JS_RIPPLE_EFFECT)) { if (this.element_.classList.contains(this.CssClasses_.MDL_JS_RIPPLE_EFFECT)) {
this.element_.classList.add( this.element_.classList.add(
this.CssClasses_.WSK_JS_RIPPLE_EFFECT_IGNORE_EVENTS); this.CssClasses_.MDL_JS_RIPPLE_EFFECT_IGNORE_EVENTS);
} }
// Select element tabs, document panels // Select element tabs, document panels
@ -119,12 +119,12 @@ function MaterialTab(tab, ctx) {
'use strict'; 'use strict';
if (tab) { if (tab) {
if (ctx.element_.classList.contains(ctx.CssClasses_.WSK_JS_RIPPLE_EFFECT)) { if (ctx.element_.classList.contains(ctx.CssClasses_.MDL_JS_RIPPLE_EFFECT)) {
var rippleContainer = document.createElement('span'); var rippleContainer = document.createElement('span');
rippleContainer.classList.add(ctx.CssClasses_.WSK_RIPPLE_CONTAINER); rippleContainer.classList.add(ctx.CssClasses_.MDL_RIPPLE_CONTAINER);
rippleContainer.classList.add(ctx.CssClasses_.WSK_JS_RIPPLE_EFFECT); rippleContainer.classList.add(ctx.CssClasses_.MDL_JS_RIPPLE_EFFECT);
var ripple = document.createElement('span'); var ripple = document.createElement('span');
ripple.classList.add(ctx.CssClasses_.WSK_RIPPLE); ripple.classList.add(ctx.CssClasses_.MDL_RIPPLE);
rippleContainer.appendChild(ripple); rippleContainer.appendChild(ripple);
tab.appendChild(rippleContainer); tab.appendChild(rippleContainer);
} }

View File

@ -15,8 +15,8 @@
*/ */
/** /**
* Class constructor for Textfield WSK component. * Class constructor for Textfield MDL component.
* Implements WSK component design pattern defined at: * Implements MDL component design pattern defined at:
* https://github.com/jasonmayes/mdl-component-design-pattern * https://github.com/jasonmayes/mdl-component-design-pattern
* @param {HTMLElement} element The element that will be upgraded. * @param {HTMLElement} element The element that will be upgraded.
*/ */

View File

@ -15,8 +15,8 @@
*/ */
/** /**
* Class constructor for Tooltip WSK component. * Class constructor for Tooltip MDL component.
* Implements WSK component design pattern defined at: * Implements MDL component design pattern defined at:
* https://github.com/jasonmayes/mdl-component-design-pattern * https://github.com/jasonmayes/mdl-component-design-pattern
* @param {HTMLElement} element The element that will be upgraded. * @param {HTMLElement} element The element that will be upgraded.
*/ */