]>
Commit | Line | Data |
---|---|---|
317f8f8f IB |
1 | CKEDITOR.dialog.add( 'html5video', function( editor ) {\r |
2 | return {\r | |
3 | title: editor.lang.html5video.title,\r | |
4 | minWidth: 500,\r | |
5 | minHeight: 100,\r | |
6 | contents: [ {\r | |
7 | id: 'info',\r | |
8 | label: editor.lang.html5video.infoLabel,\r | |
9 | elements: [ {\r | |
10 | type: 'vbox',\r | |
11 | padding: 0,\r | |
12 | children: [\r | |
13 | {\r | |
14 | type: 'hbox',\r | |
15 | widths: [ '365px', '110px' ],\r | |
16 | align: 'right',\r | |
17 | children: [ {\r | |
18 | type: 'text',\r | |
19 | id: 'url',\r | |
20 | label: editor.lang.html5video.allowed,\r | |
21 | required: true,\r | |
22 | validate: CKEDITOR.dialog.validate.notEmpty( editor.lang.html5video.urlMissing ),\r | |
23 | setup: function( widget ) {\r | |
24 | this.setValue( widget.data.src );\r | |
25 | },\r | |
26 | commit: function( widget ) {\r | |
27 | widget.setData( 'src', this.getValue() );\r | |
28 | }\r | |
29 | },\r | |
30 | {\r | |
31 | type: 'button',\r | |
32 | id: 'browse',\r | |
33 | // v-align with the 'txtUrl' field.\r | |
34 | // TODO: We need something better than a fixed size here.\r | |
35 | style: 'display:inline-block;margin-top:14px;',\r | |
36 | align: 'center',\r | |
37 | label: editor.lang.common.browseServer,\r | |
38 | hidden: true,\r | |
39 | filebrowser: 'info:url'\r | |
40 | } ]\r | |
41 | } ]\r | |
42 | },\r | |
43 | {\r | |
44 | type: 'checkbox',\r | |
45 | id: 'responsive',\r | |
46 | label: editor.lang.html5video.responsive,\r | |
47 | setup: function( widget ) {\r | |
48 | this.setValue( widget.data.responsive );\r | |
49 | },\r | |
50 | commit: function( widget ) {\r | |
51 | widget.setData( 'responsive', this.getValue()?'true':'' );\r | |
52 | }\r | |
53 | },\r | |
54 | {\r | |
55 | type: 'hbox',\r | |
56 | id: 'size',\r | |
57 | children: [ {\r | |
58 | type: 'text',\r | |
59 | id: 'width',\r | |
60 | label: editor.lang.common.width,\r | |
61 | setup: function( widget ) {\r | |
62 | if ( widget.data.width ) {\r | |
63 | this.setValue( widget.data.width );\r | |
64 | }\r | |
65 | },\r | |
66 | commit: function( widget ) {\r | |
67 | widget.setData( 'width', this.getValue() );\r | |
68 | }\r | |
69 | },\r | |
70 | {\r | |
71 | type: 'text',\r | |
72 | id: 'height',\r | |
73 | label: editor.lang.common.height,\r | |
74 | setup: function( widget ) {\r | |
75 | if ( widget.data.height ) {\r | |
76 | this.setValue( widget.data.height );\r | |
77 | }\r | |
78 | },\r | |
79 | commit: function( widget ) {\r | |
80 | widget.setData( 'height', this.getValue() );\r | |
81 | }\r | |
82 | },\r | |
83 | ]\r | |
84 | },\r | |
85 | \r | |
86 | {\r | |
87 | type: 'hbox',\r | |
88 | id: 'alignment',\r | |
89 | children: [ {\r | |
90 | type: 'radio',\r | |
91 | id: 'align',\r | |
92 | label: editor.lang.common.align,\r | |
93 | items: [\r | |
94 | [editor.lang.common.alignCenter, 'center'],\r | |
95 | [editor.lang.common.alignLeft, 'left'],\r | |
96 | [editor.lang.common.alignRight, 'right'],\r | |
97 | [editor.lang.common.alignNone, 'none']\r | |
98 | ],\r | |
99 | 'default': 'center',\r | |
100 | setup: function( widget ) {\r | |
101 | if ( widget.data.align ) {\r | |
102 | this.setValue( widget.data.align );\r | |
103 | }\r | |
104 | },\r | |
105 | commit: function( widget ) {\r | |
106 | widget.setData( 'align', this.getValue() );\r | |
107 | }\r | |
108 | } ]\r | |
109 | } ]\r | |
110 | },\r | |
111 | {\r | |
112 | id: 'Upload',\r | |
113 | hidden: true,\r | |
114 | filebrowser: 'uploadButton',\r | |
115 | label: editor.lang.html5video.upload,\r | |
116 | elements: [ {\r | |
117 | type: 'file',\r | |
118 | id: 'upload',\r | |
119 | label: editor.lang.html5video.btnUpload,\r | |
120 | style: 'height:40px',\r | |
121 | size: 38\r | |
122 | },\r | |
123 | {\r | |
124 | type: 'fileButton',\r | |
125 | id: 'uploadButton',\r | |
126 | filebrowser: 'info:url',\r | |
127 | label: editor.lang.html5video.btnUpload,\r | |
128 | 'for': [ 'Upload', 'upload' ]\r | |
129 | } ]\r | |
130 | },\r | |
131 | {\r | |
132 | id: 'advanced',\r | |
133 | label: editor.lang.html5video.advanced,\r | |
134 | elements: [ {\r | |
135 | type: 'vbox',\r | |
136 | padding: 0,\r | |
137 | children: [ {\r | |
138 | type: 'hbox',\r | |
139 | children: [ {\r | |
140 | type: 'radio',\r | |
141 | id: 'autoplay',\r | |
142 | label: editor.lang.html5video.autoplay,\r | |
143 | items: [\r | |
144 | [editor.lang.html5video.yes, 'yes'],\r | |
145 | [editor.lang.html5video.no, 'no']\r | |
146 | ],\r | |
147 | 'default': 'no',\r | |
148 | setup: function( widget ) {\r | |
149 | if ( widget.data.autoplay ) {\r | |
150 | this.setValue( widget.data.autoplay );\r | |
151 | }\r | |
152 | },\r | |
153 | commit: function( widget ) {\r | |
154 | widget.setData( 'autoplay', this.getValue() );\r | |
155 | }\r | |
156 | } ]\r | |
157 | } ]\r | |
158 | } ]\r | |
159 | } ]\r | |
160 | };\r | |
161 | } );\r |