Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Updated paths.
Browse files Browse the repository at this point in the history
  • Loading branch information
szymonkups committed Jan 2, 2017
1 parent c6948e5 commit 8493080
Show file tree
Hide file tree
Showing 17 changed files with 59 additions and 65 deletions.
2 changes: 1 addition & 1 deletion src/imagestyle/converters.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @module image/imagestyle/converters
*/

import { isImage, getStyleByValue } from './utils.js';
import { isImage, getStyleByValue } from './utils';

/**
* Returns converter for `imageStyle` attribute. It can be used for adding, changing and removing the attribute.
Expand Down
6 changes: 3 additions & 3 deletions src/imagestyle/imagestyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
* @module image/imagestyle/imagestyle
*/

import Plugin from '../../core/plugin.js';
import ImageStyleEngine from './imagestyleengine.js';
import ButtonView from '../../ui/button/buttonview.js';
import Plugin from 'ckeditor5-core/src/plugin';
import ImageStyleEngine from './imagestyleengine';
import ButtonView from 'ckeditor5-ui/src/button/buttonview';

/**
* The image style plugin.
Expand Down
4 changes: 2 additions & 2 deletions src/imagestyle/imagestylecommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
* @module image/imagestyle/imagestylecommand
*/

import Command from '../../core/command/command.js';
import { isImage, getStyleByValue } from './utils.js';
import Command from 'ckeditor5-core/src/command/command';
import { isImage, getStyleByValue } from './utils';

/**
* The image style command. It is used to apply different image styles.
Expand Down
16 changes: 9 additions & 7 deletions src/imagestyle/imagestyleengine.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
* @module image/imagestyle/imagestyleengine
*/

import Plugin from '../../core/plugin.js';
import ImageStyleCommand from './imagestylecommand.js';
import ImageEngine from '../imageengine.js';
import { viewToModelImageStyle, modelToViewSetStyle } from './converters.js';
import Plugin from 'ckeditor5-core/src/plugin';
import ImageStyleCommand from './imagestylecommand';
import ImageEngine from '../imageengine';
import { viewToModelImageStyle, modelToViewSetStyle } from './converters';
import fullSizeIcon from 'ckeditor5-core/theme/icons/align-center.svg';
import sideIcon from 'ckeditor5-core/theme/icons/align-right.svg';

/**
* The image style engine plugin. Sets default configuration, creates converters and registers
Expand Down Expand Up @@ -39,10 +41,10 @@ export default class ImageStyleEngine extends Plugin {
// Define default configuration.
editor.config.define( 'image.styles', [
// This option is equal to situation when no style is applied.
{ name: 'imageStyleFull', title: 'Full size image', icon: 'object-center', value: null },
{ name: 'imageStyleFull', title: 'Full size image', icon: fullSizeIcon, value: null },

// This represents side image.
{ name: 'imageStyleSide', title: 'Side image', icon: 'object-right', value: 'side', className: 'image-style-side' }
{ name: 'imageStyleSide', title: 'Side image', icon: sideIcon, value: 'side', className: 'image-style-side' }
] );

// Get configuration.
Expand Down Expand Up @@ -82,7 +84,7 @@ export default class ImageStyleEngine extends Plugin {
* {@link module:ui/componentfactory~ComponentFactory ComponentFactory}.
* @property {String} value Value used to store this style in model attribute.
* When value is `null` style will be used as default one. Default style does not apply any CSS class to the view element.
* @property {String} icon Icon name to use when creating style's toolbar button.
* @property {String} icon SVG icon representation to use when creating style's button.
* @property {String} title Style's title.
* @property {String} className CSS class used to represent style in view.
*/
2 changes: 1 addition & 1 deletion src/imagestyle/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @module image/imagestyle/utils
*/

import ModelElement from '../../engine/model/element.js';
import ModelElement from 'ckeditor5-engine/src/model/element';

/**
* Checks if provided modelElement is an instance of {@link module:engine/model/element~Element Element} and its name
Expand Down
14 changes: 7 additions & 7 deletions src/imagetoolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
* @module image/imagetoolbar
*/

import Plugin from '../core/plugin.js';
import ToolbarView from '../ui/toolbar/toolbarview.js';
import BalloonPanelView from '../ui/balloonpanel/balloonpanelview.js';
import Template from '../ui/template.js';
import { isImageWidget } from './utils.js';
import throttle from '../utils/lib/lodash/throttle.js';
import global from '../utils/dom/global.js';
import Plugin from 'ckeditor5-core/src/plugin';
import ToolbarView from 'ckeditor5-ui/src/toolbar/toolbarview';
import BalloonPanelView from 'ckeditor5-ui/src/balloonpanel/balloonpanelview';
import Template from 'ckeditor5-ui/src/template';
import { isImageWidget } from './utils';
import throttle from 'ckeditor5-utils/src/lib/lodash/throttle';
import global from 'ckeditor5-utils/src/dom/global';

