зеркало из https://github.com/mozilla/buddyup.git
fixup
This commit is contained in:
Родитель
b052189435
Коммит
6f191663ac
|
@ -30,8 +30,9 @@
|
|||
<script src="js/libs/i18n.js" defer></script>
|
||||
<script src="js/libs/font_size_utils.js" defer></script>
|
||||
<script src="js/utils.js" defer></script>
|
||||
<script src="js/libs/nunjucks.js" defer></script>
|
||||
<script src="js/libs/nunjucks-slim.js" defer></script>
|
||||
<script src="js/templates.js" defer></script>
|
||||
<script src="js/nunjucks_env.js" defer></script>
|
||||
<script src="js/loader.js" defer></script>
|
||||
|
||||
<script src="js/libs/lodash.custom.min.js"></script>
|
||||
|
|
|
@ -44,8 +44,5 @@
|
|||
};
|
||||
|
||||
exports.AuthenticationController = AuthenticationController;
|
||||
|
||||
document.addEventListener('initialize', function() {
|
||||
AuthenticationController.init();
|
||||
});
|
||||
AuthenticationController.init();
|
||||
})(window);
|
||||
|
|
|
@ -64,8 +64,5 @@
|
|||
};
|
||||
|
||||
exports.EmailConfirmationController = EmailConfirmationController;
|
||||
|
||||
document.addEventListener('initialize', function() {
|
||||
EmailConfirmationController.init();
|
||||
});
|
||||
EmailConfirmationController.init();
|
||||
})(window);
|
||||
|
|
|
@ -32,8 +32,5 @@
|
|||
};
|
||||
|
||||
exports.ErrorController = ErrorController;
|
||||
|
||||
document.addEventListener('initialize', function() {
|
||||
ErrorController.init();
|
||||
});
|
||||
ErrorController.init();
|
||||
})(window);
|
||||
|
|
|
@ -66,8 +66,5 @@
|
|||
};
|
||||
|
||||
exports.HelperProfileController = HelperProfileController;
|
||||
|
||||
document.addEventListener('initialize', function() {
|
||||
HelperProfileController.init();
|
||||
});
|
||||
HelperProfileController.init();
|
||||
})(window);
|
||||
|
|
|
@ -32,8 +32,5 @@
|
|||
};
|
||||
|
||||
exports.HomeController = HomeController;
|
||||
|
||||
document.addEventListener('initialize', function() {
|
||||
HomeController.init();
|
||||
});
|
||||
HomeController.init();
|
||||
})(window);
|
||||
|
|
|
@ -1,23 +1,17 @@
|
|||
'use strict';
|
||||
|
||||
/* global gettext, nunjucks */
|
||||
/* global nunjucksEnv */
|
||||
|
||||
(function(exports) {
|
||||
var Loader = {
|
||||
init: function() {
|
||||
var env = new nunjucks.Environment();
|
||||
env.addGlobal('_', gettext);
|
||||
|
||||
var elems = document.querySelectorAll('[data-template]');
|
||||
|
||||
for (var i=0; i < elems.length; i++) {
|
||||
var elem = elems[i];
|
||||
var html = nunjucks.render(elem.dataset.template);
|
||||
var html = nunjucksEnv.render(elem.dataset.template);
|
||||
elem.innerHTML = html;
|
||||
}
|
||||
|
||||
var event = new Event('initialize');
|
||||
document.dispatchEvent(event);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -41,8 +41,5 @@
|
|||
};
|
||||
|
||||
exports.LoadingIndicator = LoadingIndicator;
|
||||
|
||||
document.addEventListener('initialize', function() {
|
||||
LoadingIndicator.init();
|
||||
});
|
||||
LoadingIndicator.init();
|
||||
})(window);
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
'use strict';
|
||||
|
||||
/* global nunjucks */
|
||||
/* global gettext, nunjucks */
|
||||
|
||||
(function() {
|
||||
(function(exports) {
|
||||
var loader = new nunjucks.WebLoader('/views');
|
||||
window.nunjucksEnv = new nunjucks.Environment(loader, {autoescape: true});
|
||||
})();
|
||||
|
||||
var nunjucksEnv = new nunjucks.Environment(loader, {autoescape: true});
|
||||
nunjucksEnv.addGlobal('_', gettext);
|
||||
|
||||
exports.nunjucksEnv = nunjucksEnv;
|
||||
})(window);
|
||||
|
|
|
@ -13,8 +13,5 @@
|
|||
};
|
||||
|
||||
exports.OldVersionsController = OldVersionsController;
|
||||
|
||||
document.addEventListener('initialize', function() {
|
||||
OldVersionsController.init();
|
||||
});
|
||||
OldVersionsController.init();
|
||||
})(window);
|
||||
|
|
|
@ -34,9 +34,5 @@
|
|||
};
|
||||
|
||||
exports.PasswordResetController = PasswordResetController;
|
||||
|
||||
document.addEventListener('initialize', function() {
|
||||
PasswordResetController.init();
|
||||
});
|
||||
|
||||
PasswordResetController.init();
|
||||
})(window);
|
||||
|
|
|
@ -105,9 +105,5 @@
|
|||
};
|
||||
|
||||
exports.ProfileController = ProfileController;
|
||||
|
||||
document.addEventListener('initialize', function() {
|
||||
ProfileController.init();
|
||||
});
|
||||
|
||||
ProfileController.init();
|
||||
})(window);
|
||||
|
|
|
@ -558,9 +558,5 @@
|
|||
}
|
||||
};
|
||||
exports.QuestionController = QuestionController;
|
||||
|
||||
document.addEventListener('initialize', function() {
|
||||
QuestionController.init();
|
||||
});
|
||||
|
||||
QuestionController.init();
|
||||
})(window);
|
||||
|
|
|
@ -221,9 +221,5 @@
|
|||
};
|
||||
|
||||
exports.QuestionsController = QuestionsController;
|
||||
|
||||
document.addEventListener('initialize', function() {
|
||||
QuestionsController.init();
|
||||
});
|
||||
|
||||
QuestionsController.init();
|
||||
})(window);
|
||||
|
|
|
@ -49,9 +49,5 @@
|
|||
};
|
||||
|
||||
exports.RegisterationController = RegistrationController;
|
||||
|
||||
document.addEventListener('initialize', function() {
|
||||
RegistrationController.init();
|
||||
});
|
||||
|
||||
RegistrationController.init();
|
||||
})(window);
|
||||
|
|
|
@ -20,8 +20,5 @@
|
|||
};
|
||||
|
||||
exports.UnsupportedLocaleController = UnsupportedLocaleController;
|
||||
|
||||
document.addEventListener('initialize', function() {
|
||||
UnsupportedLocaleController.init();
|
||||
});
|
||||
UnsupportedLocaleController.init();
|
||||
})(window);
|
||||
|
|
|
@ -25,8 +25,9 @@
|
|||
|
||||
<script src="js/load_translations.js"></script>
|
||||
<script src="js/i18n.js" defer></script>
|
||||
<script src="js/libs/nunjucks.js" defer></script>
|
||||
<script src="js/libs/nunjucks-slim.js" defer></script>
|
||||
<script src="js/templates.js" defer></script>
|
||||
<script src="js/nunjucks_env.js" defer></script>
|
||||
<script src="js/libs/font_size_utils.js" defer></script>
|
||||
<script src="js/settings.js"></script>
|
||||
<script src="js/loader.js"></script>
|
||||
|
|
|
@ -27,8 +27,9 @@
|
|||
|
||||
<script src="js/load_translations.js"></script>
|
||||
<script src="js/i18n.js"></script>
|
||||
<script src="js/libs/nunjucks.js" defer></script>
|
||||
<script src="js/libs/nunjucks-slim.js" defer></script>
|
||||
<script src="js/templates.js" defer></script>
|
||||
<script src="js/nunjucks_env.js" defer></script>
|
||||
<script src="js/loader.js"></script>
|
||||
<script src="js/old_versions_controller.js"></script>
|
||||
</body>
|
||||
|
|
|
@ -28,8 +28,9 @@
|
|||
|
||||
<script src="js/load_translations.js"></script>
|
||||
<script src="js/i18n.js.js" defer></script>
|
||||
<script src="js/libs/nunjucks.js" defer></script>
|
||||
<script src="js/libs/nunjucks-slim.js" defer></script>
|
||||
<script src="js/templates.js" defer></script>
|
||||
<script src="js/nunjucks_env.js" defer></script>
|
||||
<script src="js/libs/font_size_utils.js" defer></script>
|
||||
<script src="js/utils.js" defer></script>
|
||||
<script src="js/loader.js" defer></script>
|
||||
|
|
Загрузка…
Ссылка в новой задаче