aboutsummaryrefslogtreecommitdiff
path: root/sources/plugins/html5audio
diff options
context:
space:
mode:
Diffstat (limited to 'sources/plugins/html5audio')
-rw-r--r--sources/plugins/html5audio/dialogs/html5audio.js18
-rw-r--r--sources/plugins/html5audio/lang/de.js1
-rw-r--r--sources/plugins/html5audio/lang/el.js14
-rw-r--r--sources/plugins/html5audio/lang/en.js1
-rw-r--r--sources/plugins/html5audio/lang/es.js1
-rw-r--r--sources/plugins/html5audio/lang/eu.js1
-rw-r--r--sources/plugins/html5audio/lang/fr.js1
-rw-r--r--sources/plugins/html5audio/lang/ru.js1
-rw-r--r--sources/plugins/html5audio/lang/uk.js1
-rw-r--r--sources/plugins/html5audio/lang/uz.js1
-rw-r--r--sources/plugins/html5audio/lang/zh-cn.js14
-rw-r--r--sources/plugins/html5audio/plugin.js14
12 files changed, 66 insertions, 2 deletions
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 @@
109 commit: function( widget ) { 109 commit: function( widget ) {
110 widget.setData( 'autoplay', this.getValue() ); 110 widget.setData( 'autoplay', this.getValue() );
111 } 111 }
112 },
113 {
114 type: 'radio',
115 id: 'allowdownload',
116 label: editor.lang.html5audio.allowdownload,
117 items: [
118 [editor.lang.html5audio.yes, 'yes'],
119 [editor.lang.html5audio.no, 'no']
120 ],
121 'default': 'no',
122 setup: function( widget ) {
123 if ( widget.data.allowdownload ) {
124 this.setValue(widget.data.allowdownload);
125 }
126 },
127 commit: function( widget ) {
128 widget.setData( 'allowdownload', this.getValue() );
129 }
112 } ] 130 } ]
113 } ] 131 } ]
114 } ] 132 } ]
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 @@
8 btnUpload: 'Zum Server senden', 8 btnUpload: 'Zum Server senden',
9 advanced: 'Erweitert', 9 advanced: 'Erweitert',
10 autoplay: 'Autoplay?', 10 autoplay: 'Autoplay?',
11 allowdownload: 'Download zulassen?',
11 yes: 'Ja', 12 yes: 'Ja',
12 no: 'Nein' 13 no: 'Nein'
13} ); 14} );
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 @@
1CKEDITOR.plugins.setLang( 'html5audio', 'el', {
2 button: 'Προσθέστε HTML5 ήχο',
3 title: 'HTML5 ήχος',
4 infoLabel: 'Πληροφορίες ήχου',
5 urlMissing: 'Η πηγή URL ήχου απουσιάζει.',
6 audioProperties: 'Ιδιότητες ήχου',
7 upload: 'Upload',
8 btnUpload: 'Αποστολή στον διακομιστή',
9 advanced: 'Προχωρημένα',
10 autoplay: 'Αυτόματη αναπαραγωγή;',
11 allowdownload: 'Επιτρέψτε τη λήψη;',
12 yes: 'Ναι',
13 no: 'Όχι'
14} );
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 @@
8 btnUpload: 'Send it to the server', 8 btnUpload: 'Send it to the server',
9 advanced: 'Advanced', 9 advanced: 'Advanced',
10 autoplay: 'Autoplay?', 10 autoplay: 'Autoplay?',
11 allowdownload: 'Allow download?',
11 yes: 'Yes', 12 yes: 'Yes',
12 no: 'No' 13 no: 'No'
13} ); 14} );
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 @@
8 btnUpload: 'Enviar al servidor', 8 btnUpload: 'Enviar al servidor',
9 advanced: 'Avanzado', 9 advanced: 'Avanzado',
10 autoplay: '¿Reproducir automáticamente?', 10 autoplay: '¿Reproducir automáticamente?',
11 allowdownload: '¿Permitir la descarga?',
11 yes: 'Si', 12 yes: 'Si',
12 no: 'No' 13 no: 'No'
13} ); 14} );
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 @@
8 btnUpload: 'Bidali zerbitzarira', 8 btnUpload: 'Bidali zerbitzarira',
9 advanced: 'Aurreratua', 9 advanced: 'Aurreratua',
10 autoplay: 'Automatikoki erreproduzitu?', 10 autoplay: 'Automatikoki erreproduzitu?',
11 allowdownload: 'Baimendu deskargatzea?',
11 yes: 'Bai', 12 yes: 'Bai',
12 no: 'Ez' 13 no: 'Ez'
13} ); 14} );
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 @@
8 btnUpload: 'Envoyer vers le serveur', 8 btnUpload: 'Envoyer vers le serveur',
9 advanced: 'Avancé', 9 advanced: 'Avancé',
10 autoplay: 'Jouer automatiquement ?', 10 autoplay: 'Jouer automatiquement ?',
11 allowdownload: 'Autoriser le téléchargement?',
11 yes: 'Oui', 12 yes: 'Oui',
12 no: 'Non' 13 no: 'Non'
13} ); 14} );
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 @@
8 btnUpload: 'Загрузить на сервер', 8 btnUpload: 'Загрузить на сервер',
9 advanced: 'Дополнительно', 9 advanced: 'Дополнительно',
10 autoplay: 'Автовоспроизведение', 10 autoplay: 'Автовоспроизведение',
11 allowdownload: 'Разрешить загрузку',
11 yes: 'Да', 12 yes: 'Да',
12 no: 'Нет' 13 no: 'Нет'
13} ); 14} );
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 @@
8 btnUpload: 'Відвантажити на сервер', 8 btnUpload: 'Відвантажити на сервер',
9 advanced: 'Додатково', 9 advanced: 'Додатково',
10 autoplay: 'Автовідтворення?', 10 autoplay: 'Автовідтворення?',
11 allowdownload: 'Дозволити завантажити?',
11 yes: 'Так', 12 yes: 'Так',
12 no: 'Ні' 13 no: 'Ні'
13} ); 14} );
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 @@
8 btnUpload: 'Serverga jo‘natish', 8 btnUpload: 'Serverga jo‘natish',
9 advanced: 'Kengaytrilgan', 9 advanced: 'Kengaytrilgan',
10 autoplay: 'Avtoijro?', 10 autoplay: 'Avtoijro?',
11 allowdownload: 'Yuklab olish uchun ruxsat berilsinmi?',
11 yes: 'Ha', 12 yes: 'Ha',
12 no: 'Yo‘q' 13 no: 'Yo‘q'
13} ); 14} );
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 @@
1CKEDITOR.plugins.setLang( 'html5audio', 'zh-cn', {
2 button: '插入HTML5音频',
3 title: 'HTML5 音频',
4 infoLabel: '音频信息',
5 urlMissing: '音频URL',
6 audioProperties: '音频属性',
7 upload: '上传',
8 btnUpload: '上传到服务器',
9 advanced: '高级',
10 autoplay: '自动播放?',
11 allowdownload: '允许下载?',
12 yes: '是',
13 no: '否'
14} );
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 @@
1CKEDITOR.plugins.add( 'html5audio', { 1CKEDITOR.plugins.add( 'html5audio', {
2 requires: 'widget', 2 requires: 'widget',
3 lang: 'de,en,eu,es,fr,ru,uk,uz', 3 lang: 'de,el,en,eu,es,fr,ru,uk,uz,zh-cn',
4 icons: 'html5audio', 4 icons: 'html5audio',
5 init: function( editor ) { 5 init: function( editor ) {
6 editor.widgets.add( 'html5audio', { 6 editor.widgets.add( 'html5audio', {
@@ -13,7 +13,7 @@
13 * - div-s with text-align,float,margin-left,margin-right inline style rules and required ckeditor-html5-audio class. 13 * - div-s with text-align,float,margin-left,margin-right inline style rules and required ckeditor-html5-audio class.
14 * - audio tags with src and controls attributes. 14 * - audio tags with src and controls attributes.
15 */ 15 */
16 allowedContent: 'div(!ckeditor-html5-audio){text-align,float,margin-left,margin-right}; audio[src,controls,autoplay];', 16 allowedContent: 'div(!ckeditor-html5-audio){text-align,float,margin-left,margin-right}; audio[src,controls,controlslist,autoplay];',
17 requiredContent: 'div(ckeditor-html5-audio); audio[src,controls];', 17 requiredContent: 'div(ckeditor-html5-audio); audio[src,controls];',
18 upcast: function( element ) { 18 upcast: function( element ) {
19 return element.name === 'div' && element.hasClass( 'ckeditor-html5-audio' ); 19 return element.name === 'div' && element.hasClass( 'ckeditor-html5-audio' );
@@ -29,6 +29,7 @@
29 // get it's attributes. 29 // get it's attributes.
30 src = this.element.getChild( 0 ).getAttribute( 'src' ); 30 src = this.element.getChild( 0 ).getAttribute( 'src' );
31 autoplay = this.element.getChild( 0 ).getAttribute( 'autoplay' ); 31 autoplay = this.element.getChild( 0 ).getAttribute( 'autoplay' );
32 allowdownload = !this.element.getChild( 0 ).getAttribute( 'controlslist' );
32 } 33 }
33 34
34 if ( src ) { 35 if ( src ) {
@@ -43,6 +44,10 @@
43 if ( autoplay ) { 44 if ( autoplay ) {
44 this.setData( 'autoplay', 'yes' ); 45 this.setData( 'autoplay', 'yes' );
45 } 46 }
47
48 if ( allowdownload ) {
49 this.setData( 'allowdownload', 'yes' );
50 }
46 } 51 }
47 }, 52 },
48 data: function() { 53 data: function() {
@@ -84,6 +89,11 @@
84 } else { 89 } else {
85 this.element.getChild( 0 ).removeAttribute( 'autoplay' ); 90 this.element.getChild( 0 ).removeAttribute( 'autoplay' );
86 } 91 }
92 if ( this.data.allowdownload === 'yes' ) {
93 this.element.getChild( 0 ).removeAttribute( 'controlslist' );
94 } else {
95 this.element.getChild( 0 ).setAttribute( 'controlslist', 'nodownload' );
96 }
87 } 97 }
88 } 98 }
89 } ); 99 } );