diff --git a/js/main.js b/js/main.js index 4e2d2d21..e1a13d8a 100644 --- a/js/main.js +++ b/js/main.js @@ -326,7 +326,7 @@ var MM = (function() { * return array - Filtered collection of modules. */ var exceptWithClass = function(className) { - return modulesByClass(className, false); + return modulesByClass(className, false); }; /* modulesByClass(className, include) @@ -338,27 +338,27 @@ var MM = (function() { * return array - Filtered collection of modules. */ var modulesByClass = function(className, include) { - var searchClasses = className; - if (typeof className === "string") { - searchClasses = className.split(" "); - } + var searchClasses = className; + if (typeof className === "string") { + searchClasses = className.split(" "); + } - var newModules = modules.filter(function(module) { - var classes = module.data.classes.toLowerCase().split(" "); + var newModules = modules.filter(function(module) { + var classes = module.data.classes.toLowerCase().split(" "); - for (var c in searchClasses) { - var searchClass = searchClasses[c]; - if (classes.indexOf(searchClass.toLowerCase()) !== -1) { - return include; - } - } + for (var c in searchClasses) { + var searchClass = searchClasses[c]; + if (classes.indexOf(searchClass.toLowerCase()) !== -1) { + return include; + } + } - return !include; - }); + return !include; + }); - setSelectionMethodsForModules(newModules); - return newModules; - }; + setSelectionMethodsForModules(newModules); + return newModules; + }; /* exceptModule(module) * Removes a module instance from the collection. diff --git a/js/module.js b/js/module.js index ffe49416..457b9772 100644 --- a/js/module.js +++ b/js/module.js @@ -203,7 +203,7 @@ var Module = Class.extend({ * argument callback function - Function called when done. */ loadStyles: function (callback) { - this.loadDependencies("getStyles", callback); + this.loadDependencies("getStyles", callback); }, /* loadScripts() @@ -221,24 +221,24 @@ var Module = Class.extend({ * argument funcName string - Function name to call to get scripts or styles. * argument callback function - Function called when done. */ - loadDependencies: function (funcName, callback) { - var self = this; - var dependencies = this[funcName](); + loadDependencies: function (funcName, callback) { + var self = this; + var dependencies = this[funcName](); - var loadNextDependency = function () { - if (dependencies.length > 0) { - var nextDependency = dependencies[0]; - Loader.loadFile(nextDependency, self, function () { - dependencies = dependencies.slice(1); - loadNextDependency(); - }); - } else { - callback(); - } - }; + var loadNextDependency = function () { + if (dependencies.length > 0) { + var nextDependency = dependencies[0]; + Loader.loadFile(nextDependency, self, function () { + dependencies = dependencies.slice(1); + loadNextDependency(); + }); + } else { + callback(); + } + }; - loadNextDependency(); - }, + loadNextDependency(); + }, /* loadScripts() * Load all required scripts by requesting the MM object to load the files. diff --git a/modules/default/calendar/calendar.js b/modules/default/calendar/calendar.js index 70352885..19440998 100644 --- a/modules/default/calendar/calendar.js +++ b/modules/default/calendar/calendar.js @@ -332,7 +332,7 @@ Module.register("calendar", { * return string - The Symbol */ symbolForUrl: function (url) { - return this.getCalendarProperty(url, "symbol", this.config.defaultSymbol); + return this.getCalendarProperty(url, "symbol", this.config.defaultSymbol); }, /* colorForUrl(url) @@ -343,7 +343,7 @@ Module.register("calendar", { * return string - The Color */ colorForUrl: function (url) { - return this.getCalendarProperty(url, "color", "#fff"); + return this.getCalendarProperty(url, "color", "#fff"); }, /* countTitleForUrl(url) @@ -367,14 +367,14 @@ Module.register("calendar", { * return string - The Property */ getCalendarProperty: function (url, property, defaultValue) { - for (var c in this.config.calendars) { - var calendar = this.config.calendars[c]; - if (calendar.url === url && typeof calendar[property] === "string") { - return calendar[property]; - } - } + for (var c in this.config.calendars) { + var calendar = this.config.calendars[c]; + if (calendar.url === url && typeof calendar[property] === "string") { + return calendar[property]; + } + } - return defaultValue; + return defaultValue; }, /* shorten(string, maxLength) diff --git a/modules/default/clock/clock.js b/modules/default/clock/clock.js index 6824ae8f..b1439a5d 100644 --- a/modules/default/clock/clock.js +++ b/modules/default/clock/clock.js @@ -76,9 +76,9 @@ Module.register("clock",{ } var hourSymbol = "HH"; - if (this.config.timeFormat !== 24) { - hourSymbol = "h"; - } + if (this.config.timeFormat !== 24) { + hourSymbol = "h"; + } if (this.config.clockBold === true) { timeString = now.format(hourSymbol + "[]mm[]"); @@ -199,17 +199,17 @@ Module.register("clock",{ digitalWrapper.appendChild(timeWrapper); var appendClocks = function(condition, pos1, pos2) { - var padding = [0,0,0,0]; - padding[(placement === condition) ? pos1 : pos2] = "20px"; - analogWrapper.style.padding = padding.join(" "); - if (placement === condition) { - wrapper.appendChild(analogWrapper); - wrapper.appendChild(digitalWrapper); - } else { - wrapper.appendChild(digitalWrapper); - wrapper.appendChild(analogWrapper); - } - } + var padding = [0,0,0,0]; + padding[(placement === condition) ? pos1 : pos2] = "20px"; + analogWrapper.style.padding = padding.join(" "); + if (placement === condition) { + wrapper.appendChild(analogWrapper); + wrapper.appendChild(digitalWrapper); + } else { + wrapper.appendChild(digitalWrapper); + wrapper.appendChild(analogWrapper); + } + }; if (placement === "left" || placement === "right") { digitalWrapper.style.display = "inline-block"; @@ -220,7 +220,7 @@ Module.register("clock",{ } else { digitalWrapper.style.textAlign = "center"; - appendClocks("top", 2, 0); + appendClocks("top", 2, 0); } }