8
0
Quellcode durchsuchen

Rename UI component and command to restrictedEditingException.

Maciej Gołaszewski vor 6 Jahren
Ursprung
Commit
2fd11599b5

+ 1 - 1
packages/ckeditor5-restricted-editing/src/restrictededitingexceptionediting.js

@@ -37,6 +37,6 @@ export default class RestrictedEditingExceptionEditing extends Plugin {
 			}
 			}
 		} );
 		} );
 
 
-		editor.commands.add( 'nonRestricted', new RestrictedEditingExceptionCommand( editor ) );
+		editor.commands.add( 'restrictedEditingException', new RestrictedEditingExceptionCommand( editor ) );
 	}
 	}
 }
 }

+ 3 - 3
packages/ckeditor5-restricted-editing/src/restrictededitingexceptionui.js

@@ -23,8 +23,8 @@ export default class RestrictedEditingExceptionUI extends Plugin {
 		const editor = this.editor;
 		const editor = this.editor;
 		const t = editor.t;
 		const t = editor.t;
 
 
-		editor.ui.componentFactory.add( 'nonRestricted', locale => {
-			const command = editor.commands.get( 'nonRestricted' );
+		editor.ui.componentFactory.add( 'restrictedEditingException', locale => {
+			const command = editor.commands.get( 'restrictedEditingException' );
 			const view = new ButtonView( locale );
 			const view = new ButtonView( locale );
 
 
 			view.set( {
 			view.set( {
@@ -36,7 +36,7 @@ export default class RestrictedEditingExceptionUI extends Plugin {
 
 
 			view.bind( 'isOn', 'isEnabled' ).to( command, 'value', 'isEnabled' );
 			view.bind( 'isOn', 'isEnabled' ).to( command, 'value', 'isEnabled' );
 
 
-			this.listenTo( view, 'execute', () => editor.execute( 'nonRestricted' ) );
+			this.listenTo( view, 'execute', () => editor.execute( 'restrictedEditingException' ) );
 
 
 			return view;
 			return view;
 		} );
 		} );

+ 1 - 1
packages/ckeditor5-restricted-editing/tests/manual/restrictedediting.js

@@ -17,7 +17,7 @@ ClassicEditor
 		toolbar: [ 'heading', '|',
 		toolbar: [ 'heading', '|',
 			'bold', 'italic', 'link', '|',
 			'bold', 'italic', 'link', '|',
 			'bulletedList', 'numberedList', 'blockQuote', 'insertTable', '|',
 			'bulletedList', 'numberedList', 'blockQuote', 'insertTable', '|',
-			'nonRestricted', '|', 'undo', 'redo'
+			'restrictedEditingException', '|', 'undo', 'redo'
 		],
 		],
 		image: {
 		image: {
 			toolbar: [ 'imageStyle:full', 'imageStyle:side', '|', 'imageTextAlternative' ]
 			toolbar: [ 'imageStyle:full', 'imageStyle:side', '|', 'imageTextAlternative' ]

+ 1 - 1
packages/ckeditor5-restricted-editing/tests/restrictededitingexceptionediting.js

@@ -44,7 +44,7 @@ describe( 'RestrictedEditingExceptionEditing', () => {
 	} );
 	} );
 
 
 	it( 'should register command', () => {
 	it( 'should register command', () => {
-		const command = editor.commands.get( 'nonRestricted' );
+		const command = editor.commands.get( 'restrictedEditingException' );
 
 
 		expect( command ).to.be.instanceof( RestrictedEditingExceptionCommand );
 		expect( command ).to.be.instanceof( RestrictedEditingExceptionCommand );
 	} );
 	} );

+ 2 - 2
packages/ckeditor5-restricted-editing/tests/restrictededitingexceptionui.js

@@ -26,7 +26,7 @@ describe( 'RestrictedEditingExceptionUI', () => {
 			plugins: [ Paragraph, RestrictedEditingException, RestrictedEditingExceptionUI ]
 			plugins: [ Paragraph, RestrictedEditingException, RestrictedEditingExceptionUI ]
 		} );
 		} );
 
 
-		buttonView = editor.ui.componentFactory.create( 'nonRestricted' );
+		buttonView = editor.ui.componentFactory.create( 'restrictedEditingException' );
 	} );
 	} );
 
 
 	afterEach( () => {
 	afterEach( () => {
@@ -50,7 +50,7 @@ describe( 'RestrictedEditingExceptionUI', () => {
 	} );
 	} );
 
 
 	it( 'should bind model to command', () => {
 	it( 'should bind model to command', () => {
-		const command = editor.commands.get( 'nonRestricted' );
+		const command = editor.commands.get( 'restrictedEditingException' );
 
 
 		expect( buttonView.isOn ).to.be.false;
 		expect( buttonView.isOn ).to.be.false;
 		expect( buttonView.isEnabled ).to.be.true;
 		expect( buttonView.isEnabled ).to.be.true;