Skip to content
66 changes: 44 additions & 22 deletions dialogs/btbutton.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,38 @@ CKEDITOR.dialog.add('btbutton', function (editor) {
label: lang.tabInfo,
accessKey: 'I',
elements: [
{
type: "hbox",
widths: ["50%", "50%"],
children: [
{
id: 'text',
type: 'text',
width: '200px',
required: true,
label: lang.buttonTextLabel,
setup: function (widget) {
this.setValue(widget.data.text || 'A Button');
},
commit: function (widget) {
widget.setData('text', this.getValue());
}
},
{
id: 'href',
type: 'text',
width: '200px',
required: true,
label: lang.buttonUrlLabel,
setup: function (widget) {
this.setValue(widget.data.href || '#');
},
commit: function (widget) {
widget.setData('href', this.getValue());
}
}
]
},
{
type: "hbox",
widths: ["50%", "50%"],
Expand Down Expand Up @@ -46,7 +78,8 @@ CKEDITOR.dialog.add('btbutton', function (editor) {
items: [
[lang.buttonSizeSmall, 'btn-sm'],
[lang.buttonSizeNormal, ''],
[lang.buttonSizeLarge, 'btn-lg']
[lang.buttonSizeLarge, 'btn-lg'],
[lang.buttonBlockSize, 'btn-block']
],
setup: function (widget) {
this.setValue(widget.data.btnsize || '');
Expand All @@ -59,32 +92,21 @@ CKEDITOR.dialog.add('btbutton', function (editor) {
},
{
type: "hbox",
widths: ["50%", "50%"],
widths: ["50%"],
children: [
{
id: 'text',
type: 'text',
width: '200px',
required: true,
label: lang.buttonTextLabel,
setup: function (widget) {
this.setValue(widget.data.text || 'A Button');
},
commit: function (widget) {
widget.setData('text', this.getValue());
}
},
{
id: 'href',
type: 'text',
width: '200px',
required: true,
label: lang.buttonUrlLabel,
id: 'btnblock',
type: 'select',
label: lang.buttonWidthLabel,
items: [
[lang.buttonDefault, ''],
[lang.buttonBlockFullWidth, 'btn-block']
],
setup: function (widget) {
this.setValue(widget.data.href || '#');
this.setValue(widget.data.btnblock || '');
},
commit: function (widget) {
widget.setData('href', this.getValue());
widget.setData('btnblock', this.getValue());
}
}
]
Expand Down
7 changes: 6 additions & 1 deletion lang/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ CKEDITOR.plugins.setLang('btbutton', 'en', {
tabIcons: 'Icons',
buttonStyleLabel: 'Style',
buttonSizeLabel: 'Size',
buttonWidthLabel: 'Width',
buttonTextLabel: 'Text',
buttonUrlLabel: 'URL',
buttonTargetLabel: 'Target',
Expand All @@ -17,8 +18,12 @@ CKEDITOR.plugins.setLang('btbutton', 'en', {
buttonSuccess: 'Success',
buttonWarning: 'Warning',
buttonDanger: 'Danger',
buttonDark: 'Dark',
buttonLight: 'Light',
buttonSizeExSmall: 'Extra Small',
buttonSizeSmall: 'Small',
buttonSizeNormal: 'Normal',
buttonSizeLarge: 'Large'
buttonSizeLarge: 'Large',
buttonBlockFullWidth: 'Full Width'

});
6 changes: 5 additions & 1 deletion lang/pt-br.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ CKEDITOR.plugins.setLang('btbutton', 'pt-br', {
tabIcons: 'Icones',
buttonStyleLabel: 'Estilos',
buttonSizeLabel: 'Tamanho',
buttonWidthLabel: 'Width',
buttonTextLabel: 'Texto',
buttonUrlLabel: 'URL',
buttonTargetLabel: 'Target',
Expand All @@ -17,9 +18,12 @@ CKEDITOR.plugins.setLang('btbutton', 'pt-br', {
buttonSuccess: 'Success',
buttonWarning: 'Warning',
buttonDanger: 'Danger',
buttonDark: 'Dark',
buttonLight: 'Light',
buttonSizeExSmall: 'Extra Pequeno',
buttonSizeSmall: 'Pequeno',
buttonSizeNormal: 'Normal',
buttonSizeLarge: 'Grande'
buttonSizeLarge: 'Grande',
buttonBlockFullWidth: 'Full Width'
});

6 changes: 5 additions & 1 deletion lang/ru.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ CKEDITOR.plugins.setLang('btbutton', 'ru', {
tabIcons: 'Иконки',
buttonStyleLabel: 'Стиль',
buttonSizeLabel: 'Размер',
buttonWidthLabel: 'Width',
buttonTextLabel: 'Текст',
buttonUrlLabel: 'Ссылка (URL)',
buttonTargetLabel: 'Цель',
Expand All @@ -17,8 +18,11 @@ CKEDITOR.plugins.setLang('btbutton', 'ru', {
buttonSuccess: 'Зеленая (success)',
buttonWarning: 'Оранжевая (warning)',
buttonDanger: 'Красная (danger)',
buttonDark: 'Dark',
buttonLight: 'Light',
buttonSizeExSmall: 'Очень маленький (XS)',
buttonSizeSmall: 'Маленький (S)',
buttonSizeNormal: 'Обычный',
buttonSizeLarge: 'Большой (L)'
buttonSizeLarge: 'Большой (L)',
buttonBlockFullWidth: 'Full Width'
});
6 changes: 5 additions & 1 deletion lang/uk.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ CKEDITOR.plugins.setLang('btbutton', 'uk', {
tabIcons: 'Іконки',
buttonStyleLabel: 'Стиль',
buttonSizeLabel: 'Розмір',
buttonWidthLabel: 'Width',
buttonTextLabel: 'Текст',
buttonUrlLabel: 'URL',
buttonTargetLabel: 'Ціль',
Expand All @@ -17,8 +18,11 @@ CKEDITOR.plugins.setLang('btbutton', 'uk', {
buttonSuccess: 'Успіх',
buttonWarning: 'Попередження',
buttonDanger: 'Небезбека',
buttonDark: 'Dark',
buttonLight: 'Light',
buttonSizeExSmall: 'Дуже мала',
buttonSizeSmall: 'Мала',
buttonSizeNormal: 'Звичайна',
buttonSizeLarge: 'Велика'
buttonSizeLarge: 'Велика',
buttonBlockFullWidth: 'Full Width'
});
Loading