This repository has been archived by the owner on Jun 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #407 from ckeditor/t/ckeditor5-table/24
Feature: Implemented list component separators (see ckeditor/ckeditor5-table#24).
- Loading branch information
Showing
5 changed files
with
83 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/** | ||
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md. | ||
*/ | ||
|
||
/** | ||
* @module ui/list/listseparatorview | ||
*/ | ||
|
||
import View from '../view'; | ||
|
||
/** | ||
* The list separator view class. | ||
* | ||
* @extends module:ui/view~View | ||
*/ | ||
export default class ListSeparatorView extends View { | ||
/** | ||
* @inheritDoc | ||
*/ | ||
constructor( locale ) { | ||
super( locale ); | ||
|
||
this.setTemplate( { | ||
tag: 'li', | ||
attributes: { | ||
class: [ | ||
'ck', | ||
'ck-list__separator' | ||
] | ||
} | ||
} ); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md. | ||
*/ | ||
|
||
import ListSeparatorView from '../../src/list/listseparatorview'; | ||
|
||
describe( 'ListSeparatorView', () => { | ||
let view; | ||
|
||
beforeEach( () => { | ||
view = new ListSeparatorView(); | ||
|
||
view.render(); | ||
} ); | ||
|
||
describe( 'template', () => { | ||
it( 'should create element from template', () => { | ||
expect( view.element.tagName ).to.equal( 'LI' ); | ||
expect( view.element.classList.contains( 'ck' ) ).to.true; | ||
expect( view.element.classList.contains( 'ck-list__separator' ) ).to.true; | ||
} ); | ||
} ); | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters