浏览代码

Updated LabeledInput creation after shortened by the new Template API.

Aleksander Nowodzinski 9 年之前
父节点
当前提交
b0c523937d
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 1 2
      packages/ckeditor5-link/src/link.js
  2. 2 1
      packages/ckeditor5-link/src/ui/linkformview.js

+ 1 - 2
packages/ckeditor5-link/src/link.js

@@ -23,7 +23,6 @@ import LinkFormView from './ui/linkformview.js';
 
 import LabeledInput from '../ui/labeledinput/labeledinput.js';
 import InputText from '../ui/inputtext/inputtext.js';
-import InputTextView from '../ui/inputtext/inputtextview.js';
 
 /**
  * The link feature. It introduces the Link and Unlink buttons and the <kbd>Ctrl+K</kbd> keystroke.
@@ -248,7 +247,7 @@ export default class Link extends Feature {
 		} );
 
 		// Add components to the form.
-		form.add( this._urlInput = new LabeledInput( urlInputModel, formView.urlInputView, InputText, InputTextView, new Model() ) );
+		form.add( this._urlInput = new LabeledInput( urlInputModel, formView.urlInputView, InputText, new Model() ) );
 		form.add( this._saveButton = new Button( saveButtonModel, formView.saveButtonView ) );
 		form.add( this._cancelButton = new Button( cancelButtonModel, formView.cancelButtonView ) );
 		form.add( this._unlinkButton = new Button( unlinkButtonModel, formView.unlinkButtonView ) );

+ 2 - 1
packages/ckeditor5-link/src/ui/linkformview.js

@@ -8,6 +8,7 @@ import Template from '../../ui/template.js';
 
 import ButtonView from '../../ui/button/buttonview.js';
 import LabeledInputView from '../../ui/labeledinput/labeledinputview.js';
+import InputTextView from '../../ui/inputtext/inputtextview.js';
 
 /**
  * The link form view controller class.
@@ -31,7 +32,7 @@ export default class LinkFormView extends View {
 		 *
 		 * @member {ui.input.labeled.LabeledInputView} link.ui.LinkFormView#urlInputView
 		 */
-		this.urlInputView = new LabeledInputView( locale );
+		this.urlInputView = new LabeledInputView( InputTextView, locale );
 
 		/**
 		 * The save button view.