Built motion from commit 67e5df37.|2.0.62
[motion2.git] / public / assets / plugins / ckeditor / plugins / autocorrect / dialogs / options.js
1 /*
2  Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
3  For licensing, see LICENSE.md or http://ckeditor.com/license
4 */
5 (function() {
6     function b() {
7         this.setValue(f.getOption(this.option))
8     }
9
10     function c() {
11         f.setOption(this.option, this.getValue())
12     }
13     var f = CKEDITOR.plugins.autocorrect;
14     CKEDITOR.dialog.add("autocorrectOptions", function(a) {
15         a = a.lang.autocorrect;
16         return {
17             title: a.autocorrect,
18             resizable: CKEDITOR.DIALOG_RESIZE_NONE,
19             minWidth: 350,
20             minHeight: 170,
21             onOk: function() {
22                 this.commitContent()
23             },
24             contents: [{
25                 id: "autocorrect",
26                 label: a.autocorrect,
27                 title: a.autocorrect,
28                 accessKey: "",
29                 elements: [{
30                     type: "vbox",
31                     padding: 0,
32                     children: [{
33                         type: "checkbox",
34                         id: "useReplacementTableCheckbox",
35                         option: "useReplacementTable",
36                         setup: b,
37                         commit: c,
38                         isChanged: !1,
39                         label: a.replaceTextAsYouType
40                     }, {
41                         type: "html",
42                         html: '<div style="height: 150px;overflow-y: scroll;border: 1px solid #afafaf"></div>',
43                         setup: function() {
44                             this.getElement().setHtml("");
45                             var a = f.getOption("replacementTable"),
46                                 b = document.createElement("table");
47                             b.style.width = "100%";
48                             b.style.tableLayout = "fixed";
49                             var c = b.appendChild(document.createElement("tbody")),
50                                 g;
51                             for (g in a) {
52                                 var h = document.createElement("tr"),
53                                     d = document.createElement("td");
54                                 d.appendChild(document.createTextNode(g));
55                                 d.style.borderBottom = "1px solid #afafaf";
56                                 d.style.padding = "0 5px";
57                                 var e = document.createElement("td");
58                                 h.appendChild(d);
59                                 e.appendChild(document.createTextNode(a[g]));
60                                 e.style.borderBottom = "1px solid #afafaf";
61                                 e.style.padding = "0 5px";
62                                 h.appendChild(e);
63                                 c.appendChild(h)
64                             }
65                             this.getElement().append(new CKEDITOR.dom.element(b))
66                         }
67                     }]
68                 }]
69             }, {
70                 id: "autoformatAsYouType",
71                 label: a.autoformatAsYouType,
72                 title: a.autoformatAsYouType,
73                 accessKey: "",
74                 elements: [{
75                     type: "fieldset",
76                     label: CKEDITOR.tools.htmlEncode(a.replaceAsYouType),
77                     children: [{
78                         type: "vbox",
79                         padding: 0,
80                         children: [{
81                             type: "checkbox",
82                             id: "smartQuotesCheckbox",
83                             option: "smartQuotesAsYouType",
84                             setup: b,
85                             commit: c,
86                             isChanged: !1,
87                             label: a.smartQuotesOption
88                         }, {
89                             type: "checkbox",
90                             id: "formatOrdinalsCheckbox",
91                             option: "formatOrdinalsAsYouType",
92                             setup: b,
93                             commit: c,
94                             isChanged: !1,
95                             label: a.formatOrdinalsOption
96                         }, {
97                             type: "checkbox",
98                             id: "replaceHyphensCheckbox",
99                             option: "replaceHyphensAsYouType",
100                             setup: b,
101                             commit: c,
102                             isChanged: !1,
103                             label: a.replaceHyphensOption
104                         }, {
105                             type: "checkbox",
106                             id: "recognizeUrlsCheckbox",
107                             option: "recognizeUrlsAsYouType",
108                             setup: b,
109                             commit: c,
110                             isChanged: !1,
111                             label: a.recognizeUrlsOption
112                         }]
113                     }]
114                 }, {
115                     type: "fieldset",
116                     label: CKEDITOR.tools.htmlEncode(a.applyAsYouType),
117                     children: [{
118                         type: "vbox",
119                         padding: 0,
120                         children: [{
121                             type: "checkbox",
122                             id: "formatBulletedListsCheckbox",
123                             option: "formatBulletedListsAsYouType",
124                             setup: b,
125                             commit: c,
126                             isChanged: !1,
127                             label: a.formatBulletedListsOption
128                         }, {
129                             type: "checkbox",
130                             id: "formatNumberedListsCheckbox",
131                             option: "formatNumberedListsAsYouType",
132                             setup: b,
133                             commit: c,
134                             isChanged: !1,
135                             label: a.formatNumberedListsOption
136                         }, {
137                             type: "checkbox",
138                             id: "createHorizontalRulesCheckbox",
139                             option: "createHorizontalRulesAsYouType",
140                             setup: b,
141                             commit: c,
142                             isChanged: !1,
143                             label: a.createHorizontalRulesOption
144                         }]
145                     }]
146                 }]
147             }, {
148                 id: "replace",
149                 label: a.autoformat,
150                 accessKey: "",
151                 elements: [{
152                     type: "fieldset",
153                     label: CKEDITOR.tools.htmlEncode(a.replace),
154                     children: [{
155                         type: "vbox",
156                         padding: 0,
157                         children: [{
158                             type: "checkbox",
159                             id: "smartQuotesCheckbox",
160                             option: "smartQuotes",
161                             setup: b,
162                             commit: c,
163                             isChanged: !1,
164                             label: a.smartQuotesOption
165                         }, {
166                             type: "checkbox",
167                             id: "formatOrdinalsCheckbox",
168                             option: "formatOrdinals",
169                             setup: b,
170                             commit: c,
171                             isChanged: !1,
172                             label: a.formatOrdinalsOption
173                         }, {
174                             type: "checkbox",
175                             id: "replaceHyphensCheckbox",
176                             option: "replaceHyphens",
177                             setup: b,
178                             commit: c,
179                             isChanged: !1,
180                             label: a.replaceHyphensOption
181                         }, {
182                             type: "checkbox",
183                             id: "recognizeUrlsCheckbox",
184                             option: "recognizeUrls",
185                             setup: b,
186                             commit: c,
187                             isChanged: !1,
188                             label: a.recognizeUrlsOption
189                         }]
190                     }]
191                 }, {
192                     type: "fieldset",
193                     label: CKEDITOR.tools.htmlEncode(a.apply),
194                     children: [{
195                         type: "vbox",
196                         padding: 0,
197                         children: [{
198                             type: "checkbox",
199                             id: "formatBulletedListsCheckbox",
200                             option: "formatBulletedLists",
201                             setup: b,
202                             commit: c,
203                             isChanged: !1,
204                             label: a.formatBulletedListsOption
205                         }, {
206                             type: "checkbox",
207                             id: "formatNumberedListsCheckbox",
208                             option: "formatNumberedLists",
209                             setup: b,
210                             commit: c,
211                             isChanged: !1,
212                             label: a.formatNumberedListsOption
213                         }, {
214                             type: "checkbox",
215                             id: "createHorizontalRulesCheckbox",
216                             option: "createHorizontalRules",
217                             setup: b,
218                             commit: c,
219                             isChanged: !1,
220                             label: a.createHorizontalRulesOption
221                         }]
222                     }]
223                 }]
224             }],
225             onShow: function() {
226                 this.setupContent()
227             }
228         }
229     })
230 })();