const arrowVOffset = BalloonPanelView.arrowVerticalOffset;
const positions = {
Expand Down
10 changes: 5 additions & 5 deletions tests/imagestyle/imagestyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
* For licensing, see LICENSE.md.
*/

import ClassicTestEditor from 'tests/core/_utils/classictesteditor.js';
import ImageStyle from 'ckeditor5/image/imagestyle/imagestyle.js';
import ImageStyleEngine from 'ckeditor5/image/imagestyle/imagestyleengine.js';
import ButtonView from 'ckeditor5/ui/button/buttonview.js';
import global from 'ckeditor5/utils/dom/global.js';
import ClassicTestEditor from 'ckeditor5-core/tests/_utils/classictesteditor';
import ImageStyle from 'ckeditor5-image/src/imagestyle/imagestyle';
import ImageStyleEngine from 'ckeditor5-image/src/imagestyle/imagestyleengine';
import ButtonView from 'ckeditor5-ui/src/button/buttonview';
import global from 'ckeditor5-utils/src/dom/global';

describe( 'ImageStyle', () => {
let editor;
Expand Down
6 changes: 3 additions & 3 deletions tests/imagestyle/imagestylecommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* For licensing, see LICENSE.md.
*/

import ModelTestEditor from 'tests/core/_utils/modeltesteditor.js';
import ImageStyleCommand from 'ckeditor5/image/imagestyle/imagestylecommand.js';
import { setData, getData } from 'ckeditor5/engine/dev-utils/model.js';
import ModelTestEditor from 'ckeditor5-core/tests/_utils/modeltesteditor';
import ImageStyleCommand from 'ckeditor5-image/src/imagestyle/imagestylecommand';
import { setData, getData } from 'ckeditor5-engine/src/dev-utils/model';

describe( 'ImageStyleCommand', () => {
const styles = [
Expand Down
12 changes: 6 additions & 6 deletions tests/imagestyle/imagestyleengine.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
* For licensing, see LICENSE.md.
*/

import VirtualTestEditor from 'tests/core/_utils/virtualtesteditor.js';
import ImageStyleEngine from 'ckeditor5/image/imagestyle/imagestyleengine.js';
import ImageEngine from 'ckeditor5/image/imageengine.js';
import ImageStyleCommand from 'ckeditor5/image/imagestyle/imagestylecommand.js';
import { getData as getModelData, setData as setModelData } from 'ckeditor5/engine/dev-utils/model.js';
import { getData as getViewData } from 'ckeditor5/engine/dev-utils/view.js';
import VirtualTestEditor from 'ckeditor5-core/tests/_utils/virtualtesteditor';
import ImageStyleEngine from 'ckeditor5-image/src/imagestyle/imagestyleengine';
import ImageEngine from 'ckeditor5-image/src/imageengine';
import ImageStyleCommand from 'ckeditor5-image/src/imagestyle/imagestylecommand';
import { getData as getModelData, setData as setModelData } from 'ckeditor5-engine/src/dev-utils/model';
import { getData as getViewData } from 'ckeditor5-engine/src/dev-utils/view';

describe( 'ImageStyleEngine', () => {
let editor, document, viewDocument;
Expand Down
4 changes: 2 additions & 2 deletions tests/imagestyle/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* For licensing, see LICENSE.md.
*/

import { isImage, getStyleByValue } from 'ckeditor5/image/imagestyle/utils.js';
import ModelElement from 'ckeditor5/engine/model/element.js';
import { isImage, getStyleByValue } from 'ckeditor5-image/src/imagestyle/utils';
import ModelElement from 'ckeditor5-engine/src/model/element';

describe( 'ImageStyle utils', () => {
describe( 'isImage', () => {
Expand Down
16 changes: 8 additions & 8 deletions tests/imagetoolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@

/* global Event */

import ClassicEditor from 'ckeditor5/editor-classic/classic.js';
import ImageToolbar from 'ckeditor5/image/imagetoolbar.js';
import Image from 'ckeditor5/image/image.js';
import global from 'ckeditor5/utils/dom/global.js';
import BalloonPanelView from 'ckeditor5/ui/balloonpanel/balloonpanelview.js';
import Plugin from 'ckeditor5/core/plugin.js';
import ButtonView from 'ckeditor5/ui/button/buttonview.js';
import { setData } from 'ckeditor5/engine/dev-utils/model.js';
import ClassicEditor from 'ckeditor5-editor-classic/src/classic';
import ImageToolbar from 'ckeditor5-image/src/imagetoolbar';
import Image from 'ckeditor5-image/src/image';
import global from 'ckeditor5-utils/src/dom/global';
import BalloonPanelView from 'ckeditor5-ui/src/balloonpanel/balloonpanelview';
import Plugin from 'ckeditor5-core/src/plugin';
import ButtonView from 'ckeditor5-ui/src/button/buttonview';
import { setData } from 'ckeditor5-engine/src/dev-utils/model';

describe( 'ImageToolbar', () => {
let editor, button, editingView, doc, panel;
Expand Down
5 changes: 2 additions & 3 deletions tests/manual/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ import HeadingPlugin from 'ckeditor5-heading/src/heading';
import ImagePlugin from 'ckeditor5-image/src/image';
import UndoPlugin from 'ckeditor5-undo/src/undo';
import ClipboardPlugin from 'ckeditor5-clipboard/src/clipboard';
import ImageStyle from 'ckeditor5-image/src/imagestyle/imagestyle';

ClassicEditor.create( document.querySelector( '#editor' ), {
plugins: [ EnterPlugin, TypingPlugin, ParagraphPlugin, HeadingPlugin, ImagePlugin, UndoPlugin, ClipboardPlugin, ImageStyle ],
toolbar: [ 'headings', 'undo', 'redo', 'imagestyle' ]
plugins: [ EnterPlugin, TypingPlugin, ParagraphPlugin, HeadingPlugin, ImagePlugin, UndoPlugin, ClipboardPlugin ],
toolbar: [ 'headings', 'undo', 'redo' ]
} )
.then( editor => {
window.editor = editor;
Expand Down
4 changes: 0 additions & 4 deletions tests/manual/imagestyle.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
<head>
<link rel="stylesheet" href="/theme/ckeditor.css">
</head>

<div id="editor">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus consequat placerat. Vestibulum id tellus et mauris sagittis tincidunt quis id mauris. Curabitur consectetur lectus sit amet tellus mattis, non lobortis leo interdum. </p>
<figure class="image">
Expand Down
20 changes: 10 additions & 10 deletions tests/manual/imagestyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@

/* global document, console, window */

import ClassicEditor from 'ckeditor5/editor-classic/classic.js';
import EnterPlugin from 'ckeditor5/enter/enter.js';
import TypingPlugin from 'ckeditor5/typing/typing.js';
import ParagraphPlugin from 'ckeditor5/paragraph/paragraph.js';
import HeadingPlugin from 'ckeditor5/heading/heading.js';
import ImagePlugin from 'ckeditor5/image/image.js';
import UndoPlugin from 'ckeditor5/undo/undo.js';
import ClipboardPlugin from 'ckeditor5/clipboard/clipboard.js';
import ImageStyle from 'ckeditor5/image/imagestyle/imagestyle.js';
import ImageToolbar from 'ckeditor5/image/imagetoolbar.js';
import ClassicEditor from 'ckeditor5-editor-classic/src/classic';
import EnterPlugin from 'ckeditor5-enter/src/enter';
import TypingPlugin from 'ckeditor5-typing/src/typing';
import ParagraphPlugin from 'ckeditor5-paragraph/src/paragraph';
import HeadingPlugin from 'ckeditor5-heading/src/heading';
import ImagePlugin from 'ckeditor5-image/src/image';
import UndoPlugin from 'ckeditor5-undo/src/undo';
import ClipboardPlugin from 'ckeditor5-clipboard/src/clipboard';
import ImageStyle from 'ckeditor5-image/src/imagestyle/imagestyle';
import ImageToolbar from 'ckeditor5-image/src/imagetoolbar';

ClassicEditor.create( document.querySelector( '#editor' ), {
plugins: [ ImageToolbar, EnterPlugin, TypingPlugin, ParagraphPlugin, HeadingPlugin, ImagePlugin, UndoPlugin, ClipboardPlugin, ImageStyle ],
Expand Down
1 change: 0 additions & 1 deletion theme/icons/object-center.svg

This file was deleted.

1 change: 0 additions & 1 deletion theme/icons/object-left.svg

This file was deleted.

1 change: 0 additions & 1 deletion theme/icons/object-right.svg

This file was deleted.

0 comments on commit 8493080

Please sign in to comment.