@@ -65,15 +65,15 @@ export default class TextAlternativeFormView extends View {
65
65
*
66
66
* @member {module:ui/button/buttonview~ButtonView} #saveButtonView
67
67
*/
68
- this . saveButtonView = this . _createButton ( t ( 'Save' ) , checkIcon ) ;
68
+ this . saveButtonView = this . _createButton ( t ( 'Save' ) , checkIcon , 'ck-button-save' ) ;
69
69
this . saveButtonView . type = 'submit' ;
70
70
71
71
/**
72
72
* A button used to cancel the form.
73
73
*
74
74
* @member {module:ui/button/buttonview~ButtonView} #cancelButtonView
75
75
*/
76
- this . cancelButtonView = this . _createButton ( t ( 'Cancel' ) , cancelIcon , 'cancel' ) ;
76
+ this . cancelButtonView = this . _createButton ( t ( 'Cancel' ) , cancelIcon , 'ck-button-cancel' , ' cancel' ) ;
77
77
78
78
/**
79
79
* A collection of views which can be focused in the form.
@@ -104,14 +104,6 @@ export default class TextAlternativeFormView extends View {
104
104
}
105
105
} ) ;
106
106
107
- this . saveButtonView . extendTemplate ( {
108
- attributes : {
109
- class : [
110
- 'ck-button-action'
111
- ]
112
- }
113
- } ) ;
114
-
115
107
this . setTemplate ( {
116
108
tag : 'form' ,
117
109
@@ -158,10 +150,11 @@ export default class TextAlternativeFormView extends View {
158
150
* @private
159
151
* @param {String } label The button label
160
152
* @param {String } icon The button's icon.
153
+ * @param {String } className The additional button CSS class name.
161
154
* @param {String } [eventName] The event name that the ButtonView#execute event will be delegated to.
162
155
* @returns {module:ui/button/buttonview~ButtonView } The button view instance.
163
156
*/
164
- _createButton ( label , icon , eventName ) {
157
+ _createButton ( label , icon , className , eventName ) {
165
158
const button = new ButtonView ( this . locale ) ;
166
159
167
160
button . set ( {
@@ -170,6 +163,12 @@ export default class TextAlternativeFormView extends View {
170
163
tooltip : true
171
164
} ) ;
172
165
166
+ button . extendTemplate ( {
167
+ attributes : {
168
+ class : className
169
+ }
170
+ } ) ;
171
+
173
172
if ( eventName ) {
174
173
button . delegate ( 'execute' ) . to ( this , eventName ) ;
175
174
}
0 commit comments