Reindent code by 2 spaces, instead of 4

This commit is contained in:
Tautvidas Sipavičius
2015-08-27 13:50:05 +03:00
parent 21a4843a48
commit e6d59496eb
72 changed files with 7216 additions and 7264 deletions

View File

@ -1,28 +1,27 @@
var fs = require('fs');
module.exports = {
loadFileToContainer: function (path, window, containerTagName, options) {
var contents = fs.readFileSync(path),
container = window.document.createElement(containerTagName);
options = options || {};
container.innerHTML = contents;
loadFileToContainer: function (path, window, containerTagName, options) {
var contents = fs.readFileSync(path),
container = window.document.createElement(containerTagName);
options = options || {};
container.innerHTML = contents;
if (options.type) {
container.type = options.type;
}
if (options.id) {
container.id = options.id;
}
global.window.document.body.appendChild(container);
},
loadScript: function (scriptPath, window, options) {
this.loadFileToContainer(scriptPath, window, 'script', options);
},
loadTemplate: function (path, window, options) {
var w = window || global.window;
options = options || {};
options.type = "text/x-handlebars-template";
if (options.type) {
container.type = options.type;
}
if (options.id) {
container.id = options.id;
}
global.window.document.body.appendChild(container);
},
loadScript: function (scriptPath, window, options) {
this.loadFileToContainer(scriptPath, window, 'script', options);
},
loadTemplate: function (path, window, options) {
var w = window || global.window;
options = options || {};
options.type = "text/x-handlebars-template";
this.loadScript("views/newsletter/templates/" + path, w, options);
},
this.loadScript("views/newsletter/templates/" + path, w, options);
},
};