From 1794320dcfdfcd19572fb1676294f9853a6bbc20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Mon, 4 Dec 2017 18:55:29 +0100 Subject: Update to 4.7.3 --- sources/plugins/html5audio/dialogs/html5audio.js | 18 ++++++++++++++++++ sources/plugins/html5audio/lang/de.js | 1 + sources/plugins/html5audio/lang/el.js | 14 ++++++++++++++ sources/plugins/html5audio/lang/en.js | 1 + sources/plugins/html5audio/lang/es.js | 1 + sources/plugins/html5audio/lang/eu.js | 1 + sources/plugins/html5audio/lang/fr.js | 1 + sources/plugins/html5audio/lang/ru.js | 1 + sources/plugins/html5audio/lang/uk.js | 1 + sources/plugins/html5audio/lang/uz.js | 1 + sources/plugins/html5audio/lang/zh-cn.js | 14 ++++++++++++++ sources/plugins/html5audio/plugin.js | 14 ++++++++++++-- 12 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 sources/plugins/html5audio/lang/el.js create mode 100644 sources/plugins/html5audio/lang/zh-cn.js (limited to 'sources/plugins/html5audio') diff --git a/sources/plugins/html5audio/dialogs/html5audio.js b/sources/plugins/html5audio/dialogs/html5audio.js index 0ab0d7d..47de947 100644 --- a/sources/plugins/html5audio/dialogs/html5audio.js +++ b/sources/plugins/html5audio/dialogs/html5audio.js @@ -109,6 +109,24 @@ commit: function( widget ) { widget.setData( 'autoplay', this.getValue() ); } + }, + { + type: 'radio', + id: 'allowdownload', + label: editor.lang.html5audio.allowdownload, + items: [ + [editor.lang.html5audio.yes, 'yes'], + [editor.lang.html5audio.no, 'no'] + ], + 'default': 'no', + setup: function( widget ) { + if ( widget.data.allowdownload ) { + this.setValue(widget.data.allowdownload); + } + }, + commit: function( widget ) { + widget.setData( 'allowdownload', this.getValue() ); + } } ] } ] } ] diff --git a/sources/plugins/html5audio/lang/de.js b/sources/plugins/html5audio/lang/de.js index e084a60..e779745 100644 --- a/sources/plugins/html5audio/lang/de.js +++ b/sources/plugins/html5audio/lang/de.js @@ -8,6 +8,7 @@ btnUpload: 'Zum Server senden', advanced: 'Erweitert', autoplay: 'Autoplay?', + allowdownload: 'Download zulassen?', yes: 'Ja', no: 'Nein' } ); diff --git a/sources/plugins/html5audio/lang/el.js b/sources/plugins/html5audio/lang/el.js new file mode 100644 index 0000000..a7d2f84 --- /dev/null +++ b/sources/plugins/html5audio/lang/el.js @@ -0,0 +1,14 @@ +CKEDITOR.plugins.setLang( 'html5audio', 'el', { + button: 'Προσθέστε HTML5 ήχο', + title: 'HTML5 ήχος', + infoLabel: 'Πληροφορίες ήχου', + urlMissing: 'Η πηγή URL ήχου απουσιάζει.', + audioProperties: 'Ιδιότητες ήχου', + upload: 'Upload', + btnUpload: 'Αποστολή στον διακομιστή', + advanced: 'Προχωρημένα', + autoplay: 'Αυτόματη αναπαραγωγή;', + allowdownload: 'Επιτρέψτε τη λήψη;', + yes: 'Ναι', + no: 'Όχι' +} ); diff --git a/sources/plugins/html5audio/lang/en.js b/sources/plugins/html5audio/lang/en.js index fffce1e..63e8c40 100644 --- a/sources/plugins/html5audio/lang/en.js +++ b/sources/plugins/html5audio/lang/en.js @@ -8,6 +8,7 @@ btnUpload: 'Send it to the server', advanced: 'Advanced', autoplay: 'Autoplay?', + allowdownload: 'Allow download?', yes: 'Yes', no: 'No' } ); diff --git a/sources/plugins/html5audio/lang/es.js b/sources/plugins/html5audio/lang/es.js index f1aec8e..a9dd960 100644 --- a/sources/plugins/html5audio/lang/es.js +++ b/sources/plugins/html5audio/lang/es.js @@ -8,6 +8,7 @@ btnUpload: 'Enviar al servidor', advanced: 'Avanzado', autoplay: '¿Reproducir automáticamente?', + allowdownload: '¿Permitir la descarga?', yes: 'Si', no: 'No' } ); diff --git a/sources/plugins/html5audio/lang/eu.js b/sources/plugins/html5audio/lang/eu.js index 9275d88..5a7d103 100644 --- a/sources/plugins/html5audio/lang/eu.js +++ b/sources/plugins/html5audio/lang/eu.js @@ -8,6 +8,7 @@ btnUpload: 'Bidali zerbitzarira', advanced: 'Aurreratua', autoplay: 'Automatikoki erreproduzitu?', + allowdownload: 'Baimendu deskargatzea?', yes: 'Bai', no: 'Ez' } ); diff --git a/sources/plugins/html5audio/lang/fr.js b/sources/plugins/html5audio/lang/fr.js index b9fa4af..51103f2 100644 --- a/sources/plugins/html5audio/lang/fr.js +++ b/sources/plugins/html5audio/lang/fr.js @@ -8,6 +8,7 @@ btnUpload: 'Envoyer vers le serveur', advanced: 'Avancé', autoplay: 'Jouer automatiquement ?', + allowdownload: 'Autoriser le téléchargement?', yes: 'Oui', no: 'Non' } ); diff --git a/sources/plugins/html5audio/lang/ru.js b/sources/plugins/html5audio/lang/ru.js index 94be193..7060753 100644 --- a/sources/plugins/html5audio/lang/ru.js +++ b/sources/plugins/html5audio/lang/ru.js @@ -8,6 +8,7 @@ btnUpload: 'Загрузить на сервер', advanced: 'Дополнительно', autoplay: 'Автовоспроизведение', + allowdownload: 'Разрешить загрузку', yes: 'Да', no: 'Нет' } ); diff --git a/sources/plugins/html5audio/lang/uk.js b/sources/plugins/html5audio/lang/uk.js index 6e050f1..3d10fd0 100644 --- a/sources/plugins/html5audio/lang/uk.js +++ b/sources/plugins/html5audio/lang/uk.js @@ -8,6 +8,7 @@ btnUpload: 'Відвантажити на сервер', advanced: 'Додатково', autoplay: 'Автовідтворення?', + allowdownload: 'Дозволити завантажити?', yes: 'Так', no: 'Ні' } ); diff --git a/sources/plugins/html5audio/lang/uz.js b/sources/plugins/html5audio/lang/uz.js index 8827b53..c21b2c6 100644 --- a/sources/plugins/html5audio/lang/uz.js +++ b/sources/plugins/html5audio/lang/uz.js @@ -8,6 +8,7 @@ btnUpload: 'Serverga jo‘natish', advanced: 'Kengaytrilgan', autoplay: 'Avtoijro?', + allowdownload: 'Yuklab olish uchun ruxsat berilsinmi?', yes: 'Ha', no: 'Yo‘q' } ); diff --git a/sources/plugins/html5audio/lang/zh-cn.js b/sources/plugins/html5audio/lang/zh-cn.js new file mode 100644 index 0000000..018ffb0 --- /dev/null +++ b/sources/plugins/html5audio/lang/zh-cn.js @@ -0,0 +1,14 @@ +CKEDITOR.plugins.setLang( 'html5audio', 'zh-cn', { + button: '插入HTML5音频', + title: 'HTML5 音频', + infoLabel: '音频信息', + urlMissing: '音频URL', + audioProperties: '音频属性', + upload: '上传', + btnUpload: '上传到服务器', + advanced: '高级', + autoplay: '自动播放?', + allowdownload: '允许下载?', + yes: '是', + no: '否' +} ); diff --git a/sources/plugins/html5audio/plugin.js b/sources/plugins/html5audio/plugin.js index 86bcfbd..7d0d886 100644 --- a/sources/plugins/html5audio/plugin.js +++ b/sources/plugins/html5audio/plugin.js @@ -1,6 +1,6 @@ CKEDITOR.plugins.add( 'html5audio', { requires: 'widget', - lang: 'de,en,eu,es,fr,ru,uk,uz', + lang: 'de,el,en,eu,es,fr,ru,uk,uz,zh-cn', icons: 'html5audio', init: function( editor ) { editor.widgets.add( 'html5audio', { @@ -13,7 +13,7 @@ * - div-s with text-align,float,margin-left,margin-right inline style rules and required ckeditor-html5-audio class. * - audio tags with src and controls attributes. */ - allowedContent: 'div(!ckeditor-html5-audio){text-align,float,margin-left,margin-right}; audio[src,controls,autoplay];', + allowedContent: 'div(!ckeditor-html5-audio){text-align,float,margin-left,margin-right}; audio[src,controls,controlslist,autoplay];', requiredContent: 'div(ckeditor-html5-audio); audio[src,controls];', upcast: function( element ) { return element.name === 'div' && element.hasClass( 'ckeditor-html5-audio' ); @@ -29,6 +29,7 @@ // get it's attributes. src = this.element.getChild( 0 ).getAttribute( 'src' ); autoplay = this.element.getChild( 0 ).getAttribute( 'autoplay' ); + allowdownload = !this.element.getChild( 0 ).getAttribute( 'controlslist' ); } if ( src ) { @@ -43,6 +44,10 @@ if ( autoplay ) { this.setData( 'autoplay', 'yes' ); } + + if ( allowdownload ) { + this.setData( 'allowdownload', 'yes' ); + } } }, data: function() { @@ -84,6 +89,11 @@ } else { this.element.getChild( 0 ).removeAttribute( 'autoplay' ); } + if ( this.data.allowdownload === 'yes' ) { + this.element.getChild( 0 ).removeAttribute( 'controlslist' ); + } else { + this.element.getChild( 0 ).setAttribute( 'controlslist', 'nodownload' ); + } } } } ); -- cgit v1.2.3