Fix #1639 logs error in mocha phantom js

This commit is contained in:
Nicolas Le Goff
2014-02-13 11:49:46 +01:00
parent db1a23fe34
commit fe2300e6ca
3 changed files with 16 additions and 4 deletions

View File

@@ -20,8 +20,8 @@ define([
"apps/admin/fields/views/fieldError",
"apps/admin/fields/errors/errorManager"
], function ($, _, Backbone, i18n, FieldsCollection, VocabulariesCollection, DcFieldsCollection, FieldListView, SaveView, FieldErrorView, ErrorManager) {
var initialize = function () {
AdminFieldApp = {
var create = function () {
window.AdminFieldApp = {
$window: $(window),
$scope: $("#admin-field-app"),
$top: $(".row-top", this.$scope),
@@ -58,7 +58,9 @@ define([
});
AdminFieldApp.vocabularyCollection = new VocabulariesCollection();
AdminFieldApp.dcFieldsCollection = new DcFieldsCollection();
};
var load = function() {
// load strings
i18n.init({resGetPath: "/admin/fields/language.json"});
@@ -101,7 +103,14 @@ define([
);
};
var initialize = function () {
create();
load();
};
return {
create: create,
load: load,
initialize: initialize
};
});