diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2017-01-26 15:12:37 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2017-01-26 15:12:37 +0100 |
commit | d1844275460a3e3a32e199326f6b36938a329091 (patch) | |
tree | 2f32bc1c5a5db42aeaadc3733ffe1b3377c0d84a /sources/plugins/html5audio/dialogs | |
parent | eaa9271590ab73b6eef3fa88bc74a9553eefd857 (diff) | |
download | ludivine-ckeditor-component-d1844275460a3e3a32e199326f6b36938a329091.tar.gz ludivine-ckeditor-component-d1844275460a3e3a32e199326f6b36938a329091.tar.zst ludivine-ckeditor-component-d1844275460a3e3a32e199326f6b36938a329091.zip |
Change html5 audio player4.6.2.4
Diffstat (limited to 'sources/plugins/html5audio/dialogs')
-rw-r--r-- | sources/plugins/html5audio/dialogs/html5audio.js | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/sources/plugins/html5audio/dialogs/html5audio.js b/sources/plugins/html5audio/dialogs/html5audio.js new file mode 100644 index 0000000..0ab0d7d --- /dev/null +++ b/sources/plugins/html5audio/dialogs/html5audio.js | |||
@@ -0,0 +1,117 @@ | |||
1 | CKEDITOR.dialog.add( 'html5audio', function( editor ) { | ||
2 | return { | ||
3 | title: editor.lang.html5audio.title, | ||
4 | minWidth: 500, | ||
5 | minHeight: 100, | ||
6 | contents: [ { | ||
7 | id: 'info', | ||
8 | label: editor.lang.html5audio.infoLabel, | ||
9 | elements: [ { | ||
10 | type: 'vbox', | ||
11 | padding: 0, | ||
12 | children: [ { | ||
13 | type: 'hbox', | ||
14 | widths: [ '365px', '110px' ], | ||
15 | align: 'right', | ||
16 | children: [ { | ||
17 | type: 'text', | ||
18 | id: 'url', | ||
19 | label: editor.lang.common.url, | ||
20 | required: true, | ||
21 | validate: CKEDITOR.dialog.validate.notEmpty( editor.lang.html5audio.urlMissing ), | ||
22 | setup: function( widget ) { | ||
23 | this.setValue( widget.data.src ); | ||
24 | }, | ||
25 | commit: function( widget ) { | ||
26 | widget.setData( 'src', this.getValue() ); | ||
27 | } | ||
28 | }, | ||
29 | { | ||
30 | type: 'button', | ||
31 | id: 'browse', | ||
32 | // v-align with the 'txtUrl' field. | ||
33 | // TODO: We need something better than a fixed size here. | ||
34 | style: 'display:inline-block;margin-top:14px;', | ||
35 | align: 'center', | ||
36 | label: editor.lang.common.browseServer, | ||
37 | hidden: true, | ||
38 | filebrowser: 'info:url' | ||
39 | } ] | ||
40 | } ] | ||
41 | }, | ||
42 | { | ||
43 | type: 'hbox', | ||
44 | id: 'alignment', | ||
45 | children: [ { | ||
46 | type: 'radio', | ||
47 | id: 'align', | ||
48 | label: editor.lang.common.align, | ||
49 | items: [ | ||
50 | [editor.lang.common.alignCenter, 'center'], | ||
51 | [editor.lang.common.alignLeft, 'left'], | ||
52 | [editor.lang.common.alignRight, 'right'], | ||
53 | [editor.lang.common.alignNone, 'none'] | ||
54 | ], | ||
55 | 'default': 'center', | ||
56 | setup: function( widget ) { | ||
57 | if ( widget.data.align ) { | ||
58 | this.setValue( widget.data.align ); | ||
59 | } | ||
60 | }, | ||
61 | commit: function( widget ) { | ||
62 | widget.setData( 'align', this.getValue() ); | ||
63 | } | ||
64 | } ] | ||
65 | } ] | ||
66 | }, | ||
67 | { | ||
68 | id: 'Upload', | ||
69 | hidden: true, | ||
70 | filebrowser: 'uploadButton', | ||
71 | label: editor.lang.html5audio.upload, | ||
72 | elements: [ { | ||
73 | type: 'file', | ||
74 | id: 'upload', | ||
75 | label: editor.lang.html5audio.btnUpload, | ||
76 | style: 'height:40px', | ||
77 | size: 38 | ||
78 | }, | ||
79 | { | ||
80 | type: 'fileButton', | ||
81 | id: 'uploadButton', | ||
82 | filebrowser: 'info:url', | ||
83 | label: editor.lang.html5audio.btnUpload, | ||
84 | 'for': [ 'Upload', 'upload' ] | ||
85 | } ] | ||
86 | }, | ||
87 | { | ||
88 | id: 'advanced', | ||
89 | label: editor.lang.html5audio.advanced, | ||
90 | elements: [ { | ||
91 | type: 'vbox', | ||
92 | padding: 0, | ||
93 | children: [ { | ||
94 | type: 'hbox', | ||
95 | children: [ { | ||
96 | type: 'radio', | ||
97 | id: 'autoplay', | ||
98 | label: editor.lang.html5audio.autoplay, | ||
99 | items: [ | ||
100 | [editor.lang.html5audio.yes, 'yes'], | ||
101 | [editor.lang.html5audio.no, 'no'] | ||
102 | ], | ||
103 | 'default': 'no', | ||
104 | setup: function( widget ) { | ||
105 | if ( widget.data.autoplay ) { | ||
106 | this.setValue( widget.data.autoplay ); | ||
107 | } | ||
108 | }, | ||
109 | commit: function( widget ) { | ||
110 | widget.setData( 'autoplay', this.getValue() ); | ||
111 | } | ||
112 | } ] | ||
113 | } ] | ||
114 | } ] | ||
115 | } ] | ||
116 | }; | ||
117 | } ); | ||