From: Aleksander Ɓukasz Date: Mon, 14 Jul 2014 15:01:05 +0000 (+0200) Subject: editor: fix requirejs paths so that test will work again X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/d0e1e19934b1c67a46a9b9c271b5054455edc5ad?ds=inline editor: fix requirejs paths so that test will work again Paths relative to the current directory that contain file extension don't normally work with requirejs unless used together with Karma.js - here on the other hand they are required. Until this get resolved one way or another, requiring modules in files that are used both in production and by tests must not use paths relative to the current dir. --- diff --git a/src/editor/plugins/core/core.js b/src/editor/plugins/core/core.js index 9445682..509d743 100644 --- a/src/editor/plugins/core/core.js +++ b/src/editor/plugins/core/core.js @@ -11,7 +11,7 @@ var _ = require('libs/underscore'), plugin = {name: 'core', actions: [], canvas: {}, documentExtension: {textNode: {}}}, Dialog = require('views/dialog/dialog'), canvasElements = require('plugins/core/canvasElements'), - metadataEditor = require('./metadataEditor/metadataEditor'); + metadataEditor = require('plugins/core/metadataEditor/metadataEditor'); diff --git a/src/editor/plugins/core/metadataEditor/action.js b/src/editor/plugins/core/metadataEditor/action.js index 9184eda..cb3d605 100644 --- a/src/editor/plugins/core/metadataEditor/action.js +++ b/src/editor/plugins/core/metadataEditor/action.js @@ -4,7 +4,7 @@ define(function(require) { /* globals gettext */ var Dialog = require('views/dialog/dialog'), - View = require('./view'); + View = require('plugins/core/metadataEditor/view'); return function(ctx) { diff --git a/src/editor/plugins/core/metadataEditor/metadataEditor.js b/src/editor/plugins/core/metadataEditor/metadataEditor.js index aa0277b..198160e 100644 --- a/src/editor/plugins/core/metadataEditor/metadataEditor.js +++ b/src/editor/plugins/core/metadataEditor/metadataEditor.js @@ -2,7 +2,7 @@ define(function(require) { 'use strict'; -var action = require('./action'); +var action = require('plugins/core/metadataEditor/action'); return { action: action