TinyMCE Advanced - Version 4.0

Version Description

Updated for WordPress 3.9 and TinyMCE 4.0. Refreshed the settings screen. Added support for exporting and importing of the settings.

Download this release

Release Info

Developer azaozz
Plugin Icon 128x128 TinyMCE Advanced
Version 4.0
Comparing to
See all releases

Code changes from version 3.5.9.1 to 4.0

Files changed (221) hide show
  1. css/tadv-styles.css +124 -253
  2. images/fontselect.png +0 -0
  3. images/fontsizeselect.png +0 -0
  4. images/formatselect.png +0 -0
  5. images/icons.gif +0 -0
  6. images/layer.gif +0 -0
  7. images/menu.png +0 -0
  8. images/separator.gif +0 -0
  9. images/spacer.gif +0 -0
  10. images/styleselect.png +0 -0
  11. images/tablecontrols.gif +0 -0
  12. images/wp_adv.gif +0 -0
  13. images/wp_more.gif +0 -0
  14. images/wp_page.gif +0 -0
  15. js/tadv.js +99 -64
  16. mce/advhr/css/advhr.css +0 -5
  17. mce/advhr/editor_plugin.js +0 -1
  18. mce/advhr/js/rule.js +0 -43
  19. mce/advhr/langs/de_dlg.js +0 -1
  20. mce/advhr/langs/en_dlg.js +0 -1
  21. mce/advhr/langs/es_dlg.js +0 -1
  22. mce/advhr/langs/fr_dlg.js +0 -1
  23. mce/advhr/langs/it_dlg.js +0 -1
  24. mce/advhr/langs/ja_dlg.js +0 -1
  25. mce/advhr/langs/langs.php +0 -12
  26. mce/advhr/langs/pt_dlg.js +0 -1
  27. mce/advhr/langs/ru_dlg.js +0 -1
  28. mce/advhr/langs/zh_dlg.js +0 -1
  29. mce/advhr/rule.htm +0 -58
  30. mce/advimage/css/advimage.css +0 -13
  31. mce/advimage/editor_plugin.js +0 -1
  32. mce/advimage/image.htm +0 -235
  33. mce/advimage/img/sample.gif +0 -0
  34. mce/advimage/js/image.js +0 -464
  35. mce/advimage/langs/de_dlg.js +0 -1
  36. mce/advimage/langs/en_dlg.js +0 -1
  37. mce/advimage/langs/es_dlg.js +0 -1
  38. mce/advimage/langs/fr_dlg.js +0 -1
  39. mce/advimage/langs/it_dlg.js +0 -1
  40. mce/advimage/langs/ja_dlg.js +0 -1
  41. mce/advimage/langs/langs.php +0 -12
  42. mce/advimage/langs/pt_dlg.js +0 -1
  43. mce/advimage/langs/ru_dlg.js +0 -1
  44. mce/advimage/langs/zh_dlg.js +0 -1
  45. mce/advlink/css/advlink.css +0 -8
  46. mce/advlink/editor_plugin.js +0 -1
  47. mce/advlink/js/advlink.js +0 -543
  48. mce/advlink/langs/de_dlg.js +0 -1
  49. mce/advlink/langs/en_dlg.js +0 -1
  50. mce/advlink/langs/es_dlg.js +0 -1
  51. mce/advlink/langs/fr_dlg.js +0 -1
  52. mce/advlink/langs/it_dlg.js +0 -1
  53. mce/advlink/langs/ja_dlg.js +0 -1
  54. mce/advlink/langs/langs.php +0 -12
  55. mce/advlink/langs/pt_dlg.js +0 -1
  56. mce/advlink/langs/ru_dlg.js +0 -1
  57. mce/advlink/langs/zh_dlg.js +0 -1
  58. mce/advlink/link.htm +0 -338
  59. mce/advlist/editor_plugin.js +0 -1
  60. mce/advlist/plugin.js +93 -0
  61. mce/advlist/plugin.min.js +1 -0
  62. mce/anchor/plugin.js +41 -0
  63. mce/anchor/plugin.min.js +1 -0
  64. mce/code/plugin.js +57 -0
  65. mce/code/plugin.min.js +1 -0
  66. mce/contextmenu/editor_plugin.js +0 -1
  67. mce/contextmenu/plugin.js +77 -0
  68. mce/contextmenu/plugin.min.js +1 -0
  69. mce/emoticons/img/icon_arrow.gif +0 -0
  70. mce/emoticons/img/icon_biggrin.gif +0 -0
  71. mce/emoticons/img/icon_confused.gif +0 -0
  72. mce/emoticons/img/icon_cool.gif +0 -0
  73. mce/emoticons/img/icon_cry.gif +0 -0
  74. mce/emoticons/img/icon_eek.gif +0 -0
  75. mce/emoticons/img/icon_evil.gif +0 -0
  76. mce/emoticons/img/icon_idea.gif +0 -0
  77. mce/emoticons/img/icon_lol.gif +0 -0
  78. mce/emoticons/img/icon_mad.gif +0 -0
  79. mce/emoticons/img/icon_mrgreen.gif +0 -0
  80. mce/emoticons/img/icon_neutral.gif +0 -0
  81. mce/emoticons/img/icon_razz.gif +0 -0
  82. mce/emoticons/img/icon_redface.gif +0 -0
  83. mce/emoticons/img/icon_rolleyes.gif +0 -0
  84. mce/emoticons/img/icon_sad.gif +0 -0
  85. mce/emoticons/img/icon_smile.gif +0 -0
  86. mce/emoticons/img/icon_surprised.gif +0 -0
  87. mce/emoticons/img/icon_twisted.gif +0 -0
  88. mce/emoticons/img/icon_wink.gif +0 -0
  89. mce/emoticons/plugin.js +87 -0
  90. mce/emoticons/plugin.min.js +1 -0
  91. mce/emotions/editor_plugin.js +0 -40
  92. mce/emotions/emotions.htm +0 -94
  93. mce/iespell/editor_plugin.js +0 -1
  94. mce/importcss/plugin.js +193 -0
  95. mce/importcss/plugin.min.js +1 -0
  96. mce/insertdatetime/editor_plugin.js +0 -1
  97. mce/insertdatetime/plugin.js +121 -0
  98. mce/insertdatetime/plugin.min.js +1 -0
  99. mce/layer/editor_plugin.js +0 -1
  100. mce/nonbreaking/editor_plugin.js +0 -1
  101. mce/nonbreaking/plugin.js +53 -0
  102. mce/nonbreaking/plugin.min.js +1 -0
  103. mce/print/editor_plugin.js +0 -1
  104. mce/print/plugin.js +32 -0
  105. mce/print/plugin.min.js +1 -0
  106. mce/searchreplace/css/searchreplace.css +0 -6
  107. mce/searchreplace/editor_plugin.js +0 -1
  108. mce/searchreplace/js/searchreplace.js +0 -148
  109. mce/searchreplace/langs/de_dlg.js +0 -1
  110. mce/searchreplace/langs/en_dlg.js +0 -1
  111. mce/searchreplace/langs/es_dlg.js +0 -1
  112. mce/searchreplace/langs/fr_dlg.js +0 -1
  113. mce/searchreplace/langs/it_dlg.js +0 -1
  114. mce/searchreplace/langs/ja_dlg.js +0 -1
  115. mce/searchreplace/langs/langs.php +0 -12
  116. mce/searchreplace/langs/pt_dlg.js +0 -1
  117. mce/searchreplace/langs/ru_dlg.js +0 -1
  118. mce/searchreplace/langs/zh_dlg.js +0 -1
  119. mce/searchreplace/plugin.js +595 -0
  120. mce/searchreplace/plugin.min.js +1 -0
  121. mce/searchreplace/searchreplace.htm +0 -100
  122. mce/style/css/props.css +0 -15
  123. mce/style/editor_plugin.js +0 -1
  124. mce/style/js/props.js +0 -709
  125. mce/style/langs/de_dlg.js +0 -1
  126. mce/style/langs/en_dlg.js +0 -1
  127. mce/style/langs/es_dlg.js +0 -1
  128. mce/style/langs/fr_dlg.js +0 -1
  129. mce/style/langs/it_dlg.js +0 -1
  130. mce/style/langs/ja_dlg.js +0 -1
  131. mce/style/langs/langs.php +0 -12
  132. mce/style/langs/pt_dlg.js +0 -1
  133. mce/style/langs/ru_dlg.js +0 -1
  134. mce/style/langs/zh_dlg.js +0 -1
  135. mce/style/props.htm +0 -845
  136. mce/table/cell.htm +0 -180
  137. mce/table/css/cell.css +0 -18
  138. mce/table/css/row.css +0 -26
  139. mce/table/css/table.css +0 -14
  140. mce/table/editor_plugin.js +0 -1
  141. mce/table/js/cell.js +0 -319
  142. mce/table/js/merge_cells.js +0 -27
  143. mce/table/js/row.js +0 -254
  144. mce/table/js/table.js +0 -501
  145. mce/table/langs/de_dlg.js +0 -1
  146. mce/table/langs/en_dlg.js +0 -1
  147. mce/table/langs/es_dlg.js +0 -1
  148. mce/table/langs/fr_dlg.js +0 -1
  149. mce/table/langs/it_dlg.js +0 -1
  150. mce/table/langs/ja_dlg.js +0 -1
  151. mce/table/langs/langs.php +0 -12
  152. mce/table/langs/pt_dlg.js +0 -1
  153. mce/table/langs/ru_dlg.js +0 -1
  154. mce/table/langs/zh_dlg.js +0 -1
  155. mce/table/merge_cells.htm +0 -32
  156. mce/table/plugin.js +2293 -0
  157. mce/table/plugin.min.js +1 -0
  158. mce/table/row.htm +0 -158
  159. mce/table/table.htm +0 -188
  160. mce/visualblocks/css/visualblocks.css +128 -0
  161. mce/visualblocks/img/address.gif +0 -0
  162. mce/visualblocks/img/article.gif +0 -0
  163. mce/visualblocks/img/aside.gif +0 -0
  164. mce/visualblocks/img/blockquote.gif +0 -0
  165. mce/visualblocks/img/div.gif +0 -0
  166. mce/visualblocks/img/figure.gif +0 -0
  167. mce/visualblocks/img/h1.gif +0 -0
  168. mce/visualblocks/img/h2.gif +0 -0
  169. mce/visualblocks/img/h3.gif +0 -0
  170. mce/visualblocks/img/h4.gif +0 -0
  171. mce/visualblocks/img/h5.gif +0 -0
  172. mce/visualblocks/img/h6.gif +0 -0
  173. mce/visualblocks/img/hgroup.gif +0 -0
  174. mce/visualblocks/img/ol.gif +0 -0
  175. mce/visualblocks/img/p.gif +0 -0
  176. mce/visualblocks/img/pre.gif +0 -0
  177. mce/visualblocks/img/section.gif +0 -0
  178. mce/visualblocks/img/ul.gif +0 -0
  179. mce/visualblocks/plugin.js +86 -0
  180. mce/visualblocks/plugin.min.js +1 -0
  181. mce/visualchars/editor_plugin.js +0 -1
  182. mce/visualchars/plugin.js +88 -0
  183. mce/visualchars/plugin.min.js +1 -0
  184. mce/xhtmlxtras/abbr.htm +0 -142
  185. mce/xhtmlxtras/acronym.htm +0 -142
  186. mce/xhtmlxtras/attributes.htm +0 -149
  187. mce/xhtmlxtras/cite.htm +0 -142
  188. mce/xhtmlxtras/css/attributes.css +0 -13
  189. mce/xhtmlxtras/css/popup.css +0 -9
  190. mce/xhtmlxtras/css/xhtmlxtras.css +0 -24
  191. mce/xhtmlxtras/del.htm +0 -162
  192. mce/xhtmlxtras/editor_plugin.js +0 -1
  193. mce/xhtmlxtras/ins.htm +0 -162
  194. mce/xhtmlxtras/js/abbr.js +0 -28
  195. mce/xhtmlxtras/js/acronym.js +0 -28
  196. mce/xhtmlxtras/js/attributes.js +0 -111
  197. mce/xhtmlxtras/js/cite.js +0 -28
  198. mce/xhtmlxtras/js/del.js +0 -53
  199. mce/xhtmlxtras/js/element_common.js +0 -229
  200. mce/xhtmlxtras/js/ins.js +0 -53
  201. mce/xhtmlxtras/langs/de_dlg.js +0 -1
  202. mce/xhtmlxtras/langs/en_dlg.js +0 -1
  203. mce/xhtmlxtras/langs/es_dlg.js +0 -1
  204. mce/xhtmlxtras/langs/fr_dlg.js +0 -1
  205. mce/xhtmlxtras/langs/it_dlg.js +0 -1
  206. mce/xhtmlxtras/langs/ja_dlg.js +0 -1
  207. mce/xhtmlxtras/langs/langs.php +0 -12
  208. mce/xhtmlxtras/langs/pt_dlg.js +0 -1
  209. mce/xhtmlxtras/langs/ru_dlg.js +0 -1
  210. mce/xhtmlxtras/langs/zh_dlg.js +0 -1
  211. readme.txt +15 -12
  212. screenshot-1.png +0 -0
  213. screenshot-2.png +0 -0
  214. tadv_admin.php +289 -345
  215. tadv_defaults.php +0 -20
  216. tiny_mce_popup.js +0 -5
  217. tinymce-advanced.php +359 -188
  218. utils/editable_selects.js +0 -70
  219. utils/form_utils.js +0 -210
  220. utils/mctabs.js +0 -162
  221. utils/validate.js +0 -252
css/tadv-styles.css CHANGED
@@ -1,191 +1,98 @@
1
- body {
2
- height: 100%;
3
- }
4
 
5
- .tadvitem div {
6
- width: 20px;
7
- height: 20px;
8
- background: url(../images/icons.gif) no-repeat 20px 20px;
9
- float: left;
10
- margin: 0;
11
  }
12
 
13
- #tadvpalette .tadvmodule div {
14
- margin: 1px 4px 0 3px;
15
  }
16
 
17
- #fontsizeselect {
18
- background: url(../images/fontsizeselect.png) no-repeat 0 0;
19
- width: 94px;
20
  }
21
 
22
- #fontselect {
23
- background: url(../images/fontselect.png) no-repeat 0 0;
24
- width: 94px;
25
  }
26
 
27
- #formatselect {
28
- background: url(../images/formatselect.png) no-repeat 0 0;
29
- width: 94px;
 
 
30
  }
31
 
32
- #layer {
33
- background: url(../images/layer.gif) no-repeat 0 0;
34
- width: 88px;
35
  }
36
 
37
- #styleselect {
38
- background: url(../images/styleselect.png) no-repeat 0 0;
39
- width: 94px;
40
  }
41
 
42
- #tablecontrols {
43
- background: url(../images/tablecontrols.gif) no-repeat 0 0;
44
- width: 285px;
 
 
45
  }
46
 
47
- #wp_adv {
48
- background: url(../images/wp_adv.gif) no-repeat 0 0;
 
49
  }
50
 
51
- #wp_more {
52
- background: url(../images/wp_more.gif) no-repeat 0 0;
53
  }
54
 
55
- #wp_page {
56
- background: url(../images/wp_page.gif) no-repeat 0 0;
 
 
 
 
 
 
57
  }
58
 
59
- #fontsizeselect,
60
- #fontselect,
61
- #formatselect,
62
- #styleselect {
63
- border: 1px solid #ccc;
64
  }
65
 
66
- #tadvpalettediv #fontsizeselect,
67
- #tadvpalettediv #fontselect,
68
- #tadvpalettediv #formatselect,
69
- #tadvpalettediv #styleselect {
70
- border: 0;
71
- }
72
-
73
- /* Theme */
74
- #bold {background-position:0 0}
75
- #italic {background-position:-60px 0}
76
- #underline {background-position:-140px 0}
77
- #strikethrough {background-position:-120px 0}
78
- #undo {background-position:-160px 0}
79
- #redo {background-position:-100px 0}
80
- #cleanup {background-position:-40px 0}
81
- #bullist {background-position:-20px 0}
82
- #numlist {background-position:-80px 0}
83
- #justifyleft {background-position:-460px 0}
84
- #justifyright {background-position:-480px 0}
85
- #justifycenter {background-position:-420px 0}
86
- #justifyfull {background-position:-440px 0}
87
- #anchor {background-position:-200px 0}
88
- #indent {background-position:-400px 0}
89
- #outdent {background-position:-540px 0}
90
- #link {background-position:-500px 0}
91
- #unlink {background-position:-640px 0}
92
- #sub {background-position:-600px 0}
93
- #sup {background-position:-620px 0}
94
- #removeformat {background-position:-580px 0}
95
- #newdocument {background-position:-520px 0}
96
- #image {background-position:-380px 0}
97
- #wp_help {background-position:-340px 0}
98
- #code {background-position:-260px 0}
99
- #hr {background-position:-360px 0}
100
- #visualaid {background-position:-660px 0}
101
- #charmap {background-position:-240px 0}
102
- #paste {background-position:-560px 0}
103
- #copy {background-position:-700px 0}
104
- #cut {background-position:-680px 0}
105
- #blockquote {background-position:-220px 0}
106
- #forecolor {background-position:-720px 0}
107
- #backcolor {background-position:-760px 0}
108
-
109
- /* Plugins */
110
- #advhr {background-position:-0px -20px}
111
- #ltr {background-position:-20px -20px}
112
- #rtl {background-position:-40px -20px}
113
- #emotions {background-position:-60px -20px}
114
- #fullpage {background-position:-80px -20px}
115
- #fullscreen {background-position:-100px -20px}
116
- #iespell {background-position:-120px -20px}
117
- #insertdate {background-position:-140px -20px}
118
- #inserttime {background-position:-160px -20px}
119
- #absolute {background-position:-180px -20px}
120
- #backward {background-position:-200px -20px}
121
- #forward {background-position:-220px -20px}
122
- #insert_layer {background-position:-240px -20px}
123
- #insertlayer {background-position:-260px -20px}
124
- #movebackward {background-position:-280px -20px}
125
- #moveforward {background-position:-300px -20px}
126
- #media {background-position:-320px -20px}
127
- #nonbreaking {background-position:-340px -20px}
128
- #pastetext {background-position:-360px -20px}
129
- #pasteword {background-position:-380px -20px}
130
- #selectall {background-position:-400px -20px}
131
- #preview {background-position:-420px -20px}
132
- #print {background-position:-440px -20px}
133
- #cancel {background-position:-460px -20px}
134
- #save {background-position:-480px -20px}
135
- #replace {background-position:-500px -20px}
136
- #search {background-position:-520px -20px}
137
- #styleprops {background-position:-560px -20px}
138
- #table {background-position:-580px -20px}
139
- #cell_props {background-position:-600px -20px}
140
- #delete_table {background-position:-620px -20px}
141
- #delete_col {background-position:-640px -20px}
142
- #delete_row {background-position:-660px -20px}
143
- #col_after {background-position:-680px -20px}
144
- #col_before {background-position:-700px -20px}
145
- #row_after {background-position:-720px -20px}
146
- #row_before {background-position:-740px -20px}
147
- #merge_cells {background-position:-760px -20px}
148
- #table_props {background-position:-980px -20px}
149
- #row_props {background-position:-780px -20px}
150
- #split_cells {background-position:-800px -20px}
151
- #template {background-position:-820px -20px}
152
- #visualchars {background-position:-840px -20px}
153
- #abbr {background-position:-860px -20px}
154
- #acronym {background-position:-880px -20px}
155
- #attribs {background-position:-900px -20px}
156
- #cite {background-position:-920px -20px}
157
- #del {background-position:-940px -20px}
158
- #ins {background-position:-960px -20px}
159
- #pagebreak {background-position:0 -40px}
160
- #restoredraft {background-position:-20px -40px}
161
- #spellchecker {background-position:-540px -20px}
162
-
163
- label.tadv-box {
164
- margin: 0 5px;
165
- padding: 2px 4px;
166
- background-color: #eee;
167
- line-height: 28px;
168
- border: 1px solid #ccc;
169
- vertical-align: baseline;
170
- background-color: rgba(50, 50, 50, 0.05);
171
  }
172
 
173
- form#tadvadmin {
174
- margin-left: 17px;
 
 
 
 
 
 
175
  }
176
 
177
- #tadvadmin p {
178
- margin: 6px 0;
 
179
  }
180
 
181
- .separator, .tadvmodule {
182
  position: relative;
183
  top: 0px;
184
  left: 0px;
185
  z-index: 0;
186
  }
187
 
188
- #tadvadmin, #tadvzones, #tadvpalette {
 
189
  -moz-user-select: none;
190
  -khtml-user-select: none;
191
  user-select: none;
@@ -200,41 +107,40 @@ form#tadvadmin {
200
  }
201
 
202
  #tadvzones {
203
- margin-right: 280px;
204
  }
205
 
206
  .tadvdropzone {
207
- float: left;
208
- width: 99.99%;
209
- padding: 0;
210
- height: 40px;
211
- margin: 8px 0;
212
- z-index: -1;
213
  }
 
214
  .tadvdropzone .descr {
215
  display: none;
216
  }
217
 
218
- #tadvpalettediv .tadvitem {
219
- background-color: #eee;
220
- }
221
-
222
  .tadvdropzone .tadvmodule .tadvitem {
 
223
  display: block;
224
- height: 20px;
225
  margin: 1px;
226
- padding: 1px 2px;
227
  width: 20px;
 
 
 
 
 
 
 
228
  }
229
 
230
  .tadvdropzone ul {
231
  height: 30px;
232
- width: 99%;
233
- float: left;
234
  margin: 0;
235
- padding: 2px 4px;
236
- border: 1px solid #ccc;
237
- background: #e5e5e5;
238
  }
239
 
240
  #tadvadmin .tadvmodule {
@@ -243,14 +149,14 @@ form#tadvadmin {
243
  }
244
 
245
  .tadvdropzone .tadvmodule {
246
- width: 29px;
247
- height: 27px;
248
- margin: 2px 0 0;
249
  padding: 0;
250
  float: left;
251
  }
252
 
253
- #tadvpalette li,
254
  .tadvdropzone li {
255
  float: left;
256
  margin: 0;
@@ -259,126 +165,91 @@ form#tadvadmin {
259
  margin-bottom: 0;
260
  }
261
 
262
- #tadvpalette {
263
- border: 1px solid #ccc;
264
- background-color: #f3f3f3;
265
  height: 64px;
266
  padding: 4px;
267
  margin: 8px 0;
268
  }
269
 
270
- #tadvpalette .tadvmodule .tadvitem {
271
  display: block;
272
  height: 22px;
273
- width: 134px;
274
- border: 1px solid #ccc;
275
  background-color: #fff;
276
  margin: 4px;
277
- -webkit-border-radius: 3px;
278
- border-radius: 3px;
 
279
  }
280
 
281
- #tadvpalette .tadvmodule .descr {
282
  display: inline;
283
  font-size: 12px;
284
- line-height: 21px;
285
  }
286
 
287
- * html #tadvpalette .tadvmodule img {
288
- vertical-align: middle;
289
  }
290
 
291
- #pre_formatselect.tadvmodule .tadvitem,
292
- #pre_styleselect.tadvmodule .tadvitem,
293
- #pre_fontsizeselect.tadvmodule .tadvitem,
294
- #pre_fontselect.tadvmodule .tadvitem {
295
- width: 98px;
296
  }
297
 
298
- #pre_tablecontrols.tadvmodule .tadvitem {
299
- width: 335px;
300
  }
301
 
302
- #pre_vipersvideoquicktags.tadvmodule .tadvitem {
303
- width: 305px;
304
  }
305
 
306
- .tadvdropzone #pre_formatselect,
307
- .tadvdropzone #pre_styleselect,
308
- .tadvdropzone #pre_fontsizeselect,
309
- .tadvdropzone #pre_fontselect {
310
- width: 101px;
 
 
 
 
 
 
 
311
  }
312
 
313
- .tadvdropzone #pre_formatselect .tadvitem,
314
- .tadvdropzone #pre_styleselect .tadvitem,
315
- .tadvdropzone #pre_fontsizeselect .tadvitem,
316
- .tadvdropzone #pre_fontselect .tadvitem {
317
  width: 92px;
 
318
  }
319
 
320
- .tadvdropzone #pre_tablecontrols {
321
  width: 294px;
322
  }
323
 
324
- .tadvdropzone #pre_tablecontrols .tadvitem {
325
  width: 285px;
326
  }
327
 
328
- .tadvdropzone #pre_layer {
329
- width: 97px;
330
- }
331
-
332
- .tadvdropzone #pre_layer .tadvitem {
333
- width: 88px;
334
- }
335
-
336
- #tadvpalette .separator,
337
- .tadvdropzone .separator {
338
- float: left;
339
- cursor: crosshair;
340
- }
341
-
342
- .separator .tadvitem {
343
- background: #333333 none repeat scroll 0%;
344
- display: block;
345
- height: 26px;
346
- margin: 0 2px;
347
- width: 1px;
348
- }
349
-
350
- #tadvpalette .separator .tadvitem {
351
- background-color: #e5e5e5;
352
- border: 1px solid #AAAAAA;
353
- display: block;
354
- height: 20px;
355
- margin: 4px;
356
- padding: 1px 3px;
357
- }
358
-
359
- .tadvdropzone .separator {
360
- background: transparent;
361
- display: block;
362
- height: 28px;
363
- margin: 2px 1px 0pt 0pt;
364
- }
365
-
366
- #tadvWarnmsg,
367
- #tadvWarnmsg2 {
368
  color: #ff0000;
369
  font-weight: bold;
370
  height: 26px;
371
  line-height: 26px;
 
372
  }
373
 
374
- #tadv_uninst_div {
375
- display: none;
376
- background: #FFFFE0;
377
- border: 1px solid #E6DB55;
378
- padding: 8px;
379
- margin-left: 20px;
380
  }
381
 
382
- .tadv_btn.button-primary {
383
- margin: 0 10px;
384
  }
 
 
 
1
 
2
+ .tadv-more-plugins label {
3
+ font-weight: bold;
4
+ padding: 0 10px;
 
 
 
5
  }
6
 
7
+ .advanced-options label {
8
+ font-weight: bold;
9
  }
10
 
11
+ .advanced-options {
12
+ padding: 0 12px;
13
+ border: 1px solid red;
14
  }
15
 
16
+ .tadv-submit .button-large {
17
+ float: right;
 
18
  }
19
 
20
+ #tadv-confirm-uninstall {
21
+ display: none;
22
+ background: #FFFFE0;
23
+ border: 1px solid #E6DB55;
24
+ padding: 8px;
25
  }
26
 
27
+ #tadv-confirm-uninstall .button {
28
+ margin: 0 5px;
 
29
  }
30
 
31
+ .tadv-import-export {
32
+ max-width: 800px;
33
+ min-width: 320px;
34
  }
35
 
36
+ #tadv-export,
37
+ #tadv-import {
38
+ width: 100%;
39
+ height: 300px;
40
+ padding: 8px 12px;
41
  }
42
 
43
+ ul.container,
44
+ #unused {
45
+ position: relative;
46
  }
47
 
48
+ #unused .tadvmodule div {
49
+ margin: 1px 4px 0 3px;
50
  }
51
 
52
+ .tadvitem i.mce-ico {
53
+ width: 20px;
54
+ height: 20px;
55
+ line-height: 20px;
56
+ text-align: center;
57
+ margin: 0;
58
+ padding: 0;
59
+ color: #555;
60
  }
61
 
62
+ .tadvitem i.mce-ico.mce-i-ltr {
63
+ font-family: tinymce;
64
+ font-size: 16px;
65
+ vertical-align: text-top;
 
66
  }
67
 
68
+ .tadvitem i.mce-ico.mce-i-ltr:before {
69
+ content: "\e02f";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  }
71
 
72
+ #tadv-menu-img {
73
+ height: 28px;
74
+ margin-bottom: 0;
75
+ background: #fff url(../images/menu.png) no-repeat 0 center;
76
+ border: 1px solid #ccc;
77
+ border-bottom: 0;
78
+ opacity: 0.4;
79
+ filter: alpha(opacity=40);
80
  }
81
 
82
+ #tadv-menu-img.enabled {
83
+ opacity: 1;
84
+ filter: alpha(opacity=100);
85
  }
86
 
87
+ .tadvmodule {
88
  position: relative;
89
  top: 0px;
90
  left: 0px;
91
  z-index: 0;
92
  }
93
 
94
+ #tadvzones,
95
+ #unused {
96
  -moz-user-select: none;
97
  -khtml-user-select: none;
98
  user-select: none;
107
  }
108
 
109
  #tadvzones {
110
+ margin: 25px 280px 0 0;
111
  }
112
 
113
  .tadvdropzone {
114
+ padding: 2px 4px;
115
+ margin: 0 0 10px;
116
+ background-color: #fff;
117
+ border: 1px solid #bbb;
 
 
118
  }
119
+
120
  .tadvdropzone .descr {
121
  display: none;
122
  }
123
 
 
 
 
 
124
  .tadvdropzone .tadvmodule .tadvitem {
125
+ border: 1px solid transparent;
126
  display: block;
 
127
  margin: 1px;
128
+ padding: 2px 3px;
129
  width: 20px;
130
+ height: 20px;
131
+ -webkit-border-radius: 2px;
132
+ border-radius: 2px;
133
+ }
134
+
135
+ .tadvdropzone .tadvmodule .tadvitem:hover {
136
+ border-color: #999;
137
  }
138
 
139
  .tadvdropzone ul {
140
  height: 30px;
141
+ width: 100%;
 
142
  margin: 0;
143
+ padding: 1px 0 0;
 
 
144
  }
145
 
146
  #tadvadmin .tadvmodule {
149
  }
150
 
151
  .tadvdropzone .tadvmodule {
152
+ width: 32px;
153
+ height: 28px;
154
+ margin: 0;
155
  padding: 0;
156
  float: left;
157
  }
158
 
159
+ #unused li,
160
  .tadvdropzone li {
161
  float: left;
162
  margin: 0;
165
  margin-bottom: 0;
166
  }
167
 
168
+ #unused {
169
+ border: 1px solid #bbb;
170
+ background-color: ##f6f3f6;
171
  height: 64px;
172
  padding: 4px;
173
  margin: 8px 0;
174
  }
175
 
176
+ #unused .tadvmodule .tadvitem {
177
  display: block;
178
  height: 22px;
179
+ width: 140px;
180
+ border: 1px solid #bbb;
181
  background-color: #fff;
182
  margin: 4px;
183
+ padding: 1px 3px;
184
+ -webkit-border-radius: 2px;
185
+ border-radius: 2px;
186
  }
187
 
188
+ #unused .tadvmodule .descr {
189
  display: inline;
190
  font-size: 12px;
191
+ line-height: 22px;
192
  }
193
 
194
+ #fontsizeselect .tadvitem {
195
+ background: url(../images/fontsizeselect.png) no-repeat center center;
196
  }
197
 
198
+ #fontselect .tadvitem {
199
+ background: url(../images/fontselect.png) no-repeat center center;
 
 
 
200
  }
201
 
202
+ #formatselect .tadvitem {
203
+ background: url(../images/formatselect.png) no-repeat center center;
204
  }
205
 
206
+ #styleselect .tadvitem {
207
+ background: url(../images/styleselect.png) no-repeat center center;
208
  }
209
 
210
+ #formatselect.tadvmodule .tadvitem,
211
+ #styleselect.tadvmodule .tadvitem,
212
+ #fontsizeselect.tadvmodule .tadvitem,
213
+ #fontselect.tadvmodule .tadvitem {
214
+ width: 98px;
215
+ }
216
+
217
+ .tadvdropzone #formatselect,
218
+ .tadvdropzone #styleselect,
219
+ .tadvdropzone #fontsizeselect,
220
+ .tadvdropzone #fontselect {
221
+ width: 104px;
222
  }
223
 
224
+ .tadvdropzone #formatselect .tadvitem,
225
+ .tadvdropzone #styleselect .tadvitem,
226
+ .tadvdropzone #fontsizeselect .tadvitem,
227
+ .tadvdropzone #fontselect .tadvitem {
228
  width: 92px;
229
+ border-color: #bbb;
230
  }
231
 
232
+ .tadvdropzone #tablecontrols {
233
  width: 294px;
234
  }
235
 
236
+ .tadvdropzone #tablecontrols .tadvitem {
237
  width: 285px;
238
  }
239
 
240
+ div.tadv-error {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
241
  color: #ff0000;
242
  font-weight: bold;
243
  height: 26px;
244
  line-height: 26px;
245
+ visibility: hidden;
246
  }
247
 
248
+ .wp-adv-error #wp-adv-error-message,
249
+ .length-error #length-error-message {
250
+ visibility: visible;
 
 
 
251
  }
252
 
253
+ .wp-adv-error #wp_adv .tadvitem {
254
+ border-color: red;
255
  }
images/fontselect.png CHANGED
Binary file
images/fontsizeselect.png CHANGED
Binary file
images/formatselect.png CHANGED
Binary file
images/icons.gif DELETED
Binary file
images/layer.gif DELETED
Binary file
images/menu.png ADDED
Binary file
images/separator.gif DELETED
Binary file
images/spacer.gif DELETED
Binary file
images/styleselect.png CHANGED
Binary file
images/tablecontrols.gif DELETED
Binary file
images/wp_adv.gif DELETED
Binary file
images/wp_more.gif DELETED
Binary file
images/wp_page.gif DELETED
Binary file
js/tadv.js CHANGED
@@ -1,116 +1,151 @@
1
- // TinyMCE Advanced jQuery sortables
2
-
3
- (function($) {
4
  tadvSortable = {
5
 
6
  init : function() {
7
- $("#toolbar_1").sortable({
8
- connectWith: ["#toolbar_2, #toolbar_3, #toolbar_4, #tadvpalette"],
 
 
9
  items : 'li',
10
- stop : tadvSortable.update,
 
11
  revert : true,
12
  opacity : 0.7,
13
  containment : '#contain'
14
  });
15
 
16
- $("#toolbar_2").sortable({
17
- connectWith: ["#toolbar_1, #toolbar_3, #toolbar_4, #tadvpalette"],
18
  items : 'li',
19
- stop : tadvSortable.update,
20
  revert : true,
21
  opacity : 0.7,
22
  containment : '#contain'
23
  });
24
 
25
- $("#toolbar_3").sortable({
26
- connectWith: ["#toolbar_2, #toolbar_1, #toolbar_4, #tadvpalette"],
27
  items : 'li',
28
- stop : tadvSortable.update,
29
  revert : true,
30
  opacity : 0.7,
31
  containment : '#contain'
32
  });
33
 
34
- $("#toolbar_4").sortable({
35
- connectWith: ["#toolbar_2, #toolbar_3, #toolbar_1, #tadvpalette"],
36
  items : 'li',
37
- stop : tadvSortable.update,
38
  revert : true,
39
  opacity : 0.7,
40
  containment : '#contain'
41
  });
42
 
43
- $("#tadvpalette").sortable({
44
- connectWith: ["#toolbar_1, #toolbar_2, #toolbar_3, #toolbar_4"],
45
  items : 'li',
46
- stop : tadvSortable.update,
47
  revert : true,
48
  opacity : 0.7,
49
  containment : '#contain'
50
  });
51
 
52
  this.update();
53
- $(window).resize(function(){
54
- tadvSortable.update();
 
55
  });
56
- },
57
 
58
- I : function(a) {
59
- return document.getElementById(a);
60
- },
61
 
62
- serialize : function() {
63
- var tb1, tb2, tb3, tb4;
64
-
65
- tb1 = $('#toolbar_1').sortable('serialize',{expression : '([^_]+)_(.+)'});
66
- tb2 = $('#toolbar_2').sortable('serialize',{expression : '([^_]+)_(.+)'});
67
- tb3 = $('#toolbar_3').sortable('serialize',{expression : '([^_]+)_(.+)'})
68
- tb4 = $('#toolbar_4').sortable('serialize',{expression : '([^_]+)_(.+)'})
69
-
70
- $('#toolbar_1order').val(tb1);
71
- $('#toolbar_2order').val(tb2);
72
- $('#toolbar_3order').val(tb3);
73
- $('#toolbar_4order').val(tb4);
74
-
75
- if ( (tb1.indexOf('wp_adv') != -1 && ! tb2) ||
76
- (tb2.indexOf('wp_adv') != -1 && ! tb3) ||
77
- (tb3.indexOf('wp_adv') != -1 && ! tb4) ||
78
- tb4.indexOf('wp_adv') != -1 ) {
79
- $('#sink_err').css('display', 'inline');
80
- return false;
81
- }
82
- $('#tadvadmin').submit();
83
  },
84
 
85
  reset : function() {
86
- var pd = this.I('tadvpalette');
87
- if ( ! pd ) return;
88
- if( pd.childNodes.length > 6 ) {
89
- var last = pd.lastChild.previousSibling;
90
- pd.style.height = last.offsetTop + last.offsetHeight + 30 + "px";
91
- } else pd.style.height = "60px";
92
- },
93
 
94
- update : function() {
95
- var t = tadvSortable, w;
96
 
97
- t.reset();
98
- $('#too_long').css('display', 'none');
99
- $('#sink_err').css('display', 'none');
100
 
101
- $('.container').each(function(no,o){
102
- var kids = o.childNodes, tbwidth = o.clientWidth, W = 0;
103
 
104
- for( i = 0; i < kids.length; i++ ) {
105
  if ( w = kids[i].offsetWidth )
106
  W += w;
107
  }
108
 
109
- if( (W+8) > tbwidth )
110
- $('#too_long').css('display', 'inline');
111
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
112
  }
113
  }
114
- }(jQuery));
115
 
116
- jQuery(document).ready(function(){ tadvSortable.init(); });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // TinyMCE Advanced
2
+ ( function($) {
 
3
  tadvSortable = {
4
 
5
  init : function() {
6
+ var self = this;
7
+
8
+ $('#tb1').sortable({
9
+ connectWith: '#tb2, #tb3, #tb4, #unused',
10
  items : 'li',
11
+ cursor: 'move',
12
+ stop : self.update,
13
  revert : true,
14
  opacity : 0.7,
15
  containment : '#contain'
16
  });
17
 
18
+ $('#tb2').sortable({
19
+ connectWith: '#tb1, #tb3, #tb4, #unused',
20
  items : 'li',
21
+ stop : self.update,
22
  revert : true,
23
  opacity : 0.7,
24
  containment : '#contain'
25
  });
26
 
27
+ $('#tb3').sortable({
28
+ connectWith: '#tb1, #tb2, #tb4, #unused',
29
  items : 'li',
30
+ stop : self.update,
31
  revert : true,
32
  opacity : 0.7,
33
  containment : '#contain'
34
  });
35
 
36
+ $('#tb4').sortable({
37
+ connectWith: '#tb1, #tb2, #tb3, #unused',
38
  items : 'li',
39
+ stop : self.update,
40
  revert : true,
41
  opacity : 0.7,
42
  containment : '#contain'
43
  });
44
 
45
+ $('#unused').sortable({
46
+ connectWith: '#tb1, #tb2, #tb3, #tb4',
47
  items : 'li',
48
+ stop : self.update,
49
  revert : true,
50
  opacity : 0.7,
51
  containment : '#contain'
52
  });
53
 
54
  this.update();
55
+
56
+ $(window).resize( function() {
57
+ self.update();
58
  });
 
59
 
60
+ $('#tadvadmin').on( 'submit', function(e) {
61
+ var toolbars234 = $('#tb2, #tb3, #tb4');
 
62
 
63
+ if ( toolbars234.find('li#wp_adv').length || ! toolbars234.find('li').length ) {
64
+ $(document.body).addClass('wp-adv-error');
65
+ e.preventDefault();
66
+ }
67
+ });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  },
69
 
70
  reset : function() {
71
+ var el = $('#unused'), el_node = el.get(0), last, w, i;
 
 
 
 
 
 
72
 
73
+ if ( !el.length )
74
+ return;
75
 
76
+ $(document.body).removeClass('wp-adv-error length-error');
 
 
77
 
78
+ $('.container').each( function( num, ul ) {
79
+ var kids = ul.childNodes, tbwidth = ul.clientWidth, W = 0;
80
 
81
+ for ( i in kids ) {
82
  if ( w = kids[i].offsetWidth )
83
  W += w;
84
  }
85
 
86
+ if ( ( W + 8 ) > tbwidth )
87
+ $(document.body).addClass('length-error');
88
  });
89
+
90
+ if ( el_node.childNodes.length > 6 ) {
91
+ last = el_node.lastChild.previousSibling;
92
+ el.height( last.offsetTop + last.offsetHeight + 30 );
93
+ } else {
94
+ el.height(60);
95
+ }
96
+ },
97
+
98
+ update : function(e, ui) {
99
+ var toolbar_id;
100
+
101
+ tadvSortable.reset();
102
+
103
+ if ( ui && ( toolbar_id = ui.item.parent().attr('id') ) )
104
+ ui.item.find('input.tadv-button').attr('name', toolbar_id + '[]');
105
  }
106
  }
 
107
 
108
+ $( document ).ready( function() {
109
+ var $uninstall = $('#tadv-confirm-uninstall'),
110
+ $importElement = $('#tadv-import'),
111
+ $importError = $('#tadv-import-error');
112
+
113
+ tadvSortable.init();
114
+
115
+ $( '#menubar' ).on( 'change', function() {
116
+ $( '#tadv-menu-img' ).toggleClass( 'enabled', $(this).prop('checked') );
117
+ });
118
+
119
+ $('#tadv-remove-settings').click( function() {
120
+ $uninstall.show();
121
+ });
122
+
123
+ $('#tadv-cancel').click( function() {
124
+ $uninstall.hide();
125
+ });
126
+
127
+ $('#tadv-export-select').click( function() {
128
+ $('#tadv-export').focus().select();
129
+ });
130
+
131
+ $importElement.change( function() {
132
+ $importError.empty();
133
+ });
134
+
135
+ $('#tadv-import-verify').click( function() {
136
+ var string, parsed;
137
+
138
+ string = ( $importElement.val() || '' ).replace( /^[^{]*/, '' ).replace( /[^}]*$/, '' );
139
+ $importElement.val( string );
140
+
141
+ try {
142
+ parsed = JSON.parse( string );
143
+ } catch( error ) {
144
+ $importError.text( error );
145
+ return;
146
+ }
147
+
148
+ $importError.text( 'No errors.' );
149
+ });
150
+ });
151
+ }(jQuery));
mce/advhr/css/advhr.css DELETED
@@ -1,5 +0,0 @@
1
- input.radio {border:1px none #000; background:transparent; vertical-align:middle;}
2
- .panel_wrapper div.current {min-height:80px;height:auto;}
3
- #width {width:50px; vertical-align:middle;}
4
- #width2 {width:50px; vertical-align:middle;}
5
- #size {width:100px;}
 
 
 
 
 
mce/advhr/editor_plugin.js DELETED
@@ -1 +0,0 @@
1
- (function(){tinymce.create("tinymce.plugins.AdvancedHRPlugin",{init:function(a,b){a.addCommand("mceAdvancedHr",function(){a.windowManager.open({file:b+"/rule.htm",width:250+parseInt(a.getLang("advhr.delta_width",0)),height:160+parseInt(a.getLang("advhr.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("advhr",{title:"advhr.advhr_desc",cmd:"mceAdvancedHr"});a.onNodeChange.add(function(d,c,e){c.setActive("advhr",e.nodeName=="HR")});a.onClick.add(function(c,d){d=d.target;if(d.nodeName==="HR"){c.selection.select(d)}})},getInfo:function(){return{longname:"Advanced HR",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advhr",tinymce.plugins.AdvancedHRPlugin)})();
 
mce/advhr/js/rule.js DELETED
@@ -1,43 +0,0 @@
1
- var AdvHRDialog = {
2
- init : function(ed) {
3
- var dom = ed.dom, f = document.forms[0], n = ed.selection.getNode(), w;
4
-
5
- w = dom.getAttrib(n, 'width');
6
- f.width.value = w ? parseInt(w) : (dom.getStyle('width') || '');
7
- f.size.value = dom.getAttrib(n, 'size') || parseInt(dom.getStyle('height')) || '';
8
- f.noshade.checked = !!dom.getAttrib(n, 'noshade') || !!dom.getStyle('border-width');
9
- selectByValue(f, 'width2', w.indexOf('%') != -1 ? '%' : 'px');
10
- },
11
-
12
- update : function() {
13
- var ed = tinyMCEPopup.editor, h, f = document.forms[0], st = '';
14
-
15
- h = '<hr';
16
-
17
- if (f.size.value) {
18
- h += ' size="' + f.size.value + '"';
19
- st += ' height:' + f.size.value + 'px;';
20
- }
21
-
22
- if (f.width.value) {
23
- h += ' width="' + f.width.value + (f.width2.value == '%' ? '%' : '') + '"';
24
- st += ' width:' + f.width.value + (f.width2.value == '%' ? '%' : 'px') + ';';
25
- }
26
-
27
- if (f.noshade.checked) {
28
- h += ' noshade="noshade"';
29
- st += ' border-width: 1px; border-style: solid; border-color: #CCCCCC; color: #ffffff;';
30
- }
31
-
32
- if (ed.settings.inline_styles)
33
- h += ' style="' + tinymce.trim(st) + '"';
34
-
35
- h += ' />';
36
-
37
- ed.execCommand("mceInsertContent", false, h);
38
- tinyMCEPopup.close();
39
- }
40
- };
41
-
42
- tinyMCEPopup.requireLangPack();
43
- tinyMCEPopup.onInit.add(AdvHRDialog.init, AdvHRDialog);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/advhr/langs/de_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('de.advhr_dlg',{size:"H\u00f6he",noshade:"Kein Schatten",width:"Breite",normal:"Normal",widthunits:"Einheiten"});
 
mce/advhr/langs/en_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('en.advhr_dlg',{size:"Height",noshade:"No Shadow",width:"Width",normal:"Normal",widthunits:"Units"});
 
mce/advhr/langs/es_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('es.advhr_dlg',{size:"Alto",noshade:"Sin sombra",width:"Ancho",normal:"Normal",widthunits:"Unidades"});
 
mce/advhr/langs/fr_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('fr.advhr_dlg',{size:"Hauteur",noshade:"Pas d\'ombre",width:"Largeur",normal:"Normal",widthunits:"Unit\u00e9s"});
 
mce/advhr/langs/it_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('it.advhr_dlg',{size:"Altezza",noshade:"Senza ombreggiatura",width:"Larghezza",normal:"Normale",widthunits:"Unit\u00e0"});
 
mce/advhr/langs/ja_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('ja.advhr_dlg',{size:"\u9ad8\u3055",noshade:"\u5f71\u306a\u3057",width:"\u5e45",normal:"\u901a\u5e38",widthunits:"\u5358\u4f4d"});
 
mce/advhr/langs/langs.php DELETED
@@ -1,12 +0,0 @@
1
- <?php
2
- $lang_file = dirname(__FILE__) . '/' . $mce_locale . '_dlg.js';
3
-
4
- if ( ! is_file( $lang_file ) && defined( 'TINYMCE_ADVANCED_LANGUAGES_PATH' ) )
5
- $lang_file = TINYMCE_ADVANCED_LANGUAGES_PATH . 'advhr/langs/' . $mce_locale . '_dlg.js';
6
-
7
- if ( is_file( $lang_file ) && is_readable( $lang_file ) ) {
8
- $strings = tdav_get_file( $lang_file );
9
- } else {
10
- $strings = tdav_get_file( dirname(__FILE__) . '/en_dlg.js' );
11
- $strings = preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $strings, 1 );
12
- }
 
 
 
 
 
 
 
 
 
 
 
 
mce/advhr/langs/pt_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('pt.advhr_dlg',{size:"Altura",noshade:"Sem sombra",width:"Largura",normal:"Normal",widthunits:"Unids"});
 
mce/advhr/langs/ru_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('ru.advhr_dlg',{size:"\u0412\u044b\u0441\u043e\u0442\u0430",noshade:"\u0411\u0435\u0437 \u0442\u0435\u043d\u0438",width:"\u0428\u0438\u0440\u0438\u043d\u0430",normal:"\u041e\u0431\u044b\u0447\u043d\u0430\u044f",widthunits:"\u0415\u0434\u0438\u043d\u0438\u0446\u044b \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f"});
 
mce/advhr/langs/zh_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('zh.advhr_dlg',{size:"\u9ad8",noshade:"\u65e0\u9634\u5f71",width:"\u5bbd",normal:"\u6807\u51c6",widthunits:"\u5355\u4f4d"});
 
mce/advhr/rule.htm DELETED
@@ -1,58 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <title>{#advhr.advhr_desc}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=359"></script>
6
- <script type="text/javascript" src="js/rule.js?ver=359"></script>
7
- <script type="text/javascript" src="../../utils/mctabs.js?ver=359"></script>
8
- <script type="text/javascript" src="../../utils/form_utils.js?ver=359"></script>
9
- <link href="css/advhr.css?ver=359" rel="stylesheet" type="text/css" />
10
- </head>
11
- <body role="application">
12
- <form onsubmit="AdvHRDialog.update();return false;" action="#">
13
- <div class="tabs">
14
- <ul>
15
- <li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advhr.advhr_desc}</a></span></li>
16
- </ul>
17
- </div>
18
-
19
- <div class="panel_wrapper">
20
- <div id="general_panel" class="panel current">
21
- <table role="presentation" border="0" cellpadding="4" cellspacing="0">
22
- <tr role="group" aria-labelledby="width_label">
23
- <td><label id="width_label" for="width">{#advhr_dlg.width}</label></td>
24
- <td class="nowrap">
25
- <input id="width" name="width" type="text" value="" class="mceFocus" />
26
- <span style="display:none;" id="width_unit_label">{#advhr_dlg.widthunits}</span>
27
- <select name="width2" id="width2" aria-labelledby="width_unit_label">
28
- <option value="">px</option>
29
- <option value="%">%</option>
30
- </select>
31
- </td>
32
- </tr>
33
- <tr>
34
- <td><label for="size">{#advhr_dlg.size}</label></td>
35
- <td><select id="size" name="size">
36
- <option value="">{#advhr_dlg.normal}</option>
37
- <option value="1">1</option>
38
- <option value="2">2</option>
39
- <option value="3">3</option>
40
- <option value="4">4</option>
41
- <option value="5">5</option>
42
- </select></td>
43
- </tr>
44
- <tr>
45
- <td><label for="noshade">{#advhr_dlg.noshade}</label></td>
46
- <td><input type="checkbox" name="noshade" id="noshade" class="radio" /></td>
47
- </tr>
48
- </table>
49
- </div>
50
- </div>
51
-
52
- <div class="mceActionPanel">
53
- <input type="submit" id="insert" name="insert" value="{#insert}" />
54
- <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
55
- </div>
56
- </form>
57
- </body>
58
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/advimage/css/advimage.css DELETED
@@ -1,13 +0,0 @@
1
- #src_list, #over_list, #out_list {width:280px;}
2
- .mceActionPanel {margin-top:7px;}
3
- .alignPreview {border:1px solid #000; width:140px; height:140px; overflow:hidden; padding:5px;}
4
- .checkbox {border:0;}
5
- .panel_wrapper div.current {min-height:305px;height:auto;}
6
- #prev {margin:0; border:1px solid #000; width:428px; height:150px; overflow:auto;}
7
- #align, #classlist {width:150px;}
8
- #width, #height {vertical-align:middle; width:50px; text-align:center;}
9
- #vspace, #hspace, #border {vertical-align:middle; width:30px; text-align:center;}
10
- #class_list {width:180px;}
11
- input[type="text"] {width: 280px;}
12
- #constrain, #onmousemovecheck {width:auto;}
13
- #id, #dir, #lang, #usemap, #longdesc {width:200px;}
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/advimage/editor_plugin.js DELETED
@@ -1 +0,0 @@
1
- (function(){tinymce.create("tinymce.plugins.AdvancedImagePlugin",{init:function(a,b){a.addCommand("mceAdvImage",function(){if(a.dom.getAttrib(a.selection.getNode(),"class","").indexOf("mceItem")!=-1){return}a.windowManager.open({file:b+"/image.htm",width:480+parseInt(a.getLang("advimage.delta_width",0)),height:385+parseInt(a.getLang("advimage.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("image",{title:"advimage.image_desc",cmd:"mceAdvImage"})},getInfo:function(){return{longname:"Advanced image",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advimage",tinymce.plugins.AdvancedImagePlugin)})();
 
mce/advimage/image.htm DELETED
@@ -1,235 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <title>{#advimage_dlg.dialog_title}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=359"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=359"></script>
7
- <script type="text/javascript" src="../../utils/form_utils.js?ver=359"></script>
8
- <script type="text/javascript" src="../../utils/validate.js?ver=359"></script>
9
- <script type="text/javascript" src="../../utils/editable_selects.js?ver=359"></script>
10
- <script type="text/javascript" src="js/image.js?ver=359"></script>
11
- <link href="css/advimage.css?ver=359" rel="stylesheet" type="text/css" />
12
- </head>
13
- <body id="advimage" style="display: none" role="application" aria-labelledby="app_title">
14
- <span id="app_title" style="display:none">{#advimage_dlg.dialog_title}</span>
15
- <form onsubmit="ImageDialog.insert();return false;" action="#">
16
- <div class="tabs">
17
- <ul>
18
- <li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advimage_dlg.tab_general}</a></span></li>
19
- <li id="appearance_tab" aria-controls="appearance_panel"><span><a href="javascript:mcTabs.displayTab('appearance_tab','appearance_panel');" onmousedown="return false;">{#advimage_dlg.tab_appearance}</a></span></li>
20
- <li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#advimage_dlg.tab_advanced}</a></span></li>
21
- </ul>
22
- </div>
23
-
24
- <div class="panel_wrapper">
25
- <div id="general_panel" class="panel current">
26
- <fieldset>
27
- <legend>{#advimage_dlg.general}</legend>
28
-
29
- <table role="presentation" class="properties">
30
- <tr>
31
- <td class="column1"><label id="srclabel" for="src">{#advimage_dlg.src}</label></td>
32
- <td colspan="2"><table role="presentation" border="0" cellspacing="0" cellpadding="0">
33
- <tr>
34
- <td><input name="src" type="text" id="src" value="" class="mceFocus" onchange="ImageDialog.showPreviewImage(this.value);" aria-required="true" /></td>
35
- <td id="srcbrowsercontainer">&nbsp;</td>
36
- </tr>
37
- </table></td>
38
- </tr>
39
- <tr>
40
- <td><label for="src_list">{#advimage_dlg.image_list}</label></td>
41
- <td><select id="src_list" name="src_list" onchange="document.getElementById('src').value=this.options[this.selectedIndex].value;document.getElementById('alt').value=this.options[this.selectedIndex].text;document.getElementById('title').value=this.options[this.selectedIndex].text;ImageDialog.showPreviewImage(this.options[this.selectedIndex].value);"><option value=""></option></select></td>
42
- </tr>
43
- <tr>
44
- <td class="column1"><label id="altlabel" for="alt">{#advimage_dlg.alt}</label></td>
45
- <td colspan="2"><input id="alt" name="alt" type="text" value="" /></td>
46
- </tr>
47
- <tr>
48
- <td class="column1"><label id="titlelabel" for="title">{#advimage_dlg.title}</label></td>
49
- <td colspan="2"><input id="title" name="title" type="text" value="" /></td>
50
- </tr>
51
- </table>
52
- </fieldset>
53
-
54
- <fieldset>
55
- <legend>{#advimage_dlg.preview}</legend>
56
- <div id="prev"></div>
57
- </fieldset>
58
- </div>
59
-
60
- <div id="appearance_panel" class="panel">
61
- <fieldset>
62
- <legend>{#advimage_dlg.tab_appearance}</legend>
63
-
64
- <table role="presentation" border="0" cellpadding="4" cellspacing="0">
65
- <tr>
66
- <td class="column1"><label id="alignlabel" for="align">{#advimage_dlg.align}</label></td>
67
- <td><select id="align" name="align" onchange="ImageDialog.updateStyle('align');ImageDialog.changeAppearance();">
68
- <option value="">{#not_set}</option>
69
- <option value="baseline">{#advimage_dlg.align_baseline}</option>
70
- <option value="top">{#advimage_dlg.align_top}</option>
71
- <option value="middle">{#advimage_dlg.align_middle}</option>
72
- <option value="bottom">{#advimage_dlg.align_bottom}</option>
73
- <option value="text-top">{#advimage_dlg.align_texttop}</option>
74
- <option value="text-bottom">{#advimage_dlg.align_textbottom}</option>
75
- <option value="left">{#advimage_dlg.align_left}</option>
76
- <option value="right">{#advimage_dlg.align_right}</option>
77
- </select>
78
- </td>
79
- <td rowspan="6" valign="top">
80
- <div class="alignPreview">
81
- <img id="alignSampleImg" src="img/sample.gif" alt="{#advimage_dlg.example_img}" />
82
- Lorem ipsum, Dolor sit amet, consectetuer adipiscing loreum ipsum edipiscing elit, sed diam
83
- nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.Loreum ipsum
84
- edipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam
85
- erat volutpat.
86
- </div>
87
- </td>
88
- </tr>
89
-
90
- <tr role="group" aria-labelledby="widthlabel">
91
- <td class="column1"><label id="widthlabel" for="width">{#advimage_dlg.dimensions}</label></td>
92
- <td class="nowrap">
93
- <span style="display:none" id="width_voiceLabel">{#advimage_dlg.width}</span>
94
- <input name="width" type="text" id="width" value="" size="5" maxlength="5" class="size" onchange="ImageDialog.changeHeight();" aria-labelledby="width_voiceLabel" /> x
95
- <span style="display:none" id="height_voiceLabel">{#advimage_dlg.height}</span>
96
- <input name="height" type="text" id="height" value="" size="5" maxlength="5" class="size" onchange="ImageDialog.changeWidth();" aria-labelledby="height_voiceLabel" /> px
97
- </td>
98
- </tr>
99
-
100
- <tr>
101
- <td>&nbsp;</td>
102
- <td><table role="presentation" border="0" cellpadding="0" cellspacing="0">
103
- <tr>
104
- <td><input id="constrain" type="checkbox" name="constrain" class="checkbox" /></td>
105
- <td><label id="constrainlabel" for="constrain">{#advimage_dlg.constrain_proportions}</label></td>
106
- </tr>
107
- </table></td>
108
- </tr>
109
-
110
- <tr>
111
- <td class="column1"><label id="vspacelabel" for="vspace">{#advimage_dlg.vspace}</label></td>
112
- <td><input name="vspace" type="text" id="vspace" value="" size="3" maxlength="3" class="number" onchange="ImageDialog.updateStyle('vspace');ImageDialog.changeAppearance();" onblur="ImageDialog.updateStyle('vspace');ImageDialog.changeAppearance();" />
113
- </td>
114
- </tr>
115
-
116
- <tr>
117
- <td class="column1"><label id="hspacelabel" for="hspace">{#advimage_dlg.hspace}</label></td>
118
- <td><input name="hspace" type="text" id="hspace" value="" size="3" maxlength="3" class="number" onchange="ImageDialog.updateStyle('hspace');ImageDialog.changeAppearance();" onblur="ImageDialog.updateStyle('hspace');ImageDialog.changeAppearance();" /></td>
119
- </tr>
120
-
121
- <tr>
122
- <td class="column1"><label id="borderlabel" for="border">{#advimage_dlg.border}</label></td>
123
- <td><input id="border" name="border" type="text" value="" size="3" maxlength="3" class="number" onchange="ImageDialog.updateStyle('border');ImageDialog.changeAppearance();" onblur="ImageDialog.updateStyle('border');ImageDialog.changeAppearance();" /></td>
124
- </tr>
125
-
126
- <tr>
127
- <td><label for="class_list">{#class_name}</label></td>
128
- <td colspan="2"><select id="class_list" name="class_list" class="mceEditableSelect"><option value=""></option></select></td>
129
- </tr>
130
-
131
- <tr>
132
- <td class="column1"><label id="stylelabel" for="style">{#advimage_dlg.style}</label></td>
133
- <td colspan="2"><input id="style" name="style" type="text" value="" onchange="ImageDialog.changeAppearance();" /></td>
134
- </tr>
135
-
136
- <!-- <tr>
137
- <td class="column1"><label id="classeslabel" for="classes">{#advimage_dlg.classes}</label></td>
138
- <td colspan="2"><input id="classes" name="classes" type="text" value="" onchange="selectByValue(this.form,'classlist',this.value,true);" /></td>
139
- </tr> -->
140
- </table>
141
- </fieldset>
142
- </div>
143
-
144
- <div id="advanced_panel" class="panel">
145
- <fieldset>
146
- <legend>{#advimage_dlg.swap_image}</legend>
147
-
148
- <input type="checkbox" id="onmousemovecheck" name="onmousemovecheck" class="checkbox" onclick="ImageDialog.setSwapImage(this.checked);" aria-controls="onmouseoversrc onmouseoutsrc" />
149
- <label id="onmousemovechecklabel" for="onmousemovecheck">{#advimage_dlg.alt_image}</label>
150
-
151
- <table role="presentation" border="0" cellpadding="4" cellspacing="0" width="100%">
152
- <tr>
153
- <td class="column1"><label id="onmouseoversrclabel" for="onmouseoversrc">{#advimage_dlg.mouseover}</label></td>
154
- <td><table role="presentation" border="0" cellspacing="0" cellpadding="0">
155
- <tr>
156
- <td><input id="onmouseoversrc" name="onmouseoversrc" type="text" value="" /></td>
157
- <td id="onmouseoversrccontainer">&nbsp;</td>
158
- </tr>
159
- </table></td>
160
- </tr>
161
- <tr>
162
- <td><label for="over_list">{#advimage_dlg.image_list}</label></td>
163
- <td><select id="over_list" name="over_list" onchange="document.getElementById('onmouseoversrc').value=this.options[this.selectedIndex].value;"><option value=""></option></select></td>
164
- </tr>
165
- <tr>
166
- <td class="column1"><label id="onmouseoutsrclabel" for="onmouseoutsrc">{#advimage_dlg.mouseout}</label></td>
167
- <td class="column2"><table role="presentation" border="0" cellspacing="0" cellpadding="0">
168
- <tr>
169
- <td><input id="onmouseoutsrc" name="onmouseoutsrc" type="text" value="" /></td>
170
- <td id="onmouseoutsrccontainer">&nbsp;</td>
171
- </tr>
172
- </table></td>
173
- </tr>
174
- <tr>
175
- <td><label for="out_list">{#advimage_dlg.image_list}</label></td>
176
- <td><select id="out_list" name="out_list" onchange="document.getElementById('onmouseoutsrc').value=this.options[this.selectedIndex].value;"><option value=""></option></select></td>
177
- </tr>
178
- </table>
179
- </fieldset>
180
-
181
- <fieldset>
182
- <legend>{#advimage_dlg.misc}</legend>
183
-
184
- <table role="presentation" border="0" cellpadding="4" cellspacing="0">
185
- <tr>
186
- <td class="column1"><label id="idlabel" for="id">{#advimage_dlg.id}</label></td>
187
- <td><input id="id" name="id" type="text" value="" /></td>
188
- </tr>
189
-
190
- <tr>
191
- <td class="column1"><label id="dirlabel" for="dir">{#advimage_dlg.langdir}</label></td>
192
- <td>
193
- <select id="dir" name="dir" onchange="ImageDialog.changeAppearance();">
194
- <option value="">{#not_set}</option>
195
- <option value="ltr">{#advimage_dlg.ltr}</option>
196
- <option value="rtl">{#advimage_dlg.rtl}</option>
197
- </select>
198
- </td>
199
- </tr>
200
-
201
- <tr>
202
- <td class="column1"><label id="langlabel" for="lang">{#advimage_dlg.langcode}</label></td>
203
- <td>
204
- <input id="lang" name="lang" type="text" value="" />
205
- </td>
206
- </tr>
207
-
208
- <tr>
209
- <td class="column1"><label id="usemaplabel" for="usemap">{#advimage_dlg.map}</label></td>
210
- <td>
211
- <input id="usemap" name="usemap" type="text" value="" />
212
- </td>
213
- </tr>
214
-
215
- <tr>
216
- <td class="column1"><label id="longdesclabel" for="longdesc">{#advimage_dlg.long_desc}</label></td>
217
- <td><table role="presentation" border="0" cellspacing="0" cellpadding="0">
218
- <tr>
219
- <td><input id="longdesc" name="longdesc" type="text" value="" /></td>
220
- <td id="longdesccontainer">&nbsp;</td>
221
- </tr>
222
- </table></td>
223
- </tr>
224
- </table>
225
- </fieldset>
226
- </div>
227
- </div>
228
-
229
- <div class="mceActionPanel">
230
- <input type="submit" id="insert" name="insert" value="{#insert}" />
231
- <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
232
- </div>
233
- </form>
234
- </body>
235
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/advimage/img/sample.gif DELETED
Binary file
mce/advimage/js/image.js DELETED
@@ -1,464 +0,0 @@
1
- var ImageDialog = {
2
- preInit : function() {
3
- var url;
4
-
5
- tinyMCEPopup.requireLangPack();
6
-
7
- if (url = tinyMCEPopup.getParam("external_image_list_url"))
8
- document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
9
- },
10
-
11
- init : function(ed) {
12
- var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, dom = ed.dom, n = ed.selection.getNode(), fl = tinyMCEPopup.getParam('external_image_list', 'tinyMCEImageList');
13
-
14
- tinyMCEPopup.resizeToInnerSize();
15
- this.fillClassList('class_list');
16
- this.fillFileList('src_list', fl);
17
- this.fillFileList('over_list', fl);
18
- this.fillFileList('out_list', fl);
19
- TinyMCE_EditableSelects.init();
20
-
21
- if (n.nodeName == 'IMG') {
22
- nl.src.value = dom.getAttrib(n, 'src');
23
- nl.width.value = dom.getAttrib(n, 'width');
24
- nl.height.value = dom.getAttrib(n, 'height');
25
- nl.alt.value = dom.getAttrib(n, 'alt');
26
- nl.title.value = dom.getAttrib(n, 'title');
27
- nl.vspace.value = this.getAttrib(n, 'vspace');
28
- nl.hspace.value = this.getAttrib(n, 'hspace');
29
- nl.border.value = this.getAttrib(n, 'border');
30
- selectByValue(f, 'align', this.getAttrib(n, 'align'));
31
- selectByValue(f, 'class_list', dom.getAttrib(n, 'class'), true, true);
32
- nl.style.value = dom.getAttrib(n, 'style');
33
- nl.id.value = dom.getAttrib(n, 'id');
34
- nl.dir.value = dom.getAttrib(n, 'dir');
35
- nl.lang.value = dom.getAttrib(n, 'lang');
36
- nl.usemap.value = dom.getAttrib(n, 'usemap');
37
- nl.longdesc.value = dom.getAttrib(n, 'longdesc');
38
- nl.insert.value = ed.getLang('update');
39
-
40
- if (/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/.test(dom.getAttrib(n, 'onmouseover')))
41
- nl.onmouseoversrc.value = dom.getAttrib(n, 'onmouseover').replace(/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/, '$1');
42
-
43
- if (/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/.test(dom.getAttrib(n, 'onmouseout')))
44
- nl.onmouseoutsrc.value = dom.getAttrib(n, 'onmouseout').replace(/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/, '$1');
45
-
46
- if (ed.settings.inline_styles) {
47
- // Move attribs to styles
48
- if (dom.getAttrib(n, 'align'))
49
- this.updateStyle('align');
50
-
51
- if (dom.getAttrib(n, 'hspace'))
52
- this.updateStyle('hspace');
53
-
54
- if (dom.getAttrib(n, 'border'))
55
- this.updateStyle('border');
56
-
57
- if (dom.getAttrib(n, 'vspace'))
58
- this.updateStyle('vspace');
59
- }
60
- }
61
-
62
- // Setup browse button
63
- document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image');
64
- if (isVisible('srcbrowser'))
65
- document.getElementById('src').style.width = '260px';
66
-
67
- // Setup browse button
68
- document.getElementById('onmouseoversrccontainer').innerHTML = getBrowserHTML('overbrowser','onmouseoversrc','image','theme_advanced_image');
69
- if (isVisible('overbrowser'))
70
- document.getElementById('onmouseoversrc').style.width = '260px';
71
-
72
- // Setup browse button
73
- document.getElementById('onmouseoutsrccontainer').innerHTML = getBrowserHTML('outbrowser','onmouseoutsrc','image','theme_advanced_image');
74
- if (isVisible('outbrowser'))
75
- document.getElementById('onmouseoutsrc').style.width = '260px';
76
-
77
- // If option enabled default contrain proportions to checked
78
- if (ed.getParam("advimage_constrain_proportions", true))
79
- f.constrain.checked = true;
80
-
81
- // Check swap image if valid data
82
- if (nl.onmouseoversrc.value || nl.onmouseoutsrc.value)
83
- this.setSwapImage(true);
84
- else
85
- this.setSwapImage(false);
86
-
87
- this.changeAppearance();
88
- this.showPreviewImage(nl.src.value, 1);
89
- },
90
-
91
- insert : function(file, title) {
92
- var ed = tinyMCEPopup.editor, t = this, f = document.forms[0];
93
-
94
- if (f.src.value === '') {
95
- if (ed.selection.getNode().nodeName == 'IMG') {
96
- ed.dom.remove(ed.selection.getNode());
97
- ed.execCommand('mceRepaint');
98
- }
99
-
100
- tinyMCEPopup.close();
101
- return;
102
- }
103
-
104
- if (tinyMCEPopup.getParam("accessibility_warnings", 1)) {
105
- if (!f.alt.value) {
106
- tinyMCEPopup.confirm(tinyMCEPopup.getLang('advimage_dlg.missing_alt'), function(s) {
107
- if (s)
108
- t.insertAndClose();
109
- });
110
-
111
- return;
112
- }
113
- }
114
-
115
- t.insertAndClose();
116
- },
117
-
118
- insertAndClose : function() {
119
- var ed = tinyMCEPopup.editor, f = document.forms[0], nl = f.elements, v, args = {}, el;
120
-
121
- tinyMCEPopup.restoreSelection();
122
-
123
- // Fixes crash in Safari
124
- if (tinymce.isWebKit)
125
- ed.getWin().focus();
126
-
127
- if (!ed.settings.inline_styles) {
128
- args = {
129
- vspace : nl.vspace.value,
130
- hspace : nl.hspace.value,
131
- border : nl.border.value,
132
- align : getSelectValue(f, 'align')
133
- };
134
- } else {
135
- // Remove deprecated values
136
- args = {
137
- vspace : '',
138
- hspace : '',
139
- border : '',
140
- align : ''
141
- };
142
- }
143
-
144
- tinymce.extend(args, {
145
- src : nl.src.value.replace(/ /g, '%20'),
146
- width : nl.width.value,
147
- height : nl.height.value,
148
- alt : nl.alt.value,
149
- title : nl.title.value,
150
- 'class' : getSelectValue(f, 'class_list'),
151
- style : nl.style.value,
152
- id : nl.id.value,
153
- dir : nl.dir.value,
154
- lang : nl.lang.value,
155
- usemap : nl.usemap.value,
156
- longdesc : nl.longdesc.value
157
- });
158
-
159
- args.onmouseover = args.onmouseout = '';
160
-
161
- if (f.onmousemovecheck.checked) {
162
- if (nl.onmouseoversrc.value)
163
- args.onmouseover = "this.src='" + nl.onmouseoversrc.value + "';";
164
-
165
- if (nl.onmouseoutsrc.value)
166
- args.onmouseout = "this.src='" + nl.onmouseoutsrc.value + "';";
167
- }
168
-
169
- el = ed.selection.getNode();
170
-
171
- if (el && el.nodeName == 'IMG') {
172
- ed.dom.setAttribs(el, args);
173
- } else {
174
- tinymce.each(args, function(value, name) {
175
- if (value === "") {
176
- delete args[name];
177
- }
178
- });
179
-
180
- ed.execCommand('mceInsertContent', false, tinyMCEPopup.editor.dom.createHTML('img', args), {skip_undo : 1});
181
- ed.undoManager.add();
182
- }
183
-
184
- tinyMCEPopup.editor.execCommand('mceRepaint');
185
- tinyMCEPopup.editor.focus();
186
- tinyMCEPopup.close();
187
- },
188
-
189
- getAttrib : function(e, at) {
190
- var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2;
191
-
192
- if (ed.settings.inline_styles) {
193
- switch (at) {
194
- case 'align':
195
- if (v = dom.getStyle(e, 'float'))
196
- return v;
197
-
198
- if (v = dom.getStyle(e, 'vertical-align'))
199
- return v;
200
-
201
- break;
202
-
203
- case 'hspace':
204
- v = dom.getStyle(e, 'margin-left')
205
- v2 = dom.getStyle(e, 'margin-right');
206
-
207
- if (v && v == v2)
208
- return parseInt(v.replace(/[^0-9]/g, ''));
209
-
210
- break;
211
-
212
- case 'vspace':
213
- v = dom.getStyle(e, 'margin-top')
214
- v2 = dom.getStyle(e, 'margin-bottom');
215
- if (v && v == v2)
216
- return parseInt(v.replace(/[^0-9]/g, ''));
217
-
218
- break;
219
-
220
- case 'border':
221
- v = 0;
222
-
223
- tinymce.each(['top', 'right', 'bottom', 'left'], function(sv) {
224
- sv = dom.getStyle(e, 'border-' + sv + '-width');
225
-
226
- // False or not the same as prev
227
- if (!sv || (sv != v && v !== 0)) {
228
- v = 0;
229
- return false;
230
- }
231
-
232
- if (sv)
233
- v = sv;
234
- });
235
-
236
- if (v)
237
- return parseInt(v.replace(/[^0-9]/g, ''));
238
-
239
- break;
240
- }
241
- }
242
-
243
- if (v = dom.getAttrib(e, at))
244
- return v;
245
-
246
- return '';
247
- },
248
-
249
- setSwapImage : function(st) {
250
- var f = document.forms[0];
251
-
252
- f.onmousemovecheck.checked = st;
253
- setBrowserDisabled('overbrowser', !st);
254
- setBrowserDisabled('outbrowser', !st);
255
-
256
- if (f.over_list)
257
- f.over_list.disabled = !st;
258
-
259
- if (f.out_list)
260
- f.out_list.disabled = !st;
261
-
262
- f.onmouseoversrc.disabled = !st;
263
- f.onmouseoutsrc.disabled = !st;
264
- },
265
-
266
- fillClassList : function(id) {
267
- var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
268
-
269
- if (v = tinyMCEPopup.getParam('theme_advanced_styles')) {
270
- cl = [];
271
-
272
- tinymce.each(v.split(';'), function(v) {
273
- var p = v.split('=');
274
-
275
- cl.push({'title' : p[0], 'class' : p[1]});
276
- });
277
- } else
278
- cl = tinyMCEPopup.editor.dom.getClasses();
279
-
280
- if (cl.length > 0) {
281
- lst.options.length = 0;
282
- lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), '');
283
-
284
- tinymce.each(cl, function(o) {
285
- lst.options[lst.options.length] = new Option(o.title || o['class'], o['class']);
286
- });
287
- } else
288
- dom.remove(dom.getParent(id, 'tr'));
289
- },
290
-
291
- fillFileList : function(id, l) {
292
- var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
293
-
294
- l = typeof(l) === 'function' ? l() : window[l];
295
- lst.options.length = 0;
296
-
297
- if (l && l.length > 0) {
298
- lst.options[lst.options.length] = new Option('', '');
299
-
300
- tinymce.each(l, function(o) {
301
- lst.options[lst.options.length] = new Option(o[0], o[1]);
302
- });
303
- } else
304
- dom.remove(dom.getParent(id, 'tr'));
305
- },
306
-
307
- resetImageData : function() {
308
- var f = document.forms[0];
309
-
310
- f.elements.width.value = f.elements.height.value = '';
311
- },
312
-
313
- updateImageData : function(img, st) {
314
- var f = document.forms[0];
315
-
316
- if (!st) {
317
- f.elements.width.value = img.width;
318
- f.elements.height.value = img.height;
319
- }
320
-
321
- this.preloadImg = img;
322
- },
323
-
324
- changeAppearance : function() {
325
- var ed = tinyMCEPopup.editor, f = document.forms[0], img = document.getElementById('alignSampleImg');
326
-
327
- if (img) {
328
- if (ed.getParam('inline_styles')) {
329
- ed.dom.setAttrib(img, 'style', f.style.value);
330
- } else {
331
- img.align = f.align.value;
332
- img.border = f.border.value;
333
- img.hspace = f.hspace.value;
334
- img.vspace = f.vspace.value;
335
- }
336
- }
337
- },
338
-
339
- changeHeight : function() {
340
- var f = document.forms[0], tp, t = this;
341
-
342
- if (!f.constrain.checked || !t.preloadImg) {
343
- return;
344
- }
345
-
346
- if (f.width.value == "" || f.height.value == "")
347
- return;
348
-
349
- tp = (parseInt(f.width.value) / parseInt(t.preloadImg.width)) * t.preloadImg.height;
350
- f.height.value = tp.toFixed(0);
351
- },
352
-
353
- changeWidth : function() {
354
- var f = document.forms[0], tp, t = this;
355
-
356
- if (!f.constrain.checked || !t.preloadImg) {
357
- return;
358
- }
359
-
360
- if (f.width.value == "" || f.height.value == "")
361
- return;
362
-
363
- tp = (parseInt(f.height.value) / parseInt(t.preloadImg.height)) * t.preloadImg.width;
364
- f.width.value = tp.toFixed(0);
365
- },
366
-
367
- updateStyle : function(ty) {
368
- var dom = tinyMCEPopup.dom, b, bStyle, bColor, v, isIE = tinymce.isIE, f = document.forms[0], img = dom.create('img', {style : dom.get('style').value});
369
-
370
- if (tinyMCEPopup.editor.settings.inline_styles) {
371
- // Handle align
372
- if (ty == 'align') {
373
- dom.setStyle(img, 'float', '');
374
- dom.setStyle(img, 'vertical-align', '');
375
-
376
- v = getSelectValue(f, 'align');
377
- if (v) {
378
- if (v == 'left' || v == 'right')
379
- dom.setStyle(img, 'float', v);
380
- else
381
- img.style.verticalAlign = v;
382
- }
383
- }
384
-
385
- // Handle border
386
- if (ty == 'border') {
387
- b = img.style.border ? img.style.border.split(' ') : [];
388
- bStyle = dom.getStyle(img, 'border-style');
389
- bColor = dom.getStyle(img, 'border-color');
390
-
391
- dom.setStyle(img, 'border', '');
392
-
393
- v = f.border.value;
394
- if (v || v == '0') {
395
- if (v == '0')
396
- img.style.border = isIE ? '0' : '0 none none';
397
- else {
398
- var isOldIE = tinymce.isIE && (!document.documentMode || document.documentMode < 9);
399
-
400
- if (b.length == 3 && b[isOldIE ? 2 : 1])
401
- bStyle = b[isOldIE ? 2 : 1];
402
- else if (!bStyle || bStyle == 'none')
403
- bStyle = 'solid';
404
- if (b.length == 3 && b[isIE ? 0 : 2])
405
- bColor = b[isOldIE ? 0 : 2];
406
- else if (!bColor || bColor == 'none')
407
- bColor = 'black';
408
- img.style.border = v + 'px ' + bStyle + ' ' + bColor;
409
- }
410
- }
411
- }
412
-
413
- // Handle hspace
414
- if (ty == 'hspace') {
415
- dom.setStyle(img, 'marginLeft', '');
416
- dom.setStyle(img, 'marginRight', '');
417
-
418
- v = f.hspace.value;
419
- if (v) {
420
- img.style.marginLeft = v + 'px';
421
- img.style.marginRight = v + 'px';
422
- }
423
- }
424
-
425
- // Handle vspace
426
- if (ty == 'vspace') {
427
- dom.setStyle(img, 'marginTop', '');
428
- dom.setStyle(img, 'marginBottom', '');
429
-
430
- v = f.vspace.value;
431
- if (v) {
432
- img.style.marginTop = v + 'px';
433
- img.style.marginBottom = v + 'px';
434
- }
435
- }
436
-
437
- // Merge
438
- dom.get('style').value = dom.serializeStyle(dom.parseStyle(img.style.cssText), 'img');
439
- }
440
- },
441
-
442
- changeMouseMove : function() {
443
- },
444
-
445
- showPreviewImage : function(u, st) {
446
- if (!u) {
447
- tinyMCEPopup.dom.setHTML('prev', '');
448
- return;
449
- }
450
-
451
- if (!st && tinyMCEPopup.getParam("advimage_update_dimensions_onchange", true))
452
- this.resetImageData();
453
-
454
- u = tinyMCEPopup.editor.documentBaseURI.toAbsolute(u);
455
-
456
- if (!st)
457
- tinyMCEPopup.dom.setHTML('prev', '<img id="previewImg" src="' + u + '" border="0" onload="ImageDialog.updateImageData(this);" onerror="ImageDialog.resetImageData();" />');
458
- else
459
- tinyMCEPopup.dom.setHTML('prev', '<img id="previewImg" src="' + u + '" border="0" onload="ImageDialog.updateImageData(this, 1);" />');
460
- }
461
- };
462
-
463
- ImageDialog.preInit();
464
- tinyMCEPopup.onInit.add(ImageDialog.init, ImageDialog);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/advimage/langs/de_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('de.advimage_dlg',{"image_list":"Bilderliste","align_right":"Rechts","align_left":"Links","align_textbottom":"Unten im Text","align_texttop":"Oben im Text","align_bottom":"Unten","align_middle":"Mittig","align_top":"Oben","align_baseline":"Zeile",align:"Ausrichtung",hspace:"Horizontaler Abstand",vspace:"Vertikaler Abstand",dimensions:"Ausma\u00dfe",border:"Rahmen",list:"Bilderliste",alt:"Beschreibung",src:"Adresse","dialog_title":"Bild einf\u00fcgen/ver\u00e4ndern","missing_alt":"Soll wirklich keine Beschreibung f\u00fcr das Bild eingegeben werden? Bestimmte Benutzer mit k\u00f6rperlichen Einschr\u00e4nkungen k\u00f6nnen so nicht darauf zugreifen, ebenso solche, die einen Textbrowser benutzen oder die Anzeige von Bildern deaktiviert haben.","example_img":"Vorschau auf das Aussehen",misc:"Verschiedenes",mouseout:"bei keinem Mauskontakt",mouseover:"bei Mauskontakt","alt_image":"Alternatives Bild","swap_image":"Bild austauschen",map:"Image-Map",id:"ID",rtl:"Rechts nach links",ltr:"Links nach rechts",classes:"Klassen",style:"Format","long_desc":"Ausf\u00fchrliche Beschreibung",langcode:"Sprachcode",langdir:"Schriftrichtung","constrain_proportions":"Seitenverh\u00e4ltnis beibehalten",preview:"Vorschau",title:"Titel",general:"Allgemein","tab_advanced":"Erweitert","tab_appearance":"Aussehen","tab_general":"Allgemein",width:"Breite",height:"H\u00f6he"});
 
mce/advimage/langs/en_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('en.advimage_dlg',{"image_list":"Image List","align_right":"Right","align_left":"Left","align_textbottom":"Text Bottom","align_texttop":"Text Top","align_bottom":"Bottom","align_middle":"Middle","align_top":"Top","align_baseline":"Baseline",align:"Alignment",hspace:"Horizontal Space",vspace:"Vertical Space",dimensions:"Dimensions",border:"Border",list:"Image List",alt:"Image Description",src:"Image URL","dialog_title":"Insert/Edit Image","missing_alt":"Are you sure you want to continue without including an Image Description? Without it the image may not be accessible to some users with disabilities, or to those using a text browser, or browsing the Web with images turned off.","example_img":"Appearance Preview Image",misc:"Miscellaneous",mouseout:"For Mouse Out",mouseover:"For Mouse Over","alt_image":"Alternative Image","swap_image":"Swap Image",map:"Image Map",id:"ID",rtl:"Right to Left",ltr:"Left to Right",classes:"Classes",style:"Style","long_desc":"Long Description Link",langcode:"Language Code",langdir:"Language Direction","constrain_proportions":"Constrain Proportions",preview:"Preview",title:"Title",general:"General","tab_advanced":"Advanced","tab_appearance":"Appearance","tab_general":"General",width:"Width",height:"Height"});
 
mce/advimage/langs/es_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('es.advimage_dlg',{"image_list":"Lista de imagen","align_right":"Derecha","align_left":"Izquierda","align_textbottom":"Texto abajo","align_texttop":"Texto arriba","align_bottom":"Debajo","align_middle":"Medio","align_top":"Arriba","align_baseline":"L\u00ednea base",align:"Alineaci\u00f3n",hspace:"Espacio horizontal",vspace:"Espacio vertical",dimensions:"Dimensiones",border:"Bordes",list:"Lista de imagen",alt:"Descripci\u00f3n de la imagen",src:"URL de la imagen","dialog_title":"Insertar/editar imagen","missing_alt":" \u00bfEsta seguro de continuar sin introducir una descripci\u00f3n a la imagen? Sin ella puede no ser accesible para usuarios con discapacidades, o para aquellos que usen navegadores de modo texto, o tengan deshabilitadas las im\u00e1genes de la p\u00e1gina.","example_img":"Vista previa de la imagen",misc:"Miscel\u00e1neo",mouseout:"para mouseout",mouseover:"para mouseover","alt_image":"Imagen alternativa","swap_image":"Intercambiar imagen",map:"Mapa de imagen",id:"Id",rtl:"Derecha a izquierda",ltr:"Izquierda a derecha",classes:"Clases",style:"Estilos","long_desc":"V\u00ednculo para descripci\u00f3n larga",langcode:"C\u00f3digo del lenguaje",langdir:"Direcci\u00f3n del lenguaje","constrain_proportions":"Bloquear relaci\u00f3n de aspecto",preview:"Vista previa",title:"T\u00edtulo",general:"General","tab_advanced":"Avanzado","tab_appearance":"Apariencia","tab_general":"General",width:"Ancho",height:"Alto"});
 
mce/advimage/langs/fr_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('fr.advimage_dlg',{"image_list":"Liste d\'images","align_right":"Droite (flottant)","align_left":"Gauche (flottant)","align_textbottom":"Texte en bas","align_texttop":"Texte en haut","align_bottom":"En bas","align_middle":"Au milieu","align_top":"En haut","align_baseline":"Normal",align:"Alignement",hspace:"Espacement horizontal",vspace:"Espacement vertical",dimensions:"Dimensions",border:"Bordure",list:"Liste d\'images",alt:"Description de l\'image",src:"URL de l\'image","dialog_title":"Ins\u00e9rer / \u00e9diter une image","missing_alt":"\u00cates-vous s\u00fbr de vouloir continuer sans d\u00e9finir de description pour l\'image ? Sans elle, l\'image peut ne pas \u00eatre accessible \u00e0 certains utilisateurs handicap\u00e9s, ceux utilisant un navigateur texte ou ceux qui naviguent sans affichage des images.","example_img":"Apparence de l\'image",misc:"Divers",mouseout:"\u00e0 la sortie de la souris",mouseover:"au survol de la souris","alt_image":"Image alternative","swap_image":"Image de remplacement",map:"Image cliquable",id:"Id",rtl:"De droite \u00e0 gauche",ltr:"De gauche \u00e0 droite",classes:"Classes",style:"Style","long_desc":"Description longue du lien",langcode:"Code de la langue",langdir:"Sens de lecture","constrain_proportions":"Conserver les proportions",preview:"Pr\u00e9visualisation",title:"Titre",general:"G\u00e9n\u00e9ral","tab_advanced":"Avanc\u00e9","tab_appearance":"Apparence","tab_general":"G\u00e9n\u00e9ral",width:"Largeur",height:"Hauteur"});
 
mce/advimage/langs/it_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('it.advimage_dlg',{"image_list":"Lista immagini","align_right":"A destra","align_left":"A sinistra","align_textbottom":"In basso al testo","align_texttop":"In alto al testo","align_bottom":"In basso","align_middle":"In mezzo","align_top":"In alto","align_baseline":"Alla base",align:"Allineamento",hspace:"Spaziatura orizzontale",vspace:"Spaziatura verticale",dimensions:"Dimensioni",border:"Bordo",list:"Lista immagini",alt:"Descrizione immagine",src:"URL immagine","dialog_title":"Inserisci/modifica immagine","missing_alt":"Sicuro di continuare senza includere una descrizione dell\'immagine? Senza di essa l\'immagine pu\u00f2 non essere accessibile ad alcuni utenti con disabilit\u00e0, o per coloro che usano un browser testuale oppure che hanno disabilitato la visualizzazione delle immagini nel loro browser.","example_img":"Anteprima aspetto immagine",misc:"Impostazioni varie",mouseout:"quando mouse fuori",mouseover:"quando mouse sopra","alt_image":"Immagine alternativa","swap_image":"Sostituisci immagine",map:"Immagine come mappa",id:"Id",rtl:"Destra verso sinistraa",ltr:"Sinistra verso destra",classes:"Classe",style:"Stile","long_desc":"Descrizione del collegamento",langcode:"codice lingua",langdir:"Direzione testo","constrain_proportions":"Mantieni proporzioni",preview:"Anteprima",title:"Titolo",general:"Generale","tab_advanced":"Avanzate","tab_appearance":"Aspetto","tab_general":"Generale",width:"Larghezza",height:"Altezza"});
 
mce/advimage/langs/ja_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('ja.advimage_dlg',{"image_list":"\u753b\u50cf\u306e\u4e00\u89a7","align_right":"\u53f3\u5bc4\u305b","align_left":"\u5de6\u5bc4\u305b","align_textbottom":"\u30c6\u30ad\u30b9\u30c8\u3092\u4e0b\u7aef\u63c3\u3048","align_texttop":"\u30c6\u30ad\u30b9\u30c8\u3092\u4e0a\u7aef\u63c3\u3048","align_bottom":"\u4e0b\u63c3\u3048","align_middle":"\u4e2d\u592e\u63c3\u3048","align_top":"\u4e0a\u63c3\u3048","align_baseline":"\u30d9\u30fc\u30b9\u30e9\u30a4\u30f3\u63c3\u3048",align:"\u914d\u7f6e",hspace:"\u5de6\u53f3\u306e\u4f59\u767d",vspace:"\u4e0a\u4e0b\u306e\u4f59\u767d",dimensions:"\u5bf8\u6cd5",border:"\u67a0\u7dda",list:"\u753b\u50cf\u306e\u4e00\u89a7",alt:"\u753b\u50cf\u306e\u8aac\u660e",src:"\u753b\u50cf\u306eURL","dialog_title":"\u753b\u50cf\u3092\u633f\u5165/\u7de8\u96c6","missing_alt":"\u753b\u50cf\u306e\u8aac\u660e\u3092\u542b\u3081\u305a\u306b\u7d9a\u3051\u307e\u3059\u304b? \u753b\u50cf\u306e\u8aac\u660e\u304c\u306a\u3044\u3068\u76ee\u306e\u4e0d\u81ea\u7531\u306a\u65b9\u3001\u30c6\u30ad\u30b9\u30c8\u8868\u793a\u3060\u3051\u306e\u30d6\u30e9\u30a6\u30b6\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u65b9\u3001\u753b\u50cf\u306e\u8868\u793a\u3092\u6b62\u3081\u3066\u308b\u65b9\u304c\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002","example_img":"\u753b\u50cf\u306e\u30d7\u30ec\u30d3\u30e5\u30fc\u306e\u69d8\u5b50",misc:"\u305d\u306e\u4ed6",mouseout:"\u30de\u30a6\u30b9\u30ab\u30fc\u30bd\u30eb\u304c\u5916\u308c\u308b\u6642",mouseover:"\u30de\u30a6\u30b9\u30ab\u30fc\u30bd\u30eb\u304c\u304b\u304b\u308b\u6642","alt_image":"\u5225\u306e\u753b\u50cf","swap_image":"\u753b\u50cf\u306e\u5165\u308c\u66ff\u3048",map:"\u30a4\u30e1\u30fc\u30b8\u30de\u30c3\u30d7",id:"ID",rtl:"\u53f3\u304b\u3089\u5de6",ltr:"\u5de6\u304b\u3089\u53f3",classes:"\u30af\u30e9\u30b9",style:"\u30b9\u30bf\u30a4\u30eb","long_desc":"\u8a73\u7d30\u306a\u8aac\u660e\u306e\u30ea\u30f3\u30af",langcode:"\u8a00\u8a9e\u30b3\u30fc\u30c9",langdir:"\u6587\u7ae0\u306e\u65b9\u5411","constrain_proportions":"\u7e26\u6a2a\u6bd4\u306e\u7dad\u6301",preview:"\u30d7\u30ec\u30d3\u30e5\u30fc",title:"\u30bf\u30a4\u30c8\u30eb",general:"\u4e00\u822c","tab_advanced":"\u9ad8\u5ea6\u306a\u8a2d\u5b9a","tab_appearance":"\u8868\u793a","tab_general":"\u4e00\u822c",width:"\u5e45",height:"\u9ad8\u3055"});
 
mce/advimage/langs/langs.php DELETED
@@ -1,12 +0,0 @@
1
- <?php
2
- $lang_file = dirname(__FILE__) . '/' . $mce_locale . '_dlg.js';
3
-
4
- if ( ! is_file( $lang_file ) && defined( 'TINYMCE_ADVANCED_LANGUAGES_PATH' ) )
5
- $lang_file = TINYMCE_ADVANCED_LANGUAGES_PATH . 'advimage/langs/' . $mce_locale . '_dlg.js';
6
-
7
- if ( is_file( $lang_file ) && is_readable( $lang_file ) ) {
8
- $strings = tdav_get_file( $lang_file );
9
- } else {
10
- $strings = tdav_get_file( dirname(__FILE__) . '/en_dlg.js' );
11
- $strings = preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $strings, 1 );
12
- }
 
 
 
 
 
 
 
 
 
 
 
 
mce/advimage/langs/pt_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('pt.advimage_dlg',{"image_list":"Lista de imagens","align_right":"Direita","align_left":"Esquerda","align_textbottom":"Base do texto","align_texttop":"Topo do texto","align_bottom":"Abaixo","align_middle":"Meio","align_top":"Topo","align_baseline":"Sobre a linha de texto",align:"Alinhamento",hspace:"Espa\u00e7o horizontal",vspace:"Espa\u00e7o vertical",dimensions:"Dimens\u00f5es",border:"Limite",list:"Lista de imagens",alt:"Descri\u00e7\u00e3o da imagem",src:"Endere\u00e7o da imagem","dialog_title":"Inserir/editar imagem","missing_alt":"Tem certeza que deseja continuar sem acrescentar uma descri\u00e7\u00e3o \u00e0 imagem? (Isto pode gerar problemas de acessibilidade em alguns navegadores)","example_img":"Pr\u00e9-Visualiza\u00e7\u00e3o",misc:"Misto",mouseout:"mouseout",mouseover:"mouseover","alt_image":"Imagem alternativa","swap_image":"Trocar imagem",map:"Mapa de imagem",id:"Id",rtl:"Da direita para a esquerda",ltr:"Da esquerda para a direita",classes:"Classes",style:"Estilo","long_desc":"Descri\u00e7\u00e3o extensa",langcode:"C\u00f3digo do idioma",langdir:"Dire\u00e7\u00e3o do texto","constrain_proportions":"Manter propor\u00e7\u00f5es",preview:"Pr\u00e9-Visualiza\u00e7\u00e3o",title:"T\u00edtulo",general:"Geral","tab_advanced":"Avan\u00e7ado","tab_appearance":"Apar\u00eancia","tab_general":"Geral",width:"Largura",height:"Altura"});
 
mce/advimage/langs/ru_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('ru.advimage_dlg',{"image_list":"\u0421\u043f\u0438\u0441\u043e\u043a \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a","align_right":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_left":"\u041f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_textbottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e \u0442\u0435\u043a\u0441\u0442\u0430","align_texttop":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e \u0442\u0435\u043a\u0441\u0442\u0430","align_bottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e","align_middle":"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443","align_top":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e","align_baseline":"\u041f\u043e \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u043b\u0438\u043d\u0438\u0438",align:"\u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435",hspace:"\u0413\u043e\u0440\u0438\u0437. \u043e\u0442\u0441\u0442\u0443\u043f",vspace:"\u0412\u0435\u0440\u0442. \u043e\u0442\u0441\u0442\u0443\u043f",dimensions:"\u0420\u0430\u0437\u043c\u0435\u0440",border:"\u0413\u0440\u0430\u043d\u0438\u0446\u0430",list:"\u0421\u043f\u0438\u0441\u043e\u043a",alt:"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435",src:"\u0410\u0434\u0440\u0435\u0441","dialog_title":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f","missing_alt":"\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0431\u0435\u0437 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f? \u0411\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0441 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u043c\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0438\u043b\u0438 \u0442\u0435\u043c, \u043a\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u044b \u0438\u043b\u0438 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0441\u0430\u0439\u0442\u044b \u0441 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438.","example_img":"\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f",misc:"\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b",mouseout:"\u0412 \u043f\u043e\u043a\u043e\u0435",mouseover:"\u041f\u0440\u0438 \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u0438","alt_image":"\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435","swap_image":"\u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435",map:"\u041a\u0430\u0440\u0442\u0430 \u0441\u0441\u044b\u043b\u043e\u043a",id:"\u0418\u043c\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430",rtl:"\u0421\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0435\u0432\u043e",ltr:"\u0421\u043b\u0435\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e",classes:"\u041a\u043b\u0430\u0441\u0441\u044b",style:"\u0421\u0442\u0438\u043b\u044c","long_desc":"\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u043e\u043b\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435",langcode:"\u041a\u043e\u0434 \u044f\u0437\u044b\u043a\u0430",langdir:"\u041d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430","constrain_proportions":"\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u0438",preview:"\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440",title:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",general:"\u041e\u0431\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b","tab_advanced":"\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e","tab_appearance":"\u041f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435","tab_general":"\u041e\u0431\u0449\u0435\u0435",width:"\u0428\u0438\u0440\u0438\u043d\u0430",height:"\u0412\u044b\u0441\u043e\u0442\u0430"});
 
mce/advimage/langs/zh_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('zh.advimage_dlg',{"image_list":"\u56fe\u7247\u6e05\u5355","align_right":"\u9760\u53f3","align_left":"\u9760\u5de6","align_textbottom":"\u6587\u5b57\u4e0b\u65b9","align_texttop":"\u6587\u5b57\u4e0a\u65b9","align_bottom":"\u9760\u4e0b","align_middle":"\u5782\u76f4\u5c45\u4e2d","align_top":"\u9760\u4e0a","align_baseline":"\u57fa\u51c6\u7ebf",align:"\u5bf9\u9f50\u65b9\u5f0f",hspace:"\u6c34\u5e73\u95f4\u8ddd",vspace:"\u5782\u76f4\u95f4\u8ddd",dimensions:"\u5c3a\u5bf8",border:"\u8fb9\u6846",list:"\u56fe\u7247\u6e05\u5355",alt:"\u56fe\u7247\u8bf4\u660e",src:"\u56fe\u7247URL","dialog_title":"\u63d2\u5165/\u7f16\u8f91\u56fe\u7247","missing_alt":"\u60a8\u5c1a\u672a\u586b\u5199\u56fe\u7247\u8bf4\u660e\u6587\u5b57\uff0c\u662f\u5426\u8981\u7ee7\u7eed\uff1f\u5982\u679c\u4e0d\u586b\u5199\u8bf4\u660e\u6587\u5b57\uff0c\u5bf9\u4f7f\u7528\u975e\u53ef\u89c6\u6216\u5bf9\u8bbe\u5b9a\u4e3a\u4e0d\u663e\u793a\u56fe\u7247\u7684\u6d4f\u89c8\u5668\u4f7f\u7528\u8005\u5c06\u66f4\u96be\u9605\u8bfb\u6216\u7406\u89e3\u6b64\u56fe\u7247\u3002","example_img":"\u56fe\u7247\u9884\u89c8",misc:"\u5176\u5b83",mouseout:"\u9f20\u6807\u79fb\u51fa",mouseover:"\u9f20\u6807\u79fb\u5165","alt_image":"\u66ff\u4ee3\u56fe\u7247","swap_image":"\u56fe\u7247\u5207\u6362",map:"\u56fe\u7247\u70ed\u533a",id:"ID",rtl:"\u4ece\u53f3\u5230\u5de6",ltr:"\u4ece\u5de6\u5230\u53f3",classes:"\u7c7b",style:"\u6837\u5f0f","long_desc":"\u957f\u94fe\u63a5",langcode:"\u8bed\u8a00\u4ee3\u7801",langdir:"\u8bed\u8a00\u4e66\u5199\u65b9\u5411","constrain_proportions":"\u7ea6\u675f\u6bd4\u4f8b",preview:"\u9884\u89c8",title:"\u56fe\u7247\u6807\u9898",general:"\u666e\u901a","tab_advanced":"\u9ad8\u7ea7","tab_appearance":"\u5916\u89c2","tab_general":"\u666e\u901a",width:"\u5bbd",height:"\u9ad8"});
 
mce/advlink/css/advlink.css DELETED
@@ -1,8 +0,0 @@
1
- .mceLinkList, .mceAnchorList, #targetlist {width:280px;}
2
- .mceActionPanel {margin-top:7px;}
3
- .panel_wrapper div.current {min-height:320px;height:auto;}
4
- #classlist, #title, #href {width:280px;}
5
- #popupurl, #popupname {width:200px;}
6
- #popupwidth, #popupheight, #popupleft, #popuptop {width:30px;vertical-align:middle;text-align:center;}
7
- #id, #style, #classes, #target, #dir, #hreflang, #lang, #charset, #type, #rel, #rev, #tabindex, #accesskey {width:200px;}
8
- #events_panel input {width:200px;}
 
 
 
 
 
 
 
 
mce/advlink/editor_plugin.js DELETED
@@ -1 +0,0 @@
1
- (function(){tinymce.create("tinymce.plugins.AdvancedLinkPlugin",{init:function(a,b){this.editor=a;a.addCommand("mceAdvLink",function(){var c=a.selection;if(c.isCollapsed()&&!a.dom.getParent(c.getNode(),"A")){return}a.windowManager.open({file:b+"/link.htm",width:480+parseInt(a.getLang("advlink.delta_width",0)),height:400+parseInt(a.getLang("advlink.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("link",{title:"advlink.link_desc",cmd:"mceAdvLink"});a.addShortcut("ctrl+k","advlink.advlink_desc","mceAdvLink");a.onNodeChange.add(function(d,c,f,e){c.setDisabled("link",e&&f.nodeName!="A");c.setActive("link",f.nodeName=="A"&&!f.name)})},getInfo:function(){return{longname:"Advanced link",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlink",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advlink",tinymce.plugins.AdvancedLinkPlugin)})();
 
mce/advlink/js/advlink.js DELETED
@@ -1,543 +0,0 @@
1
- /* Functions for the advlink plugin popup */
2
-
3
- tinyMCEPopup.requireLangPack();
4
-
5
- var templates = {
6
- "window.open" : "window.open('${url}','${target}','${options}')"
7
- };
8
-
9
- function preinit() {
10
- var url;
11
-
12
- if (url = tinyMCEPopup.getParam("external_link_list_url"))
13
- document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
14
- }
15
-
16
- function changeClass() {
17
- var f = document.forms[0];
18
-
19
- f.classes.value = getSelectValue(f, 'classlist');
20
- }
21
-
22
- function init() {
23
- tinyMCEPopup.resizeToInnerSize();
24
-
25
- var formObj = document.forms[0];
26
- var inst = tinyMCEPopup.editor;
27
- var elm = inst.selection.getNode();
28
- var action = "insert";
29
- var html;
30
-
31
- document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser','href','file','advlink');
32
- document.getElementById('popupurlbrowsercontainer').innerHTML = getBrowserHTML('popupurlbrowser','popupurl','file','advlink');
33
- document.getElementById('targetlistcontainer').innerHTML = getTargetListHTML('targetlist','target');
34
-
35
- // Link list
36
- html = getLinkListHTML('linklisthref','href');
37
- if (html == "")
38
- document.getElementById("linklisthrefrow").style.display = 'none';
39
- else
40
- document.getElementById("linklisthrefcontainer").innerHTML = html;
41
-
42
- // Anchor list
43
- html = getAnchorListHTML('anchorlist','href');
44
- if (html == "")
45
- document.getElementById("anchorlistrow").style.display = 'none';
46
- else
47
- document.getElementById("anchorlistcontainer").innerHTML = html;
48
-
49
- // Resize some elements
50
- if (isVisible('hrefbrowser'))
51
- document.getElementById('href').style.width = '260px';
52
-
53
- if (isVisible('popupurlbrowser'))
54
- document.getElementById('popupurl').style.width = '180px';
55
-
56
- elm = inst.dom.getParent(elm, "A");
57
- if (elm == null) {
58
- var prospect = inst.dom.create("p", null, inst.selection.getContent());
59
- if (prospect.childNodes.length === 1) {
60
- elm = prospect.firstChild;
61
- }
62
- }
63
-
64
- if (elm != null && elm.nodeName == "A")
65
- action = "update";
66
-
67
- formObj.insert.value = tinyMCEPopup.getLang(action, 'Insert', true);
68
-
69
- setPopupControlsDisabled(true);
70
-
71
- if (action == "update") {
72
- var href = inst.dom.getAttrib(elm, 'href');
73
- var onclick = inst.dom.getAttrib(elm, 'onclick');
74
- var linkTarget = inst.dom.getAttrib(elm, 'target') ? inst.dom.getAttrib(elm, 'target') : "_self";
75
-
76
- // Setup form data
77
- setFormValue('href', href);
78
- setFormValue('title', inst.dom.getAttrib(elm, 'title'));
79
- setFormValue('id', inst.dom.getAttrib(elm, 'id'));
80
- setFormValue('style', inst.dom.getAttrib(elm, "style"));
81
- setFormValue('rel', inst.dom.getAttrib(elm, 'rel'));
82
- setFormValue('rev', inst.dom.getAttrib(elm, 'rev'));
83
- setFormValue('charset', inst.dom.getAttrib(elm, 'charset'));
84
- setFormValue('hreflang', inst.dom.getAttrib(elm, 'hreflang'));
85
- setFormValue('dir', inst.dom.getAttrib(elm, 'dir'));
86
- setFormValue('lang', inst.dom.getAttrib(elm, 'lang'));
87
- setFormValue('tabindex', inst.dom.getAttrib(elm, 'tabindex', typeof(elm.tabindex) != "undefined" ? elm.tabindex : ""));
88
- setFormValue('accesskey', inst.dom.getAttrib(elm, 'accesskey', typeof(elm.accesskey) != "undefined" ? elm.accesskey : ""));
89
- setFormValue('type', inst.dom.getAttrib(elm, 'type'));
90
- setFormValue('onfocus', inst.dom.getAttrib(elm, 'onfocus'));
91
- setFormValue('onblur', inst.dom.getAttrib(elm, 'onblur'));
92
- setFormValue('onclick', onclick);
93
- setFormValue('ondblclick', inst.dom.getAttrib(elm, 'ondblclick'));
94
- setFormValue('onmousedown', inst.dom.getAttrib(elm, 'onmousedown'));
95
- setFormValue('onmouseup', inst.dom.getAttrib(elm, 'onmouseup'));
96
- setFormValue('onmouseover', inst.dom.getAttrib(elm, 'onmouseover'));
97
- setFormValue('onmousemove', inst.dom.getAttrib(elm, 'onmousemove'));
98
- setFormValue('onmouseout', inst.dom.getAttrib(elm, 'onmouseout'));
99
- setFormValue('onkeypress', inst.dom.getAttrib(elm, 'onkeypress'));
100
- setFormValue('onkeydown', inst.dom.getAttrib(elm, 'onkeydown'));
101
- setFormValue('onkeyup', inst.dom.getAttrib(elm, 'onkeyup'));
102
- setFormValue('target', linkTarget);
103
- setFormValue('classes', inst.dom.getAttrib(elm, 'class'));
104
-
105
- // Parse onclick data
106
- if (onclick != null && onclick.indexOf('window.open') != -1)
107
- parseWindowOpen(onclick);
108
- else
109
- parseFunction(onclick);
110
-
111
- // Select by the values
112
- selectByValue(formObj, 'dir', inst.dom.getAttrib(elm, 'dir'));
113
- selectByValue(formObj, 'rel', inst.dom.getAttrib(elm, 'rel'));
114
- selectByValue(formObj, 'rev', inst.dom.getAttrib(elm, 'rev'));
115
- selectByValue(formObj, 'linklisthref', href);
116
-
117
- if (href.charAt(0) == '#')
118
- selectByValue(formObj, 'anchorlist', href);
119
-
120
- addClassesToList('classlist', 'advlink_styles');
121
-
122
- selectByValue(formObj, 'classlist', inst.dom.getAttrib(elm, 'class'), true);
123
- selectByValue(formObj, 'targetlist', linkTarget, true);
124
- } else
125
- addClassesToList('classlist', 'advlink_styles');
126
- }
127
-
128
- function checkPrefix(n) {
129
- if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_email')))
130
- n.value = 'mailto:' + n.value;
131
-
132
- if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_external')))
133
- n.value = 'http://' + n.value;
134
- }
135
-
136
- function setFormValue(name, value) {
137
- document.forms[0].elements[name].value = value;
138
- }
139
-
140
- function parseWindowOpen(onclick) {
141
- var formObj = document.forms[0];
142
-
143
- // Preprocess center code
144
- if (onclick.indexOf('return false;') != -1) {
145
- formObj.popupreturn.checked = true;
146
- onclick = onclick.replace('return false;', '');
147
- } else
148
- formObj.popupreturn.checked = false;
149
-
150
- var onClickData = parseLink(onclick);
151
-
152
- if (onClickData != null) {
153
- formObj.ispopup.checked = true;
154
- setPopupControlsDisabled(false);
155
-
156
- var onClickWindowOptions = parseOptions(onClickData['options']);
157
- var url = onClickData['url'];
158
-
159
- formObj.popupname.value = onClickData['target'];
160
- formObj.popupurl.value = url;
161
- formObj.popupwidth.value = getOption(onClickWindowOptions, 'width');
162
- formObj.popupheight.value = getOption(onClickWindowOptions, 'height');
163
-
164
- formObj.popupleft.value = getOption(onClickWindowOptions, 'left');
165
- formObj.popuptop.value = getOption(onClickWindowOptions, 'top');
166
-
167
- if (formObj.popupleft.value.indexOf('screen') != -1)
168
- formObj.popupleft.value = "c";
169
-
170
- if (formObj.popuptop.value.indexOf('screen') != -1)
171
- formObj.popuptop.value = "c";
172
-
173
- formObj.popuplocation.checked = getOption(onClickWindowOptions, 'location') == "yes";
174
- formObj.popupscrollbars.checked = getOption(onClickWindowOptions, 'scrollbars') == "yes";
175
- formObj.popupmenubar.checked = getOption(onClickWindowOptions, 'menubar') == "yes";
176
- formObj.popupresizable.checked = getOption(onClickWindowOptions, 'resizable') == "yes";
177
- formObj.popuptoolbar.checked = getOption(onClickWindowOptions, 'toolbar') == "yes";
178
- formObj.popupstatus.checked = getOption(onClickWindowOptions, 'status') == "yes";
179
- formObj.popupdependent.checked = getOption(onClickWindowOptions, 'dependent') == "yes";
180
-
181
- buildOnClick();
182
- }
183
- }
184
-
185
- function parseFunction(onclick) {
186
- var formObj = document.forms[0];
187
- var onClickData = parseLink(onclick);
188
-
189
- // TODO: Add stuff here
190
- }
191
-
192
- function getOption(opts, name) {
193
- return typeof(opts[name]) == "undefined" ? "" : opts[name];
194
- }
195
-
196
- function setPopupControlsDisabled(state) {
197
- var formObj = document.forms[0];
198
-
199
- formObj.popupname.disabled = state;
200
- formObj.popupurl.disabled = state;
201
- formObj.popupwidth.disabled = state;
202
- formObj.popupheight.disabled = state;
203
- formObj.popupleft.disabled = state;
204
- formObj.popuptop.disabled = state;
205
- formObj.popuplocation.disabled = state;
206
- formObj.popupscrollbars.disabled = state;
207
- formObj.popupmenubar.disabled = state;
208
- formObj.popupresizable.disabled = state;
209
- formObj.popuptoolbar.disabled = state;
210
- formObj.popupstatus.disabled = state;
211
- formObj.popupreturn.disabled = state;
212
- formObj.popupdependent.disabled = state;
213
-
214
- setBrowserDisabled('popupurlbrowser', state);
215
- }
216
-
217
- function parseLink(link) {
218
- link = link.replace(new RegExp('&#39;', 'g'), "'");
219
-
220
- var fnName = link.replace(new RegExp("\\s*([A-Za-z0-9\.]*)\\s*\\(.*", "gi"), "$1");
221
-
222
- // Is function name a template function
223
- var template = templates[fnName];
224
- if (template) {
225
- // Build regexp
226
- var variableNames = template.match(new RegExp("'?\\$\\{[A-Za-z0-9\.]*\\}'?", "gi"));
227
- var regExp = "\\s*[A-Za-z0-9\.]*\\s*\\(";
228
- var replaceStr = "";
229
- for (var i=0; i<variableNames.length; i++) {
230
- // Is string value
231
- if (variableNames[i].indexOf("'${") != -1)
232
- regExp += "'(.*)'";
233
- else // Number value
234
- regExp += "([0-9]*)";
235
-
236
- replaceStr += "$" + (i+1);
237
-
238
- // Cleanup variable name
239
- variableNames[i] = variableNames[i].replace(new RegExp("[^A-Za-z0-9]", "gi"), "");
240
-
241
- if (i != variableNames.length-1) {
242
- regExp += "\\s*,\\s*";
243
- replaceStr += "<delim>";
244
- } else
245
- regExp += ".*";
246
- }
247
-
248
- regExp += "\\);?";
249
-
250
- // Build variable array
251
- var variables = [];
252
- variables["_function"] = fnName;
253
- var variableValues = link.replace(new RegExp(regExp, "gi"), replaceStr).split('<delim>');
254
- for (var i=0; i<variableNames.length; i++)
255
- variables[variableNames[i]] = variableValues[i];
256
-
257
- return variables;
258
- }
259
-
260
- return null;
261
- }
262
-
263
- function parseOptions(opts) {
264
- if (opts == null || opts == "")
265
- return [];
266
-
267
- // Cleanup the options
268
- opts = opts.toLowerCase();
269
- opts = opts.replace(/;/g, ",");
270
- opts = opts.replace(/[^0-9a-z=,]/g, "");
271
-
272
- var optionChunks = opts.split(',');
273
- var options = [];
274
-
275
- for (var i=0; i<optionChunks.length; i++) {
276
- var parts = optionChunks[i].split('=');
277
-
278
- if (parts.length == 2)
279
- options[parts[0]] = parts[1];
280
- }
281
-
282
- return options;
283
- }
284
-
285
- function buildOnClick() {
286
- var formObj = document.forms[0];
287
-
288
- if (!formObj.ispopup.checked) {
289
- formObj.onclick.value = "";
290
- return;
291
- }
292
-
293
- var onclick = "window.open('";
294
- var url = formObj.popupurl.value;
295
-
296
- onclick += url + "','";
297
- onclick += formObj.popupname.value + "','";
298
-
299
- if (formObj.popuplocation.checked)
300
- onclick += "location=yes,";
301
-
302
- if (formObj.popupscrollbars.checked)
303
- onclick += "scrollbars=yes,";
304
-
305
- if (formObj.popupmenubar.checked)
306
- onclick += "menubar=yes,";
307
-
308
- if (formObj.popupresizable.checked)
309
- onclick += "resizable=yes,";
310
-
311
- if (formObj.popuptoolbar.checked)
312
- onclick += "toolbar=yes,";
313
-
314
- if (formObj.popupstatus.checked)
315
- onclick += "status=yes,";
316
-
317
- if (formObj.popupdependent.checked)
318
- onclick += "dependent=yes,";
319
-
320
- if (formObj.popupwidth.value != "")
321
- onclick += "width=" + formObj.popupwidth.value + ",";
322
-
323
- if (formObj.popupheight.value != "")
324
- onclick += "height=" + formObj.popupheight.value + ",";
325
-
326
- if (formObj.popupleft.value != "") {
327
- if (formObj.popupleft.value != "c")
328
- onclick += "left=" + formObj.popupleft.value + ",";
329
- else
330
- onclick += "left='+(screen.availWidth/2-" + (formObj.popupwidth.value/2) + ")+',";
331
- }
332
-
333
- if (formObj.popuptop.value != "") {
334
- if (formObj.popuptop.value != "c")
335
- onclick += "top=" + formObj.popuptop.value + ",";
336
- else
337
- onclick += "top='+(screen.availHeight/2-" + (formObj.popupheight.value/2) + ")+',";
338
- }
339
-
340
- if (onclick.charAt(onclick.length-1) == ',')
341
- onclick = onclick.substring(0, onclick.length-1);
342
-
343
- onclick += "');";
344
-
345
- if (formObj.popupreturn.checked)
346
- onclick += "return false;";
347
-
348
- // tinyMCE.debug(onclick);
349
-
350
- formObj.onclick.value = onclick;
351
-
352
- if (formObj.href.value == "")
353
- formObj.href.value = url;
354
- }
355
-
356
- function setAttrib(elm, attrib, value) {
357
- var formObj = document.forms[0];
358
- var valueElm = formObj.elements[attrib.toLowerCase()];
359
- var dom = tinyMCEPopup.editor.dom;
360
-
361
- if (typeof(value) == "undefined" || value == null) {
362
- value = "";
363
-
364
- if (valueElm)
365
- value = valueElm.value;
366
- }
367
-
368
- // Clean up the style
369
- if (attrib == 'style')
370
- value = dom.serializeStyle(dom.parseStyle(value), 'a');
371
-
372
- dom.setAttrib(elm, attrib, value);
373
- }
374
-
375
- function getAnchorListHTML(id, target) {
376
- var ed = tinyMCEPopup.editor, nodes = ed.dom.select('a'), name, i, len, html = "";
377
-
378
- for (i=0, len=nodes.length; i<len; i++) {
379
- if ((name = ed.dom.getAttrib(nodes[i], "name")) != "")
380
- html += '<option value="#' + name + '">' + name + '</option>';
381
-
382
- if ((name = nodes[i].id) != "" && !nodes[i].href)
383
- html += '<option value="#' + name + '">' + name + '</option>';
384
- }
385
-
386
- if (html == "")
387
- return "";
388
-
389
- html = '<select id="' + id + '" name="' + id + '" class="mceAnchorList"'
390
- + ' onchange="this.form.' + target + '.value=this.options[this.selectedIndex].value"'
391
- + '>'
392
- + '<option value="">---</option>'
393
- + html
394
- + '</select>';
395
-
396
- return html;
397
- }
398
-
399
- function insertAction() {
400
- var inst = tinyMCEPopup.editor;
401
- var elm, elementArray, i;
402
-
403
- elm = inst.selection.getNode();
404
- checkPrefix(document.forms[0].href);
405
-
406
- elm = inst.dom.getParent(elm, "A");
407
-
408
- // Remove element if there is no href
409
- if (!document.forms[0].href.value) {
410
- i = inst.selection.getBookmark();
411
- inst.dom.remove(elm, 1);
412
- inst.selection.moveToBookmark(i);
413
- tinyMCEPopup.execCommand("mceEndUndoLevel");
414
- tinyMCEPopup.close();
415
- return;
416
- }
417
-
418
- // Create new anchor elements
419
- if (elm == null) {
420
- inst.getDoc().execCommand("unlink", false, null);
421
- tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1});
422
-
423
- elementArray = tinymce.grep(inst.dom.select("a"), function(n) {return inst.dom.getAttrib(n, 'href') == '#mce_temp_url#';});
424
- for (i=0; i<elementArray.length; i++)
425
- setAllAttribs(elm = elementArray[i]);
426
- } else
427
- setAllAttribs(elm);
428
-
429
- // Don't move caret if selection was image
430
- if (elm.childNodes.length != 1 || elm.firstChild.nodeName != 'IMG') {
431
- inst.focus();
432
- inst.selection.select(elm);
433
- inst.selection.collapse(0);
434
- tinyMCEPopup.storeSelection();
435
- }
436
-
437
- tinyMCEPopup.execCommand("mceEndUndoLevel");
438
- tinyMCEPopup.close();
439
- }
440
-
441
- function setAllAttribs(elm) {
442
- var formObj = document.forms[0];
443
- var href = formObj.href.value.replace(/ /g, '%20');
444
- var target = getSelectValue(formObj, 'targetlist');
445
-
446
- setAttrib(elm, 'href', href);
447
- setAttrib(elm, 'title');
448
- setAttrib(elm, 'target', target == '_self' ? '' : target);
449
- setAttrib(elm, 'id');
450
- setAttrib(elm, 'style');
451
- setAttrib(elm, 'class', getSelectValue(formObj, 'classlist'));
452
- setAttrib(elm, 'rel');
453
- setAttrib(elm, 'rev');
454
- setAttrib(elm, 'charset');
455
- setAttrib(elm, 'hreflang');
456
- setAttrib(elm, 'dir');
457
- setAttrib(elm, 'lang');
458
- setAttrib(elm, 'tabindex');
459
- setAttrib(elm, 'accesskey');
460
- setAttrib(elm, 'type');
461
- setAttrib(elm, 'onfocus');
462
- setAttrib(elm, 'onblur');
463
- setAttrib(elm, 'onclick');
464
- setAttrib(elm, 'ondblclick');
465
- setAttrib(elm, 'onmousedown');
466
- setAttrib(elm, 'onmouseup');
467
- setAttrib(elm, 'onmouseover');
468
- setAttrib(elm, 'onmousemove');
469
- setAttrib(elm, 'onmouseout');
470
- setAttrib(elm, 'onkeypress');
471
- setAttrib(elm, 'onkeydown');
472
- setAttrib(elm, 'onkeyup');
473
-
474
- // Refresh in old MSIE
475
- if (tinyMCE.isMSIE5)
476
- elm.outerHTML = elm.outerHTML;
477
- }
478
-
479
- function getSelectValue(form_obj, field_name) {
480
- var elm = form_obj.elements[field_name];
481
-
482
- if (!elm || elm.options == null || elm.selectedIndex == -1)
483
- return "";
484
-
485
- return elm.options[elm.selectedIndex].value;
486
- }
487
-
488
- function getLinkListHTML(elm_id, target_form_element, onchange_func) {
489
- if (typeof(tinyMCELinkList) == "undefined" || tinyMCELinkList.length == 0)
490
- return "";
491
-
492
- var html = "";
493
-
494
- html += '<select id="' + elm_id + '" name="' + elm_id + '"';
495
- html += ' class="mceLinkList" onchange="this.form.' + target_form_element + '.value=';
496
- html += 'this.options[this.selectedIndex].value;';
497
-
498
- if (typeof(onchange_func) != "undefined")
499
- html += onchange_func + '(\'' + target_form_element + '\',this.options[this.selectedIndex].text,this.options[this.selectedIndex].value);';
500
-
501
- html += '"><option value="">---</option>';
502
-
503
- for (var i=0; i<tinyMCELinkList.length; i++)
504
- html += '<option value="' + tinyMCELinkList[i][1] + '">' + tinyMCELinkList[i][0] + '</option>';
505
-
506
- html += '</select>';
507
-
508
- return html;
509
-
510
- // tinyMCE.debug('-- image list start --', html, '-- image list end --');
511
- }
512
-
513
- function getTargetListHTML(elm_id, target_form_element) {
514
- var targets = tinyMCEPopup.getParam('theme_advanced_link_targets', '').split(';');
515
- var html = '';
516
-
517
- html += '<select id="' + elm_id + '" name="' + elm_id + '" onchange="this.form.' + target_form_element + '.value=';
518
- html += 'this.options[this.selectedIndex].value;">';
519
- html += '<option value="_self">' + tinyMCEPopup.getLang('advlink_dlg.target_same') + '</option>';
520
- html += '<option value="_blank">' + tinyMCEPopup.getLang('advlink_dlg.target_blank') + ' (_blank)</option>';
521
- html += '<option value="_parent">' + tinyMCEPopup.getLang('advlink_dlg.target_parent') + ' (_parent)</option>';
522
- html += '<option value="_top">' + tinyMCEPopup.getLang('advlink_dlg.target_top') + ' (_top)</option>';
523
-
524
- for (var i=0; i<targets.length; i++) {
525
- var key, value;
526
-
527
- if (targets[i] == "")
528
- continue;
529
-
530
- key = targets[i].split('=')[0];
531
- value = targets[i].split('=')[1];
532
-
533
- html += '<option value="' + key + '">' + value + ' (' + key + ')</option>';
534
- }
535
-
536
- html += '</select>';
537
-
538
- return html;
539
- }
540
-
541
- // While loading
542
- preinit();
543
- tinyMCEPopup.onInit.add(init);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/advlink/langs/de_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('de.advlink_dlg',{"target_name":"Name der Zielseite",classes:"Klassen",style:"Format",id:"ID","popup_position":"Position (X/Y)",langdir:"Schriftrichtung","popup_size":"Gr\u00f6\u00dfe","popup_dependent":"Vom Elternfenster abh\u00e4ngig <br /> (nur Mozilla/Firefox) ","popup_resizable":"Vergr\u00f6\u00dfern des Fenster zulassen","popup_location":"Adressleiste anzeigen","popup_menubar":"Browsermen\u00fc anzeigen","popup_toolbar":"Werkzeugleisten anzeigen","popup_statusbar":"Statusleiste anzeigen","popup_scrollbars":"Scrollbalken anzeigen","popup_return":"Link trotz Popup folgen","popup_name":"Name des Fensters","popup_url":"Popup-Adresse",popup:"JavaScript-Popup","target_blank":"In neuem Fenster \u00f6ffnen","target_top":"Im obersten Frame \u00f6ffnen (sprengt das Frameset)","target_parent":"Im \u00fcbergeordneten Fenster/Frame \u00f6ffnen","target_same":"Im selben Fenster/Frame \u00f6ffnen","anchor_names":"Anker","popup_opts":"Optionen","advanced_props":"Erweiterte Eigenschaften","event_props":"Ereignisse","popup_props":"Popup-Eigenschaften","general_props":"Allemeine Eigenschaften","advanced_tab":"Erweitert","events_tab":"Ereignisse","popup_tab":"Popup","general_tab":"Allgemein",list:"Linkliste","is_external":"Diese Adresse scheint ein externer Link zu sein. Soll das dazu ben\u00f6tigte \"http://\" vorangestellt werden?","is_email":"Diese Adresse scheint eine E-Mail Adresse zu sein. Soll das dazu ben\u00f6tigte \"mailto:\" vorangestellt werden?",titlefield:"Titel",target:"Fenster",url:"Adresse",title:"Link einf\u00fcgen/bearbeiten","link_list":"Linkliste",rtl:"Rechts nach links",ltr:"Links nach rechts",accesskey:"Tastenk\u00fcrzel",tabindex:"Tabindex",rev:"Beziehung des Linkziels zur Seite",rel:"Beziehung der Seite zum Linkziel",mime:"MIME-Type der Zielseite",encoding:"Zeichenkodierung der Zielseite",langcode:"Sprachcode","target_langcode":"Sprache der Zielseite",width:"Breite",height:"H\u00f6he"});
 
mce/advlink/langs/en_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('en.advlink_dlg',{"target_name":"Target Name",classes:"Classes",style:"Style",id:"ID","popup_position":"Position (X/Y)",langdir:"Language Direction","popup_size":"Size","popup_dependent":"Dependent (Mozilla/Firefox Only)","popup_resizable":"Make Window Resizable","popup_location":"Show Location Bar","popup_menubar":"Show Menu Bar","popup_toolbar":"Show Toolbars","popup_statusbar":"Show Status Bar","popup_scrollbars":"Show Scrollbars","popup_return":"Insert \'return false\'","popup_name":"Window Name","popup_url":"Popup URL",popup:"JavaScript Popup","target_blank":"Open in New Window","target_top":"Open in Top Frame (Replaces All Frames)","target_parent":"Open in Parent Window/Frame","target_same":"Open in This Window/Frame","anchor_names":"Anchors","popup_opts":"Options","advanced_props":"Advanced Properties","event_props":"Events","popup_props":"Popup Properties","general_props":"General Properties","advanced_tab":"Advanced","events_tab":"Events","popup_tab":"Popup","general_tab":"General",list:"Link List","is_external":"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?","is_email":"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",titlefield:"Title",target:"Target",url:"Link URL",title:"Insert/Edit Link","link_list":"Link List",rtl:"Right to Left",ltr:"Left to Right",accesskey:"AccessKey",tabindex:"TabIndex",rev:"Relationship Target to Page",rel:"Relationship Page to Target",mime:"Target MIME Type",encoding:"Target Character Encoding",langcode:"Language Code","target_langcode":"Target Language",width:"Width",height:"Height"});
 
mce/advlink/langs/es_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('es.advlink_dlg',{"target_name":"Nombre del Target",classes:"Clases",style:"Estilo",id:"Id","popup_position":"Posici\u00f3n (X/Y)",langdir:"Direcci\u00f3n del lenguaje","popup_size":"Tama\u00f1o","popup_dependent":"Dependientes (s\u00f3lo Mozilla/Firefox)","popup_resizable":"Permitir cambiar el tama\u00f1o de la ventana","popup_location":"Barra de localizaci\u00f3n","popup_menubar":"Barra de men\u00fa","popup_toolbar":"Barra de herramientas","popup_statusbar":"Barra de estado","popup_scrollbars":"Barras de desplazamiento","popup_return":"Insertar \'return false\'","popup_name":"Nombre de la ventana","popup_url":"URL de la ventana emergente",popup:"Javascript popup","target_blank":"Abrir en ventana nueva","target_top":"Abrir en el marco superior (reemplaza todos los marcos)","target_parent":"Abrir en ventana padre / marco","target_same":"Abrir en esta ventana / marco","anchor_names":"Anclas","popup_opts":"Opciones","advanced_props":"Propiedades avanzadas","event_props":"Eventos","popup_props":"Propiedades de ventanas emergentes","general_props":"Propiedades generales","advanced_tab":"Avanzado","events_tab":"Eventos","popup_tab":"Ventana emergente","general_tab":"General",list:"Lista de v\u00ednculos","is_external":"La URL que ha introducido parece ser un v\u00ednculo externo, \u00bfdesea agregar el prefijo http:// necesario?","is_email":"La URL que ha introducido parece ser una direci\u00f3n de correo, \u00bfdesea agregar el prefijo mailto: necesario?",titlefield:"T\u00edtulo",target:"Destino",url:"URL del hiperv\u00ednculo",title:"Insertar/editar hiperv\u00ednculo","link_list":"Lista de v\u00ednculo",rtl:"Derecha a izquierda",ltr:"Izquierda a derecha",accesskey:"Tecla de acceso",tabindex:"Indice de tabulaci\u00f3n",rev:"Relaci\u00f3n target a p\u00e1gina",rel:"Relaci\u00f3n p\u00e1gina a target",mime:"Tipo MIME del Target",encoding:"Codificaci\u00f3n de caracteres del Target",langcode:"C\u00f3digo del lenguaje","target_langcode":"Lenguaje del Target",width:"Ancho",height:"Alto"});
 
mce/advlink/langs/fr_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('fr.advlink_dlg',{"target_name":"Nom de la cible",classes:"Classes",style:"Style",id:"Id","popup_position":"Position (X/Y)",langdir:"Sens de lecture","popup_size":"Taille","popup_dependent":"D\u00e9pendante (seulement sous Mozilla/Firefox)","popup_resizable":"Autoriser le redimensionnement de la fen\u00eatre","popup_location":"Afficher la barre d\'adresse","popup_menubar":"Afficher la barre de menu","popup_toolbar":"Afficher la barre d\'outils","popup_statusbar":"Afficher la barre d\'\u00e9tat","popup_scrollbars":"Afficher les ascenseurs","popup_return":"Ins\u00e9rer \'return false\'","popup_name":"Nom de la fen\u00eatre","popup_url":"URL de la popup",popup:"Popup Javascript","target_blank":"Ouvrir dans une nouvelle fen\u00eatre","target_top":"Ouvrir dans le cadre principal (remplace tous les cadres)","target_parent":"Ouvrir dans la fen\u00eatre / le cadre parent","target_same":"Ouvrir dans cette fen\u00eatre / dans ce cadre","anchor_names":"Ancres","popup_opts":"Options","advanced_props":"Propri\u00e9t\u00e9s avanc\u00e9es","event_props":"\u00c9v\u00e8nements","popup_props":"Propri\u00e9t\u00e9s de la popup","general_props":"Propri\u00e9t\u00e9s g\u00e9n\u00e9rales","advanced_tab":"Avanc\u00e9","events_tab":"\u00c9v\u00e8nements","popup_tab":"Popup","general_tab":"G\u00e9n\u00e9ral",list:"Liste de liens","is_external":"L\'URL que vous avez saisie semble \u00eatre une adresse web externe. Souhaitez-vous ajouter le pr\u00e9fixe \u00ab http:// \u00bb ?","is_email":"L\'URL que vous avez saisie semble \u00eatre une adresse e-mail, souhaitez-vous ajouter le pr\u00e9fixe \u00ab mailto: \u00bb ?",titlefield:"Titre",target:"Cible",url:"URL du lien",title:"Ins\u00e9rer / \u00e9diter un lien","link_list":"Liste des liens",rtl:"Droite \u00e0 gauche",ltr:"Gauche \u00e0 droite",accesskey:"Touche d\'acc\u00e8s rapide",tabindex:"Tabindex",rev:"Relation de la cible \u00e0 la page",rel:"Relation de la page \u00e0 la cible",mime:"Type MIME de la cible",encoding:"Encodage de la cible",langcode:"Code de la langue","target_langcode":"Langue de la cible",width:"Largeur",height:"Hauteur"});
 
mce/advlink/langs/it_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('it.advlink_dlg',{"target_name":"Nome target",classes:"Classe",style:"Stile",id:"Id","popup_position":"Posizione (X/Y)",langdir:"Direzione del testo","popup_size":"Dimensioni","popup_dependent":"Dipendente (Solo in Mozilla/Firefox)","popup_resizable":"Rendi la finestra ridimensionabile","popup_location":"Mostra barra navigazione","popup_menubar":"Mostra barra menu","popup_toolbar":"Mostra barre strumenti","popup_statusbar":"Mostra barra di stato","popup_scrollbars":"Mostra barre di scorrimento","popup_return":"Inserisci \'return false\'","popup_name":"Nome finestra","popup_url":"URL Popup",popup:"Popup Javascript","target_blank":"Apri in una nuova finestra","target_top":"Apri nella cornice superiore (sostituisce tutte le cornici)","target_parent":"Apri nella finestra / cornice genitore","target_same":"Apri in questa finestra / cornice","anchor_names":"Ancore","popup_opts":"Opzioni","advanced_props":"Propriet\u00e0 avanzate","event_props":"Eventi","popup_props":"Propriet\u00e0 popup","general_props":"Propriet\u00e0 generali","advanced_tab":"Avanzate","events_tab":"Eventi","popup_tab":"Popup","general_tab":"Generale",list:"Lista collegamenti","is_external":"L\'URL inserito sembra essere un link esterno. Aggiungere il necessario prefisso http:// ?","is_email":"L\'URL inserito sembra essere un indirizzo email. Aggiungere il necessario prefisso mailto: ?",titlefield:"Titolo",target:"Target",url:"URL collegamento",title:"Inserisci/modifica link","link_list":"Lista collegamenti",rtl:"Destra verso sinistra",ltr:"Sinistra verso destra",accesskey:"Carattere di accesso",tabindex:"Indice tabulazione",rev:"Relazione da target a pagina",rel:"Relazione da pagina a target",mime:"Tipo MIME del target",encoding:"Codifica carattere del target",langcode:"Lingua","target_langcode":"Lingua del target",width:"Larghezza",height:"Altezza"});
 
mce/advlink/langs/ja_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('ja.advlink_dlg',{"target_name":"\u30bf\u30fc\u30b2\u30c3\u30c8\u306e\u540d\u524d",classes:"\u30af\u30e9\u30b9",style:"\u30b9\u30bf\u30a4\u30eb",id:"ID","popup_position":"\u4f4d\u7f6e (X/Y)",langdir:"\u6587\u7ae0\u306e\u65b9\u5411","popup_size":"\u5927\u304d\u3055","popup_dependent":"\u4f9d\u5b58(Mozilla\u3068Firefox\u3060\u3051)","popup_resizable":"\u30a6\u30a4\u30f3\u30c9\u30a6\u306e\u30b5\u30a4\u30ba\u5909\u66f4\u3092\u8a31\u53ef","popup_location":"\u30a2\u30c9\u30ec\u30b9\u30d0\u30fc\u3092\u8868\u793a","popup_menubar":"\u30e1\u30cb\u30e5\u30fc\u30d0\u30fc\u3092\u8868\u793a","popup_toolbar":"\u30c4\u30fc\u30eb\u30d0\u30fc\u3092\u8868\u793a","popup_statusbar":"\u30b9\u30c6\u30fc\u30bf\u30b9\u30d0\u30fc\u3092\u8868\u793a","popup_scrollbars":"\u30b9\u30af\u30ed\u30fc\u30eb\u30d0\u30fc\u3092\u8868\u793a","popup_return":"\'return false\'\u3092\u633f\u5165","popup_name":"\u30a6\u30a4\u30f3\u30c9\u30a6\u306e\u540d\u524d","popup_url":"\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7\u306eURL",popup:"Javascript\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7","target_blank":"\u65b0\u3057\u3044\u30a6\u30a4\u30f3\u30c9\u30a6\u3067\u958b\u304f","target_top":"\u30c8\u30c3\u30d7\u306e\u30d5\u30ec\u30fc\u30e0\u3067\u958b\u304f(\u3059\u3079\u3066\u306e\u30d5\u30ec\u30fc\u30e0\u3092\u7f6e\u304d\u63db\u3048)","target_parent":"\u89aa\u30a6\u30a4\u30f3\u30c9\u30a6/\u89aa\u30d5\u30ec\u30fc\u30e0\u3067\u958b\u304f","target_same":"\u3053\u306e\u30a6\u30a4\u30f3\u30c9\u30a6/\u30d5\u30ec\u30fc\u30e0\u3067\u958b\u304f","anchor_names":"\u30a2\u30f3\u30ab\u30fc","popup_opts":"\u30aa\u30d7\u30b7\u30e7\u30f3","advanced_props":"\u9ad8\u5ea6\u306a\u5c5e\u6027","event_props":"\u30a4\u30d9\u30f3\u30c8","popup_props":"\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7","general_props":"\u4e00\u822c","advanced_tab":"\u5c02\u9580\u7684","events_tab":"\u30a4\u30d9\u30f3\u30c8","popup_tab":"\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7","general_tab":"\u4e00\u822c",list:"\u30ea\u30f3\u30af\u306e\u4e00\u89a7","is_external":"\u5165\u529b\u3057\u305fURL\u306f\u5916\u90e8\u306e\u30ea\u30f3\u30af\u306e\u3088\u3046\u3067\u3059\u3002\u30ea\u30f3\u30af\u306b http:// \u3092\u8ffd\u52a0\u3057\u307e\u3059\u304b?","is_email":"\u5165\u529b\u3057\u305fURL\u306f\u96fb\u5b50\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306e\u3088\u3046\u3067\u3059\u3002\u30ea\u30f3\u30af\u306b mailto: \u3092\u8ffd\u52a0\u3057\u307e\u3059\u304b?",titlefield:"\u30bf\u30a4\u30c8\u30eb",target:"\u30bf\u30fc\u30b2\u30c3\u30c8",url:"\u30ea\u30f3\u30af\u306eURL",title:"\u30ea\u30f3\u30af\u306e\u633f\u5165/\u7de8\u96c6","link_list":"\u30ea\u30f3\u30af\u306e\u4e00\u89a7",rtl:"\u53f3\u304b\u3089\u5de6",ltr:"\u5de6\u304b\u3089\u53f3",accesskey:"\u30a2\u30af\u30bb\u30b9\u30ad\u30fc",tabindex:"\u30bf\u30d6\u30a4\u30f3\u30c7\u30c3\u30af\u30b9",rev:"\u30bf\u30fc\u30b2\u30c3\u30c8\u304b\u3089\u30da\u30fc\u30b8\u306e\u95a2\u4fc2",rel:"\u30da\u30fc\u30b8\u304b\u3089\u30bf\u30fc\u30b2\u30c3\u30c8\u306e\u95a2\u4fc2",mime:"\u30bf\u30fc\u30b2\u30c3\u30c8\u306eMIME\u30bf\u30a4\u30d7",encoding:"\u30bf\u30fc\u30b2\u30c3\u30c8\u306e\u6587\u5b57\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0",langcode:"\u8a00\u8a9e\u30b3\u30fc\u30c9","target_langcode":"\u30bf\u30fc\u30b2\u30c3\u30c8\u306e\u8a00\u8a9e",width:"\u5e45",height:"\u9ad8\u3055"});
 
mce/advlink/langs/langs.php DELETED
@@ -1,12 +0,0 @@
1
- <?php
2
- $lang_file = dirname(__FILE__) . '/' . $mce_locale . '_dlg.js';
3
-
4
- if ( ! is_file( $lang_file ) && defined( 'TINYMCE_ADVANCED_LANGUAGES_PATH' ) )
5
- $lang_file = TINYMCE_ADVANCED_LANGUAGES_PATH . 'advlink/langs/' . $mce_locale . '_dlg.js';
6
-
7
- if ( is_file( $lang_file ) && is_readable( $lang_file ) ) {
8
- $strings = tdav_get_file( $lang_file );
9
- } else {
10
- $strings = tdav_get_file( dirname(__FILE__) . '/en_dlg.js' );
11
- $strings = preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $strings, 1 );
12
- }
 
 
 
 
 
 
 
 
 
 
 
 
mce/advlink/langs/pt_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('pt.advlink_dlg',{"target_name":"Nome do alvo",classes:"Classes",style:"Estilo",id:"Id","popup_position":"Posi\u00e7\u00e3o (X/Y)",langdir:"Dire\u00e7\u00e3o do texto","popup_size":"Tamanho","popup_dependent":"Dependente (Mozilla/Firefox apenas)","popup_resizable":"Permitir altera\u00e7\u00e3o do tamanho da janela","popup_location":"Mostrar a barra de endere\u00e7os","popup_menubar":"Mostrar a barra de menu","popup_toolbar":"Mostrar a barra de ferramentas","popup_statusbar":"Mostrar a barra de status","popup_scrollbars":"Mostrar as barras de scroll","popup_return":"Inserir \"return false\"","popup_name":"Nome da janela","popup_url":"URL do popup",popup:"Popup javascript","target_blank":"Abrir numa nova janela","target_top":"Abrir na p\u00e1gina inteira (substitui todos os quadros)","target_parent":"Abrir na janela/quadro pai","target_same":"Abrir nesta janela/quadro","anchor_names":"\u00c2ncoras","popup_opts":"Op\u00e7\u00f5es","advanced_props":"Propriedades avan\u00e7adas","event_props":"Eventos","popup_props":"Propriedades de popup","general_props":"Propriedades gerais","advanced_tab":"Avan\u00e7ado","events_tab":"Eventos","popup_tab":"Popup","general_tab":"Geral",list:"Lista de hyperlinks","is_external":"A URL digitada parece conduzir a um link externo. Deseja acrescentar o prefixo necess\u00e1rio http://?","is_email":"A URL digitada parece ser um endere\u00e7o de e-mail. Deseja acrescentar o prefixo necess\u00e1rio mailto:?",titlefield:"T\u00edtulo",target:"Alvo",url:"URL do hyperlink",title:"Inserir/editar hyperlink","link_list":"Lista de hyperlinks",rtl:"Da direita para a esquerda",ltr:"Da esquerda para a direita",accesskey:"Chave de acesso",tabindex:"Tabindex",rev:"Rela\u00e7\u00e3o alvo/p\u00e1gina",rel:"Rela\u00e7\u00e3o p\u00e1gina/alvo",mime:"Tipo MIME alvo",encoding:"Codifica\u00e7\u00e3o de caracteres",langcode:"C\u00f3digo do idioma","target_langcode":"Idioma alvo",width:"Largura",height:"Altura"});
 
mce/advlink/langs/ru_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('ru.advlink_dlg',{"target_name":"\u0418\u043c\u044f \u0446\u0435\u043b\u0438",classes:"\u041a\u043b\u0430\u0441\u0441\u044b",style:"\u0421\u0442\u0438\u043b\u044c",id:"\u0418\u043c\u044f","popup_position":"\u041f\u043e\u0437\u0438\u0446\u0438\u044f (X/Y)",langdir:"\u041d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430","popup_size":"\u0420\u0430\u0437\u043c\u0435\u0440","popup_dependent":"\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c (\u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f Firefox)","popup_resizable":"\u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440","popup_location":"\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u043f\u0430\u043d\u0435\u043b\u044c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f","popup_menubar":"\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u043c\u0435\u043d\u044e","popup_toolbar":"\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u043f\u0430\u043d\u0435\u043b\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432","popup_statusbar":"\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f","popup_scrollbars":"\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u043f\u043e\u043b\u043e\u0441\u044b \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u0438","popup_return":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \'return false\'","popup_name":"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043e\u043a\u043d\u0430","popup_url":"\u0410\u0434\u0440\u0435\u0441",popup:"\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Java","target_blank":"\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0432 \u043d\u043e\u0432\u043e\u043c \u043e\u043a\u043d\u0435","target_top":"\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u043a\u0430\u0434\u0440\u0435 (\u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u043a\u0430\u0434\u0440\u044b)","target_parent":"\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0432 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c \u043e\u043a\u043d\u0435/\u043a\u0430\u0434\u0440\u0435","target_same":"\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0432 \u044d\u0442\u043e\u043c \u043e\u043a\u043d\u0435/\u043a\u0430\u0434\u0440\u0435","anchor_names":"\u042f\u043a\u043e\u0440\u044f","popup_opts":"\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430","advanced_props":"\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b","event_props":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u043e\u0431\u044b\u0442\u0438\u0439","popup_props":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f","general_props":"\u041e\u0431\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b","advanced_tab":"\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e","events_tab":"\u0421\u043e\u0431\u044b\u0442\u0438\u044f","popup_tab":"\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435","general_tab":"\u041e\u0431\u0449\u0435\u0435",list:"\u0421\u043f\u0438\u0441\u043e\u043a","is_external":"\u0412\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u0432\u043d\u0435\u0448\u043d\u044e\u044e \u0441\u0441\u044b\u043b\u043a\u0443, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441 http://?","is_email":"\u0412\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u0443\u044e \u043f\u043e\u0447\u0442\u0443, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441 mailto:?",titlefield:"\u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430",target:"\u041e\u043a\u043d\u043e",url:"\u0410\u0434\u0440\u0435\u0441",title:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0441\u044b\u043b\u043a\u0438","link_list":"\u0421\u043f\u0438\u0441\u043e\u043a \u0441\u0441\u044b\u043b\u043e\u043a",rtl:"\u0421\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0435\u0432\u043e",ltr:"\u0421\u043b\u0435\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e",accesskey:"\u041a\u043b\u044e\u0447 \u0434\u043e\u0441\u0442\u0443\u043f\u0430",tabindex:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",rev:"\u041e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u0446\u0435\u043b\u0438 \u043a \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435",rel:"\u041e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043a \u0446\u0435\u043b\u0438",mime:"MIME \u0442\u0438\u043f \u0446\u0435\u043b\u0438",encoding:"\u041a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430 \u0446\u0435\u043b\u0438",langcode:"\u041a\u043e\u0434 \u044f\u0437\u044b\u043a\u0430","target_langcode":"\u042f\u0437\u044b\u043a \u0446\u0435\u043b\u0438",width:"\u0428\u0438\u0440\u0438\u043d\u0430",height:"\u0412\u044b\u0441\u043e\u0442\u0430"});
 
mce/advlink/langs/zh_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('zh.advlink_dlg',{"target_name":"\u94fe\u63a5\u76ee\u6807\u540d\u79f0",classes:"\u7c7b",style:"\u6837\u5f0f",id:"ID","popup_position":"\u4f4d\u7f6e(X/Y)",langdir:"\u8bed\u8a00\u4e66\u5199\u65b9\u5411","popup_size":"\u5927\u5c0f","popup_dependent":"\u6d4f\u89c8\u5668\u9650\u5236(\u4ec5\u652f\u6301Mozilla/Firefox)","popup_resizable":"\u53ef\u8c03\u6574\u5927\u5c0f\u7684\u5f39\u51fa\u7a97\u53e3","popup_location":"\u663e\u793a\u7f51\u5740\u680f","popup_menubar":"\u663e\u793a\u83dc\u5355\u680f","popup_toolbar":"\u663e\u793a\u5de5\u5177\u680f","popup_statusbar":"\u663e\u793a\u72b6\u6001\u680f","popup_scrollbars":"\u663e\u793a\u6eda\u52a8\u680f","popup_return":"\u63d2\u5165\'return false\'","popup_name":"\u7a97\u53e3\u540d\u79f0","popup_url":"\u5f39\u51fa\u7a97\u53e3\u7684URL",popup:"JavaScript\u5f39\u51fa\u7a97\u53e3","target_blank":"\u5728\u65b0\u7a97\u53e3\u6253\u5f00\u94fe\u63a5","target_top":"\u5728top\u6846\u67b6\u6253\u5f00\u94fe\u63a5 (\u5957\u7528\u5728\u6240\u6709\u6846\u67b6)","target_parent":"\u5728\u7236(\u4e0a\u5c42)\u7a97\u53e3/\u6846\u67b6\u6253\u5f00\u94fe\u63a5","target_same":"\u5728\u5f53\u524d\u7a97\u53e3\u6253\u5f00\u94fe\u63a5","anchor_names":"\u951a\u70b9","popup_opts":"\u9009\u9879","advanced_props":"\u9ad8\u7ea7\u5c5e\u6027","event_props":"Javascript\u4e8b\u4ef6","popup_props":"\u5f39\u51fa\u7a97\u53e3\u5c5e\u6027","general_props":"\u666e\u901a\u5c5e\u6027","advanced_tab":"\u9ad8\u7ea7","events_tab":"Javascript\u4e8b\u4ef6","popup_tab":"\u5f39\u51fa\u7a97\u53e3","general_tab":"\u666e\u901a",list:"\u94fe\u63a5\u6e05\u5355","is_external":"\u60a8\u6240\u8f93\u5165\u7684URL\u4f3c\u4e4e\u4e3a\u5916\u90e8\u94fe\u63a5\uff0c\u662f\u5426\u9700\u8981\u52a0\u4e0ahttp://\u524d\u7f00\uff1f","is_email":"\u60a8\u8f93\u5165\u7684URL\u4f3c\u4e4e\u662f\u7535\u5b50\u90ae\u4ef6\u4f4d\u5740\uff0c\u662f\u5426\u9700\u8981\u52a0\u4e0amailto:\u524d\u7f00\uff1f",titlefield:"\u94fe\u63a5\u6807\u9898",target:"\u94fe\u63a5\u76ee\u6807",url:"URL\u94fe\u63a5",title:"\u63d2\u5165/\u7f16\u8f91\u94fe\u63a5","link_list":"\u94fe\u63a5\u6e05\u5355",rtl:"\u4ece\u53f3\u5230\u5de6",ltr:"\u4ece\u5de6\u5230\u53f3",accesskey:"\u5feb\u6377\u952e",tabindex:"Tab\u7d22\u5f15",rev:"\u76ee\u6807\u5230\u7f51\u9875\u7684\u5173\u7cfb",rel:"\u7f51\u9875\u5230\u76ee\u6807\u7684\u5173\u7cfb",mime:"\u76ee\u6807MIME\u7c7b\u578b",encoding:"\u76ee\u6807\u5b57\u7b26\u7f16\u7801",langcode:"\u8bed\u8a00\u4ee3\u7801","target_langcode":"\u76ee\u6807\u8bed\u8a00",width:"\u5bbd",height:"\u9ad8"});
 
mce/advlink/link.htm DELETED
@@ -1,338 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <title>{#advlink_dlg.title}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=359"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=359"></script>
7
- <script type="text/javascript" src="../../utils/form_utils.js?ver=359"></script>
8
- <script type="text/javascript" src="../../utils/validate.js?ver=359"></script>
9
- <script type="text/javascript" src="js/advlink.js?ver=359"></script>
10
- <link href="css/advlink.css?ver=359" rel="stylesheet" type="text/css" />
11
- </head>
12
- <body id="advlink" style="display: none" role="application" onload="javascript:mcTabs.displayTab('general_tab','general_panel', true);" aria-labelledby="app_label">
13
- <span class="mceVoiceLabel" id="app_label" style="display:none;">{#advlink_dlg.title}</span>
14
- <form onsubmit="insertAction();return false;" action="#">
15
- <div class="tabs" role="presentation">
16
- <ul>
17
- <li id="general_tab" class="current" aria-controls="general_panel" ><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advlink_dlg.general_tab}</a></span></li>
18
- <li id="popup_tab" aria-controls="popup_panel" ><span><a href="javascript:mcTabs.displayTab('popup_tab','popup_panel');" onmousedown="return false;">{#advlink_dlg.popup_tab}</a></span></li>
19
- <li id="events_tab" aria-controls="events_panel"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#advlink_dlg.events_tab}</a></span></li>
20
- <li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#advlink_dlg.advanced_tab}</a></span></li>
21
- </ul>
22
- </div>
23
-
24
- <div class="panel_wrapper" role="presentation">
25
- <div id="general_panel" class="panel current">
26
- <fieldset>
27
- <legend>{#advlink_dlg.general_props}</legend>
28
-
29
- <table border="0" cellpadding="4" cellspacing="0" role="presentation">
30
- <tr>
31
- <td class="nowrap"><label id="hreflabel" for="href">{#advlink_dlg.url}</label></td>
32
- <td><table border="0" cellspacing="0" cellpadding="0">
33
- <tr>
34
- <td><input id="href" name="href" type="text" class="mceFocus" value="" onchange="selectByValue(this.form,'linklisthref',this.value);" aria-required="true" /></td>
35
- <td id="hrefbrowsercontainer">&nbsp;</td>
36
- </tr>
37
- </table></td>
38
- </tr>
39
- <tr id="linklisthrefrow">
40
- <td class="column1"><label for="linklisthref">{#advlink_dlg.list}</label></td>
41
- <td colspan="2" id="linklisthrefcontainer"><select id="linklisthref"><option value=""></option></select></td>
42
- </tr>
43
- <tr id="anchorlistrow">
44
- <td class="column1"><label for="anchorlist">{#advlink_dlg.anchor_names}</label></td>
45
- <td colspan="2" id="anchorlistcontainer"><select id="anchorlist"><option value=""></option></select></td>
46
- </tr>
47
- <tr>
48
- <td><label id="targetlistlabel" for="targetlist">{#advlink_dlg.target}</label></td>
49
- <td id="targetlistcontainer"><select id="targetlist"><option value=""></option></select></td>
50
- </tr>
51
- <tr>
52
- <td class="nowrap"><label id="titlelabel" for="title">{#advlink_dlg.titlefield}</label></td>
53
- <td><input id="title" name="title" type="text" value="" /></td>
54
- </tr>
55
- <tr>
56
- <td><label id="classlabel" for="classlist">{#class_name}</label></td>
57
- <td>
58
- <select id="classlist" name="classlist" onchange="changeClass();">
59
- <option value="" selected="selected">{#not_set}</option>
60
- </select>
61
- </td>
62
- </tr>
63
- </table>
64
- </fieldset>
65
- </div>
66
-
67
- <div id="popup_panel" class="panel">
68
- <fieldset>
69
- <legend>{#advlink_dlg.popup_props}</legend>
70
-
71
- <input type="checkbox" id="ispopup" name="ispopup" class="radio" onclick="setPopupControlsDisabled(!this.checked);buildOnClick();" />
72
- <label id="ispopuplabel" for="ispopup">{#advlink_dlg.popup}</label>
73
-
74
- <table border="0" cellpadding="0" cellspacing="4" role="presentation" >
75
- <tr>
76
- <td class="nowrap"><label for="popupurl">{#advlink_dlg.popup_url}</label>&nbsp;</td>
77
- <td>
78
- <table border="0" cellspacing="0" cellpadding="0">
79
- <tr>
80
- <td><input type="text" name="popupurl" id="popupurl" value="" onchange="buildOnClick();" /></td>
81
- <td id="popupurlbrowsercontainer">&nbsp;</td>
82
- </tr>
83
- </table>
84
- </td>
85
- </tr>
86
- <tr>
87
- <td class="nowrap"><label for="popupname">{#advlink_dlg.popup_name}</label>&nbsp;</td>
88
- <td><input type="text" name="popupname" id="popupname" value="" onchange="buildOnClick();" /></td>
89
- </tr>
90
- <tr role="group" aria-labelledby="popup_size_label">
91
- <td class="nowrap"><label id="popup_size_label">{#advlink_dlg.popup_size}</label>&nbsp;</td>
92
- <td class="nowrap">
93
- <span style="display:none" id="width_voiceLabel">{#advlink_dlg.width}</span>
94
- <input type="text" id="popupwidth" name="popupwidth" value="" onchange="buildOnClick();" aria-labelledby="width_voiceLabel" /> x
95
- <span style="display:none" id="height_voiceLabel">{#advlink_dlg.height}</span>
96
- <input type="text" id="popupheight" name="popupheight" value="" onchange="buildOnClick();" aria-labelledby="height_voiceLabel" /> px
97
- </td>
98
- </tr>
99
- <tr role="group" aria-labelledby="popup_position_label center_hint">
100
- <td class="nowrap" id="labelleft"><label id="popup_position_label">{#advlink_dlg.popup_position}</label>&nbsp;</td>
101
- <td class="nowrap">
102
- <span style="display:none" id="x_voiceLabel">X</span>
103
- <input type="text" id="popupleft" name="popupleft" value="" onchange="buildOnClick();" aria-labelledby="x_voiceLabel" /> /
104
- <span style="display:none" id="y_voiceLabel">Y</span>
105
- <input type="text" id="popuptop" name="popuptop" value="" onchange="buildOnClick();" aria-labelledby="y_voiceLabel" /> <span id="center_hint">(c /c = center)</span>
106
- </td>
107
- </tr>
108
- </table>
109
-
110
- <fieldset>
111
- <legend>{#advlink_dlg.popup_opts}</legend>
112
-
113
- <table border="0" cellpadding="0" cellspacing="4" role="presentation" >
114
- <tr>
115
- <td><input type="checkbox" id="popuplocation" name="popuplocation" class="checkbox" onchange="buildOnClick();" /></td>
116
- <td class="nowrap"><label id="popuplocationlabel" for="popuplocation">{#advlink_dlg.popup_location}</label></td>
117
- <td><input type="checkbox" id="popupscrollbars" name="popupscrollbars" class="checkbox" onchange="buildOnClick();" /></td>
118
- <td class="nowrap"><label id="popupscrollbarslabel" for="popupscrollbars">{#advlink_dlg.popup_scrollbars}</label></td>
119
- </tr>
120
- <tr>
121
- <td><input type="checkbox" id="popupmenubar" name="popupmenubar" class="checkbox" onchange="buildOnClick();" /></td>
122
- <td class="nowrap"><label id="popupmenubarlabel" for="popupmenubar">{#advlink_dlg.popup_menubar}</label></td>
123
- <td><input type="checkbox" id="popupresizable" name="popupresizable" class="checkbox" onchange="buildOnClick();" /></td>
124
- <td class="nowrap"><label id="popupresizablelabel" for="popupresizable">{#advlink_dlg.popup_resizable}</label></td>
125
- </tr>
126
- <tr>
127
- <td><input type="checkbox" id="popuptoolbar" name="popuptoolbar" class="checkbox" onchange="buildOnClick();" /></td>
128
- <td class="nowrap"><label id="popuptoolbarlabel" for="popuptoolbar">{#advlink_dlg.popup_toolbar}</label></td>
129
- <td><input type="checkbox" id="popupdependent" name="popupdependent" class="checkbox" onchange="buildOnClick();" /></td>
130
- <td class="nowrap"><label id="popupdependentlabel" for="popupdependent">{#advlink_dlg.popup_dependent}</label></td>
131
- </tr>
132
- <tr>
133
- <td><input type="checkbox" id="popupstatus" name="popupstatus" class="checkbox" onchange="buildOnClick();" /></td>
134
- <td class="nowrap"><label id="popupstatuslabel" for="popupstatus">{#advlink_dlg.popup_statusbar}</label></td>
135
- <td><input type="checkbox" id="popupreturn" name="popupreturn" class="checkbox" onchange="buildOnClick();" checked="checked" /></td>
136
- <td class="nowrap"><label id="popupreturnlabel" for="popupreturn">{#advlink_dlg.popup_return}</label></td>
137
- </tr>
138
- </table>
139
- </fieldset>
140
- </fieldset>
141
- </div>
142
-
143
- <div id="advanced_panel" class="panel">
144
- <fieldset>
145
- <legend>{#advlink_dlg.advanced_props}</legend>
146
-
147
- <table border="0" cellpadding="0" cellspacing="4" role="presentation" >
148
- <tr>
149
- <td class="column1"><label id="idlabel" for="id">{#advlink_dlg.id}</label></td>
150
- <td><input id="id" name="id" type="text" value="" /></td>
151
- </tr>
152
-
153
- <tr>
154
- <td><label id="stylelabel" for="style">{#advlink_dlg.style}</label></td>
155
- <td><input type="text" id="style" name="style" value="" /></td>
156
- </tr>
157
-
158
- <tr>
159
- <td><label id="classeslabel" for="classes">{#advlink_dlg.classes}</label></td>
160
- <td><input type="text" id="classes" name="classes" value="" onchange="selectByValue(this.form,'classlist',this.value,true);" /></td>
161
- </tr>
162
-
163
- <tr>
164
- <td><label id="targetlabel" for="target">{#advlink_dlg.target_name}</label></td>
165
- <td><input type="text" id="target" name="target" value="" onchange="selectByValue(this.form,'targetlist',this.value,true);" /></td>
166
- </tr>
167
-
168
- <tr>
169
- <td class="column1"><label id="dirlabel" for="dir">{#advlink_dlg.langdir}</label></td>
170
- <td>
171
- <select id="dir" name="dir">
172
- <option value="">{#not_set}</option>
173
- <option value="ltr">{#advlink_dlg.ltr}</option>
174
- <option value="rtl">{#advlink_dlg.rtl}</option>
175
- </select>
176
- </td>
177
- </tr>
178
-
179
- <tr>
180
- <td><label id="hreflanglabel" for="hreflang">{#advlink_dlg.target_langcode}</label></td>
181
- <td><input type="text" id="hreflang" name="hreflang" value="" /></td>
182
- </tr>
183
-
184
- <tr>
185
- <td class="column1"><label id="langlabel" for="lang">{#advlink_dlg.langcode}</label></td>
186
- <td>
187
- <input id="lang" name="lang" type="text" value="" />
188
- </td>
189
- </tr>
190
-
191
- <tr>
192
- <td><label id="charsetlabel" for="charset">{#advlink_dlg.encoding}</label></td>
193
- <td><input type="text" id="charset" name="charset" value="" /></td>
194
- </tr>
195
-
196
- <tr>
197
- <td><label id="typelabel" for="type">{#advlink_dlg.mime}</label></td>
198
- <td><input type="text" id="type" name="type" value="" /></td>
199
- </tr>
200
-
201
- <tr>
202
- <td><label id="rellabel" for="rel">{#advlink_dlg.rel}</label></td>
203
- <td><select id="rel" name="rel">
204
- <option value="">{#not_set}</option>
205
- <option value="lightbox">Lightbox</option>
206
- <option value="alternate">Alternate</option>
207
- <option value="designates">Designates</option>
208
- <option value="stylesheet">Stylesheet</option>
209
- <option value="start">Start</option>
210
- <option value="next">Next</option>
211
- <option value="prev">Prev</option>
212
- <option value="contents">Contents</option>
213
- <option value="index">Index</option>
214
- <option value="glossary">Glossary</option>
215
- <option value="copyright">Copyright</option>
216
- <option value="chapter">Chapter</option>
217
- <option value="subsection">Subsection</option>
218
- <option value="appendix">Appendix</option>
219
- <option value="help">Help</option>
220
- <option value="bookmark">Bookmark</option>
221
- <option value="nofollow">No Follow</option>
222
- <option value="tag">Tag</option>
223
- </select>
224
- </td>
225
- </tr>
226
-
227
- <tr>
228
- <td><label id="revlabel" for="rev">{#advlink_dlg.rev}</label></td>
229
- <td><select id="rev" name="rev">
230
- <option value="">{#not_set}</option>
231
- <option value="alternate">Alternate</option>
232
- <option value="designates">Designates</option>
233
- <option value="stylesheet">Stylesheet</option>
234
- <option value="start">Start</option>
235
- <option value="next">Next</option>
236
- <option value="prev">Prev</option>
237
- <option value="contents">Contents</option>
238
- <option value="index">Index</option>
239
- <option value="glossary">Glossary</option>
240
- <option value="copyright">Copyright</option>
241
- <option value="chapter">Chapter</option>
242
- <option value="subsection">Subsection</option>
243
- <option value="appendix">Appendix</option>
244
- <option value="help">Help</option>
245
- <option value="bookmark">Bookmark</option>
246
- </select>
247
- </td>
248
- </tr>
249
-
250
- <tr>
251
- <td><label id="tabindexlabel" for="tabindex">{#advlink_dlg.tabindex}</label></td>
252
- <td><input type="text" id="tabindex" name="tabindex" value="" /></td>
253
- </tr>
254
-
255
- <tr>
256
- <td><label id="accesskeylabel" for="accesskey">{#advlink_dlg.accesskey}</label></td>
257
- <td><input type="text" id="accesskey" name="accesskey" value="" /></td>
258
- </tr>
259
- </table>
260
- </fieldset>
261
- </div>
262
-
263
- <div id="events_panel" class="panel">
264
- <fieldset>
265
- <legend>{#advlink_dlg.event_props}</legend>
266
-
267
- <table border="0" cellpadding="0" cellspacing="4" role="presentation" >
268
- <tr>
269
- <td class="column1"><label for="onfocus">onfocus</label></td>
270
- <td><input id="onfocus" name="onfocus" type="text" value="" /></td>
271
- </tr>
272
-
273
- <tr>
274
- <td class="column1"><label for="onblur">onblur</label></td>
275
- <td><input id="onblur" name="onblur" type="text" value="" /></td>
276
- </tr>
277
-
278
- <tr>
279
- <td class="column1"><label for="onclick">onclick</label></td>
280
- <td><input id="onclick" name="onclick" type="text" value="" /></td>
281
- </tr>
282
-
283
- <tr>
284
- <td class="column1"><label for="ondblclick">ondblclick</label></td>
285
- <td><input id="ondblclick" name="ondblclick" type="text" value="" /></td>
286
- </tr>
287
-
288
- <tr>
289
- <td class="column1"><label for="onmousedown">onmousedown</label></td>
290
- <td><input id="onmousedown" name="onmousedown" type="text" value="" /></td>
291
- </tr>
292
-
293
- <tr>
294
- <td class="column1"><label for="onmouseup">onmouseup</label></td>
295
- <td><input id="onmouseup" name="onmouseup" type="text" value="" /></td>
296
- </tr>
297
-
298
- <tr>
299
- <td class="column1"><label for="onmouseover">onmouseover</label></td>
300
- <td><input id="onmouseover" name="onmouseover" type="text" value="" /></td>
301
- </tr>
302
-
303
- <tr>
304
- <td class="column1"><label for="onmousemove">onmousemove</label></td>
305
- <td><input id="onmousemove" name="onmousemove" type="text" value="" /></td>
306
- </tr>
307
-
308
- <tr>
309
- <td class="column1"><label for="onmouseout">onmouseout</label></td>
310
- <td><input id="onmouseout" name="onmouseout" type="text" value="" /></td>
311
- </tr>
312
-
313
- <tr>
314
- <td class="column1"><label for="onkeypress">onkeypress</label></td>
315
- <td><input id="onkeypress" name="onkeypress" type="text" value="" /></td>
316
- </tr>
317
-
318
- <tr>
319
- <td class="column1"><label for="onkeydown">onkeydown</label></td>
320
- <td><input id="onkeydown" name="onkeydown" type="text" value="" /></td>
321
- </tr>
322
-
323
- <tr>
324
- <td class="column1"><label for="onkeyup">onkeyup</label></td>
325
- <td><input id="onkeyup" name="onkeyup" type="text" value="" /></td>
326
- </tr>
327
- </table>
328
- </fieldset>
329
- </div>
330
- </div>
331
-
332
- <div class="mceActionPanel">
333
- <input type="submit" id="insert" name="insert" value="{#insert}" />
334
- <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
335
- </div>
336
- </form>
337
- </body>
338
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/advlist/editor_plugin.js DELETED
@@ -1 +0,0 @@
1
- (function(){var a=tinymce.each;tinymce.create("tinymce.plugins.AdvListPlugin",{init:function(b,c){var d=this;d.editor=b;function e(g){var f=[];a(g.split(/,/),function(h){f.push({title:"advlist."+(h=="default"?"def":h.replace(/-/g,"_")),styles:{listStyleType:h=="default"?"":h}})});return f}d.numlist=b.getParam("advlist_number_styles")||e("default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");d.bullist=b.getParam("advlist_bullet_styles")||e("default,circle,disc,square");if(tinymce.isIE&&/MSIE [2-7]/.test(navigator.userAgent)){d.isIE7=true}},createControl:function(d,b){var f=this,e,i,g=f.editor;if(d=="numlist"||d=="bullist"){if(f[d][0].title=="advlist.def"){i=f[d][0]}function c(j,l){var k=true;a(l.styles,function(n,m){if(g.dom.getStyle(j,m)!=n){k=false;return false}});return k}function h(){var k,l=g.dom,j=g.selection;k=l.getParent(j.getNode(),"ol,ul");if(!k||k.nodeName==(d=="bullist"?"OL":"UL")||c(k,i)){g.execCommand(d=="bullist"?"InsertUnorderedList":"InsertOrderedList")}if(i){k=l.getParent(j.getNode(),"ol,ul");if(k){l.setStyles(k,i.styles);k.removeAttribute("data-mce-style")}}g.focus()}e=b.createSplitButton(d,{title:"advanced."+d+"_desc","class":"mce_"+d,onclick:function(){h()}});e.onRenderMenu.add(function(j,k){k.onHideMenu.add(function(){if(f.bookmark){g.selection.moveToBookmark(f.bookmark);f.bookmark=0}});k.onShowMenu.add(function(){var n=g.dom,m=n.getParent(g.selection.getNode(),"ol,ul"),l;if(m||i){l=f[d];a(k.items,function(o){var p=true;o.setSelected(0);if(m&&!o.isDisabled()){a(l,function(q){if(q.id==o.id){if(!c(m,q)){p=false;return false}}});if(p){o.setSelected(1)}}});if(!m){k.items[i.id].setSelected(1)}}g.focus();if(tinymce.isIE){f.bookmark=g.selection.getBookmark(1)}});k.add({id:g.dom.uniqueId(),title:"advlist.types","class":"mceMenuItemTitle",titleItem:true}).setDisabled(1);a(f[d],function(l){if(f.isIE7&&l.styles.listStyleType=="lower-greek"){return}l.id=g.dom.uniqueId();k.add({id:l.id,title:l.title,onclick:function(){i=l;h()}})})});return e}},getInfo:function(){return{longname:"Advanced lists",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlist",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advlist",tinymce.plugins.AdvListPlugin)})();
 
mce/advlist/plugin.js ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * plugin.js
3
+ *
4
+ * Copyright, Moxiecode Systems AB
5
+ * Released under LGPL License.
6
+ *
7
+ * License: http://www.tinymce.com/license
8
+ * Contributing: http://www.tinymce.com/contributing
9
+ */
10
+
11
+ /*global tinymce:true */
12
+
13
+ tinymce.PluginManager.add('advlist', function(editor) {
14
+ var olMenuItems, ulMenuItems, lastStyles = {};
15
+
16
+ function buildMenuItems(listName, styleValues) {
17
+ var items = [];
18
+
19
+ tinymce.each(styleValues.split(/[ ,]/), function(styleValue) {
20
+ items.push({
21
+ text: styleValue.replace(/\-/g, ' ').replace(/\b\w/g, function(chr) {return chr.toUpperCase();}),
22
+ data: styleValue == 'default' ? '' : styleValue
23
+ });
24
+ });
25
+
26
+ return items;
27
+ }
28
+
29
+ olMenuItems = buildMenuItems('OL', editor.getParam(
30
+ "advlist_number_styles",
31
+ "default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman"
32
+ ));
33
+
34
+ ulMenuItems = buildMenuItems('UL', editor.getParam("advlist_bullet_styles", "default,circle,disc,square"));
35
+
36
+ function applyListFormat(listName, styleValue) {
37
+ var list, dom = editor.dom, sel = editor.selection;
38
+
39
+ // Check for existing list element
40
+ list = dom.getParent(sel.getNode(), 'ol,ul');
41
+
42
+ // Switch/add list type if needed
43
+ if (!list || list.nodeName != listName || styleValue === false) {
44
+ editor.execCommand(listName == 'UL' ? 'InsertUnorderedList' : 'InsertOrderedList');
45
+ }
46
+
47
+ // Set style
48
+ styleValue = styleValue === false ? lastStyles[listName] : styleValue;
49
+ lastStyles[listName] = styleValue;
50
+
51
+ list = dom.getParent(sel.getNode(), 'ol,ul');
52
+ if (list) {
53
+ dom.setStyle(list, 'listStyleType', styleValue);
54
+ list.removeAttribute('data-mce-style');
55
+ }
56
+
57
+ editor.focus();
58
+ }
59
+
60
+ function updateSelection(e) {
61
+ var listStyleType = editor.dom.getStyle(editor.dom.getParent(editor.selection.getNode(), 'ol,ul'), 'listStyleType') || '';
62
+
63
+ e.control.items().each(function(ctrl) {
64
+ ctrl.active(ctrl.settings.data === listStyleType);
65
+ });
66
+ }
67
+
68
+ editor.addButton('numlist', {
69
+ type: 'splitbutton',
70
+ tooltip: 'Numbered list',
71
+ menu: olMenuItems,
72
+ onshow: updateSelection,
73
+ onselect: function(e) {
74
+ applyListFormat('OL', e.control.settings.data);
75
+ },
76
+ onclick: function() {
77
+ applyListFormat('OL', false);
78
+ }
79
+ });
80
+
81
+ editor.addButton('bullist', {
82
+ type: 'splitbutton',
83
+ tooltip: 'Bullet list',
84
+ menu: ulMenuItems,
85
+ onshow: updateSelection,
86
+ onselect: function(e) {
87
+ applyListFormat('UL', e.control.settings.data);
88
+ },
89
+ onclick: function() {
90
+ applyListFormat('UL', false);
91
+ }
92
+ });
93
+ });
mce/advlist/plugin.min.js ADDED
@@ -0,0 +1 @@
 
1
+ tinymce.PluginManager.add("advlist",function(t){function e(t,e){var n=[];return tinymce.each(e.split(/[ ,]/),function(t){n.push({text:t.replace(/\-/g," ").replace(/\b\w/g,function(t){return t.toUpperCase()}),data:"default"==t?"":t})}),n}function n(e,n){var o,l=t.dom,a=t.selection;o=l.getParent(a.getNode(),"ol,ul"),o&&o.nodeName==e&&n!==!1||t.execCommand("UL"==e?"InsertUnorderedList":"InsertOrderedList"),n=n===!1?i[e]:n,i[e]=n,o=l.getParent(a.getNode(),"ol,ul"),o&&(l.setStyle(o,"listStyleType",n),o.removeAttribute("data-mce-style")),t.focus()}function o(e){var n=t.dom.getStyle(t.dom.getParent(t.selection.getNode(),"ol,ul"),"listStyleType")||"";e.control.items().each(function(t){t.active(t.settings.data===n)})}var l,a,i={};l=e("OL",t.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman")),a=e("UL",t.getParam("advlist_bullet_styles","default,circle,disc,square")),t.addButton("numlist",{type:"splitbutton",tooltip:"Numbered list",menu:l,onshow:o,onselect:function(t){n("OL",t.control.settings.data)},onclick:function(){n("OL",!1)}}),t.addButton("bullist",{type:"splitbutton",tooltip:"Bullet list",menu:a,onshow:o,onselect:function(t){n("UL",t.control.settings.data)},onclick:function(){n("UL",!1)}})});
mce/anchor/plugin.js ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * plugin.js
3
+ *
4
+ * Copyright, Moxiecode Systems AB
5
+ * Released under LGPL License.
6
+ *
7
+ * License: http://www.tinymce.com/license
8
+ * Contributing: http://www.tinymce.com/contributing
9
+ */
10
+
11
+ /*global tinymce:true */
12
+
13
+ tinymce.PluginManager.add('anchor', function(editor) {
14
+ function showDialog() {
15
+ var selectedNode = editor.selection.getNode();
16
+
17
+ editor.windowManager.open({
18
+ title: 'Anchor',
19
+ body: {type: 'textbox', name: 'name', size: 40, label: 'Name', value: selectedNode.name || selectedNode.id},
20
+ onsubmit: function(e) {
21
+ editor.execCommand('mceInsertContent', false, editor.dom.createHTML('a', {
22
+ id: e.data.name
23
+ }));
24
+ }
25
+ });
26
+ }
27
+
28
+ editor.addButton('anchor', {
29
+ icon: 'anchor',
30
+ tooltip: 'Anchor',
31
+ onclick: showDialog,
32
+ stateSelector: 'a:not([href])'
33
+ });
34
+
35
+ editor.addMenuItem('anchor', {
36
+ icon: 'anchor',
37
+ text: 'Anchor',
38
+ context: 'insert',
39
+ onclick: showDialog
40
+ });
41
+ });
mce/anchor/plugin.min.js ADDED
@@ -0,0 +1 @@
 
1
+ tinymce.PluginManager.add("anchor",function(n){function e(){var e=n.selection.getNode();n.windowManager.open({title:"Anchor",body:{type:"textbox",name:"name",size:40,label:"Name",value:e.name||e.id},onsubmit:function(e){n.execCommand("mceInsertContent",!1,n.dom.createHTML("a",{id:e.data.name}))}})}n.addButton("anchor",{icon:"anchor",tooltip:"Anchor",onclick:e,stateSelector:"a:not([href])"}),n.addMenuItem("anchor",{icon:"anchor",text:"Anchor",context:"insert",onclick:e})});
mce/code/plugin.js ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * plugin.js
3
+ *
4
+ * Copyright, Moxiecode Systems AB
5
+ * Released under LGPL License.
6
+ *
7
+ * License: http://www.tinymce.com/license
8
+ * Contributing: http://www.tinymce.com/contributing
9
+ */
10
+
11
+ /*global tinymce:true */
12
+
13
+ tinymce.PluginManager.add('code', function(editor) {
14
+ function showDialog() {
15
+ editor.windowManager.open({
16
+ title: "Source code",
17
+ body: {
18
+ type: 'textbox',
19
+ name: 'code',
20
+ multiline: true,
21
+ minWidth: editor.getParam("code_dialog_width", 600),
22
+ minHeight: editor.getParam("code_dialog_height", Math.min(tinymce.DOM.getViewPort().h - 200, 500)),
23
+ value: editor.getContent({source_view: true}),
24
+ spellcheck: false,
25
+ style: 'direction: ltr; text-align: left'
26
+ },
27
+ onSubmit: function(e) {
28
+ // We get a lovely "Wrong document" error in IE 11 if we
29
+ // don't move the focus to the editor before creating an undo
30
+ // transation since it tries to make a bookmark for the current selection
31
+ editor.focus();
32
+
33
+ editor.undoManager.transact(function() {
34
+ editor.setContent(e.data.code);
35
+ });
36
+
37
+ editor.selection.setCursorLocation();
38
+ editor.nodeChanged();
39
+ }
40
+ });
41
+ }
42
+
43
+ editor.addCommand("mceCodeEditor", showDialog);
44
+
45
+ editor.addButton('code', {
46
+ icon: 'code',
47
+ tooltip: 'Source code',
48
+ onclick: showDialog
49
+ });
50
+
51
+ editor.addMenuItem('code', {
52
+ icon: 'code',
53
+ text: 'Source code',
54
+ context: 'tools',
55
+ onclick: showDialog
56
+ });
57
+ });
mce/code/plugin.min.js ADDED
@@ -0,0 +1 @@
 
1
+ tinymce.PluginManager.add("code",function(e){function o(){e.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:e.getParam("code_dialog_width",600),minHeight:e.getParam("code_dialog_height",Math.min(tinymce.DOM.getViewPort().h-200,500)),value:e.getContent({source_view:!0}),spellcheck:!1,style:"direction: ltr; text-align: left"},onSubmit:function(o){e.focus(),e.undoManager.transact(function(){e.setContent(o.data.code)}),e.selection.setCursorLocation(),e.nodeChanged()}})}e.addCommand("mceCodeEditor",o),e.addButton("code",{icon:"code",tooltip:"Source code",onclick:o}),e.addMenuItem("code",{icon:"code",text:"Source code",context:"tools",onclick:o})});
mce/contextmenu/editor_plugin.js DELETED
@@ -1 +0,0 @@
1
- (function(){var a=tinymce.dom.Event,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.ContextMenu",{init:function(f){var i=this,g,d,j,e;i.editor=f;d=f.settings.contextmenu_never_use_native;i.onContextMenu=new tinymce.util.Dispatcher(this);e=function(k){h(f,k)};g=f.onContextMenu.add(function(k,l){if((j!==0?j:l.ctrlKey)&&!d){return}a.cancel(l);if(l.target.nodeName=="IMG"){k.selection.select(l.target)}i._getMenu(k).showMenu(l.clientX||l.pageX,l.clientY||l.pageY);a.add(k.getDoc(),"click",e);k.nodeChanged()});f.onRemove.add(function(){if(i._menu){i._menu.removeAll()}});function h(k,l){j=0;if(l&&l.button==2){j=l.ctrlKey;return}if(i._menu){i._menu.removeAll();i._menu.destroy();a.remove(k.getDoc(),"click",e);i._menu=null}}f.onMouseDown.add(h);f.onKeyDown.add(h);f.onKeyDown.add(function(k,l){if(l.shiftKey&&!l.ctrlKey&&!l.altKey&&l.keyCode===121){a.cancel(l);g(k,l)}})},getInfo:function(){return{longname:"Contextmenu",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_getMenu:function(e){var g=this,d=g._menu,j=e.selection,f=j.isCollapsed(),h=j.getNode()||e.getBody(),i,k;if(d){d.removeAll();d.destroy()}k=b.getPos(e.getContentAreaContainer());d=e.controlManager.createDropMenu("contextmenu",{offset_x:k.x+e.getParam("contextmenu_offset_x",0),offset_y:k.y+e.getParam("contextmenu_offset_y",0),constrain:1,keyboard_focus:true});g._menu=d;d.add({title:"advanced.cut_desc",icon:"cut",cmd:"Cut"}).setDisabled(f);d.add({title:"advanced.copy_desc",icon:"copy",cmd:"Copy"}).setDisabled(f);d.add({title:"advanced.paste_desc",icon:"paste",cmd:"Paste"});if((h.nodeName=="A"&&!e.dom.getAttrib(h,"name"))||!f){d.addSeparator();d.add({title:"advanced.link_desc",icon:"link",cmd:e.plugins.advlink?"mceAdvLink":"mceLink",ui:true});d.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"})}d.addSeparator();d.add({title:"advanced.image_desc",icon:"image",cmd:e.plugins.advimage?"mceAdvImage":"mceImage",ui:true});d.addSeparator();i=d.addMenu({title:"contextmenu.align"});i.add({title:"contextmenu.left",icon:"justifyleft",cmd:"JustifyLeft"});i.add({title:"contextmenu.center",icon:"justifycenter",cmd:"JustifyCenter"});i.add({title:"contextmenu.right",icon:"justifyright",cmd:"JustifyRight"});i.add({title:"contextmenu.full",icon:"justifyfull",cmd:"JustifyFull"});g.onContextMenu.dispatch(g,d,h,f);return d}});tinymce.PluginManager.add("contextmenu",tinymce.plugins.ContextMenu)})();
 
mce/contextmenu/plugin.js ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * plugin.js
3
+ *
4
+ * Copyright, Moxiecode Systems AB
5
+ * Released under LGPL License.
6
+ *
7
+ * License: http://www.tinymce.com/license
8
+ * Contributing: http://www.tinymce.com/contributing
9
+ */
10
+
11
+ /*global tinymce:true */
12
+
13
+ tinymce.PluginManager.add('contextmenu', function(editor) {
14
+ var menu, contextmenuNeverUseNative = editor.settings.contextmenu_never_use_native;
15
+
16
+ editor.on('contextmenu', function(e) {
17
+ var contextmenu;
18
+
19
+ // Block TinyMCE menu on ctrlKey
20
+ if (e.ctrlKey && !contextmenuNeverUseNative) {
21
+ return;
22
+ }
23
+
24
+ e.preventDefault();
25
+
26
+ contextmenu = editor.settings.contextmenu || 'link image inserttable | cell row column deletetable';
27
+
28
+ // Render menu
29
+ if (!menu) {
30
+ var items = [];
31
+
32
+ tinymce.each(contextmenu.split(/[ ,]/), function(name) {
33
+ var item = editor.menuItems[name];
34
+
35
+ if (name == '|') {
36
+ item = {text: name};
37
+ }
38
+
39
+ if (item) {
40
+ item.shortcut = ''; // Hide shortcuts
41
+ items.push(item);
42
+ }
43
+ });
44
+
45
+ for (var i = 0; i < items.length; i++) {
46
+ if (items[i].text == '|') {
47
+ if (i === 0 || i == items.length - 1) {
48
+ items.splice(i, 1);
49
+ }
50
+ }
51
+ }
52
+
53
+ menu = new tinymce.ui.Menu({
54
+ items: items,
55
+ context: 'contextmenu'
56
+ }).addClass('contextmenu').renderTo();
57
+
58
+ editor.on('remove', function() {
59
+ menu.remove();
60
+ menu = null;
61
+ });
62
+ } else {
63
+ menu.show();
64
+ }
65
+
66
+ // Position menu
67
+ var pos = {x: e.pageX, y: e.pageY};
68
+
69
+ if (!editor.inline) {
70
+ pos = tinymce.DOM.getPos(editor.getContentAreaContainer());
71
+ pos.x += e.clientX;
72
+ pos.y += e.clientY;
73
+ }
74
+
75
+ menu.moveTo(pos.x, pos.y);
76
+ });
77
+ });
mce/contextmenu/plugin.min.js ADDED
@@ -0,0 +1 @@
 
1
+ tinymce.PluginManager.add("contextmenu",function(e){var n,t=e.settings.contextmenu_never_use_native;e.on("contextmenu",function(i){var o;if(!i.ctrlKey||t){if(i.preventDefault(),o=e.settings.contextmenu||"link image inserttable | cell row column deletetable",n)n.show();else{var c=[];tinymce.each(o.split(/[ ,]/),function(n){var t=e.menuItems[n];"|"==n&&(t={text:n}),t&&(t.shortcut="",c.push(t))});for(var a=0;a<c.length;a++)"|"==c[a].text&&(0===a||a==c.length-1)&&c.splice(a,1);n=new tinymce.ui.Menu({items:c,context:"contextmenu"}).addClass("contextmenu").renderTo(),e.on("remove",function(){n.remove(),n=null})}var l={x:i.pageX,y:i.pageY};e.inline||(l=tinymce.DOM.getPos(e.getContentAreaContainer()),l.x+=i.clientX,l.y+=i.clientY),n.moveTo(l.x,l.y)}})});
mce/emoticons/img/icon_arrow.gif ADDED
Binary file
mce/emoticons/img/icon_biggrin.gif ADDED
Binary file
mce/emoticons/img/icon_confused.gif ADDED
Binary file
mce/emoticons/img/icon_cool.gif ADDED
Binary file
mce/emoticons/img/icon_cry.gif ADDED
Binary file
mce/emoticons/img/icon_eek.gif ADDED
Binary file
mce/emoticons/img/icon_evil.gif ADDED
Binary file
mce/emoticons/img/icon_idea.gif ADDED
Binary file
mce/emoticons/img/icon_lol.gif ADDED
Binary file
mce/emoticons/img/icon_mad.gif ADDED
Binary file
mce/emoticons/img/icon_mrgreen.gif ADDED
Binary file
mce/emoticons/img/icon_neutral.gif ADDED
Binary file
mce/emoticons/img/icon_razz.gif ADDED
Binary file
mce/emoticons/img/icon_redface.gif ADDED
Binary file
mce/emoticons/img/icon_rolleyes.gif ADDED
Binary file
mce/emoticons/img/icon_sad.gif ADDED
Binary file
mce/emoticons/img/icon_smile.gif ADDED
Binary file
mce/emoticons/img/icon_surprised.gif ADDED
Binary file
mce/emoticons/img/icon_twisted.gif ADDED
Binary file
mce/emoticons/img/icon_wink.gif ADDED
Binary file
mce/emoticons/plugin.js ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * plugin.js (edited for WP)
3
+ *
4
+ * Copyright, Moxiecode Systems AB
5
+ * Released under LGPL License.
6
+ *
7
+ * License: http://www.tinymce.com/license
8
+ * Contributing: http://www.tinymce.com/contributing
9
+ */
10
+
11
+ /*global tinymce:true */
12
+
13
+ tinymce.PluginManager.add('emoticons', function(editor, url) {
14
+ var emoticons = [{
15
+ smile: ':-)',
16
+ razz: ':-P',
17
+ cool: '8-)',
18
+ wink: ';-)',
19
+ biggrin: ':-D'
20
+ },
21
+ {
22
+ twisted: ':twisted:',
23
+ mrgreen: ':mrgreen:',
24
+ lol: ':lol:',
25
+ rolleyes: ':roll:',
26
+ confused: ':-?'
27
+ },
28
+ {
29
+ cry: ':cry:',
30
+ surprised: ':-o',
31
+ evil: ':evil:',
32
+ neutral: ':-|',
33
+ redface: ':oops:'
34
+ },
35
+ {
36
+ mad: ':-x',
37
+ eek: '8-O',
38
+ sad: ':-(',
39
+ arrow: ':arrow:',
40
+ idea: ':idea:'
41
+ }];
42
+
43
+ function getHtml() {
44
+ var emoticonsHtml;
45
+
46
+ emoticonsHtml = '<table role="list" class="mce-grid">';
47
+
48
+ tinymce.each(emoticons, function( row ) {
49
+ emoticonsHtml += '<tr>';
50
+
51
+ tinymce.each( row, function( icon, name ) {
52
+ var emoticonUrl = url + '/img/icon_' + name + '.gif';
53
+
54
+ emoticonsHtml += '<td><a href="#" data-mce-alt="' + icon + '" tabindex="-1" ' +
55
+ 'role="option" aria-label="' + icon + '"><img src="' +
56
+ emoticonUrl + '" style="width: 15px; height: 15px; padding: 3px;" role="presentation" alt="' + icon + '" /></a></td>';
57
+ });
58
+
59
+ emoticonsHtml += '</tr>';
60
+ });
61
+
62
+ emoticonsHtml += '</table>';
63
+
64
+ return emoticonsHtml;
65
+ }
66
+
67
+ editor.addButton('emoticons', {
68
+ type: 'panelbutton',
69
+ panel: {
70
+ role: 'application',
71
+ autohide: true,
72
+ html: getHtml,
73
+ onclick: function(e) {
74
+ var linkElm = editor.dom.getParent( e.target, 'a' );
75
+
76
+ if ( linkElm ) {
77
+ editor.insertContent(
78
+ ' ' + linkElm.getAttribute('data-mce-alt') + ' '
79
+ );
80
+
81
+ this.hide();
82
+ }
83
+ }
84
+ },
85
+ tooltip: 'Emoticons'
86
+ });
87
+ });
mce/emoticons/plugin.min.js ADDED
@@ -0,0 +1 @@
 
1
+ tinymce.PluginManager.add("emoticons",function(a,b){function c(){var a;return a='<table role="list" class="mce-grid">',tinymce.each(d,function(c){a+="<tr>",tinymce.each(c,function(c,d){var e=b+"/img/icon_"+d+".gif";a+='<td><a href="#" data-mce-alt="'+c+'" tabindex="-1" role="option" aria-label="'+c+'"><img src="'+e+'" style="width: 15px; height: 15px; padding: 3px;" role="presentation" alt="'+c+'" /></a></td>'}),a+="</tr>"}),a+="</table>"}var d=[{smile:":-)",razz:":-P",cool:"8-)",wink:";-)",biggrin:":-D"},{twisted:":twisted:",mrgreen:":mrgreen:",lol:":lol:",rolleyes:":roll:",confused:":-?"},{cry:":cry:",surprised:":-o",evil:":evil:",neutral:":-|",redface:":oops:"},{mad:":-x",eek:"8-O",sad:":-(",arrow:":arrow:",idea:":idea:"}];a.addButton("emoticons",{type:"panelbutton",panel:{role:"application",autohide:!0,html:c,onclick:function(b){var c=a.dom.getParent(b.target,"a");c&&(a.insertContent(" "+c.getAttribute("data-mce-alt")+" "),this.hide())}},tooltip:"Emoticons"})});
mce/emotions/editor_plugin.js DELETED
@@ -1,40 +0,0 @@
1
- /**
2
- * $Id: editor_plugin_src.js 520 2008-01-07 16:30:32Z spocke $
3
- *
4
- * @author Moxiecode
5
- * @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
6
- */
7
-
8
- (function() {
9
- tinymce.create('tinymce.plugins.EmotionsPlugin', {
10
- init : function(ed, url) {
11
- // Register commands
12
- ed.addCommand('mceEmotion', function() {
13
- ed.windowManager.open({
14
- file : url + '/emotions.htm',
15
- width : 250 + parseInt(ed.getLang('emotions.delta_width', 0)),
16
- height : 160 + parseInt(ed.getLang('emotions.delta_height', 0)),
17
- inline : 1
18
- }, {
19
- plugin_url : url
20
- });
21
- });
22
-
23
- // Register buttons
24
- ed.addButton('emotions', {title : 'emotions.emotions_desc', cmd : 'mceEmotion'});
25
- },
26
-
27
- getInfo : function() {
28
- return {
29
- longname : 'Emotions',
30
- author : 'Moxiecode Systems AB',
31
- authorurl : 'http://tinymce.moxiecode.com',
32
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions',
33
- version : tinymce.majorVersion + "." + tinymce.minorVersion
34
- };
35
- }
36
- });
37
-
38
- // Register plugin
39
- tinymce.PluginManager.add('emotions', tinymce.plugins.EmotionsPlugin);
40
- })();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/emotions/emotions.htm DELETED
@@ -1,94 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <title>{#emotions.emotions_desc}</title>
5
- <script type="text/javascript" type="text/javascript" src="../../tiny_mce_popup.js?v=3211"></script>
6
- <script type="text/javascript" type="text/javascript">
7
- var EmotionsDialog = {
8
- init : function(ed) {
9
- tinyMCEPopup.resizeToInnerSize();
10
- },
11
-
12
- insert : function insertEmotion(code) {
13
- tinyMCEPopup.execCommand('mceInsertContent', false, code);
14
- tinyMCEPopup.close();
15
- }
16
- };
17
- tinyMCEPopup.onInit.add(EmotionsDialog.init, EmotionsDialog);
18
-
19
- document.write('<base href="'+tinymce.baseURL+'" />');
20
- </script>
21
- <style type="text/css">
22
- table#emotions {border:0;}
23
- #emotions img {border:0;margin:4px;}
24
- </style>
25
- <base target="_self" />
26
- </head>
27
- <body style="display: none">
28
- <div align="center">
29
- <div class="title">{#emotions.emotions_desc}:<br /><br /></div>
30
-
31
- <table id="emotions">
32
- <tr>
33
- <td><a href="javascript:EmotionsDialog.insert(' 8-) ');">
34
- <img src="../images/smilies/icon_cool.gif" width="15" height="15" alt="8-)" title="8-)" /></a></td>
35
-
36
- <td><a href="javascript:EmotionsDialog.insert(' :cry: ');">
37
- <img src="../images/smilies/icon_cry.gif" width="15" height="15" alt=":cry:" title=":cry:" /></a></td>
38
-
39
- <td><a href="javascript:EmotionsDialog.insert(' :oops: ');">
40
- <img src="../images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title=":oops:" /></a></td>
41
-
42
- <td><a href="javascript:EmotionsDialog.insert(' :mrgreen: ');">
43
- <img src="../images/smilies/icon_mrgreen.gif" width="15" height="15" alt=":mrgreen:" title=":mrgreen:" /></a></td>
44
-
45
- <td><a href="javascript:EmotionsDialog.insert(' :-( ');">
46
- <img src="../images/smilies/icon_sad.gif" width="15" height="15" alt=":-(" title=":-(" /></a></td>
47
-
48
- <td><a href="javascript:EmotionsDialog.insert(' :twisted: ');">
49
- <img src="../images/smilies/icon_twisted.gif" width="15" height="15" alt=":twisted:" title=":twisted:" /></a></td>
50
- </tr>
51
-
52
- <tr>
53
- <td><a href="javascript:EmotionsDialog.insert(' :evil: ');">
54
- <img src="../images/smilies/icon_evil.gif" width="15" height="15" alt=":evil:" title=":evil:" /></a></td>
55
-
56
- <td><a href="javascript:EmotionsDialog.insert(' :lol: ');">
57
- <img src="../images/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title=":lol:" /></a></td>
58
-
59
- <td><a href="javascript:EmotionsDialog.insert(' :roll: ');">
60
- <img src="../images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title=":roll:" /></a></td>
61
-
62
- <td><a href="javascript:EmotionsDialog.insert(' :-? ');">
63
- <img src="../images/smilies/icon_confused.gif" width="15" height="15" alt=":-?" title=":-?" /></a></td>
64
-
65
- <td><a href="javascript:EmotionsDialog.insert(' :-) ');">
66
- <img src="../images/smilies/icon_smile.gif" width="15" height="15" alt=":-)" title=":-)" /></a></td>
67
-
68
- <td><a href="javascript:EmotionsDialog.insert(' :-o ');">
69
- <img src="../images/smilies/icon_surprised.gif" width="15" height="15" alt=":-o" title=":-o" /></a></td>
70
- </tr>
71
-
72
- <tr>
73
- <td><a href="javascript:EmotionsDialog.insert(' :-P ');">
74
- <img src="../images/smilies/icon_razz.gif" width="15" height="15" alt=":-P" title=":-P" /></a></td>
75
-
76
- <td><a href="javascript:EmotionsDialog.insert(' :-| ');">
77
- <img src="../images/smilies/icon_neutral.gif" width="15" height="15" alt=":-|" title=":-|" /></a></td>
78
-
79
- <td><a href="javascript:EmotionsDialog.insert(' ;-) ');">
80
- <img src="../images/smilies/icon_wink.gif" width="15" height="15" alt=";-)" title=";-)" /></a></td>
81
-
82
- <td><a href="javascript:EmotionsDialog.insert(' :-x ');">
83
- <img src="../images/smilies/icon_mad.gif" width="15" height="15" alt=":-x" title=":-x" /></a></td>
84
-
85
- <td><a href="javascript:EmotionsDialog.insert(' 8-O ');">
86
- <img src="../images/smilies/icon_eek.gif" width="15" height="15" alt="8-O" title="8-O" /></a></td>
87
-
88
- <td><a href="javascript:EmotionsDialog.insert(' :-D ');">
89
- <img src="../images/smilies/icon_biggrin.gif" width="15" height="15" alt=":-D" title=":-D" /></a></td>
90
- </tr>
91
- </table>
92
- </div>
93
- </body>
94
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/iespell/editor_plugin.js DELETED
@@ -1 +0,0 @@
1
- (function(){tinymce.create("tinymce.plugins.IESpell",{init:function(a,b){var c=this,d;if(!tinymce.isIE){return}c.editor=a;a.addCommand("mceIESpell",function(){try{d=new ActiveXObject("ieSpell.ieSpellExtension");d.CheckDocumentNode(a.getDoc().documentElement)}catch(f){if(f.number==-2146827859){a.windowManager.confirm(a.getLang("iespell.download"),function(e){if(e){window.open("http://www.iespell.com/download.php","ieSpellDownload","")}})}else{a.windowManager.alert("Error Loading ieSpell: Exception "+f.number)}}});a.addButton("iespell",{title:"iespell.iespell_desc",cmd:"mceIESpell"})},getInfo:function(){return{longname:"IESpell (IE Only)",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("iespell",tinymce.plugins.IESpell)})();
 
mce/importcss/plugin.js ADDED
@@ -0,0 +1,193 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * plugin.js
3
+ *
4
+ * Copyright, Moxiecode Systems AB
5
+ * Released under LGPL License.
6
+ *
7
+ * License: http://www.tinymce.com/license
8
+ * Contributing: http://www.tinymce.com/contributing
9
+ */
10
+
11
+ /*global tinymce:true */
12
+
13
+ tinymce.PluginManager.add('importcss', function(editor) {
14
+ var self = this, each = tinymce.each;
15
+
16
+ function compileFilter(filter) {
17
+ if (typeof(filter) == "string") {
18
+ return function(value) {
19
+ return value.indexOf(filter) !== -1;
20
+ };
21
+ } else if (filter instanceof RegExp) {
22
+ return function(value) {
23
+ return filter.test(value);
24
+ };
25
+ }
26
+
27
+ return filter;
28
+ }
29
+
30
+ function getSelectors(doc, fileFilter) {
31
+ var selectors = [], contentCSSUrls = {};
32
+
33
+ function append(styleSheet, imported) {
34
+ var href = styleSheet.href, rules;
35
+
36
+ if (!imported && !contentCSSUrls[href]) {
37
+ return;
38
+ }
39
+
40
+ if (fileFilter && !fileFilter(href)) {
41
+ return;
42
+ }
43
+
44
+ each(styleSheet.imports, function(styleSheet) {
45
+ append(styleSheet, true);
46
+ });
47
+
48
+ try {
49
+ rules = styleSheet.cssRules || styleSheet.rules;
50
+ } catch (e) {
51
+ // Firefox fails on rules to remote domain for example:
52
+ // @import url(//fonts.googleapis.com/css?family=Pathway+Gothic+One);
53
+ }
54
+
55
+ each(rules, function(cssRule) {
56
+ if (cssRule.styleSheet) {
57
+ append(cssRule.styleSheet, true);
58
+ } else if (cssRule.selectorText) {
59
+ each(cssRule.selectorText.split(','), function(selector) {
60
+ selectors.push(tinymce.trim(selector));
61
+ });
62
+ }
63
+ });
64
+ }
65
+
66
+ each(editor.contentCSS, function(url) {
67
+ contentCSSUrls[url] = true;
68
+ });
69
+
70
+ try {
71
+ each(doc.styleSheets, function(styleSheet) {
72
+ append(styleSheet);
73
+ });
74
+ } catch (e) {}
75
+
76
+ return selectors;
77
+ }
78
+
79
+ function convertSelectorToFormat(selectorText) {
80
+ var format;
81
+
82
+ // Parse simple element.class1, .class1
83
+ var selector = /^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(selectorText);
84
+ if (!selector) {
85
+ return;
86
+ }
87
+
88
+ var elementName = selector[1];
89
+ var classes = selector[2].substr(1).split('.').join(' ');
90
+ var inlineSelectorElements = tinymce.makeMap('a,img');
91
+
92
+ // element.class - Produce block formats
93
+ if (selector[1]) {
94
+ format = {
95
+ title: selectorText
96
+ };
97
+
98
+ if (editor.schema.getTextBlockElements()[elementName]) {
99
+ // Text block format ex: h1.class1
100
+ format.block = elementName;
101
+ } else if (editor.schema.getBlockElements()[elementName] || inlineSelectorElements[elementName.toLowerCase()]) {
102
+ // Block elements such as table.class and special inline elements such as a.class or img.class
103
+ format.selector = elementName;
104
+ } else {
105
+ // Inline format strong.class1
106
+ format.inline = elementName;
107
+ }
108
+ } else if (selector[2]) {
109
+ // .class - Produce inline span with classes
110
+ format = {
111
+ inline: 'span',
112
+ title: selectorText.substr(1),
113
+ classes: classes
114
+ };
115
+ }
116
+
117
+ // Append to or override class attribute
118
+ if (editor.settings.importcss_merge_classes !== false) {
119
+ format.classes = classes;
120
+ } else {
121
+ format.attributes = {"class": classes};
122
+ }
123
+
124
+ return format;
125
+ }
126
+
127
+ editor.on('renderFormatsMenu', function(e) {
128
+ var settings = editor.settings, selectors = {};
129
+ var selectorConverter = settings.importcss_selector_converter || convertSelectorToFormat;
130
+ var selectorFilter = compileFilter(settings.importcss_selector_filter);
131
+
132
+ if (!editor.settings.importcss_append) {
133
+ e.control.items().remove();
134
+ }
135
+
136
+ // Setup new groups collection by cloning the configured one
137
+ var groups = [];
138
+ tinymce.each(settings.importcss_groups, function(group) {
139
+ group = tinymce.extend({}, group);
140
+ group.filter = compileFilter(group.filter);
141
+ groups.push(group);
142
+ });
143
+
144
+ each(getSelectors(editor.getDoc(), compileFilter(settings.importcss_file_filter)), function(selector) {
145
+ if (selector.indexOf('.mce-') === -1) {
146
+ if (!selectors[selector] && (!selectorFilter || selectorFilter(selector))) {
147
+ var format = selectorConverter.call(self, selector), menu;
148
+
149
+ if (format) {
150
+ var formatName = format.name || tinymce.DOM.uniqueId();
151
+
152
+ if (groups) {
153
+ for (var i = 0; i < groups.length; i++) {
154
+ if (!groups[i].filter || groups[i].filter(selector)) {
155
+ if (!groups[i].item) {
156
+ groups[i].item = {text: groups[i].title, menu: []};
157
+ }
158
+
159
+ menu = groups[i].item.menu;
160
+ break;
161
+ }
162
+ }
163
+ }
164
+
165
+ editor.formatter.register(formatName, format);
166
+
167
+ var menuItem = tinymce.extend({}, e.control.settings.itemDefaults, {
168
+ text: format.title,
169
+ format: formatName
170
+ });
171
+
172
+ if (menu) {
173
+ menu.push(menuItem);
174
+ } else {
175
+ e.control.add(menuItem);
176
+ }
177
+ }
178
+
179
+ selectors[selector] = true;
180
+ }
181
+ }
182
+ });
183
+
184
+ each(groups, function(group) {
185
+ e.control.add(group.item);
186
+ });
187
+
188
+ e.control.renderNew();
189
+ });
190
+
191
+ // Expose default convertSelectorToFormat implementation
192
+ self.convertSelectorToFormat = convertSelectorToFormat;
193
+ });
mce/importcss/plugin.min.js ADDED
@@ -0,0 +1 @@
 
1
+ tinymce.PluginManager.add("importcss",function(t){function e(t){return"string"==typeof t?function(e){return-1!==e.indexOf(t)}:t instanceof RegExp?function(e){return t.test(e)}:t}function n(e,n){function i(t,e){var o,l=t.href;if((e||c[l])&&(!n||n(l))){s(t.imports,function(t){i(t,!0)});try{o=t.cssRules||t.rules}catch(a){}s(o,function(t){t.styleSheet?i(t.styleSheet,!0):t.selectorText&&s(t.selectorText.split(","),function(t){r.push(tinymce.trim(t))})})}}var r=[],c={};s(t.contentCSS,function(t){c[t]=!0});try{s(e.styleSheets,function(t){i(t)})}catch(o){}return r}function i(e){var n,i=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(e);if(i){var r=i[1],s=i[2].substr(1).split(".").join(" "),c=tinymce.makeMap("a,img");return i[1]?(n={title:e},t.schema.getTextBlockElements()[r]?n.block=r:t.schema.getBlockElements()[r]||c[r.toLowerCase()]?n.selector=r:n.inline=r):i[2]&&(n={inline:"span",title:e.substr(1),classes:s}),t.settings.importcss_merge_classes!==!1?n.classes=s:n.attributes={"class":s},n}}var r=this,s=tinymce.each;t.on("renderFormatsMenu",function(c){var o=t.settings,l={},a=o.importcss_selector_converter||i,m=e(o.importcss_selector_filter);t.settings.importcss_append||c.control.items().remove();var f=[];tinymce.each(o.importcss_groups,function(t){t=tinymce.extend({},t),t.filter=e(t.filter),f.push(t)}),s(n(t.getDoc(),e(o.importcss_file_filter)),function(e){if(-1===e.indexOf(".mce-")&&!l[e]&&(!m||m(e))){var n,i=a.call(r,e);if(i){var s=i.name||tinymce.DOM.uniqueId();if(f)for(var o=0;o<f.length;o++)if(!f[o].filter||f[o].filter(e)){f[o].item||(f[o].item={text:f[o].title,menu:[]}),n=f[o].item.menu;break}t.formatter.register(s,i);var u=tinymce.extend({},c.control.settings.itemDefaults,{text:i.title,format:s});n?n.push(u):c.control.add(u)}l[e]=!0}}),s(f,function(t){c.control.add(t.item)}),c.control.renderNew()}),r.convertSelectorToFormat=i});
mce/insertdatetime/editor_plugin.js DELETED
@@ -1 +0,0 @@
1
- (function(){tinymce.create("tinymce.plugins.InsertDateTime",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceInsertDate",function(){var d=c._getDateTime(new Date(),a.getParam("plugin_insertdate_dateFormat",a.getLang("insertdatetime.date_fmt")));a.execCommand("mceInsertContent",false,d)});a.addCommand("mceInsertTime",function(){var d=c._getDateTime(new Date(),a.getParam("plugin_insertdate_timeFormat",a.getLang("insertdatetime.time_fmt")));a.execCommand("mceInsertContent",false,d)});a.addButton("insertdate",{title:"insertdatetime.insertdate_desc",cmd:"mceInsertDate"});a.addButton("inserttime",{title:"insertdatetime.inserttime_desc",cmd:"mceInsertTime"})},getInfo:function(){return{longname:"Insert date/time",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/insertdatetime",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_getDateTime:function(e,a){var c=this.editor;function b(g,d){g=""+g;if(g.length<d){for(var f=0;f<(d-g.length);f++){g="0"+g}}return g}a=a.replace("%D","%m/%d/%y");a=a.replace("%r","%I:%M:%S %p");a=a.replace("%Y",""+e.getFullYear());a=a.replace("%y",""+e.getYear());a=a.replace("%m",b(e.getMonth()+1,2));a=a.replace("%d",b(e.getDate(),2));a=a.replace("%H",""+b(e.getHours(),2));a=a.replace("%M",""+b(e.getMinutes(),2));a=a.replace("%S",""+b(e.getSeconds(),2));a=a.replace("%I",""+((e.getHours()+11)%12+1));a=a.replace("%p",""+(e.getHours()<12?"AM":"PM"));a=a.replace("%B",""+c.getLang("insertdatetime.months_long").split(",")[e.getMonth()]);a=a.replace("%b",""+c.getLang("insertdatetime.months_short").split(",")[e.getMonth()]);a=a.replace("%A",""+c.getLang("insertdatetime.day_long").split(",")[e.getDay()]);a=a.replace("%a",""+c.getLang("insertdatetime.day_short").split(",")[e.getDay()]);a=a.replace("%%","%");return a}});tinymce.PluginManager.add("insertdatetime",tinymce.plugins.InsertDateTime)})();
 
mce/insertdatetime/plugin.js ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * plugin.js
3
+ *
4
+ * Copyright, Moxiecode Systems AB
5
+ * Released under LGPL License.
6
+ *
7
+ * License: http://www.tinymce.com/license
8
+ * Contributing: http://www.tinymce.com/contributing
9
+ */
10
+
11
+ /*global tinymce:true */
12
+
13
+ tinymce.PluginManager.add('insertdatetime', function(editor) {
14
+ var daysShort = "Sun Mon Tue Wed Thu Fri Sat Sun".split(' ');
15
+ var daysLong = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(' ');
16
+ var monthsShort = "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(' ');
17
+ var monthsLong = "January February March April May June July August September October November December".split(' ');
18
+ var menuItems = [], lastFormat, defaultButtonTimeFormat;
19
+
20
+ function getDateTime(fmt, date) {
21
+ function addZeros(value, len) {
22
+ value = "" + value;
23
+
24
+ if (value.length < len) {
25
+ for (var i = 0; i < (len - value.length); i++) {
26
+ value = "0" + value;
27
+ }
28
+ }
29
+
30
+ return value;
31
+ }
32
+
33
+ date = date || new Date();
34
+
35
+ fmt = fmt.replace("%D", "%m/%d/%Y");
36
+ fmt = fmt.replace("%r", "%I:%M:%S %p");
37
+ fmt = fmt.replace("%Y", "" + date.getFullYear());
38
+ fmt = fmt.replace("%y", "" + date.getYear());
39
+ fmt = fmt.replace("%m", addZeros(date.getMonth() + 1, 2));
40
+ fmt = fmt.replace("%d", addZeros(date.getDate(), 2));
41
+ fmt = fmt.replace("%H", "" + addZeros(date.getHours(), 2));
42
+ fmt = fmt.replace("%M", "" + addZeros(date.getMinutes(), 2));
43
+ fmt = fmt.replace("%S", "" + addZeros(date.getSeconds(), 2));
44
+ fmt = fmt.replace("%I", "" + ((date.getHours() + 11) % 12 + 1));
45
+ fmt = fmt.replace("%p", "" + (date.getHours() < 12 ? "AM" : "PM"));
46
+ fmt = fmt.replace("%B", "" + editor.translate(monthsLong[date.getMonth()]));
47
+ fmt = fmt.replace("%b", "" + editor.translate(monthsShort[date.getMonth()]));
48
+ fmt = fmt.replace("%A", "" + editor.translate(daysLong[date.getDay()]));
49
+ fmt = fmt.replace("%a", "" + editor.translate(daysShort[date.getDay()]));
50
+ fmt = fmt.replace("%%", "%");
51
+
52
+ return fmt;
53
+ }
54
+
55
+ function insertDateTime(format) {
56
+ var html = getDateTime(format);
57
+
58
+ if (editor.settings.insertdatetime_element) {
59
+ var computerTime;
60
+
61
+ if (/%[HMSIp]/.test(format)) {
62
+ computerTime = getDateTime("%Y-%m-%dT%H:%M");
63
+ } else {
64
+ computerTime = getDateTime("%Y-%m-%d");
65
+ }
66
+
67
+ html = '<time datetime="' + computerTime + '">' + html + '</time>';
68
+
69
+ var timeElm = editor.dom.getParent(editor.selection.getStart(), 'time');
70
+ if (timeElm) {
71
+ editor.dom.setOuterHTML(timeElm, html);
72
+ return;
73
+ }
74
+ }
75
+
76
+ editor.insertContent(html);
77
+ }
78
+
79
+ editor.addCommand('mceInsertDate', function() {
80
+ insertDateTime(editor.getParam("insertdatetime_dateformat", editor.translate("%Y-%m-%d")));
81
+ });
82
+
83
+ editor.addCommand('mceInsertTime', function() {
84
+ insertDateTime(editor.getParam("insertdatetime_timeformat", editor.translate('%H:%M:%S')));
85
+ });
86
+
87
+ editor.addButton('insertdatetime', {
88
+ type: 'splitbutton',
89
+ title: 'Insert date/time',
90
+ onclick: function() {
91
+ insertDateTime(lastFormat || defaultButtonTimeFormat);
92
+ },
93
+ menu: menuItems
94
+ });
95
+
96
+ tinymce.each(editor.settings.insertdatetime_formats || [
97
+ "%H:%M:%S",
98
+ "%Y-%m-%d",
99
+ "%I:%M:%S %p",
100
+ "%D"
101
+ ], function(fmt) {
102
+ if (!defaultButtonTimeFormat) {
103
+ defaultButtonTimeFormat = fmt;
104
+ }
105
+
106
+ menuItems.push({
107
+ text: getDateTime(fmt),
108
+ onclick: function() {
109
+ lastFormat = fmt;
110
+ insertDateTime(fmt);
111
+ }
112
+ });
113
+ });
114
+
115
+ editor.addMenuItem('insertdatetime', {
116
+ icon: 'date',
117
+ text: 'Insert date/time',
118
+ menu: menuItems,
119
+ context: 'insert'
120
+ });
121
+ });
mce/insertdatetime/plugin.min.js ADDED
@@ -0,0 +1 @@
 
1
+ tinymce.PluginManager.add("insertdatetime",function(e){function t(t,a){function n(e,t){if(e=""+e,e.length<t)for(var a=0;a<t-e.length;a++)e="0"+e;return e}return a=a||new Date,t=t.replace("%D","%m/%d/%Y"),t=t.replace("%r","%I:%M:%S %p"),t=t.replace("%Y",""+a.getFullYear()),t=t.replace("%y",""+a.getYear()),t=t.replace("%m",n(a.getMonth()+1,2)),t=t.replace("%d",n(a.getDate(),2)),t=t.replace("%H",""+n(a.getHours(),2)),t=t.replace("%M",""+n(a.getMinutes(),2)),t=t.replace("%S",""+n(a.getSeconds(),2)),t=t.replace("%I",""+((a.getHours()+11)%12+1)),t=t.replace("%p",""+(a.getHours()<12?"AM":"PM")),t=t.replace("%B",""+e.translate(m[a.getMonth()])),t=t.replace("%b",""+e.translate(c[a.getMonth()])),t=t.replace("%A",""+e.translate(d[a.getDay()])),t=t.replace("%a",""+e.translate(i[a.getDay()])),t=t.replace("%%","%")}function a(a){var n=t(a);if(e.settings.insertdatetime_element){var r;r=t(/%[HMSIp]/.test(a)?"%Y-%m-%dT%H:%M":"%Y-%m-%d"),n='<time datetime="'+r+'">'+n+"</time>";var i=e.dom.getParent(e.selection.getStart(),"time");if(i)return void e.dom.setOuterHTML(i,n)}e.insertContent(n)}var n,r,i="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),d="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),c="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),m="January February March April May June July August September October November December".split(" "),u=[];e.addCommand("mceInsertDate",function(){a(e.getParam("insertdatetime_dateformat",e.translate("%Y-%m-%d")))}),e.addCommand("mceInsertTime",function(){a(e.getParam("insertdatetime_timeformat",e.translate("%H:%M:%S")))}),e.addButton("insertdatetime",{type:"splitbutton",title:"Insert date/time",onclick:function(){a(n||r)},menu:u}),tinymce.each(e.settings.insertdatetime_formats||["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"],function(e){r||(r=e),u.push({text:t(e),onclick:function(){n=e,a(e)}})}),e.addMenuItem("insertdatetime",{icon:"date",text:"Insert date/time",menu:u,context:"insert"})});
mce/layer/editor_plugin.js DELETED
@@ -1 +0,0 @@
1
- (function(){function a(b){do{if(b.className&&b.className.indexOf("mceItemLayer")!=-1){return b}}while(b=b.parentNode)}tinymce.create("tinymce.plugins.Layer",{init:function(b,c){var d=this;d.editor=b;b.addCommand("mceInsertLayer",d._insertLayer,d);b.addCommand("mceMoveForward",function(){d._move(1)});b.addCommand("mceMoveBackward",function(){d._move(-1)});b.addCommand("mceMakeAbsolute",function(){d._toggleAbsolute()});b.addButton("moveforward",{title:"layer.forward_desc",cmd:"mceMoveForward"});b.addButton("movebackward",{title:"layer.backward_desc",cmd:"mceMoveBackward"});b.addButton("absolute",{title:"layer.absolute_desc",cmd:"mceMakeAbsolute"});b.addButton("insertlayer",{title:"layer.insertlayer_desc",cmd:"mceInsertLayer"});b.onInit.add(function(){var e=b.dom;if(tinymce.isIE){b.getDoc().execCommand("2D-Position",false,true)}});b.onMouseUp.add(function(f,h){var g=a(h.target);if(g){f.dom.setAttrib(g,"data-mce-style","")}});b.onMouseDown.add(function(f,j){var h=j.target,i=f.getDoc(),g;if(tinymce.isGecko){if(a(h)){if(i.designMode!=="on"){i.designMode="on";h=i.body;g=h.parentNode;g.removeChild(h);g.appendChild(h)}}else{if(i.designMode=="on"){i.designMode="off"}}}});b.onNodeChange.add(d._nodeChange,d);b.onVisualAid.add(d._visualAid,d)},getInfo:function(){return{longname:"Layer",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/layer",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(c,b,f){var d,e;d=this._getParentLayer(f);e=c.dom.getParent(f,"DIV,P,IMG");if(!e){b.setDisabled("absolute",1);b.setDisabled("moveforward",1);b.setDisabled("movebackward",1)}else{b.setDisabled("absolute",0);b.setDisabled("moveforward",!d);b.setDisabled("movebackward",!d);b.setActive("absolute",d&&d.style.position.toLowerCase()=="absolute")}},_visualAid:function(b,d,c){var f=b.dom;tinymce.each(f.select("div,p",d),function(g){if(/^(absolute|relative|fixed)$/i.test(g.style.position)){if(c){f.addClass(g,"mceItemVisualAid")}else{f.removeClass(g,"mceItemVisualAid")}f.addClass(g,"mceItemLayer")}})},_move:function(j){var c=this.editor,g,h=[],f=this._getParentLayer(c.selection.getNode()),e=-1,k=-1,b;b=[];tinymce.walk(c.getBody(),function(d){if(d.nodeType==1&&/^(absolute|relative|static)$/i.test(d.style.position)){b.push(d)}},"childNodes");for(g=0;g<b.length;g++){h[g]=b[g].style.zIndex?parseInt(b[g].style.zIndex):0;if(e<0&&b[g]==f){e=g}}if(j<0){for(g=0;g<h.length;g++){if(h[g]<h[e]){k=g;break}}if(k>-1){b[e].style.zIndex=h[k];b[k].style.zIndex=h[e]}else{if(h[e]>0){b[e].style.zIndex=h[e]-1}}}else{for(g=0;g<h.length;g++){if(h[g]>h[e]){k=g;break}}if(k>-1){b[e].style.zIndex=h[k];b[k].style.zIndex=h[e]}else{b[e].style.zIndex=h[e]+1}}c.execCommand("mceRepaint")},_getParentLayer:function(b){return this.editor.dom.getParent(b,function(c){return c.nodeType==1&&/^(absolute|relative|static)$/i.test(c.style.position)})},_insertLayer:function(){var c=this.editor,e=c.dom,d=e.getPos(e.getParent(c.selection.getNode(),"*")),b=c.getBody();c.dom.add(b,"div",{style:{position:"absolute",left:d.x,top:(d.y>20?d.y:20),width:100,height:100},"class":"mceItemVisualAid mceItemLayer"},c.selection.getContent()||c.getLang("layer.content"));if(tinymce.isIE){e.setHTML(b,b.innerHTML)}},_toggleAbsolute:function(){var b=this.editor,c=this._getParentLayer(b.selection.getNode());if(!c){c=b.dom.getParent(b.selection.getNode(),"DIV,P,IMG")}if(c){if(c.style.position.toLowerCase()=="absolute"){b.dom.setStyles(c,{position:"",left:"",top:"",width:"",height:""});b.dom.removeClass(c,"mceItemVisualAid");b.dom.removeClass(c,"mceItemLayer")}else{if(c.style.left==""){c.style.left=20+"px"}if(c.style.top==""){c.style.top=20+"px"}if(c.style.width==""){c.style.width=c.width?(c.width+"px"):"100px"}if(c.style.height==""){c.style.height=c.height?(c.height+"px"):"100px"}c.style.position="absolute";b.dom.setAttrib(c,"data-mce-style","");b.addVisual(b.getBody())}b.execCommand("mceRepaint");b.nodeChanged()}}});tinymce.PluginManager.add("layer",tinymce.plugins.Layer)})();
 
mce/nonbreaking/editor_plugin.js DELETED
@@ -1 +0,0 @@
1
- (function(){tinymce.create("tinymce.plugins.Nonbreaking",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceNonBreaking",function(){a.execCommand("mceInsertContent",false,(a.plugins.visualchars&&a.plugins.visualchars.state)?'<span data-mce-bogus="1" class="mceItemHidden mceItemNbsp">&nbsp;</span>':"&nbsp;")});a.addButton("nonbreaking",{title:"nonbreaking.nonbreaking_desc",cmd:"mceNonBreaking"});if(a.getParam("nonbreaking_force_tab")){a.onKeyDown.add(function(d,f){if(f.keyCode==9){f.preventDefault();d.execCommand("mceNonBreaking");d.execCommand("mceNonBreaking");d.execCommand("mceNonBreaking")}})}},getInfo:function(){return{longname:"Nonbreaking space",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("nonbreaking",tinymce.plugins.Nonbreaking)})();
 
mce/nonbreaking/plugin.js ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * plugin.js
3
+ *
4
+ * Copyright, Moxiecode Systems AB
5
+ * Released under LGPL License.
6
+ *
7
+ * License: http://www.tinymce.com/license
8
+ * Contributing: http://www.tinymce.com/contributing
9
+ */
10
+
11
+ /*global tinymce:true */
12
+
13
+ tinymce.PluginManager.add('nonbreaking', function(editor) {
14
+ var setting = editor.getParam('nonbreaking_force_tab');
15
+
16
+ editor.addCommand('mceNonBreaking', function() {
17
+ editor.insertContent(
18
+ (editor.plugins.visualchars && editor.plugins.visualchars.state) ?
19
+ '<span class="mce-nbsp">&nbsp;</span>' : '&nbsp;'
20
+ );
21
+
22
+ editor.dom.setAttrib(editor.dom.select('span.mce-nbsp'), 'data-mce-bogus', '1');
23
+ });
24
+
25
+ editor.addButton('nonbreaking', {
26
+ title: 'Insert nonbreaking space',
27
+ cmd: 'mceNonBreaking'
28
+ });
29
+
30
+ editor.addMenuItem('nonbreaking', {
31
+ text: 'Nonbreaking space',
32
+ cmd: 'mceNonBreaking',
33
+ context: 'insert'
34
+ });
35
+
36
+ if (setting) {
37
+ var spaces = +setting > 1 ? +setting : 3; // defaults to 3 spaces if setting is true (or 1)
38
+
39
+ editor.on('keydown', function(e) {
40
+ if (e.keyCode == 9) {
41
+
42
+ if (e.shiftKey) {
43
+ return;
44
+ }
45
+
46
+ e.preventDefault();
47
+ for (var i = 0; i < spaces; i++) {
48
+ editor.execCommand('mceNonBreaking');
49
+ }
50
+ }
51
+ });
52
+ }
53
+ });
mce/nonbreaking/plugin.min.js ADDED
@@ -0,0 +1 @@
 
1
+ tinymce.PluginManager.add("nonbreaking",function(n){var e=n.getParam("nonbreaking_force_tab");if(n.addCommand("mceNonBreaking",function(){n.insertContent(n.plugins.visualchars&&n.plugins.visualchars.state?'<span class="mce-nbsp">&nbsp;</span>':"&nbsp;"),n.dom.setAttrib(n.dom.select("span.mce-nbsp"),"data-mce-bogus","1")}),n.addButton("nonbreaking",{title:"Insert nonbreaking space",cmd:"mceNonBreaking"}),n.addMenuItem("nonbreaking",{text:"Nonbreaking space",cmd:"mceNonBreaking",context:"insert"}),e){var a=+e>1?+e:3;n.on("keydown",function(e){if(9==e.keyCode){if(e.shiftKey)return;e.preventDefault();for(var t=0;a>t;t++)n.execCommand("mceNonBreaking")}})}});
mce/print/editor_plugin.js DELETED
@@ -1 +0,0 @@
1
- (function(){tinymce.create("tinymce.plugins.Print",{init:function(a,b){a.addCommand("mcePrint",function(){a.getWin().print()});a.addButton("print",{title:"print.print_desc",cmd:"mcePrint"})},getInfo:function(){return{longname:"Print",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/print",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("print",tinymce.plugins.Print)})();
 
mce/print/plugin.js ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * plugin.js
3
+ *
4
+ * Copyright, Moxiecode Systems AB
5
+ * Released under LGPL License.
6
+ *
7
+ * License: http://www.tinymce.com/license
8
+ * Contributing: http://www.tinymce.com/contributing
9
+ */
10
+
11
+ /*global tinymce:true */
12
+
13
+ tinymce.PluginManager.add('print', function(editor) {
14
+ editor.addCommand('mcePrint', function() {
15
+ editor.getWin().print();
16
+ });
17
+
18
+ editor.addButton('print', {
19
+ title: 'Print',
20
+ cmd: 'mcePrint'
21
+ });
22
+
23
+ editor.addShortcut('Ctrl+P', '', 'mcePrint');
24
+
25
+ editor.addMenuItem('print', {
26
+ text: 'Print',
27
+ cmd: 'mcePrint',
28
+ icon: 'print',
29
+ shortcut: 'Ctrl+P',
30
+ context: 'file'
31
+ });
32
+ });
mce/print/plugin.min.js ADDED
@@ -0,0 +1 @@
 
1
+ tinymce.PluginManager.add("print",function(t){t.addCommand("mcePrint",function(){t.getWin().print()}),t.addButton("print",{title:"Print",cmd:"mcePrint"}),t.addShortcut("Ctrl+P","","mcePrint"),t.addMenuItem("print",{text:"Print",cmd:"mcePrint",icon:"print",shortcut:"Ctrl+P",context:"file"})});
mce/searchreplace/css/searchreplace.css DELETED
@@ -1,6 +0,0 @@
1
- .panel_wrapper {height:85px;}
2
- .panel_wrapper div.current {min-height:85px;height:auto;}
3
-
4
- /* IE */
5
- * html .panel_wrapper {height:100px;}
6
- * html .panel_wrapper div.current {height:100px;}
 
 
 
 
 
 
mce/searchreplace/editor_plugin.js DELETED
@@ -1 +0,0 @@
1
- (function(){tinymce.create("tinymce.plugins.SearchReplacePlugin",{init:function(a,c){function b(d){window.focus();a.windowManager.open({file:c+"/searchreplace.htm",width:420+parseInt(a.getLang("searchreplace.delta_width",0)),height:170+parseInt(a.getLang("searchreplace.delta_height",0)),inline:1,auto_focus:0},{mode:d,search_string:a.selection.getContent({format:"text"}),plugin_url:c})}a.addCommand("mceSearch",function(){b("search")});a.addCommand("mceReplace",function(){b("replace")});a.addButton("search",{title:"searchreplace.search_desc",cmd:"mceSearch"});a.addButton("replace",{title:"searchreplace.replace_desc",cmd:"mceReplace"});a.addShortcut("ctrl+f","searchreplace.search_desc","mceSearch")},getInfo:function(){return{longname:"Search/Replace",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("searchreplace",tinymce.plugins.SearchReplacePlugin)})();
 
mce/searchreplace/js/searchreplace.js DELETED
@@ -1,148 +0,0 @@
1
- tinyMCEPopup.requireLangPack();
2
-
3
- var SearchReplaceDialog = {
4
- init : function(ed) {
5
- var t = this, f = document.forms[0], m = tinyMCEPopup.getWindowArg("mode");
6
-
7
- t.switchMode(m);
8
-
9
- f[m + '_panel_searchstring'].value = tinyMCEPopup.getWindowArg("search_string");
10
-
11
- // Focus input field
12
- f[m + '_panel_searchstring'].focus();
13
-
14
- mcTabs.onChange.add(function(tab_id, panel_id) {
15
- t.switchMode(tab_id.substring(0, tab_id.indexOf('_')));
16
- });
17
-
18
- },
19
-
20
- switchMode : function(m) {
21
- var f, lm = this.lastMode;
22
-
23
- if (lm != m) {
24
- f = document.forms[0];
25
-
26
- if (lm) {
27
- f[m + '_panel_searchstring'].value = f[lm + '_panel_searchstring'].value;
28
- f[m + '_panel_backwardsu'].checked = f[lm + '_panel_backwardsu'].checked;
29
- f[m + '_panel_backwardsd'].checked = f[lm + '_panel_backwardsd'].checked;
30
- f[m + '_panel_casesensitivebox'].checked = f[lm + '_panel_casesensitivebox'].checked;
31
- }
32
-
33
- mcTabs.displayTab(m + '_tab', m + '_panel');
34
- document.getElementById("replaceBtn").style.display = (m == "replace") ? "inline" : "none";
35
- document.getElementById("replaceAllBtn").style.display = (m == "replace") ? "inline" : "none";
36
- this.lastMode = m;
37
- }
38
- },
39
-
40
- searchNext : function(a) {
41
- var ed = tinyMCEPopup.editor, se = ed.selection, r = se.getRng(), f, m = this.lastMode, s, b, fl = 0, w = ed.getWin(), wm = ed.windowManager, fo = 0;
42
-
43
- if (tinymce.isIE11 && !window.find) {
44
- ed.windowManager.alert("This feature is not available in IE 11+. Upgrade TinyMCE to 4.x to get this functionallity back.");
45
- return;
46
- }
47
-
48
- // Get input
49
- f = document.forms[0];
50
- s = f[m + '_panel_searchstring'].value;
51
- b = f[m + '_panel_backwardsu'].checked;
52
- ca = f[m + '_panel_casesensitivebox'].checked;
53
- rs = f['replace_panel_replacestring'].value;
54
-
55
- if (tinymce.isIE) {
56
- r = ed.getDoc().selection.createRange();
57
- }
58
-
59
- if (s == '')
60
- return;
61
-
62
- function fix() {
63
- // Correct Firefox graphics glitches
64
- // TODO: Verify if this is actually needed any more, maybe it was for very old FF versions?
65
- r = se.getRng().cloneRange();
66
- ed.getDoc().execCommand('SelectAll', false, null);
67
- se.setRng(r);
68
- };
69
-
70
- function replace() {
71
- ed.selection.setContent(rs); // Needs to be duplicated due to selection bug in IE
72
- };
73
-
74
- // IE flags
75
- if (ca)
76
- fl = fl | 4;
77
-
78
- switch (a) {
79
- case 'all':
80
- // Move caret to beginning of text
81
- ed.execCommand('SelectAll');
82
- ed.selection.collapse(true);
83
-
84
- if (tinymce.isIE) {
85
- ed.focus();
86
- r = ed.getDoc().selection.createRange();
87
-
88
- while (r.findText(s, b ? -1 : 1, fl)) {
89
- r.scrollIntoView();
90
- r.select();
91
- replace();
92
- fo = 1;
93
-
94
- if (b) {
95
- r.moveEnd("character", -(rs.length)); // Otherwise will loop forever
96
- }
97
- }
98
-
99
- tinyMCEPopup.storeSelection();
100
- } else {
101
- while (w.find(s, ca, b, false, false, false, false)) {
102
- replace();
103
- fo = 1;
104
- }
105
- }
106
-
107
- if (fo)
108
- tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.allreplaced'));
109
- else
110
- tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound'));
111
-
112
- return;
113
-
114
- case 'current':
115
- if (!ed.selection.isCollapsed())
116
- replace();
117
-
118
- break;
119
- }
120
-
121
- se.collapse(b);
122
- r = se.getRng();
123
-
124
- // Whats the point
125
- if (!s)
126
- return;
127
-
128
- if (tinymce.isIE) {
129
- ed.focus();
130
- r = ed.getDoc().selection.createRange();
131
-
132
- if (r.findText(s, b ? -1 : 1, fl)) {
133
- r.scrollIntoView();
134
- r.select();
135
- } else
136
- tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound'));
137
-
138
- tinyMCEPopup.storeSelection();
139
- } else {
140
- if (!w.find(s, ca, b, false, false, false, false))
141
- tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound'));
142
- else
143
- fix();
144
- }
145
- }
146
- };
147
-
148
- tinyMCEPopup.onInit.add(SearchReplaceDialog.init, SearchReplaceDialog);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/searchreplace/langs/de_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('de.searchreplace_dlg',{findwhat:"Zu suchender Text",replacewith:"Ersetzen durch",direction:"Suchrichtung",up:"Aufw\u00e4rts",down:"Abw\u00e4rts",mcase:"Gro\u00df-/Kleinschreibung beachten",findnext:"Weitersuchen",allreplaced:"Alle Vorkommen der Zeichenkette wurden ersetzt.","searchnext_desc":"Weitersuchen",notfound:"Die Suche ist am Ende angelangt. Die Zeichenkette konnte nicht gefunden werden.","search_title":"Suchen","replace_title":"Suchen/Ersetzen",replaceall:"Alle ersetzen",replace:"Ersetzen"});
 
mce/searchreplace/langs/en_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('en.searchreplace_dlg',{findwhat:"Find What",replacewith:"Replace with",direction:"Direction",up:"Up",down:"Down",mcase:"Match Case",findnext:"Find Next",allreplaced:"All occurrences of the search string were replaced.","searchnext_desc":"Find Again",notfound:"The search has been completed. The search string could not be found.","search_title":"Find","replace_title":"Find/Replace",replaceall:"Replace All",replace:"Replace"});
 
mce/searchreplace/langs/es_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('es.searchreplace_dlg',{findwhat:"Qu\u00e9 buscar",replacewith:"Reemplazar por",direction:"Direcci\u00f3n",up:"Arriba",down:"Abajo",mcase:"Min\u00fas./May\u00fas.",findnext:"Buscar siguiente",allreplaced:"Se ha reemplazado el texto.","searchnext_desc":"Buscar de nuevo",notfound:"La b\u00fasqueda se ha completado. No se encontr\u00f3 el texto introducido.","search_title":"Buscar","replace_title":"Buscar/Reemplazar",replaceall:"Reemplazar todo",replace:"Reemplazar"});
 
mce/searchreplace/langs/fr_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('fr.searchreplace_dlg',{findwhat:"Rechercher ceci",replacewith:"Remplacer par",direction:"Direction",up:"Vers le haut",down:"Vers le bas",mcase:"Sensible \u00e0 la casse",findnext:"Rechercher le suivant",allreplaced:"Toutes les occurrences de la cha\u00eene recherch\u00e9e ont \u00e9t\u00e9 remplac\u00e9es.","searchnext_desc":"Suivant",notfound:"La recherche est termin\u00e9e. La cha\u00eene recherch\u00e9e n\'a pas \u00e9t\u00e9 trouv\u00e9e.","search_title":"Rechercher","replace_title":"Rechercher / remplacer",replaceall:"Tout remplacer",replace:"Remplacer"});
 
mce/searchreplace/langs/it_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('it.searchreplace_dlg',{findwhat:"Trova:",replacewith:"Sostituisci con:",direction:"Direzione",up:"Avanti",down:"Indietro",mcase:"Maiuscole/minuscole",findnext:"Trova succ.",allreplaced:"Tutte le occorrenze del criterio di ricerca sono state sostituite.","searchnext_desc":"Trova successivo",notfound:"Ricerca completata. Nessun risultato trovato.","search_title":"Trova","replace_title":"Trova/Sostituisci",replaceall:"Sost. tutto",replace:"Sostituisci"});
 
mce/searchreplace/langs/ja_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('ja.searchreplace_dlg',{findwhat:"\u691c\u7d22\u3059\u308b\u6587\u5b57\u5217",replacewith:"\u7f6e\u63db\u5f8c\u306e\u6587\u5b57\u5217",direction:"\u65b9\u5411",up:"\u4e0a\u3078",down:"\u4e0b\u3078",mcase:"\u5927\u6587\u5b57\u30fb\u5c0f\u6587\u5b57\u306e\u533a\u5225",findnext:"\u6b21\u3092\u691c\u7d22",allreplaced:"\u3059\u3079\u3066\u7f6e\u63db\u3057\u307e\u3057\u305f\u3002","searchnext_desc":"\u518d\u691c\u7d22",notfound:"\u691c\u7d22\u3092\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002\u691c\u7d22\u6587\u5b57\u5217\u306f\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002","search_title":"\u691c\u7d22","replace_title":"\u691c\u7d22\u3068\u7f6e\u63db",replaceall:"\u3059\u3079\u3066\u7f6e\u63db",replace:"\u7f6e\u63db"});
 
mce/searchreplace/langs/langs.php DELETED
@@ -1,12 +0,0 @@
1
- <?php
2
- $lang_file = dirname(__FILE__) . '/' . $mce_locale . '_dlg.js';
3
-
4
- if ( ! is_file( $lang_file ) && defined( 'TINYMCE_ADVANCED_LANGUAGES_PATH' ) )
5
- $lang_file = TINYMCE_ADVANCED_LANGUAGES_PATH . 'searchreplace/langs/' . $mce_locale . '_dlg.js';
6
-
7
- if ( is_file( $lang_file ) && is_readable( $lang_file ) ) {
8
- $strings = tdav_get_file( $lang_file );
9
- } else {
10
- $strings = tdav_get_file( dirname(__FILE__) . '/en_dlg.js' );
11
- $strings = preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $strings, 1 );
12
- }
 
 
 
 
 
 
 
 
 
 
 
 
mce/searchreplace/langs/pt_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('pt.searchreplace_dlg',{findwhat:"Localizar",replacewith:"Substituir com",direction:"Dire\u00e7\u00e3o",up:"Acima",down:"Abaixo",mcase:"Diferenciar mai\u00fasculas",findnext:"Localizar pr\u00f3x.",allreplaced:"Todas as substitui\u00e7\u00f5es foram efetuadas.","searchnext_desc":"Localizar novamente",notfound:"A pesquisa foi conclu\u00edda sem resultados.","search_title":"Localizar","replace_title":"Localizar/substituir",replaceall:"Subst. todos",replace:"Substituir"});
 
mce/searchreplace/langs/ru_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('ru.searchreplace_dlg',{findwhat:"\u041f\u043e\u0438\u0441\u043a",replacewith:"\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430",direction:"\u041d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435",up:"\u0412\u0432\u0435\u0440\u0445 ",down:"\u0412\u043d\u0438\u0437",mcase:"\u0423\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0440\u0435\u0433\u0438\u0441\u0442\u0440",findnext:"\u041d\u0430\u0439\u0442\u0438 \u0434\u0430\u043b\u0435\u0435",allreplaced:"\u0412\u0441\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0431\u044b\u043b\u0438 \u0437\u0430\u043c\u0435\u043d\u0435\u043d\u044b.","searchnext_desc":"\u041d\u0430\u0439\u0442\u0438 \u0435\u0449\u0435",notfound:"\u041f\u043e\u0438\u0441\u043a \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d. \u0421\u043e\u043e\u0442\u0432\u0435\u0441\u0442\u0432\u0438\u0439 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e.","search_title":"\u041f\u043e\u0438\u0441\u043a","replace_title":"\u041f\u043e\u0438\u0441\u043a \u0438 \u0437\u0430\u043c\u0435\u043d\u0430",replaceall:"\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0441\u0435",replace:"\u0417\u0430\u043c\u0435\u043d\u0430"});
 
mce/searchreplace/langs/zh_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('zh.searchreplace_dlg',{findwhat:"\u67e5\u627e\u76ee\u6807",replacewith:"\u66ff\u6362\u4e3a",direction:"\u5bfb\u627e\u65b9\u5411",up:"\u5411\u4e0a",down:"\u5411\u4e0b",mcase:"\u533a\u5206\u5927\u5c0f\u5199",findnext:"\u67e5\u627e\u4e0b\u4e00\u4e2a",allreplaced:"\u6240\u6709\u7b26\u5408\u7684\u5b57\u7b26\u4e32\u90fd\u5df2\u88ab\u66ff\u6362\u3002","searchnext_desc":"\u7ee7\u7eed\u67e5\u627e",notfound:"\u5b8c\u6210\u641c\u7d22\uff0c\u672a\u627e\u5230\u641c\u7d22\u9879\u3002","search_title":"\u67e5\u627e","replace_title":"\u67e5\u627e/\u66ff\u6362",replaceall:"\u5168\u90e8\u66ff\u6362",replace:"\u66ff\u6362"});
 
mce/searchreplace/plugin.js ADDED
@@ -0,0 +1,595 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * plugin.js
3
+ *
4
+ * Copyright, Moxiecode Systems AB
5
+ * Released under LGPL License.
6
+ *
7
+ * License: http://www.tinymce.com/license
8
+ * Contributing: http://www.tinymce.com/contributing
9
+ */
10
+
11
+ /*jshint smarttabs:true, undef:true, unused:true, latedef:true, curly:true, bitwise:true */
12
+ /*eslint no-labels:0, no-constant-condition: 0 */
13
+ /*global tinymce:true */
14
+
15
+ (function() {
16
+ // Based on work developed by: James Padolsey http://james.padolsey.com
17
+ // released under UNLICENSE that is compatible with LGPL
18
+ // TODO: Handle contentEditable edgecase:
19
+ // <p>text<span contentEditable="false">text<span contentEditable="true">text</span>text</span>text</p>
20
+ function findAndReplaceDOMText(regex, node, replacementNode, captureGroup, schema) {
21
+ var m, matches = [], text, count = 0, doc;
22
+ var blockElementsMap, hiddenTextElementsMap, shortEndedElementsMap;
23
+
24
+ doc = node.ownerDocument;
25
+ blockElementsMap = schema.getBlockElements(); // H1-H6, P, TD etc
26
+ hiddenTextElementsMap = schema.getWhiteSpaceElements(); // TEXTAREA, PRE, STYLE, SCRIPT
27
+ shortEndedElementsMap = schema.getShortEndedElements(); // BR, IMG, INPUT
28
+
29
+ function getMatchIndexes(m, captureGroup) {
30
+ captureGroup = captureGroup || 0;
31
+
32
+ if (!m[0]) {
33
+ throw 'findAndReplaceDOMText cannot handle zero-length matches';
34
+ }
35
+
36
+ var index = m.index;
37
+
38
+ if (captureGroup > 0) {
39
+ var cg = m[captureGroup];
40
+
41
+ if (!cg) {
42
+ throw 'Invalid capture group';
43
+ }
44
+
45
+ index += m[0].indexOf(cg);
46
+ m[0] = cg;
47
+ }
48
+
49
+ return [index, index + m[0].length, [m[0]]];
50
+ }
51
+
52
+ function getText(node) {
53
+ var txt;
54
+
55
+ if (node.nodeType === 3) {
56
+ return node.data;
57
+ }
58
+
59
+ if (hiddenTextElementsMap[node.nodeName] && !blockElementsMap[node.nodeName]) {
60
+ return '';
61
+ }
62
+
63
+ txt = '';
64
+
65
+ if (blockElementsMap[node.nodeName] || shortEndedElementsMap[node.nodeName]) {
66
+ txt += '\n';
67
+ }
68
+
69
+ if ((node = node.firstChild)) {
70
+ do {
71
+ txt += getText(node);
72
+ } while ((node = node.nextSibling));
73
+ }
74
+
75
+ return txt;
76
+ }
77
+
78
+ function stepThroughMatches(node, matches, replaceFn) {
79
+ var startNode, endNode, startNodeIndex,
80
+ endNodeIndex, innerNodes = [], atIndex = 0, curNode = node,
81
+ matchLocation = matches.shift(), matchIndex = 0;
82
+
83
+ out: while (true) {
84
+ if (blockElementsMap[curNode.nodeName] || shortEndedElementsMap[curNode.nodeName]) {
85
+ atIndex++;
86
+ }
87
+
88
+ if (curNode.nodeType === 3) {
89
+ if (!endNode && curNode.length + atIndex >= matchLocation[1]) {
90
+ // We've found the ending
91
+ endNode = curNode;
92
+ endNodeIndex = matchLocation[1] - atIndex;
93
+ } else if (startNode) {
94
+ // Intersecting node
95
+ innerNodes.push(curNode);
96
+ }
97
+
98
+ if (!startNode && curNode.length + atIndex > matchLocation[0]) {
99
+ // We've found the match start
100
+ startNode = curNode;
101
+ startNodeIndex = matchLocation[0] - atIndex;
102
+ }
103
+
104
+ atIndex += curNode.length;
105
+ }
106
+
107
+ if (startNode && endNode) {
108
+ curNode = replaceFn({
109
+ startNode: startNode,
110
+ startNodeIndex: startNodeIndex,
111
+ endNode: endNode,
112
+ endNodeIndex: endNodeIndex,
113
+ innerNodes: innerNodes,
114
+ match: matchLocation[2],
115
+ matchIndex: matchIndex
116
+ });
117
+
118
+ // replaceFn has to return the node that replaced the endNode
119
+ // and then we step back so we can continue from the end of the
120
+ // match:
121
+ atIndex -= (endNode.length - endNodeIndex);
122
+ startNode = null;
123
+ endNode = null;
124
+ innerNodes = [];
125
+ matchLocation = matches.shift();
126
+ matchIndex++;
127
+
128
+ if (!matchLocation) {
129
+ break; // no more matches
130
+ }
131
+ } else if ((!hiddenTextElementsMap[curNode.nodeName] || blockElementsMap[curNode.nodeName]) && curNode.firstChild) {
132
+ // Move down
133
+ curNode = curNode.firstChild;
134
+ continue;
135
+ } else if (curNode.nextSibling) {
136
+ // Move forward:
137
+ curNode = curNode.nextSibling;
138
+ continue;
139
+ }
140
+
141
+ // Move forward or up:
142
+ while (true) {
143
+ if (curNode.nextSibling) {
144
+ curNode = curNode.nextSibling;
145
+ break;
146
+ } else if (curNode.parentNode !== node) {
147
+ curNode = curNode.parentNode;
148
+ } else {
149
+ break out;
150
+ }
151
+ }
152
+ }
153
+ }
154
+
155
+ /**
156
+ * Generates the actual replaceFn which splits up text nodes
157
+ * and inserts the replacement element.
158
+ */
159
+ function genReplacer(nodeName) {
160
+ var makeReplacementNode;
161
+
162
+ if (typeof nodeName != 'function') {
163
+ var stencilNode = nodeName.nodeType ? nodeName : doc.createElement(nodeName);
164
+
165
+ makeReplacementNode = function(fill, matchIndex) {
166
+ var clone = stencilNode.cloneNode(false);
167
+
168
+ clone.setAttribute('data-mce-index', matchIndex);
169
+
170
+ if (fill) {
171
+ clone.appendChild(doc.createTextNode(fill));
172
+ }
173
+
174
+ return clone;
175
+ };
176
+ } else {
177
+ makeReplacementNode = nodeName;
178
+ }
179
+
180
+ return function(range) {
181
+ var before, after, parentNode, startNode = range.startNode,
182
+ endNode = range.endNode, matchIndex = range.matchIndex;
183
+
184
+ if (startNode === endNode) {
185
+ var node = startNode;
186
+
187
+ parentNode = node.parentNode;
188
+ if (range.startNodeIndex > 0) {
189
+ // Add `before` text node (before the match)
190
+ before = doc.createTextNode(node.data.substring(0, range.startNodeIndex));
191
+ parentNode.insertBefore(before, node);
192
+ }
193
+
194
+ // Create the replacement node:
195
+ var el = makeReplacementNode(range.match[0], matchIndex);
196
+ parentNode.insertBefore(el, node);
197
+ if (range.endNodeIndex < node.length) {
198
+ // Add `after` text node (after the match)
199
+ after = doc.createTextNode(node.data.substring(range.endNodeIndex));
200
+ parentNode.insertBefore(after, node);
201
+ }
202
+
203
+ node.parentNode.removeChild(node);
204
+
205
+ return el;
206
+ } else {
207
+ // Replace startNode -> [innerNodes...] -> endNode (in that order)
208
+ before = doc.createTextNode(startNode.data.substring(0, range.startNodeIndex));
209
+ after = doc.createTextNode(endNode.data.substring(range.endNodeIndex));
210
+ var elA = makeReplacementNode(startNode.data.substring(range.startNodeIndex), matchIndex);
211
+ var innerEls = [];
212
+
213
+ for (var i = 0, l = range.innerNodes.length; i < l; ++i) {
214
+ var innerNode = range.innerNodes[i];
215
+ var innerEl = makeReplacementNode(innerNode.data, matchIndex);
216
+ innerNode.parentNode.replaceChild(innerEl, innerNode);
217
+ innerEls.push(innerEl);
218
+ }
219
+
220
+ var elB = makeReplacementNode(endNode.data.substring(0, range.endNodeIndex), matchIndex);
221
+
222
+ parentNode = startNode.parentNode;
223
+ parentNode.insertBefore(before, startNode);
224
+ parentNode.insertBefore(elA, startNode);
225
+ parentNode.removeChild(startNode);
226
+
227
+ parentNode = endNode.parentNode;
228
+ parentNode.insertBefore(elB, endNode);
229
+ parentNode.insertBefore(after, endNode);
230
+ parentNode.removeChild(endNode);
231
+
232
+ return elB;
233
+ }
234
+ };
235
+ }
236
+
237
+ text = getText(node);
238
+ if (!text) {
239
+ return;
240
+ }
241
+
242
+ if (regex.global) {
243
+ while ((m = regex.exec(text))) {
244
+ matches.push(getMatchIndexes(m, captureGroup));
245
+ }
246
+ } else {
247
+ m = text.match(regex);
248
+ matches.push(getMatchIndexes(m, captureGroup));
249
+ }
250
+
251
+ if (matches.length) {
252
+ count = matches.length;
253
+ stepThroughMatches(node, matches, genReplacer(replacementNode));
254
+ }
255
+
256
+ return count;
257
+ }
258
+
259
+ function Plugin(editor) {
260
+ var self = this, currentIndex = -1;
261
+
262
+ function showDialog() {
263
+ var last = {};
264
+
265
+ function updateButtonStates() {
266
+ win.statusbar.find('#next').disabled(!findSpansByIndex(currentIndex + 1).length);
267
+ win.statusbar.find('#prev').disabled(!findSpansByIndex(currentIndex - 1).length);
268
+ }
269
+
270
+ function notFoundAlert() {
271
+ tinymce.ui.MessageBox.alert('Could not find the specified string.', function() {
272
+ win.find('#find')[0].focus();
273
+ });
274
+ }
275
+
276
+ var win = tinymce.ui.Factory.create({
277
+ type: 'window',
278
+ layout: "flex",
279
+ pack: "center",
280
+ align: "center",
281
+ onClose: function() {
282
+ editor.focus();
283
+ self.done();
284
+ },
285
+ onSubmit: function(e) {
286
+ var count, caseState, text, wholeWord;
287
+
288
+ e.preventDefault();
289
+
290
+ caseState = win.find('#case').checked();
291
+ wholeWord = win.find('#words').checked();
292
+
293
+ text = win.find('#find').value();
294
+ if (!text.length) {
295
+ self.done(false);
296
+ win.statusbar.items().slice(1).disabled(true);
297
+ return;
298
+ }
299
+
300
+ if (last.text == text && last.caseState == caseState && last.wholeWord == wholeWord) {
301
+ if (findSpansByIndex(currentIndex + 1).length === 0) {
302
+ notFoundAlert();
303
+ return;
304
+ }
305
+
306
+ self.next();
307
+ updateButtonStates();
308
+ return;
309
+ }
310
+
311
+ count = self.find(text, caseState, wholeWord);
312
+ if (!count) {
313
+ notFoundAlert();
314
+ }
315
+
316
+ win.statusbar.items().slice(1).disabled(count === 0);
317
+ updateButtonStates();
318
+
319
+ last = {
320
+ text: text,
321
+ caseState: caseState,
322
+ wholeWord: wholeWord
323
+ };
324
+ },
325
+ buttons: [
326
+ {text: "Find", onclick: function() {
327
+ win.submit();
328
+ }},
329
+ {text: "Replace", disabled: true, onclick: function() {
330
+ if (!self.replace(win.find('#replace').value())) {
331
+ win.statusbar.items().slice(1).disabled(true);
332
+ currentIndex = -1;
333
+ last = {};
334
+ }
335
+ }},
336
+ {text: "Replace all", disabled: true, onclick: function() {
337
+ self.replace(win.find('#replace').value(), true, true);
338
+ win.statusbar.items().slice(1).disabled(true);
339
+ last = {};
340
+ }},
341
+ {type: "spacer", flex: 1},
342
+ {text: "Prev", name: 'prev', disabled: true, onclick: function() {
343
+ self.prev();
344
+ updateButtonStates();
345
+ }},
346
+ {text: "Next", name: 'next', disabled: true, onclick: function() {
347
+ self.next();
348
+ updateButtonStates();
349
+ }}
350
+ ],
351
+ title: "Find and replace",
352
+ items: {
353
+ type: "form",
354
+ padding: 20,
355
+ labelGap: 30,
356
+ spacing: 10,
357
+ items: [
358
+ {type: 'textbox', name: 'find', size: 40, label: 'Find', value: editor.selection.getNode().src},
359
+ {type: 'textbox', name: 'replace', size: 40, label: 'Replace with'},
360
+ {type: 'checkbox', name: 'case', text: 'Match case', label: ' '},
361
+ {type: 'checkbox', name: 'words', text: 'Whole words', label: ' '}
362
+ ]
363
+ }
364
+ }).renderTo().reflow();
365
+ }
366
+
367
+ self.init = function(ed) {
368
+ ed.addMenuItem('searchreplace', {
369
+ text: 'Find and replace',
370
+ shortcut: 'Ctrl+F',
371
+ onclick: showDialog,
372
+ separator: 'before',
373
+ context: 'edit'
374
+ });
375
+
376
+ ed.addButton('searchreplace', {
377
+ tooltip: 'Find and replace',
378
+ shortcut: 'Ctrl+F',
379
+ onclick: showDialog
380
+ });
381
+
382
+ ed.addCommand("SearchReplace", showDialog);
383
+
384
+ ed.shortcuts.add('Ctrl+F', '', showDialog);
385
+ };
386
+
387
+ function getElmIndex(elm) {
388
+ var value = elm.getAttribute('data-mce-index');
389
+
390
+ if (typeof(value) == "number") {
391
+ return "" + value;
392
+ }
393
+
394
+ return value;
395
+ }
396
+
397
+ function markAllMatches(regex) {
398
+ var node, marker;
399
+
400
+ marker = editor.dom.create('span', {
401
+ "data-mce-bogus": 1
402
+ });
403
+
404
+ marker.className = 'mce-match-marker'; // IE 7 adds class="mce-match-marker" and class=mce-match-marker
405
+ node = editor.getBody();
406
+
407
+ self.done(false);
408
+
409
+ return findAndReplaceDOMText(regex, node, marker, false, editor.schema);
410
+ }
411
+
412
+ function unwrap(node) {
413
+ var parentNode = node.parentNode;
414
+
415
+ if (node.firstChild) {
416
+ parentNode.insertBefore(node.firstChild, node);
417
+ }
418
+
419
+ node.parentNode.removeChild(node);
420
+ }
421
+
422
+ function findSpansByIndex(index) {
423
+ var nodes, spans = [];
424
+
425
+ nodes = tinymce.toArray(editor.getBody().getElementsByTagName('span'));
426
+ if (nodes.length) {
427
+ for (var i = 0; i < nodes.length; i++) {
428
+ var nodeIndex = getElmIndex(nodes[i]);
429
+
430
+ if (nodeIndex === null || !nodeIndex.length) {
431
+ continue;
432
+ }
433
+
434
+ if (nodeIndex === index.toString()) {
435
+ spans.push(nodes[i]);
436
+ }
437
+ }
438
+ }
439
+
440
+ return spans;
441
+ }
442
+
443
+ function moveSelection(forward) {
444
+ var testIndex = currentIndex, dom = editor.dom;
445
+
446
+ forward = forward !== false;
447
+
448
+ if (forward) {
449
+ testIndex++;
450
+ } else {
451
+ testIndex--;
452
+ }
453
+
454
+ dom.removeClass(findSpansByIndex(currentIndex), 'mce-match-marker-selected');
455
+
456
+ var spans = findSpansByIndex(testIndex);
457
+ if (spans.length) {
458
+ dom.addClass(findSpansByIndex(testIndex), 'mce-match-marker-selected');
459
+ editor.selection.scrollIntoView(spans[0]);
460
+ return testIndex;
461
+ }
462
+
463
+ return -1;
464
+ }
465
+
466
+ function removeNode(node) {
467
+ node.parentNode.removeChild(node);
468
+ }
469
+
470
+ self.find = function(text, matchCase, wholeWord) {
471
+ text = text.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
472
+ text = wholeWord ? '\\b' + text + '\\b' : text;
473
+
474
+ var count = markAllMatches(new RegExp(text, matchCase ? 'g' : 'gi'));
475
+
476
+ if (count) {
477
+ currentIndex = -1;
478
+ currentIndex = moveSelection(true);
479
+ }
480
+
481
+ return count;
482
+ };
483
+
484
+ self.next = function() {
485
+ var index = moveSelection(true);
486
+
487
+ if (index !== -1) {
488
+ currentIndex = index;
489
+ }
490
+ };
491
+
492
+ self.prev = function() {
493
+ var index = moveSelection(false);
494
+
495
+ if (index !== -1) {
496
+ currentIndex = index;
497
+ }
498
+ };
499
+
500
+ self.replace = function(text, forward, all) {
501
+ var i, nodes, node, matchIndex, currentMatchIndex, nextIndex = currentIndex, hasMore;
502
+
503
+ forward = forward !== false;
504
+
505
+ node = editor.getBody();
506
+ nodes = tinymce.toArray(node.getElementsByTagName('span'));
507
+ for (i = 0; i < nodes.length; i++) {
508
+ var nodeIndex = getElmIndex(nodes[i]);
509
+
510
+ if (nodeIndex === null || !nodeIndex.length) {
511
+ continue;
512
+ }
513
+
514
+ matchIndex = currentMatchIndex = parseInt(nodeIndex, 10);
515
+ if (all || matchIndex === currentIndex) {
516
+ if (text.length) {
517
+ nodes[i].firstChild.nodeValue = text;
518
+ unwrap(nodes[i]);
519
+ } else {
520
+ removeNode(nodes[i]);
521
+ }
522
+
523
+ while (nodes[++i]) {
524
+ matchIndex = getElmIndex(nodes[i]);
525
+
526
+ if (nodeIndex === null || !nodeIndex.length) {
527
+ continue;
528
+ }
529
+
530
+ if (matchIndex === currentMatchIndex) {
531
+ removeNode(nodes[i]);
532
+ } else {
533
+ i--;
534
+ break;
535
+ }
536
+ }
537
+
538
+ if (forward) {
539
+ nextIndex--;
540
+ }
541
+ } else if (currentMatchIndex > currentIndex) {
542
+ nodes[i].setAttribute('data-mce-index', currentMatchIndex - 1);
543
+ }
544
+ }
545
+
546
+ editor.undoManager.add();
547
+ currentIndex = nextIndex;
548
+
549
+ if (forward) {
550
+ hasMore = findSpansByIndex(nextIndex + 1).length > 0;
551
+ self.next();
552
+ } else {
553
+ hasMore = findSpansByIndex(nextIndex - 1).length > 0;
554
+ self.prev();
555
+ }
556
+
557
+ return !all && hasMore;
558
+ };
559
+
560
+ self.done = function(keepEditorSelection) {
561
+ var i, nodes, startContainer, endContainer;
562
+
563
+ nodes = tinymce.toArray(editor.getBody().getElementsByTagName('span'));
564
+ for (i = 0; i < nodes.length; i++) {
565
+ var nodeIndex = getElmIndex(nodes[i]);
566
+
567
+ if (nodeIndex !== null && nodeIndex.length) {
568
+ if (nodeIndex === currentIndex.toString()) {
569
+ if (!startContainer) {
570
+ startContainer = nodes[i].firstChild;
571
+ }
572
+
573
+ endContainer = nodes[i].firstChild;
574
+ }
575
+
576
+ unwrap(nodes[i]);
577
+ }
578
+ }
579
+
580
+ if (startContainer && endContainer) {
581
+ var rng = editor.dom.createRng();
582
+ rng.setStart(startContainer, 0);
583
+ rng.setEnd(endContainer, endContainer.data.length);
584
+
585
+ if (keepEditorSelection !== false) {
586
+ editor.selection.setRng(rng);
587
+ }
588
+
589
+ return rng;
590
+ }
591
+ };
592
+ }
593
+
594
+ tinymce.PluginManager.add('searchreplace', Plugin);
595
+ })();
mce/searchreplace/plugin.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(){function e(e,t,n,a,r){function i(e,t){if(t=t||0,!e[0])throw"findAndReplaceDOMText cannot handle zero-length matches";var n=e.index;if(t>0){var a=e[t];if(!a)throw"Invalid capture group";n+=e[0].indexOf(a),e[0]=a}return[n,n+e[0].length,[e[0]]]}function d(e){var t;if(3===e.nodeType)return e.data;if(h[e.nodeName]&&!u[e.nodeName])return"";if(t="",(u[e.nodeName]||m[e.nodeName])&&(t+="\n"),e=e.firstChild)do t+=d(e);while(e=e.nextSibling);return t}function o(e,t,n){var a,r,i,d,o=[],l=0,c=e,s=t.shift(),f=0;e:for(;;){if((u[c.nodeName]||m[c.nodeName])&&l++,3===c.nodeType&&(!r&&c.length+l>=s[1]?(r=c,d=s[1]-l):a&&o.push(c),!a&&c.length+l>s[0]&&(a=c,i=s[0]-l),l+=c.length),a&&r){if(c=n({startNode:a,startNodeIndex:i,endNode:r,endNodeIndex:d,innerNodes:o,match:s[2],matchIndex:f}),l-=r.length-d,a=null,r=null,o=[],s=t.shift(),f++,!s)break}else{if((!h[c.nodeName]||u[c.nodeName])&&c.firstChild){c=c.firstChild;continue}if(c.nextSibling){c=c.nextSibling;continue}}for(;;){if(c.nextSibling){c=c.nextSibling;break}if(c.parentNode===e)break e;c=c.parentNode}}}function l(e){var t;if("function"!=typeof e){var n=e.nodeType?e:f.createElement(e);t=function(e,t){var a=n.cloneNode(!1);return a.setAttribute("data-mce-index",t),e&&a.appendChild(f.createTextNode(e)),a}}else t=e;return function(e){var n,a,r,i=e.startNode,d=e.endNode,o=e.matchIndex;if(i===d){var l=i;r=l.parentNode,e.startNodeIndex>0&&(n=f.createTextNode(l.data.substring(0,e.startNodeIndex)),r.insertBefore(n,l));var c=t(e.match[0],o);return r.insertBefore(c,l),e.endNodeIndex<l.length&&(a=f.createTextNode(l.data.substring(e.endNodeIndex)),r.insertBefore(a,l)),l.parentNode.removeChild(l),c}n=f.createTextNode(i.data.substring(0,e.startNodeIndex)),a=f.createTextNode(d.data.substring(e.endNodeIndex));for(var s=t(i.data.substring(e.startNodeIndex),o),u=[],h=0,m=e.innerNodes.length;m>h;++h){var g=e.innerNodes[h],p=t(g.data,o);g.parentNode.replaceChild(p,g),u.push(p)}var x=t(d.data.substring(0,e.endNodeIndex),o);return r=i.parentNode,r.insertBefore(n,i),r.insertBefore(s,i),r.removeChild(i),r=d.parentNode,r.insertBefore(x,d),r.insertBefore(a,d),r.removeChild(d),x}}var c,s,f,u,h,m,g=[],p=0;if(f=t.ownerDocument,u=r.getBlockElements(),h=r.getWhiteSpaceElements(),m=r.getShortEndedElements(),s=d(t)){if(e.global)for(;c=e.exec(s);)g.push(i(c,a));else c=s.match(e),g.push(i(c,a));return g.length&&(p=g.length,o(t,g,l(n))),p}}function t(t){function n(){function e(){r.statusbar.find("#next").disabled(!d(s+1).length),r.statusbar.find("#prev").disabled(!d(s-1).length)}function n(){tinymce.ui.MessageBox.alert("Could not find the specified string.",function(){r.find("#find")[0].focus()})}var a={},r=tinymce.ui.Factory.create({type:"window",layout:"flex",pack:"center",align:"center",onClose:function(){t.focus(),c.done()},onSubmit:function(t){var i,o,l,f;return t.preventDefault(),o=r.find("#case").checked(),f=r.find("#words").checked(),l=r.find("#find").value(),l.length?a.text==l&&a.caseState==o&&a.wholeWord==f?0===d(s+1).length?void n():(c.next(),void e()):(i=c.find(l,o,f),i||n(),r.statusbar.items().slice(1).disabled(0===i),e(),void(a={text:l,caseState:o,wholeWord:f})):(c.done(!1),void r.statusbar.items().slice(1).disabled(!0))},buttons:[{text:"Find",onclick:function(){r.submit()}},{text:"Replace",disabled:!0,onclick:function(){c.replace(r.find("#replace").value())||(r.statusbar.items().slice(1).disabled(!0),s=-1,a={})}},{text:"Replace all",disabled:!0,onclick:function(){c.replace(r.find("#replace").value(),!0,!0),r.statusbar.items().slice(1).disabled(!0),a={}}},{type:"spacer",flex:1},{text:"Prev",name:"prev",disabled:!0,onclick:function(){c.prev(),e()}},{text:"Next",name:"next",disabled:!0,onclick:function(){c.next(),e()}}],title:"Find and replace",items:{type:"form",padding:20,labelGap:30,spacing:10,items:[{type:"textbox",name:"find",size:40,label:"Find",value:t.selection.getNode().src},{type:"textbox",name:"replace",size:40,label:"Replace with"},{type:"checkbox",name:"case",text:"Match case",label:" "},{type:"checkbox",name:"words",text:"Whole words",label:" "}]}}).renderTo().reflow()}function a(e){var t=e.getAttribute("data-mce-index");return"number"==typeof t?""+t:t}function r(n){var a,r;return r=t.dom.create("span",{"data-mce-bogus":1}),r.className="mce-match-marker",a=t.getBody(),c.done(!1),e(n,a,r,!1,t.schema)}function i(e){var t=e.parentNode;e.firstChild&&t.insertBefore(e.firstChild,e),e.parentNode.removeChild(e)}function d(e){var n,r=[];if(n=tinymce.toArray(t.getBody().getElementsByTagName("span")),n.length)for(var i=0;i<n.length;i++){var d=a(n[i]);null!==d&&d.length&&d===e.toString()&&r.push(n[i])}return r}function o(e){var n=s,a=t.dom;e=e!==!1,e?n++:n--,a.removeClass(d(s),"mce-match-marker-selected");var r=d(n);return r.length?(a.addClass(d(n),"mce-match-marker-selected"),t.selection.scrollIntoView(r[0]),n):-1}function l(e){e.parentNode.removeChild(e)}var c=this,s=-1;c.init=function(e){e.addMenuItem("searchreplace",{text:"Find and replace",shortcut:"Ctrl+F",onclick:n,separator:"before",context:"edit"}),e.addButton("searchreplace",{tooltip:"Find and replace",shortcut:"Ctrl+F",onclick:n}),e.addCommand("SearchReplace",n),e.shortcuts.add("Ctrl+F","",n)},c.find=function(e,t,n){e=e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),e=n?"\\b"+e+"\\b":e;var a=r(new RegExp(e,t?"g":"gi"));return a&&(s=-1,s=o(!0)),a},c.next=function(){var e=o(!0);-1!==e&&(s=e)},c.prev=function(){var e=o(!1);-1!==e&&(s=e)},c.replace=function(e,n,r){var o,f,u,h,m,g,p=s;for(n=n!==!1,u=t.getBody(),f=tinymce.toArray(u.getElementsByTagName("span")),o=0;o<f.length;o++){var x=a(f[o]);if(null!==x&&x.length)if(h=m=parseInt(x,10),r||h===s){for(e.length?(f[o].firstChild.nodeValue=e,i(f[o])):l(f[o]);f[++o];)if(h=a(f[o]),null!==x&&x.length){if(h!==m){o--;break}l(f[o])}n&&p--}else m>s&&f[o].setAttribute("data-mce-index",m-1)}return t.undoManager.add(),s=p,n?(g=d(p+1).length>0,c.next()):(g=d(p-1).length>0,c.prev()),!r&&g},c.done=function(e){var n,r,d,o;for(r=tinymce.toArray(t.getBody().getElementsByTagName("span")),n=0;n<r.length;n++){var l=a(r[n]);null!==l&&l.length&&(l===s.toString()&&(d||(d=r[n].firstChild),o=r[n].firstChild),i(r[n]))}if(d&&o){var c=t.dom.createRng();return c.setStart(d,0),c.setEnd(o,o.data.length),e!==!1&&t.selection.setRng(c),c}}}tinymce.PluginManager.add("searchreplace",t)}();
mce/searchreplace/searchreplace.htm DELETED
@@ -1,100 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <title>{#searchreplace_dlg.replace_title}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=359"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=359"></script>
7
- <script type="text/javascript" src="../../utils/form_utils.js?ver=359"></script>
8
- <script type="text/javascript" src="js/searchreplace.js?ver=359"></script>
9
- <link rel="stylesheet" type="text/css" href="css/searchreplace.css?ver=359" />
10
- </head>
11
- <body style="display:none;" role="application" aria-labelledby="app_title">
12
- <span id="app_title" style="display:none">{#searchreplace_dlg.replace_title}</span>
13
- <form onsubmit="SearchReplaceDialog.searchNext('none');return false;" action="#">
14
- <div class="tabs">
15
- <ul>
16
- <li id="search_tab" aria-controls="search_panel"><span><a href="javascript:SearchReplaceDialog.switchMode('search');" onmousedown="return false;">{#searchreplace.search_desc}</a></span></li>
17
- <li id="replace_tab" aria-controls="replace_panel"><span><a href="javascript:SearchReplaceDialog.switchMode('replace');" onmousedown="return false;">{#searchreplace_dlg.replace}</a></span></li>
18
- </ul>
19
- </div>
20
-
21
- <div class="panel_wrapper">
22
- <div id="search_panel" class="panel">
23
- <table role="presentation" border="0" cellspacing="0" cellpadding="2">
24
- <tr>
25
- <td><label for="search_panel_searchstring">{#searchreplace_dlg.findwhat}</label></td>
26
- <td><input type="text" id="search_panel_searchstring" name="search_panel_searchstring" style="width: 200px" aria-required="true" /></td>
27
- </tr>
28
- <tr>
29
- <td colspan="2">
30
- <table role="presentation" border="0" cellspacing="0" cellpadding="0" class="direction">
31
- <tr role="group" aria-labelledby="search_panel_backwards_label">
32
- <td><label id="search_panel_backwards_label">{#searchreplace_dlg.direction}</label></td>
33
- <td><input id="search_panel_backwardsu" name="search_panel_backwards" class="radio" type="radio" /></td>
34
- <td><label for="search_panel_backwardsu">{#searchreplace_dlg.up}</label></td>
35
- <td><input id="search_panel_backwardsd" name="search_panel_backwards" class="radio" type="radio" checked="checked" /></td>
36
- <td><label for="search_panel_backwardsd">{#searchreplace_dlg.down}</label></td>
37
- </tr>
38
- </table>
39
- </td>
40
- </tr>
41
- <tr>
42
- <td colspan="2">
43
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
44
- <tr>
45
- <td><input id="search_panel_casesensitivebox" name="search_panel_casesensitivebox" class="checkbox" type="checkbox" /></td>
46
- <td><label for="search_panel_casesensitivebox">{#searchreplace_dlg.mcase}</label></td>
47
- </tr>
48
- </table>
49
- </td>
50
- </tr>
51
- </table>
52
- </div>
53
-
54
- <div id="replace_panel" class="panel">
55
- <table role="presentation" border="0" cellspacing="0" cellpadding="2">
56
- <tr>
57
- <td><label for="replace_panel_searchstring">{#searchreplace_dlg.findwhat}</label></td>
58
- <td><input type="text" id="replace_panel_searchstring" name="replace_panel_searchstring" style="width: 200px" aria-required="true" /></td>
59
- </tr>
60
- <tr>
61
- <td><label for="replace_panel_replacestring">{#searchreplace_dlg.replacewith}</label></td>
62
- <td><input type="text" id="replace_panel_replacestring" name="replace_panel_replacestring" style="width: 200px" aria-required="true" /></td>
63
- </tr>
64
- <tr>
65
- <td colspan="2">
66
- <table role="presentation" border="0" cellspacing="0" cellpadding="0" class="direction">
67
- <tr role="group" aria-labelledby="replace_panel_dir_label">
68
- <td><label id="replace_panel_dir_label">{#searchreplace_dlg.direction}</label></td>
69
- <td><input id="replace_panel_backwardsu" name="replace_panel_backwards" class="radio" type="radio" /></td>
70
- <td><label for="replace_panel_backwardsu">{#searchreplace_dlg.up}</label></td>
71
- <td><input id="replace_panel_backwardsd" name="replace_panel_backwards" class="radio" type="radio" checked="checked" /></td>
72
- <td><label for="replace_panel_backwardsd">{#searchreplace_dlg.down}</label></td>
73
- </tr>
74
- </table>
75
- </td>
76
- </tr>
77
- <tr>
78
- <td colspan="2">
79
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
80
- <tr>
81
- <td><input id="replace_panel_casesensitivebox" name="replace_panel_casesensitivebox" class="checkbox" type="checkbox" /></td>
82
- <td><label for="replace_panel_casesensitivebox">{#searchreplace_dlg.mcase}</label></td>
83
- </tr>
84
- </table>
85
- </td>
86
- </tr>
87
- </table>
88
- </div>
89
-
90
- </div>
91
-
92
- <div class="mceActionPanel">
93
- <input type="submit" id="insert" name="insert" value="{#searchreplace_dlg.findnext}" />
94
- <input type="button" class="button" id="replaceBtn" name="replaceBtn" value="{#searchreplace_dlg.replace}" onclick="SearchReplaceDialog.searchNext('current');" />
95
- <input type="button" class="button" id="replaceAllBtn" name="replaceAllBtn" value="{#searchreplace_dlg.replaceall}" onclick="SearchReplaceDialog.searchNext('all');" />
96
- <input type="button" id="cancel" name="close" value="{#close}" onclick="tinyMCEPopup.close();" />
97
- </div>
98
- </form>
99
- </body>
100
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/style/css/props.css DELETED
@@ -1,15 +0,0 @@
1
- #text_font {width:250px;}
2
- #text_size {width:70px;}
3
- .mceAddSelectValue {background:#DDD;}
4
- select, #block_text_indent, #box_width, #box_height, #box_padding_top, #box_padding_right, #box_padding_bottom, #box_padding_left {width:70px;}
5
- #box_margin_top, #box_margin_right, #box_margin_bottom, #box_margin_left, #positioning_width, #positioning_height, #positioning_zindex {width:70px;}
6
- #positioning_placement_top, #positioning_placement_right, #positioning_placement_bottom, #positioning_placement_left {width:70px;}
7
- #positioning_clip_top, #positioning_clip_right, #positioning_clip_bottom, #positioning_clip_left {width:70px;}
8
- .panel_toggle_insert_span {padding-top:10px;}
9
- .panel_wrapper div.current {padding-top:10px;min-height:220px;height:auto;}
10
- .delim {border-left:1px solid gray;}
11
- .tdelim {border-bottom:1px solid gray;}
12
- #block_display {width:145px;}
13
- #list_type {width:115px;}
14
- .disabled {background:#EEE;}
15
- .mceActionPanel {margin:5px 0;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/style/editor_plugin.js DELETED
@@ -1 +0,0 @@
1
- (function(){tinymce.create("tinymce.plugins.StylePlugin",{init:function(a,b){a.addCommand("mceStyleProps",function(){var c=false;var f=a.selection.getSelectedBlocks();var d=[];if(f.length===1){d.push(a.selection.getNode().style.cssText)}else{tinymce.each(f,function(g){d.push(a.dom.getAttrib(g,"style"))});c=true}a.windowManager.open({file:b+"/props.htm",width:480+parseInt(a.getLang("style.delta_width",0)),height:340+parseInt(a.getLang("style.delta_height",0)),inline:1},{applyStyleToBlocks:c,plugin_url:b,styles:d})});a.addCommand("mceSetElementStyle",function(d,c){if(e=a.selection.getNode()){a.dom.setAttrib(e,"style",c);a.execCommand("mceRepaint")}});a.onNodeChange.add(function(d,c,f){c.setDisabled("styleprops",f.nodeName==="BODY")});a.addButton("styleprops",{title:"style.desc",cmd:"mceStyleProps"})},getInfo:function(){return{longname:"Style",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("style",tinymce.plugins.StylePlugin)})();
 
mce/style/js/props.js DELETED
@@ -1,709 +0,0 @@
1
- tinyMCEPopup.requireLangPack();
2
-
3
- var defaultFonts = "" +
4
- "Arial, Helvetica, sans-serif=Arial, Helvetica, sans-serif;" +
5
- "Times New Roman, Times, serif=Times New Roman, Times, serif;" +
6
- "Courier New, Courier, mono=Courier New, Courier, mono;" +
7
- "Times New Roman, Times, serif=Times New Roman, Times, serif;" +
8
- "Georgia, Times New Roman, Times, serif=Georgia, Times New Roman, Times, serif;" +
9
- "Verdana, Arial, Helvetica, sans-serif=Verdana, Arial, Helvetica, sans-serif;" +
10
- "Geneva, Arial, Helvetica, sans-serif=Geneva, Arial, Helvetica, sans-serif";
11
-
12
- var defaultSizes = "9;10;12;14;16;18;24;xx-small;x-small;small;medium;large;x-large;xx-large;smaller;larger";
13
- var defaultMeasurement = "+pixels=px;points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;ems=em;exs=ex;%";
14
- var defaultSpacingMeasurement = "pixels=px;points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;+ems=em;exs=ex;%";
15
- var defaultIndentMeasurement = "pixels=px;+points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;ems=em;exs=ex;%";
16
- var defaultWeight = "normal;bold;bolder;lighter;100;200;300;400;500;600;700;800;900";
17
- var defaultTextStyle = "normal;italic;oblique";
18
- var defaultVariant = "normal;small-caps";
19
- var defaultLineHeight = "normal";
20
- var defaultAttachment = "fixed;scroll";
21
- var defaultRepeat = "no-repeat;repeat;repeat-x;repeat-y";
22
- var defaultPosH = "left;center;right";
23
- var defaultPosV = "top;center;bottom";
24
- var defaultVAlign = "baseline;sub;super;top;text-top;middle;bottom;text-bottom";
25
- var defaultDisplay = "inline;block;list-item;run-in;compact;marker;table;inline-table;table-row-group;table-header-group;table-footer-group;table-row;table-column-group;table-column;table-cell;table-caption;none";
26
- var defaultBorderStyle = "none;solid;dashed;dotted;double;groove;ridge;inset;outset";
27
- var defaultBorderWidth = "thin;medium;thick";
28
- var defaultListType = "disc;circle;square;decimal;lower-roman;upper-roman;lower-alpha;upper-alpha;none";
29
-
30
- function aggregateStyles(allStyles) {
31
- var mergedStyles = {};
32
-
33
- tinymce.each(allStyles, function(style) {
34
- if (style !== '') {
35
- var parsedStyles = tinyMCEPopup.editor.dom.parseStyle(style);
36
- for (var name in parsedStyles) {
37
- if (parsedStyles.hasOwnProperty(name)) {
38
- if (mergedStyles[name] === undefined) {
39
- mergedStyles[name] = parsedStyles[name];
40
- }
41
- else if (name === 'text-decoration') {
42
- if (mergedStyles[name].indexOf(parsedStyles[name]) === -1) {
43
- mergedStyles[name] = mergedStyles[name] +' '+ parsedStyles[name];
44
- }
45
- }
46
- }
47
- }
48
- }
49
- });
50
-
51
- return mergedStyles;
52
- }
53
-
54
- var applyActionIsInsert;
55
- var existingStyles;
56
-
57
- function init(ed) {
58
- var ce = document.getElementById('container'), h;
59
-
60
- existingStyles = aggregateStyles(tinyMCEPopup.getWindowArg('styles'));
61
- ce.style.cssText = tinyMCEPopup.editor.dom.serializeStyle(existingStyles);
62
-
63
- applyActionIsInsert = ed.getParam("edit_css_style_insert_span", false);
64
- document.getElementById('toggle_insert_span').checked = applyActionIsInsert;
65
-
66
- h = getBrowserHTML('background_image_browser','background_image','image','advimage');
67
- document.getElementById("background_image_browser").innerHTML = h;
68
-
69
- document.getElementById('text_color_pickcontainer').innerHTML = getColorPickerHTML('text_color_pick','text_color');
70
- document.getElementById('background_color_pickcontainer').innerHTML = getColorPickerHTML('background_color_pick','background_color');
71
- document.getElementById('border_color_top_pickcontainer').innerHTML = getColorPickerHTML('border_color_top_pick','border_color_top');
72
- document.getElementById('border_color_right_pickcontainer').innerHTML = getColorPickerHTML('border_color_right_pick','border_color_right');
73
- document.getElementById('border_color_bottom_pickcontainer').innerHTML = getColorPickerHTML('border_color_bottom_pick','border_color_bottom');
74
- document.getElementById('border_color_left_pickcontainer').innerHTML = getColorPickerHTML('border_color_left_pick','border_color_left');
75
-
76
- fillSelect(0, 'text_font', 'style_font', defaultFonts, ';', true);
77
- fillSelect(0, 'text_size', 'style_font_size', defaultSizes, ';', true);
78
- fillSelect(0, 'text_size_measurement', 'style_font_size_measurement', defaultMeasurement, ';', true);
79
- fillSelect(0, 'text_case', 'style_text_case', "capitalize;uppercase;lowercase", ';', true);
80
- fillSelect(0, 'text_weight', 'style_font_weight', defaultWeight, ';', true);
81
- fillSelect(0, 'text_style', 'style_font_style', defaultTextStyle, ';', true);
82
- fillSelect(0, 'text_variant', 'style_font_variant', defaultVariant, ';', true);
83
- fillSelect(0, 'text_lineheight', 'style_font_line_height', defaultLineHeight, ';', true);
84
- fillSelect(0, 'text_lineheight_measurement', 'style_font_line_height_measurement', defaultMeasurement, ';', true);
85
-
86
- fillSelect(0, 'background_attachment', 'style_background_attachment', defaultAttachment, ';', true);
87
- fillSelect(0, 'background_repeat', 'style_background_repeat', defaultRepeat, ';', true);
88
-
89
- fillSelect(0, 'background_hpos_measurement', 'style_background_hpos_measurement', defaultMeasurement, ';', true);
90
- fillSelect(0, 'background_vpos_measurement', 'style_background_vpos_measurement', defaultMeasurement, ';', true);
91
-
92
- fillSelect(0, 'background_hpos', 'style_background_hpos', defaultPosH, ';', true);
93
- fillSelect(0, 'background_vpos', 'style_background_vpos', defaultPosV, ';', true);
94
-
95
- fillSelect(0, 'block_wordspacing', 'style_wordspacing', 'normal', ';', true);
96
- fillSelect(0, 'block_wordspacing_measurement', 'style_wordspacing_measurement', defaultSpacingMeasurement, ';', true);
97
- fillSelect(0, 'block_letterspacing', 'style_letterspacing', 'normal', ';', true);
98
- fillSelect(0, 'block_letterspacing_measurement', 'style_letterspacing_measurement', defaultSpacingMeasurement, ';', true);
99
- fillSelect(0, 'block_vertical_alignment', 'style_vertical_alignment', defaultVAlign, ';', true);
100
- fillSelect(0, 'block_text_align', 'style_text_align', "left;right;center;justify", ';', true);
101
- fillSelect(0, 'block_whitespace', 'style_whitespace', "normal;pre;nowrap", ';', true);
102
- fillSelect(0, 'block_display', 'style_display', defaultDisplay, ';', true);
103
- fillSelect(0, 'block_text_indent_measurement', 'style_text_indent_measurement', defaultIndentMeasurement, ';', true);
104
-
105
- fillSelect(0, 'box_width_measurement', 'style_box_width_measurement', defaultMeasurement, ';', true);
106
- fillSelect(0, 'box_height_measurement', 'style_box_height_measurement', defaultMeasurement, ';', true);
107
- fillSelect(0, 'box_float', 'style_float', 'left;right;none', ';', true);
108
- fillSelect(0, 'box_clear', 'style_clear', 'left;right;both;none', ';', true);
109
- fillSelect(0, 'box_padding_left_measurement', 'style_padding_left_measurement', defaultMeasurement, ';', true);
110
- fillSelect(0, 'box_padding_top_measurement', 'style_padding_top_measurement', defaultMeasurement, ';', true);
111
- fillSelect(0, 'box_padding_bottom_measurement', 'style_padding_bottom_measurement', defaultMeasurement, ';', true);
112
- fillSelect(0, 'box_padding_right_measurement', 'style_padding_right_measurement', defaultMeasurement, ';', true);
113
- fillSelect(0, 'box_margin_left_measurement', 'style_margin_left_measurement', defaultMeasurement, ';', true);
114
- fillSelect(0, 'box_margin_top_measurement', 'style_margin_top_measurement', defaultMeasurement, ';', true);
115
- fillSelect(0, 'box_margin_bottom_measurement', 'style_margin_bottom_measurement', defaultMeasurement, ';', true);
116
- fillSelect(0, 'box_margin_right_measurement', 'style_margin_right_measurement', defaultMeasurement, ';', true);
117
-
118
- fillSelect(0, 'border_style_top', 'style_border_style_top', defaultBorderStyle, ';', true);
119
- fillSelect(0, 'border_style_right', 'style_border_style_right', defaultBorderStyle, ';', true);
120
- fillSelect(0, 'border_style_bottom', 'style_border_style_bottom', defaultBorderStyle, ';', true);
121
- fillSelect(0, 'border_style_left', 'style_border_style_left', defaultBorderStyle, ';', true);
122
-
123
- fillSelect(0, 'border_width_top', 'style_border_width_top', defaultBorderWidth, ';', true);
124
- fillSelect(0, 'border_width_right', 'style_border_width_right', defaultBorderWidth, ';', true);
125
- fillSelect(0, 'border_width_bottom', 'style_border_width_bottom', defaultBorderWidth, ';', true);
126
- fillSelect(0, 'border_width_left', 'style_border_width_left', defaultBorderWidth, ';', true);
127
-
128
- fillSelect(0, 'border_width_top_measurement', 'style_border_width_top_measurement', defaultMeasurement, ';', true);
129
- fillSelect(0, 'border_width_right_measurement', 'style_border_width_right_measurement', defaultMeasurement, ';', true);
130
- fillSelect(0, 'border_width_bottom_measurement', 'style_border_width_bottom_measurement', defaultMeasurement, ';', true);
131
- fillSelect(0, 'border_width_left_measurement', 'style_border_width_left_measurement', defaultMeasurement, ';', true);
132
-
133
- fillSelect(0, 'list_type', 'style_list_type', defaultListType, ';', true);
134
- fillSelect(0, 'list_position', 'style_list_position', "inside;outside", ';', true);
135
-
136
- fillSelect(0, 'positioning_type', 'style_positioning_type', "absolute;relative;static", ';', true);
137
- fillSelect(0, 'positioning_visibility', 'style_positioning_visibility', "inherit;visible;hidden", ';', true);
138
-
139
- fillSelect(0, 'positioning_width_measurement', 'style_positioning_width_measurement', defaultMeasurement, ';', true);
140
- fillSelect(0, 'positioning_height_measurement', 'style_positioning_height_measurement', defaultMeasurement, ';', true);
141
- fillSelect(0, 'positioning_overflow', 'style_positioning_overflow', "visible;hidden;scroll;auto", ';', true);
142
-
143
- fillSelect(0, 'positioning_placement_top_measurement', 'style_positioning_placement_top_measurement', defaultMeasurement, ';', true);
144
- fillSelect(0, 'positioning_placement_right_measurement', 'style_positioning_placement_right_measurement', defaultMeasurement, ';', true);
145
- fillSelect(0, 'positioning_placement_bottom_measurement', 'style_positioning_placement_bottom_measurement', defaultMeasurement, ';', true);
146
- fillSelect(0, 'positioning_placement_left_measurement', 'style_positioning_placement_left_measurement', defaultMeasurement, ';', true);
147
-
148
- fillSelect(0, 'positioning_clip_top_measurement', 'style_positioning_clip_top_measurement', defaultMeasurement, ';', true);
149
- fillSelect(0, 'positioning_clip_right_measurement', 'style_positioning_clip_right_measurement', defaultMeasurement, ';', true);
150
- fillSelect(0, 'positioning_clip_bottom_measurement', 'style_positioning_clip_bottom_measurement', defaultMeasurement, ';', true);
151
- fillSelect(0, 'positioning_clip_left_measurement', 'style_positioning_clip_left_measurement', defaultMeasurement, ';', true);
152
-
153
- TinyMCE_EditableSelects.init();
154
- setupFormData();
155
- showDisabledControls();
156
- }
157
-
158
- function setupFormData() {
159
- var ce = document.getElementById('container'), f = document.forms[0], s, b, i;
160
-
161
- // Setup text fields
162
-
163
- selectByValue(f, 'text_font', ce.style.fontFamily, true, true);
164
- selectByValue(f, 'text_size', getNum(ce.style.fontSize), true, true);
165
- selectByValue(f, 'text_size_measurement', getMeasurement(ce.style.fontSize));
166
- selectByValue(f, 'text_weight', ce.style.fontWeight, true, true);
167
- selectByValue(f, 'text_style', ce.style.fontStyle, true, true);
168
- selectByValue(f, 'text_lineheight', getNum(ce.style.lineHeight), true, true);
169
- selectByValue(f, 'text_lineheight_measurement', getMeasurement(ce.style.lineHeight));
170
- selectByValue(f, 'text_case', ce.style.textTransform, true, true);
171
- selectByValue(f, 'text_variant', ce.style.fontVariant, true, true);
172
- f.text_color.value = tinyMCEPopup.editor.dom.toHex(ce.style.color);
173
- updateColor('text_color_pick', 'text_color');
174
- f.text_underline.checked = inStr(ce.style.textDecoration, 'underline');
175
- f.text_overline.checked = inStr(ce.style.textDecoration, 'overline');
176
- f.text_linethrough.checked = inStr(ce.style.textDecoration, 'line-through');
177
- f.text_blink.checked = inStr(ce.style.textDecoration, 'blink');
178
- f.text_none.checked = inStr(ce.style.textDecoration, 'none');
179
- updateTextDecorations();
180
-
181
- // Setup background fields
182
-
183
- f.background_color.value = tinyMCEPopup.editor.dom.toHex(ce.style.backgroundColor);
184
- updateColor('background_color_pick', 'background_color');
185
- f.background_image.value = ce.style.backgroundImage.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
186
- selectByValue(f, 'background_repeat', ce.style.backgroundRepeat, true, true);
187
- selectByValue(f, 'background_attachment', ce.style.backgroundAttachment, true, true);
188
- selectByValue(f, 'background_hpos', getNum(getVal(ce.style.backgroundPosition, 0)), true, true);
189
- selectByValue(f, 'background_hpos_measurement', getMeasurement(getVal(ce.style.backgroundPosition, 0)));
190
- selectByValue(f, 'background_vpos', getNum(getVal(ce.style.backgroundPosition, 1)), true, true);
191
- selectByValue(f, 'background_vpos_measurement', getMeasurement(getVal(ce.style.backgroundPosition, 1)));
192
-
193
- // Setup block fields
194
-
195
- selectByValue(f, 'block_wordspacing', getNum(ce.style.wordSpacing), true, true);
196
- selectByValue(f, 'block_wordspacing_measurement', getMeasurement(ce.style.wordSpacing));
197
- selectByValue(f, 'block_letterspacing', getNum(ce.style.letterSpacing), true, true);
198
- selectByValue(f, 'block_letterspacing_measurement', getMeasurement(ce.style.letterSpacing));
199
- selectByValue(f, 'block_vertical_alignment', ce.style.verticalAlign, true, true);
200
- selectByValue(f, 'block_text_align', ce.style.textAlign, true, true);
201
- f.block_text_indent.value = getNum(ce.style.textIndent);
202
- selectByValue(f, 'block_text_indent_measurement', getMeasurement(ce.style.textIndent));
203
- selectByValue(f, 'block_whitespace', ce.style.whiteSpace, true, true);
204
- selectByValue(f, 'block_display', ce.style.display, true, true);
205
-
206
- // Setup box fields
207
-
208
- f.box_width.value = getNum(ce.style.width);
209
- selectByValue(f, 'box_width_measurement', getMeasurement(ce.style.width));
210
-
211
- f.box_height.value = getNum(ce.style.height);
212
- selectByValue(f, 'box_height_measurement', getMeasurement(ce.style.height));
213
- selectByValue(f, 'box_float', ce.style.cssFloat || ce.style.styleFloat, true, true);
214
-
215
- selectByValue(f, 'box_clear', ce.style.clear, true, true);
216
-
217
- setupBox(f, ce, 'box_padding', 'padding', '');
218
- setupBox(f, ce, 'box_margin', 'margin', '');
219
-
220
- // Setup border fields
221
-
222
- setupBox(f, ce, 'border_style', 'border', 'Style');
223
- setupBox(f, ce, 'border_width', 'border', 'Width');
224
- setupBox(f, ce, 'border_color', 'border', 'Color');
225
-
226
- updateColor('border_color_top_pick', 'border_color_top');
227
- updateColor('border_color_right_pick', 'border_color_right');
228
- updateColor('border_color_bottom_pick', 'border_color_bottom');
229
- updateColor('border_color_left_pick', 'border_color_left');
230
-
231
- f.elements.border_color_top.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_top.value);
232
- f.elements.border_color_right.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_right.value);
233
- f.elements.border_color_bottom.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_bottom.value);
234
- f.elements.border_color_left.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_left.value);
235
-
236
- // Setup list fields
237
-
238
- selectByValue(f, 'list_type', ce.style.listStyleType, true, true);
239
- selectByValue(f, 'list_position', ce.style.listStylePosition, true, true);
240
- f.list_bullet_image.value = ce.style.listStyleImage.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
241
-
242
- // Setup box fields
243
-
244
- selectByValue(f, 'positioning_type', ce.style.position, true, true);
245
- selectByValue(f, 'positioning_visibility', ce.style.visibility, true, true);
246
- selectByValue(f, 'positioning_overflow', ce.style.overflow, true, true);
247
- f.positioning_zindex.value = ce.style.zIndex ? ce.style.zIndex : "";
248
-
249
- f.positioning_width.value = getNum(ce.style.width);
250
- selectByValue(f, 'positioning_width_measurement', getMeasurement(ce.style.width));
251
-
252
- f.positioning_height.value = getNum(ce.style.height);
253
- selectByValue(f, 'positioning_height_measurement', getMeasurement(ce.style.height));
254
-
255
- setupBox(f, ce, 'positioning_placement', '', '', ['top', 'right', 'bottom', 'left']);
256
-
257
- s = ce.style.clip.replace(new RegExp("rect\\('?([^']*)'?\\)", 'gi'), "$1");
258
- s = s.replace(/,/g, ' ');
259
-
260
- if (!hasEqualValues([getVal(s, 0), getVal(s, 1), getVal(s, 2), getVal(s, 3)])) {
261
- f.positioning_clip_top.value = getNum(getVal(s, 0));
262
- selectByValue(f, 'positioning_clip_top_measurement', getMeasurement(getVal(s, 0)));
263
- f.positioning_clip_right.value = getNum(getVal(s, 1));
264
- selectByValue(f, 'positioning_clip_right_measurement', getMeasurement(getVal(s, 1)));
265
- f.positioning_clip_bottom.value = getNum(getVal(s, 2));
266
- selectByValue(f, 'positioning_clip_bottom_measurement', getMeasurement(getVal(s, 2)));
267
- f.positioning_clip_left.value = getNum(getVal(s, 3));
268
- selectByValue(f, 'positioning_clip_left_measurement', getMeasurement(getVal(s, 3)));
269
- } else {
270
- f.positioning_clip_top.value = getNum(getVal(s, 0));
271
- selectByValue(f, 'positioning_clip_top_measurement', getMeasurement(getVal(s, 0)));
272
- f.positioning_clip_right.value = f.positioning_clip_bottom.value = f.positioning_clip_left.value;
273
- }
274
-
275
- // setupBox(f, ce, '', 'border', 'Color');
276
- }
277
-
278
- function getMeasurement(s) {
279
- return s.replace(/^([0-9.]+)(.*)$/, "$2");
280
- }
281
-
282
- function getNum(s) {
283
- if (new RegExp('^(?:[0-9.]+)(?:[a-z%]+)$', 'gi').test(s))
284
- return s.replace(/[^0-9.]/g, '');
285
-
286
- return s;
287
- }
288
-
289
- function inStr(s, n) {
290
- return new RegExp(n, 'gi').test(s);
291
- }
292
-
293
- function getVal(s, i) {
294
- var a = s.split(' ');
295
-
296
- if (a.length > 1)
297
- return a[i];
298
-
299
- return "";
300
- }
301
-
302
- function setValue(f, n, v) {
303
- if (f.elements[n].type == "text")
304
- f.elements[n].value = v;
305
- else
306
- selectByValue(f, n, v, true, true);
307
- }
308
-
309
- function setupBox(f, ce, fp, pr, sf, b) {
310
- if (typeof(b) == "undefined")
311
- b = ['Top', 'Right', 'Bottom', 'Left'];
312
-
313
- if (isSame(ce, pr, sf, b)) {
314
- f.elements[fp + "_same"].checked = true;
315
-
316
- setValue(f, fp + "_top", getNum(ce.style[pr + b[0] + sf]));
317
- f.elements[fp + "_top"].disabled = false;
318
-
319
- f.elements[fp + "_right"].value = "";
320
- f.elements[fp + "_right"].disabled = true;
321
- f.elements[fp + "_bottom"].value = "";
322
- f.elements[fp + "_bottom"].disabled = true;
323
- f.elements[fp + "_left"].value = "";
324
- f.elements[fp + "_left"].disabled = true;
325
-
326
- if (f.elements[fp + "_top_measurement"]) {
327
- selectByValue(f, fp + '_top_measurement', getMeasurement(ce.style[pr + b[0] + sf]));
328
- f.elements[fp + "_left_measurement"].disabled = true;
329
- f.elements[fp + "_bottom_measurement"].disabled = true;
330
- f.elements[fp + "_right_measurement"].disabled = true;
331
- }
332
- } else {
333
- f.elements[fp + "_same"].checked = false;
334
-
335
- setValue(f, fp + "_top", getNum(ce.style[pr + b[0] + sf]));
336
- f.elements[fp + "_top"].disabled = false;
337
-
338
- setValue(f, fp + "_right", getNum(ce.style[pr + b[1] + sf]));
339
- f.elements[fp + "_right"].disabled = false;
340
-
341
- setValue(f, fp + "_bottom", getNum(ce.style[pr + b[2] + sf]));
342
- f.elements[fp + "_bottom"].disabled = false;
343
-
344
- setValue(f, fp + "_left", getNum(ce.style[pr + b[3] + sf]));
345
- f.elements[fp + "_left"].disabled = false;
346
-
347
- if (f.elements[fp + "_top_measurement"]) {
348
- selectByValue(f, fp + '_top_measurement', getMeasurement(ce.style[pr + b[0] + sf]));
349
- selectByValue(f, fp + '_right_measurement', getMeasurement(ce.style[pr + b[1] + sf]));
350
- selectByValue(f, fp + '_bottom_measurement', getMeasurement(ce.style[pr + b[2] + sf]));
351
- selectByValue(f, fp + '_left_measurement', getMeasurement(ce.style[pr + b[3] + sf]));
352
- f.elements[fp + "_left_measurement"].disabled = false;
353
- f.elements[fp + "_bottom_measurement"].disabled = false;
354
- f.elements[fp + "_right_measurement"].disabled = false;
355
- }
356
- }
357
- }
358
-
359
- function isSame(e, pr, sf, b) {
360
- var a = [], i, x;
361
-
362
- if (typeof(b) == "undefined")
363
- b = ['Top', 'Right', 'Bottom', 'Left'];
364
-
365
- if (typeof(sf) == "undefined" || sf == null)
366
- sf = "";
367
-
368
- a[0] = e.style[pr + b[0] + sf];
369
- a[1] = e.style[pr + b[1] + sf];
370
- a[2] = e.style[pr + b[2] + sf];
371
- a[3] = e.style[pr + b[3] + sf];
372
-
373
- for (i=0; i<a.length; i++) {
374
- if (a[i] == null)
375
- return false;
376
-
377
- for (x=0; x<a.length; x++) {
378
- if (a[x] != a[i])
379
- return false;
380
- }
381
- }
382
-
383
- return true;
384
- };
385
-
386
- function hasEqualValues(a) {
387
- var i, x;
388
-
389
- for (i=0; i<a.length; i++) {
390
- if (a[i] == null)
391
- return false;
392
-
393
- for (x=0; x<a.length; x++) {
394
- if (a[x] != a[i])
395
- return false;
396
- }
397
- }
398
-
399
- return true;
400
- }
401
-
402
- function toggleApplyAction() {
403
- applyActionIsInsert = ! applyActionIsInsert;
404
- }
405
-
406
- function applyAction() {
407
- var ce = document.getElementById('container'), ed = tinyMCEPopup.editor;
408
-
409
- generateCSS();
410
-
411
- tinyMCEPopup.restoreSelection();
412
-
413
- var newStyles = tinyMCEPopup.editor.dom.parseStyle(ce.style.cssText);
414
-
415
- if (applyActionIsInsert) {
416
- ed.formatter.register('plugin_style', {
417
- inline: 'span', styles: existingStyles
418
- });
419
- ed.formatter.remove('plugin_style');
420
-
421
- ed.formatter.register('plugin_style', {
422
- inline: 'span', styles: newStyles
423
- });
424
- ed.formatter.apply('plugin_style');
425
- } else {
426
- var nodes;
427
-
428
- if (tinyMCEPopup.getWindowArg('applyStyleToBlocks')) {
429
- nodes = ed.selection.getSelectedBlocks();
430
- }
431
- else {
432
- nodes = ed.selection.getNode();
433
- }
434
-
435
- ed.dom.setAttrib(nodes, 'style', tinyMCEPopup.editor.dom.serializeStyle(newStyles));
436
- }
437
- }
438
-
439
- function updateAction() {
440
- applyAction();
441
- tinyMCEPopup.close();
442
- }
443
-
444
- function generateCSS() {
445
- var ce = document.getElementById('container'), f = document.forms[0], num = new RegExp('[0-9]+', 'g'), s, t;
446
-
447
- ce.style.cssText = "";
448
-
449
- // Build text styles
450
- ce.style.fontFamily = f.text_font.value;
451
- ce.style.fontSize = f.text_size.value + (isNum(f.text_size.value) ? (f.text_size_measurement.value || 'px') : "");
452
- ce.style.fontStyle = f.text_style.value;
453
- ce.style.lineHeight = f.text_lineheight.value + (isNum(f.text_lineheight.value) ? f.text_lineheight_measurement.value : "");
454
- ce.style.textTransform = f.text_case.value;
455
- ce.style.fontWeight = f.text_weight.value;
456
- ce.style.fontVariant = f.text_variant.value;
457
- ce.style.color = f.text_color.value;
458
-
459
- s = "";
460
- s += f.text_underline.checked ? " underline" : "";
461
- s += f.text_overline.checked ? " overline" : "";
462
- s += f.text_linethrough.checked ? " line-through" : "";
463
- s += f.text_blink.checked ? " blink" : "";
464
- s = s.length > 0 ? s.substring(1) : s;
465
-
466
- if (f.text_none.checked)
467
- s = "none";
468
-
469
- ce.style.textDecoration = s;
470
-
471
- // Build background styles
472
-
473
- ce.style.backgroundColor = f.background_color.value;
474
- ce.style.backgroundImage = f.background_image.value != "" ? "url(" + f.background_image.value + ")" : "";
475
- ce.style.backgroundRepeat = f.background_repeat.value;
476
- ce.style.backgroundAttachment = f.background_attachment.value;
477
-
478
- if (f.background_hpos.value != "") {
479
- s = "";
480
- s += f.background_hpos.value + (isNum(f.background_hpos.value) ? f.background_hpos_measurement.value : "") + " ";
481
- s += f.background_vpos.value + (isNum(f.background_vpos.value) ? f.background_vpos_measurement.value : "");
482
- ce.style.backgroundPosition = s;
483
- }
484
-
485
- // Build block styles
486
-
487
- ce.style.wordSpacing = f.block_wordspacing.value + (isNum(f.block_wordspacing.value) ? f.block_wordspacing_measurement.value : "");
488
- ce.style.letterSpacing = f.block_letterspacing.value + (isNum(f.block_letterspacing.value) ? f.block_letterspacing_measurement.value : "");
489
- ce.style.verticalAlign = f.block_vertical_alignment.value;
490
- ce.style.textAlign = f.block_text_align.value;
491
- ce.style.textIndent = f.block_text_indent.value + (isNum(f.block_text_indent.value) ? f.block_text_indent_measurement.value : "");
492
- ce.style.whiteSpace = f.block_whitespace.value;
493
- ce.style.display = f.block_display.value;
494
-
495
- // Build box styles
496
-
497
- ce.style.width = f.box_width.value + (isNum(f.box_width.value) ? f.box_width_measurement.value : "");
498
- ce.style.height = f.box_height.value + (isNum(f.box_height.value) ? f.box_height_measurement.value : "");
499
- ce.style.styleFloat = f.box_float.value;
500
- ce.style.cssFloat = f.box_float.value;
501
-
502
- ce.style.clear = f.box_clear.value;
503
-
504
- if (!f.box_padding_same.checked) {
505
- ce.style.paddingTop = f.box_padding_top.value + (isNum(f.box_padding_top.value) ? f.box_padding_top_measurement.value : "");
506
- ce.style.paddingRight = f.box_padding_right.value + (isNum(f.box_padding_right.value) ? f.box_padding_right_measurement.value : "");
507
- ce.style.paddingBottom = f.box_padding_bottom.value + (isNum(f.box_padding_bottom.value) ? f.box_padding_bottom_measurement.value : "");
508
- ce.style.paddingLeft = f.box_padding_left.value + (isNum(f.box_padding_left.value) ? f.box_padding_left_measurement.value : "");
509
- } else
510
- ce.style.padding = f.box_padding_top.value + (isNum(f.box_padding_top.value) ? f.box_padding_top_measurement.value : "");
511
-
512
- if (!f.box_margin_same.checked) {
513
- ce.style.marginTop = f.box_margin_top.value + (isNum(f.box_margin_top.value) ? f.box_margin_top_measurement.value : "");
514
- ce.style.marginRight = f.box_margin_right.value + (isNum(f.box_margin_right.value) ? f.box_margin_right_measurement.value : "");
515
- ce.style.marginBottom = f.box_margin_bottom.value + (isNum(f.box_margin_bottom.value) ? f.box_margin_bottom_measurement.value : "");
516
- ce.style.marginLeft = f.box_margin_left.value + (isNum(f.box_margin_left.value) ? f.box_margin_left_measurement.value : "");
517
- } else
518
- ce.style.margin = f.box_margin_top.value + (isNum(f.box_margin_top.value) ? f.box_margin_top_measurement.value : "");
519
-
520
- // Build border styles
521
-
522
- if (!f.border_style_same.checked) {
523
- ce.style.borderTopStyle = f.border_style_top.value;
524
- ce.style.borderRightStyle = f.border_style_right.value;
525
- ce.style.borderBottomStyle = f.border_style_bottom.value;
526
- ce.style.borderLeftStyle = f.border_style_left.value;
527
- } else
528
- ce.style.borderStyle = f.border_style_top.value;
529
-
530
- if (!f.border_width_same.checked) {
531
- ce.style.borderTopWidth = f.border_width_top.value + (isNum(f.border_width_top.value) ? f.border_width_top_measurement.value : "");
532
- ce.style.borderRightWidth = f.border_width_right.value + (isNum(f.border_width_right.value) ? f.border_width_right_measurement.value : "");
533
- ce.style.borderBottomWidth = f.border_width_bottom.value + (isNum(f.border_width_bottom.value) ? f.border_width_bottom_measurement.value : "");
534
- ce.style.borderLeftWidth = f.border_width_left.value + (isNum(f.border_width_left.value) ? f.border_width_left_measurement.value : "");
535
- } else
536
- ce.style.borderWidth = f.border_width_top.value + (isNum(f.border_width_top.value) ? f.border_width_top_measurement.value : "");
537
-
538
- if (!f.border_color_same.checked) {
539
- ce.style.borderTopColor = f.border_color_top.value;
540
- ce.style.borderRightColor = f.border_color_right.value;
541
- ce.style.borderBottomColor = f.border_color_bottom.value;
542
- ce.style.borderLeftColor = f.border_color_left.value;
543
- } else
544
- ce.style.borderColor = f.border_color_top.value;
545
-
546
- // Build list styles
547
-
548
- ce.style.listStyleType = f.list_type.value;
549
- ce.style.listStylePosition = f.list_position.value;
550
- ce.style.listStyleImage = f.list_bullet_image.value != "" ? "url(" + f.list_bullet_image.value + ")" : "";
551
-
552
- // Build positioning styles
553
-
554
- ce.style.position = f.positioning_type.value;
555
- ce.style.visibility = f.positioning_visibility.value;
556
-
557
- if (ce.style.width == "")
558
- ce.style.width = f.positioning_width.value + (isNum(f.positioning_width.value) ? f.positioning_width_measurement.value : "");
559
-
560
- if (ce.style.height == "")
561
- ce.style.height = f.positioning_height.value + (isNum(f.positioning_height.value) ? f.positioning_height_measurement.value : "");
562
-
563
- ce.style.zIndex = f.positioning_zindex.value;
564
- ce.style.overflow = f.positioning_overflow.value;
565
-
566
- if (!f.positioning_placement_same.checked) {
567
- ce.style.top = f.positioning_placement_top.value + (isNum(f.positioning_placement_top.value) ? f.positioning_placement_top_measurement.value : "");
568
- ce.style.right = f.positioning_placement_right.value + (isNum(f.positioning_placement_right.value) ? f.positioning_placement_right_measurement.value : "");
569
- ce.style.bottom = f.positioning_placement_bottom.value + (isNum(f.positioning_placement_bottom.value) ? f.positioning_placement_bottom_measurement.value : "");
570
- ce.style.left = f.positioning_placement_left.value + (isNum(f.positioning_placement_left.value) ? f.positioning_placement_left_measurement.value : "");
571
- } else {
572
- s = f.positioning_placement_top.value + (isNum(f.positioning_placement_top.value) ? f.positioning_placement_top_measurement.value : "");
573
- ce.style.top = s;
574
- ce.style.right = s;
575
- ce.style.bottom = s;
576
- ce.style.left = s;
577
- }
578
-
579
- if (!f.positioning_clip_same.checked) {
580
- s = "rect(";
581
- s += (isNum(f.positioning_clip_top.value) ? f.positioning_clip_top.value + f.positioning_clip_top_measurement.value : "auto") + " ";
582
- s += (isNum(f.positioning_clip_right.value) ? f.positioning_clip_right.value + f.positioning_clip_right_measurement.value : "auto") + " ";
583
- s += (isNum(f.positioning_clip_bottom.value) ? f.positioning_clip_bottom.value + f.positioning_clip_bottom_measurement.value : "auto") + " ";
584
- s += (isNum(f.positioning_clip_left.value) ? f.positioning_clip_left.value + f.positioning_clip_left_measurement.value : "auto");
585
- s += ")";
586
-
587
- if (s != "rect(auto auto auto auto)")
588
- ce.style.clip = s;
589
- } else {
590
- s = "rect(";
591
- t = isNum(f.positioning_clip_top.value) ? f.positioning_clip_top.value + f.positioning_clip_top_measurement.value : "auto";
592
- s += t + " ";
593
- s += t + " ";
594
- s += t + " ";
595
- s += t + ")";
596
-
597
- if (s != "rect(auto auto auto auto)")
598
- ce.style.clip = s;
599
- }
600
-
601
- ce.style.cssText = ce.style.cssText;
602
- }
603
-
604
- function isNum(s) {
605
- return new RegExp('[0-9]+', 'g').test(s);
606
- }
607
-
608
- function showDisabledControls() {
609
- var f = document.forms, i, a;
610
-
611
- for (i=0; i<f.length; i++) {
612
- for (a=0; a<f[i].elements.length; a++) {
613
- if (f[i].elements[a].disabled)
614
- tinyMCEPopup.editor.dom.addClass(f[i].elements[a], "disabled");
615
- else
616
- tinyMCEPopup.editor.dom.removeClass(f[i].elements[a], "disabled");
617
- }
618
- }
619
- }
620
-
621
- function fillSelect(f, s, param, dval, sep, em) {
622
- var i, ar, p, se;
623
-
624
- f = document.forms[f];
625
- sep = typeof(sep) == "undefined" ? ";" : sep;
626
-
627
- if (em)
628
- addSelectValue(f, s, "", "");
629
-
630
- ar = tinyMCEPopup.getParam(param, dval).split(sep);
631
- for (i=0; i<ar.length; i++) {
632
- se = false;
633
-
634
- if (ar[i].charAt(0) == '+') {
635
- ar[i] = ar[i].substring(1);
636
- se = true;
637
- }
638
-
639
- p = ar[i].split('=');
640
-
641
- if (p.length > 1) {
642
- addSelectValue(f, s, p[0], p[1]);
643
-
644
- if (se)
645
- selectByValue(f, s, p[1]);
646
- } else {
647
- addSelectValue(f, s, p[0], p[0]);
648
-
649
- if (se)
650
- selectByValue(f, s, p[0]);
651
- }
652
- }
653
- }
654
-
655
- function toggleSame(ce, pre) {
656
- var el = document.forms[0].elements, i;
657
-
658
- if (ce.checked) {
659
- el[pre + "_top"].disabled = false;
660
- el[pre + "_right"].disabled = true;
661
- el[pre + "_bottom"].disabled = true;
662
- el[pre + "_left"].disabled = true;
663
-
664
- if (el[pre + "_top_measurement"]) {
665
- el[pre + "_top_measurement"].disabled = false;
666
- el[pre + "_right_measurement"].disabled = true;
667
- el[pre + "_bottom_measurement"].disabled = true;
668
- el[pre + "_left_measurement"].disabled = true;
669
- }
670
- } else {
671
- el[pre + "_top"].disabled = false;
672
- el[pre + "_right"].disabled = false;
673
- el[pre + "_bottom"].disabled = false;
674
- el[pre + "_left"].disabled = false;
675
-
676
- if (el[pre + "_top_measurement"]) {
677
- el[pre + "_top_measurement"].disabled = false;
678
- el[pre + "_right_measurement"].disabled = false;
679
- el[pre + "_bottom_measurement"].disabled = false;
680
- el[pre + "_left_measurement"].disabled = false;
681
- }
682
- }
683
-
684
- showDisabledControls();
685
- }
686
-
687
- function synch(fr, to) {
688
- var f = document.forms[0];
689
-
690
- f.elements[to].value = f.elements[fr].value;
691
-
692
- if (f.elements[fr + "_measurement"])
693
- selectByValue(f, to + "_measurement", f.elements[fr + "_measurement"].value);
694
- }
695
-
696
- function updateTextDecorations(){
697
- var el = document.forms[0].elements;
698
-
699
- var textDecorations = ["text_underline", "text_overline", "text_linethrough", "text_blink"];
700
- var noneChecked = el["text_none"].checked;
701
- tinymce.each(textDecorations, function(id) {
702
- el[id].disabled = noneChecked;
703
- if (noneChecked) {
704
- el[id].checked = false;
705
- }
706
- });
707
- }
708
-
709
- tinyMCEPopup.onInit.add(init);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/style/langs/de_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('de.style_dlg',{"text_lineheight":"Zeilenh\u00f6he","text_variant":"Variante","text_style":"Stil","text_weight":"Dicke","text_size":"Gr\u00f6\u00dfe","text_font":"Schriftart","text_props":"Text","positioning_tab":"Positionierung","list_tab":"Liste","border_tab":"Rahmen","box_tab":"Box","block_tab":"Block","background_tab":"Hintergrund","text_tab":"Text",apply:"\u00dcbernehmen",title:"CSS-Styles bearbeiten",clip:"Ausschnitt",placement:"Platzierung",overflow:"Verhalten bei \u00dcbergr\u00f6\u00dfe",zindex:"Z-Wert",visibility:"Sichtbar","positioning_type":"Art der Positionierung",position:"Positionierung","bullet_image":"Listenpunkt-Grafik","list_type":"Listenpunkt-Art",color:"Textfarbe",height:"H\u00f6he",width:"Breite",style:"Format",margin:"\u00c4u\u00dferer Abstand",left:"Links",bottom:"Unten",right:"Rechts",top:"Oben",same:"Alle gleich",padding:"Innerer Abstand","box_clear":"Umflie\u00dfung verhindern","box_float":"Umflie\u00dfung","box_height":"H\u00f6he","box_width":"Breite","block_display":"Umbruchverhalten","block_whitespace":"Automatischer Umbruch","block_text_indent":"Einr\u00fcckung","block_text_align":"Ausrichtung","block_vertical_alignment":"Vertikale Ausrichtung","block_letterspacing":"Buchstabenabstand","block_wordspacing":"Wortabstand","background_vpos":"Position Y","background_hpos":"Position X","background_attachment":"Wasserzeicheneffekt","background_repeat":"Wiederholung","background_image":"Hintergrundbild","background_color":"Hintergrundfarbe","text_none":"keine","text_blink":"blinkend","text_case":"Schreibung","text_striketrough":"durchgestrichen","text_underline":"unterstrichen","text_overline":"\u00fcberstrichen","text_decoration":"Gestaltung","text_color":"Farbe",text:"Text",background:"Hintergrund",block:"Block",box:"Box",border:"Rahmen",list:"Liste",toggle_insert_span:"Insert span at selection"});
 
mce/style/langs/en_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('en.style_dlg',{"text_lineheight":"Line Height","text_variant":"Variant","text_style":"Style","text_weight":"Weight","text_size":"Size","text_font":"Font","text_props":"Text","positioning_tab":"Positioning","list_tab":"List","border_tab":"Border","box_tab":"Box","block_tab":"Block","background_tab":"Background","text_tab":"Text",apply:"Apply",toggle_insert_span:"Insert span at selection",title:"Edit CSS Style",clip:"Clip",placement:"Placement",overflow:"Overflow",zindex:"Z-index",visibility:"Visibility","positioning_type":"Type",position:"Position","bullet_image":"Bullet Image","list_type":"Type",color:"Color",height:"Height",width:"Width",style:"Style",margin:"Margin",left:"Left",bottom:"Bottom",right:"Right",top:"Top",same:"Same for All",padding:"Padding","box_clear":"Clear","box_float":"Float","box_height":"Height","box_width":"Width","block_display":"Display","block_whitespace":"Whitespace","block_text_indent":"Text Indent","block_text_align":"Text Align","block_vertical_alignment":"Vertical Alignment","block_letterspacing":"Letter Spacing","block_wordspacing":"Word Spacing","background_vpos":"Vertical Position","background_hpos":"Horizontal Position","background_attachment":"Attachment","background_repeat":"Repeat","background_image":"Background Image","background_color":"Background Color","text_none":"None","text_blink":"Blink","text_case":"Case","text_striketrough":"Strikethrough","text_underline":"Underline","text_overline":"Overline","text_decoration":"Decoration","text_color":"Color",text:"Text",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"});
 
mce/style/langs/es_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('es.style_dlg',{"text_lineheight":"Ancho de la fila","text_variant":"Variante","text_style":"Estilo","text_weight":"Peso","text_size":"Tama\u00f1o","text_font":"Fuente","text_props":"Texto","positioning_tab":"Posicionamiento","list_tab":"Lista","border_tab":"Borde","box_tab":"Caja","block_tab":"Bloque","background_tab":"Fondo","text_tab":"Texto",apply:"Aplicar",title:"Editar Estilo CSS",clip:"Clip",placement:"Placement",overflow:"Overflow",zindex:"Z-index",visibility:"Visibilidad","positioning_type":"Tipo",position:"Posici\u00f3n","bullet_image":"Imagen de la vi\u00f1eta","list_type":"Tipo",color:"Color",height:"Alto",width:"Ancho",style:"Estilo",margin:"Margen",left:"Izquierda",bottom:"Inferior",right:"Derecha",top:"Superior",same:"Lo mismo en todos",padding:"Padding","box_clear":"Clear","box_float":"Float","box_height":"Alto","box_width":"Ancho","block_display":"Display","block_whitespace":"Espacio en blanco","block_text_indent":"Sangr\u00eda","block_text_align":"Alineaci\u00f3n del texto","block_vertical_alignment":"Alineaci\u00f3n vertical","block_letterspacing":"Espacio entre letra","block_wordspacing":"Espacio entre palabra","background_vpos":"Posici\u00f3n vertical","background_hpos":"Posici\u00f3n horizontal","background_attachment":"Adjunto","background_repeat":"Repetici\u00f3n","background_image":"Imagen de fondo","background_color":"Color de fondo","text_none":"Ninguno","text_blink":"Parpadeo","text_case":"Min\u00fas./May\u00fas.","text_striketrough":"Tachado","text_underline":"Subrayado","text_overline":"Subrayado superior","text_decoration":"Decorativos","text_color":"Color",text:"Texto",background:"Fondo",block:"Bloque",box:"Caja",border:"Borde",list:"Lista",toggle_insert_span:"Insert span at selection"});
 
mce/style/langs/fr_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('fr.style_dlg',{"text_lineheight":"Hauteur de ligne","text_variant":"Variante","text_style":"Style","text_weight":"Gras","text_size":"Taille","text_font":"Police","text_props":"Texte","positioning_tab":"Positionnement","list_tab":"Liste","border_tab":"Bordure","box_tab":"Bo\u00eete","block_tab":"Bloc","background_tab":"Fond","text_tab":"Texte",apply:"Appliquer",title:"\u00c9diter la feuille de style",clip:"Clip",placement:"Placement",overflow:"D\u00e9bordement",zindex:"Z-index",visibility:"Visibilit\u00e9","positioning_type":"Type",position:"Position","bullet_image":"Image de puce","list_type":"Type",color:"Couleur",height:"Hauteur",width:"Largeur",style:"Style",margin:"Marge",left:"Gauche",bottom:"Bas",right:"Droit",top:"Haut",same:"Identique pour tous",padding:"Espacement","box_clear":"Vider","box_float":"Flottant","box_height":"Hauteur","box_width":"Largeur","block_display":"Affichage","block_whitespace":"Fin de ligne","block_text_indent":"Indentation du texte","block_text_align":"Alignement du texte","block_vertical_alignment":"Alignement vertical","block_letterspacing":"Espacement des lettres","block_wordspacing":"Espacement des mots ","background_vpos":"Position verticale","background_hpos":"Position horizontale","background_attachment":"Attachement","background_repeat":"R\u00e9p\u00e9ter","background_image":"Image de fond","background_color":"Couleur de fond","text_none":"aucun","text_blink":"clignotant","text_case":"Casse","text_striketrough":"barr\u00e9","text_underline":"soulign\u00e9","text_overline":"ligne au-dessus","text_decoration":"D\u00e9coration","text_color":"Couleur",text:"Texte",background:"Fond",block:"Bloc",box:"Bo\u00eete",border:"Bordure",list:"Liste",toggle_insert_span:"Insert span at selection"});
 
mce/style/langs/it_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('it.style_dlg',{"text_lineheight":"Altezza linea","text_variant":"Variante","text_style":"Stile","text_weight":"Spessore","text_size":"Dimensione","text_font":"Carattere","text_props":"Testo","positioning_tab":"Posizionamento","list_tab":"Liste","border_tab":"Bordi","box_tab":"Contenitore","block_tab":"Blocco","background_tab":"Sfondo","text_tab":"Testo",apply:"Applica",title:"Modifica stile CSS",clip:"Clip",placement:"Piazzamento",overflow:"Overflow",zindex:"Z-index",visibility:"Visibilit\u00e0","positioning_type":"Tipo",position:"Posizione","bullet_image":"Immagine Punto","list_type":"Tipo",color:"Colore",height:"Altezza",width:"Larghezza",style:"Stile",margin:"Margine",left:"Sinistro",bottom:"Inferiore",right:"Destro",top:"Superiore",same:"Uguale per tutti",padding:"Spazio dal bordo","box_clear":"Pulito","box_float":"Fluttuante","box_height":"Altezza","box_width":"Larghezza","block_display":"Visualizzazione","block_whitespace":"Whitespace","block_text_indent":"Indentazione testo","block_text_align":"Allineamento testo","block_vertical_alignment":"Allineamento verticale","block_letterspacing":"Spaziatura caratteri","block_wordspacing":"Spaziatura parole","background_vpos":"Posizione verticale","background_hpos":"Posizione orizzontale","background_attachment":"Allegato","background_repeat":"Repetizione","background_image":"Immagine sfondo","background_color":"Colore sfondo","text_none":"nessuna","text_blink":"lampeggiante","text_case":"Tipo","text_striketrough":"barrato","text_underline":"sottolineato","text_overline":"sopralineato","text_decoration":"Decorazione","text_color":"Colore",text:"Testo",background:"Sfondo",block:"Blocco",box:"Box",border:"Bordo",list:"Lista",toggle_insert_span:"Insert span at selection"});
 
mce/style/langs/ja_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('ja.style_dlg',{"text_lineheight":"\u884c\u306e\u9ad8\u3055","text_variant":"\u5909\u5f62","text_style":"\u30b9\u30bf\u30a4\u30eb","text_weight":"\u592a\u3055","text_size":"\u5927\u304d\u3055","text_font":"\u30d5\u30a9\u30f3\u30c8","text_props":"\u30c6\u30ad\u30b9\u30c8","positioning_tab":"\u4f4d\u7f6e","list_tab":"\u7b87\u6761\u66f8\u304d","border_tab":"\u67a0\u7dda","box_tab":"\u30dc\u30c3\u30af\u30b9","block_tab":"\u30d6\u30ed\u30c3\u30af","background_tab":"\u80cc\u666f","text_tab":"\u6587\u5b57",apply:"\u9069\u7528",title:"CSS\u306e\u30b9\u30bf\u30a4\u30eb\u3092\u7de8\u96c6",clip:"\u5207\u308a\u629c\u304d",placement:"\u914d\u7f6e",overflow:"\u30aa\u30fc\u30d0\u30fc\u30d5\u30ed\u30fc",zindex:"Z-index",visibility:"\u53ef\u8996\u6027","positioning_type":"\u914d\u7f6e\u65b9\u6cd5",position:"\u8868\u793a\u4f4d\u7f6e","bullet_image":"\u884c\u982d\u6587\u5b57","list_type":"\u7b87\u6761\u66f8\u304d\u306e\u7a2e\u985e",color:"\u8272",height:"\u9ad8\u3055",width:"\u5e45",style:"\u30b9\u30bf\u30a4\u30eb",margin:"\u30de\u30fc\u30b8\u30f3",left:"\u5de6",bottom:"\u4e0b",right:"\u53f3",top:"\u4e0a",same:"\u3059\u3079\u3066\u540c\u3058",padding:"\u30d1\u30c7\u30a3\u30f3\u30b0","box_clear":"\u56de\u308a\u8fbc\u307f\u89e3\u9664","box_float":"\u56de\u308a\u8fbc\u307f","box_height":"\u9ad8\u3055","box_width":"\u5e45","block_display":"\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4","block_whitespace":"\u7a7a\u767d\u6587\u5b57","block_text_indent":"\u30c6\u30ad\u30b9\u30c8\u306e\u5b57\u4e0b\u3052","block_text_align":"\u30c6\u30ad\u30b9\u30c8\u306e\u6c34\u5e73\u914d\u7f6e","block_vertical_alignment":"\u5782\u76f4\u914d\u7f6e","block_letterspacing":"\u6587\u5b57\u9593\u9694","block_wordspacing":"\u5358\u8a9e\u9593\u9694","background_vpos":"\u5782\u76f4\u4f4d\u7f6e","background_hpos":"\u6c34\u5e73\u4f4d\u7f6e","background_attachment":"\u6dfb\u4ed8","background_repeat":"\u7e70\u308a\u8fd4\u3057","background_image":"\u80cc\u666f\u753b\u50cf","background_color":"\u80cc\u666f\u8272","text_none":"\u306a\u3057","text_blink":"\u70b9\u6ec5","text_case":"\u5927\u6587\u5b57/\u5c0f\u6587\u5b57","text_striketrough":"\u6253\u6d88\u3057\u7dda","text_underline":"\u4e0b\u7dda","text_overline":"\u4e0a\u7dda","text_decoration":"\u88c5\u98fe","text_color":"\u8272",text:"\u6587\u5b57",background:"\u80cc\u666f",block:"\u30d6\u30ed\u30c3\u30af",box:"\u30dc\u30c3\u30af\u30b9",border:"\u67a0\u7dda",list:"\u7b87\u6761\u66f8\u304d",toggle_insert_span:"Insert span at selection"});
 
mce/style/langs/langs.php DELETED
@@ -1,12 +0,0 @@
1
- <?php
2
- $lang_file = dirname(__FILE__) . '/' . $mce_locale . '_dlg.js';
3
-
4
- if ( ! is_file( $lang_file ) && defined( 'TINYMCE_ADVANCED_LANGUAGES_PATH' ) )
5
- $lang_file = TINYMCE_ADVANCED_LANGUAGES_PATH . 'style/langs/' . $mce_locale . '_dlg.js';
6
-
7
- if ( is_file( $lang_file ) && is_readable( $lang_file ) ) {
8
- $strings = tdav_get_file( $lang_file );
9
- } else {
10
- $strings = tdav_get_file( dirname(__FILE__) . '/en_dlg.js' );
11
- $strings = preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $strings, 1 );
12
- }
 
 
 
 
 
 
 
 
 
 
 
 
mce/style/langs/pt_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('pt.style_dlg',{"text_lineheight":"Altura da linha","text_variant":"Variante","text_style":"Estilo","text_weight":"Peso","text_size":"Tamanho","text_font":"Fonte","text_props":"Texto","positioning_tab":"Posicionamento","list_tab":"Lista","border_tab":"Limites","box_tab":"Caixa","block_tab":"Bloco","background_tab":"Fundo","text_tab":"Texto",apply:"Aplicar",title:"Editar CSS",clip:"Clip",placement:"Posicionamento",overflow:"Overflow",zindex:"Z-index",visibility:"Visibilidade","positioning_type":"Tipo",position:"Posi\u00e7\u00e3o","bullet_image":"Imagem de lista","list_type":"Tipo",color:"Cor",height:"Altura",width:"Largura",style:"Estilo",margin:"Margem",left:"Esquerda",bottom:"Abaixo",right:"Direita",top:"Topo",same:"O mesmo para todos",padding:"Padding","box_clear":"Clear","box_float":"Float","box_height":"Altura","box_width":"Largura","block_display":"Display","block_whitespace":"Espa\u00e7o","block_text_indent":"Indent","block_text_align":"Alinhamento de texto","block_vertical_alignment":"Alinhamento vertical","block_letterspacing":"Espa\u00e7amento de letras","block_wordspacing":"Espa\u00e7amento de palavras","background_vpos":"Posi\u00e7\u00e3o vertical","background_hpos":"Posi\u00e7\u00e3o horizontal","background_attachment":"Fixar","background_repeat":"Repetir","background_image":"Imagem de fundo","background_color":"Cor de fundo","text_none":"nenhum","text_blink":"Piscar","text_case":"Mai\u00fascula","text_striketrough":"Riscado","text_underline":"Sublinhado","text_overline":"Sobrelinha","text_decoration":"Decora\u00e7\u00e3o","text_color":"Cor",text:"Texto",background:"Fundo",block:"Bloco",box:"Caixa",border:"Borda",list:"Lista",toggle_insert_span:"Insert span at selection"});
 
mce/style/langs/ru_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('ru.style_dlg',{"text_lineheight":"\u0412\u044b\u0441\u043e\u0442\u0430 \u0441\u0442\u0440\u043e\u043a\u0438","text_variant":"\u0412\u0430\u0440\u0438\u0430\u043d\u0442","text_style":"\u0421\u0442\u0438\u043b\u044c","text_weight":"\u0422\u043e\u043b\u0449\u0438\u043d\u0430","text_size":"\u0420\u0430\u0437\u043c\u0435\u0440","text_font":"\u0428\u0440\u0438\u0444\u0442","text_props":"\u0422\u0435\u043a\u0441\u0442","positioning_tab":"\u041f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435","list_tab":"\u0421\u043f\u0438\u0441\u043e\u043a","border_tab":"\u0413\u0440\u0430\u043d\u0438\u0446\u0430","box_tab":"\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440","block_tab":"\u0411\u043b\u043e\u043a","background_tab":"\u0424\u043e\u043d","text_tab":"\u0422\u0435\u043a\u0441\u0442",apply:"\u041f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c",title:"\u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440 CSS \u0441\u0442\u0438\u043b\u044f",clip:"\u041e\u0442\u0441\u0435\u0447\u0435\u043d\u0438\u0435",placement:"\u0420\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435",overflow:"\u041f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435",zindex:"Z-\u0438\u043d\u0434\u0435\u043a\u0441",visibility:"\u0412\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u044c","positioning_type":"\u0422\u0438\u043f",position:"\u041f\u043e\u0437\u0438\u0446\u0438\u044f","bullet_image":"\u041c\u0430\u0440\u043a\u0435\u0440","list_type":"\u0422\u0438\u043f",color:"\u0426\u0432\u0435\u0442",height:"\u0412\u044b\u0441\u043e\u0442\u0430",width:"\u0428\u0438\u0440\u0438\u043d\u0430",style:"\u0421\u0442\u0438\u043b\u044c",margin:"\u041e\u0442\u0441\u0442\u0443\u043f",left:"\u0421\u043b\u0435\u0432\u0430",bottom:"\u0421\u043d\u0438\u0437\u0443",right:"\u0421\u043f\u0440\u0430\u0432\u0430",top:"\u0412\u0432\u0435\u0440\u0445",same:"\u041e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u0434\u043b\u044f \u0432\u0441\u0435\u0445",padding:"\u041f\u043e\u043b\u044f","box_clear":"\u042f\u0432\u043d\u044b\u0439","box_float":"\u041f\u043b\u0430\u0432\u0430\u044e\u0449\u0438\u0439","box_height":"\u0412\u044b\u0441\u043e\u0442\u0430","box_width":"\u0428\u0438\u0440\u0438\u043d\u0430","block_display":"\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435","block_whitespace":"\u041f\u0440\u043e\u0431\u0435\u043b","block_text_indent":"\u041e\u0442\u0441\u0442\u0443\u043f \u0442\u0435\u043a\u0441\u0442\u0430","block_text_align":"\u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430","block_vertical_alignment":"\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435","block_letterspacing":"\u041e\u0442\u0441\u0442\u0443\u043f\u044b \u043c\u0435\u0436\u0434\u0443 \u0431\u0443\u043a\u0432\u0430\u043c\u0438","block_wordspacing":"\u041e\u0442\u0441\u0442\u0443\u043f\u044b \u043c\u0435\u0436\u0434\u0443 \u0441\u043b\u043e\u0432\u0430\u043c\u0438","background_vpos":"\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u044f","background_hpos":"\u0413\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u044f","background_attachment":"\u041f\u0440\u0438\u0432\u044f\u0437\u043a\u0430","background_repeat":"\u041f\u043e\u0432\u0442\u043e\u0440","background_image":"\u0424\u043e\u043d\u043e\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435","background_color":"\u0426\u0432\u0435\u0442 \u0444\u043e\u043d\u0430","text_none":"\u0411\u0435\u0437 \u0432\u0441\u0435\u0433\u043e","text_blink":"\u041c\u0435\u0440\u0446\u0430\u044e\u0449\u0438\u0439","text_case":"\u0420\u0435\u0433\u0438\u0441\u0442\u0440","text_striketrough":"\u0417\u0430\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044b\u0439","text_underline":"\u041f\u043e\u0434\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044b\u0439","text_overline":"\u0421 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0447\u0435\u0440\u0442\u043e\u0439","text_decoration":"\u041e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u0435","text_color":"\u0426\u0432\u0435\u0442",text:"\u0422\u0435\u043a\u0441\u0442",background:"\u0424\u043e\u043d",block:"\u0411\u043b\u043e\u043a",box:"\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440",border:"\u0413\u0440\u0430\u043d\u0438\u0446\u0430",list:"\u0421\u043f\u0438\u0441\u043e\u043a",toggle_insert_span:"Insert span at selection"});
 
mce/style/langs/zh_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('zh.style_dlg',{"text_lineheight":"\u884c\u9ad8","text_variant":"\u7279\u6b8a\u5b57\u4f53","text_style":"\u6837\u5f0f","text_weight":"\u7c97\u4f53","text_size":"\u5b57\u4f53\u5927\u5c0f","text_font":"\u5b57\u4f53","text_props":"\u6587\u5b57","positioning_tab":"\u4f4d\u7f6e","list_tab":"\u5217\u8868","border_tab":"\u8fb9\u6846","box_tab":"\u65b9\u76d2","block_tab":"\u533a\u5757","background_tab":"\u80cc\u666f","text_tab":"\u6587\u5b57",apply:"\u5e94\u7528",title:"\u7f16\u8f91CSS",clip:"\u526a\u8f91",placement:"\u653e\u7f6e",overflow:"\u6ea2\u51fa",zindex:"Z\u8f74\u5750\u6807",visibility:"\u53ef\u89c1","positioning_type":"\u7c7b\u578b",position:"\u4f4d\u7f6e","bullet_image":"\u56fe\u7247\u9879\u76ee\u7b26\u53f7","list_type":"\u7c7b\u578b",color:"\u989c\u8272",height:"\u9ad8",width:"\u5bbd",style:"\u6837\u5f0f",margin:"\u5916\u8fb9\u8ddd",left:"\u5de6",bottom:"\u4e0b",right:"\u53f3",top:"\u4e0a",same:"\u4e00\u81f4",padding:"\u5185\u8fb9\u8ddd","box_clear":"\u6e05\u9664\u6d6e\u52a8","box_float":"\u6d6e\u52a8","box_height":"\u9ad8","box_width":"\u5bbd","block_display":"\u663e\u793a","block_whitespace":"\u7a7a\u683c","block_text_indent":"\u6587\u5b57\u7f29\u8fdb","block_text_align":"\u6587\u5b57\u5bf9\u9f50","block_vertical_alignment":"\u5782\u76f4\u5bf9\u9f50","block_letterspacing":"\u5b57\u95f4\u8ddd","block_wordspacing":"\u8bcd\u95f4\u8ddd","background_vpos":"\u5782\u76f4\u4f4d\u7f6e","background_hpos":"\u6c34\u5e73\u4f4d\u7f6e","background_attachment":"\u9644\u4ef6","background_repeat":"\u91cd\u590d","background_image":"\u80cc\u666f\u56fe\u7247","background_color":"\u80cc\u666f\u989c\u8272","text_none":"\u65e0","text_blink":"\u95ea\u70c1","text_case":"\u5b57\u578b","text_striketrough":"\u5220\u9664\u7ebf","text_underline":"\u4e0b\u5212\u7ebf","text_overline":"\u4e0a\u5212\u7ebf","text_decoration":"\u88c5\u9970","text_color":"\u989c\u8272",text:"\u6587\u5b57",background:"\u80cc\u666f",block:"\u533a\u5757",box:"\u65b9\u76d2",border:"\u8fb9\u6846",list:"\u5217\u8868",toggle_insert_span:"Insert span at selection"});
 
mce/style/props.htm DELETED
@@ -1,845 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <title>{#style_dlg.title}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=359"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=359"></script>
7
- <script type="text/javascript" src="../../utils/editable_selects.js?ver=359"></script>
8
- <script type="text/javascript" src="../../utils/form_utils.js?ver=359"></script>
9
- <script type="text/javascript" src="js/props.js?ver=359"></script>
10
- <link href="css/props.css?ver=359" rel="stylesheet" type="text/css" />
11
- </head>
12
-
13
- <body id="styleprops" style="display: none" role="application" aria-labelledby="app_title">
14
- <span id="app_title" style="display:none">{#style_dlg.title}</span>
15
- <form onsubmit="updateAction();return false;" action="#">
16
- <div class="tabs">
17
- <ul>
18
- <li id="text_tab" class="current" aria-controls="text_panel"><span><a href="javascript:mcTabs.displayTab('text_tab','text_panel');" onMouseDown="return false;">{#style_dlg.text_tab}</a></span></li>
19
- <li id="background_tab" aria-controls="background_panel"><span><a href="javascript:mcTabs.displayTab('background_tab','background_panel');" onMouseDown="return false;">{#style_dlg.background_tab}</a></span></li>
20
- <li id="block_tab" aria-controls="block_panel"><span><a href="javascript:mcTabs.displayTab('block_tab','block_panel');" onMouseDown="return false;">{#style_dlg.block_tab}</a></span></li>
21
- <li id="box_tab" aria-controls="box_panel"><span><a href="javascript:mcTabs.displayTab('box_tab','box_panel');" onMouseDown="return false;">{#style_dlg.box_tab}</a></span></li>
22
- <li id="border_tab" aria-controls="border_panel"><span><a href="javascript:mcTabs.displayTab('border_tab','border_panel');" onMouseDown="return false;">{#style_dlg.border_tab}</a></span></li>
23
- <li id="list_tab" aria-controls="list_panel"><span><a href="javascript:mcTabs.displayTab('list_tab','list_panel');" onMouseDown="return false;">{#style_dlg.list_tab}</a></span></li>
24
- <li id="positioning_tab" aria-controls="positioning_panel"><span><a href="javascript:mcTabs.displayTab('positioning_tab','positioning_panel');" onMouseDown="return false;">{#style_dlg.positioning_tab}</a></span></li>
25
- </ul>
26
- </div>
27
-
28
- <div class="panel_wrapper">
29
- <div id="text_panel" class="panel current">
30
- <fieldset>
31
- <legend>{#style_dlg.text}</legend>
32
- <table role="presentation" border="0" width="100%">
33
- <tr>
34
- <td><label for="text_font">{#style_dlg.text_font}</label></td>
35
- <td colspan="3">
36
- <select id="text_font" name="text_font" class="mceEditableSelect mceFocus"></select>
37
- </td>
38
- </tr>
39
- <tr>
40
- <td><label for="text_size">{#style_dlg.text_size}</label></td>
41
- <td>
42
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
43
- <tr>
44
- <td><select id="text_size" name="text_size" class="mceEditableSelect"></select></td>
45
- <td>&nbsp;</td>
46
- <td>
47
- <label id="text_size_measurement_label" for="text_size_measurement" style="display: none; visibility: hidden;">Text Size Measurement Unit</label>
48
- <select id="text_size_measurement" name="text_size_measurement" aria-labelledby="text_size_measurement_label"></select>
49
- </td>
50
- </tr>
51
- </table>
52
- </td>
53
- <td><label for="text_weight">{#style_dlg.text_weight}</label></td>
54
- <td>
55
- <select id="text_weight" name="text_weight"></select>
56
- </td>
57
- </tr>
58
- <tr>
59
- <td><label for="text_style">{#style_dlg.text_style}</label></td>
60
- <td>
61
- <select id="text_style" name="text_style" class="mceEditableSelect"></select>
62
- </td>
63
- <td><label for="text_variant">{#style_dlg.text_variant}</label></td>
64
- <td>
65
- <select id="text_variant" name="text_variant"></select>
66
- </td>
67
- </tr>
68
- <tr>
69
- <td><label for="text_lineheight">{#style_dlg.text_lineheight}</label></td>
70
- <td>
71
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
72
- <tr>
73
- <td>
74
- <select id="text_lineheight" name="text_lineheight" class="mceEditableSelect"></select>
75
- </td>
76
- <td>&nbsp;</td>
77
- <td>
78
- <label id="text_lineheight_measurement_label" for="text_lineheight_measurement" style="display: none; visibility: hidden;">Line Height Measurement Unit</label>
79
- <select id="text_lineheight_measurement" name="text_lineheight_measurement" aria-labelledby="text_lineheight_measurement_label"></select>
80
- </td>
81
- </tr>
82
- </table>
83
- </td>
84
- <td><label for="text_case">{#style_dlg.text_case}</label></td>
85
- <td>
86
- <select id="text_case" name="text_case"></select>
87
- </td>
88
- </tr>
89
- <tr>
90
- <td><label for="text_color">{#style_dlg.text_color}</label></td>
91
- <td colspan="2">
92
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
93
- <tr>
94
- <td><input id="text_color" name="text_color" type="text" value="" size="9" onChange="updateColor('text_color_pick','text_color');" /></td>
95
- <td id="text_color_pickcontainer">&nbsp;</td>
96
- </tr>
97
- </table>
98
- </td>
99
- </tr>
100
- <tr>
101
- <td valign="top" style="vertical-align: top; padding-top: 3px;">{#style_dlg.text_decoration}</td>
102
- <td colspan="2">
103
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
104
- <tr>
105
- <td><input id="text_underline" name="text_underline" class="checkbox" type="checkbox" /></td>
106
- <td><label for="text_underline">{#style_dlg.text_underline}</label></td>
107
- </tr>
108
- <tr>
109
- <td><input id="text_overline" name="text_overline" class="checkbox" type="checkbox" /></td>
110
- <td><label for="text_overline">{#style_dlg.text_overline}</label></td>
111
- </tr>
112
- <tr>
113
- <td><input id="text_linethrough" name="text_linethrough" class="checkbox" type="checkbox" /></td>
114
- <td><label for="text_linethrough">{#style_dlg.text_striketrough}</label></td>
115
- </tr>
116
- <tr>
117
- <td><input id="text_blink" name="text_blink" class="checkbox" type="checkbox" /></td>
118
- <td><label for="text_blink">{#style_dlg.text_blink}</label></td>
119
- </tr>
120
- <tr>
121
- <td><input id="text_none" name="text_none" class="checkbox" type="checkbox" onclick="updateTextDecorations();"/></td>
122
- <td><label for="text_none">{#style_dlg.text_none}</label></td>
123
- </tr>
124
- </table>
125
- </td>
126
- </tr>
127
- </table>
128
- </fieldset>
129
- </div>
130
-
131
- <div id="background_panel" class="panel">
132
- <fieldset>
133
- <legend>{#style_dlg.background}</legend>
134
- <table role="presentation" border="0">
135
- <tr>
136
- <td><label for="background_color">{#style_dlg.background_color}</label></td>
137
- <td>
138
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
139
- <tr>
140
- <td><input id="background_color" name="background_color" type="text" value="" size="9" onChange="updateColor('background_color_pick','background_color');" /></td>
141
- <td id="background_color_pickcontainer">&nbsp;</td>
142
- </tr>
143
- </table>
144
- </td>
145
- </tr>
146
-
147
- <tr>
148
- <td><label for="background_image">{#style_dlg.background_image}</label></td>
149
- <td><table role="presentation" border="0" cellspacing="0" cellpadding="0">
150
- <tr>
151
- <td><input id="background_image" name="background_image" type="text" /></td>
152
- <td id="background_image_browser">&nbsp;</td>
153
- </tr>
154
- </table>
155
- </td>
156
- </tr>
157
-
158
- <tr>
159
- <td><label for="background_repeat">{#style_dlg.background_repeat}</label></td>
160
- <td><select id="background_repeat" name="background_repeat" class="mceEditableSelect"></select></td>
161
- </tr>
162
-
163
- <tr>
164
- <td><label for="background_attachment">{#style_dlg.background_attachment}</label></td>
165
- <td><select id="background_attachment" name="background_attachment" class="mceEditableSelect"></select></td>
166
- </tr>
167
-
168
- <tr>
169
- <td><label for="background_hpos">{#style_dlg.background_hpos}</label></td>
170
- <td>
171
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
172
- <tr>
173
- <td><select id="background_hpos" name="background_hpos" class="mceEditableSelect"></select></td>
174
- <td>&nbsp;</td>
175
- <td>
176
- <label id="background_hpos_measurement_label" for="background_hpos_measurement" style="display: none; visibility: hidden;">Horizontal position measurement unit</label>
177
- <select id="background_hpos_measurement" name="background_hpos_measurement" aria-labelledby="background_hpos_measurement_label"></select>
178
- </td>
179
- </tr>
180
- </table>
181
- </td>
182
- </tr>
183
-
184
- <tr>
185
- <td><label for="background_vpos">{#style_dlg.background_vpos}</label></td>
186
- <td>
187
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
188
- <tr>
189
- <td><select id="background_vpos" name="background_vpos" class="mceEditableSelect"></select></td>
190
- <td>&nbsp;</td>
191
- <td>
192
-
193
- <label id="background_vpos_measurement_label" for="background_vpos_measurement" style="display: none; visibility: hidden;">Vertical position measurement unit</label>
194
- <select id="background_vpos_measurement" name="background_vpos_measurement" aria-labelledby="background_vpos_measurement_label">></select></td>
195
- </tr>
196
- </table>
197
- </td>
198
- </tr>
199
- </table>
200
- </fieldset>
201
- </div>
202
-
203
- <div id="block_panel" class="panel">
204
- <fieldset>
205
- <legend>{#style_dlg.block}</legend>
206
- <table role="presentation" border="0">
207
- <tr>
208
- <td><label for="block_wordspacing">{#style_dlg.block_wordspacing}</label></td>
209
- <td>
210
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
211
- <tr>
212
- <td><select id="block_wordspacing" name="block_wordspacing" class="mceEditableSelect"></select></td>
213
- <td>&nbsp;</td>
214
- <td>
215
- <label id="block_wordspacing_measurement_label" for="block_wordspacing_measurement" style="display: none; visibility: hidden;">Word spacing measurement unit</label>
216
- <select id="block_wordspacing_measurement" name="block_wordspacing_measurement" aria-labelledby="block_wordspacing_measurement_label"></select>
217
- </td>
218
- </tr>
219
- </table>
220
- </td>
221
- </tr>
222
-
223
- <tr>
224
- <td><label for="block_letterspacing">{#style_dlg.block_letterspacing}</label></td>
225
- <td>
226
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
227
- <tr>
228
- <td><select id="block_letterspacing" name="block_letterspacing" class="mceEditableSelect"></select></td>
229
- <td>&nbsp;</td>
230
- <td>
231
- <label id="block_letterspacing_measurement_label" for="block_letterspacing_measurement" style="display: none; visibility: hidden;">Letter spacing measurement unit</label>
232
- <select id="block_letterspacing_measurement" name="block_letterspacing_measurement" aria-labelledby="block_letterspacing_measurement_label"></select>
233
- </td>
234
- </tr>
235
- </table>
236
- </td>
237
- </tr>
238
-
239
- <tr>
240
- <td><label for="block_vertical_alignment">{#style_dlg.block_vertical_alignment}</label></td>
241
- <td><select id="block_vertical_alignment" name="block_vertical_alignment" class="mceEditableSelect"></select></td>
242
- </tr>
243
-
244
- <tr>
245
- <td><label for="block_text_align">{#style_dlg.block_text_align}</label></td>
246
- <td><select id="block_text_align" name="block_text_align" class="mceEditableSelect"></select></td>
247
- </tr>
248
-
249
- <tr>
250
- <td><label for="block_text_indent">{#style_dlg.block_text_indent}</label></td>
251
- <td>
252
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
253
- <tr>
254
- <td><input type="text" id="block_text_indent" name="block_text_indent" /></td>
255
- <td>&nbsp;</td>
256
- <td>
257
- <label id="block_text_indent_measurement_label" for="block_text_indent_measurement" style="display: none; visibility: hidden;">Text Indent Measurement Unit</label>
258
-
259
- <select id="block_text_indent_measurement" name="block_text_indent_measurement" aria-labelledby="block_text_indent_measurement_label"></select>
260
- </td>
261
- </tr>
262
- </table>
263
- </td>
264
- </tr>
265
-
266
- <tr>
267
- <td><label for="block_whitespace">{#style_dlg.block_whitespace}</label></td>
268
- <td><select id="block_whitespace" name="block_whitespace" class="mceEditableSelect"></select></td>
269
- </tr>
270
-
271
- <tr>
272
- <td><label for="block_display">{#style_dlg.block_display}</label></td>
273
- <td><select id="block_display" name="block_display" class="mceEditableSelect"></select></td>
274
- </tr>
275
- </table>
276
- </fieldset>
277
- </div>
278
-
279
- <div id="box_panel" class="panel">
280
- <fieldset>
281
- <legend>{#style_dlg.box}</legend>
282
- <table role="presentation" border="0">
283
- <tr>
284
- <td><label for="box_width">{#style_dlg.box_width}</label></td>
285
- <td>
286
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
287
- <tr>
288
- <td><input type="text" id="box_width" name="box_width" class="mceEditableSelect" onChange="synch('box_width','positioning_width');" /></td>
289
- <td>&nbsp;</td>
290
- <td>
291
- <label id="box_width_measurement_label" for="box_width_measurement" style="display: none; visibility: hidden;">Box Width Measurement Unit</label>
292
- <select id="box_width_measurement" name="box_width_measurement" aria-labelledby="box_width_measurement_label"></select>
293
- </td>
294
- </tr>
295
- </table>
296
- </td>
297
- <td>&nbsp;&nbsp;&nbsp;<label for="box_float">{#style_dlg.box_float}</label></td>
298
- <td><select id="box_float" name="box_float" class="mceEditableSelect"></select></td>
299
- </tr>
300
-
301
- <tr>
302
- <td><label for="box_height">{#style_dlg.box_height}</label></td>
303
- <td>
304
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
305
- <tr>
306
- <td><input type="text" id="box_height" name="box_height" class="mceEditableSelect" onChange="synch('box_height','positioning_height');" /></td>
307
- <td>&nbsp;</td>
308
- <td>
309
- <label id="box_height_measurement_label" for="box_height_measurement" style="display: none; visibility: hidden;">Box Height Measurement Unit</label>
310
- <select id="box_height_measurement" name="box_height_measurement" aria-labelledby="box_height_measurement_label"></select>
311
- </td>
312
- </tr>
313
- </table>
314
- </td>
315
- <td>&nbsp;&nbsp;&nbsp;<label for="box_clear">{#style_dlg.box_clear}</label></td>
316
- <td><select id="box_clear" name="box_clear" class="mceEditableSelect"></select></td>
317
- </tr>
318
- </table>
319
- </fieldset>
320
-
321
- <div style="float: left; width: 49%">
322
- <fieldset>
323
- <legend>{#style_dlg.padding}</legend>
324
-
325
- <table role="presentation" border="0">
326
- <tr>
327
- <td>&nbsp;</td>
328
- <td><input type="checkbox" id="box_padding_same" name="box_padding_same" class="checkbox" checked="checked" onClick="toggleSame(this,'box_padding');" /> <label for="box_padding_same">{#style_dlg.same}</label></td>
329
- </tr>
330
- <tr>
331
- <td><label for="box_padding_top">{#style_dlg.top}</label></td>
332
- <td>
333
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
334
- <tr>
335
- <td><input type="text" id="box_padding_top" name="box_padding_top" class="mceEditableSelect" /></td>
336
- <td>&nbsp;</td>
337
- <td>
338
- <label id="box_padding_top_measurement_label" for="box_padding_top_measurement" style="display: none; visibility: hidden;">Padding Top Measurement Unit</label>
339
- <select id="box_padding_top_measurement" name="box_padding_top_measurement" aria-labelledby="box_padding_top_measurement_label"></select>
340
- </td>
341
- </tr>
342
- </table>
343
- </td>
344
- </tr>
345
- <tr>
346
- <td><label for="box_padding_right">{#style_dlg.right}</label></td>
347
- <td>
348
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
349
- <tr>
350
- <td><input type="text" id="box_padding_right" name="box_padding_right" class="mceEditableSelect" disabled="disabled" /></td>
351
- <td>&nbsp;</td>
352
- <td>
353
- <label id="box_padding_right_measurement_label" for="box_padding_right_measurement" style="display: none; visibility: hidden;">Padding Right Measurement Unit</label>
354
- <select id="box_padding_right_measurement" name="box_padding_right_measurement" disabled="disabled" aria-labelledby="box_padding_right_measurement_label"></select>
355
- </td>
356
- </tr>
357
- </table>
358
- </td>
359
- </tr>
360
- <tr>
361
- <td><label for="box_padding_bottom">{#style_dlg.bottom}</label></td>
362
- <td>
363
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
364
- <tr>
365
- <td><input type="text" id="box_padding_bottom" name="box_padding_bottom" class="mceEditableSelect" disabled="disabled" /></td>
366
- <td>&nbsp;</td>
367
- <td>
368
- <label id="box_padding_bottom_measurement_label" for="box_padding_bottom_measurement" style="display: none; visibility: hidden;">Padding Bottom Measurement Unit</label>
369
- <select id="box_padding_bottom_measurement" name="box_padding_bottom_measurement" disabled="disabled" aria-labelledby="box_padding_bottom_measurement_label"></select>
370
- </td>
371
- </tr>
372
- </table>
373
- </td>
374
- </tr>
375
- <tr>
376
- <td><label for="box_padding_left">{#style_dlg.left}</label></td>
377
- <td>
378
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
379
- <tr>
380
- <td><input type="text" id="box_padding_left" name="box_padding_left" class="mceEditableSelect" disabled="disabled" /></td>
381
- <td>&nbsp;</td>
382
- <td>
383
- <label id="box_padding_left_measurement_label" for="box_padding_left_measurement" style="display: none; visibility: hidden;">Padding Left Measurement Unit</label>
384
- <select id="box_padding_left_measurement" name="box_padding_left_measurement" disabled="disabled" aria-labelledby="box_padding_left_measurement_label"></select>
385
- </td>
386
- </tr>
387
- </table>
388
- </td>
389
- </tr>
390
- </table>
391
- </fieldset>
392
- </div>
393
-
394
- <div style="float: right; width: 49%">
395
- <fieldset>
396
- <legend>{#style_dlg.margin}</legend>
397
-
398
- <table role="presentation" border="0">
399
- <tr>
400
- <td>&nbsp;</td>
401
- <td><input type="checkbox" id="box_margin_same" name="box_margin_same" class="checkbox" checked="checked" onClick="toggleSame(this,'box_margin');" /> <label for="box_margin_same">{#style_dlg.same}</label></td>
402
- </tr>
403
- <tr>
404
- <td><label for="box_margin_top">{#style_dlg.top}</label></td>
405
- <td>
406
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
407
- <tr>
408
- <td><input type="text" id="box_margin_top" name="box_margin_top" class="mceEditableSelect" /></td>
409
- <td>&nbsp;</td>
410
- <td>
411
- <label id="box_margin_top_measurement_label" for="box_margin_top_measurement" style="display: none; visibility: hidden;">Margin Top Measurement Unit</label>
412
- <select id="box_margin_top_measurement" name="box_margin_top_measurement" aria-labelledby="box_margin_top_measurement_label"></select>
413
- </td>
414
- </tr>
415
- </table>
416
- </td>
417
- </tr>
418
- <tr>
419
- <td><label for="box_margin_right">{#style_dlg.right}</label></td>
420
- <td>
421
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
422
- <tr>
423
- <td><input type="text" id="box_margin_right" name="box_margin_right" class="mceEditableSelect" disabled="disabled" /></td>
424
- <td>&nbsp;</td>
425
- <td>
426
- <label id="box_margin_right_measurement_label" for="box_margin_right_measurement" style="display: none; visibility: hidden;">Margin Right Measurement Unit</label>
427
- <select id="box_margin_right_measurement" name="box_margin_right_measurement" disabled="disabled" aria-labelledby="box_margin_right_measurement_label"></select>
428
- </td>
429
- </tr>
430
- </table>
431
- </td>
432
- </tr>
433
- <tr>
434
- <td><label for="box_margin_bottom">{#style_dlg.bottom}</label></td>
435
- <td>
436
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
437
- <tr>
438
- <td><input type="text" id="box_margin_bottom" name="box_margin_bottom" class="mceEditableSelect" disabled="disabled" /></td>
439
- <td>&nbsp;</td>
440
- <td>
441
- <label id="box_margin_bottom_measurement_label" for="box_margin_bottom_measurement" style="display: none; visibility: hidden;">Margin Bottom Measurement Unit</label>
442
- <select id="box_margin_bottom_measurement" name="box_margin_bottom_measurement" disabled="disabled" aria-labelledby="box_margin_bottom_measurement_label"></select>
443
- </td>
444
- </tr>
445
- </table>
446
- </td>
447
- </tr>
448
- <tr>
449
- <td><label for="box_margin_left">{#style_dlg.left}</label></td>
450
- <td>
451
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
452
- <tr>
453
- <td><input type="text" id="box_margin_left" name="box_margin_left" class="mceEditableSelect" disabled="disabled" /></td>
454
- <td>&nbsp;</td>
455
- <td>
456
- <label id="box_margin_left_measurement_label" for="box_margin_left_measurement" style="display: none; visibility: hidden;">Margin Left Measurement Unit</label>
457
- <select id="box_margin_left_measurement" name="box_margin_left_measurement" disabled="disabled" aria-labelledby="box_margin_left_measurement_label"></select>
458
- </td>
459
- </tr>
460
- </table>
461
- </td>
462
- </tr>
463
- </table>
464
- </fieldset>
465
- </div>
466
- <br style="clear: both" />
467
- </div>
468
-
469
- <div id="border_panel" class="panel">
470
- <fieldset>
471
- <legend>{#style_dlg.border}</legend>
472
- <table role="presentation" border="0" cellspacing="0" cellpadding="0" width="100%">
473
- <tr>
474
- <td class="tdelim">&nbsp;</td>
475
- <td class="tdelim delim">&nbsp;</td>
476
- <td class="tdelim">{#style_dlg.style}</td>
477
- <td class="tdelim delim">&nbsp;</td>
478
- <td class="tdelim">{#style_dlg.width}</td>
479
- <td class="tdelim delim">&nbsp;</td>
480
- <td class="tdelim">{#style_dlg.color}</td>
481
- </tr>
482
-
483
- <tr>
484
- <td>&nbsp;</td>
485
- <td class="delim">&nbsp;</td>
486
- <td><input type="checkbox" id="border_style_same" name="border_style_same" class="checkbox" checked="checked" onClick="toggleSame(this,'border_style');" /> <label for="border_style_same">{#style_dlg.same}</label></td>
487
- <td class="delim">&nbsp;</td>
488
- <td><input type="checkbox" id="border_width_same" name="border_width_same" class="checkbox" checked="checked" onClick="toggleSame(this,'border_width');" /> <label for="border_width_same">{#style_dlg.same}</label></td>
489
- <td class="delim">&nbsp;</td>
490
- <td><input type="checkbox" id="border_color_same" name="border_color_same" class="checkbox" checked="checked" onClick="toggleSame(this,'border_color');" /> <label for="border_color_same">{#style_dlg.same}</label></td>
491
- </tr>
492
-
493
- <tr>
494
- <td>{#style_dlg.top}</td>
495
- <td class="delim">&nbsp;</td>
496
- <td><select id="border_style_top" name="border_style_top" class="mceEditableSelect"></select></td>
497
- <td class="delim">&nbsp;</td>
498
- <td>
499
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
500
- <tr>
501
- <td><select id="border_width_top" name="border_width_top" class="mceEditableSelect"></select></td>
502
- <td>&nbsp;</td>
503
- <td>
504
- <label id="border_width_top_measurement_label" for="border_width_top_measurement" style="display: none; visibility: hidden;">Width top Measurement Unit</label>
505
- <select id="border_width_top_measurement" name="border_width_top_measurement" aria-labelledby="border_width_top_measurement_label"></select>
506
- </td>
507
- </tr>
508
- </table>
509
- </td>
510
- <td class="delim">&nbsp;</td>
511
- <td>
512
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
513
- <tr>
514
- <td><input id="border_color_top" name="border_color_top" type="text" value="" size="9" onChange="updateColor('border_color_top_pick','border_color_top');" /></td>
515
- <td id="border_color_top_pickcontainer">&nbsp;</td>
516
- </tr>
517
- </table>
518
- </td>
519
- </tr>
520
-
521
- <tr>
522
- <td>{#style_dlg.right}</td>
523
- <td class="delim">&nbsp;</td>
524
- <td><select id="border_style_right" name="border_style_right" class="mceEditableSelect" disabled="disabled"></select></td>
525
- <td class="delim">&nbsp;</td>
526
- <td>
527
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
528
- <tr>
529
- <td><select id="border_width_right" name="border_width_right" class="mceEditableSelect" disabled="disabled"></select></td>
530
- <td>&nbsp;</td>
531
- <td>
532
- <label id="border_width_right_measurement_label" for="border_width_right_measurement" style="display: none; visibility: hidden;">Width Right Measurement Unit</label>
533
- <select id="border_width_right_measurement" name="border_width_right_measurement" disabled="disabled" aria-labelledby="border_width_right_measurement_label"></select>
534
- </td>
535
- </tr>
536
- </table>
537
- </td>
538
- <td class="delim">&nbsp;</td>
539
- <td>
540
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
541
- <tr>
542
- <td><input id="border_color_right" name="border_color_right" type="text" value="" size="9" onChange="updateColor('border_color_right_pick','border_color_right');" disabled="disabled" /></td>
543
- <td id="border_color_right_pickcontainer">&nbsp;</td>
544
- </tr>
545
- </table>
546
- </td>
547
- </tr>
548
-
549
- <tr>
550
- <td>{#style_dlg.bottom}</td>
551
- <td class="delim">&nbsp;</td>
552
- <td><select id="border_style_bottom" name="border_style_bottom" class="mceEditableSelect" disabled="disabled"></select></td>
553
- <td class="delim">&nbsp;</td>
554
- <td>
555
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
556
- <tr>
557
- <td><select id="border_width_bottom" name="border_width_bottom" class="mceEditableSelect" disabled="disabled"></select></td>
558
- <td>&nbsp;</td>
559
- <td>
560
- <label id="border_width_bottom_measurement_label" for="border_width_bottom_measurement" style="display: none; visibility: hidden;">Width Bottom Measurement Unit</label>
561
- <select id="border_width_bottom_measurement" name="border_width_bottom_measurement" disabled="disabled" aria-labelledby="border_width_bottom_measurement_label"></select>
562
- </td>
563
- </tr>
564
- </table>
565
- </td>
566
- <td class="delim">&nbsp;</td>
567
- <td>
568
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
569
- <tr>
570
- <td><input id="border_color_bottom" name="border_color_bottom" type="text" value="" size="9" onChange="updateColor('border_color_bottom_pick','border_color_bottom');" disabled="disabled" /></td>
571
- <td id="border_color_bottom_pickcontainer">&nbsp;</td>
572
- </tr>
573
- </table>
574
- </td>
575
- </tr>
576
-
577
- <tr>
578
- <td>{#style_dlg.left}</td>
579
- <td class="delim">&nbsp;</td>
580
- <td><select id="border_style_left" name="border_style_left" class="mceEditableSelect" disabled="disabled"></select></td>
581
- <td class="delim">&nbsp;</td>
582
- <td>
583
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
584
- <tr>
585
- <td><select id="border_width_left" name="border_width_left" class="mceEditableSelect" disabled="disabled"></select></td>
586
- <td>&nbsp;</td>
587
- <td>
588
- <label id="border_width_left_measurement_label" for="border_width_left_measurement" style="display: none; visibility: hidden;">Width Left Measurement Unit</label>
589
- <select id="border_width_left_measurement" name="border_width_left_measurement" disabled="disabled" aria-labelledby="border_width_left_measurement_label"></select>
590
- </td>
591
- </tr>
592
- </table>
593
- </td>
594
- <td class="delim">&nbsp;</td>
595
- <td>
596
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
597
- <tr>
598
- <td><input id="border_color_left" name="border_color_left" type="text" value="" size="9" onChange="updateColor('border_color_left_pick','border_color_left');" disabled="disabled" /></td>
599
- <td id="border_color_left_pickcontainer">&nbsp;</td>
600
- </tr>
601
- </table>
602
- </td>
603
- </tr>
604
- </table>
605
- </fieldset>
606
- </div>
607
-
608
- <div id="list_panel" class="panel">
609
- <fieldset>
610
- <legend>{#style_dlg.list}</legend>
611
- <table role="presentation" border="0">
612
- <tr>
613
- <td><label for="list_type">{#style_dlg.list_type}</label></td>
614
- <td><select id="list_type" name="list_type" class="mceEditableSelect"></select></td>
615
- </tr>
616
-
617
- <tr>
618
- <td><label for="list_bullet_image">{#style_dlg.bullet_image}</label></td>
619
- <td><input id="list_bullet_image" name="list_bullet_image" type="text" /></td>
620
- </tr>
621
-
622
- <tr>
623
- <td><label for="list_position">{#style_dlg.position}</label></td>
624
- <td><select id="list_position" name="list_position" class="mceEditableSelect"></select></td>
625
- </tr>
626
- </table>
627
- </fieldset>
628
- </div>
629
-
630
- <div id="positioning_panel" class="panel">
631
- <fieldset>
632
- <legend>{#style_dlg.position}</legend>
633
- <table role="presentation" border="0">
634
- <tr>
635
- <td><label for="positioning_type">{#style_dlg.positioning_type}</label></td>
636
- <td><select id="positioning_type" name="positioning_type" class="mceEditableSelect"></select></td>
637
- <td>&nbsp;&nbsp;&nbsp;<label for="positioning_visibility">{#style_dlg.visibility}</label></td>
638
- <td><select id="positioning_visibility" name="positioning_visibility" class="mceEditableSelect"></select></td>
639
- </tr>
640
-
641
- <tr>
642
- <td><label for="positioning_width">{#style_dlg.width}</label></td>
643
- <td>
644
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
645
- <tr>
646
- <td><input type="text" id="positioning_width" name="positioning_width" onChange="synch('positioning_width','box_width');" /></td>
647
- <td>&nbsp;</td>
648
- <td>
649
- <label id="positioning_width_measurement_label" for="positioning_width_measurement" style="display: none; visibility: hidden;">Positioning width Measurement Unit</label>
650
- <select id="positioning_width_measurement" name="positioning_width_measurement" aria-labelledby="positioning_width_measurement_label"></select>
651
- </td>
652
- </tr>
653
- </table>
654
- </td>
655
- <td>&nbsp;&nbsp;&nbsp;<label for="positioning_zindex">{#style_dlg.zindex}</label></td>
656
- <td><input type="text" id="positioning_zindex" name="positioning_zindex" /></td>
657
- </tr>
658
-
659
- <tr>
660
- <td><label for="positioning_height">{#style_dlg.height}</label></td>
661
- <td>
662
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
663
- <tr>
664
- <td><input type="text" id="positioning_height" name="positioning_height" onChange="synch('positioning_height','box_height');" /></td>
665
- <td>&nbsp;</td>
666
- <td>
667
- <label id="positioning_height_measurement_label" for="positioning_height_measurement" style="display: none; visibility: hidden;">Positioning Height Measurement Unit</label>
668
- <select id="positioning_height_measurement" name="positioning_height_measurement" aria-labelledby="positioning_height_measurement_label"></select>
669
- </td>
670
- </tr>
671
- </table>
672
- </td>
673
- <td>&nbsp;&nbsp;&nbsp;<label for="positioning_overflow">{#style_dlg.overflow}</label></td>
674
- <td><select id="positioning_overflow" name="positioning_overflow" class="mceEditableSelect"></select></td>
675
- </tr>
676
- </table>
677
- </fieldset>
678
-
679
- <div style="float: left; width: 49%">
680
- <fieldset>
681
- <legend>{#style_dlg.placement}</legend>
682
-
683
- <table role="presentation" border="0">
684
- <tr>
685
- <td>&nbsp;</td>
686
- <td><input type="checkbox" id="positioning_placement_same" name="positioning_placement_same" class="checkbox" checked="checked" onClick="toggleSame(this,'positioning_placement');" /> <label for="positioning_placement_same">{#style_dlg.same}</label></td>
687
- </tr>
688
- <tr>
689
- <td>{#style_dlg.top}</td>
690
- <td>
691
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
692
- <tr>
693
- <td><input type="text" id="positioning_placement_top" name="positioning_placement_top" /></td>
694
- <td>&nbsp;</td>
695
- <td>
696
- <label id="positioning_placement_top_measurement_label" for="positioning_placement_top_measurement" style="display: none; visibility: hidden;">Placement Top Measurement Unit</label>
697
- <select id="positioning_placement_top_measurement" name="positioning_placement_top_measurement" aria-labelledby="positioning_placement_top_measurement_label"></select>
698
- </td>
699
- </tr>
700
- </table>
701
- </td>
702
- </tr>
703
- <tr>
704
- <td>{#style_dlg.right}</td>
705
- <td>
706
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
707
- <tr>
708
- <td><input type="text" id="positioning_placement_right" name="positioning_placement_right" disabled="disabled" /></td>
709
- <td>&nbsp;</td>
710
- <td>
711
- <label id="positioning_placement_right_measurement_label" for="positioning_placement_right_measurement" style="display: none; visibility: hidden;">Placement Right Measurement Unit</label>
712
- <select id="positioning_placement_right_measurement" name="positioning_placement_right_measurement" disabled="disabled" aria-labelledby="positioning_placement_right_measurement_label"></select>
713
- </td>
714
- </tr>
715
- </table>
716
- </td>
717
- </tr>
718
- <tr>
719
- <td>{#style_dlg.bottom}</td>
720
- <td>
721
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
722
- <tr>
723
- <td><input type="text" id="positioning_placement_bottom" name="positioning_placement_bottom" disabled="disabled" /></td>
724
- <td>&nbsp;</td>
725
- <td>
726
- <label id="positioning_placement_bottom_measurement_label" for="positioning_placement_bottom_measurement" style="display: none; visibility: hidden;">Placement Bottom Measurement Unit</label>
727
- <select id="positioning_placement_bottom_measurement" name="positioning_placement_bottom_measurement" disabled="disabled" aria-labelledby="positioning_placement_bottom_measurement_label"></select>
728
- </td>
729
- </tr>
730
- </table>
731
- </td>
732
- </tr>
733
- <tr>
734
- <td>{#style_dlg.left}</td>
735
- <td>
736
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
737
- <tr>
738
- <td><input type="text" id="positioning_placement_left" name="positioning_placement_left" disabled="disabled" /></td>
739
- <td>&nbsp;</td>
740
- <td>
741
- <label id="positioning_placement_left_measurement_label" for="positioning_placement_left_measurement" style="display: none; visibility: hidden;">Placement Left Measurement Unit</label>
742
- <select id="positioning_placement_left_measurement" name="positioning_placement_left_measurement" disabled="disabled" aria-labelledby="positioning_placement_left_measurement_label"></select>
743
- </td>
744
- </tr>
745
- </table>
746
- </td>
747
- </tr>
748
- </table>
749
- </fieldset>
750
- </div>
751
-
752
- <div style="float: right; width: 49%">
753
- <fieldset>
754
- <legend>{#style_dlg.clip}</legend>
755
-
756
- <table role="presentation" border="0">
757
- <tr>
758
- <td>&nbsp;</td>
759
- <td><input type="checkbox" id="positioning_clip_same" name="positioning_clip_same" class="checkbox" checked="checked" onClick="toggleSame(this,'positioning_clip');" /> <label for="positioning_clip_same">{#style_dlg.same}</label></td>
760
- </tr>
761
- <tr>
762
- <td>{#style_dlg.top}</td>
763
- <td>
764
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
765
- <tr>
766
- <td><input type="text" id="positioning_clip_top" name="positioning_clip_top" /></td>
767
- <td>&nbsp;</td>
768
- <td>
769
- <label id="positioning_clip_top_measurement_label" for="positioning_clip_top_measurement" style="display: none; visibility: hidden;">Clip Top Measurement Unit</label>
770
- <select id="positioning_clip_top_measurement" name="positioning_clip_top_measurement" aria-labelledby="positioning_clip_top_measurement_label"></select>
771
- </td>
772
- </tr>
773
- </table>
774
- </td>
775
- </tr>
776
- <tr>
777
- <td>{#style_dlg.right}</td>
778
- <td>
779
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
780
- <tr>
781
- <td><input type="text" id="positioning_clip_right" name="positioning_clip_right" disabled="disabled" /></td>
782
- <td>&nbsp;</td>
783
- <td>
784
- <label id="positioning_clip_right_measurement_label" for="positioning_clip_right_measurement" style="display: none; visibility: hidden;">Clip Right Measurement Unit</label>
785
- <select id="positioning_clip_right_measurement" name="positioning_clip_right_measurement" disabled="disabled" aria-labelledby="positioning_clip_right_measurement_label"></select>
786
- </td>
787
- </tr>
788
- </table>
789
- </td>
790
- </tr>
791
- <tr>
792
- <td>{#style_dlg.bottom}</td>
793
- <td>
794
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
795
- <tr>
796
- <td><input type="text" id="positioning_clip_bottom" name="positioning_clip_bottom" disabled="disabled" /></td>
797
- <td>&nbsp;</td>
798
- <td>
799
- <label id="positioning_clip_bottom_measurement_label" for="positioning_clip_bottom_measurement" style="display: none; visibility: hidden;">Clip Bottom Measurement Unit</label>
800
- <select id="positioning_clip_bottom_measurement" name="positioning_clip_bottom_measurement" disabled="disabled" aria-labelledby="positioning_clip_bottom_measurement_label"></select>
801
- </td>
802
- </tr>
803
- </table>
804
- </td>
805
- </tr>
806
- <tr>
807
- <td>{#style_dlg.left}</td>
808
- <td>
809
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
810
- <tr>
811
- <td><input type="text" id="positioning_clip_left" name="positioning_clip_left" disabled="disabled" /></td>
812
- <td>&nbsp;</td>
813
- <td>
814
- <label id="positioning_clip_left_measurement_label" for="positioning_clip_left_measurement" style="display: none; visibility: hidden;">Clip Left Measurement Unit</label>
815
- <select id="positioning_clip_left_measurement" name="positioning_clip_left_measurement" disabled="disabled" aria-labelledby="positioning_clip_left_measurement_label"></select>
816
- </td>
817
- </tr>
818
- </table>
819
- </td>
820
- </tr>
821
- </table>
822
- </fieldset>
823
- </div>
824
- <br style="clear: both" />
825
- </div>
826
- </div>
827
-
828
- <div class="panel_toggle_insert_span">
829
- <input type="checkbox" class="checkbox" id="toggle_insert_span" name="toggle_insert_span" onClick="toggleApplyAction();" />
830
- <label for="toggle_insert_span">{#style_dlg.toggle_insert_span}</label>
831
- </div>
832
-
833
- <div class="mceActionPanel">
834
- <input type="submit" id="insert" name="insert" value="{#update}" />
835
- <input type="button" class="button" id="apply" name="apply" value="{#style_dlg.apply}" onClick="applyAction();" />
836
- <input type="button" id="cancel" name="cancel" value="{#cancel}" onClick="tinyMCEPopup.close();" />
837
- </div>
838
- </form>
839
-
840
- <div style="display: none">
841
- <div id="container"></div>
842
- </div>
843
-
844
- </body>
845
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/table/cell.htm DELETED
@@ -1,180 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <title>{#table_dlg.cell_title}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=359"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=359"></script>
7
- <script type="text/javascript" src="../../utils/form_utils.js?ver=359"></script>
8
- <script type="text/javascript" src="../../utils/validate.js?ver=359"></script>
9
- <script type="text/javascript" src="../../utils/editable_selects.js?ver=359"></script>
10
- <script type="text/javascript" src="js/cell.js?ver=359"></script>
11
- <link href="css/cell.css?ver=359" rel="stylesheet" type="text/css" />
12
- </head>
13
- <body id="tablecell" style="display: none" role="application">
14
- <form onsubmit="updateAction();return false;" action="#">
15
- <div class="tabs">
16
- <ul>
17
- <li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li>
18
- <li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li>
19
- </ul>
20
- </div>
21
-
22
- <div class="panel_wrapper">
23
- <div id="general_panel" class="panel current">
24
- <fieldset>
25
- <legend>{#table_dlg.general_props}</legend>
26
-
27
- <table role="presentation" border="0" cellpadding="4" cellspacing="0">
28
- <tr>
29
- <td><label for="align">{#table_dlg.align}</label></td>
30
- <td>
31
- <select id="align" name="align" class="mceFocus">
32
- <option value="">{#not_set}</option>
33
- <option value="center">{#table_dlg.align_middle}</option>
34
- <option value="left">{#table_dlg.align_left}</option>
35
- <option value="right">{#table_dlg.align_right}</option>
36
- </select>
37
- </td>
38
-
39
- <td><label for="celltype">{#table_dlg.cell_type}</label></td>
40
- <td>
41
- <select id="celltype" name="celltype">
42
- <option value="td">{#table_dlg.td}</option>
43
- <option value="th">{#table_dlg.th}</option>
44
- </select>
45
- </td>
46
- </tr>
47
-
48
- <tr>
49
- <td><label for="valign">{#table_dlg.valign}</label></td>
50
- <td>
51
- <select id="valign" name="valign">
52
- <option value="">{#not_set}</option>
53
- <option value="top">{#table_dlg.align_top}</option>
54
- <option value="middle">{#table_dlg.align_middle}</option>
55
- <option value="bottom">{#table_dlg.align_bottom}</option>
56
- </select>
57
- </td>
58
-
59
- <td><label for="scope">{#table_dlg.scope}</label></td>
60
- <td>
61
- <select id="scope" name="scope">
62
- <option value="">{#not_set}</option>
63
- <option value="col">{#table.col}</option>
64
- <option value="row">{#table.row}</option>
65
- <option value="rowgroup">{#table_dlg.rowgroup}</option>
66
- <option value="colgroup">{#table_dlg.colgroup}</option>
67
- </select>
68
- </td>
69
-
70
- </tr>
71
-
72
- <tr>
73
- <td><label for="width">{#table_dlg.width}</label></td>
74
- <td><input id="width" name="width" type="text" value="" size="7" maxlength="7" onchange="changedSize();" class="size" /></td>
75
-
76
- <td><label for="height">{#table_dlg.height}</label></td>
77
- <td><input id="height" name="height" type="text" value="" size="7" maxlength="7" onchange="changedSize();" class="size" /></td>
78
- </tr>
79
-
80
- <tr id="styleSelectRow">
81
- <td><label for="class">{#class_name}</label></td>
82
- <td colspan="3">
83
- <select id="class" name="class" class="mceEditableSelect">
84
- <option value="" selected="selected">{#not_set}</option>
85
- </select>
86
- </td>
87
- </tr>
88
- </table>
89
- </fieldset>
90
- </div>
91
-
92
- <div id="advanced_panel" class="panel">
93
- <fieldset>
94
- <legend>{#table_dlg.advanced_props}</legend>
95
-
96
- <table role="presentation" border="0" cellpadding="0" cellspacing="4">
97
- <tr>
98
- <td class="column1"><label for="id">{#table_dlg.id}</label></td>
99
- <td><input id="id" name="id" type="text" value="" style="width: 200px" /></td>
100
- </tr>
101
-
102
- <tr>
103
- <td><label for="style">{#table_dlg.style}</label></td>
104
- <td><input type="text" id="style" name="style" value="" style="width: 200px;" onchange="changedStyle();" /></td>
105
- </tr>
106
-
107
- <tr>
108
- <td class="column1"><label for="dir">{#table_dlg.langdir}</label></td>
109
- <td>
110
- <select id="dir" name="dir" style="width: 200px">
111
- <option value="">{#not_set}</option>
112
- <option value="ltr">{#table_dlg.ltr}</option>
113
- <option value="rtl">{#table_dlg.rtl}</option>
114
- </select>
115
- </td>
116
- </tr>
117
-
118
- <tr>
119
- <td class="column1"><label for="lang">{#table_dlg.langcode}</label></td>
120
- <td>
121
- <input id="lang" name="lang" type="text" value="" style="width: 200px" />
122
- </td>
123
- </tr>
124
-
125
- <tr>
126
- <td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>
127
- <td>
128
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
129
- <tr>
130
- <td><input id="backgroundimage" name="backgroundimage" type="text" value="" style="width: 200px" onchange="changedBackgroundImage();" /></td>
131
- <td id="backgroundimagebrowsercontainer">&nbsp;</td>
132
- </tr>
133
- </table>
134
- </td>
135
- </tr>
136
-
137
- <tr role="group" aria-labelledby="bordercolor_label">
138
- <td class="column1"><label id="bordercolor_label" for="bordercolor">{#table_dlg.bordercolor}</label></td>
139
- <td>
140
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
141
- <tr>
142
- <td><input id="bordercolor" name="bordercolor" type="text" value="" size="9" onchange="updateColor('bordercolor_pick','bordercolor');changedColor();" /></td>
143
- <td id="bordercolor_pickcontainer">&nbsp;</td>
144
- </tr>
145
- </table>
146
- </td>
147
- </tr>
148
-
149
- <tr role="group" aria-labelledby="bgcolor_label">
150
- <td class="column1"><label id="bgcolor_label" for="bgcolor">{#table_dlg.bgcolor}</label></td>
151
- <td>
152
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
153
- <tr>
154
- <td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td>
155
- <td id="bgcolor_pickcontainer">&nbsp;</td>
156
- </tr>
157
- </table>
158
- </td>
159
- </tr>
160
- </table>
161
- </fieldset>
162
- </div>
163
- </div>
164
-
165
- <div class="mceActionPanel">
166
- <div>
167
- <select id="action" name="action">
168
- <option value="cell">{#table_dlg.cell_cell}</option>
169
- <option value="row">{#table_dlg.cell_row}</option>
170
- <option value="col">{#table_dlg.cell_col}</option>
171
- <option value="all">{#table_dlg.cell_all}</option>
172
- </select>
173
- </div>
174
-
175
- <input type="submit" id="insert" name="insert" value="{#update}" />
176
- <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
177
- </div>
178
- </form>
179
- </body>
180
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/table/css/cell.css DELETED
@@ -1,18 +0,0 @@
1
- /* CSS file for cell dialog in the table plugin */
2
-
3
- .panel_wrapper div.current {
4
- min-height: 200px;
5
- height: auto;
6
- }
7
-
8
- .advfield {
9
- width: 200px;
10
- }
11
-
12
- #action {
13
- margin-bottom: 3px;
14
- }
15
-
16
- #class {
17
- width: 150px;
18
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/table/css/row.css DELETED
@@ -1,26 +0,0 @@
1
- /* CSS file for row dialog in the table plugin */
2
-
3
- .panel_wrapper div.current {
4
- min-height: 200px;
5
- height: auto;
6
- }
7
-
8
- .advfield {
9
- width: 200px;
10
- }
11
-
12
- #action {
13
- margin-bottom: 3px;
14
- }
15
-
16
- #rowtype,#align,#valign,#class,#height {
17
- width: 150px;
18
- }
19
-
20
- #height {
21
- width: 50px;
22
- }
23
-
24
- .col2 {
25
- padding-left: 20px;
26
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/table/css/table.css DELETED
@@ -1,14 +0,0 @@
1
- /* CSS file for table dialog in the table plugin */
2
-
3
- .panel_wrapper div.current {
4
- min-height: 245px;
5
- height: auto;
6
- }
7
-
8
- .advfield {
9
- width: 200px;
10
- }
11
-
12
- #class {
13
- width: 150px;
14
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/table/editor_plugin.js DELETED
@@ -1 +0,0 @@
1
- (function(d){var e=d.each;function c(g,h){var j=h.ownerDocument,f=j.createRange(),k;f.setStartBefore(h);f.setEnd(g.endContainer,g.endOffset);k=j.createElement("body");k.appendChild(f.cloneContents());return k.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length==0}function a(g,f){return parseInt(g.getAttribute(f)||1)}function b(H,G,K){var g,L,D,o;t();o=G.getParent(K.getStart(),"th,td");if(o){L=F(o);D=I();o=z(L.x,L.y)}function A(N,M){N=N.cloneNode(M);N.removeAttribute("id");return N}function t(){var M=0;g=[];e(["thead","tbody","tfoot"],function(N){var O=G.select("> "+N+" tr",H);e(O,function(P,Q){Q+=M;e(G.select("> td, > th",P),function(W,R){var S,T,U,V;if(g[Q]){while(g[Q][R]){R++}}U=a(W,"rowspan");V=a(W,"colspan");for(T=Q;T<Q+U;T++){if(!g[T]){g[T]=[]}for(S=R;S<R+V;S++){g[T][S]={part:N,real:T==Q&&S==R,elm:W,rowspan:U,colspan:V}}}})});M+=O.length})}function z(M,O){var N;N=g[O];if(N){return N[M]}}function s(O,M,N){if(O){N=parseInt(N);if(N===1){O.removeAttribute(M,1)}else{O.setAttribute(M,N,1)}}}function j(M){return M&&(G.hasClass(M.elm,"mceSelected")||M==o)}function k(){var M=[];e(H.rows,function(N){e(N.cells,function(O){if(G.hasClass(O,"mceSelected")||O==o.elm){M.push(N);return false}})});return M}function r(){var M=G.createRng();M.setStartAfter(H);M.setEndAfter(H);K.setRng(M);G.remove(H)}function f(M){var N;d.walk(M,function(P){var O;if(P.nodeType==3){e(G.getParents(P.parentNode,null,M).reverse(),function(Q){Q=A(Q,false);if(!N){N=O=Q}else{if(O){O.appendChild(Q)}}O=Q});if(O){O.innerHTML=d.isIE&&!d.isIE11?"&nbsp;":'<br data-mce-bogus="1" />'}return false}},"childNodes");M=A(M,false);s(M,"rowSpan",1);s(M,"colSpan",1);if(N){M.appendChild(N)}else{if(!d.isIE||d.isIE11){M.innerHTML='<br data-mce-bogus="1" />'}}return M}function q(){var M=G.createRng();e(G.select("tr",H),function(N){if(N.cells.length==0){G.remove(N)}});if(G.select("tr",H).length==0){M.setStartAfter(H);M.setEndAfter(H);K.setRng(M);G.remove(H);return}e(G.select("thead,tbody,tfoot",H),function(N){if(N.rows.length==0){G.remove(N)}});t();row=g[Math.min(g.length-1,L.y)];if(row){K.select(row[Math.min(row.length-1,L.x)].elm,true);K.collapse(true)}}function u(S,Q,U,R){var P,N,M,O,T;P=g[Q][S].elm.parentNode;for(M=1;M<=U;M++){P=G.getNext(P,"tr");if(P){for(N=S;N>=0;N--){T=g[Q+M][N].elm;if(T.parentNode==P){for(O=1;O<=R;O++){G.insertAfter(f(T),T)}break}}if(N==-1){for(O=1;O<=R;O++){P.insertBefore(f(P.cells[0]),P.cells[0])}}}}}function C(){e(g,function(M,N){e(M,function(P,O){var S,R,T,Q;if(j(P)){P=P.elm;S=a(P,"colspan");R=a(P,"rowspan");if(S>1||R>1){s(P,"rowSpan",1);s(P,"colSpan",1);for(Q=0;Q<S-1;Q++){G.insertAfter(f(P),P)}u(O,N,R-1,S)}}})})}function p(V,S,Y){var P,O,X,W,U,R,T,M,V,N,Q;if(V){pos=F(V);P=pos.x;O=pos.y;X=P+(S-1);W=O+(Y-1)}else{L=D=null;e(g,function(Z,aa){e(Z,function(ac,ab){if(j(ac)){if(!L){L={x:ab,y:aa}}D={x:ab,y:aa}}})});P=L.x;O=L.y;X=D.x;W=D.y}T=z(P,O);M=z(X,W);if(T&&M&&T.part==M.part){C();t();T=z(P,O).elm;s(T,"colSpan",(X-P)+1);s(T,"rowSpan",(W-O)+1);for(R=O;R<=W;R++){for(U=P;U<=X;U++){if(!g[R]||!g[R][U]){continue}V=g[R][U].elm;if(V!=T){N=d.grep(V.childNodes);e(N,function(Z){T.appendChild(Z)});if(N.length){N=d.grep(T.childNodes);Q=0;e(N,function(Z){if(Z.nodeName=="BR"&&G.getAttrib(Z,"data-mce-bogus")&&Q++<N.length-1){T.removeChild(Z)}})}G.remove(V)}}}q()}}function l(Q){var M,S,P,R,T,U,N,V,O;e(g,function(W,X){e(W,function(Z,Y){if(j(Z)){Z=Z.elm;T=Z.parentNode;U=A(T,false);M=X;if(Q){return false}}});if(Q){return !M}});for(R=0;R<g[0].length;R++){if(!g[M][R]){continue}S=g[M][R].elm;if(S!=P){if(!Q){O=a(S,"rowspan");if(O>1){s(S,"rowSpan",O+1);continue}}else{if(M>0&&g[M-1][R]){V=g[M-1][R].elm;O=a(V,"rowSpan");if(O>1){s(V,"rowSpan",O+1);continue}}}N=f(S);s(N,"colSpan",S.colSpan);U.appendChild(N);P=S}}if(U.hasChildNodes()){if(!Q){G.insertAfter(U,T)}else{T.parentNode.insertBefore(U,T)}}}function h(N){var O,M;e(g,function(P,Q){e(P,function(S,R){if(j(S)){O=R;if(N){return false}}});if(N){return !O}});e(g,function(S,T){var P,Q,R;if(!S[O]){return}P=S[O].elm;if(P!=M){R=a(P,"colspan");Q=a(P,"rowspan");if(R==1){if(!N){G.insertAfter(f(P),P);u(O,T,Q-1,R)}else{P.parentNode.insertBefore(f(P),P);u(O,T,Q-1,R)}}else{s(P,"colSpan",P.colSpan+1)}M=P}})}function n(){var M=[];e(g,function(N,O){e(N,function(Q,P){if(j(Q)&&d.inArray(M,P)===-1){e(g,function(T){var R=T[P].elm,S;S=a(R,"colSpan");if(S>1){s(R,"colSpan",S-1)}else{G.remove(R)}});M.push(P)}})});q()}function m(){var N;function M(Q){var P,R,O;P=G.getNext(Q,"tr");e(Q.cells,function(S){var T=a(S,"rowSpan");if(T>1){s(S,"rowSpan",T-1);R=F(S);u(R.x,R.y,1,1)}});R=F(Q.cells[0]);e(g[R.y],function(S){var T;S=S.elm;if(S!=O){T=a(S,"rowSpan");if(T<=1){G.remove(S)}else{s(S,"rowSpan",T-1)}O=S}})}N=k();e(N.reverse(),function(O){M(O)});q()}function E(){var M=k();G.remove(M);q();return M}function J(){var M=k();e(M,function(O,N){M[N]=A(O,true)});return M}function B(O,N){if(!O){return}var P=k(),M=P[N?0:P.length-1],Q=M.cells.length;e(g,function(S){var R;Q=0;e(S,function(U,T){if(U.real){Q+=U.colspan}if(U.elm.parentNode==M){R=1}});if(R){return false}});if(!N){O.reverse()}e(O,function(T){var S=T.cells.length,R;for(i=0;i<S;i++){R=T.cells[i];s(R,"colSpan",1);s(R,"rowSpan",1)}for(i=S;i<Q;i++){T.appendChild(f(T.cells[S-1]))}for(i=Q;i<S;i++){G.remove(T.cells[i])}if(N){M.parentNode.insertBefore(T,M)}else{G.insertAfter(T,M)}});G.removeClass(G.select("td.mceSelected,th.mceSelected"),"mceSelected")}function F(M){var N;e(g,function(O,P){e(O,function(R,Q){if(R.elm==M){N={x:Q,y:P};return false}});return !N});return N}function w(M){L=F(M)}function I(){var O,N,M;N=M=0;e(g,function(P,Q){e(P,function(S,R){var U,T;if(j(S)){S=g[Q][R];if(R>N){N=R}if(Q>M){M=Q}if(S.real){U=S.colspan-1;T=S.rowspan-1;if(U){if(R+U>N){N=R+U}}if(T){if(Q+T>M){M=Q+T}}}}})});return{x:N,y:M}}function v(S){var P,O,U,T,N,M,Q,R;D=F(S);if(L&&D){P=Math.min(L.x,D.x);O=Math.min(L.y,D.y);U=Math.max(L.x,D.x);T=Math.max(L.y,D.y);N=U;M=T;for(y=O;y<=M;y++){S=g[y][P];if(!S.real){if(P-(S.colspan-1)<P){P-=S.colspan-1}}}for(x=P;x<=N;x++){S=g[O][x];if(!S.real){if(O-(S.rowspan-1)<O){O-=S.rowspan-1}}}for(y=O;y<=T;y++){for(x=P;x<=U;x++){S=g[y][x];if(S.real){Q=S.colspan-1;R=S.rowspan-1;if(Q){if(x+Q>N){N=x+Q}}if(R){if(y+R>M){M=y+R}}}}}G.removeClass(G.select("td.mceSelected,th.mceSelected"),"mceSelected");for(y=O;y<=M;y++){for(x=P;x<=N;x++){if(g[y][x]){G.addClass(g[y][x].elm,"mceSelected")}}}}}d.extend(this,{deleteTable:r,split:C,merge:p,insertRow:l,insertCol:h,deleteCols:n,deleteRows:m,cutRows:E,copyRows:J,pasteRows:B,getPos:F,setStartCell:w,setEndCell:v})}d.create("tinymce.plugins.TablePlugin",{init:function(g,h){var f,m,j=true;function l(p){var o=g.selection,n=g.dom.getParent(p||o.getNode(),"table");if(n){return new b(n,g.dom,o)}}function k(){g.getBody().style.webkitUserSelect="";if(j){g.dom.removeClass(g.dom.select("td.mceSelected,th.mceSelected"),"mceSelected");j=false}}e([["table","table.desc","mceInsertTable",true],["delete_table","table.del","mceTableDelete"],["delete_col","table.delete_col_desc","mceTableDeleteCol"],["delete_row","table.delete_row_desc","mceTableDeleteRow"],["col_after","table.col_after_desc","mceTableInsertColAfter"],["col_before","table.col_before_desc","mceTableInsertColBefore"],["row_after","table.row_after_desc","mceTableInsertRowAfter"],["row_before","table.row_before_desc","mceTableInsertRowBefore"],["row_props","table.row_desc","mceTableRowProps",true],["cell_props","table.cell_desc","mceTableCellProps",true],["split_cells","table.split_cells_desc","mceTableSplitCells",true],["merge_cells","table.merge_cells_desc","mceTableMergeCells",true]],function(n){g.addButton(n[0],{title:n[1],cmd:n[2],ui:n[3]})});if(!d.isIE){g.onClick.add(function(n,o){o=o.target;if(o.nodeName==="TABLE"){n.selection.select(o);n.nodeChanged()}})}g.onPreProcess.add(function(o,p){var n,q,r,t=o.dom,s;n=t.select("table",p.node);q=n.length;while(q--){r=n[q];t.setAttrib(r,"data-mce-style","");if((s=t.getAttrib(r,"width"))){t.setStyle(r,"width",s);t.setAttrib(r,"width","")}if((s=t.getAttrib(r,"height"))){t.setStyle(r,"height",s);t.setAttrib(r,"height","")}}});g.onNodeChange.add(function(q,o,s){var r;s=q.selection.getStart();r=q.dom.getParent(s,"td,th,caption");o.setActive("table",s.nodeName==="TABLE"||!!r);if(r&&r.nodeName==="CAPTION"){r=0}o.setDisabled("delete_table",!r);o.setDisabled("delete_col",!r);o.setDisabled("delete_table",!r);o.setDisabled("delete_row",!r);o.setDisabled("col_after",!r);o.setDisabled("col_before",!r);o.setDisabled("row_after",!r);o.setDisabled("row_before",!r);o.setDisabled("row_props",!r);o.setDisabled("cell_props",!r);o.setDisabled("split_cells",!r);o.setDisabled("merge_cells",!r)});g.onInit.add(function(r){var p,t,q=r.dom,u;f=r.windowManager;r.onMouseDown.add(function(w,z){if(z.button!=2){k();t=q.getParent(z.target,"td,th");p=q.getParent(t,"table")}});q.bind(r.getDoc(),"mouseover",function(C){var A,z,B=C.target;if(t&&(u||B!=t)&&(B.nodeName=="TD"||B.nodeName=="TH")){z=q.getParent(B,"table");if(z==p){if(!u){u=l(z);u.setStartCell(t);r.getBody().style.webkitUserSelect="none"}u.setEndCell(B);j=true}A=r.selection.getSel();try{if(A.removeAllRanges){A.removeAllRanges()}else{A.empty()}}catch(w){}C.preventDefault()}});r.onMouseUp.add(function(F,G){var z,B=F.selection,H,I=B.getSel(),w,C,A,E;if(t){if(u){F.getBody().style.webkitUserSelect=""}function D(J,L){var K=new d.dom.TreeWalker(J,J);do{if(J.nodeType==3&&d.trim(J.nodeValue).length!=0){if(L){z.setStart(J,0)}else{z.setEnd(J,J.nodeValue.length)}return}if(J.nodeName=="BR"){if(L){z.setStartBefore(J)}else{z.setEndBefore(J)}return}}while(J=(L?K.next():K.prev()))}H=q.select("td.mceSelected,th.mceSelected");if(H.length>0){z=q.createRng();C=H[0];E=H[H.length-1];z.setStartBefore(C);z.setEndAfter(C);D(C,1);w=new d.dom.TreeWalker(C,q.getParent(H[0],"table"));do{if(C.nodeName=="TD"||C.nodeName=="TH"){if(!q.hasClass(C,"mceSelected")){break}A=C}}while(C=w.next());D(A);B.setRng(z)}F.nodeChanged();t=u=p=null}});r.onKeyUp.add(function(w,z){k()});r.onKeyDown.add(function(w,z){n(w)});r.onMouseDown.add(function(w,z){if(z.button!=2){n(w)}});function o(D,z,A,F){var B=3,G=D.dom.getParent(z.startContainer,"TABLE"),C,w,E;if(G){C=G.parentNode}w=z.startContainer.nodeType==B&&z.startOffset==0&&z.endOffset==0&&F&&(A.nodeName=="TR"||A==C);E=(A.nodeName=="TD"||A.nodeName=="TH")&&!F;return w||E}function n(A){if(!d.isWebKit){return}var z=A.selection.getRng();var C=A.selection.getNode();var B=A.dom.getParent(z.startContainer,"TD,TH");if(!o(A,z,C,B)){return}if(!B){B=C}var w=B.lastChild;while(w.lastChild){w=w.lastChild}z.setEnd(w,w.nodeValue.length);A.selection.setRng(z)}r.plugins.table.fixTableCellSelection=n;if(r&&r.plugins.contextmenu){r.plugins.contextmenu.onContextMenu.add(function(A,w,C){var D,B=r.selection,z=B.getNode()||r.getBody();if(r.dom.getParent(C,"td")||r.dom.getParent(C,"th")||r.dom.select("td.mceSelected,th.mceSelected").length){w.removeAll();if(z.nodeName=="A"&&!r.dom.getAttrib(z,"name")){w.add({title:"advanced.link_desc",icon:"link",cmd:r.plugins.advlink?"mceAdvLink":"mceLink",ui:true});w.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"});w.addSeparator()}if(z.nodeName=="IMG"&&z.className.indexOf("mceItem")==-1){w.add({title:"advanced.image_desc",icon:"image",cmd:r.plugins.advimage?"mceAdvImage":"mceImage",ui:true});w.addSeparator()}w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",value:{action:"insert"}});w.add({title:"table.props_desc",icon:"table_props",cmd:"mceInsertTable"});w.add({title:"table.del",icon:"delete_table",cmd:"mceTableDelete"});w.addSeparator();D=w.addMenu({title:"table.cell"});D.add({title:"table.cell_desc",icon:"cell_props",cmd:"mceTableCellProps"});D.add({title:"table.split_cells_desc",icon:"split_cells",cmd:"mceTableSplitCells"});D.add({title:"table.merge_cells_desc",icon:"merge_cells",cmd:"mceTableMergeCells"});D=w.addMenu({title:"table.row"});D.add({title:"table.row_desc",icon:"row_props",cmd:"mceTableRowProps"});D.add({title:"table.row_before_desc",icon:"row_before",cmd:"mceTableInsertRowBefore"});D.add({title:"table.row_after_desc",icon:"row_after",cmd:"mceTableInsertRowAfter"});D.add({title:"table.delete_row_desc",icon:"delete_row",cmd:"mceTableDeleteRow"});D.addSeparator();D.add({title:"table.cut_row_desc",icon:"cut",cmd:"mceTableCutRow"});D.add({title:"table.copy_row_desc",icon:"copy",cmd:"mceTableCopyRow"});D.add({title:"table.paste_row_before_desc",icon:"paste",cmd:"mceTablePasteRowBefore"}).setDisabled(!m);D.add({title:"table.paste_row_after_desc",icon:"paste",cmd:"mceTablePasteRowAfter"}).setDisabled(!m);D=w.addMenu({title:"table.col"});D.add({title:"table.col_before_desc",icon:"col_before",cmd:"mceTableInsertColBefore"});D.add({title:"table.col_after_desc",icon:"col_after",cmd:"mceTableInsertColAfter"});D.add({title:"table.delete_col_desc",icon:"delete_col",cmd:"mceTableDeleteCol"})}else{w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable"})}})}if(d.isWebKit){function v(C,N){var L=d.VK;var Q=N.keyCode;function O(Y,U,S){var T=Y?"previousSibling":"nextSibling";var Z=C.dom.getParent(U,"tr");var X=Z[T];if(X){z(C,U,X,Y);d.dom.Event.cancel(S);return true}else{var aa=C.dom.getParent(Z,"table");var W=Z.parentNode;var R=W.nodeName.toLowerCase();if(R==="tbody"||R===(Y?"tfoot":"thead")){var V=w(Y,aa,W,"tbody");if(V!==null){return K(Y,V,U,S)}}return M(Y,Z,T,aa,S)}}function w(V,T,U,X){var S=C.dom.select(">"+X,T);var R=S.indexOf(U);if(V&&R===0||!V&&R===S.length-1){return B(V,T)}else{if(R===-1){var W=U.tagName.toLowerCase()==="thead"?0:S.length-1;return S[W]}else{return S[R+(V?-1:1)]}}}function B(U,T){var S=U?"thead":"tfoot";var R=C.dom.select(">"+S,T);return R.length!==0?R[0]:null}function K(V,T,S,U){var R=J(T,V);R&&z(C,S,R,V);d.dom.Event.cancel(U);return true}function M(Y,U,R,X,W){var S=X[R];if(S){F(S);return true}else{var V=C.dom.getParent(X,"td,th");if(V){return O(Y,V,W)}else{var T=J(U,!Y);F(T);return d.dom.Event.cancel(W)}}}function J(S,R){var T=S&&S[R?"lastChild":"firstChild"];return T&&T.nodeName==="BR"?C.dom.getParent(T,"td,th"):T}function F(R){C.selection.setCursorLocation(R,0)}function A(){return Q==L.UP||Q==L.DOWN}function D(R){var T=R.selection.getNode();var S=R.dom.getParent(T,"tr");return S!==null}function P(S){var R=0;var T=S;while(T.previousSibling){T=T.previousSibling;R=R+a(T,"colspan")}return R}function E(T,R){var U=0;var S=0;e(T.children,function(V,W){U=U+a(V,"colspan");S=W;if(U>R){return false}});return S}function z(T,W,Y,V){var X=P(T.dom.getParent(W,"td,th"));var S=E(Y,X);var R=Y.childNodes[S];var U=J(R,V);F(U||R)}function H(R){var T=C.selection.getNode();var U=C.dom.getParent(T,"td,th");var S=C.dom.getParent(R,"td,th");return U&&U!==S&&I(U,S)}function I(S,R){return C.dom.getParent(S,"TABLE")===C.dom.getParent(R,"TABLE")}if(A()&&D(C)){var G=C.selection.getNode();setTimeout(function(){if(H(G)){O(!N.shiftKey&&Q===L.UP,G,N)}},0)}}r.onKeyDown.add(v)}function s(){var w;for(w=r.getBody().lastChild;w&&w.nodeType==3&&!w.nodeValue.length;w=w.previousSibling){}if(w&&w.nodeName=="TABLE"){if(r.settings.forced_root_block){r.dom.add(r.getBody(),r.settings.forced_root_block,null,d.isIE&&!d.isIE11?"&nbsp;":'<br data-mce-bogus="1" />')}else{r.dom.add(r.getBody(),"br",{"data-mce-bogus":"1"})}}}if(d.isGecko){r.onKeyDown.add(function(z,B){var w,A,C=z.dom;if(B.keyCode==37||B.keyCode==38){w=z.selection.getRng();A=C.getParent(w.startContainer,"table");if(A&&z.getBody().firstChild==A){if(c(w,A)){w=C.createRng();w.setStartBefore(A);w.setEndBefore(A);z.selection.setRng(w);B.preventDefault()}}}})}r.onKeyUp.add(s);r.onSetContent.add(s);r.onVisualAid.add(s);r.onPreProcess.add(function(w,A){var z=A.node.lastChild;if(z&&(z.nodeName=="BR"||(z.childNodes.length==1&&(z.firstChild.nodeName=="BR"||z.firstChild.nodeValue=="\u00a0")))&&z.previousSibling&&z.previousSibling.nodeName=="TABLE"){w.dom.remove(z)}});s();r.startContent=r.getContent({format:"raw"})});e({mceTableSplitCells:function(n){n.split()},mceTableMergeCells:function(o){var p,q,n;n=g.dom.getParent(g.selection.getNode(),"th,td");if(n){p=n.rowSpan;q=n.colSpan}if(!g.dom.select("td.mceSelected,th.mceSelected").length){f.open({url:h+"/merge_cells.htm",width:240+parseInt(g.getLang("table.merge_cells_delta_width",0)),height:110+parseInt(g.getLang("table.merge_cells_delta_height",0)),inline:1},{rows:p,cols:q,onaction:function(r){o.merge(n,r.cols,r.rows)},plugin_url:h})}else{o.merge()}},mceTableInsertRowBefore:function(n){n.insertRow(true)},mceTableInsertRowAfter:function(n){n.insertRow()},mceTableInsertColBefore:function(n){n.insertCol(true)},mceTableInsertColAfter:function(n){n.insertCol()},mceTableDeleteCol:function(n){n.deleteCols()},mceTableDeleteRow:function(n){n.deleteRows()},mceTableCutRow:function(n){m=n.cutRows()},mceTableCopyRow:function(n){m=n.copyRows()},mceTablePasteRowBefore:function(n){n.pasteRows(m,true)},mceTablePasteRowAfter:function(n){n.pasteRows(m)},mceTableDelete:function(n){n.deleteTable()}},function(o,n){g.addCommand(n,function(){var p=l();if(p){o(p);g.execCommand("mceRepaint");k()}})});e({mceInsertTable:function(n){f.open({url:h+"/table.htm",width:400+parseInt(g.getLang("table.table_delta_width",0)),height:320+parseInt(g.getLang("table.table_delta_height",0)),inline:1},{plugin_url:h,action:n?n.action:0})},mceTableRowProps:function(){f.open({url:h+"/row.htm",width:400+parseInt(g.getLang("table.rowprops_delta_width",0)),height:295+parseInt(g.getLang("table.rowprops_delta_height",0)),inline:1},{plugin_url:h})},mceTableCellProps:function(){f.open({url:h+"/cell.htm",width:400+parseInt(g.getLang("table.cellprops_delta_width",0)),height:295+parseInt(g.getLang("table.cellprops_delta_height",0)),inline:1},{plugin_url:h})}},function(o,n){g.addCommand(n,function(p,q){o(q)})})}});d.PluginManager.add("table",d.plugins.TablePlugin)})(tinymce);
 
mce/table/js/cell.js DELETED
@@ -1,319 +0,0 @@
1
- tinyMCEPopup.requireLangPack();
2
-
3
- var ed;
4
-
5
- function init() {
6
- ed = tinyMCEPopup.editor;
7
- tinyMCEPopup.resizeToInnerSize();
8
-
9
- document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
10
- document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor');
11
- document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor')
12
-
13
- var inst = ed;
14
- var tdElm = ed.dom.getParent(ed.selection.getStart(), "td,th");
15
- var formObj = document.forms[0];
16
- var st = ed.dom.parseStyle(ed.dom.getAttrib(tdElm, "style"));
17
-
18
- // Get table cell data
19
- var celltype = tdElm.nodeName.toLowerCase();
20
- var align = ed.dom.getAttrib(tdElm, 'align');
21
- var valign = ed.dom.getAttrib(tdElm, 'valign');
22
- var width = trimSize(getStyle(tdElm, 'width', 'width'));
23
- var height = trimSize(getStyle(tdElm, 'height', 'height'));
24
- var bordercolor = convertRGBToHex(getStyle(tdElm, 'bordercolor', 'borderLeftColor'));
25
- var bgcolor = convertRGBToHex(getStyle(tdElm, 'bgcolor', 'backgroundColor'));
26
- var className = ed.dom.getAttrib(tdElm, 'class');
27
- var backgroundimage = getStyle(tdElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
28
- var id = ed.dom.getAttrib(tdElm, 'id');
29
- var lang = ed.dom.getAttrib(tdElm, 'lang');
30
- var dir = ed.dom.getAttrib(tdElm, 'dir');
31
- var scope = ed.dom.getAttrib(tdElm, 'scope');
32
-
33
- // Setup form
34
- addClassesToList('class', 'table_cell_styles');
35
- TinyMCE_EditableSelects.init();
36
-
37
- if (!ed.dom.hasClass(tdElm, 'mceSelected')) {
38
- formObj.bordercolor.value = bordercolor;
39
- formObj.bgcolor.value = bgcolor;
40
- formObj.backgroundimage.value = backgroundimage;
41
- formObj.width.value = width;
42
- formObj.height.value = height;
43
- formObj.id.value = id;
44
- formObj.lang.value = lang;
45
- formObj.style.value = ed.dom.serializeStyle(st);
46
- selectByValue(formObj, 'align', align);
47
- selectByValue(formObj, 'valign', valign);
48
- selectByValue(formObj, 'class', className, true, true);
49
- selectByValue(formObj, 'celltype', celltype);
50
- selectByValue(formObj, 'dir', dir);
51
- selectByValue(formObj, 'scope', scope);
52
-
53
- // Resize some elements
54
- if (isVisible('backgroundimagebrowser'))
55
- document.getElementById('backgroundimage').style.width = '180px';
56
-
57
- updateColor('bordercolor_pick', 'bordercolor');
58
- updateColor('bgcolor_pick', 'bgcolor');
59
- } else
60
- tinyMCEPopup.dom.hide('action');
61
- }
62
-
63
- function updateAction() {
64
- var el, inst = ed, tdElm, trElm, tableElm, formObj = document.forms[0];
65
-
66
- if (!AutoValidator.validate(formObj)) {
67
- tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.');
68
- return false;
69
- }
70
-
71
- tinyMCEPopup.restoreSelection();
72
- el = ed.selection.getStart();
73
- tdElm = ed.dom.getParent(el, "td,th");
74
- trElm = ed.dom.getParent(el, "tr");
75
- tableElm = ed.dom.getParent(el, "table");
76
-
77
- // Cell is selected
78
- if (ed.dom.hasClass(tdElm, 'mceSelected')) {
79
- // Update all selected sells
80
- tinymce.each(ed.dom.select('td.mceSelected,th.mceSelected'), function(td) {
81
- updateCell(td);
82
- });
83
-
84
- ed.addVisual();
85
- ed.nodeChanged();
86
- inst.execCommand('mceEndUndoLevel');
87
- tinyMCEPopup.close();
88
- return;
89
- }
90
-
91
- switch (getSelectValue(formObj, 'action')) {
92
- case "cell":
93
- var celltype = getSelectValue(formObj, 'celltype');
94
- var scope = getSelectValue(formObj, 'scope');
95
-
96
- function doUpdate(s) {
97
- if (s) {
98
- updateCell(tdElm);
99
-
100
- ed.addVisual();
101
- ed.nodeChanged();
102
- inst.execCommand('mceEndUndoLevel');
103
- tinyMCEPopup.close();
104
- }
105
- };
106
-
107
- if (ed.getParam("accessibility_warnings", 1)) {
108
- if (celltype == "th" && scope == "")
109
- tinyMCEPopup.confirm(ed.getLang('table_dlg.missing_scope', '', true), doUpdate);
110
- else
111
- doUpdate(1);
112
-
113
- return;
114
- }
115
-
116
- updateCell(tdElm);
117
- break;
118
-
119
- case "row":
120
- var cell = trElm.firstChild;
121
-
122
- if (cell.nodeName != "TD" && cell.nodeName != "TH")
123
- cell = nextCell(cell);
124
-
125
- do {
126
- cell = updateCell(cell, true);
127
- } while ((cell = nextCell(cell)) != null);
128
-
129
- break;
130
-
131
- case "col":
132
- var curr, col = 0, cell = trElm.firstChild, rows = tableElm.getElementsByTagName("tr");
133
-
134
- if (cell.nodeName != "TD" && cell.nodeName != "TH")
135
- cell = nextCell(cell);
136
-
137
- do {
138
- if (cell == tdElm)
139
- break;
140
- col += cell.getAttribute("colspan")?cell.getAttribute("colspan"):1;
141
- } while ((cell = nextCell(cell)) != null);
142
-
143
- for (var i=0; i<rows.length; i++) {
144
- cell = rows[i].firstChild;
145
-
146
- if (cell.nodeName != "TD" && cell.nodeName != "TH")
147
- cell = nextCell(cell);
148
-
149
- curr = 0;
150
- do {
151
- if (curr == col) {
152
- cell = updateCell(cell, true);
153
- break;
154
- }
155
- curr += cell.getAttribute("colspan")?cell.getAttribute("colspan"):1;
156
- } while ((cell = nextCell(cell)) != null);
157
- }
158
-
159
- break;
160
-
161
- case "all":
162
- var rows = tableElm.getElementsByTagName("tr");
163
-
164
- for (var i=0; i<rows.length; i++) {
165
- var cell = rows[i].firstChild;
166
-
167
- if (cell.nodeName != "TD" && cell.nodeName != "TH")
168
- cell = nextCell(cell);
169
-
170
- do {
171
- cell = updateCell(cell, true);
172
- } while ((cell = nextCell(cell)) != null);
173
- }
174
-
175
- break;
176
- }
177
-
178
- ed.addVisual();
179
- ed.nodeChanged();
180
- inst.execCommand('mceEndUndoLevel');
181
- tinyMCEPopup.close();
182
- }
183
-
184
- function nextCell(elm) {
185
- while ((elm = elm.nextSibling) != null) {
186
- if (elm.nodeName == "TD" || elm.nodeName == "TH")
187
- return elm;
188
- }
189
-
190
- return null;
191
- }
192
-
193
- function updateCell(td, skip_id) {
194
- var inst = ed;
195
- var formObj = document.forms[0];
196
- var curCellType = td.nodeName.toLowerCase();
197
- var celltype = getSelectValue(formObj, 'celltype');
198
- var doc = inst.getDoc();
199
- var dom = ed.dom;
200
-
201
- if (!skip_id)
202
- dom.setAttrib(td, 'id', formObj.id.value);
203
-
204
- dom.setAttrib(td, 'align', formObj.align.value);
205
- dom.setAttrib(td, 'vAlign', formObj.valign.value);
206
- dom.setAttrib(td, 'lang', formObj.lang.value);
207
- dom.setAttrib(td, 'dir', getSelectValue(formObj, 'dir'));
208
- dom.setAttrib(td, 'style', ed.dom.serializeStyle(ed.dom.parseStyle(formObj.style.value)));
209
- dom.setAttrib(td, 'scope', formObj.scope.value);
210
- dom.setAttrib(td, 'class', getSelectValue(formObj, 'class'));
211
-
212
- // Clear deprecated attributes
213
- ed.dom.setAttrib(td, 'width', '');
214
- ed.dom.setAttrib(td, 'height', '');
215
- ed.dom.setAttrib(td, 'bgColor', '');
216
- ed.dom.setAttrib(td, 'borderColor', '');
217
- ed.dom.setAttrib(td, 'background', '');
218
-
219
- // Set styles
220
- td.style.width = getCSSSize(formObj.width.value);
221
- td.style.height = getCSSSize(formObj.height.value);
222
- if (formObj.bordercolor.value != "") {
223
- td.style.borderColor = formObj.bordercolor.value;
224
- td.style.borderStyle = td.style.borderStyle == "" ? "solid" : td.style.borderStyle;
225
- td.style.borderWidth = td.style.borderWidth == "" ? "1px" : td.style.borderWidth;
226
- } else
227
- td.style.borderColor = '';
228
-
229
- td.style.backgroundColor = formObj.bgcolor.value;
230
-
231
- if (formObj.backgroundimage.value != "")
232
- td.style.backgroundImage = "url('" + formObj.backgroundimage.value + "')";
233
- else
234
- td.style.backgroundImage = '';
235
-
236
- if (curCellType != celltype) {
237
- // changing to a different node type
238
- var newCell = doc.createElement(celltype);
239
-
240
- for (var c=0; c<td.childNodes.length; c++)
241
- newCell.appendChild(td.childNodes[c].cloneNode(1));
242
-
243
- for (var a=0; a<td.attributes.length; a++)
244
- ed.dom.setAttrib(newCell, td.attributes[a].name, ed.dom.getAttrib(td, td.attributes[a].name));
245
-
246
- td.parentNode.replaceChild(newCell, td);
247
- td = newCell;
248
- }
249
-
250
- dom.setAttrib(td, 'style', dom.serializeStyle(dom.parseStyle(td.style.cssText)));
251
-
252
- return td;
253
- }
254
-
255
- function changedBackgroundImage() {
256
- var formObj = document.forms[0];
257
- var st = ed.dom.parseStyle(formObj.style.value);
258
-
259
- st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
260
-
261
- formObj.style.value = ed.dom.serializeStyle(st);
262
- }
263
-
264
- function changedSize() {
265
- var formObj = document.forms[0];
266
- var st = ed.dom.parseStyle(formObj.style.value);
267
-
268
- var width = formObj.width.value;
269
- if (width != "")
270
- st['width'] = getCSSSize(width);
271
- else
272
- st['width'] = "";
273
-
274
- var height = formObj.height.value;
275
- if (height != "")
276
- st['height'] = getCSSSize(height);
277
- else
278
- st['height'] = "";
279
-
280
- formObj.style.value = ed.dom.serializeStyle(st);
281
- }
282
-
283
- function changedColor() {
284
- var formObj = document.forms[0];
285
- var st = ed.dom.parseStyle(formObj.style.value);
286
-
287
- st['background-color'] = formObj.bgcolor.value;
288
- st['border-color'] = formObj.bordercolor.value;
289
-
290
- formObj.style.value = ed.dom.serializeStyle(st);
291
- }
292
-
293
- function changedStyle() {
294
- var formObj = document.forms[0];
295
- var st = ed.dom.parseStyle(formObj.style.value);
296
-
297
- if (st['background-image'])
298
- formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
299
- else
300
- formObj.backgroundimage.value = '';
301
-
302
- if (st['width'])
303
- formObj.width.value = trimSize(st['width']);
304
-
305
- if (st['height'])
306
- formObj.height.value = trimSize(st['height']);
307
-
308
- if (st['background-color']) {
309
- formObj.bgcolor.value = st['background-color'];
310
- updateColor('bgcolor_pick','bgcolor');
311
- }
312
-
313
- if (st['border-color']) {
314
- formObj.bordercolor.value = st['border-color'];
315
- updateColor('bordercolor_pick','bordercolor');
316
- }
317
- }
318
-
319
- tinyMCEPopup.onInit.add(init);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/table/js/merge_cells.js DELETED
@@ -1,27 +0,0 @@
1
- tinyMCEPopup.requireLangPack();
2
-
3
- var MergeCellsDialog = {
4
- init : function() {
5
- var f = document.forms[0];
6
-
7
- f.numcols.value = tinyMCEPopup.getWindowArg('cols', 1);
8
- f.numrows.value = tinyMCEPopup.getWindowArg('rows', 1);
9
- },
10
-
11
- merge : function() {
12
- var func, f = document.forms[0];
13
-
14
- tinyMCEPopup.restoreSelection();
15
-
16
- func = tinyMCEPopup.getWindowArg('onaction');
17
-
18
- func({
19
- cols : f.numcols.value,
20
- rows : f.numrows.value
21
- });
22
-
23
- tinyMCEPopup.close();
24
- }
25
- };
26
-
27
- tinyMCEPopup.onInit.add(MergeCellsDialog.init, MergeCellsDialog);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/table/js/row.js DELETED
@@ -1,254 +0,0 @@
1
- tinyMCEPopup.requireLangPack();
2
-
3
- function init() {
4
- tinyMCEPopup.resizeToInnerSize();
5
-
6
- document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
7
- document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
8
-
9
- var inst = tinyMCEPopup.editor;
10
- var dom = inst.dom;
11
- var trElm = dom.getParent(inst.selection.getStart(), "tr");
12
- var formObj = document.forms[0];
13
- var st = dom.parseStyle(dom.getAttrib(trElm, "style"));
14
-
15
- // Get table row data
16
- var rowtype = trElm.parentNode.nodeName.toLowerCase();
17
- var align = dom.getAttrib(trElm, 'align');
18
- var valign = dom.getAttrib(trElm, 'valign');
19
- var height = trimSize(getStyle(trElm, 'height', 'height'));
20
- var className = dom.getAttrib(trElm, 'class');
21
- var bgcolor = convertRGBToHex(getStyle(trElm, 'bgcolor', 'backgroundColor'));
22
- var backgroundimage = getStyle(trElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
23
- var id = dom.getAttrib(trElm, 'id');
24
- var lang = dom.getAttrib(trElm, 'lang');
25
- var dir = dom.getAttrib(trElm, 'dir');
26
-
27
- selectByValue(formObj, 'rowtype', rowtype);
28
- setActionforRowType(formObj, rowtype);
29
-
30
- // Any cells selected
31
- if (dom.select('td.mceSelected,th.mceSelected', trElm).length == 0) {
32
- // Setup form
33
- addClassesToList('class', 'table_row_styles');
34
- TinyMCE_EditableSelects.init();
35
-
36
- formObj.bgcolor.value = bgcolor;
37
- formObj.backgroundimage.value = backgroundimage;
38
- formObj.height.value = height;
39
- formObj.id.value = id;
40
- formObj.lang.value = lang;
41
- formObj.style.value = dom.serializeStyle(st);
42
- selectByValue(formObj, 'align', align);
43
- selectByValue(formObj, 'valign', valign);
44
- selectByValue(formObj, 'class', className, true, true);
45
- selectByValue(formObj, 'dir', dir);
46
-
47
- // Resize some elements
48
- if (isVisible('backgroundimagebrowser'))
49
- document.getElementById('backgroundimage').style.width = '180px';
50
-
51
- updateColor('bgcolor_pick', 'bgcolor');
52
- } else
53
- tinyMCEPopup.dom.hide('action');
54
- }
55
-
56
- function updateAction() {
57
- var inst = tinyMCEPopup.editor, dom = inst.dom, trElm, tableElm, formObj = document.forms[0];
58
- var action = getSelectValue(formObj, 'action');
59
-
60
- if (!AutoValidator.validate(formObj)) {
61
- tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.');
62
- return false;
63
- }
64
-
65
- tinyMCEPopup.restoreSelection();
66
- trElm = dom.getParent(inst.selection.getStart(), "tr");
67
- tableElm = dom.getParent(inst.selection.getStart(), "table");
68
-
69
- // Update all selected rows
70
- if (dom.select('td.mceSelected,th.mceSelected', trElm).length > 0) {
71
- tinymce.each(tableElm.rows, function(tr) {
72
- var i;
73
-
74
- for (i = 0; i < tr.cells.length; i++) {
75
- if (dom.hasClass(tr.cells[i], 'mceSelected')) {
76
- updateRow(tr, true);
77
- return;
78
- }
79
- }
80
- });
81
-
82
- inst.addVisual();
83
- inst.nodeChanged();
84
- inst.execCommand('mceEndUndoLevel');
85
- tinyMCEPopup.close();
86
- return;
87
- }
88
-
89
- switch (action) {
90
- case "row":
91
- updateRow(trElm);
92
- break;
93
-
94
- case "all":
95
- var rows = tableElm.getElementsByTagName("tr");
96
-
97
- for (var i=0; i<rows.length; i++)
98
- updateRow(rows[i], true);
99
-
100
- break;
101
-
102
- case "odd":
103
- case "even":
104
- var rows = tableElm.getElementsByTagName("tr");
105
-
106
- for (var i=0; i<rows.length; i++) {
107
- if ((i % 2 == 0 && action == "odd") || (i % 2 != 0 && action == "even"))
108
- updateRow(rows[i], true, true);
109
- }
110
-
111
- break;
112
- }
113
-
114
- inst.addVisual();
115
- inst.nodeChanged();
116
- inst.execCommand('mceEndUndoLevel');
117
- tinyMCEPopup.close();
118
- }
119
-
120
- function updateRow(tr_elm, skip_id, skip_parent) {
121
- var inst = tinyMCEPopup.editor;
122
- var formObj = document.forms[0];
123
- var dom = inst.dom;
124
- var curRowType = tr_elm.parentNode.nodeName.toLowerCase();
125
- var rowtype = getSelectValue(formObj, 'rowtype');
126
- var doc = inst.getDoc();
127
-
128
- // Update row element
129
- if (!skip_id)
130
- dom.setAttrib(tr_elm, 'id', formObj.id.value);
131
-
132
- dom.setAttrib(tr_elm, 'align', getSelectValue(formObj, 'align'));
133
- dom.setAttrib(tr_elm, 'vAlign', getSelectValue(formObj, 'valign'));
134
- dom.setAttrib(tr_elm, 'lang', formObj.lang.value);
135
- dom.setAttrib(tr_elm, 'dir', getSelectValue(formObj, 'dir'));
136
- dom.setAttrib(tr_elm, 'style', dom.serializeStyle(dom.parseStyle(formObj.style.value)));
137
- dom.setAttrib(tr_elm, 'class', getSelectValue(formObj, 'class'));
138
-
139
- // Clear deprecated attributes
140
- dom.setAttrib(tr_elm, 'background', '');
141
- dom.setAttrib(tr_elm, 'bgColor', '');
142
- dom.setAttrib(tr_elm, 'height', '');
143
-
144
- // Set styles
145
- tr_elm.style.height = getCSSSize(formObj.height.value);
146
- tr_elm.style.backgroundColor = formObj.bgcolor.value;
147
-
148
- if (formObj.backgroundimage.value != "")
149
- tr_elm.style.backgroundImage = "url('" + formObj.backgroundimage.value + "')";
150
- else
151
- tr_elm.style.backgroundImage = '';
152
-
153
- // Setup new rowtype
154
- if (curRowType != rowtype && !skip_parent) {
155
- // first, clone the node we are working on
156
- var newRow = tr_elm.cloneNode(1);
157
-
158
- // next, find the parent of its new destination (creating it if necessary)
159
- var theTable = dom.getParent(tr_elm, "table");
160
- var dest = rowtype;
161
- var newParent = null;
162
- for (var i = 0; i < theTable.childNodes.length; i++) {
163
- if (theTable.childNodes[i].nodeName.toLowerCase() == dest)
164
- newParent = theTable.childNodes[i];
165
- }
166
-
167
- if (newParent == null) {
168
- newParent = doc.createElement(dest);
169
-
170
- if (theTable.firstChild.nodeName == 'CAPTION')
171
- inst.dom.insertAfter(newParent, theTable.firstChild);
172
- else
173
- theTable.insertBefore(newParent, theTable.firstChild);
174
- }
175
-
176
- // append the row to the new parent
177
- newParent.appendChild(newRow);
178
-
179
- // remove the original
180
- tr_elm.parentNode.removeChild(tr_elm);
181
-
182
- // set tr_elm to the new node
183
- tr_elm = newRow;
184
- }
185
-
186
- dom.setAttrib(tr_elm, 'style', dom.serializeStyle(dom.parseStyle(tr_elm.style.cssText)));
187
- }
188
-
189
- function changedBackgroundImage() {
190
- var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
191
- var st = dom.parseStyle(formObj.style.value);
192
-
193
- st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
194
-
195
- formObj.style.value = dom.serializeStyle(st);
196
- }
197
-
198
- function changedStyle() {
199
- var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
200
- var st = dom.parseStyle(formObj.style.value);
201
-
202
- if (st['background-image'])
203
- formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
204
- else
205
- formObj.backgroundimage.value = '';
206
-
207
- if (st['height'])
208
- formObj.height.value = trimSize(st['height']);
209
-
210
- if (st['background-color']) {
211
- formObj.bgcolor.value = st['background-color'];
212
- updateColor('bgcolor_pick','bgcolor');
213
- }
214
- }
215
-
216
- function changedSize() {
217
- var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
218
- var st = dom.parseStyle(formObj.style.value);
219
-
220
- var height = formObj.height.value;
221
- if (height != "")
222
- st['height'] = getCSSSize(height);
223
- else
224
- st['height'] = "";
225
-
226
- formObj.style.value = dom.serializeStyle(st);
227
- }
228
-
229
- function changedColor() {
230
- var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
231
- var st = dom.parseStyle(formObj.style.value);
232
-
233
- st['background-color'] = formObj.bgcolor.value;
234
-
235
- formObj.style.value = dom.serializeStyle(st);
236
- }
237
-
238
- function changedRowType() {
239
- var formObj = document.forms[0];
240
- var rowtype = getSelectValue(formObj, 'rowtype');
241
-
242
- setActionforRowType(formObj, rowtype);
243
-
244
- }
245
-
246
- function setActionforRowType(formObj, rowtype) {
247
- if (rowtype === "tbody") {
248
- formObj.action.disabled = false;
249
- } else {
250
- selectByValue(formObj, 'action', "row");
251
- formObj.action.disabled = true;
252
- }
253
- }
254
- tinyMCEPopup.onInit.add(init);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/table/js/table.js DELETED
@@ -1,501 +0,0 @@
1
- tinyMCEPopup.requireLangPack();
2
-
3
- var action, orgTableWidth, orgTableHeight, dom = tinyMCEPopup.editor.dom;
4
-
5
- function insertTable() {
6
- var formObj = document.forms[0];
7
- var inst = tinyMCEPopup.editor, dom = inst.dom;
8
- var cols = 2, rows = 2, border = 0, cellpadding = -1, cellspacing = -1, align, width, height, className, caption, frame, rules;
9
- var html = '', capEl, elm;
10
- var cellLimit, rowLimit, colLimit;
11
-
12
- tinyMCEPopup.restoreSelection();
13
-
14
- if (!AutoValidator.validate(formObj)) {
15
- tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.');
16
- return false;
17
- }
18
-
19
- elm = dom.getParent(inst.selection.getNode(), 'table');
20
-
21
- // Get form data
22
- cols = formObj.elements['cols'].value;
23
- rows = formObj.elements['rows'].value;
24
- border = formObj.elements['border'].value != "" ? formObj.elements['border'].value : 0;
25
- cellpadding = formObj.elements['cellpadding'].value != "" ? formObj.elements['cellpadding'].value : "";
26
- cellspacing = formObj.elements['cellspacing'].value != "" ? formObj.elements['cellspacing'].value : "";
27
- align = getSelectValue(formObj, "align");
28
- frame = getSelectValue(formObj, "tframe");
29
- rules = getSelectValue(formObj, "rules");
30
- width = formObj.elements['width'].value;
31
- height = formObj.elements['height'].value;
32
- bordercolor = formObj.elements['bordercolor'].value;
33
- bgcolor = formObj.elements['bgcolor'].value;
34
- className = getSelectValue(formObj, "class");
35
- id = formObj.elements['id'].value;
36
- summary = formObj.elements['summary'].value;
37
- style = formObj.elements['style'].value;
38
- dir = formObj.elements['dir'].value;
39
- lang = formObj.elements['lang'].value;
40
- background = formObj.elements['backgroundimage'].value;
41
- caption = formObj.elements['caption'].checked;
42
-
43
- cellLimit = tinyMCEPopup.getParam('table_cell_limit', false);
44
- rowLimit = tinyMCEPopup.getParam('table_row_limit', false);
45
- colLimit = tinyMCEPopup.getParam('table_col_limit', false);
46
-
47
- // Validate table size
48
- if (colLimit && cols > colLimit) {
49
- tinyMCEPopup.alert(inst.getLang('table_dlg.col_limit').replace(/\{\$cols\}/g, colLimit));
50
- return false;
51
- } else if (rowLimit && rows > rowLimit) {
52
- tinyMCEPopup.alert(inst.getLang('table_dlg.row_limit').replace(/\{\$rows\}/g, rowLimit));
53
- return false;
54
- } else if (cellLimit && cols * rows > cellLimit) {
55
- tinyMCEPopup.alert(inst.getLang('table_dlg.cell_limit').replace(/\{\$cells\}/g, cellLimit));
56
- return false;
57
- }
58
-
59
- // Update table
60
- if (action == "update") {
61
- dom.setAttrib(elm, 'cellPadding', cellpadding, true);
62
- dom.setAttrib(elm, 'cellSpacing', cellspacing, true);
63
-
64
- if (!isCssSize(border)) {
65
- dom.setAttrib(elm, 'border', border);
66
- } else {
67
- dom.setAttrib(elm, 'border', '');
68
- }
69
-
70
- if (border == '') {
71
- dom.setStyle(elm, 'border-width', '');
72
- dom.setStyle(elm, 'border', '');
73
- dom.setAttrib(elm, 'border', '');
74
- }
75
-
76
- dom.setAttrib(elm, 'align', align);
77
- dom.setAttrib(elm, 'frame', frame);
78
- dom.setAttrib(elm, 'rules', rules);
79
- dom.setAttrib(elm, 'class', className);
80
- dom.setAttrib(elm, 'style', style);
81
- dom.setAttrib(elm, 'id', id);
82
- dom.setAttrib(elm, 'summary', summary);
83
- dom.setAttrib(elm, 'dir', dir);
84
- dom.setAttrib(elm, 'lang', lang);
85
-
86
- capEl = inst.dom.select('caption', elm)[0];
87
-
88
- if (capEl && !caption)
89
- capEl.parentNode.removeChild(capEl);
90
-
91
- if (!capEl && caption) {
92
- capEl = elm.ownerDocument.createElement('caption');
93
-
94
- if (!tinymce.isIE || tinymce.isIE11)
95
- capEl.innerHTML = '<br data-mce-bogus="1"/>';
96
-
97
- elm.insertBefore(capEl, elm.firstChild);
98
- }
99
-
100
- if (width && inst.settings.inline_styles) {
101
- dom.setStyle(elm, 'width', width);
102
- dom.setAttrib(elm, 'width', '');
103
- } else {
104
- dom.setAttrib(elm, 'width', width, true);
105
- dom.setStyle(elm, 'width', '');
106
- }
107
-
108
- // Remove these since they are not valid XHTML
109
- dom.setAttrib(elm, 'borderColor', '');
110
- dom.setAttrib(elm, 'bgColor', '');
111
- dom.setAttrib(elm, 'background', '');
112
-
113
- if (height && inst.settings.inline_styles) {
114
- dom.setStyle(elm, 'height', height);
115
- dom.setAttrib(elm, 'height', '');
116
- } else {
117
- dom.setAttrib(elm, 'height', height, true);
118
- dom.setStyle(elm, 'height', '');
119
- }
120
-
121
- if (background != '')
122
- elm.style.backgroundImage = "url('" + background + "')";
123
- else
124
- elm.style.backgroundImage = '';
125
-
126
- /* if (tinyMCEPopup.getParam("inline_styles")) {
127
- if (width != '')
128
- elm.style.width = getCSSSize(width);
129
- }*/
130
-
131
- if (bordercolor != "") {
132
- elm.style.borderColor = bordercolor;
133
- elm.style.borderStyle = elm.style.borderStyle == "" ? "solid" : elm.style.borderStyle;
134
- elm.style.borderWidth = cssSize(border);
135
- } else
136
- elm.style.borderColor = '';
137
-
138
- elm.style.backgroundColor = bgcolor;
139
- elm.style.height = getCSSSize(height);
140
-
141
- inst.addVisual();
142
-
143
- // Fix for stange MSIE align bug
144
- //elm.outerHTML = elm.outerHTML;
145
-
146
- inst.nodeChanged();
147
- inst.execCommand('mceEndUndoLevel', false, {}, {skip_undo: true});
148
-
149
- // Repaint if dimensions changed
150
- if (formObj.width.value != orgTableWidth || formObj.height.value != orgTableHeight)
151
- inst.execCommand('mceRepaint');
152
-
153
- tinyMCEPopup.close();
154
- return true;
155
- }
156
-
157
- // Create new table
158
- html += '<table';
159
-
160
- html += makeAttrib('id', id);
161
- if (!isCssSize(border)) {
162
- html += makeAttrib('border', border);
163
- }
164
-
165
- html += makeAttrib('cellpadding', cellpadding);
166
- html += makeAttrib('cellspacing', cellspacing);
167
- html += makeAttrib('data-mce-new', '1');
168
-
169
- if (width && inst.settings.inline_styles) {
170
- if (style)
171
- style += '; ';
172
-
173
- // Force px
174
- if (/^[0-9\.]+$/.test(width))
175
- width += 'px';
176
-
177
- style += 'width: ' + width;
178
- } else
179
- html += makeAttrib('width', width);
180
-
181
- /* if (height) {
182
- if (style)
183
- style += '; ';
184
-
185
- style += 'height: ' + height;
186
- }*/
187
-
188
- //html += makeAttrib('height', height);
189
- //html += makeAttrib('bordercolor', bordercolor);
190
- //html += makeAttrib('bgcolor', bgcolor);
191
- html += makeAttrib('align', align);
192
- html += makeAttrib('frame', frame);
193
- html += makeAttrib('rules', rules);
194
- html += makeAttrib('class', className);
195
- html += makeAttrib('style', style);
196
- html += makeAttrib('summary', summary);
197
- html += makeAttrib('dir', dir);
198
- html += makeAttrib('lang', lang);
199
- html += '>';
200
-
201
- if (caption) {
202
- if (!tinymce.isIE || tinymce.isIE11)
203
- html += '<caption><br data-mce-bogus="1"/></caption>';
204
- else
205
- html += '<caption></caption>';
206
- }
207
-
208
- for (var y=0; y<rows; y++) {
209
- html += "<tr>";
210
-
211
- for (var x=0; x<cols; x++) {
212
- if (!tinymce.isIE || tinymce.isIE11)
213
- html += '<td><br data-mce-bogus="1"/></td>';
214
- else
215
- html += '<td></td>';
216
- }
217
-
218
- html += "</tr>";
219
- }
220
-
221
- html += "</table>";
222
-
223
- // Move table
224
- if (inst.settings.fix_table_elements) {
225
- var patt = '';
226
-
227
- inst.focus();
228
- inst.selection.setContent('<br class="_mce_marker" />');
229
-
230
- tinymce.each('h1,h2,h3,h4,h5,h6,p'.split(','), function(n) {
231
- if (patt)
232
- patt += ',';
233
-
234
- patt += n + ' ._mce_marker';
235
- });
236
-
237
- tinymce.each(inst.dom.select(patt), function(n) {
238
- inst.dom.split(inst.dom.getParent(n, 'h1,h2,h3,h4,h5,h6,p'), n);
239
- });
240
-
241
- dom.setOuterHTML(dom.select('br._mce_marker')[0], html);
242
- } else
243
- inst.execCommand('mceInsertContent', false, html);
244
-
245
- tinymce.each(dom.select('table[data-mce-new]'), function(node) {
246
- var tdorth = dom.select('td,th', node);
247
-
248
- // Fixes a bug in IE where the caret cannot be placed after the table if the table is at the end of the document
249
- if (tinymce.isIE && !tinymce.isIE11 && node.nextSibling == null) {
250
- if (inst.settings.forced_root_block)
251
- dom.insertAfter(dom.create(inst.settings.forced_root_block), node);
252
- else
253
- dom.insertAfter(dom.create('br', {'data-mce-bogus': '1'}), node);
254
- }
255
-
256
- try {
257
- // IE9 might fail to do this selection
258
- inst.selection.setCursorLocation(tdorth[0], 0);
259
- } catch (ex) {
260
- // Ignore
261
- }
262
-
263
- dom.setAttrib(node, 'data-mce-new', '');
264
- });
265
-
266
- inst.addVisual();
267
- inst.execCommand('mceEndUndoLevel', false, {}, {skip_undo: true});
268
-
269
- tinyMCEPopup.close();
270
- }
271
-
272
- function makeAttrib(attrib, value) {
273
- var formObj = document.forms[0];
274
- var valueElm = formObj.elements[attrib];
275
-
276
- if (typeof(value) == "undefined" || value == null) {
277
- value = "";
278
-
279
- if (valueElm)
280
- value = valueElm.value;
281
- }
282
-
283
- if (value == "")
284
- return "";
285
-
286
- // XML encode it
287
- value = value.replace(/&/g, '&amp;');
288
- value = value.replace(/\"/g, '&quot;');
289
- value = value.replace(/</g, '&lt;');
290
- value = value.replace(/>/g, '&gt;');
291
-
292
- return ' ' + attrib + '="' + value + '"';
293
- }
294
-
295
- function init() {
296
- tinyMCEPopup.resizeToInnerSize();
297
-
298
- document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
299
- document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
300
- document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor');
301
- document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
302
-
303
- var cols = 2, rows = 2, border = tinyMCEPopup.getParam('table_default_border', '0'), cellpadding = tinyMCEPopup.getParam('table_default_cellpadding', ''), cellspacing = tinyMCEPopup.getParam('table_default_cellspacing', '');
304
- var align = "", width = "", height = "", bordercolor = "", bgcolor = "", className = "";
305
- var id = "", summary = "", style = "", dir = "", lang = "", background = "", bgcolor = "", bordercolor = "", rules = "", frame = "";
306
- var inst = tinyMCEPopup.editor, dom = inst.dom;
307
- var formObj = document.forms[0];
308
- var elm = dom.getParent(inst.selection.getNode(), "table");
309
-
310
- // Hide advanced fields that isn't available in the schema
311
- tinymce.each("summary id rules dir style frame".split(" "), function(name) {
312
- var tr = tinyMCEPopup.dom.getParent(name, "tr") || tinyMCEPopup.dom.getParent("t" + name, "tr");
313
-
314
- if (tr && !tinyMCEPopup.editor.schema.isValid("table", name)) {
315
- tr.style.display = 'none';
316
- }
317
- });
318
-
319
- action = tinyMCEPopup.getWindowArg('action');
320
-
321
- if (!action)
322
- action = elm ? "update" : "insert";
323
-
324
- if (elm && action != "insert") {
325
- var rowsAr = elm.rows;
326
- var cols = 0;
327
- for (var i=0; i<rowsAr.length; i++)
328
- if (rowsAr[i].cells.length > cols)
329
- cols = rowsAr[i].cells.length;
330
-
331
- cols = cols;
332
- rows = rowsAr.length;
333
-
334
- st = dom.parseStyle(dom.getAttrib(elm, "style"));
335
- border = trimSize(getStyle(elm, 'border', 'borderWidth'));
336
- cellpadding = dom.getAttrib(elm, 'cellpadding', "");
337
- cellspacing = dom.getAttrib(elm, 'cellspacing', "");
338
- width = trimSize(getStyle(elm, 'width', 'width'));
339
- height = trimSize(getStyle(elm, 'height', 'height'));
340
- bordercolor = convertRGBToHex(getStyle(elm, 'bordercolor', 'borderLeftColor'));
341
- bgcolor = convertRGBToHex(getStyle(elm, 'bgcolor', 'backgroundColor'));
342
- align = dom.getAttrib(elm, 'align', align);
343
- frame = dom.getAttrib(elm, 'frame');
344
- rules = dom.getAttrib(elm, 'rules');
345
- className = tinymce.trim(dom.getAttrib(elm, 'class').replace(/mceItem.+/g, ''));
346
- id = dom.getAttrib(elm, 'id');
347
- summary = dom.getAttrib(elm, 'summary');
348
- style = dom.serializeStyle(st);
349
- dir = dom.getAttrib(elm, 'dir');
350
- lang = dom.getAttrib(elm, 'lang');
351
- background = getStyle(elm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
352
- formObj.caption.checked = elm.getElementsByTagName('caption').length > 0;
353
-
354
- orgTableWidth = width;
355
- orgTableHeight = height;
356
-
357
- action = "update";
358
- formObj.insert.value = inst.getLang('update');
359
- }
360
-
361
- addClassesToList('class', "table_styles");
362
- TinyMCE_EditableSelects.init();
363
-
364
- // Update form
365
- selectByValue(formObj, 'align', align);
366
- selectByValue(formObj, 'tframe', frame);
367
- selectByValue(formObj, 'rules', rules);
368
- selectByValue(formObj, 'class', className, true, true);
369
- formObj.cols.value = cols;
370
- formObj.rows.value = rows;
371
- formObj.border.value = border;
372
- formObj.cellpadding.value = cellpadding;
373
- formObj.cellspacing.value = cellspacing;
374
- formObj.width.value = width;
375
- formObj.height.value = height;
376
- formObj.bordercolor.value = bordercolor;
377
- formObj.bgcolor.value = bgcolor;
378
- formObj.id.value = id;
379
- formObj.summary.value = summary;
380
- formObj.style.value = style;
381
- formObj.dir.value = dir;
382
- formObj.lang.value = lang;
383
- formObj.backgroundimage.value = background;
384
-
385
- updateColor('bordercolor_pick', 'bordercolor');
386
- updateColor('bgcolor_pick', 'bgcolor');
387
-
388
- // Resize some elements
389
- if (isVisible('backgroundimagebrowser'))
390
- document.getElementById('backgroundimage').style.width = '180px';
391
-
392
- // Disable some fields in update mode
393
- if (action == "update") {
394
- formObj.cols.disabled = true;
395
- formObj.rows.disabled = true;
396
- }
397
- }
398
-
399
- function changedSize() {
400
- var formObj = document.forms[0];
401
- var st = dom.parseStyle(formObj.style.value);
402
-
403
- /* var width = formObj.width.value;
404
- if (width != "")
405
- st['width'] = tinyMCEPopup.getParam("inline_styles") ? getCSSSize(width) : "";
406
- else
407
- st['width'] = "";*/
408
-
409
- var height = formObj.height.value;
410
- if (height != "")
411
- st['height'] = getCSSSize(height);
412
- else
413
- st['height'] = "";
414
-
415
- formObj.style.value = dom.serializeStyle(st);
416
- }
417
-
418
- function isCssSize(value) {
419
- return /^[0-9.]+(%|in|cm|mm|em|ex|pt|pc|px)$/.test(value);
420
- }
421
-
422
- function cssSize(value, def) {
423
- value = tinymce.trim(value || def);
424
-
425
- if (!isCssSize(value)) {
426
- return parseInt(value, 10) + 'px';
427
- }
428
-
429
- return value;
430
- }
431
-
432
- function changedBackgroundImage() {
433
- var formObj = document.forms[0];
434
- var st = dom.parseStyle(formObj.style.value);
435
-
436
- st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
437
-
438
- formObj.style.value = dom.serializeStyle(st);
439
- }
440
-
441
- function changedBorder() {
442
- var formObj = document.forms[0];
443
- var st = dom.parseStyle(formObj.style.value);
444
-
445
- // Update border width if the element has a color
446
- if (formObj.border.value != "" && (isCssSize(formObj.border.value) || formObj.bordercolor.value != ""))
447
- st['border-width'] = cssSize(formObj.border.value);
448
- else {
449
- if (!formObj.border.value) {
450
- st['border'] = '';
451
- st['border-width'] = '';
452
- }
453
- }
454
-
455
- formObj.style.value = dom.serializeStyle(st);
456
- }
457
-
458
- function changedColor() {
459
- var formObj = document.forms[0];
460
- var st = dom.parseStyle(formObj.style.value);
461
-
462
- st['background-color'] = formObj.bgcolor.value;
463
-
464
- if (formObj.bordercolor.value != "") {
465
- st['border-color'] = formObj.bordercolor.value;
466
-
467
- // Add border-width if it's missing
468
- if (!st['border-width'])
469
- st['border-width'] = cssSize(formObj.border.value, 1);
470
- }
471
-
472
- formObj.style.value = dom.serializeStyle(st);
473
- }
474
-
475
- function changedStyle() {
476
- var formObj = document.forms[0];
477
- var st = dom.parseStyle(formObj.style.value);
478
-
479
- if (st['background-image'])
480
- formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
481
- else
482
- formObj.backgroundimage.value = '';
483
-
484
- if (st['width'])
485
- formObj.width.value = trimSize(st['width']);
486
-
487
- if (st['height'])
488
- formObj.height.value = trimSize(st['height']);
489
-
490
- if (st['background-color']) {
491
- formObj.bgcolor.value = st['background-color'];
492
- updateColor('bgcolor_pick','bgcolor');
493
- }
494
-
495
- if (st['border-color']) {
496
- formObj.bordercolor.value = st['border-color'];
497
- updateColor('bordercolor_pick','bordercolor');
498
- }
499
- }
500
-
501
- tinyMCEPopup.onInit.add(init);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/table/langs/de_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('de.table_dlg',{"rules_border":"alle 4 Seiten (Border)","rules_box":"alle 4 Seiten (Box)","rules_vsides":"links und rechts","rules_rhs":"nur rechts","rules_lhs":"nur links","rules_hsides":"oben und unten","rules_below":"nur unten","rules_above":"nur oben","rules_void":"keins",rules:"Gitter","frame_all":"zwischen allen Zellen","frame_cols":"zwischen Spalten","frame_rows":"zwischen Zeilen","frame_groups":"zwischen Gruppen","frame_none":"keine",frame:"Rahmen",caption:"Beschriftung der Tabelle","missing_scope":"Soll f\u00fcr diese \u00dcberschrift wirklich kein Bereich angegeben werden? Benutzer mit k\u00f6rperlichen Einschr\u00e4nkungen k\u00f6nnten Schwierigkeiten haben, den Inhalt der Tabelle zu verstehen.","cell_limit":"Die maximale Zellenzahl von {$cells} wurde \u00fcberschritten.","row_limit":"Die maximale Zeilenzahl von {$rows} wurde \u00fcberschritten.","col_limit":"Die maximale Spaltenzahl von {$cols} wurde \u00fcberschritten.",colgroup:"Horizontal gruppieren",rowgroup:"Vertikal gruppieren",scope:"Bezug",tfoot:"Tabellenfu\u00df",tbody:"Tabelleninhalt",thead:"Tabellenkopf","row_all":"Alle Zeilen ver\u00e4ndern","row_even":"Gerade Zeilen ver\u00e4ndern","row_odd":"Ungerade Zeilen ver\u00e4ndern","row_row":"Diese Zeile ver\u00e4ndern","cell_all":"Alle Zellen der Tabelle ver\u00e4ndern","cell_row":"Alle Zellen in dieser Zeile ver\u00e4ndern","cell_cell":"Diese Zelle ver\u00e4ndern",th:"\u00dcberschrift",td:"Textzelle",summary:"Zusammenfassung",bgimage:"Hintergrundbild",rtl:"Rechts nach links",ltr:"Links nach rechts",mime:"MIME-Type des Inhalts",langcode:"Sprachcode",langdir:"Schriftrichtung",style:"Format",id:"ID","merge_cells_title":"Zellen vereinen",bgcolor:"Hintergrundfarbe",bordercolor:"Rahmenfarbe","align_bottom":"Unten","align_top":"Oben",valign:"Vertikale Ausrichtung","cell_type":"Zellentyp","cell_title":"Eigenschaften der Zelle","row_title":"Eigenschaften der Zeile","align_middle":"Mittig","align_right":"Rechts","align_left":"Links","align_default":"Standard",align:"Ausrichtung",border:"Rahmen",cellpadding:"Abstand innerhalb der Zellen",cellspacing:"Zellenabstand",rows:"Zeilen",cols:"Spalten",height:"H\u00f6he",width:"Breite",title:"Tabelle einf\u00fcgen/bearbeiten",rowtype:"Gruppierung","advanced_props":"Erweiterte Einstellungen","general_props":"Allgemeine Einstellungen","advanced_tab":"Erweitert","general_tab":"Allgemein","cell_col":"Alle Zellen in dieser Spalte aktualisieren"});
 
mce/table/langs/en_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('en.table_dlg',{"rules_border":"border","rules_box":"box","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"below","rules_above":"above","rules_void":"void",rules:"Rules","frame_all":"all","frame_cols":"cols","frame_rows":"rows","frame_groups":"groups","frame_none":"none",frame:"Frame",caption:"Table Caption","missing_scope":"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.","cell_limit":"You\'ve exceeded the maximum number of cells of {$cells}.","row_limit":"You\'ve exceeded the maximum number of rows of {$rows}.","col_limit":"You\'ve exceeded the maximum number of columns of {$cols}.",colgroup:"Col Group",rowgroup:"Row Group",scope:"Scope",tfoot:"Footer",tbody:"Body",thead:"Header","row_all":"Update All Rows in Table","row_even":"Update Even Rows in Table","row_odd":"Update Odd Rows in Table","row_row":"Update Current Row","cell_all":"Update All Cells in Table","cell_row":"Update All Cells in Row","cell_cell":"Update Current Cell",th:"Header",td:"Data",summary:"Summary",bgimage:"Background Image",rtl:"Right to Left",ltr:"Left to Right",mime:"Target MIME Type",langcode:"Language Code",langdir:"Language Direction",style:"Style",id:"ID","merge_cells_title":"Merge Table Cells",bgcolor:"Background Color",bordercolor:"Border Color","align_bottom":"Bottom","align_top":"Top",valign:"Vertical Alignment","cell_type":"Cell Type","cell_title":"Table Cell Properties","row_title":"Table Row Properties","align_middle":"Center","align_right":"Right","align_left":"Left","align_default":"Default",align:"Alignment",border:"Border",cellpadding:"Cell Padding",cellspacing:"Cell Spacing",rows:"Rows",cols:"Columns",height:"Height",width:"Width",title:"Insert/Edit Table",rowtype:"Row Type","advanced_props":"Advanced Properties","general_props":"General Properties","advanced_tab":"Advanced","general_tab":"General","cell_col":"Update all cells in column"});
 
mce/table/langs/es_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('es.table_dlg',{"rules_border":"border","rules_box":"box","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"debajo","rules_above":"encima","rules_void":"vac\u00edo",rules:"Reglas","frame_all":"todos","frame_cols":"cols","frame_rows":"filas","frame_groups":"grupos","frame_none":"ninguno",frame:"Recuadro",caption:"Subt\u00edtulo de la tabla","missing_scope":" \u00bfEst\u00e1 seguro que desea continuar sin especificar el alcance del encabezado de celda? Sin \u00e9l podr\u00eda ser dificultoso para algunos usuarios entender el contenido o los datos mostrados en la tabla.","cell_limit":"Ha superado el n\u00famero m\u00e1ximo de celdas: {$cells}.","row_limit":"Ha superado el n\u00famero m\u00e1ximo de filas: {$rows}.","col_limit":"Ha superado el n\u00famero m\u00e1ximo de columnas: {$cols}.",colgroup:"Grupo de columnas",rowgroup:"Grupo de filas",scope:"Alcance",tfoot:"Pie de la tabla",tbody:"Cuerpo de la tabla",thead:"Encabezado de la tabla","row_all":"Actualizar todas las filas","row_even":"Actualizar filas pares","row_odd":"Actualizar filas impares","row_row":"Actualizar fila actual","cell_all":"Actualizar todas las celdas en la tabla","cell_row":"Actualizar todas las celdas en la fila","cell_cell":"Actualizar celda actual",th:"Encabezado",td:"Datos",summary:"Resumen",bgimage:"Imagen de fondo",rtl:"Derecha a izquierda",ltr:"Izquierda a derecha",mime:"Tipo MIME",langcode:"C\u00f3digo del lenguaje",langdir:"Direcci\u00f3n del lenguaje",style:"Estilo",id:"Id","merge_cells_title":"Vincular celdas",bgcolor:"Color de fondo",bordercolor:"Color del borde","align_bottom":"Debajo","align_top":"Arriba",valign:"Alineaci\u00f3n vertical","cell_type":"Tipo de celda","cell_title":"Propiedades de la celda","row_title":"Propiedades de la fila","align_middle":"Centrado","align_right":"Derecha","align_left":"Izquierda","align_default":"Predet.",align:"Alineaci\u00f3n",border:"Borde",cellpadding:"Relleno de celda",cellspacing:"Espaciado de celda",rows:"Filas",cols:"Cols",height:"Alto",width:"Ancho",title:"Insertar/Modificar tabla",rowtype:"Tipo de fila","advanced_props":"Propiedades avanzadas","general_props":"Propiedades generales","advanced_tab":"Avanzado","general_tab":"General","cell_col":"Actualizar todas las celdas en la columna"});
 
mce/table/langs/fr_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('fr.table_dlg',{"rules_border":"bordure","rules_box":"bo\u00eete","rules_vsides":"verticales","rules_rhs":"\u00e0 droite","rules_lhs":"\u00e0 gauche","rules_hsides":"horizontales","rules_below":"au-dessous","rules_above":"au-dessus","rules_void":"aucune",rules:"R\u00e8gles","frame_all":"tous","frame_cols":"colonnes","frame_rows":"lignes","frame_groups":"groupe","frame_none":"aucun",frame:"Cadre",caption:"Afficher la l\u00e9gende du tableau","missing_scope":"\u00cates-vous s\u00fbr de vouloir continuer sans sp\u00e9cifier de port\u00e9e pour cette cellule de titre ? Sans port\u00e9e, cela peut \u00eatre difficile pour certains utilisateurs de comprendre le contenu ou les donn\u00e9es affich\u00e9es dans le tableau.","cell_limit":"Vous avez d\u00e9pass\u00e9 le nombre maximum de cellules ({$cells}).","row_limit":"Vous avez d\u00e9pass\u00e9 le nombre maximum de lignes ({$rows}).","col_limit":"Vous avez d\u00e9pass\u00e9 le nombre maximum de colonnes ({$cols}).",colgroup:"Groupe de colonnes",rowgroup:"Groupe de lignes",scope:"Port\u00e9e",tfoot:"Pied de tableau",tbody:"Corps de tableau",thead:"En-t\u00eates de tableau","row_all":"Mettre \u00e0 jour toutes les lignes du tableau","row_even":"Mettre \u00e0 jour les lignes paires","row_odd":"Mettre \u00e0 jour les lignes impaires","row_row":"Mettre \u00e0 jour la ligne courante","cell_all":"Mettre \u00e0 jour toutes les cellules du tableau","cell_row":"Mettre \u00e0 jour toutes les cellules de la ligne","cell_cell":"Mettre \u00e0 jour la cellule courante",th:"Titre",td:"Donn\u00e9es",summary:"R\u00e9sum\u00e9",bgimage:"Image de fond",rtl:"de droite \u00e0 gauche",ltr:"De gauche \u00e0 droite",mime:"Type MIME de la cible",langcode:"Code de la langue",langdir:"Sens de lecture",style:"Style",id:"Id","merge_cells_title":"Fusionner les cellules",bgcolor:"Couleur du fond",bordercolor:"Couleur de la bordure","align_bottom":"Bas","align_top":"Haut",valign:"Alignement vertical","cell_type":"Type de cellule","cell_title":"Propri\u00e9t\u00e9s de la cellule","row_title":"Propri\u00e9t\u00e9s de la ligne","align_middle":"Centr\u00e9","align_right":"Droite","align_left":"Gauche","align_default":"Par d\u00e9faut",align:"Alignement",border:"Bordure",cellpadding:"Espacement dans les cellules",cellspacing:"Espacement entre les cellules",rows:"Lignes",cols:"Colonnes",height:"Hauteur",width:"Largeur",title:"Ins\u00e9rer / modifier un tableau",rowtype:"Type de ligne","advanced_props":"Propri\u00e9t\u00e9s avanc\u00e9es","general_props":"Propri\u00e9t\u00e9s g\u00e9n\u00e9rales","advanced_tab":"Avanc\u00e9","general_tab":"G\u00e9n\u00e9ral","cell_col":"Mettre \u00e0 jour toutes les cellules de la colonne"});
 
mce/table/langs/it_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('it.table_dlg',{"rules_border":"bordo","rules_box":"box","rules_vsides":"lato vert.","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"lato orizz.","rules_below":"sotto","rules_above":"sopra","rules_void":"vuoto",rules:"Regole","frame_all":"tutte","frame_cols":"colonne","frame_rows":"righe","frame_groups":"gruppi","frame_none":"nessuna",frame:"Cornice",caption:"Didascalia tabella","missing_scope":"Sicuro di proseguire senza aver specificato uno scope per l\'intestazione di questa tabella? Senza di esso, potrebbe essere difficoltoso per alcuni utenti con disabilit\u00e0 capire il contenuto o i dati mostrati nella tabella.","cell_limit":"Superato il numero massimo di celle di {$cells}.","row_limit":"Superato il numero massimo di righe di {$rows}.","col_limit":"Superato il numero massimo di colonne di {$cols}.",colgroup:"Gruppo colonna",rowgroup:"Gruppo riga",scope:"Scope",tfoot:"Pedice tabella",tbody:"Corpo tabella",thead:"Intestazione tabella","row_all":"Update tutte le righe della tabella","row_even":"Aggiorna righe pari della tabella","row_odd":"Aggiorna righe dispari della tabella","row_row":"Aggiorna riga corrente","cell_all":"Aggiorna tutte le celle della tabella","cell_row":"Aggiorna tutte le celle della riga","cell_cell":"Aggiorna cella corrente",th:"Intestazione",td:"Data",summary:"Sommario",bgimage:"Immagine sfondo",rtl:"Destra verso sinistra",ltr:"Sinistra verso destra",mime:"Tipo MIME del target",langcode:"Lingua",langdir:"Direzione testo",style:"Stile",id:"Id","merge_cells_title":"Unisci celle",bgcolor:"Colore sfondo",bordercolor:"Colore bordo","align_bottom":"In basso","align_top":"In alto",valign:"Allineamento verticale","cell_type":"Tipo cella","cell_title":"Propriet\u00e0 cella","row_title":"Propriet\u00e0 riga","align_middle":"Centra","align_right":"A destra","align_left":"A sinistra","align_default":"Predefinito",align:"Allineamento",border:"Bordo",cellpadding:"Padding celle",cellspacing:"Spaziatura celle",rows:"Righe",cols:"Colonne",height:"Altezza",width:"Larghezza",title:"Inserisci/Modifica tabella",rowtype:"Riga in una parte di tabella","advanced_props":"Propriet\u00e0 avanzate","general_props":"Propriet\u00e0 generali","advanced_tab":"Avanzate","general_tab":"Generale","cell_col":"Aggiorna tutte le celle della colonna"});
 
mce/table/langs/ja_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('ja.table_dlg',{"rules_border":"\u67a0\u7dda(\u4e0a\u4e0b\u5de6\u53f3)","rules_box":"\u30dc\u30c3\u30af\u30b9(\u4e0a\u4e0b\u5de6\u53f3)","rules_vsides":"\u5de6\u53f3\u306e\u7e26\u7dda","rules_rhs":"\u53f3\u306e\u7e26\u7dda","rules_lhs":"\u5de6\u306e\u7e26\u7dda","rules_hsides":"\u4e0a\u4e0b\u306e\u6a2a\u7dda","rules_below":"\u4e0b\u306e\u6a2a\u7dda","rules_above":"\u4e0a\u306e\u6a2a\u7dda","rules_void":"\u306a\u3057",rules:"\u8868\u306e\u5916\u67a0","frame_all":"\u3059\u3079\u3066","frame_cols":"\u5217","frame_rows":"\u884c","frame_groups":"\u30b0\u30eb\u30fc\u30d7\u6bce","frame_none":"\u306a\u3057",frame:"\u30bb\u30eb\u306e\u67a0",caption:"\u8868\u306e\u898b\u51fa\u3057","missing_scope":"\u3053\u306e\u8868\u306e\u30d8\u30c3\u30c0\u30fc\u306e\u30bb\u30eb\u306e\u7bc4\u56f2\u3092\u8a2d\u5b9a\u3057\u306a\u3044\u3067\u672c\u5f53\u306b\u7d9a\u3051\u307e\u3059\u304b? \u3053\u306e\u307e\u307e\u3067\u306f\u76ee\u306e\u4e0d\u81ea\u7531\u306a\u65b9\u304c\u8868\u306e\u5185\u5bb9\u3084\u8868\u793a\u3055\u308c\u308b\u30c7\u30fc\u30bf\u3092\u7406\u89e3\u3059\u308b\u306e\u304c\u56f0\u96e3\u306b\u306a\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002","cell_limit":"\u30bb\u30eb\u306e\u6700\u5927\u6570\u306e${cells}\u3092\u8d85\u3048\u307e\u3057\u305f\u3002","row_limit":"\u884c\u306e\u6700\u5927\u6570\u306e${rows}\u3092\u8d85\u3048\u307e\u3057\u305f\u3002","col_limit":"\u5217\u306e\u6700\u5927\u6570\u306e${cols}\u3092\u8d85\u3048\u307e\u3057\u305f\u3002",colgroup:"\u5217\u30b0\u30eb\u30fc\u30d7",rowgroup:"\u884c\u30b0\u30eb\u30fc\u30d7",scope:"\u30b9\u30b3\u30fc\u30d7",tfoot:"\u8868\u306e\u30d5\u30c3\u30bf\u30fc",tbody:"\u8868\u306e\u30dc\u30c7\u30a3",thead:"\u8868\u306e\u30d8\u30c3\u30c0\u30fc","row_all":"\u3059\u3079\u3066\u306e\u884c\u3092\u66f4\u65b0","row_even":"\u5076\u6570\u884c\u3092\u66f4\u65b0","row_odd":"\u5947\u6570\u884c\u3092\u66f4\u65b0","row_row":"\u9078\u629e\u3057\u3066\u3044\u308b\u884c\u3092\u66f4\u65b0","cell_all":"\u3059\u3079\u3066\u306e\u30bb\u30eb\u3092\u66f4\u65b0","cell_row":"\u884c\u5185\u306e\u30bb\u30eb\u3092\u66f4\u65b0","cell_cell":"\u9078\u629e\u3057\u3066\u3044\u308b\u30bb\u30eb\u3092\u66f4\u65b0",th:"\u30d8\u30c3\u30c0\u30fc",td:"\u30c7\u30fc\u30bf",summary:"\u30b5\u30de\u30ea\u30fc",bgimage:"\u80cc\u666f\u306e\u753b\u50cf",rtl:"\u53f3\u304b\u3089\u5de6",ltr:"\u5de6\u304b\u3089\u53f3",mime:"\u30bf\u30fc\u30b2\u30c3\u30c8\u306eMIME\u30bf\u30a4\u30d7",langcode:"\u8a00\u8a9e\u30b3\u30fc\u30c9",langdir:"\u6587\u7ae0\u306e\u65b9\u5411",style:"\u30b9\u30bf\u30a4\u30eb",id:"ID","merge_cells_title":"\u30bb\u30eb\u3092\u7d50\u5408",bgcolor:"\u80cc\u666f\u306e\u8272",bordercolor:"\u67a0\u7dda\u306e\u8272","align_bottom":"\u4e0b\u63c3\u3048","align_top":"\u4e0a\u63c3\u3048",valign:"\u5782\u76f4\u65b9\u5411\u306e\u914d\u7f6e","cell_type":"\u30bb\u30eb\u306e\u7a2e\u985e","cell_title":"\u30bb\u30eb\u306e\u5c5e\u6027","row_title":"\u884c\u306e\u5c5e\u6027","align_middle":"\u4e2d\u592e\u63c3\u3048","align_right":"\u53f3\u63c3\u3048","align_left":"\u5de6\u63c3\u3048","align_default":"\u521d\u671f\u72b6\u614b",align:"\u914d\u7f6e",border:"\u67a0\u7dda",cellpadding:"\u30bb\u30eb\u306e\u30d1\u30c7\u30a3\u30f3\u30b0(cellpadding)",cellspacing:"\u30bb\u30eb\u306e\u9593\u9694(cellspacing)",rows:"\u884c",cols:"\u5217",height:"\u9ad8\u3055",width:"\u5e45",title:"\u8868\u306e\u633f\u5165\u3084\u7de8\u96c6",rowtype:"\u884c","advanced_props":"\u9ad8\u5ea6\u306a\u5c5e\u6027","general_props":"\u4e00\u822c\u7684\u306a\u5c5e\u6027","advanced_tab":"\u9ad8\u5ea6","general_tab":"\u4e00\u822c","cell_col":"\u3059\u3079\u3066\u306e\u30bb\u30eb\u3092\u66f4\u65b0"});
 
mce/table/langs/langs.php DELETED
@@ -1,12 +0,0 @@
1
- <?php
2
- $lang_file = dirname(__FILE__) . '/' . $mce_locale . '_dlg.js';
3
-
4
- if ( ! is_file( $lang_file ) && defined( 'TINYMCE_ADVANCED_LANGUAGES_PATH' ) )
5
- $lang_file = TINYMCE_ADVANCED_LANGUAGES_PATH . 'table/langs/' . $mce_locale . '_dlg.js';
6
-
7
- if ( is_file( $lang_file ) && is_readable( $lang_file ) ) {
8
- $strings = tdav_get_file( $lang_file );
9
- } else {
10
- $strings = tdav_get_file( dirname(__FILE__) . '/en_dlg.js' );
11
- $strings = preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $strings, 1 );
12
- }
 
 
 
 
 
 
 
 
 
 
 
 
mce/table/langs/pt_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('pt.table_dlg',{"rules_border":"Limites","rules_box":"Box","rules_vsides":"Vsides","rules_rhs":"Rhs","rules_lhs":"Lhs","rules_hsides":"Hsides","rules_below":"abaixo","rules_above":"acima","rules_void":"void",rules:"Regras","frame_all":"Todos","frame_cols":"colunas","frame_rows":"Linhas","frame_groups":"Grupos","frame_none":"Nenhum",frame:"Frame",caption:"T\u00edtulo da tabela","missing_scope":"Tem certeza de que quer continuar sem especificar um escopo para esta c\u00e9lula? (Isso poder\u00e1 causar dificuldades a usu\u00e1rios deficientes)","cell_limit":"Excedeu o n\u00famero m\u00e1ximo de c\u00e9lulas de {$cells}.","row_limit":"Excedeu o n\u00famero m\u00e1ximo de linhas de {$rows}.","col_limit":"Excedeu o n\u00famero m\u00e1ximo de colunas de {$cols}.",colgroup:"Grupo colunas",rowgroup:"Grupo linhas",scope:"Alcance",tfoot:"Rodap\u00e9 da tabela",tbody:"Corpo da tabela",thead:"Topo da tabela","row_all":"Atualizar todas as linhas","row_even":"Atualizar linhas pares","row_odd":"Atualizar linhas \u00edmpares","row_row":"Atualizar esta linha","cell_all":"Atualizar todas as c\u00e9lulas na tabela","cell_row":"Atualizar todas as c\u00e9lulas na linha","cell_cell":"Atualizar esta c\u00e9lula",th:"Campo",td:"Dados",summary:"Sum\u00e1rio",bgimage:"Imagem de fundo",rtl:"Da direita para a esquerda",ltr:"Da esquerda para a direita",mime:"MIME alvo",langcode:"C\u00f3digo do idioma",langdir:"Dire\u00e7\u00e3o do texto",style:"Estilo",id:"Id","merge_cells_title":"Unir c\u00e9lulas",bgcolor:"Cor de fundo",bordercolor:"Cor dos limites","align_bottom":"Abaixo","align_top":"Topo",valign:"Alinha. vert.","cell_type":"Tipo c\u00e9l.","cell_title":"Propriedades de c\u00e9lulas","row_title":"Propriedades de linhas","align_middle":"Centro","align_right":"Direita","align_left":"Esquerda","align_default":"Padr\u00e3o",align:"Alinha.",border:"Limites",cellpadding:"Enchimento da C\u00e9lula",cellspacing:"Espa\u00e7amento da C\u00e9lula",rows:"Linhas",cols:"Colunas",height:"Altura",width:"Largura",title:"Inserir/modificar tabela",rowtype:"Linha na parte da tabela","advanced_props":"Propriedades avan\u00e7adas","general_props":"Propriedades gerais","advanced_tab":"Avan\u00e7ado","general_tab":"Geral","cell_col":"Atualizar todas as c\u00e9lulas na coluna"});
 
mce/table/langs/ru_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('ru.table_dlg',{"rules_border":"border","rules_box":"box","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"below","rules_above":"above","rules_void":"void",rules:"\u041f\u0440\u0430\u0432\u0438\u043b\u0430","frame_all":"\u0432\u0441\u0435","frame_cols":"\u043a\u043e\u043b\u043e\u043d\u043a\u0438","frame_rows":"\u0440\u044f\u0434\u044b","frame_groups":"\u0433\u0440\u0443\u043f\u043f\u044b","frame_none":"\u043d\u0435\u0442",frame:"\u041a\u0430\u0434\u0440",caption:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0442\u0430\u0431\u043b\u0438\u0446\u044b","missing_scope":"\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0431\u0435\u0437 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u043d\u0438\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0437\u0430\u0433\u043b\u043e\u043b\u0432\u043a\u0430? \u0411\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0442\u0440\u0443\u0434\u043d\u0435\u043d\u043e \u0432\u043e\u0441\u043f\u0440\u0438\u044f\u0442\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c.","cell_limit":"\u0414\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0432\u0439 \u043f\u0440\u0435\u0434\u0435\u043b, \u0432 $ \u044f\u0447\u0435\u0435\u043a.","row_limit":"\u0414\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0432\u0439 \u043f\u0440\u0435\u0434\u0435\u043b, \u0432 $ \u0441\u0442\u0440\u043e\u043a.","col_limit":"\u0414\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0432\u0439 \u043f\u0440\u0435\u0434\u0435\u043b, \u0432 $ \u043a\u043e\u043b\u043e\u043d\u043e\u043a.",colgroup:"\u0413\u0440\u0443\u043f\u043f\u0430 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432",rowgroup:"\u0413\u0440\u0443\u043f\u043f\u0430 \u0441\u0442\u0440\u043e\u043a",scope:"\u041e\u0431\u043b\u0430\u0441\u0442\u044c",tfoot:"\u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435",tbody:"\u0422\u0435\u043b\u043e",thead:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a","row_all":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435","row_even":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0447\u0435\u0442\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435","row_odd":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0435\u0447\u0435\u0442\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435","row_row":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443","cell_all":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u044f\u0447\u0435\u0439\u043a\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435","cell_row":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u044f\u0447\u0435\u0439\u043a\u0438 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435","cell_cell":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u044f\u0447\u0435\u0439\u043a\u0443",th:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",td:"\u0414\u0430\u043d\u043d\u044b\u0435",summary:"\u041e\u0431\u0449\u0435\u0435",bgimage:"\u0424\u043e\u043d\u043e\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435",rtl:"\u0421\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0435\u0432\u043e",ltr:"\u0421\u043b\u0435\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e",mime:"MIME \u0442\u0438\u043f \u0446\u0435\u043b\u0438",langcode:"\u041a\u043e\u0434 \u044f\u0437\u044b\u043a\u0430",langdir:"\u041d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430",style:"\u0421\u0442\u0438\u043b\u044c",id:"\u0418\u043c\u044f","merge_cells_title":"\u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u044f\u0447\u0435\u0439\u043a\u0438",bgcolor:"\u0426\u0432\u0435\u0442 \u0437\u0430\u043b\u0438\u0432\u043a\u0438",bordercolor:"\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043d\u0438\u0446\u044b","align_bottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e","align_top":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e",valign:"\u0412\u0435\u0440\u0442. \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435","cell_type":"\u0422\u0438\u043f","cell_title":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u044f\u0447\u0435\u0439\u043a\u0438","row_title":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0442\u0440\u043e\u043a\u0438","align_middle":"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443","align_right":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_left":"\u041f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_default":"\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e",align:"\u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435",border:"\u0413\u0440\u0430\u043d\u0438\u0446\u0430",cellpadding:"\u041e\u0442\u0441\u0442\u0443\u043f\u044b \u0432 \u044f\u0447\u0435\u0439\u043a\u0430\u0445",cellspacing:"\u0420\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u044f\u0447\u0435\u0439\u043a\u0430\u043c\u0438",rows:"\u0421\u0442\u0440\u043e\u043a\u0438",cols:"\u0421\u0442\u043e\u043b\u0431\u0446\u044b",height:"\u0412\u044b\u0441\u043e\u0442\u0430",width:"\u0428\u0438\u0440\u0438\u043d\u0430",title:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0442\u0430\u0431\u043b\u0438\u0446\u044b",rowtype:"\u0422\u0438\u043f \u0441\u0442\u0440\u043e\u043a\u0438","advanced_props":"\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b","general_props":"\u041e\u0431\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b","advanced_tab":"\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e","general_tab":"\u041e\u0431\u0449\u0435\u0435","cell_col":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u044f\u0447\u0435\u0439\u043a\u0438 \u0432 \u0441\u0442\u043e\u043b\u0431\u0446\u0435"});
 
mce/table/langs/zh_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('zh.table_dlg',{"rules_border":"\u8fb9\u6846","rules_box":"\u65b9\u76d2","rules_vsides":"\u5782\u76f4","rules_rhs":"\u53f3\u8fb9","rules_lhs":"\u5de6\u8fb9","rules_hsides":"\u6c34\u5e73","rules_below":"\u4e0b","rules_above":"\u4e0a","rules_void":"\u7a7a",rules:"\u89c4\u5219","frame_all":"\u5168\u90e8","frame_cols":"\u5217\u8868\u5934","frame_rows":"\u884c\u8868\u5934","frame_groups":"\u7fa4\u7ec4","frame_none":"\u65e0",frame:"\u6846\u67b6",caption:"\u8868\u683c\u6807\u9898","missing_scope":"\u60a8\u786e\u5b9a\u4e0d\u4e3a\u8868\u5934\u5355\u5143\u683c\u6307\u5b9a\u4e00\u4e2a\u8303\u56f4\u5417\uff1f\u5982\u679c\u4e0d\u6307\u5b9a\uff0c\u5bf9\u4f7f\u7528\u975e\u53ef\u89c6\u6d4f\u89c8\u5668\u7684\u4f7f\u7528\u8005\u5c06\u66f4\u96be\u9605\u8bfb\u6216\u7406\u89e3\u8868\u683c\u5185\u5bb9\u3002","cell_limit":"\u5df2\u8fbe\u5230\u6700\u591a {$cells} \u4e2a\u5355\u5143\u683c\u7684\u4e0a\u9650\u3002","row_limit":"\u5df2\u8fbe\u5230\u6700\u591a {$rows} \u884c\u5355\u5143\u683c\u7684\u4e0a\u9650\u3002","col_limit":"\u5df2\u8fbe\u5230\u6700\u591a {$cols} \u5217\u5355\u5143\u683c\u7684\u4e0a\u9650\u3002",colgroup:"\u5217\u7ec4\u8868\u5934",rowgroup:"\u884c\u7ec4\u8868\u5934",scope:"\u8868\u5934\u8303\u56f4",tfoot:"\u8868\u5c3e",tbody:"\u8868\u683c\u4e3b\u4f53",thead:"\u8868\u5934","row_all":"\u66f4\u65b0\u6240\u6709\u884c","row_even":"\u66f4\u65b0\u5076\u6570\u884c","row_odd":"\u66f4\u65b0\u5947\u6570\u884c","row_row":"\u66f4\u65b0\u5f53\u524d\u884c","cell_all":"\u66f4\u65b0\u6240\u6709\u5355\u5143\u683c","cell_row":"\u66f4\u65b0\u884c\u4e2d\u6240\u6709\u5355\u5143\u683c","cell_cell":"\u66f4\u65b0\u5f53\u524d\u5355\u5143\u683c",th:"\u8868\u5934",td:"\u8868\u683c\u5185\u5bb9",summary:"\u8868\u683c\u6458\u8981",bgimage:"\u80cc\u666f\u56fe\u7247",rtl:"\u4ece\u53f3\u5230\u5de6",ltr:"\u4ece\u5de6\u5230\u53f3",mime:"\u76ee\u6807MIME\u7c7b\u578b",langcode:"\u8bed\u8a00\u4ee3\u7801",langdir:"\u8bed\u8a00\u4e66\u5199\u65b9\u5411",style:"\u6837\u5f0f",id:"ID","merge_cells_title":"\u5408\u5e76\u5355\u5143\u683c",bgcolor:"\u80cc\u666f\u989c\u8272",bordercolor:"\u8fb9\u6846\u989c\u8272","align_bottom":"\u9760\u4e0b","align_top":"\u9760\u4e0a",valign:"\u5782\u76f4\u5bf9\u9f50","cell_type":"\u5355\u5143\u683c\u7c7b\u578b","cell_title":"\u5355\u5143\u683c\u5c5e\u6027","row_title":"\u884c\u5c5e\u6027","align_middle":"\u5c45\u4e2d\u5bf9\u9f50","align_right":"\u9760\u53f3\u5bf9\u9f50","align_left":"\u9760\u5de6\u5bf9\u9f50","align_default":"\u9ed8\u8ba4",align:"\u5bf9\u9f50\u65b9\u5411",border:"\u8fb9\u6846",cellpadding:"\u5355\u5143\u683c\u8fb9\u8ddd",cellspacing:"\u5355\u5143\u683c\u95f4\u8ddd",rows:"\u884c\u6570",cols:"\u5217\u6570",height:"\u9ad8",width:"\u5bbd",title:"\u63d2\u5165/\u7f16\u8f91\u5355\u5143\u683c",rowtype:"\u884c\u7c7b\u578b","advanced_props":"\u9ad8\u7ea7\u5c5e\u6027","general_props":"\u666e\u901a\u5c5e\u6027","advanced_tab":"\u9ad8\u7ea7","general_tab":"\u666e\u901a","cell_col":"\u66f4\u65b0\u5217\u4e2d\u6240\u6709\u5355\u5143\u683c"});
 
mce/table/merge_cells.htm DELETED
@@ -1,32 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <title>{#table_dlg.merge_cells_title}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=359"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=359"></script>
7
- <script type="text/javascript" src="../../utils/validate.js?ver=359"></script>
8
- <script type="text/javascript" src="js/merge_cells.js?ver=359"></script>
9
- </head>
10
- <body style="margin: 8px" role="application">
11
- <form onsubmit="MergeCellsDialog.merge();return false;" action="#">
12
- <fieldset>
13
- <legend>{#table_dlg.merge_cells_title}</legend>
14
- <table role="presentation" border="0" cellpadding="0" cellspacing="3" width="100%">
15
- <tr>
16
- <td><label for="numcols">{#table_dlg.cols}</label>:</td>
17
- <td align="right"><input type="text" id="numcols" name="numcols" value="" class="number min1 mceFocus" style="width: 30px" aria-required="true" /></td>
18
- </tr>
19
- <tr>
20
- <td><label for="numrows">{#table_dlg.rows}</label>:</td>
21
- <td align="right"><input type="text" id="numrows" name="numrows" value="" class="number min1" style="width: 30px" aria-required="true" /></td>
22
- </tr>
23
- </table>
24
- </fieldset>
25
-
26
- <div class="mceActionPanel">
27
- <input type="submit" id="insert" name="insert" value="{#update}" />
28
- <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
29
- </div>
30
- </form>
31
- </body>
32
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/table/plugin.js ADDED
@@ -0,0 +1,2293 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Compiled inline version. (Library mode)
3
+ */
4
+
5
+ /*jshint smarttabs:true, undef:true, latedef:true, curly:true, bitwise:true, camelcase:true */
6
+ /*globals $code */
7
+
8
+ (function(exports, undefined) {
9
+ "use strict";
10
+
11
+ var modules = {};
12
+
13
+ function require(ids, callback) {
14
+ var module, defs = [];
15
+
16
+ for (var i = 0; i < ids.length; ++i) {
17
+ module = modules[ids[i]] || resolve(ids[i]);
18
+ if (!module) {
19
+ throw 'module definition dependecy not found: ' + ids[i];
20
+ }
21
+
22
+ defs.push(module);
23
+ }
24
+
25
+ callback.apply(null, defs);
26
+ }
27
+
28
+ function define(id, dependencies, definition) {
29
+ if (typeof id !== 'string') {
30
+ throw 'invalid module definition, module id must be defined and be a string';
31
+ }
32
+
33
+ if (dependencies === undefined) {
34
+ throw 'invalid module definition, dependencies must be specified';
35
+ }
36
+
37
+ if (definition === undefined) {
38
+ throw 'invalid module definition, definition function must be specified';
39
+ }
40
+
41
+ require(dependencies, function() {
42
+ modules[id] = definition.apply(null, arguments);
43
+ });
44
+ }
45
+
46
+ function defined(id) {
47
+ return !!modules[id];
48
+ }
49
+
50
+ function resolve(id) {
51
+ var target = exports;
52
+ var fragments = id.split(/[.\/]/);
53
+
54
+ for (var fi = 0; fi < fragments.length; ++fi) {
55
+ if (!target[fragments[fi]]) {
56
+ return;
57
+ }
58
+
59
+ target = target[fragments[fi]];
60
+ }
61
+
62
+ return target;
63
+ }
64
+
65
+ function expose(ids) {
66
+ for (var i = 0; i < ids.length; i++) {
67
+ var target = exports;
68
+ var id = ids[i];
69
+ var fragments = id.split(/[.\/]/);
70
+
71
+ for (var fi = 0; fi < fragments.length - 1; ++fi) {
72
+ if (target[fragments[fi]] === undefined) {
73
+ target[fragments[fi]] = {};
74
+ }
75
+
76
+ target = target[fragments[fi]];
77
+ }
78
+
79
+ target[fragments[fragments.length - 1]] = modules[id];
80
+ }
81
+ }
82
+
83
+ // Included from: js/tinymce/plugins/table/classes/TableGrid.js
84
+
85
+ /**
86
+ * TableGrid.js
87
+ *
88
+ * Copyright, Moxiecode Systems AB
89
+ * Released under LGPL License.
90
+ *
91
+ * License: http://www.tinymce.com/license
92
+ * Contributing: http://www.tinymce.com/contributing
93
+ */
94
+
95
+ /**
96
+ * This class creates a grid out of a table element. This
97
+ * makes it a whole lot easier to handle complex tables with
98
+ * col/row spans.
99
+ *
100
+ * @class tinymce.tableplugin.TableGrid
101
+ * @private
102
+ */
103
+ define("tinymce/tableplugin/TableGrid", [
104
+ "tinymce/util/Tools",
105
+ "tinymce/Env"
106
+ ], function(Tools, Env) {
107
+ var each = Tools.each;
108
+
109
+ function getSpanVal(td, name) {
110
+ return parseInt(td.getAttribute(name) || 1, 10);
111
+ }
112
+
113
+ return function(editor, table) {
114
+ var grid, startPos, endPos, selectedCell, selection = editor.selection, dom = selection.dom;
115
+
116
+ function buildGrid() {
117
+ var startY = 0;
118
+
119
+ grid = [];
120
+
121
+ each(['thead', 'tbody', 'tfoot'], function(part) {
122
+ var rows = dom.select('> ' + part + ' tr', table);
123
+
124
+ each(rows, function(tr, y) {
125
+ y += startY;
126
+
127
+ each(dom.select('> td, > th', tr), function(td, x) {
128
+ var x2, y2, rowspan, colspan;
129
+
130
+ // Skip over existing cells produced by rowspan
131
+ if (grid[y]) {
132
+ while (grid[y][x]) {
133
+ x++;
134
+ }
135
+ }
136
+
137
+ // Get col/rowspan from cell
138
+ rowspan = getSpanVal(td, 'rowspan');
139
+ colspan = getSpanVal(td, 'colspan');
140
+
141
+ // Fill out rowspan/colspan right and down
142
+ for (y2 = y; y2 < y + rowspan; y2++) {
143
+ if (!grid[y2]) {
144
+ grid[y2] = [];
145
+ }
146
+
147
+ for (x2 = x; x2 < x + colspan; x2++) {
148
+ grid[y2][x2] = {
149
+ part: part,
150
+ real: y2 == y && x2 == x,
151
+ elm: td,
152
+ rowspan: rowspan,
153
+ colspan: colspan
154
+ };
155
+ }
156
+ }
157
+ });
158
+ });
159
+
160
+ startY += rows.length;
161
+ });
162
+ }
163
+
164
+ function cloneNode(node, children) {
165
+ node = node.cloneNode(children);
166
+ node.removeAttribute('id');
167
+
168
+ return node;
169
+ }
170
+
171
+ function getCell(x, y) {
172
+ var row;
173
+
174
+ row = grid[y];
175
+ if (row) {
176
+ return row[x];
177
+ }
178
+ }
179
+
180
+ function setSpanVal(td, name, val) {
181
+ if (td) {
182
+ val = parseInt(val, 10);
183
+
184
+ if (val === 1) {
185
+ td.removeAttribute(name, 1);
186
+ } else {
187
+ td.setAttribute(name, val, 1);
188
+ }
189
+ }
190
+ }
191
+
192
+ function isCellSelected(cell) {
193
+ return cell && (dom.hasClass(cell.elm, 'mce-item-selected') || cell == selectedCell);
194
+ }
195
+
196
+ function getSelectedRows() {
197
+ var rows = [];
198
+
199
+ each(table.rows, function(row) {
200
+ each(row.cells, function(cell) {
201
+ if (dom.hasClass(cell, 'mce-item-selected') || (selectedCell && cell == selectedCell.elm)) {
202
+ rows.push(row);
203
+ return false;
204
+ }
205
+ });
206
+ });
207
+
208
+ return rows;
209
+ }
210
+
211
+ function deleteTable() {
212
+ var rng = dom.createRng();
213
+
214
+ rng.setStartAfter(table);
215
+ rng.setEndAfter(table);
216
+
217
+ selection.setRng(rng);
218
+
219
+ dom.remove(table);
220
+ }
221
+
222
+ function cloneCell(cell) {
223
+ var formatNode, cloneFormats = {};
224
+
225
+ if (editor.settings.table_clone_elements !== false) {
226
+ cloneFormats = Tools.makeMap(
227
+ (editor.settings.table_clone_elements || 'strong em b i span font h1 h2 h3 h4 h5 h6 p div').toUpperCase(),
228
+ /[ ,]/
229
+ );
230
+ }
231
+
232
+ // Clone formats
233
+ Tools.walk(cell, function(node) {
234
+ var curNode;
235
+
236
+ if (node.nodeType == 3) {
237
+ each(dom.getParents(node.parentNode, null, cell).reverse(), function(node) {
238
+ if (!cloneFormats[node.nodeName]) {
239
+ return;
240
+ }
241
+
242
+ node = cloneNode(node, false);
243
+
244
+ if (!formatNode) {
245
+ formatNode = curNode = node;
246
+ } else if (curNode) {
247
+ curNode.appendChild(node);
248
+ }
249
+
250
+ curNode = node;
251
+ });
252
+
253
+ // Add something to the inner node
254
+ if (curNode) {
255
+ curNode.innerHTML = Env.ie ? '&nbsp;' : '<br data-mce-bogus="1" />';
256
+ }
257
+
258
+ return false;
259
+ }
260
+ }, 'childNodes');
261
+
262
+ cell = cloneNode(cell, false);
263
+ setSpanVal(cell, 'rowSpan', 1);
264
+ setSpanVal(cell, 'colSpan', 1);
265
+
266
+ if (formatNode) {
267
+ cell.appendChild(formatNode);
268
+ } else {
269
+ if (!Env.ie) {
270
+ cell.innerHTML = '<br data-mce-bogus="1" />';
271
+ }
272
+ }
273
+
274
+ return cell;
275
+ }
276
+
277
+ function cleanup() {
278
+ var rng = dom.createRng(), row;
279
+
280
+ // Empty rows
281
+ each(dom.select('tr', table), function(tr) {
282
+ if (tr.cells.length === 0) {
283
+ dom.remove(tr);
284
+ }
285
+ });
286
+
287
+ // Empty table
288
+ if (dom.select('tr', table).length === 0) {
289
+ rng.setStartBefore(table);
290
+ rng.setEndBefore(table);
291
+ selection.setRng(rng);
292
+ dom.remove(table);
293
+ return;
294
+ }
295
+
296
+ // Empty header/body/footer
297
+ each(dom.select('thead,tbody,tfoot', table), function(part) {
298
+ if (part.rows.length === 0) {
299
+ dom.remove(part);
300
+ }
301
+ });
302
+
303
+ // Restore selection to start position if it still exists
304
+ buildGrid();
305
+
306
+ // If we have a valid startPos object
307
+ if (startPos) {
308
+ // Restore the selection to the closest table position
309
+ row = grid[Math.min(grid.length - 1, startPos.y)];
310
+ if (row) {
311
+ selection.select(row[Math.min(row.length - 1, startPos.x)].elm, true);
312
+ selection.collapse(true);
313
+ }
314
+ }
315
+ }
316
+
317
+ function fillLeftDown(x, y, rows, cols) {
318
+ var tr, x2, r, c, cell;
319
+
320
+ tr = grid[y][x].elm.parentNode;
321
+ for (r = 1; r <= rows; r++) {
322
+ tr = dom.getNext(tr, 'tr');
323
+
324
+ if (tr) {
325
+ // Loop left to find real cell
326
+ for (x2 = x; x2 >= 0; x2--) {
327
+ cell = grid[y + r][x2].elm;
328
+
329
+ if (cell.parentNode == tr) {
330
+ // Append clones after
331
+ for (c = 1; c <= cols; c++) {
332
+ dom.insertAfter(cloneCell(cell), cell);
333
+ }
334
+
335
+ break;
336
+ }
337
+ }
338
+
339
+ if (x2 == -1) {
340
+ // Insert nodes before first cell
341
+ for (c = 1; c <= cols; c++) {
342
+ tr.insertBefore(cloneCell(tr.cells[0]), tr.cells[0]);
343
+ }
344
+ }
345
+ }
346
+ }
347
+ }
348
+
349
+ function split() {
350
+ each(grid, function(row, y) {
351
+ each(row, function(cell, x) {
352
+ var colSpan, rowSpan, i;
353
+
354
+ if (isCellSelected(cell)) {
355
+ cell = cell.elm;
356
+ colSpan = getSpanVal(cell, 'colspan');
357
+ rowSpan = getSpanVal(cell, 'rowspan');
358
+
359
+ if (colSpan > 1 || rowSpan > 1) {
360
+ setSpanVal(cell, 'rowSpan', 1);
361
+ setSpanVal(cell, 'colSpan', 1);
362
+
363
+ // Insert cells right
364
+ for (i = 0; i < colSpan - 1; i++) {
365
+ dom.insertAfter(cloneCell(cell), cell);
366
+ }
367
+
368
+ fillLeftDown(x, y, rowSpan - 1, colSpan);
369
+ }
370
+ }
371
+ });
372
+ });
373
+ }
374
+
375
+ function merge(cell, cols, rows) {
376
+ var pos, startX, startY, endX, endY, x, y, startCell, endCell, children, count;
377
+
378
+ // Use specified cell and cols/rows
379
+ if (cell) {
380
+ pos = getPos(cell);
381
+ startX = pos.x;
382
+ startY = pos.y;
383
+ endX = startX + (cols - 1);
384
+ endY = startY + (rows - 1);
385
+ } else {
386
+ startPos = endPos = null;
387
+
388
+ // Calculate start/end pos by checking for selected cells in grid works better with context menu
389
+ each(grid, function(row, y) {
390
+ each(row, function(cell, x) {
391
+ if (isCellSelected(cell)) {
392
+ if (!startPos) {
393
+ startPos = {x: x, y: y};
394
+ }
395
+
396
+ endPos = {x: x, y: y};
397
+ }
398
+ });
399
+ });
400
+
401
+ // Use selection, but make sure startPos is valid before accessing
402
+ if (startPos) {
403
+ startX = startPos.x;
404
+ startY = startPos.y;
405
+ endX = endPos.x;
406
+ endY = endPos.y;
407
+ }
408
+ }
409
+
410
+ // Find start/end cells
411
+ startCell = getCell(startX, startY);
412
+ endCell = getCell(endX, endY);
413
+
414
+ // Check if the cells exists and if they are of the same part for example tbody = tbody
415
+ if (startCell && endCell && startCell.part == endCell.part) {
416
+ // Split and rebuild grid
417
+ split();
418
+ buildGrid();
419
+
420
+ // Set row/col span to start cell
421
+ startCell = getCell(startX, startY).elm;
422
+ setSpanVal(startCell, 'colSpan', (endX - startX) + 1);
423
+ setSpanVal(startCell, 'rowSpan', (endY - startY) + 1);
424
+
425
+ // Remove other cells and add it's contents to the start cell
426
+ for (y = startY; y <= endY; y++) {
427
+ for (x = startX; x <= endX; x++) {
428
+ if (!grid[y] || !grid[y][x]) {
429
+ continue;
430
+ }
431
+
432
+ cell = grid[y][x].elm;
433
+
434
+ /*jshint loopfunc:true */
435
+ /*eslint loop-func:0 */
436
+ if (cell != startCell) {
437
+ // Move children to startCell
438
+ children = Tools.grep(cell.childNodes);
439
+ each(children, function(node) {
440
+ startCell.appendChild(node);
441
+ });
442
+
443
+ // Remove bogus nodes if there is children in the target cell
444
+ if (children.length) {
445
+ children = Tools.grep(startCell.childNodes);
446
+ count = 0;
447
+ each(children, function(node) {
448
+ if (node.nodeName == 'BR' && dom.getAttrib(node, 'data-mce-bogus') && count++ < children.length - 1) {
449
+ startCell.removeChild(node);
450
+ }
451
+ });
452
+ }
453
+
454
+ dom.remove(cell);
455
+ }
456
+ }
457
+ }
458
+
459
+ // Remove empty rows etc and restore caret location
460
+ cleanup();
461
+ }
462
+ }
463
+
464
+ function insertRow(before) {
465
+ var posY, cell, lastCell, x, rowElm, newRow, newCell, otherCell, rowSpan;
466
+
467
+ // Find first/last row
468
+ each(grid, function(row, y) {
469
+ each(row, function(cell) {
470
+ if (isCellSelected(cell)) {
471
+ cell = cell.elm;
472
+ rowElm = cell.parentNode;
473
+ newRow = cloneNode(rowElm, false);
474
+ posY = y;
475
+
476
+ if (before) {
477
+ return false;
478
+ }
479
+ }
480
+ });
481
+
482
+ if (before) {
483
+ return !posY;
484
+ }
485
+ });
486
+
487
+ // If posY is undefined there is nothing for us to do here...just return to avoid crashing below
488
+ if (posY === undefined) {
489
+ return;
490
+ }
491
+
492
+ for (x = 0; x < grid[0].length; x++) {
493
+ // Cell not found could be because of an invalid table structure
494
+ if (!grid[posY][x]) {
495
+ continue;
496
+ }
497
+
498
+ cell = grid[posY][x].elm;
499
+
500
+ if (cell != lastCell) {
501
+ if (!before) {
502
+ rowSpan = getSpanVal(cell, 'rowspan');
503
+ if (rowSpan > 1) {
504
+ setSpanVal(cell, 'rowSpan', rowSpan + 1);
505
+ continue;
506
+ }
507
+ } else {
508
+ // Check if cell above can be expanded
509
+ if (posY > 0 && grid[posY - 1][x]) {
510
+ otherCell = grid[posY - 1][x].elm;
511
+ rowSpan = getSpanVal(otherCell, 'rowSpan');
512
+ if (rowSpan > 1) {
513
+ setSpanVal(otherCell, 'rowSpan', rowSpan + 1);
514
+ continue;
515
+ }
516
+ }
517
+ }
518
+
519
+ // Insert new cell into new row
520
+ newCell = cloneCell(cell);
521
+ setSpanVal(newCell, 'colSpan', cell.colSpan);
522
+
523
+ newRow.appendChild(newCell);
524
+
525
+ lastCell = cell;
526
+ }
527
+ }
528
+
529
+ if (newRow.hasChildNodes()) {
530
+ if (!before) {
531
+ dom.insertAfter(newRow, rowElm);
532
+ } else {
533
+ rowElm.parentNode.insertBefore(newRow, rowElm);
534
+ }
535
+ }
536
+ }
537
+
538
+ function insertCol(before) {
539
+ var posX, lastCell;
540
+
541
+ // Find first/last column
542
+ each(grid, function(row) {
543
+ each(row, function(cell, x) {
544
+ if (isCellSelected(cell)) {
545
+ posX = x;
546
+
547
+ if (before) {
548
+ return false;
549
+ }
550
+ }
551
+ });
552
+
553
+ if (before) {
554
+ return !posX;
555
+ }
556
+ });
557
+
558
+ each(grid, function(row, y) {
559
+ var cell, rowSpan, colSpan;
560
+
561
+ if (!row[posX]) {
562
+ return;
563
+ }
564
+
565
+ cell = row[posX].elm;
566
+ if (cell != lastCell) {
567
+ colSpan = getSpanVal(cell, 'colspan');
568
+ rowSpan = getSpanVal(cell, 'rowspan');
569
+
570
+ if (colSpan == 1) {
571
+ if (!before) {
572
+ dom.insertAfter(cloneCell(cell), cell);
573
+ fillLeftDown(posX, y, rowSpan - 1, colSpan);
574
+ } else {
575
+ cell.parentNode.insertBefore(cloneCell(cell), cell);
576
+ fillLeftDown(posX, y, rowSpan - 1, colSpan);
577
+ }
578
+ } else {
579
+ setSpanVal(cell, 'colSpan', cell.colSpan + 1);
580
+ }
581
+
582
+ lastCell = cell;
583
+ }
584
+ });
585
+ }
586
+
587
+ function deleteCols() {
588
+ var cols = [];
589
+
590
+ // Get selected column indexes
591
+ each(grid, function(row) {
592
+ each(row, function(cell, x) {
593
+ if (isCellSelected(cell) && Tools.inArray(cols, x) === -1) {
594
+ each(grid, function(row) {
595
+ var cell = row[x].elm, colSpan;
596
+
597
+ colSpan = getSpanVal(cell, 'colSpan');
598
+
599
+ if (colSpan > 1) {
600
+ setSpanVal(cell, 'colSpan', colSpan - 1);
601
+ } else {
602
+ dom.remove(cell);
603
+ }
604
+ });
605
+
606
+ cols.push(x);
607
+ }
608
+ });
609
+ });
610
+
611
+ cleanup();
612
+ }
613
+
614
+ function deleteRows() {
615
+ var rows;
616
+
617
+ function deleteRow(tr) {
618
+ var nextTr, pos, lastCell;
619
+
620
+ nextTr = dom.getNext(tr, 'tr');
621
+
622
+ // Move down row spanned cells
623
+ each(tr.cells, function(cell) {
624
+ var rowSpan = getSpanVal(cell, 'rowSpan');
625
+
626
+ if (rowSpan > 1) {
627
+ setSpanVal(cell, 'rowSpan', rowSpan - 1);
628
+ pos = getPos(cell);
629
+ fillLeftDown(pos.x, pos.y, 1, 1);
630
+ }
631
+ });
632
+
633
+ // Delete cells
634
+ pos = getPos(tr.cells[0]);
635
+ each(grid[pos.y], function(cell) {
636
+ var rowSpan;
637
+
638
+ cell = cell.elm;
639
+
640
+ if (cell != lastCell) {
641
+ rowSpan = getSpanVal(cell, 'rowSpan');
642
+
643
+ if (rowSpan <= 1) {
644
+ dom.remove(cell);
645
+ } else {
646
+ setSpanVal(cell, 'rowSpan', rowSpan - 1);
647
+ }
648
+
649
+ lastCell = cell;
650
+ }
651
+ });
652
+ }
653
+
654
+ // Get selected rows and move selection out of scope
655
+ rows = getSelectedRows();
656
+
657
+ // Delete all selected rows
658
+ each(rows.reverse(), function(tr) {
659
+ deleteRow(tr);
660
+ });
661
+
662
+ cleanup();
663
+ }
664
+
665
+ function cutRows() {
666
+ var rows = getSelectedRows();
667
+
668
+ dom.remove(rows);
669
+ cleanup();
670
+
671
+ return rows;
672
+ }
673
+
674
+ function copyRows() {
675
+ var rows = getSelectedRows();
676
+
677
+ each(rows, function(row, i) {
678
+ rows[i] = cloneNode(row, true);
679
+ });
680
+
681
+ return rows;
682
+ }
683
+
684
+ function pasteRows(rows, before) {
685
+ var selectedRows = getSelectedRows(),
686
+ targetRow = selectedRows[before ? 0 : selectedRows.length - 1],
687
+ targetCellCount = targetRow.cells.length;
688
+
689
+ // Nothing to paste
690
+ if (!rows) {
691
+ return;
692
+ }
693
+
694
+ // Calc target cell count
695
+ each(grid, function(row) {
696
+ var match;
697
+
698
+ targetCellCount = 0;
699
+ each(row, function(cell) {
700
+ if (cell.real) {
701
+ targetCellCount += cell.colspan;
702
+ }
703
+
704
+ if (cell.elm.parentNode == targetRow) {
705
+ match = 1;
706
+ }
707
+ });
708
+
709
+ if (match) {
710
+ return false;
711
+ }
712
+ });
713
+
714
+ if (!before) {
715
+ rows.reverse();
716
+ }
717
+
718
+ each(rows, function(row) {
719
+ var i, cellCount = row.cells.length, cell;
720
+
721
+ // Remove col/rowspans
722
+ for (i = 0; i < cellCount; i++) {
723
+ cell = row.cells[i];
724
+ setSpanVal(cell, 'colSpan', 1);
725
+ setSpanVal(cell, 'rowSpan', 1);
726
+ }
727
+
728
+ // Needs more cells
729
+ for (i = cellCount; i < targetCellCount; i++) {
730
+ row.appendChild(cloneCell(row.cells[cellCount - 1]));
731
+ }
732
+
733
+ // Needs less cells
734
+ for (i = targetCellCount; i < cellCount; i++) {
735
+ dom.remove(row.cells[i]);
736
+ }
737
+
738
+ // Add before/after
739
+ if (before) {
740
+ targetRow.parentNode.insertBefore(row, targetRow);
741
+ } else {
742
+ dom.insertAfter(row, targetRow);
743
+ }
744
+ });
745
+
746
+ // Remove current selection
747
+ dom.removeClass(dom.select('td.mce-item-selected,th.mce-item-selected'), 'mce-item-selected');
748
+ }
749
+
750
+ function getPos(target) {
751
+ var pos;
752
+
753
+ each(grid, function(row, y) {
754
+ each(row, function(cell, x) {
755
+ if (cell.elm == target) {
756
+ pos = {x : x, y : y};
757
+ return false;
758
+ }
759
+ });
760
+
761
+ return !pos;
762
+ });
763
+
764
+ return pos;
765
+ }
766
+
767
+ function setStartCell(cell) {
768
+ startPos = getPos(cell);
769
+ }
770
+
771
+ function findEndPos() {
772
+ var maxX, maxY;
773
+
774
+ maxX = maxY = 0;
775
+
776
+ each(grid, function(row, y) {
777
+ each(row, function(cell, x) {
778
+ var colSpan, rowSpan;
779
+
780
+ if (isCellSelected(cell)) {
781
+ cell = grid[y][x];
782
+
783
+ if (x > maxX) {
784
+ maxX = x;
785
+ }
786
+
787
+ if (y > maxY) {
788
+ maxY = y;
789
+ }
790
+
791
+ if (cell.real) {
792
+ colSpan = cell.colspan - 1;
793
+ rowSpan = cell.rowspan - 1;
794
+
795
+ if (colSpan) {
796
+ if (x + colSpan > maxX) {
797
+ maxX = x + colSpan;
798
+ }
799
+ }
800
+
801
+ if (rowSpan) {
802
+ if (y + rowSpan > maxY) {
803
+ maxY = y + rowSpan;
804
+ }
805
+ }
806
+ }
807
+ }
808
+ });
809
+ });
810
+
811
+ return {x : maxX, y : maxY};
812
+ }
813
+
814
+ function setEndCell(cell) {
815
+ var startX, startY, endX, endY, maxX, maxY, colSpan, rowSpan, x, y;
816
+
817
+ endPos = getPos(cell);
818
+
819
+ if (startPos && endPos) {
820
+ // Get start/end positions
821
+ startX = Math.min(startPos.x, endPos.x);
822
+ startY = Math.min(startPos.y, endPos.y);
823
+ endX = Math.max(startPos.x, endPos.x);
824
+ endY = Math.max(startPos.y, endPos.y);
825
+
826
+ // Expand end positon to include spans
827
+ maxX = endX;
828
+ maxY = endY;
829
+
830
+ // Expand startX
831
+ for (y = startY; y <= maxY; y++) {
832
+ cell = grid[y][startX];
833
+
834
+ if (!cell.real) {
835
+ if (startX - (cell.colspan - 1) < startX) {
836
+ startX -= cell.colspan - 1;
837
+ }
838
+ }
839
+ }
840
+
841
+ // Expand startY
842
+ for (x = startX; x <= maxX; x++) {
843
+ cell = grid[startY][x];
844
+
845
+ if (!cell.real) {
846
+ if (startY - (cell.rowspan - 1) < startY) {
847
+ startY -= cell.rowspan - 1;
848
+ }
849
+ }
850
+ }
851
+
852
+ // Find max X, Y
853
+ for (y = startY; y <= endY; y++) {
854
+ for (x = startX; x <= endX; x++) {
855
+ cell = grid[y][x];
856
+
857
+ if (cell.real) {
858
+ colSpan = cell.colspan - 1;
859
+ rowSpan = cell.rowspan - 1;
860
+
861
+ if (colSpan) {
862
+ if (x + colSpan > maxX) {
863
+ maxX = x + colSpan;
864
+ }
865
+ }
866
+
867
+ if (rowSpan) {
868
+ if (y + rowSpan > maxY) {
869
+ maxY = y + rowSpan;
870
+ }
871
+ }
872
+ }
873
+ }
874
+ }
875
+
876
+ // Remove current selection
877
+ dom.removeClass(dom.select('td.mce-item-selected,th.mce-item-selected'), 'mce-item-selected');
878
+
879
+ // Add new selection
880
+ for (y = startY; y <= maxY; y++) {
881
+ for (x = startX; x <= maxX; x++) {
882
+ if (grid[y][x]) {
883
+ dom.addClass(grid[y][x].elm, 'mce-item-selected');
884
+ }
885
+ }
886
+ }
887
+ }
888
+ }
889
+
890
+ table = table || dom.getParent(selection.getStart(), 'table');
891
+
892
+ buildGrid();
893
+
894
+ selectedCell = dom.getParent(selection.getStart(), 'th,td');
895
+ if (selectedCell) {
896
+ startPos = getPos(selectedCell);
897
+ endPos = findEndPos();
898
+ selectedCell = getCell(startPos.x, startPos.y);
899
+ }
900
+
901
+ Tools.extend(this, {
902
+ deleteTable: deleteTable,
903
+ split: split,
904
+ merge: merge,
905
+ insertRow: insertRow,
906
+ insertCol: insertCol,
907
+ deleteCols: deleteCols,
908
+ deleteRows: deleteRows,
909
+ cutRows: cutRows,
910
+ copyRows: copyRows,
911
+ pasteRows: pasteRows,
912
+ getPos: getPos,
913
+ setStartCell: setStartCell,
914
+ setEndCell: setEndCell
915
+ });
916
+ };
917
+ });
918
+
919
+ // Included from: js/tinymce/plugins/table/classes/Quirks.js
920
+
921
+ /**
922
+ * Quirks.js
923
+ *
924
+ * Copyright, Moxiecode Systems AB
925
+ * Released under LGPL License.
926
+ *
927
+ * License: http://www.tinymce.com/license
928
+ * Contributing: http://www.tinymce.com/contributing
929
+ */
930
+
931
+ /**
932
+ * This class includes fixes for various browser quirks.
933
+ *
934
+ * @class tinymce.tableplugin.Quirks
935
+ * @private
936
+ */
937
+ define("tinymce/tableplugin/Quirks", [
938
+ "tinymce/util/VK",
939
+ "tinymce/Env",
940
+ "tinymce/util/Tools"
941
+ ], function(VK, Env, Tools) {
942
+ var each = Tools.each;
943
+
944
+ function getSpanVal(td, name) {
945
+ return parseInt(td.getAttribute(name) || 1, 10);
946
+ }
947
+
948
+ return function(editor) {
949
+ /**
950
+ * Fixed caret movement around tables on WebKit.
951
+ */
952
+ function moveWebKitSelection() {
953
+ function eventHandler(e) {
954
+ var key = e.keyCode;
955
+
956
+ function handle(upBool, sourceNode) {
957
+ var siblingDirection = upBool ? 'previousSibling' : 'nextSibling';
958
+ var currentRow = editor.dom.getParent(sourceNode, 'tr');
959
+ var siblingRow = currentRow[siblingDirection];
960
+
961
+ if (siblingRow) {
962
+ moveCursorToRow(editor, sourceNode, siblingRow, upBool);
963
+ e.preventDefault();
964
+ return true;
965
+ } else {
966
+ var tableNode = editor.dom.getParent(currentRow, 'table');
967
+ var middleNode = currentRow.parentNode;
968
+ var parentNodeName = middleNode.nodeName.toLowerCase();
969
+ if (parentNodeName === 'tbody' || parentNodeName === (upBool ? 'tfoot' : 'thead')) {
970
+ var targetParent = getTargetParent(upBool, tableNode, middleNode, 'tbody');
971
+ if (targetParent !== null) {
972
+ return moveToRowInTarget(upBool, targetParent, sourceNode);
973
+ }
974
+ }
975
+ return escapeTable(upBool, currentRow, siblingDirection, tableNode);
976
+ }
977
+ }
978
+
979
+ function getTargetParent(upBool, topNode, secondNode, nodeName) {
980
+ var tbodies = editor.dom.select('>' + nodeName, topNode);
981
+ var position = tbodies.indexOf(secondNode);
982
+ if (upBool && position === 0 || !upBool && position === tbodies.length - 1) {
983
+ return getFirstHeadOrFoot(upBool, topNode);
984
+ } else if (position === -1) {
985
+ var topOrBottom = secondNode.tagName.toLowerCase() === 'thead' ? 0 : tbodies.length - 1;
986
+ return tbodies[topOrBottom];
987
+ } else {
988
+ return tbodies[position + (upBool ? -1 : 1)];
989
+ }
990
+ }
991
+
992
+ function getFirstHeadOrFoot(upBool, parent) {
993
+ var tagName = upBool ? 'thead' : 'tfoot';
994
+ var headOrFoot = editor.dom.select('>' + tagName, parent);
995
+ return headOrFoot.length !== 0 ? headOrFoot[0] : null;
996
+ }
997
+
998
+ function moveToRowInTarget(upBool, targetParent, sourceNode) {
999
+ var targetRow = getChildForDirection(targetParent, upBool);
1000
+
1001
+ if (targetRow) {
1002
+ moveCursorToRow(editor, sourceNode, targetRow, upBool);
1003
+ }
1004
+
1005
+ e.preventDefault();
1006
+ return true;
1007
+ }
1008
+
1009
+ function escapeTable(upBool, currentRow, siblingDirection, table) {
1010
+ var tableSibling = table[siblingDirection];
1011
+
1012
+ if (tableSibling) {
1013
+ moveCursorToStartOfElement(tableSibling);
1014
+ return true;
1015
+ } else {
1016
+ var parentCell = editor.dom.getParent(table, 'td,th');
1017
+ if (parentCell) {
1018
+ return handle(upBool, parentCell, e);
1019
+ } else {
1020
+ var backUpSibling = getChildForDirection(currentRow, !upBool);
1021
+ moveCursorToStartOfElement(backUpSibling);
1022
+ e.preventDefault();
1023
+ return false;
1024
+ }
1025
+ }
1026
+ }
1027
+
1028
+ function getChildForDirection(parent, up) {
1029
+ var child = parent && parent[up ? 'lastChild' : 'firstChild'];
1030
+ // BR is not a valid table child to return in this case we return the table cell
1031
+ return child && child.nodeName === 'BR' ? editor.dom.getParent(child, 'td,th') : child;
1032
+ }
1033
+
1034
+ function moveCursorToStartOfElement(n) {
1035
+ editor.selection.setCursorLocation(n, 0);
1036
+ }
1037
+
1038
+ function isVerticalMovement() {
1039
+ return key == VK.UP || key == VK.DOWN;
1040
+ }
1041
+
1042
+ function isInTable(editor) {
1043
+ var node = editor.selection.getNode();
1044
+ var currentRow = editor.dom.getParent(node, 'tr');
1045
+ return currentRow !== null;
1046
+ }
1047
+
1048
+ function columnIndex(column) {
1049
+ var colIndex = 0;
1050
+ var c = column;
1051
+ while (c.previousSibling) {
1052
+ c = c.previousSibling;
1053
+ colIndex = colIndex + getSpanVal(c, "colspan");
1054
+ }
1055
+ return colIndex;
1056
+ }
1057
+
1058
+ function findColumn(rowElement, columnIndex) {
1059
+ var c = 0, r = 0;
1060
+
1061
+ each(rowElement.children, function(cell, i) {
1062
+ c = c + getSpanVal(cell, "colspan");
1063
+ r = i;
1064
+ if (c > columnIndex) {
1065
+ return false;
1066
+ }
1067
+ });
1068
+ return r;
1069
+ }
1070
+
1071
+ function moveCursorToRow(ed, node, row, upBool) {
1072
+ var srcColumnIndex = columnIndex(editor.dom.getParent(node, 'td,th'));
1073
+ var tgtColumnIndex = findColumn(row, srcColumnIndex);
1074
+ var tgtNode = row.childNodes[tgtColumnIndex];
1075
+ var rowCellTarget = getChildForDirection(tgtNode, upBool);
1076
+ moveCursorToStartOfElement(rowCellTarget || tgtNode);
1077
+ }
1078
+
1079
+ function shouldFixCaret(preBrowserNode) {
1080
+ var newNode = editor.selection.getNode();
1081
+ var newParent = editor.dom.getParent(newNode, 'td,th');
1082
+ var oldParent = editor.dom.getParent(preBrowserNode, 'td,th');
1083
+
1084
+ return newParent && newParent !== oldParent && checkSameParentTable(newParent, oldParent);
1085
+ }
1086
+
1087
+ function checkSameParentTable(nodeOne, NodeTwo) {
1088
+ return editor.dom.getParent(nodeOne, 'TABLE') === editor.dom.getParent(NodeTwo, 'TABLE');
1089
+ }
1090
+
1091
+ if (isVerticalMovement() && isInTable(editor)) {
1092
+ var preBrowserNode = editor.selection.getNode();
1093
+ setTimeout(function() {
1094
+ if (shouldFixCaret(preBrowserNode)) {
1095
+ handle(!e.shiftKey && key === VK.UP, preBrowserNode, e);
1096
+ }
1097
+ }, 0);
1098
+ }
1099
+ }
1100
+
1101
+ editor.on('KeyDown', function(e) {
1102
+ eventHandler(e);
1103
+ });
1104
+ }
1105
+
1106
+ function fixBeforeTableCaretBug() {
1107
+ // Checks if the selection/caret is at the start of the specified block element
1108
+ function isAtStart(rng, par) {
1109
+ var doc = par.ownerDocument, rng2 = doc.createRange(), elm;
1110
+
1111
+ rng2.setStartBefore(par);
1112
+ rng2.setEnd(rng.endContainer, rng.endOffset);
1113
+
1114
+ elm = doc.createElement('body');
1115
+ elm.appendChild(rng2.cloneContents());
1116
+
1117
+ // Check for text characters of other elements that should be treated as content
1118
+ return elm.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi, '-').replace(/<[^>]+>/g, '').length === 0;
1119
+ }
1120
+
1121
+ // Fixes an bug where it's impossible to place the caret before a table in Gecko
1122
+ // this fix solves it by detecting when the caret is at the beginning of such a table
1123
+ // and then manually moves the caret infront of the table
1124
+ editor.on('KeyDown', function(e) {
1125
+ var rng, table, dom = editor.dom;
1126
+
1127
+ // On gecko it's not possible to place the caret before a table
1128
+ if (e.keyCode == 37 || e.keyCode == 38) {
1129
+ rng = editor.selection.getRng();
1130
+ table = dom.getParent(rng.startContainer, 'table');
1131
+
1132
+ if (table && editor.getBody().firstChild == table) {
1133
+ if (isAtStart(rng, table)) {
1134
+ rng = dom.createRng();
1135
+
1136
+ rng.setStartBefore(table);
1137
+ rng.setEndBefore(table);
1138
+
1139
+ editor.selection.setRng(rng);
1140
+
1141
+ e.preventDefault();
1142
+ }
1143
+ }
1144
+ }
1145
+ });
1146
+ }
1147
+
1148
+ // Fixes an issue on Gecko where it's impossible to place the caret behind a table
1149
+ // This fix will force a paragraph element after the table but only when the forced_root_block setting is enabled
1150
+ function fixTableCaretPos() {
1151
+ editor.on('KeyDown SetContent VisualAid', function() {
1152
+ var last;
1153
+
1154
+ // Skip empty text nodes from the end
1155
+ for (last = editor.getBody().lastChild; last; last = last.previousSibling) {
1156
+ if (last.nodeType == 3) {
1157
+ if (last.nodeValue.length > 0) {
1158
+ break;
1159
+ }
1160
+ } else if (last.nodeType == 1 && !last.getAttribute('data-mce-bogus')) {
1161
+ break;
1162
+ }
1163
+ }
1164
+
1165
+ if (last && last.nodeName == 'TABLE') {
1166
+ if (editor.settings.forced_root_block) {
1167
+ editor.dom.add(
1168
+ editor.getBody(),
1169
+ editor.settings.forced_root_block,
1170
+ editor.settings.forced_root_block_attrs,
1171
+ Env.ie && Env.ie < 11 ? '&nbsp;' : '<br data-mce-bogus="1" />'
1172
+ );
1173
+ } else {
1174
+ editor.dom.add(editor.getBody(), 'br', {'data-mce-bogus': '1'});
1175
+ }
1176
+ }
1177
+ });
1178
+
1179
+ editor.on('PreProcess', function(o) {
1180
+ var last = o.node.lastChild;
1181
+
1182
+ if (last && (last.nodeName == "BR" || (last.childNodes.length == 1 &&
1183
+ (last.firstChild.nodeName == 'BR' || last.firstChild.nodeValue == '\u00a0'))) &&
1184
+ last.previousSibling && last.previousSibling.nodeName == "TABLE") {
1185
+ editor.dom.remove(last);
1186
+ }
1187
+ });
1188
+ }
1189
+
1190
+ // this nasty hack is here to work around some WebKit selection bugs.
1191
+ function fixTableCellSelection() {
1192
+ function tableCellSelected(ed, rng, n, currentCell) {
1193
+ // The decision of when a table cell is selected is somewhat involved. The fact that this code is
1194
+ // required is actually a pointer to the root cause of this bug. A cell is selected when the start
1195
+ // and end offsets are 0, the start container is a text, and the selection node is either a TR (most cases)
1196
+ // or the parent of the table (in the case of the selection containing the last cell of a table).
1197
+ var TEXT_NODE = 3, table = ed.dom.getParent(rng.startContainer, 'TABLE');
1198
+ var tableParent, allOfCellSelected, tableCellSelection;
1199
+
1200
+ if (table) {
1201
+ tableParent = table.parentNode;
1202
+ }
1203
+
1204
+ allOfCellSelected = rng.startContainer.nodeType == TEXT_NODE &&
1205
+ rng.startOffset === 0 &&
1206
+ rng.endOffset === 0 &&
1207
+ currentCell &&
1208
+ (n.nodeName == "TR" || n == tableParent);
1209
+
1210
+ tableCellSelection = (n.nodeName == "TD" || n.nodeName == "TH") && !currentCell;
1211
+
1212
+ return allOfCellSelected || tableCellSelection;
1213
+ }
1214
+
1215
+ function fixSelection() {
1216
+ var rng = editor.selection.getRng();
1217
+ var n = editor.selection.getNode();
1218
+ var currentCell = editor.dom.getParent(rng.startContainer, 'TD,TH');
1219
+
1220
+ if (!tableCellSelected(editor, rng, n, currentCell)) {
1221
+ return;
1222
+ }
1223
+
1224
+ if (!currentCell) {
1225
+ currentCell = n;
1226
+ }
1227
+
1228
+ // Get the very last node inside the table cell
1229
+ var end = currentCell.lastChild;
1230
+ while (end.lastChild) {
1231
+ end = end.lastChild;
1232
+ }
1233
+
1234
+ // Select the entire table cell. Nothing outside of the table cell should be selected.
1235
+ rng.setEnd(end, end.nodeValue.length);
1236
+ editor.selection.setRng(rng);
1237
+ }
1238
+
1239
+ editor.on('KeyDown', function() {
1240
+ fixSelection();
1241
+ });
1242
+
1243
+ editor.on('MouseDown', function(e) {
1244
+ if (e.button != 2) {
1245
+ fixSelection();
1246
+ }
1247
+ });
1248
+ }
1249
+
1250
+ /**
1251
+ * Delete table if all cells are selected.
1252
+ */
1253
+ function deleteTable() {
1254
+ editor.on('keydown', function(e) {
1255
+ if ((e.keyCode == VK.DELETE || e.keyCode == VK.BACKSPACE) && !e.isDefaultPrevented()) {
1256
+ var table = editor.dom.getParent(editor.selection.getStart(), 'table');
1257
+
1258
+ if (table) {
1259
+ var cells = editor.dom.select('td,th', table), i = cells.length;
1260
+ while (i--) {
1261
+ if (!editor.dom.hasClass(cells[i], 'mce-item-selected')) {
1262
+ return;
1263
+ }
1264
+ }
1265
+
1266
+ e.preventDefault();
1267
+ editor.execCommand('mceTableDelete');
1268
+ }
1269
+ }
1270
+ });
1271
+ }
1272
+
1273
+ deleteTable();
1274
+
1275
+ if (Env.webkit) {
1276
+ moveWebKitSelection();
1277
+ fixTableCellSelection();
1278
+ }
1279
+
1280
+ if (Env.gecko) {
1281
+ fixBeforeTableCaretBug();
1282
+ fixTableCaretPos();
1283
+ }
1284
+
1285
+ if (Env.ie > 10) {
1286
+ fixBeforeTableCaretBug();
1287
+ fixTableCaretPos();
1288
+ }
1289
+ };
1290
+ });
1291
+
1292
+ // Included from: js/tinymce/plugins/table/classes/CellSelection.js
1293
+
1294
+ /**
1295
+ * CellSelection.js
1296
+ *
1297
+ * Copyright, Moxiecode Systems AB
1298
+ * Released under LGPL License.
1299
+ *
1300
+ * License: http://www.tinymce.com/license
1301
+ * Contributing: http://www.tinymce.com/contributing
1302
+ */
1303
+
1304
+ /**
1305
+ * This class handles table cell selection by faking it using a css class that gets applied
1306
+ * to cells when dragging the mouse from one cell to another.
1307
+ *
1308
+ * @class tinymce.tableplugin.CellSelection
1309
+ * @private
1310
+ */
1311
+ define("tinymce/tableplugin/CellSelection", [
1312
+ "tinymce/tableplugin/TableGrid",
1313
+ "tinymce/dom/TreeWalker",
1314
+ "tinymce/util/Tools"
1315
+ ], function(TableGrid, TreeWalker, Tools) {
1316
+ return function(editor) {
1317
+ var dom = editor.dom, tableGrid, startCell, startTable, hasCellSelection = true;
1318
+
1319
+ function clear() {
1320
+ // Restore selection possibilities
1321
+ editor.getBody().style.webkitUserSelect = '';
1322
+
1323
+ if (hasCellSelection) {
1324
+ editor.dom.removeClass(
1325
+ editor.dom.select('td.mce-item-selected,th.mce-item-selected'),
1326
+ 'mce-item-selected'
1327
+ );
1328
+
1329
+ hasCellSelection = false;
1330
+ }
1331
+ }
1332
+
1333
+ function cellSelectionHandler(e) {
1334
+ var sel, table, target = e.target;
1335
+
1336
+ if (startCell && (tableGrid || target != startCell) && (target.nodeName == 'TD' || target.nodeName == 'TH')) {
1337
+ table = dom.getParent(target, 'table');
1338
+ if (table == startTable) {
1339
+ if (!tableGrid) {
1340
+ tableGrid = new TableGrid(editor, table);
1341
+ tableGrid.setStartCell(startCell);
1342
+
1343
+ editor.getBody().style.webkitUserSelect = 'none';
1344
+ }
1345
+
1346
+ tableGrid.setEndCell(target);
1347
+ hasCellSelection = true;
1348
+ }
1349
+
1350
+ // Remove current selection
1351
+ sel = editor.selection.getSel();
1352
+
1353
+ try {
1354
+ if (sel.removeAllRanges) {
1355
+ sel.removeAllRanges();
1356
+ } else {
1357
+ sel.empty();
1358
+ }
1359
+ } catch (ex) {
1360
+ // IE9 might throw errors here
1361
+ }
1362
+
1363
+ e.preventDefault();
1364
+ }
1365
+ }
1366
+
1367
+ // Add cell selection logic
1368
+ editor.on('MouseDown', function(e) {
1369
+ if (e.button != 2) {
1370
+ clear();
1371
+
1372
+ startCell = dom.getParent(e.target, 'td,th');
1373
+ startTable = dom.getParent(startCell, 'table');
1374
+ }
1375
+ });
1376
+
1377
+ editor.on('mouseover', cellSelectionHandler);
1378
+
1379
+ editor.on('remove', function() {
1380
+ dom.unbind(editor.getDoc(), 'mouseover', cellSelectionHandler);
1381
+ });
1382
+
1383
+ editor.on('MouseUp', function() {
1384
+ var rng, sel = editor.selection, selectedCells, walker, node, lastNode, endNode;
1385
+
1386
+ function setPoint(node, start) {
1387
+ var walker = new TreeWalker(node, node);
1388
+
1389
+ do {
1390
+ // Text node
1391
+ if (node.nodeType == 3 && Tools.trim(node.nodeValue).length !== 0) {
1392
+ if (start) {
1393
+ rng.setStart(node, 0);
1394
+ } else {
1395
+ rng.setEnd(node, node.nodeValue.length);
1396
+ }
1397
+
1398
+ return;
1399
+ }
1400
+
1401
+ // BR element
1402
+ if (node.nodeName == 'BR') {
1403
+ if (start) {
1404
+ rng.setStartBefore(node);
1405
+ } else {
1406
+ rng.setEndBefore(node);
1407
+ }
1408
+
1409
+ return;
1410
+ }
1411
+ } while ((node = (start ? walker.next() : walker.prev())));
1412
+ }
1413
+
1414
+ // Move selection to startCell
1415
+ if (startCell) {
1416
+ if (tableGrid) {
1417
+ editor.getBody().style.webkitUserSelect = '';
1418
+ }
1419
+
1420
+ // Try to expand text selection as much as we can only Gecko supports cell selection
1421
+ selectedCells = dom.select('td.mce-item-selected,th.mce-item-selected');
1422
+ if (selectedCells.length > 0) {
1423
+ rng = dom.createRng();
1424
+ node = selectedCells[0];
1425
+ endNode = selectedCells[selectedCells.length - 1];
1426
+ rng.setStartBefore(node);
1427
+ rng.setEndAfter(node);
1428
+
1429
+ setPoint(node, 1);
1430
+ walker = new TreeWalker(node, dom.getParent(selectedCells[0], 'table'));
1431
+
1432
+ do {
1433
+ if (node.nodeName == 'TD' || node.nodeName == 'TH') {
1434
+ if (!dom.hasClass(node, 'mce-item-selected')) {
1435
+ break;
1436
+ }
1437
+
1438
+ lastNode = node;
1439
+ }
1440
+ } while ((node = walker.next()));
1441
+
1442
+ setPoint(lastNode);
1443
+
1444
+ sel.setRng(rng);
1445
+ }
1446
+
1447
+ editor.nodeChanged();
1448
+ startCell = tableGrid = startTable = null;
1449
+ }
1450
+ });
1451
+
1452
+ editor.on('KeyUp', function() {
1453
+ clear();
1454
+ });
1455
+
1456
+ return {
1457
+ clear: clear
1458
+ };
1459
+ };
1460
+ });
1461
+
1462
+ // Included from: js/tinymce/plugins/table/classes/Plugin.js
1463
+
1464
+ /**
1465
+ * Plugin.js
1466
+ *
1467
+ * Copyright, Moxiecode Systems AB
1468
+ * Released under LGPL License.
1469
+ *
1470
+ * License: http://www.tinymce.com/license
1471
+ * Contributing: http://www.tinymce.com/contributing
1472
+ */
1473
+
1474
+ /**
1475
+ * This class contains all core logic for the table plugin.
1476
+ *
1477
+ * @class tinymce.tableplugin.Plugin
1478
+ * @private
1479
+ */
1480
+ define("tinymce/tableplugin/Plugin", [
1481
+ "tinymce/tableplugin/TableGrid",
1482
+ "tinymce/tableplugin/Quirks",
1483
+ "tinymce/tableplugin/CellSelection",
1484
+ "tinymce/util/Tools",
1485
+ "tinymce/dom/TreeWalker",
1486
+ "tinymce/Env",
1487
+ "tinymce/PluginManager"
1488
+ ], function(TableGrid, Quirks, CellSelection, Tools, TreeWalker, Env, PluginManager) {
1489
+ var each = Tools.each;
1490
+
1491
+ function Plugin(editor) {
1492
+ var winMan, clipboardRows, self = this; // Might be selected cells on reload
1493
+
1494
+ function removePxSuffix(size) {
1495
+ return size ? size.replace(/px$/, '') : "";
1496
+ }
1497
+
1498
+ function addSizeSuffix(size) {
1499
+ if (/^[0-9]+$/.test(size)) {
1500
+ size += "px";
1501
+ }
1502
+
1503
+ return size;
1504
+ }
1505
+
1506
+ function unApplyAlign(elm) {
1507
+ each('left center right'.split(' '), function(name) {
1508
+ editor.formatter.remove('align' + name, {}, elm);
1509
+ });
1510
+ }
1511
+
1512
+ function tableDialog() {
1513
+ var dom = editor.dom, tableElm, colsCtrl, rowsCtrl, data;
1514
+
1515
+ tableElm = dom.getParent(editor.selection.getStart(), 'table');
1516
+
1517
+ data = {
1518
+ width: removePxSuffix(dom.getStyle(tableElm, 'width') || dom.getAttrib(tableElm, 'width')),
1519
+ height: removePxSuffix(dom.getStyle(tableElm, 'height') || dom.getAttrib(tableElm, 'height')),
1520
+ cellspacing: tableElm ? dom.getAttrib(tableElm, 'cellspacing') : '',
1521
+ cellpadding: tableElm ? dom.getAttrib(tableElm, 'cellpadding') : '',
1522
+ border: tableElm ? dom.getAttrib(tableElm, 'border') : '',
1523
+ caption: !!dom.select('caption', tableElm)[0]
1524
+ };
1525
+
1526
+ each('left center right'.split(' '), function(name) {
1527
+ if (editor.formatter.matchNode(tableElm, 'align' + name)) {
1528
+ data.align = name;
1529
+ }
1530
+ });
1531
+
1532
+ if (!tableElm) {
1533
+ colsCtrl = {label: 'Cols', name: 'cols'};
1534
+ rowsCtrl = {label: 'Rows', name: 'rows'};
1535
+ }
1536
+
1537
+ editor.windowManager.open({
1538
+ title: "Table properties",
1539
+ items: {
1540
+ type: 'form',
1541
+ layout: 'grid',
1542
+ columns: 2,
1543
+ data: data,
1544
+ defaults: {
1545
+ type: 'textbox',
1546
+ maxWidth: 50
1547
+ },
1548
+ items: [
1549
+ colsCtrl,
1550
+ rowsCtrl,
1551
+ {label: 'Width', name: 'width'},
1552
+ {label: 'Height', name: 'height'},
1553
+ {label: 'Cell spacing', name: 'cellspacing'},
1554
+ {label: 'Cell padding', name: 'cellpadding'},
1555
+ {label: 'Border', name: 'border'},
1556
+ {label: 'Caption', name: 'caption', type: 'checkbox'},
1557
+ {
1558
+ label: 'Alignment',
1559
+ minWidth: 90,
1560
+ name: 'align',
1561
+ type: 'listbox',
1562
+ text: 'None',
1563
+ maxWidth: null,
1564
+ values: [
1565
+ {text: 'None', value: ''},
1566
+ {text: 'Left', value: 'left'},
1567
+ {text: 'Center', value: 'center'},
1568
+ {text: 'Right', value: 'right'}
1569
+ ]
1570
+ }
1571
+ ]
1572
+ },
1573
+
1574
+ onsubmit: function() {
1575
+ var data = this.toJSON(), captionElm;
1576
+
1577
+ editor.undoManager.transact(function() {
1578
+ if (!tableElm) {
1579
+ tableElm = insertTable(data.cols || 1, data.rows || 1);
1580
+ }
1581
+
1582
+ editor.dom.setAttribs(tableElm, {
1583
+ cellspacing: data.cellspacing,
1584
+ cellpadding: data.cellpadding,
1585
+ border: data.border
1586
+ });
1587
+
1588
+ editor.dom.setStyles(tableElm, {
1589
+ width: addSizeSuffix(data.width),
1590
+ height: addSizeSuffix(data.height)
1591
+ });
1592
+
1593
+ // Toggle caption on/off
1594
+ captionElm = dom.select('caption', tableElm)[0];
1595
+
1596
+ if (captionElm && !data.caption) {
1597
+ dom.remove(captionElm);
1598
+ }
1599
+
1600
+ if (!captionElm && data.caption) {
1601
+ captionElm = dom.create('caption');
1602
+ captionElm.innerHTML = !Env.ie ? '<br data-mce-bogus="1"/>' : '\u00a0';
1603
+ tableElm.insertBefore(captionElm, tableElm.firstChild);
1604
+ }
1605
+
1606
+ unApplyAlign(tableElm);
1607
+ if (data.align) {
1608
+ editor.formatter.apply('align' + data.align, {}, tableElm);
1609
+ }
1610
+
1611
+ editor.focus();
1612
+ editor.addVisual();
1613
+ });
1614
+ }
1615
+ });
1616
+ }
1617
+
1618
+ function mergeDialog(grid, cell) {
1619
+ editor.windowManager.open({
1620
+ title: "Merge cells",
1621
+ body: [
1622
+ {label: 'Cols', name: 'cols', type: 'textbox', size: 10},
1623
+ {label: 'Rows', name: 'rows', type: 'textbox', size: 10}
1624
+ ],
1625
+ onsubmit: function() {
1626
+ var data = this.toJSON();
1627
+
1628
+ editor.undoManager.transact(function() {
1629
+ grid.merge(cell, data.cols, data.rows);
1630
+ });
1631
+ }
1632
+ });
1633
+ }
1634
+
1635
+ function cellDialog() {
1636
+ var dom = editor.dom, cellElm, data, cells = [];
1637
+
1638
+ // Get selected cells or the current cell
1639
+ cells = editor.dom.select('td.mce-item-selected,th.mce-item-selected');
1640
+ cellElm = editor.dom.getParent(editor.selection.getStart(), 'td,th');
1641
+ if (!cells.length && cellElm) {
1642
+ cells.push(cellElm);
1643
+ }
1644
+
1645
+ cellElm = cellElm || cells[0];
1646
+
1647
+ if (!cellElm) {
1648
+ // If this element is null, return now to avoid crashing.
1649
+ return;
1650
+ }
1651
+
1652
+ data = {
1653
+ width: removePxSuffix(dom.getStyle(cellElm, 'width') || dom.getAttrib(cellElm, 'width')),
1654
+ height: removePxSuffix(dom.getStyle(cellElm, 'height') || dom.getAttrib(cellElm, 'height')),
1655
+ scope: dom.getAttrib(cellElm, 'scope')
1656
+ };
1657
+
1658
+ data.type = cellElm.nodeName.toLowerCase();
1659
+
1660
+ each('left center right'.split(' '), function(name) {
1661
+ if (editor.formatter.matchNode(cellElm, 'align' + name)) {
1662
+ data.align = name;
1663
+ }
1664
+ });
1665
+
1666
+ editor.windowManager.open({
1667
+ title: "Cell properties",
1668
+ items: {
1669
+ type: 'form',
1670
+ data: data,
1671
+ layout: 'grid',
1672
+ columns: 2,
1673
+ defaults: {
1674
+ type: 'textbox',
1675
+ maxWidth: 50
1676
+ },
1677
+ items: [
1678
+ {label: 'Width', name: 'width'},
1679
+ {label: 'Height', name: 'height'},
1680
+ {
1681
+ label: 'Cell type',
1682
+ name: 'type',
1683
+ type: 'listbox',
1684
+ text: 'None',
1685
+ minWidth: 90,
1686
+ maxWidth: null,
1687
+ values: [
1688
+ {text: 'Cell', value: 'td'},
1689
+ {text: 'Header cell', value: 'th'}
1690
+ ]
1691
+ },
1692
+ {
1693
+ label: 'Scope',
1694
+ name: 'scope',
1695
+ type: 'listbox',
1696
+ text: 'None',
1697
+ minWidth: 90,
1698
+ maxWidth: null,
1699
+ values: [
1700
+ {text: 'None', value: ''},
1701
+ {text: 'Row', value: 'row'},
1702
+ {text: 'Column', value: 'col'},
1703
+ {text: 'Row group', value: 'rowgroup'},
1704
+ {text: 'Column group', value: 'colgroup'}
1705
+ ]
1706
+ },
1707
+ {
1708
+ label: 'Alignment',
1709
+ name: 'align',
1710
+ type: 'listbox',
1711
+ text: 'None',
1712
+ minWidth: 90,
1713
+ maxWidth: null,
1714
+ values: [
1715
+ {text: 'None', value: ''},
1716
+ {text: 'Left', value: 'left'},
1717
+ {text: 'Center', value: 'center'},
1718
+ {text: 'Right', value: 'right'}
1719
+ ]
1720
+ }
1721
+ ]
1722
+ },
1723
+
1724
+ onsubmit: function() {
1725
+ var data = this.toJSON();
1726
+
1727
+ editor.undoManager.transact(function() {
1728
+ each(cells, function(cellElm) {
1729
+ editor.dom.setAttrib(cellElm, 'scope', data.scope);
1730
+
1731
+ editor.dom.setStyles(cellElm, {
1732
+ width: addSizeSuffix(data.width),
1733
+ height: addSizeSuffix(data.height)
1734
+ });
1735
+
1736
+ // Switch cell type
1737
+ if (data.type && cellElm.nodeName.toLowerCase() != data.type) {
1738
+ cellElm = dom.rename(cellElm, data.type);
1739
+ }
1740
+
1741
+ // Apply/remove alignment
1742
+ unApplyAlign(cellElm);
1743
+ if (data.align) {
1744
+ editor.formatter.apply('align' + data.align, {}, cellElm);
1745
+ }
1746
+ });
1747
+
1748
+ editor.focus();
1749
+ });
1750
+ }
1751
+ });
1752
+ }
1753
+
1754
+ function rowDialog() {
1755
+ var dom = editor.dom, tableElm, cellElm, rowElm, data, rows = [];
1756
+
1757
+ tableElm = editor.dom.getParent(editor.selection.getStart(), 'table');
1758
+ cellElm = editor.dom.getParent(editor.selection.getStart(), 'td,th');
1759
+
1760
+ each(tableElm.rows, function(row) {
1761
+ each(row.cells, function(cell) {
1762
+ if (dom.hasClass(cell, 'mce-item-selected') || cell == cellElm) {
1763
+ rows.push(row);
1764
+ return false;
1765
+ }
1766
+ });
1767
+ });
1768
+
1769
+ rowElm = rows[0];
1770
+ if (!rowElm) {
1771
+ // If this element is null, return now to avoid crashing.
1772
+ return;
1773
+ }
1774
+
1775
+ data = {
1776
+ height: removePxSuffix(dom.getStyle(rowElm, 'height') || dom.getAttrib(rowElm, 'height')),
1777
+ scope: dom.getAttrib(rowElm, 'scope')
1778
+ };
1779
+
1780
+ data.type = rowElm.parentNode.nodeName.toLowerCase();
1781
+
1782
+ each('left center right'.split(' '), function(name) {
1783
+ if (editor.formatter.matchNode(rowElm, 'align' + name)) {
1784
+ data.align = name;
1785
+ }
1786
+ });
1787
+
1788
+ editor.windowManager.open({
1789
+ title: "Row properties",
1790
+ items: {
1791
+ type: 'form',
1792
+ data: data,
1793
+ columns: 2,
1794
+ defaults: {
1795
+ type: 'textbox'
1796
+ },
1797
+ items: [
1798
+ {
1799
+ type: 'listbox',
1800
+ name: 'type',
1801
+ label: 'Row type',
1802
+ text: 'None',
1803
+ maxWidth: null,
1804
+ values: [
1805
+ {text: 'Header', value: 'thead'},
1806
+ {text: 'Body', value: 'tbody'},
1807
+ {text: 'Footer', value: 'tfoot'}
1808
+ ]
1809
+ },
1810
+ {
1811
+ type: 'listbox',
1812
+ name: 'align',
1813
+ label: 'Alignment',
1814
+ text: 'None',
1815
+ maxWidth: null,
1816
+ values: [
1817
+ {text: 'None', value: ''},
1818
+ {text: 'Left', value: 'left'},
1819
+ {text: 'Center', value: 'center'},
1820
+ {text: 'Right', value: 'right'}
1821
+ ]
1822
+ },
1823
+ {label: 'Height', name: 'height'}
1824
+ ]
1825
+ },
1826
+
1827
+ onsubmit: function() {
1828
+ var data = this.toJSON(), tableElm, oldParentElm, parentElm;
1829
+
1830
+ editor.undoManager.transact(function() {
1831
+ var toType = data.type;
1832
+
1833
+ each(rows, function(rowElm) {
1834
+ editor.dom.setAttrib(rowElm, 'scope', data.scope);
1835
+
1836
+ editor.dom.setStyles(rowElm, {
1837
+ height: addSizeSuffix(data.height)
1838
+ });
1839
+
1840
+ if (toType != rowElm.parentNode.nodeName.toLowerCase()) {
1841
+ tableElm = dom.getParent(rowElm, 'table');
1842
+
1843
+ oldParentElm = rowElm.parentNode;
1844
+ parentElm = dom.select(toType, tableElm)[0];
1845
+ if (!parentElm) {
1846
+ parentElm = dom.create(toType);
1847
+ if (tableElm.firstChild) {
1848
+ tableElm.insertBefore(parentElm, tableElm.firstChild);
1849
+ } else {
1850
+ tableElm.appendChild(parentElm);
1851
+ }
1852
+ }
1853
+
1854
+ parentElm.appendChild(rowElm);
1855
+
1856
+ if (!oldParentElm.hasChildNodes()) {
1857
+ dom.remove(oldParentElm);
1858
+ }
1859
+ }
1860
+
1861
+ // Apply/remove alignment
1862
+ unApplyAlign(rowElm);
1863
+ if (data.align) {
1864
+ editor.formatter.apply('align' + data.align, {}, rowElm);
1865
+ }
1866
+ });
1867
+
1868
+ editor.focus();
1869
+ });
1870
+ }
1871
+ });
1872
+ }
1873
+
1874
+ function cmd(command) {
1875
+ return function() {
1876
+ editor.execCommand(command);
1877
+ };
1878
+ }
1879
+
1880
+ function insertTable(cols, rows) {
1881
+ var y, x, html;
1882
+
1883
+ html = '<table id="__mce"><tbody>';
1884
+
1885
+ for (y = 0; y < rows; y++) {
1886
+ html += '<tr>';
1887
+
1888
+ for (x = 0; x < cols; x++) {
1889
+ html += '<td>' + (Env.ie ? " " : '<br>') + '</td>';
1890
+ }
1891
+
1892
+ html += '</tr>';
1893
+ }
1894
+
1895
+ html += '</tbody></table>';
1896
+
1897
+ editor.insertContent(html);
1898
+
1899
+ var tableElm = editor.dom.get('__mce');
1900
+ editor.dom.setAttrib(tableElm, 'id', null);
1901
+
1902
+ return tableElm;
1903
+ }
1904
+
1905
+ function handleDisabledState(ctrl, selector) {
1906
+ function bindStateListener() {
1907
+ ctrl.disabled(!editor.dom.getParent(editor.selection.getStart(), selector));
1908
+
1909
+ editor.selection.selectorChanged(selector, function(state) {
1910
+ ctrl.disabled(!state);
1911
+ });
1912
+ }
1913
+
1914
+ if (editor.initialized) {
1915
+ bindStateListener();
1916
+ } else {
1917
+ editor.on('init', bindStateListener);
1918
+ }
1919
+ }
1920
+
1921
+ function postRender() {
1922
+ /*jshint validthis:true*/
1923
+ handleDisabledState(this, 'table');
1924
+ }
1925
+
1926
+ function postRenderCell() {
1927
+ /*jshint validthis:true*/
1928
+ handleDisabledState(this, 'td,th');
1929
+ }
1930
+
1931
+ function generateTableGrid() {
1932
+ var html = '';
1933
+
1934
+ html = '<table role="grid" class="mce-grid mce-grid-border" aria-readonly="true">';
1935
+
1936
+ for (var y = 0; y < 10; y++) {
1937
+ html += '<tr>';
1938
+
1939
+ for (var x = 0; x < 10; x++) {
1940
+ html += '<td role="gridcell" tabindex="-1"><a id="mcegrid' + (y * 10 + x) + '" href="#" ' +
1941
+ 'data-mce-x="' + x + '" data-mce-y="' + y + '" ' +
1942
+ '' + (x + y === 0 ? ' class="mce-active"' : '') + '></a></td>';
1943
+ }
1944
+
1945
+ html += '</tr>';
1946
+ }
1947
+
1948
+ html += '</table>';
1949
+
1950
+ html += '<div class="mce-text-center" role="presentation">1 x 1</div>';
1951
+
1952
+ return html;
1953
+ }
1954
+
1955
+ function selectGrid(tx, ty, control) {
1956
+ var table = control.getEl().getElementsByTagName('table')[0];
1957
+ var rel = control.parent().rel, x, y, focusCell, cell;
1958
+
1959
+ if (control.isRtl() || rel == 'tl-tr') {
1960
+ for (y = 9; y >= 0; y--) {
1961
+ for (x = 0; x < 10; x++) {
1962
+ cell = table.rows[y].childNodes[x].firstChild;
1963
+
1964
+ editor.dom.toggleClass(
1965
+ cell,
1966
+ 'mce-active',
1967
+ x >= tx && y <= ty
1968
+ );
1969
+
1970
+ if (x >= tx && y <= ty) {
1971
+ focusCell = cell;
1972
+ }
1973
+ }
1974
+ }
1975
+
1976
+ tx = 9 - tx;
1977
+ table.nextSibling.innerHTML = tx + ' x ' + (ty + 1);
1978
+ } else {
1979
+ for (y = 0; y < 10; y++) {
1980
+ for (x = 0; x < 10; x++) {
1981
+ cell = table.rows[y].childNodes[x].firstChild;
1982
+
1983
+ editor.dom.toggleClass(
1984
+ cell,
1985
+ 'mce-active',
1986
+ x <= tx && y <= ty
1987
+ );
1988
+
1989
+ if (x <= tx && y <= ty) {
1990
+ focusCell = cell;
1991
+ }
1992
+ }
1993
+ }
1994
+
1995
+ table.nextSibling.innerHTML = (tx + 1) + ' x ' + (ty + 1);
1996
+ }
1997
+
1998
+ return focusCell.parentNode;
1999
+ }
2000
+
2001
+ if (editor.settings.table_grid === false) {
2002
+ editor.addMenuItem('inserttable', {
2003
+ text: 'Insert table',
2004
+ icon: 'table',
2005
+ context: 'table',
2006
+ onclick: tableDialog
2007
+ });
2008
+ } else {
2009
+ editor.addMenuItem('inserttable', {
2010
+ text: 'Insert table',
2011
+ icon: 'table',
2012
+ context: 'table',
2013
+ ariaHideMenu: true,
2014
+ onclick: function(e) {
2015
+ if (e.aria) {
2016
+ this.parent().hideAll();
2017
+ e.stopImmediatePropagation();
2018
+ tableDialog();
2019
+ }
2020
+ },
2021
+ onhide: function() {
2022
+ var elements = this.menu.items()[0].getEl().getElementsByTagName('a');
2023
+ editor.dom.removeClass(elements, 'mce-active');
2024
+ editor.dom.addClass(elements[0], 'mce-active');
2025
+ },
2026
+ menu: [
2027
+ {
2028
+ type: 'container',
2029
+ html: generateTableGrid(),
2030
+
2031
+ onPostRender: function() {
2032
+ this.lastX = this.lastY = 0;
2033
+ },
2034
+
2035
+ onmousemove: function(e) {
2036
+ var target = e.target, x, y;
2037
+
2038
+ if (target.tagName.toUpperCase() == 'A') {
2039
+ x = parseInt(target.getAttribute('data-mce-x'), 10);
2040
+ y = parseInt(target.getAttribute('data-mce-y'), 10);
2041
+
2042
+ if (x !== this.lastX || y !== this.lastY) {
2043
+ selectGrid(x, y, e.control);
2044
+
2045
+ this.lastX = x;
2046
+ this.lastY = y;
2047
+ }
2048
+ }
2049
+ },
2050
+
2051
+ onkeydown: function(e) {
2052
+ var x = this.lastX, y = this.lastY, isHandled;
2053
+
2054
+ switch (e.keyCode) {
2055
+ case 37: // DOM_VK_LEFT
2056
+ if (x > 0) {
2057
+ x--;
2058
+ isHandled = true;
2059
+ }
2060
+ break;
2061
+
2062
+ case 39: // DOM_VK_RIGHT
2063
+ isHandled = true;
2064
+
2065
+ if (x < 9) {
2066
+ x++;
2067
+ }
2068
+ break;
2069
+
2070
+ case 38: // DOM_VK_UP
2071
+ isHandled = true;
2072
+
2073
+ if (y > 0) {
2074
+ y--;
2075
+ }
2076
+ break;
2077
+
2078
+ case 40: // DOM_VK_DOWN
2079
+ isHandled = true;
2080
+
2081
+ if (y < 9) {
2082
+ y++;
2083
+ }
2084
+ break;
2085
+ }
2086
+
2087
+ if (isHandled) {
2088
+ e.preventDefault();
2089
+ e.stopPropagation();
2090
+
2091
+ selectGrid(x, y, e.control).focus();
2092
+
2093
+ this.lastX = x;
2094
+ this.lastY = y;
2095
+ }
2096
+ },
2097
+
2098
+ onclick: function(e) {
2099
+ if (e.target.tagName.toUpperCase() == 'A') {
2100
+ e.preventDefault();
2101
+ e.stopPropagation();
2102
+ this.parent().cancel();
2103
+
2104
+ insertTable(this.lastX + 1, this.lastY + 1);
2105
+ }
2106
+ }
2107
+ }
2108
+ ]
2109
+ });
2110
+ }
2111
+
2112
+ editor.addMenuItem('tableprops', {
2113
+ text: 'Table properties',
2114
+ context: 'table',
2115
+ onPostRender: postRender,
2116
+ onclick: tableDialog
2117
+ });
2118
+
2119
+ editor.addMenuItem('deletetable', {
2120
+ text: 'Delete table',
2121
+ context: 'table',
2122
+ onPostRender: postRender,
2123
+ cmd: 'mceTableDelete'
2124
+ });
2125
+
2126
+ editor.addMenuItem('cell', {
2127
+ separator: 'before',
2128
+ text: 'Cell',
2129
+ context: 'table',
2130
+ menu: [
2131
+ {text: 'Cell properties', onclick: cmd('mceTableCellProps'), onPostRender: postRenderCell},
2132
+ {text: 'Merge cells', onclick: cmd('mceTableMergeCells'), onPostRender: postRenderCell},
2133
+ {text: 'Split cell', onclick: cmd('mceTableSplitCells'), onPostRender: postRenderCell}
2134
+ ]
2135
+ });
2136
+
2137
+ editor.addMenuItem('row', {
2138
+ text: 'Row',
2139
+ context: 'table',
2140
+ menu: [
2141
+ {text: 'Insert row before', onclick: cmd('mceTableInsertRowBefore'), onPostRender: postRenderCell},
2142
+ {text: 'Insert row after', onclick: cmd('mceTableInsertRowAfter'), onPostRender: postRenderCell},
2143
+ {text: 'Delete row', onclick: cmd('mceTableDeleteRow'), onPostRender: postRenderCell},
2144
+ {text: 'Row properties', onclick: cmd('mceTableRowProps'), onPostRender: postRenderCell},
2145
+ {text: '-'},
2146
+ {text: 'Cut row', onclick: cmd('mceTableCutRow'), onPostRender: postRenderCell},
2147
+ {text: 'Copy row', onclick: cmd('mceTableCopyRow'), onPostRender: postRenderCell},
2148
+ {text: 'Paste row before', onclick: cmd('mceTablePasteRowBefore'), onPostRender: postRenderCell},
2149
+ {text: 'Paste row after', onclick: cmd('mceTablePasteRowAfter'), onPostRender: postRenderCell}
2150
+ ]
2151
+ });
2152
+
2153
+ editor.addMenuItem('column', {
2154
+ text: 'Column',
2155
+ context: 'table',
2156
+ menu: [
2157
+ {text: 'Insert column before', onclick: cmd('mceTableInsertColBefore'), onPostRender: postRenderCell},
2158
+ {text: 'Insert column after', onclick: cmd('mceTableInsertColAfter'), onPostRender: postRenderCell},
2159
+ {text: 'Delete column', onclick: cmd('mceTableDeleteCol'), onPostRender: postRenderCell}
2160
+ ]
2161
+ });
2162
+
2163
+ var menuItems = [];
2164
+ each("inserttable tableprops deletetable | cell row column".split(' '), function(name) {
2165
+ if (name == '|') {
2166
+ menuItems.push({text: '-'});
2167
+ } else {
2168
+ menuItems.push(editor.menuItems[name]);
2169
+ }
2170
+ });
2171
+
2172
+ editor.addButton("table", {
2173
+ type: "menubutton",
2174
+ title: "Table",
2175
+ menu: menuItems
2176
+ });
2177
+
2178
+ // Select whole table is a table border is clicked
2179
+ if (!Env.isIE) {
2180
+ editor.on('click', function(e) {
2181
+ e = e.target;
2182
+
2183
+ if (e.nodeName === 'TABLE') {
2184
+ editor.selection.select(e);
2185
+ editor.nodeChanged();
2186
+ }
2187
+ });
2188
+ }
2189
+
2190
+ self.quirks = new Quirks(editor);
2191
+
2192
+ editor.on('Init', function() {
2193
+ winMan = editor.windowManager;
2194
+ self.cellSelection = new CellSelection(editor);
2195
+ });
2196
+
2197
+ // Register action commands
2198
+ each({
2199
+ mceTableSplitCells: function(grid) {
2200
+ grid.split();
2201
+ },
2202
+
2203
+ mceTableMergeCells: function(grid) {
2204
+ var rowSpan, colSpan, cell;
2205
+
2206
+ cell = editor.dom.getParent(editor.selection.getStart(), 'th,td');
2207
+ if (cell) {
2208
+ rowSpan = cell.rowSpan;
2209
+ colSpan = cell.colSpan;
2210
+ }
2211
+
2212
+ if (!editor.dom.select('td.mce-item-selected,th.mce-item-selected').length) {
2213
+ mergeDialog(grid, cell);
2214
+ } else {
2215
+ grid.merge();
2216
+ }
2217
+ },
2218
+
2219
+ mceTableInsertRowBefore: function(grid) {
2220
+ grid.insertRow(true);
2221
+ },
2222
+
2223
+ mceTableInsertRowAfter: function(grid) {
2224
+ grid.insertRow();
2225
+ },
2226
+
2227
+ mceTableInsertColBefore: function(grid) {
2228
+ grid.insertCol(true);
2229
+ },
2230
+
2231
+ mceTableInsertColAfter: function(grid) {
2232
+ grid.insertCol();
2233
+ },
2234
+
2235
+ mceTableDeleteCol: function(grid) {
2236
+ grid.deleteCols();
2237
+ },
2238
+
2239
+ mceTableDeleteRow: function(grid) {
2240
+ grid.deleteRows();
2241
+ },
2242
+
2243
+ mceTableCutRow: function(grid) {
2244
+ clipboardRows = grid.cutRows();
2245
+ },
2246
+
2247
+ mceTableCopyRow: function(grid) {
2248
+ clipboardRows = grid.copyRows();
2249
+ },
2250
+
2251
+ mceTablePasteRowBefore: function(grid) {
2252
+ grid.pasteRows(clipboardRows, true);
2253
+ },
2254
+
2255
+ mceTablePasteRowAfter: function(grid) {
2256
+ grid.pasteRows(clipboardRows);
2257
+ },
2258
+
2259
+ mceTableDelete: function(grid) {
2260
+ grid.deleteTable();
2261
+ }
2262
+ }, function(func, name) {
2263
+ editor.addCommand(name, function() {
2264
+ var grid = new TableGrid(editor);
2265
+
2266
+ if (grid) {
2267
+ func(grid);
2268
+ editor.execCommand('mceRepaint');
2269
+ self.cellSelection.clear();
2270
+ }
2271
+ });
2272
+ });
2273
+
2274
+ // Register dialog commands
2275
+ each({
2276
+ mceInsertTable: function() {
2277
+ tableDialog();
2278
+ },
2279
+
2280
+ mceTableRowProps: rowDialog,
2281
+ mceTableCellProps: cellDialog
2282
+ }, function(func, name) {
2283
+ editor.addCommand(name, function(ui, val) {
2284
+ func(val);
2285
+ });
2286
+ });
2287
+ }
2288
+
2289
+ PluginManager.add('table', Plugin);
2290
+ });
2291
+
2292
+ expose(["tinymce/tableplugin/TableGrid","tinymce/tableplugin/Quirks","tinymce/tableplugin/CellSelection","tinymce/tableplugin/Plugin"]);
2293
+ })(this);
mce/table/plugin.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(e,t){"use strict";function n(e,t){for(var n,o=[],i=0;i<e.length;++i){if(n=l[e[i]]||r(e[i]),!n)throw"module definition dependecy not found: "+e[i];o.push(n)}t.apply(null,o)}function o(e,o,i){if("string"!=typeof e)throw"invalid module definition, module id must be defined and be a string";if(o===t)throw"invalid module definition, dependencies must be specified";if(i===t)throw"invalid module definition, definition function must be specified";n(o,function(){l[e]=i.apply(null,arguments)})}function i(e){return!!l[e]}function r(t){for(var n=e,o=t.split(/[.\/]/),i=0;i<o.length;++i){if(!n[o[i]])return;n=n[o[i]]}return n}function a(n){for(var o=0;o<n.length;o++){for(var i=e,r=n[o],a=r.split(/[.\/]/),s=0;s<a.length-1;++s)i[a[s]]===t&&(i[a[s]]={}),i=i[a[s]];i[a[a.length-1]]=l[r]}}var l={},s="tinymce/tableplugin/TableGrid",c="tinymce/util/Tools",d="tinymce/Env",u="tinymce/tableplugin/Quirks",f="tinymce/util/VK",m="tinymce/tableplugin/CellSelection",p="tinymce/dom/TreeWalker",g="tinymce/tableplugin/Plugin",h="tinymce/PluginManager";o(s,[c,d],function(e,n){function o(e,t){return parseInt(e.getAttribute(t)||1,10)}var i=e.each;return function(r,a){function l(){var e=0;A=[],i(["thead","tbody","tfoot"],function(t){var n=I.select("> "+t+" tr",a);i(n,function(n,r){r+=e,i(I.select("> td, > th",n),function(e,n){var i,a,l,s;if(A[r])for(;A[r][n];)n++;for(l=o(e,"rowspan"),s=o(e,"colspan"),a=r;r+l>a;a++)for(A[a]||(A[a]=[]),i=n;n+s>i;i++)A[a][i]={part:t,real:a==r&&i==n,elm:e,rowspan:l,colspan:s}})}),e+=n.length})}function s(e,t){return e=e.cloneNode(t),e.removeAttribute("id"),e}function c(e,t){var n;return n=A[t],n?n[e]:void 0}function d(e,t,n){e&&(n=parseInt(n,10),1===n?e.removeAttribute(t,1):e.setAttribute(t,n,1))}function u(e){return e&&(I.hasClass(e.elm,"mce-item-selected")||e==M)}function f(){var e=[];return i(a.rows,function(t){i(t.cells,function(n){return I.hasClass(n,"mce-item-selected")||M&&n==M.elm?(e.push(t),!1):void 0})}),e}function m(){var e=I.createRng();e.setStartAfter(a),e.setEndAfter(a),E.setRng(e),I.remove(a)}function p(t){var o,a={};return r.settings.table_clone_elements!==!1&&(a=e.makeMap((r.settings.table_clone_elements||"strong em b i span font h1 h2 h3 h4 h5 h6 p div").toUpperCase(),/[ ,]/)),e.walk(t,function(e){var r;return 3==e.nodeType?(i(I.getParents(e.parentNode,null,t).reverse(),function(e){a[e.nodeName]&&(e=s(e,!1),o?r&&r.appendChild(e):o=r=e,r=e)}),r&&(r.innerHTML=n.ie?"&nbsp;":'<br data-mce-bogus="1" />'),!1):void 0},"childNodes"),t=s(t,!1),d(t,"rowSpan",1),d(t,"colSpan",1),o?t.appendChild(o):n.ie||(t.innerHTML='<br data-mce-bogus="1" />'),t}function g(){var e=I.createRng(),t;return i(I.select("tr",a),function(e){0===e.cells.length&&I.remove(e)}),0===I.select("tr",a).length?(e.setStartBefore(a),e.setEndBefore(a),E.setRng(e),void I.remove(a)):(i(I.select("thead,tbody,tfoot",a),function(e){0===e.rows.length&&I.remove(e)}),l(),void(B&&(t=A[Math.min(A.length-1,B.y)],t&&(E.select(t[Math.min(t.length-1,B.x)].elm,!0),E.collapse(!0)))))}function h(e,t,n,o){var i,r,a,l,s;for(i=A[t][e].elm.parentNode,a=1;n>=a;a++)if(i=I.getNext(i,"tr")){for(r=e;r>=0;r--)if(s=A[t+a][r].elm,s.parentNode==i){for(l=1;o>=l;l++)I.insertAfter(p(s),s);break}if(-1==r)for(l=1;o>=l;l++)i.insertBefore(p(i.cells[0]),i.cells[0])}}function b(){i(A,function(e,t){i(e,function(e,n){var i,r,a;if(u(e)&&(e=e.elm,i=o(e,"colspan"),r=o(e,"rowspan"),i>1||r>1)){for(d(e,"rowSpan",1),d(e,"colSpan",1),a=0;i-1>a;a++)I.insertAfter(p(e),e);h(n,t,r-1,i)}})})}function v(t,n,o){var r,a,s,f,m,p,h,v,y,w,x;if(t?(r=k(t),a=r.x,s=r.y,f=a+(n-1),m=s+(o-1)):(B=D=null,i(A,function(e,t){i(e,function(e,n){u(e)&&(B||(B={x:n,y:t}),D={x:n,y:t})})}),B&&(a=B.x,s=B.y,f=D.x,m=D.y)),v=c(a,s),y=c(f,m),v&&y&&v.part==y.part){for(b(),l(),v=c(a,s).elm,d(v,"colSpan",f-a+1),d(v,"rowSpan",m-s+1),h=s;m>=h;h++)for(p=a;f>=p;p++)A[h]&&A[h][p]&&(t=A[h][p].elm,t!=v&&(w=e.grep(t.childNodes),i(w,function(e){v.appendChild(e)}),w.length&&(w=e.grep(v.childNodes),x=0,i(w,function(e){"BR"==e.nodeName&&I.getAttrib(e,"data-mce-bogus")&&x++<w.length-1&&v.removeChild(e)})),I.remove(t)));g()}}function y(e){var n,r,a,l,c,f,m,g,h;if(i(A,function(t,o){return i(t,function(t){return u(t)&&(t=t.elm,c=t.parentNode,f=s(c,!1),n=o,e)?!1:void 0}),e?!n:void 0}),n!==t){for(l=0;l<A[0].length;l++)if(A[n][l]&&(r=A[n][l].elm,r!=a)){if(e){if(n>0&&A[n-1][l]&&(g=A[n-1][l].elm,h=o(g,"rowSpan"),h>1)){d(g,"rowSpan",h+1);continue}}else if(h=o(r,"rowspan"),h>1){d(r,"rowSpan",h+1);continue}m=p(r),d(m,"colSpan",r.colSpan),f.appendChild(m),a=r}f.hasChildNodes()&&(e?c.parentNode.insertBefore(f,c):I.insertAfter(f,c))}}function w(e){var t,n;i(A,function(n){return i(n,function(n,o){return u(n)&&(t=o,e)?!1:void 0}),e?!t:void 0}),i(A,function(i,r){var a,l,s;i[t]&&(a=i[t].elm,a!=n&&(s=o(a,"colspan"),l=o(a,"rowspan"),1==s?e?(a.parentNode.insertBefore(p(a),a),h(t,r,l-1,s)):(I.insertAfter(p(a),a),h(t,r,l-1,s)):d(a,"colSpan",a.colSpan+1),n=a))})}function x(){var t=[];i(A,function(n){i(n,function(n,r){u(n)&&-1===e.inArray(t,r)&&(i(A,function(e){var t=e[r].elm,n;n=o(t,"colSpan"),n>1?d(t,"colSpan",n-1):I.remove(t)}),t.push(r))})}),g()}function C(){function e(e){var t,n,r;t=I.getNext(e,"tr"),i(e.cells,function(e){var t=o(e,"rowSpan");t>1&&(d(e,"rowSpan",t-1),n=k(e),h(n.x,n.y,1,1))}),n=k(e.cells[0]),i(A[n.y],function(e){var t;e=e.elm,e!=r&&(t=o(e,"rowSpan"),1>=t?I.remove(e):d(e,"rowSpan",t-1),r=e)})}var t;t=f(),i(t.reverse(),function(t){e(t)}),g()}function P(){var e=f();return I.remove(e),g(),e}function S(){var e=f();return i(e,function(t,n){e[n]=s(t,!0)}),e}function R(e,t){var n=f(),o=n[t?0:n.length-1],r=o.cells.length;e&&(i(A,function(e){var t;return r=0,i(e,function(e){e.real&&(r+=e.colspan),e.elm.parentNode==o&&(t=1)}),t?!1:void 0}),t||e.reverse(),i(e,function(e){var n,i=e.cells.length,a;for(n=0;i>n;n++)a=e.cells[n],d(a,"colSpan",1),d(a,"rowSpan",1);for(n=i;r>n;n++)e.appendChild(p(e.cells[i-1]));for(n=r;i>n;n++)I.remove(e.cells[n]);t?o.parentNode.insertBefore(e,o):I.insertAfter(e,o)}),I.removeClass(I.select("td.mce-item-selected,th.mce-item-selected"),"mce-item-selected"))}function k(e){var t;return i(A,function(n,o){return i(n,function(n,i){return n.elm==e?(t={x:i,y:o},!1):void 0}),!t}),t}function T(e){B=k(e)}function N(){var e,t;return e=t=0,i(A,function(n,o){i(n,function(n,i){var r,a;u(n)&&(n=A[o][i],i>e&&(e=i),o>t&&(t=o),n.real&&(r=n.colspan-1,a=n.rowspan-1,r&&i+r>e&&(e=i+r),a&&o+a>t&&(t=o+a)))})}),{x:e,y:t}}function _(e){var t,n,o,i,r,a,l,s,c,d;if(D=k(e),B&&D){for(t=Math.min(B.x,D.x),n=Math.min(B.y,D.y),o=Math.max(B.x,D.x),i=Math.max(B.y,D.y),r=o,a=i,d=n;a>=d;d++)e=A[d][t],e.real||t-(e.colspan-1)<t&&(t-=e.colspan-1);for(c=t;r>=c;c++)e=A[n][c],e.real||n-(e.rowspan-1)<n&&(n-=e.rowspan-1);for(d=n;i>=d;d++)for(c=t;o>=c;c++)e=A[d][c],e.real&&(l=e.colspan-1,s=e.rowspan-1,l&&c+l>r&&(r=c+l),s&&d+s>a&&(a=d+s));for(I.removeClass(I.select("td.mce-item-selected,th.mce-item-selected"),"mce-item-selected"),d=n;a>=d;d++)for(c=t;r>=c;c++)A[d][c]&&I.addClass(A[d][c].elm,"mce-item-selected")}}var A,B,D,M,E=r.selection,I=E.dom;a=a||I.getParent(E.getStart(),"table"),l(),M=I.getParent(E.getStart(),"th,td"),M&&(B=k(M),D=N(),M=c(B.x,B.y)),e.extend(this,{deleteTable:m,split:b,merge:v,insertRow:y,insertCol:w,deleteCols:x,deleteRows:C,cutRows:P,copyRows:S,pasteRows:R,getPos:k,setStartCell:T,setEndCell:_})}}),o(u,[f,d,c],function(e,t,n){function o(e,t){return parseInt(e.getAttribute(t)||1,10)}var i=n.each;return function(n){function r(){function t(t){function r(e,o){var i=e?"previousSibling":"nextSibling",r=n.dom.getParent(o,"tr"),l=r[i];if(l)return h(n,o,l,e),t.preventDefault(),!0;var d=n.dom.getParent(r,"table"),u=r.parentNode,f=u.nodeName.toLowerCase();if("tbody"===f||f===(e?"tfoot":"thead")){var m=a(e,d,u,"tbody");if(null!==m)return s(e,m,o)}return c(e,r,i,d)}function a(e,t,o,i){var r=n.dom.select(">"+i,t),a=r.indexOf(o);if(e&&0===a||!e&&a===r.length-1)return l(e,t);if(-1===a){var s="thead"===o.tagName.toLowerCase()?0:r.length-1;return r[s]}return r[a+(e?-1:1)]}function l(e,t){var o=e?"thead":"tfoot",i=n.dom.select(">"+o,t);return 0!==i.length?i[0]:null}function s(e,o,i){var r=d(o,e);return r&&h(n,i,r,e),t.preventDefault(),!0}function c(e,o,i,a){var l=a[i];if(l)return u(l),!0;var s=n.dom.getParent(a,"td,th");if(s)return r(e,s,t);var c=d(o,!e);return u(c),t.preventDefault(),!1}function d(e,t){var o=e&&e[t?"lastChild":"firstChild"];return o&&"BR"===o.nodeName?n.dom.getParent(o,"td,th"):o}function u(e){n.selection.setCursorLocation(e,0)}function f(){return y==e.UP||y==e.DOWN}function m(e){var t=e.selection.getNode(),n=e.dom.getParent(t,"tr");return null!==n}function p(e){for(var t=0,n=e;n.previousSibling;)n=n.previousSibling,t+=o(n,"colspan");return t}function g(e,t){var n=0,r=0;return i(e.children,function(e,i){return n+=o(e,"colspan"),r=i,n>t?!1:void 0}),r}function h(e,t,o,i){var r=p(n.dom.getParent(t,"td,th")),a=g(o,r),l=o.childNodes[a],s=d(l,i);u(s||l)}function b(e){var t=n.selection.getNode(),o=n.dom.getParent(t,"td,th"),i=n.dom.getParent(e,"td,th");return o&&o!==i&&v(o,i)}function v(e,t){return n.dom.getParent(e,"TABLE")===n.dom.getParent(t,"TABLE")}var y=t.keyCode;if(f()&&m(n)){var w=n.selection.getNode();setTimeout(function(){b(w)&&r(!t.shiftKey&&y===e.UP,w,t)},0)}}n.on("KeyDown",function(e){t(e)})}function a(){function e(e,t){var n=t.ownerDocument,o=n.createRange(),i;return o.setStartBefore(t),o.setEnd(e.endContainer,e.endOffset),i=n.createElement("body"),i.appendChild(o.cloneContents()),0===i.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length}n.on("KeyDown",function(t){var o,i,r=n.dom;(37==t.keyCode||38==t.keyCode)&&(o=n.selection.getRng(),i=r.getParent(o.startContainer,"table"),i&&n.getBody().firstChild==i&&e(o,i)&&(o=r.createRng(),o.setStartBefore(i),o.setEndBefore(i),n.selection.setRng(o),t.preventDefault()))})}function l(){n.on("KeyDown SetContent VisualAid",function(){var e;for(e=n.getBody().lastChild;e;e=e.previousSibling)if(3==e.nodeType){if(e.nodeValue.length>0)break}else if(1==e.nodeType&&!e.getAttribute("data-mce-bogus"))break;e&&"TABLE"==e.nodeName&&(n.settings.forced_root_block?n.dom.add(n.getBody(),n.settings.forced_root_block,n.settings.forced_root_block_attrs,t.ie&&t.ie<11?"&nbsp;":'<br data-mce-bogus="1" />'):n.dom.add(n.getBody(),"br",{"data-mce-bogus":"1"}))}),n.on("PreProcess",function(e){var t=e.node.lastChild;t&&("BR"==t.nodeName||1==t.childNodes.length&&("BR"==t.firstChild.nodeName||"\xa0"==t.firstChild.nodeValue))&&t.previousSibling&&"TABLE"==t.previousSibling.nodeName&&n.dom.remove(t)})}function s(){function e(e,t,n,o){var i=3,r=e.dom.getParent(t.startContainer,"TABLE"),a,l,s;return r&&(a=r.parentNode),l=t.startContainer.nodeType==i&&0===t.startOffset&&0===t.endOffset&&o&&("TR"==n.nodeName||n==a),s=("TD"==n.nodeName||"TH"==n.nodeName)&&!o,l||s}function t(){var t=n.selection.getRng(),o=n.selection.getNode(),i=n.dom.getParent(t.startContainer,"TD,TH");if(e(n,t,o,i)){i||(i=o);for(var r=i.lastChild;r.lastChild;)r=r.lastChild;t.setEnd(r,r.nodeValue.length),n.selection.setRng(t)}}n.on("KeyDown",function(){t()}),n.on("MouseDown",function(e){2!=e.button&&t()})}function c(){n.on("keydown",function(t){if((t.keyCode==e.DELETE||t.keyCode==e.BACKSPACE)&&!t.isDefaultPrevented()){var o=n.dom.getParent(n.selection.getStart(),"table");if(o){for(var i=n.dom.select("td,th",o),r=i.length;r--;)if(!n.dom.hasClass(i[r],"mce-item-selected"))return;t.preventDefault(),n.execCommand("mceTableDelete")}}})}c(),t.webkit&&(r(),s()),t.gecko&&(a(),l()),t.ie>10&&(a(),l())}}),o(m,[s,p,c],function(e,t,n){return function(o){function i(){o.getBody().style.webkitUserSelect="",d&&(o.dom.removeClass(o.dom.select("td.mce-item-selected,th.mce-item-selected"),"mce-item-selected"),d=!1)}function r(t){var n,i,r=t.target;if(s&&(l||r!=s)&&("TD"==r.nodeName||"TH"==r.nodeName)){i=a.getParent(r,"table"),i==c&&(l||(l=new e(o,i),l.setStartCell(s),o.getBody().style.webkitUserSelect="none"),l.setEndCell(r),d=!0),n=o.selection.getSel();try{n.removeAllRanges?n.removeAllRanges():n.empty()}catch(u){}t.preventDefault()}}var a=o.dom,l,s,c,d=!0;return o.on("MouseDown",function(e){2!=e.button&&(i(),s=a.getParent(e.target,"td,th"),c=a.getParent(s,"table"))}),o.on("mouseover",r),o.on("remove",function(){a.unbind(o.getDoc(),"mouseover",r)}),o.on("MouseUp",function(){function e(e,o){var r=new t(e,e);do{if(3==e.nodeType&&0!==n.trim(e.nodeValue).length)return void(o?i.setStart(e,0):i.setEnd(e,e.nodeValue.length));if("BR"==e.nodeName)return void(o?i.setStartBefore(e):i.setEndBefore(e))}while(e=o?r.next():r.prev())}var i,r=o.selection,d,u,f,m,p;if(s){if(l&&(o.getBody().style.webkitUserSelect=""),d=a.select("td.mce-item-selected,th.mce-item-selected"),d.length>0){i=a.createRng(),f=d[0],p=d[d.length-1],i.setStartBefore(f),i.setEndAfter(f),e(f,1),u=new t(f,a.getParent(d[0],"table"));do if("TD"==f.nodeName||"TH"==f.nodeName){if(!a.hasClass(f,"mce-item-selected"))break;m=f}while(f=u.next());e(m),r.setRng(i)}o.nodeChanged(),s=l=c=null}}),o.on("KeyUp",function(){i()}),{clear:i}}}),o(g,[s,u,m,c,p,d,h],function(e,t,n,o,i,r,a){function l(o){function i(e){return e?e.replace(/px$/,""):""}function a(e){return/^[0-9]+$/.test(e)&&(e+="px"),e}function l(e){s("left center right".split(" "),function(t){o.formatter.remove("align"+t,{},e)})}function c(){var e=o.dom,t,n,c,d;t=e.getParent(o.selection.getStart(),"table"),d={width:i(e.getStyle(t,"width")||e.getAttrib(t,"width")),height:i(e.getStyle(t,"height")||e.getAttrib(t,"height")),cellspacing:t?e.getAttrib(t,"cellspacing"):"",cellpadding:t?e.getAttrib(t,"cellpadding"):"",border:t?e.getAttrib(t,"border"):"",caption:!!e.select("caption",t)[0]},s("left center right".split(" "),function(e){o.formatter.matchNode(t,"align"+e)&&(d.align=e)}),t||(n={label:"Cols",name:"cols"},c={label:"Rows",name:"rows"}),o.windowManager.open({title:"Table properties",items:{type:"form",layout:"grid",columns:2,data:d,defaults:{type:"textbox",maxWidth:50},items:[n,c,{label:"Width",name:"width"},{label:"Height",name:"height"},{label:"Cell spacing",name:"cellspacing"},{label:"Cell padding",name:"cellpadding"},{label:"Border",name:"border"},{label:"Caption",name:"caption",type:"checkbox"},{label:"Alignment",minWidth:90,name:"align",type:"listbox",text:"None",maxWidth:null,values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]}]},onsubmit:function(){var n=this.toJSON(),i;o.undoManager.transact(function(){t||(t=p(n.cols||1,n.rows||1)),o.dom.setAttribs(t,{cellspacing:n.cellspacing,cellpadding:n.cellpadding,border:n.border}),o.dom.setStyles(t,{width:a(n.width),height:a(n.height)}),i=e.select("caption",t)[0],i&&!n.caption&&e.remove(i),!i&&n.caption&&(i=e.create("caption"),i.innerHTML=r.ie?"\xa0":'<br data-mce-bogus="1"/>',t.insertBefore(i,t.firstChild)),l(t),n.align&&o.formatter.apply("align"+n.align,{},t),o.focus(),o.addVisual()})}})}function d(e,t){o.windowManager.open({title:"Merge cells",body:[{label:"Cols",name:"cols",type:"textbox",size:10},{label:"Rows",name:"rows",type:"textbox",size:10}],onsubmit:function(){var n=this.toJSON();o.undoManager.transact(function(){e.merge(t,n.cols,n.rows)})}})}function u(){var e=o.dom,t,n,r=[];r=o.dom.select("td.mce-item-selected,th.mce-item-selected"),t=o.dom.getParent(o.selection.getStart(),"td,th"),!r.length&&t&&r.push(t),t=t||r[0],t&&(n={width:i(e.getStyle(t,"width")||e.getAttrib(t,"width")),height:i(e.getStyle(t,"height")||e.getAttrib(t,"height")),scope:e.getAttrib(t,"scope")},n.type=t.nodeName.toLowerCase(),s("left center right".split(" "),function(e){o.formatter.matchNode(t,"align"+e)&&(n.align=e)}),o.windowManager.open({title:"Cell properties",items:{type:"form",data:n,layout:"grid",columns:2,defaults:{type:"textbox",maxWidth:50},items:[{label:"Width",name:"width"},{label:"Height",name:"height"},{label:"Cell type",name:"type",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"Cell",value:"td"},{text:"Header cell",value:"th"}]},{label:"Scope",name:"scope",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Row",value:"row"},{text:"Column",value:"col"},{text:"Row group",value:"rowgroup"},{text:"Column group",value:"colgroup"}]},{label:"Alignment",name:"align",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]}]},onsubmit:function(){var t=this.toJSON();o.undoManager.transact(function(){s(r,function(n){o.dom.setAttrib(n,"scope",t.scope),o.dom.setStyles(n,{width:a(t.width),height:a(t.height)}),t.type&&n.nodeName.toLowerCase()!=t.type&&(n=e.rename(n,t.type)),l(n),t.align&&o.formatter.apply("align"+t.align,{},n)}),o.focus()})}}))}function f(){var e=o.dom,t,n,r,c,d=[];t=o.dom.getParent(o.selection.getStart(),"table"),n=o.dom.getParent(o.selection.getStart(),"td,th"),s(t.rows,function(t){s(t.cells,function(o){return e.hasClass(o,"mce-item-selected")||o==n?(d.push(t),!1):void 0})}),r=d[0],r&&(c={height:i(e.getStyle(r,"height")||e.getAttrib(r,"height")),scope:e.getAttrib(r,"scope")},c.type=r.parentNode.nodeName.toLowerCase(),s("left center right".split(" "),function(e){o.formatter.matchNode(r,"align"+e)&&(c.align=e)}),o.windowManager.open({title:"Row properties",items:{type:"form",data:c,columns:2,defaults:{type:"textbox"},items:[{type:"listbox",name:"type",label:"Row type",text:"None",maxWidth:null,values:[{text:"Header",value:"thead"},{text:"Body",value:"tbody"},{text:"Footer",value:"tfoot"}]},{type:"listbox",name:"align",label:"Alignment",text:"None",maxWidth:null,values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"Height",name:"height"}]},onsubmit:function(){var t=this.toJSON(),n,i,r;o.undoManager.transact(function(){var c=t.type;s(d,function(s){o.dom.setAttrib(s,"scope",t.scope),o.dom.setStyles(s,{height:a(t.height)}),c!=s.parentNode.nodeName.toLowerCase()&&(n=e.getParent(s,"table"),i=s.parentNode,r=e.select(c,n)[0],r||(r=e.create(c),n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r)),r.appendChild(s),i.hasChildNodes()||e.remove(i)),l(s),t.align&&o.formatter.apply("align"+t.align,{},s)}),o.focus()})}}))}function m(e){return function(){o.execCommand(e)}}function p(e,t){var n,i,a;for(a='<table id="__mce"><tbody>',n=0;t>n;n++){for(a+="<tr>",i=0;e>i;i++)a+="<td>"+(r.ie?" ":"<br>")+"</td>";a+="</tr>"}a+="</tbody></table>",o.insertContent(a);var l=o.dom.get("__mce");return o.dom.setAttrib(l,"id",null),l}function g(e,t){function n(){e.disabled(!o.dom.getParent(o.selection.getStart(),t)),o.selection.selectorChanged(t,function(t){e.disabled(!t)})}o.initialized?n():o.on("init",n)}function h(){g(this,"table")}function b(){g(this,"td,th")}function v(){var e="";e='<table role="grid" class="mce-grid mce-grid-border" aria-readonly="true">';for(var t=0;10>t;t++){e+="<tr>";for(var n=0;10>n;n++)e+='<td role="gridcell" tabindex="-1"><a id="mcegrid'+(10*t+n)+'" href="#" data-mce-x="'+n+'" data-mce-y="'+t+'" '+(n+t===0?' class="mce-active"':"")+"></a></td>";e+="</tr>"}return e+="</table>",e+='<div class="mce-text-center" role="presentation">1 x 1</div>'}function y(e,t,n){var i=n.getEl().getElementsByTagName("table")[0],r=n.parent().rel,a,l,s,c;if(n.isRtl()||"tl-tr"==r){for(l=9;l>=0;l--)for(a=0;10>a;a++)c=i.rows[l].childNodes[a].firstChild,o.dom.toggleClass(c,"mce-active",a>=e&&t>=l),a>=e&&t>=l&&(s=c);e=9-e,i.nextSibling.innerHTML=e+" x "+(t+1)}else{for(l=0;10>l;l++)for(a=0;10>a;a++)c=i.rows[l].childNodes[a].firstChild,o.dom.toggleClass(c,"mce-active",e>=a&&t>=l),e>=a&&t>=l&&(s=c);i.nextSibling.innerHTML=e+1+" x "+(t+1)}return s.parentNode}var w,x,C=this;o.settings.table_grid===!1?o.addMenuItem("inserttable",{text:"Insert table",icon:"table",context:"table",onclick:c}):o.addMenuItem("inserttable",{text:"Insert table",icon:"table",context:"table",ariaHideMenu:!0,onclick:function(e){e.aria&&(this.parent().hideAll(),e.stopImmediatePropagation(),c())},onhide:function(){var e=this.menu.items()[0].getEl().getElementsByTagName("a");o.dom.removeClass(e,"mce-active"),o.dom.addClass(e[0],"mce-active")},menu:[{type:"container",html:v(),onPostRender:function(){this.lastX=this.lastY=0},onmousemove:function(e){var t=e.target,n,o;"A"==t.tagName.toUpperCase()&&(n=parseInt(t.getAttribute("data-mce-x"),10),o=parseInt(t.getAttribute("data-mce-y"),10),(n!==this.lastX||o!==this.lastY)&&(y(n,o,e.control),this.lastX=n,this.lastY=o))},onkeydown:function(e){var t=this.lastX,n=this.lastY,o;switch(e.keyCode){case 37:t>0&&(t--,o=!0);break;case 39:o=!0,9>t&&t++;break;case 38:o=!0,n>0&&n--;break;case 40:o=!0,9>n&&n++}o&&(e.preventDefault(),e.stopPropagation(),y(t,n,e.control).focus(),this.lastX=t,this.lastY=n)},onclick:function(e){"A"==e.target.tagName.toUpperCase()&&(e.preventDefault(),e.stopPropagation(),this.parent().cancel(),p(this.lastX+1,this.lastY+1))}}]}),o.addMenuItem("tableprops",{text:"Table properties",context:"table",onPostRender:h,onclick:c}),o.addMenuItem("deletetable",{text:"Delete table",context:"table",onPostRender:h,cmd:"mceTableDelete"}),o.addMenuItem("cell",{separator:"before",text:"Cell",context:"table",menu:[{text:"Cell properties",onclick:m("mceTableCellProps"),onPostRender:b},{text:"Merge cells",onclick:m("mceTableMergeCells"),onPostRender:b},{text:"Split cell",onclick:m("mceTableSplitCells"),onPostRender:b}]}),o.addMenuItem("row",{text:"Row",context:"table",menu:[{text:"Insert row before",onclick:m("mceTableInsertRowBefore"),onPostRender:b},{text:"Insert row after",onclick:m("mceTableInsertRowAfter"),onPostRender:b},{text:"Delete row",onclick:m("mceTableDeleteRow"),onPostRender:b},{text:"Row properties",onclick:m("mceTableRowProps"),onPostRender:b},{text:"-"},{text:"Cut row",onclick:m("mceTableCutRow"),onPostRender:b},{text:"Copy row",onclick:m("mceTableCopyRow"),onPostRender:b},{text:"Paste row before",onclick:m("mceTablePasteRowBefore"),onPostRender:b},{text:"Paste row after",onclick:m("mceTablePasteRowAfter"),onPostRender:b}]}),o.addMenuItem("column",{text:"Column",context:"table",menu:[{text:"Insert column before",onclick:m("mceTableInsertColBefore"),onPostRender:b},{text:"Insert column after",onclick:m("mceTableInsertColAfter"),onPostRender:b},{text:"Delete column",onclick:m("mceTableDeleteCol"),onPostRender:b}]});var P=[];s("inserttable tableprops deletetable | cell row column".split(" "),function(e){P.push("|"==e?{text:"-"}:o.menuItems[e])}),o.addButton("table",{type:"menubutton",title:"Table",menu:P}),r.isIE||o.on("click",function(e){e=e.target,"TABLE"===e.nodeName&&(o.selection.select(e),o.nodeChanged())}),C.quirks=new t(o),o.on("Init",function(){w=o.windowManager,C.cellSelection=new n(o)}),s({mceTableSplitCells:function(e){e.split()},mceTableMergeCells:function(e){var t,n,i;i=o.dom.getParent(o.selection.getStart(),"th,td"),i&&(t=i.rowSpan,n=i.colSpan),o.dom.select("td.mce-item-selected,th.mce-item-selected").length?e.merge():d(e,i)},mceTableInsertRowBefore:function(e){e.insertRow(!0)},mceTableInsertRowAfter:function(e){e.insertRow()},mceTableInsertColBefore:function(e){e.insertCol(!0)},mceTableInsertColAfter:function(e){e.insertCol()},mceTableDeleteCol:function(e){e.deleteCols()},mceTableDeleteRow:function(e){e.deleteRows()},mceTableCutRow:function(e){x=e.cutRows()},mceTableCopyRow:function(e){x=e.copyRows()},mceTablePasteRowBefore:function(e){e.pasteRows(x,!0)},mceTablePasteRowAfter:function(e){e.pasteRows(x)},mceTableDelete:function(e){e.deleteTable()}},function(t,n){o.addCommand(n,function(){var n=new e(o);n&&(t(n),o.execCommand("mceRepaint"),C.cellSelection.clear())})}),s({mceInsertTable:function(){c()},mceTableRowProps:f,mceTableCellProps:u},function(e,t){o.addCommand(t,function(t,n){e(n)})})}var s=o.each;a.add("table",l)}),a([s,u,m,g])}(this);
mce/table/row.htm DELETED
@@ -1,158 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <title>{#table_dlg.row_title}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=359"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=359"></script>
7
- <script type="text/javascript" src="../../utils/form_utils.js?ver=359"></script>
8
- <script type="text/javascript" src="../../utils/validate.js?ver=359"></script>
9
- <script type="text/javascript" src="../../utils/editable_selects.js?ver=359"></script>
10
- <script type="text/javascript" src="js/row.js?ver=359"></script>
11
- <link href="css/row.css?ver=359" rel="stylesheet" type="text/css" />
12
- </head>
13
- <body id="tablerow" style="display: none" role="application">
14
- <form onsubmit="updateAction();return false;" action="#">
15
- <div class="tabs">
16
- <ul>
17
- <li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li>
18
- <li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li>
19
- </ul>
20
- </div>
21
-
22
- <div class="panel_wrapper">
23
- <div id="general_panel" class="panel current">
24
- <fieldset>
25
- <legend>{#table_dlg.general_props}</legend>
26
-
27
- <table role="presentation" border="0" cellpadding="4" cellspacing="0">
28
- <tr>
29
- <td><label for="rowtype">{#table_dlg.rowtype}</label></td>
30
- <td class="col2">
31
- <select id="rowtype" name="rowtype" class="mceFocus" onChange="changedRowType();">
32
- <option value="thead">{#table_dlg.thead}</option>
33
- <option value="tbody">{#table_dlg.tbody}</option>
34
- <option value="tfoot">{#table_dlg.tfoot}</option>
35
- </select>
36
- </td>
37
- </tr>
38
-
39
- <tr>
40
- <td><label for="align">{#table_dlg.align}</label></td>
41
- <td class="col2">
42
- <select id="align" name="align">
43
- <option value="">{#not_set}</option>
44
- <option value="center">{#table_dlg.align_middle}</option>
45
- <option value="left">{#table_dlg.align_left}</option>
46
- <option value="right">{#table_dlg.align_right}</option>
47
- </select>
48
- </td>
49
- </tr>
50
-
51
- <tr>
52
- <td><label for="valign">{#table_dlg.valign}</label></td>
53
- <td class="col2">
54
- <select id="valign" name="valign">
55
- <option value="">{#not_set}</option>
56
- <option value="top">{#table_dlg.align_top}</option>
57
- <option value="middle">{#table_dlg.align_middle}</option>
58
- <option value="bottom">{#table_dlg.align_bottom}</option>
59
- </select>
60
- </td>
61
- </tr>
62
-
63
- <tr id="styleSelectRow">
64
- <td><label for="class">{#class_name}</label></td>
65
- <td class="col2">
66
- <select id="class" name="class" class="mceEditableSelect">
67
- <option value="" selected="selected">{#not_set}</option>
68
- </select>
69
- </td>
70
- </tr>
71
-
72
- <tr>
73
- <td><label for="height">{#table_dlg.height}</label></td>
74
- <td class="col2"><input name="height" type="text" id="height" value="" size="7" maxlength="7" onchange="changedSize();" class="size" /></td>
75
- </tr>
76
- </table>
77
- </fieldset>
78
- </div>
79
-
80
- <div id="advanced_panel" class="panel">
81
- <fieldset>
82
- <legend>{#table_dlg.advanced_props}</legend>
83
-
84
- <table role="presentation" border="0" cellpadding="0" cellspacing="4">
85
- <tr>
86
- <td class="column1"><label for="id">{#table_dlg.id}</label></td>
87
- <td><input id="id" name="id" type="text" value="" style="width: 200px" /></td>
88
- </tr>
89
-
90
- <tr>
91
- <td><label for="style">{#table_dlg.style}</label></td>
92
- <td><input type="text" id="style" name="style" value="" style="width: 200px;" onchange="changedStyle();" /></td>
93
- </tr>
94
-
95
- <tr>
96
- <td class="column1"><label for="dir">{#table_dlg.langdir}</label></td>
97
- <td>
98
- <select id="dir" name="dir" style="width: 200px">
99
- <option value="">{#not_set}</option>
100
- <option value="ltr">{#table_dlg.ltr}</option>
101
- <option value="rtl">{#table_dlg.rtl}</option>
102
- </select>
103
- </td>
104
- </tr>
105
-
106
- <tr>
107
- <td class="column1"><label for="lang">{#table_dlg.langcode}</label></td>
108
- <td>
109
- <input id="lang" name="lang" type="text" value="" style="width: 200px" />
110
- </td>
111
- </tr>
112
-
113
- <tr>
114
- <td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>
115
- <td>
116
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
117
- <tr>
118
- <td><input id="backgroundimage" name="backgroundimage" type="text" value="" style="width: 200px" onchange="changedBackgroundImage();" /></td>
119
- <td id="backgroundimagebrowsercontainer">&nbsp;</td>
120
- </tr>
121
- </table>
122
- </td>
123
- </tr>
124
-
125
- <tr>
126
- <td class="column1"><label for="bgcolor" id="bgcolor_label">{#table_dlg.bgcolor}</label></td>
127
- <td>
128
- <span role="group" aria-labelledby="bgcolor_label">
129
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
130
- <tr>
131
- <td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td>
132
- <td id="bgcolor_pickcontainer">&nbsp;</td>
133
- </tr>
134
- </table>
135
- </span>
136
- </td>
137
- </tr>
138
- </table>
139
- </fieldset>
140
- </div>
141
- </div>
142
-
143
- <div class="mceActionPanel">
144
- <div>
145
- <select id="action" name="action">
146
- <option value="row">{#table_dlg.row_row}</option>
147
- <option value="odd">{#table_dlg.row_odd}</option>
148
- <option value="even">{#table_dlg.row_even}</option>
149
- <option value="all">{#table_dlg.row_all}</option>
150
- </select>
151
- </div>
152
-
153
- <input type="submit" id="insert" name="insert" value="{#update}" />
154
- <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
155
- </div>
156
- </form>
157
- </body>
158
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/table/table.htm DELETED
@@ -1,188 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <title>{#table_dlg.title}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=359"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=359"></script>
7
- <script type="text/javascript" src="../../utils/form_utils.js?ver=359"></script>
8
- <script type="text/javascript" src="../../utils/validate.js?ver=359"></script>
9
- <script type="text/javascript" src="../../utils/editable_selects.js?ver=359"></script>
10
- <script type="text/javascript" src="js/table.js?ver=359"></script>
11
- <link href="css/table.css?ver=359" rel="stylesheet" type="text/css" />
12
- </head>
13
- <body id="table" style="display: none" role="application" aria-labelledby="app_title">
14
- <span style="display:none;" id="app_title">{#table_dlg.title}</span>
15
- <form onsubmit="insertTable();return false;" action="#">
16
- <div class="tabs">
17
- <ul>
18
- <li id="general_tab" aria-controls="general_panel" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li>
19
- <li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li>
20
- </ul>
21
- </div>
22
-
23
- <div class="panel_wrapper">
24
- <div id="general_panel" class="panel current">
25
- <fieldset>
26
- <legend>{#table_dlg.general_props}</legend>
27
- <table role="presentation" border="0" cellpadding="4" cellspacing="0" width="100%">
28
- <tr>
29
- <td><label id="colslabel" for="cols">{#table_dlg.cols}</label></td>
30
- <td><input id="cols" name="cols" type="text" value="" size="3" maxlength="3" class="required number min1 mceFocus" aria-required="true" /></td>
31
- <td><label id="rowslabel" for="rows">{#table_dlg.rows}</label></td>
32
- <td><input id="rows" name="rows" type="text" value="" size="3" maxlength="3" class="required number min1" aria-required="true" /></td>
33
- </tr>
34
- <tr>
35
- <td><label id="cellpaddinglabel" for="cellpadding">{#table_dlg.cellpadding}</label></td>
36
- <td><input id="cellpadding" name="cellpadding" type="text" value="" size="3" maxlength="3" class="number" /></td>
37
- <td><label id="cellspacinglabel" for="cellspacing">{#table_dlg.cellspacing}</label></td>
38
- <td><input id="cellspacing" name="cellspacing" type="text" value="" size="3" maxlength="3" class="number" /></td>
39
- </tr>
40
- <tr>
41
- <td><label id="alignlabel" for="align">{#table_dlg.align}</label></td>
42
- <td><select id="align" name="align">
43
- <option value="">{#not_set}</option>
44
- <option value="center">{#table_dlg.align_middle}</option>
45
- <option value="left">{#table_dlg.align_left}</option>
46
- <option value="right">{#table_dlg.align_right}</option>
47
- </select></td>
48
- <td><label id="borderlabel" for="border">{#table_dlg.border}</label></td>
49
- <td><input id="border" name="border" type="text" value="" size="3" maxlength="5" onchange="changedBorder();" class="size" /></td>
50
- </tr>
51
- <tr id="width_row">
52
- <td><label id="widthlabel" for="width">{#table_dlg.width}</label></td>
53
- <td><input name="width" type="text" id="width" value="" size="7" maxlength="7" onchange="changedSize();" class="size" /></td>
54
- <td><label id="heightlabel" for="height">{#table_dlg.height}</label></td>
55
- <td><input name="height" type="text" id="height" value="" size="7" maxlength="7" onchange="changedSize();" class="size" /></td>
56
- </tr>
57
- <tr id="styleSelectRow" >
58
- <td><label id="classlabel" for="class">{#class_name}</label></td>
59
- <td colspan="3" >
60
- <select id="class" name="class" class="mceEditableSelect">
61
- <option value="" selected="selected">{#not_set}</option>
62
- </select></td>
63
- </tr>
64
- <tr>
65
- <td class="column1" ><label for="caption">{#table_dlg.caption}</label></td>
66
- <td><input id="caption" name="caption" type="checkbox" class="checkbox" value="true" /></td>
67
- </tr>
68
- </table>
69
- </fieldset>
70
- </div>
71
-
72
- <div id="advanced_panel" class="panel">
73
- <fieldset>
74
- <legend>{#table_dlg.advanced_props}</legend>
75
-
76
- <table role="presentation" border="0" cellpadding="0" cellspacing="4">
77
- <tr>
78
- <td class="column1"><label for="id">{#table_dlg.id}</label></td>
79
- <td><input id="id" name="id" type="text" value="" class="advfield" /></td>
80
- </tr>
81
-
82
- <tr>
83
- <td class="column1"><label for="summary">{#table_dlg.summary}</label></td>
84
- <td><input id="summary" name="summary" type="text" value="" class="advfield" /></td>
85
- </tr>
86
-
87
- <tr>
88
- <td><label for="style">{#table_dlg.style}</label></td>
89
- <td><input type="text" id="style" name="style" value="" class="advfield" onchange="changedStyle();" /></td>
90
- </tr>
91
-
92
- <tr>
93
- <td class="column1"><label id="langlabel" for="lang">{#table_dlg.langcode}</label></td>
94
- <td>
95
- <input id="lang" name="lang" type="text" value="" class="advfield" />
96
- </td>
97
- </tr>
98
-
99
- <tr>
100
- <td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>
101
- <td>
102
- <table role="presentation" aria-labelledby="backgroundimage_label" border="0" cellpadding="0" cellspacing="0">
103
- <tr>
104
- <td><input id="backgroundimage" name="backgroundimage" type="text" value="" class="advfield" onchange="changedBackgroundImage();" /></td>
105
- <td id="backgroundimagebrowsercontainer">&nbsp;</td>
106
- </tr>
107
- </table>
108
- </td>
109
- </tr>
110
-
111
- <tr>
112
- <td class="column1"><label for="tframe">{#table_dlg.frame}</label></td>
113
- <td>
114
- <select id="tframe" name="tframe" class="advfield">
115
- <option value="">{#not_set}</option>
116
- <option value="void">{#table_dlg.rules_void}</option>
117
- <option value="above">{#table_dlg.rules_above}</option>
118
- <option value="below">{#table_dlg.rules_below}</option>
119
- <option value="hsides">{#table_dlg.rules_hsides}</option>
120
- <option value="lhs">{#table_dlg.rules_lhs}</option>
121
- <option value="rhs">{#table_dlg.rules_rhs}</option>
122
- <option value="vsides">{#table_dlg.rules_vsides}</option>
123
- <option value="box">{#table_dlg.rules_box}</option>
124
- <option value="border">{#table_dlg.rules_border}</option>
125
- </select>
126
- </td>
127
- </tr>
128
-
129
- <tr>
130
- <td class="column1"><label for="rules">{#table_dlg.rules}</label></td>
131
- <td>
132
- <select id="rules" name="rules" class="advfield">
133
- <option value="">{#not_set}</option>
134
- <option value="none">{#table_dlg.frame_none}</option>
135
- <option value="groups">{#table_dlg.frame_groups}</option>
136
- <option value="rows">{#table_dlg.frame_rows}</option>
137
- <option value="cols">{#table_dlg.frame_cols}</option>
138
- <option value="all">{#table_dlg.frame_all}</option>
139
- </select>
140
- </td>
141
- </tr>
142
-
143
- <tr>
144
- <td class="column1"><label for="dir">{#table_dlg.langdir}</label></td>
145
- <td>
146
- <select id="dir" name="dir" class="advfield">
147
- <option value="">{#not_set}</option>
148
- <option value="ltr">{#table_dlg.ltr}</option>
149
- <option value="rtl">{#table_dlg.rtl}</option>
150
- </select>
151
- </td>
152
- </tr>
153
-
154
- <tr role="group" aria-labelledby="bordercolor_label">
155
- <td class="column1"><label id="bordercolor_label" for="bordercolor">{#table_dlg.bordercolor}</label></td>
156
- <td>
157
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
158
- <tr>
159
- <td><input id="bordercolor" name="bordercolor" type="text" value="" size="9" onchange="updateColor('bordercolor_pick','bordercolor');changedColor();" /></td>
160
- <td id="bordercolor_pickcontainer">&nbsp;</td>
161
- </tr>
162
- </table>
163
- </td>
164
- </tr>
165
-
166
- <tr role="group" aria-labelledby="bgcolor_label">
167
- <td class="column1"><label id="bgcolor_label" for="bgcolor">{#table_dlg.bgcolor}</label></td>
168
- <td>
169
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
170
- <tr>
171
- <td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td>
172
- <td id="bgcolor_pickcontainer">&nbsp;</td>
173
- </tr>
174
- </table>
175
- </td>
176
- </tr>
177
- </table>
178
- </fieldset>
179
- </div>
180
- </div>
181
-
182
- <div class="mceActionPanel">
183
- <input type="submit" id="insert" name="insert" value="{#insert}" />
184
- <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
185
- </div>
186
- </form>
187
- </body>
188
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/visualblocks/css/visualblocks.css ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .mce-visualblocks p {
2
+ padding-top: 10px;
3
+ border: 1px dashed #BBB;
4
+ margin-left: 3px;
5
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7);
6
+ }
7
+
8
+ .mce-visualblocks h1 {
9
+ padding-top: 10px;
10
+ border: 1px dashed #BBB;
11
+ margin-left: 3px;
12
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==);
13
+ }
14
+
15
+ .mce-visualblocks h2 {
16
+ padding-top: 10px;
17
+ border: 1px dashed #BBB;
18
+ margin-left: 3px;
19
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==);
20
+ }
21
+
22
+ .mce-visualblocks h3 {
23
+ padding-top: 10px;
24
+ border: 1px dashed #BBB;
25
+ margin-left: 3px;
26
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7);
27
+ }
28
+
29
+ .mce-visualblocks h4 {
30
+ padding-top: 10px;
31
+ border: 1px dashed #BBB;
32
+ margin-left: 3px;
33
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==);
34
+ }
35
+
36
+ .mce-visualblocks h5 {
37
+ padding-top: 10px;
38
+ border: 1px dashed #BBB;
39
+ margin-left: 3px;
40
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==);
41
+ }
42
+
43
+ .mce-visualblocks h6 {
44
+ padding-top: 10px;
45
+ border: 1px dashed #BBB;
46
+ margin-left: 3px;
47
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==);
48
+ }
49
+
50
+ .mce-visualblocks div {
51
+ padding-top: 10px;
52
+ border: 1px dashed #BBB;
53
+ margin-left: 3px;
54
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7);
55
+ }
56
+
57
+ .mce-visualblocks section {
58
+ padding-top: 10px;
59
+ border: 1px dashed #BBB;
60
+ margin: 0 0 1em 3px;
61
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=);
62
+ }
63
+
64
+ .mce-visualblocks article {
65
+ padding-top: 10px;
66
+ border: 1px dashed #BBB;
67
+ margin: 0 0 1em 3px;
68
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7);
69
+ }
70
+
71
+ .mce-visualblocks blockquote {
72
+ padding-top: 10px;
73
+ border: 1px dashed #BBB;
74
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7);
75
+ }
76
+
77
+ .mce-visualblocks address {
78
+ padding-top: 10px;
79
+ border: 1px dashed #BBB;
80
+ margin: 0 0 1em 3px;
81
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=);
82
+ }
83
+
84
+ .mce-visualblocks pre {
85
+ padding-top: 10px;
86
+ border: 1px dashed #BBB;
87
+ margin-left: 3px;
88
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==);
89
+ }
90
+
91
+ .mce-visualblocks figure {
92
+ padding-top: 10px;
93
+ border: 1px dashed #BBB;
94
+ margin: 0 0 1em 3px;
95
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7);
96
+ }
97
+
98
+ .mce-visualblocks hgroup {
99
+ padding-top: 10px;
100
+ border: 1px dashed #BBB;
101
+ margin: 0 0 1em 3px;
102
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7);
103
+ }
104
+
105
+ .mce-visualblocks aside {
106
+ padding-top: 10px;
107
+ border: 1px dashed #BBB;
108
+ margin: 0 0 1em 3px;
109
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=);
110
+ }
111
+
112
+ .mce-visualblocks figcaption {
113
+ border: 1px dashed #BBB;
114
+ }
115
+
116
+ .mce-visualblocks ul {
117
+ padding-top: 10px;
118
+ border: 1px dashed #BBB;
119
+ margin: 0 0 1em 3px;
120
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==)
121
+ }
122
+
123
+ .mce-visualblocks ol {
124
+ padding-top: 10px;
125
+ border: 1px dashed #BBB;
126
+ margin: 0 0 1em 3px;
127
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==);
128
+ }
mce/visualblocks/img/address.gif ADDED
Binary file
mce/visualblocks/img/article.gif ADDED
Binary file
mce/visualblocks/img/aside.gif ADDED
Binary file
mce/visualblocks/img/blockquote.gif ADDED
Binary file
mce/visualblocks/img/div.gif ADDED
Binary file
mce/visualblocks/img/figure.gif ADDED
Binary file
mce/visualblocks/img/h1.gif ADDED
Binary file
mce/visualblocks/img/h2.gif ADDED
Binary file
mce/visualblocks/img/h3.gif ADDED
Binary file
mce/visualblocks/img/h4.gif ADDED
Binary file
mce/visualblocks/img/h5.gif ADDED
Binary file
mce/visualblocks/img/h6.gif ADDED
Binary file
mce/visualblocks/img/hgroup.gif ADDED
Binary file
mce/visualblocks/img/ol.gif ADDED
Binary file
mce/visualblocks/img/p.gif ADDED
Binary file
mce/visualblocks/img/pre.gif ADDED
Binary file
mce/visualblocks/img/section.gif ADDED
Binary file
mce/visualblocks/img/ul.gif ADDED
Binary file
mce/visualblocks/plugin.js ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * plugin.js
3
+ *
4
+ * Copyright 2012, Moxiecode Systems AB
5
+ * Released under LGPL License.
6
+ *
7
+ * License: http://www.tinymce.com/license
8
+ * Contributing: http://www.tinymce.com/contributing
9
+ */
10
+
11
+ /*global tinymce:true */
12
+
13
+ tinymce.PluginManager.add('visualblocks', function(editor, url) {
14
+ var cssId, visualBlocksMenuItem, enabled;
15
+
16
+ // We don't support older browsers like IE6/7 and they don't provide prototypes for DOM objects
17
+ if (!window.NodeList) {
18
+ return;
19
+ }
20
+
21
+ function toggleActiveState() {
22
+ var self = this;
23
+
24
+ self.active(enabled);
25
+
26
+ editor.on('VisualBlocks', function() {
27
+ self.active(editor.dom.hasClass(editor.getBody(), 'mce-visualblocks'));
28
+ });
29
+ }
30
+
31
+ editor.addCommand('mceVisualBlocks', function() {
32
+ var dom = editor.dom, linkElm;
33
+
34
+ if (!cssId) {
35
+ cssId = dom.uniqueId();
36
+ linkElm = dom.create('link', {
37
+ id: cssId,
38
+ rel: 'stylesheet',
39
+ href: url + '/css/visualblocks.css'
40
+ });
41
+
42
+ editor.getDoc().getElementsByTagName('head')[0].appendChild(linkElm);
43
+ }
44
+
45
+ // Toggle on/off visual blocks while computing previews
46
+ editor.on("PreviewFormats AfterPreviewFormats", function(e) {
47
+ if (enabled) {
48
+ dom.toggleClass(editor.getBody(), 'mce-visualblocks', e.type == "afterpreviewformats");
49
+ }
50
+ });
51
+
52
+ dom.toggleClass(editor.getBody(), 'mce-visualblocks');
53
+ enabled = editor.dom.hasClass(editor.getBody(), 'mce-visualblocks');
54
+
55
+ if (visualBlocksMenuItem) {
56
+ visualBlocksMenuItem.active(dom.hasClass(editor.getBody(), 'mce-visualblocks'));
57
+ }
58
+
59
+ editor.fire('VisualBlocks');
60
+ });
61
+
62
+ editor.addButton('visualblocks', {
63
+ title: 'Show blocks',
64
+ cmd: 'mceVisualBlocks',
65
+ onPostRender: toggleActiveState
66
+ });
67
+
68
+ editor.addMenuItem('visualblocks', {
69
+ text: 'Show blocks',
70
+ cmd: 'mceVisualBlocks',
71
+ onPostRender: toggleActiveState,
72
+ selectable: true,
73
+ context: 'view',
74
+ prependToContext: true
75
+ });
76
+
77
+ editor.on('init', function() {
78
+ if (editor.settings.visualblocks_default_state) {
79
+ editor.execCommand('mceVisualBlocks', false, null, {skip_focus: true});
80
+ }
81
+ });
82
+
83
+ editor.on('remove', function() {
84
+ editor.dom.removeClass(editor.getBody(), 'mce-visualblocks');
85
+ });
86
+ });
mce/visualblocks/plugin.min.js ADDED
@@ -0,0 +1 @@
 
1
+ tinymce.PluginManager.add("visualblocks",function(e,s){function o(){var s=this;s.active(a),e.on("VisualBlocks",function(){s.active(e.dom.hasClass(e.getBody(),"mce-visualblocks"))})}var l,t,a;window.NodeList&&(e.addCommand("mceVisualBlocks",function(){var o,c=e.dom;l||(l=c.uniqueId(),o=c.create("link",{id:l,rel:"stylesheet",href:s+"/css/visualblocks.css"}),e.getDoc().getElementsByTagName("head")[0].appendChild(o)),e.on("PreviewFormats AfterPreviewFormats",function(s){a&&c.toggleClass(e.getBody(),"mce-visualblocks","afterpreviewformats"==s.type)}),c.toggleClass(e.getBody(),"mce-visualblocks"),a=e.dom.hasClass(e.getBody(),"mce-visualblocks"),t&&t.active(c.hasClass(e.getBody(),"mce-visualblocks")),e.fire("VisualBlocks")}),e.addButton("visualblocks",{title:"Show blocks",cmd:"mceVisualBlocks",onPostRender:o}),e.addMenuItem("visualblocks",{text:"Show blocks",cmd:"mceVisualBlocks",onPostRender:o,selectable:!0,context:"view",prependToContext:!0}),e.on("init",function(){e.settings.visualblocks_default_state&&e.execCommand("mceVisualBlocks",!1,null,{skip_focus:!0})}),e.on("remove",function(){e.dom.removeClass(e.getBody(),"mce-visualblocks")}))});
mce/visualchars/editor_plugin.js DELETED
@@ -1 +0,0 @@
1
- (function(){tinymce.create("tinymce.plugins.VisualChars",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceVisualChars",c._toggleVisualChars,c);a.addButton("visualchars",{title:"visualchars.desc",cmd:"mceVisualChars"});a.onBeforeGetContent.add(function(d,e){if(c.state&&e.format!="raw"&&!e.draft){c.state=true;c._toggleVisualChars(false)}})},getInfo:function(){return{longname:"Visual characters",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/visualchars",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_toggleVisualChars:function(m){var p=this,k=p.editor,a,g,j,n=k.getDoc(),o=k.getBody(),l,q=k.selection,e,c,f;p.state=!p.state;k.controlManager.setActive("visualchars",p.state);if(m){f=q.getBookmark()}if(p.state){a=[];tinymce.walk(o,function(b){if(b.nodeType==3&&b.nodeValue&&b.nodeValue.indexOf("\u00a0")!=-1){a.push(b)}},"childNodes");for(g=0;g<a.length;g++){l=a[g].nodeValue;l=l.replace(/(\u00a0)/g,'<span data-mce-bogus="1" class="mceItemHidden mceItemNbsp">$1</span>');c=k.dom.create("div",null,l);while(node=c.lastChild){k.dom.insertAfter(node,a[g])}k.dom.remove(a[g])}}else{a=k.dom.select("span.mceItemNbsp",o);for(g=a.length-1;g>=0;g--){k.dom.remove(a[g],1)}}q.moveToBookmark(f)}});tinymce.PluginManager.add("visualchars",tinymce.plugins.VisualChars)})();
 
mce/visualchars/plugin.js ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * plugin.js
3
+ *
4
+ * Copyright, Moxiecode Systems AB
5
+ * Released under LGPL License.
6
+ *
7
+ * License: http://www.tinymce.com/license
8
+ * Contributing: http://www.tinymce.com/contributing
9
+ */
10
+
11
+ /*global tinymce:true */
12
+
13
+ tinymce.PluginManager.add('visualchars', function(editor) {
14
+ var self = this, state;
15
+
16
+ function toggleVisualChars(addBookmark) {
17
+ var node, nodeList, i, body = editor.getBody(), nodeValue, selection = editor.selection, div, bookmark;
18
+
19
+ state = !state;
20
+ self.state = state;
21
+ editor.fire('VisualChars', {state: state});
22
+
23
+ if (addBookmark) {
24
+ bookmark = selection.getBookmark();
25
+ }
26
+
27
+ if (state) {
28
+ nodeList = [];
29
+ tinymce.walk(body, function(n) {
30
+ if (n.nodeType == 3 && n.nodeValue && n.nodeValue.indexOf('\u00a0') != -1) {
31
+ nodeList.push(n);
32
+ }
33
+ }, 'childNodes');
34
+
35
+ for (i = 0; i < nodeList.length; i++) {
36
+ nodeValue = nodeList[i].nodeValue;
37
+ nodeValue = nodeValue.replace(/(\u00a0)/g, '<span data-mce-bogus="1" class="mce-nbsp">$1</span>');
38
+
39
+ div = editor.dom.create('div', null, nodeValue);
40
+ while ((node = div.lastChild)) {
41
+ editor.dom.insertAfter(node, nodeList[i]);
42
+ }
43
+
44
+ editor.dom.remove(nodeList[i]);
45
+ }
46
+ } else {
47
+ nodeList = editor.dom.select('span.mce-nbsp', body);
48
+
49
+ for (i = nodeList.length - 1; i >= 0; i--) {
50
+ editor.dom.remove(nodeList[i], 1);
51
+ }
52
+ }
53
+
54
+ selection.moveToBookmark(bookmark);
55
+ }
56
+
57
+ function toggleActiveState() {
58
+ var self = this;
59
+
60
+ editor.on('VisualChars', function(e) {
61
+ self.active(e.state);
62
+ });
63
+ }
64
+
65
+ editor.addCommand('mceVisualChars', toggleVisualChars);
66
+
67
+ editor.addButton('visualchars', {
68
+ title: 'Show invisible characters',
69
+ cmd: 'mceVisualChars',
70
+ onPostRender: toggleActiveState
71
+ });
72
+
73
+ editor.addMenuItem('visualchars', {
74
+ text: 'Show invisible characters',
75
+ cmd: 'mceVisualChars',
76
+ onPostRender: toggleActiveState,
77
+ selectable: true,
78
+ context: 'view',
79
+ prependToContext: true
80
+ });
81
+
82
+ editor.on('beforegetcontent', function(e) {
83
+ if (state && e.format != 'raw' && !e.draft) {
84
+ state = true;
85
+ toggleVisualChars(false);
86
+ }
87
+ });
88
+ });
mce/visualchars/plugin.min.js ADDED
@@ -0,0 +1 @@
 
1
+ tinymce.PluginManager.add("visualchars",function(e){function a(a){var t,s,i,r,c,d,l=e.getBody(),m=e.selection;if(n=!n,o.state=n,e.fire("VisualChars",{state:n}),a&&(d=m.getBookmark()),n)for(s=[],tinymce.walk(l,function(e){3==e.nodeType&&e.nodeValue&&-1!=e.nodeValue.indexOf(" ")&&s.push(e)},"childNodes"),i=0;i<s.length;i++){for(r=s[i].nodeValue,r=r.replace(/(\u00a0)/g,'<span data-mce-bogus="1" class="mce-nbsp">$1</span>'),c=e.dom.create("div",null,r);t=c.lastChild;)e.dom.insertAfter(t,s[i]);e.dom.remove(s[i])}else for(s=e.dom.select("span.mce-nbsp",l),i=s.length-1;i>=0;i--)e.dom.remove(s[i],1);m.moveToBookmark(d)}function t(){var a=this;e.on("VisualChars",function(e){a.active(e.state)})}var n,o=this;e.addCommand("mceVisualChars",a),e.addButton("visualchars",{title:"Show invisible characters",cmd:"mceVisualChars",onPostRender:t}),e.addMenuItem("visualchars",{text:"Show invisible characters",cmd:"mceVisualChars",onPostRender:t,selectable:!0,context:"view",prependToContext:!0}),e.on("beforegetcontent",function(e){n&&"raw"!=e.format&&!e.draft&&(n=!0,a(!1))})});
mce/xhtmlxtras/abbr.htm DELETED
@@ -1,142 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <title>{#xhtmlxtras_dlg.title_abbr_element}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=359"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=359"></script>
7
- <script type="text/javascript" src="../../utils/form_utils.js?ver=359"></script>
8
- <script type="text/javascript" src="../../utils/editable_selects.js?ver=359"></script>
9
- <script type="text/javascript" src="js/element_common.js?ver=359"></script>
10
- <script type="text/javascript" src="js/abbr.js?ver=359"></script>
11
- <link rel="stylesheet" type="text/css" href="css/popup.css?ver=359" />
12
- </head>
13
- <body style="display: none" role="application" aria-labelledby="app_title">
14
- <span style="display:none;" id="app_title">{#xhtmlxtras_dlg.title_abbr_element}</span>
15
- <form onsubmit="insertAbbr();return false;" action="#">
16
- <div class="tabs">
17
- <ul>
18
- <li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.general_tab}</a></span></li>
19
- <!-- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.events_tab}</a></span></li> -->
20
- </ul>
21
- </div>
22
-
23
- <div class="panel_wrapper">
24
- <div id="general_panel" class="panel current">
25
- <fieldset>
26
- <legend>{#xhtmlxtras_dlg.fieldset_attrib_tab}</legend>
27
- <table role="presentation" border="0" cellpadding="0" cellspacing="4">
28
- <tr>
29
- <td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td>
30
- <td><input id="title" name="title" type="text" value="" class="field mceFocus" /></td>
31
- </tr>
32
- <tr>
33
- <td class="label"><label id="idlabel" for="id">{#xhtmlxtras_dlg.attribute_label_id}</label>:</td>
34
- <td><input id="id" name="id" type="text" value="" class="field" /></td>
35
- </tr>
36
- <tr>
37
- <td class="label"><label id="classlabel" for="class">{#xhtmlxtras_dlg.attribute_label_class}</label>:</td>
38
- <td>
39
- <select id="class" name="class" class="field mceEditableSelect">
40
- <option value="">{#not_set}</option>
41
- </select>
42
- </td>
43
- </tr>
44
- <tr>
45
- <td class="label"><label id="stylelabel" for="style">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td>
46
- <td><input id="style" name="style" type="text" value="" class="field" /></td>
47
- </tr>
48
- <tr>
49
- <td class="label"><label id="dirlabel" for="dir">{#xhtmlxtras_dlg.attribute_label_langdir}</label>:</td>
50
- <td>
51
- <select id="dir" name="dir" class="field">
52
- <option value="">{#not_set}</option>
53
- <option value="ltr">{#xhtmlxtras_dlg.attribute_option_ltr}</option>
54
- <option value="rtl">{#xhtmlxtras_dlg.attribute_option_rtl}</option>
55
- </select>
56
- </td>
57
- </tr>
58
- <tr>
59
- <td class="label"><label id="langlabel" for="lang">{#xhtmlxtras_dlg.attribute_label_langcode}</label>:</td>
60
- <td>
61
- <input id="lang" name="lang" type="text" value="" class="field" />
62
- </td>
63
- </tr>
64
- </table>
65
- </fieldset>
66
- </div>
67
- <div id="events_panel" class="panel">
68
- <fieldset>
69
- <legend>{#xhtmlxtras_dlg.fieldset_events_tab}</legend>
70
-
71
- <table role="presentation" border="0" cellpadding="0" cellspacing="4">
72
- <tr>
73
- <td class="label"><label for="onfocus">onfocus</label>:</td>
74
- <td><input id="onfocus" name="onfocus" type="text" value="" class="field" /></td>
75
- </tr>
76
-
77
- <tr>
78
- <td class="label"><label for="onblur">onblur</label>:</td>
79
- <td><input id="onblur" name="onblur" type="text" value="" class="field" /></td>
80
- </tr>
81
-
82
- <tr>
83
- <td class="label"><label for="onclick">onclick</label>:</td>
84
- <td><input id="onclick" name="onclick" type="text" value="" class="field" /></td>
85
- </tr>
86
-
87
- <tr>
88
- <td class="label"><label for="ondblclick">ondblclick</label>:</td>
89
- <td><input id="ondblclick" name="ondblclick" type="text" value="" class="field" /></td>
90
- </tr>
91
-
92
- <tr>
93
- <td class="label"><label for="onmousedown">onmousedown</label>:</td>
94
- <td><input id="onmousedown" name="onmousedown" type="text" value="" class="field" /></td>
95
- </tr>
96
-
97
- <tr>
98
- <td class="label"><label for="onmouseup">onmouseup</label>:</td>
99
- <td><input id="onmouseup" name="onmouseup" type="text" value="" class="field" /></td>
100
- </tr>
101
-
102
- <tr>
103
- <td class="label"><label for="onmouseover">onmouseover</label>:</td>
104
- <td><input id="onmouseover" name="onmouseover" type="text" value="" class="field" /></td>
105
- </tr>
106
-
107
- <tr>
108
- <td class="label"><label for="onmousemove">onmousemove</label>:</td>
109
- <td><input id="onmousemove" name="onmousemove" type="text" value="" class="field" /></td>
110
- </tr>
111
-
112
- <tr>
113
- <td class="label"><label for="onmouseout">onmouseout</label>:</td>
114
- <td><input id="onmouseout" name="onmouseout" type="text" value="" class="field" /></td>
115
- </tr>
116
-
117
- <tr>
118
- <td class="label"><label for="onkeypress">onkeypress</label>:</td>
119
- <td><input id="onkeypress" name="onkeypress" type="text" value="" class="field" /></td>
120
- </tr>
121
-
122
- <tr>
123
- <td class="label"><label for="onkeydown">onkeydown</label>:</td>
124
- <td><input id="onkeydown" name="onkeydown" type="text" value="" class="field" /></td>
125
- </tr>
126
-
127
- <tr>
128
- <td class="label"><label for="onkeyup">onkeyup</label>:</td>
129
- <td><input id="onkeyup" name="onkeyup" type="text" value="" class="field" /></td>
130
- </tr>
131
- </table>
132
- </fieldset>
133
- </div>
134
- </div>
135
- <div class="mceActionPanel">
136
- <input type="submit" id="insert" name="insert" value="{#update}" />
137
- <input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeAbbr();" style="display: none;" />
138
- <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
139
- </div>
140
- </form>
141
- </body>
142
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/xhtmlxtras/acronym.htm DELETED
@@ -1,142 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <title>{#xhtmlxtras_dlg.title_acronym_element}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=359"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=359"></script>
7
- <script type="text/javascript" src="../../utils/form_utils.js?ver=359"></script>
8
- <script type="text/javascript" src="../../utils/editable_selects.js?ver=359"></script>
9
- <script type="text/javascript" src="js/element_common.js?ver=359"></script>
10
- <script type="text/javascript" src="js/acronym.js?ver=359"></script>
11
- <link rel="stylesheet" type="text/css" href="css/popup.css?ver=359" />
12
- </head>
13
- <body style="display: none" role="application" aria-labelledby="app_title">
14
- <span style="display:none;" id="app_title">{#xhtmlxtras_dlg.title_acronym_element}</span>
15
- <form onsubmit="insertAcronym();return false;" action="#">
16
- <div class="tabs">
17
- <ul>
18
- <li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.general_tab}</a></span></li>
19
- <!-- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.events_tab}</a></span></li> -->
20
- </ul>
21
- </div>
22
-
23
- <div class="panel_wrapper">
24
- <div id="general_panel" class="panel current">
25
- <fieldset>
26
- <legend>{#xhtmlxtras_dlg.fieldset_attrib_tab}</legend>
27
- <table role="presentation" border="0" cellpadding="0" cellspacing="4">
28
- <tr>
29
- <td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td>
30
- <td><input id="title" name="title" type="text" value="" class="field mceFocus" /></td>
31
- </tr>
32
- <tr>
33
- <td class="label"><label id="idlabel" for="id">{#xhtmlxtras_dlg.attribute_label_id}</label>:</td>
34
- <td><input id="id" name="id" type="text" value="" class="field" /></td>
35
- </tr>
36
- <tr>
37
- <td class="label"><label id="classlabel" for="class">{#xhtmlxtras_dlg.attribute_label_class}</label>:</td>
38
- <td>
39
- <select id="class" name="class" class="field mceEditableSelect">
40
- <option value="">{#not_set}</option>
41
- </select>
42
- </td>
43
- </tr>
44
- <tr>
45
- <td class="label"><label id="stylelabel" for="style">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td>
46
- <td><input id="style" name="style" type="text" value="" class="field" /></td>
47
- </tr>
48
- <tr>
49
- <td class="label"><label id="dirlabel" for="dir">{#xhtmlxtras_dlg.attribute_label_langdir}</label>:</td>
50
- <td>
51
- <select id="dir" name="dir" class="field">
52
- <option value="">{#not_set}</option>
53
- <option value="ltr">{#xhtmlxtras_dlg.attribute_option_ltr}</option>
54
- <option value="rtl">{#xhtmlxtras_dlg.attribute_option_rtl}</option>
55
- </select>
56
- </td>
57
- </tr>
58
- <tr>
59
- <td class="label"><label id="langlabel" for="lang">{#xhtmlxtras_dlg.attribute_label_langcode}</label>:</td>
60
- <td>
61
- <input id="lang" name="lang" type="text" value="" class="field" />
62
- </td>
63
- </tr>
64
- </table>
65
- </fieldset>
66
- </div>
67
- <div id="events_panel" class="panel">
68
- <fieldset>
69
- <legend>{#xhtmlxtras_dlg.fieldset_events_tab}</legend>
70
-
71
- <table role="presentation" border="0" cellpadding="0" cellspacing="4">
72
- <tr>
73
- <td class="label"><label for="onfocus">onfocus</label>:</td>
74
- <td><input id="onfocus" name="onfocus" type="text" value="" class="field" /></td>
75
- </tr>
76
-
77
- <tr>
78
- <td class="label"><label for="onblur">onblur</label>:</td>
79
- <td><input id="onblur" name="onblur" type="text" value="" class="field" /></td>
80
- </tr>
81
-
82
- <tr>
83
- <td class="label"><label for="onclick">onclick</label>:</td>
84
- <td><input id="onclick" name="onclick" type="text" value="" class="field" /></td>
85
- </tr>
86
-
87
- <tr>
88
- <td class="label"><label for="ondblclick">ondblclick</label>:</td>
89
- <td><input id="ondblclick" name="ondblclick" type="text" value="" class="field" /></td>
90
- </tr>
91
-
92
- <tr>
93
- <td class="label"><label for="onmousedown">onmousedown</label>:</td>
94
- <td><input id="onmousedown" name="onmousedown" type="text" value="" class="field" /></td>
95
- </tr>
96
-
97
- <tr>
98
- <td class="label"><label for="onmouseup">onmouseup</label>:</td>
99
- <td><input id="onmouseup" name="onmouseup" type="text" value="" class="field" /></td>
100
- </tr>
101
-
102
- <tr>
103
- <td class="label"><label for="onmouseover">onmouseover</label>:</td>
104
- <td><input id="onmouseover" name="onmouseover" type="text" value="" class="field" /></td>
105
- </tr>
106
-
107
- <tr>
108
- <td class="label"><label for="onmousemove">onmousemove</label>:</td>
109
- <td><input id="onmousemove" name="onmousemove" type="text" value="" class="field" /></td>
110
- </tr>
111
-
112
- <tr>
113
- <td class="label"><label for="onmouseout">onmouseout</label>:</td>
114
- <td><input id="onmouseout" name="onmouseout" type="text" value="" class="field" /></td>
115
- </tr>
116
-
117
- <tr>
118
- <td class="label"><label for="onkeypress">onkeypress</label>:</td>
119
- <td><input id="onkeypress" name="onkeypress" type="text" value="" class="field" /></td>
120
- </tr>
121
-
122
- <tr>
123
- <td class="label"><label for="onkeydown">onkeydown</label>:</td>
124
- <td><input id="onkeydown" name="onkeydown" type="text" value="" class="field" /></td>
125
- </tr>
126
-
127
- <tr>
128
- <td class="label"><label for="onkeyup">onkeyup</label>:</td>
129
- <td><input id="onkeyup" name="onkeyup" type="text" value="" class="field" /></td>
130
- </tr>
131
- </table>
132
- </fieldset>
133
- </div>
134
- </div>
135
- <div class="mceActionPanel">
136
- <input type="submit" id="insert" name="insert" value="{#update}" />
137
- <input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeAcronym();" style="display: none;" />
138
- <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
139
- </div>
140
- </form>
141
- </body>
142
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/xhtmlxtras/attributes.htm DELETED
@@ -1,149 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <title>{#xhtmlxtras_dlg.attribs_title}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=359"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=359"></script>
7
- <script type="text/javascript" src="../../utils/editable_selects.js?ver=359"></script>
8
- <script type="text/javascript" src="../../utils/form_utils.js?ver=359"></script>
9
- <script type="text/javascript" src="js/attributes.js?ver=359"></script>
10
- <link rel="stylesheet" type="text/css" href="css/attributes.css?ver=359" />
11
- </head>
12
- <body style="display: none" role="application" aria-labelledby="app_title">
13
- <span style="display:none;" id="app_title">{#xhtmlxtras_dlg.attribs_title}</span>
14
- <form onsubmit="insertAction();return false;" action="#">
15
- <div class="tabs">
16
- <ul>
17
- <li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.attribute_attrib_tab}</a></span></li>
18
- <li id="events_tab" aria-controls="events_panel"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.attribute_events_tab}</a></span></li>
19
- </ul>
20
- </div>
21
-
22
- <div class="panel_wrapper">
23
- <div id="general_panel" class="panel current">
24
- <fieldset>
25
- <legend>{#xhtmlxtras_dlg.attribute_attrib_tab}</legend>
26
- <table role="presentation" border="0" cellpadding="0" cellspacing="4">
27
- <tr>
28
- <td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td>
29
- <td><input id="title" name="title" type="text" value="" class="mceFocus" /></td>
30
- </tr>
31
- <tr>
32
- <td class="label"><label id="idlabel" for="id">{#xhtmlxtras_dlg.attribute_label_id}</label>:</td>
33
- <td><input id="id" name="id" type="text" value="" /></td>
34
- </tr>
35
- <tr>
36
- <td><label id="classlabel" for="classlist">{#class_name}</label></td>
37
- <td>
38
- <select id="classlist" name="classlist" class="mceEditableSelect">
39
- <option value="" selected="selected">{#not_set}</option>
40
- </select>
41
- </td>
42
- </tr>
43
- <tr>
44
- <td class="label"><label id="stylelabel" for="style">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td>
45
- <td><input id="style" name="style" type="text" value="" /></td>
46
- </tr>
47
- <tr>
48
- <td class="label"><label id="dirlabel" for="dir">{#xhtmlxtras_dlg.attribute_label_langdir}</label>:</td>
49
- <td>
50
- <select id="dir" name="dir">
51
- <option value="">{#not_set}</option>
52
- <option value="ltr">{#xhtmlxtras_dlg.option_ltr}</option>
53
- <option value="rtl">{#xhtmlxtras_dlg.option_rtl}</option>
54
- </select>
55
- </td>
56
- </tr>
57
- <tr>
58
- <td class="label"><label id="langlabel" for="lang">{#xhtmlxtras_dlg.attribute_label_langcode}</label>:</td>
59
- <td>
60
- <input id="lang" name="lang" type="text" value="" />
61
- </td>
62
- </tr>
63
- <tr>
64
- <td><label id="tabindexlabel" for="tabindex">{#xhtmlxtras_dlg.attribute_label_tabindex}</label></td>
65
- <td><input type="text" id="tabindex" name="tabindex" value="" /></td>
66
- </tr>
67
-
68
- <tr>
69
- <td><label id="accesskeylabel" for="accesskey">{#xhtmlxtras_dlg.attribute_label_accesskey}</label></td>
70
- <td><input type="text" id="accesskey" name="accesskey" value="" /></td>
71
- </tr>
72
- </table>
73
- </fieldset>
74
- </div>
75
- <div id="events_panel" class="panel">
76
- <fieldset>
77
- <legend>{#xhtmlxtras_dlg.attribute_events_tab}</legend>
78
-
79
- <table role="presentation" border="0" cellpadding="0" cellspacing="4">
80
- <tr>
81
- <td class="label"><label for="onfocus">onfocus</label>:</td>
82
- <td><input id="onfocus" name="onfocus" type="text" value="" /></td>
83
- </tr>
84
-
85
- <tr>
86
- <td class="label"><label for="onblur">onblur</label>:</td>
87
- <td><input id="onblur" name="onblur" type="text" value="" /></td>
88
- </tr>
89
-
90
- <tr>
91
- <td class="label"><label for="onclick">onclick</label>:</td>
92
- <td><input id="onclick" name="onclick" type="text" value="" /></td>
93
- </tr>
94
-
95
- <tr>
96
- <td class="label"><label for="ondblclick">ondblclick</label>:</td>
97
- <td><input id="ondblclick" name="ondblclick" type="text" value="" /></td>
98
- </tr>
99
-
100
- <tr>
101
- <td class="label"><label for="onmousedown">onmousedown</label>:</td>
102
- <td><input id="onmousedown" name="onmousedown" type="text" value="" /></td>
103
- </tr>
104
-
105
- <tr>
106
- <td class="label"><label for="onmouseup">onmouseup</label>:</td>
107
- <td><input id="onmouseup" name="onmouseup" type="text" value="" /></td>
108
- </tr>
109
-
110
- <tr>
111
- <td class="label"><label for="onmouseover">onmouseover</label>:</td>
112
- <td><input id="onmouseover" name="onmouseover" type="text" value="" /></td>
113
- </tr>
114
-
115
- <tr>
116
- <td class="label"><label for="onmousemove">onmousemove</label>:</td>
117
- <td><input id="onmousemove" name="onmousemove" type="text" value="" /></td>
118
- </tr>
119
-
120
- <tr>
121
- <td class="label"><label for="onmouseout">onmouseout</label>:</td>
122
- <td><input id="onmouseout" name="onmouseout" type="text" value="" /></td>
123
- </tr>
124
-
125
- <tr>
126
- <td class="label"><label for="onkeypress">onkeypress</label>:</td>
127
- <td><input id="onkeypress" name="onkeypress" type="text" value="" /></td>
128
- </tr>
129
-
130
- <tr>
131
- <td class="label"><label for="onkeydown">onkeydown</label>:</td>
132
- <td><input id="onkeydown" name="onkeydown" type="text" value="" /></td>
133
- </tr>
134
-
135
- <tr>
136
- <td class="label"><label for="onkeyup">onkeyup</label>:</td>
137
- <td><input id="onkeyup" name="onkeyup" type="text" value="" /></td>
138
- </tr>
139
- </table>
140
- </fieldset>
141
- </div>
142
- </div>
143
- <div class="mceActionPanel">
144
- <input type="submit" id="insert" name="insert" value="{#insert}" />
145
- <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
146
- </div>
147
- </form>
148
- </body>
149
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/xhtmlxtras/cite.htm DELETED
@@ -1,142 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <title>{#xhtmlxtras_dlg.title_cite_element}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=359"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=359"></script>
7
- <script type="text/javascript" src="../../utils/form_utils.js?ver=359"></script>
8
- <script type="text/javascript" src="../../utils/editable_selects.js?ver=359"></script>
9
- <script type="text/javascript" src="js/element_common.js?ver=359"></script>
10
- <script type="text/javascript" src="js/cite.js?ver=359"></script>
11
- <link rel="stylesheet" type="text/css" href="css/popup.css?ver=359" />
12
- </head>
13
- <body style="display: none" role="application" aria-labelledby="app_title">
14
- <span style="display:none;" id="app_title">{#xhtmlxtras_dlg.title_cite_element}</span>
15
- <form onsubmit="insertCite();return false;" action="#">
16
- <div class="tabs">
17
- <ul>
18
- <li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.general_tab}</a></span></li>
19
- <!-- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.events_tab}</a></span></li> -->
20
- </ul>
21
- </div>
22
-
23
- <div class="panel_wrapper">
24
- <div id="general_panel" class="panel current">
25
- <fieldset>
26
- <legend>{#xhtmlxtras_dlg.fieldset_attrib_tab}</legend>
27
- <table role="presentation" border="0" cellpadding="0" cellspacing="4">
28
- <tr>
29
- <td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td>
30
- <td><input id="title" name="title" type="text" value="" class="field mceFocus" /></td>
31
- </tr>
32
- <tr>
33
- <td class="label"><label id="idlabel" for="id">{#xhtmlxtras_dlg.attribute_label_id}</label>:</td>
34
- <td><input id="id" name="id" type="text" value="" class="field" /></td>
35
- </tr>
36
- <tr>
37
- <td class="label"><label id="classlabel" for="class">{#xhtmlxtras_dlg.attribute_label_class}</label>:</td>
38
- <td>
39
- <select id="class" name="class" class="field mceEditableSelect">
40
- <option value="">{#not_set}</option>
41
- </select>
42
- </td>
43
- </tr>
44
- <tr>
45
- <td class="label"><label id="stylelabel" for="class">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td>
46
- <td><input id="style" name="style" type="text" value="" class="field" /></td>
47
- </tr>
48
- <tr>
49
- <td class="label"><label id="dirlabel" for="dir">{#xhtmlxtras_dlg.attribute_label_langdir}</label>:</td>
50
- <td>
51
- <select id="dir" name="dir" class="field">
52
- <option value="">{#not_set}</option>
53
- <option value="ltr">{#xhtmlxtras_dlg.attribute_option_ltr}</option>
54
- <option value="rtl">{#xhtmlxtras_dlg.attribute_option_rtl}</option>
55
- </select>
56
- </td>
57
- </tr>
58
- <tr>
59
- <td class="label"><label id="langlabel" for="lang">{#xhtmlxtras_dlg.attribute_label_langcode}</label>:</td>
60
- <td>
61
- <input id="lang" name="lang" type="text" value="" class="field" />
62
- </td>
63
- </tr>
64
- </table>
65
- </fieldset>
66
- </div>
67
- <div id="events_panel" class="panel">
68
- <fieldset>
69
- <legend>{#xhtmlxtras_dlg.fieldset_events_tab}</legend>
70
-
71
- <table role="presentation" border="0" cellpadding="0" cellspacing="4">
72
- <tr>
73
- <td class="label"><label for="onfocus">onfocus</label>:</td>
74
- <td><input id="onfocus" name="onfocus" type="text" value="" class="field" /></td>
75
- </tr>
76
-
77
- <tr>
78
- <td class="label"><label for="onblur">onblur</label>:</td>
79
- <td><input id="onblur" name="onblur" type="text" value="" class="field" /></td>
80
- </tr>
81
-
82
- <tr>
83
- <td class="label"><label for="onclick">onclick</label>:</td>
84
- <td><input id="onclick" name="onclick" type="text" value="" class="field" /></td>
85
- </tr>
86
-
87
- <tr>
88
- <td class="label"><label for="ondblclick">ondblclick</label>:</td>
89
- <td><input id="ondblclick" name="ondblclick" type="text" value="" class="field" /></td>
90
- </tr>
91
-
92
- <tr>
93
- <td class="label"><label for="onmousedown">onmousedown</label>:</td>
94
- <td><input id="onmousedown" name="onmousedown" type="text" value="" class="field" /></td>
95
- </tr>
96
-
97
- <tr>
98
- <td class="label"><label for="onmouseup">onmouseup</label>:</td>
99
- <td><input id="onmouseup" name="onmouseup" type="text" value="" class="field" /></td>
100
- </tr>
101
-
102
- <tr>
103
- <td class="label"><label for="onmouseover">onmouseover</label>:</td>
104
- <td><input id="onmouseover" name="onmouseover" type="text" value="" class="field" /></td>
105
- </tr>
106
-
107
- <tr>
108
- <td class="label"><label for="onmousemove">onmousemove</label>:</td>
109
- <td><input id="onmousemove" name="onmousemove" type="text" value="" class="field" /></td>
110
- </tr>
111
-
112
- <tr>
113
- <td class="label"><label for="onmouseout">onmouseout</label>:</td>
114
- <td><input id="onmouseout" name="onmouseout" type="text" value="" class="field" /></td>
115
- </tr>
116
-
117
- <tr>
118
- <td class="label"><label for="onkeypress">onkeypress</label>:</td>
119
- <td><input id="onkeypress" name="onkeypress" type="text" value="" class="field" /></td>
120
- </tr>
121
-
122
- <tr>
123
- <td class="label"><label for="onkeydown">onkeydown</label>:</td>
124
- <td><input id="onkeydown" name="onkeydown" type="text" value="" class="field" /></td>
125
- </tr>
126
-
127
- <tr>
128
- <td class="label"><label for="onkeyup">onkeyup</label>:</td>
129
- <td><input id="onkeyup" name="onkeyup" type="text" value="" class="field" /></td>
130
- </tr>
131
- </table>
132
- </fieldset>
133
- </div>
134
- </div>
135
- <div class="mceActionPanel">
136
- <input type="submit" id="insert" name="insert" value="{#update}" />
137
- <input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeCite();" style="display: none;" />
138
- <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
139
- </div>
140
- </form>
141
- </body>
142
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/xhtmlxtras/css/attributes.css DELETED
@@ -1,13 +0,0 @@
1
- .panel_wrapper div.current {
2
- min-height: 290px;
3
- height: auto;
4
- }
5
-
6
- #events_panel input,
7
- #id, #style, #title, #dir, #hreflang, #lang, #classlist, #tabindex, #accesskey {
8
- width: 200px;
9
- }
10
-
11
- .mceActionPanel {
12
- margin: 5px 0;
13
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/xhtmlxtras/css/popup.css DELETED
@@ -1,9 +0,0 @@
1
- input.field, select.field {width:200px;}
2
- input.picker {width:179px; margin-left: 5px;}
3
- input.disabled {border-color:#F2F2F2;}
4
- img.picker {vertical-align:text-bottom; cursor:pointer;}
5
- h1 {padding: 0 0 5px 0;}
6
- .panel_wrapper div.current {min-height:160px;height:auto;}
7
- #xhtmlxtrasdel .panel_wrapper div.current, #xhtmlxtrasins .panel_wrapper div.current {height: 230px;}
8
- a.browse span {display:block; width:20px; height:20px; background:url('../../../images/icons.gif') -140px -20px;}
9
- #datetime {width:180px;}
 
 
 
 
 
 
 
 
 
mce/xhtmlxtras/css/xhtmlxtras.css DELETED
@@ -1,24 +0,0 @@
1
- ins {
2
- border-bottom: 1px solid green;
3
- text-decoration: none;
4
- color: green;
5
- }
6
-
7
- del {
8
- color: Red;
9
- text-decoration: line-through;
10
- }
11
-
12
- cite {
13
- border-bottom: 1px dashed blue;
14
- }
15
-
16
- acronym {
17
- border-bottom: 1px dotted #CCC;
18
- cursor: help;
19
- }
20
-
21
- abbr, html\:abbr {
22
- border-bottom: 1px dashed #CCC;
23
- cursor: help;
24
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/xhtmlxtras/del.htm DELETED
@@ -1,162 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <title>{#xhtmlxtras_dlg.title_del_element}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=359"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=359"></script>
7
- <script type="text/javascript" src="../../utils/form_utils.js?ver=359"></script>
8
- <script type="text/javascript" src="../../utils/editable_selects.js?ver=359"></script>
9
- <script type="text/javascript" src="js/element_common.js?ver=359"></script>
10
- <script type="text/javascript" src="js/del.js?ver=359"></script>
11
- <link rel="stylesheet" type="text/css" href="css/popup.css?ver=359" />
12
- </head>
13
- <body id="xhtmlxtrasins" style="display: none" role="application" aria-labelledby="app_title">
14
- <span style="display:none;" id="app_title">{#xhtmlxtras_dlg.title_del_element}</span>
15
- <form onsubmit="insertDel();return false;" action="#">
16
- <div class="tabs">
17
- <ul>
18
- <li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.general_tab}</a></span></li>
19
- <!-- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.events_tab}</a></span></li> -->
20
- </ul>
21
- </div>
22
-
23
- <div class="panel_wrapper">
24
- <div id="general_panel" class="panel current">
25
- <fieldset>
26
- <legend>{#xhtmlxtras_dlg.fieldset_general_tab}</legend>
27
- <table role="presentation" border="0" cellpadding="0" cellspacing="4">
28
- <tr>
29
- <td class="label"><label id="datetimelabel" for="datetime">{#xhtmlxtras_dlg.attribute_label_datetime}</label>:</td>
30
- <td>
31
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
32
- <tr>
33
- <td><input id="datetime" name="datetime" type="text" value="" maxlength="19" class="field mceFocus" /></td>
34
- <td><a href="javascript:insertDateTime('datetime');" onmousedown="return false;" class="browse" role="button" aria-labelledby="datetimelabel"><span class="datetime" title="{#xhtmlxtras_dlg.insert_date}"></span></a></td>
35
- </tr>
36
- </table>
37
- </td>
38
- </tr>
39
- <tr>
40
- <td class="label"><label id="citelabel" for="cite">{#xhtmlxtras_dlg.attribute_label_cite}</label>:</td>
41
- <td><input id="cite" name="cite" type="text" value="" class="field" /></td>
42
- </tr>
43
- </table>
44
- </fieldset>
45
- <fieldset>
46
- <legend>{#xhtmlxtras_dlg.fieldset_attrib_tab}</legend>
47
- <table role="presentation" border="0" cellpadding="0" cellspacing="4">
48
- <tr>
49
- <td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td>
50
- <td><input id="title" name="title" type="text" value="" class="field" /></td>
51
- </tr>
52
- <tr>
53
- <td class="label"><label id="idlabel" for="id">{#xhtmlxtras_dlg.attribute_label_id}</label>:</td>
54
- <td><input id="id" name="id" type="text" value="" class="field" /></td>
55
- </tr>
56
- <tr>
57
- <td class="label"><label id="classlabel" for="class">{#xhtmlxtras_dlg.attribute_label_class}</label>:</td>
58
- <td>
59
- <select id="class" name="class" class="field mceEditableSelect">
60
- <option value="">{#not_set}</option>
61
- </select>
62
- </td>
63
- </tr>
64
- <tr>
65
- <td class="label"><label id="stylelabel" for="style">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td>
66
- <td><input id="style" name="style" type="text" value="" class="field" /></td>
67
- </tr>
68
- <tr>
69
- <td class="label"><label id="dirlabel" for="dir">{#xhtmlxtras_dlg.attribute_label_langdir}</label>:</td>
70
- <td>
71
- <select id="dir" name="dir" class="field">
72
- <option value="">{#not_set}</option>
73
- <option value="ltr">{#xhtmlxtras_dlg.attribute_option_ltr}</option>
74
- <option value="rtl">{#xhtmlxtras_dlg.attribute_option_rtl}</option>
75
- </select>
76
- </td>
77
- </tr>
78
- <tr>
79
- <td class="label"><label id="langlabel" for="lang">{#xhtmlxtras_dlg.attribute_label_langcode}</label>:</td>
80
- <td>
81
- <input id="lang" name="lang" type="text" value="" class="field" />
82
- </td>
83
- </tr>
84
- </table>
85
- </fieldset>
86
- </div>
87
- <div id="events_panel" class="panel">
88
- <fieldset>
89
- <legend>{#xhtmlxtras_dlg.fieldset_events_tab}</legend>
90
-
91
- <table role="presentation" border="0" cellpadding="0" cellspacing="4">
92
- <tr>
93
- <td class="label"><label for="onfocus">onfocus</label>:</td>
94
- <td><input id="onfocus" name="onfocus" type="text" value="" class="field" /></td>
95
- </tr>
96
-
97
- <tr>
98
- <td class="label"><label for="onblur">onblur</label>:</td>
99
- <td><input id="onblur" name="onblur" type="text" value="" class="field" /></td>
100
- </tr>
101
-
102
- <tr>
103
- <td class="label"><label for="onclick">onclick</label>:</td>
104
- <td><input id="onclick" name="onclick" type="text" value="" class="field" /></td>
105
- </tr>
106
-
107
- <tr>
108
- <td class="label"><label for="ondblclick">ondblclick</label>:</td>
109
- <td><input id="ondblclick" name="ondblclick" type="text" value="" class="field" /></td>
110
- </tr>
111
-
112
- <tr>
113
- <td class="label"><label for="onmousedown">onmousedown</label>:</td>
114
- <td><input id="onmousedown" name="onmousedown" type="text" value="" class="field" /></td>
115
- </tr>
116
-
117
- <tr>
118
- <td class="label"><label for="onmouseup">onmouseup</label>:</td>
119
- <td><input id="onmouseup" name="onmouseup" type="text" value="" class="field" /></td>
120
- </tr>
121
-
122
- <tr>
123
- <td class="label"><label for="onmouseover">onmouseover</label>:</td>
124
- <td><input id="onmouseover" name="onmouseover" type="text" value="" class="field" /></td>
125
- </tr>
126
-
127
- <tr>
128
- <td class="label"><label for="onmousemove">onmousemove</label>:</td>
129
- <td><input id="onmousemove" name="onmousemove" type="text" value="" class="field" /></td>
130
- </tr>
131
-
132
- <tr>
133
- <td class="label"><label for="onmouseout">onmouseout</label>:</td>
134
- <td><input id="onmouseout" name="onmouseout" type="text" value="" class="field" /></td>
135
- </tr>
136
-
137
- <tr>
138
- <td class="label"><label for="onkeypress">onkeypress</label>:</td>
139
- <td><input id="onkeypress" name="onkeypress" type="text" value="" class="field" /></td>
140
- </tr>
141
-
142
- <tr>
143
- <td class="label"><label for="onkeydown">onkeydown</label>:</td>
144
- <td><input id="onkeydown" name="onkeydown" type="text" value="" class="field" /></td>
145
- </tr>
146
-
147
- <tr>
148
- <td class="label"><label for="onkeyup">onkeyup</label>:</td>
149
- <td><input id="onkeyup" name="onkeyup" type="text" value="" class="field" /></td>
150
- </tr>
151
- </table>
152
- </fieldset>
153
- </div>
154
- </div>
155
- <div class="mceActionPanel">
156
- <input type="submit" id="insert" name="insert" value="{#update}" />
157
- <input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeDel();" style="display: none;" />
158
- <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
159
- </div>
160
- </form>
161
- </body>
162
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/xhtmlxtras/editor_plugin.js DELETED
@@ -1 +0,0 @@
1
- (function(){tinymce.create("tinymce.plugins.XHTMLXtrasPlugin",{init:function(a,b){a.addCommand("mceCite",function(){a.windowManager.open({file:b+"/cite.htm",width:350+parseInt(a.getLang("xhtmlxtras.cite_delta_width",0)),height:250+parseInt(a.getLang("xhtmlxtras.cite_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceAcronym",function(){a.windowManager.open({file:b+"/acronym.htm",width:350+parseInt(a.getLang("xhtmlxtras.acronym_delta_width",0)),height:250+parseInt(a.getLang("xhtmlxtras.acronym_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceAbbr",function(){a.windowManager.open({file:b+"/abbr.htm",width:350+parseInt(a.getLang("xhtmlxtras.abbr_delta_width",0)),height:250+parseInt(a.getLang("xhtmlxtras.abbr_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceDel",function(){a.windowManager.open({file:b+"/del.htm",width:340+parseInt(a.getLang("xhtmlxtras.del_delta_width",0)),height:310+parseInt(a.getLang("xhtmlxtras.del_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceIns",function(){a.windowManager.open({file:b+"/ins.htm",width:340+parseInt(a.getLang("xhtmlxtras.ins_delta_width",0)),height:310+parseInt(a.getLang("xhtmlxtras.ins_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceAttributes",function(){a.windowManager.open({file:b+"/attributes.htm",width:380+parseInt(a.getLang("xhtmlxtras.attr_delta_width",0)),height:370+parseInt(a.getLang("xhtmlxtras.attr_delta_height",0)),inline:1},{plugin_url:b})});a.addButton("cite",{title:"xhtmlxtras.cite_desc",cmd:"mceCite"});a.addButton("acronym",{title:"xhtmlxtras.acronym_desc",cmd:"mceAcronym"});a.addButton("abbr",{title:"xhtmlxtras.abbr_desc",cmd:"mceAbbr"});a.addButton("del",{title:"xhtmlxtras.del_desc",cmd:"mceDel"});a.addButton("ins",{title:"xhtmlxtras.ins_desc",cmd:"mceIns"});a.addButton("attribs",{title:"xhtmlxtras.attribs_desc",cmd:"mceAttributes"});a.onNodeChange.add(function(d,c,f,e){f=d.dom.getParent(f,"CITE,ACRONYM,ABBR,DEL,INS");c.setDisabled("cite",e);c.setDisabled("acronym",e);c.setDisabled("abbr",e);c.setDisabled("del",e);c.setDisabled("ins",e);c.setDisabled("attribs",f&&f.nodeName=="BODY");c.setActive("cite",0);c.setActive("acronym",0);c.setActive("abbr",0);c.setActive("del",0);c.setActive("ins",0);if(f){do{c.setDisabled(f.nodeName.toLowerCase(),0);c.setActive(f.nodeName.toLowerCase(),1)}while(f=f.parentNode)}});a.onPreInit.add(function(){a.dom.create("abbr")})},getInfo:function(){return{longname:"XHTML Xtras Plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/xhtmlxtras",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("xhtmlxtras",tinymce.plugins.XHTMLXtrasPlugin)})();
 
mce/xhtmlxtras/ins.htm DELETED
@@ -1,162 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <title>{#xhtmlxtras_dlg.title_ins_element}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js?ver=359"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js?ver=359"></script>
7
- <script type="text/javascript" src="../../utils/form_utils.js?ver=359"></script>
8
- <script type="text/javascript" src="../../utils/editable_selects.js?ver=359"></script>
9
- <script type="text/javascript" src="js/element_common.js?ver=359"></script>
10
- <script type="text/javascript" src="js/ins.js?ver=359"></script>
11
- <link rel="stylesheet" type="text/css" href="css/popup.css?ver=359" />
12
- </head>
13
- <body id="xhtmlxtrasins" style="display: none" role="application" aria-labelledby="app_title">
14
- <span style="display:none;" id="app_title">{#xhtmlxtras_dlg.title_ins_element}</span>
15
- <form onsubmit="insertIns();return false;" action="#">
16
- <div class="tabs">
17
- <ul>
18
- <li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.general_tab}</a></span></li>
19
- <!-- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.events_tab}</a></span></li> -->
20
- </ul>
21
- </div>
22
-
23
- <div class="panel_wrapper">
24
- <div id="general_panel" class="panel current">
25
- <fieldset>
26
- <legend>{#xhtmlxtras_dlg.fieldset_general_tab}</legend>
27
- <table role="presentation" border="0" cellpadding="0" cellspacing="4">
28
- <tr>
29
- <td class="label"><label id="datetimelabel" for="datetime">{#xhtmlxtras_dlg.attribute_label_datetime}</label>:</td>
30
- <td>
31
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
32
- <tr>
33
- <td><input id="datetime" name="datetime" type="text" value="" maxlength="19" class="field mceFocus" /></td>
34
- <td ><a href="javascript:insertDateTime('datetime');" onmousedown="return false;" class="browse" role="button" aria-labelledby="datetimelabel"><span class="datetime" title="{#xhtmlxtras_dlg.insert_date}"></span></a></td>
35
- </tr>
36
- </table>
37
- </td>
38
- </tr>
39
- <tr >
40
- <td class="label"><label id="citelabel" for="cite">{#xhtmlxtras_dlg.attribute_label_cite}</label>:</td>
41
- <td><input id="cite" name="cite" type="text" value="" class="field" /></td>
42
- </tr>
43
- </table>
44
- </fieldset>
45
- <fieldset>
46
- <legend>{#xhtmlxtras_dlg.fieldset_attrib_tab}</legend>
47
- <table role="presentation" border="0" cellpadding="0" cellspacing="4">
48
- <tr>
49
- <td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td>
50
- <td><input id="title" name="title" type="text" value="" class="field" /></td>
51
- </tr>
52
- <tr>
53
- <td class="label"><label id="idlabel" for="id">{#xhtmlxtras_dlg.attribute_label_id}</label>:</td>
54
- <td><input id="id" name="id" type="text" value="" class="field" /></td>
55
- </tr>
56
- <tr>
57
- <td class="label"><label id="classlabel" for="class">{#xhtmlxtras_dlg.attribute_label_class}</label>:</td>
58
- <td>
59
- <select id="class" name="class" class="field mceEditableSelect">
60
- <option value="">{#not_set}</option>
61
- </select>
62
- </td>
63
- </tr>
64
- <tr>
65
- <td class="label"><label id="stylelabel" for="style">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td>
66
- <td><input id="style" name="style" type="text" value="" class="field" /></td>
67
- </tr>
68
- <tr>
69
- <td class="label"><label id="dirlabel" for="dir">{#xhtmlxtras_dlg.attribute_label_langdir}</label>:</td>
70
- <td>
71
- <select id="dir" name="dir" class="field">
72
- <option value="">{#not_set}</option>
73
- <option value="ltr">{#xhtmlxtras_dlg.attribute_option_ltr}</option>
74
- <option value="rtl">{#xhtmlxtras_dlg.attribute_option_rtl}</option>
75
- </select>
76
- </td>
77
- </tr>
78
- <tr>
79
- <td class="label"><label id="langlabel" for="lang">{#xhtmlxtras_dlg.attribute_label_langcode}</label>:</td>
80
- <td>
81
- <input id="lang" name="lang" type="text" value="" class="field" />
82
- </td>
83
- </tr>
84
- </table>
85
- </fieldset>
86
- </div>
87
- <div id="events_panel" class="panel">
88
- <fieldset>
89
- <legend>{#xhtmlxtras_dlg.fieldset_events_tab}</legend>
90
-
91
- <table role="presentation" border="0" cellpadding="0" cellspacing="4">
92
- <tr>
93
- <td class="label"><label for="onfocus">onfocus</label>:</td>
94
- <td><input id="onfocus" name="onfocus" type="text" value="" class="field" /></td>
95
- </tr>
96
-
97
- <tr>
98
- <td class="label"><label for="onblur">onblur</label>:</td>
99
- <td><input id="onblur" name="onblur" type="text" value="" class="field" /></td>
100
- </tr>
101
-
102
- <tr>
103
- <td class="label"><label for="onclick">onclick</label>:</td>
104
- <td><input id="onclick" name="onclick" type="text" value="" class="field" /></td>
105
- </tr>
106
-
107
- <tr>
108
- <td class="label"><label for="ondblclick">ondblclick</label>:</td>
109
- <td><input id="ondblclick" name="ondblclick" type="text" value="" class="field" /></td>
110
- </tr>
111
-
112
- <tr>
113
- <td class="label"><label for="onmousedown">onmousedown</label>:</td>
114
- <td><input id="onmousedown" name="onmousedown" type="text" value="" class="field" /></td>
115
- </tr>
116
-
117
- <tr>
118
- <td class="label"><label for="onmouseup">onmouseup</label>:</td>
119
- <td><input id="onmouseup" name="onmouseup" type="text" value="" class="field" /></td>
120
- </tr>
121
-
122
- <tr>
123
- <td class="label"><label for="onmouseover">onmouseover</label>:</td>
124
- <td><input id="onmouseover" name="onmouseover" type="text" value="" class="field" /></td>
125
- </tr>
126
-
127
- <tr>
128
- <td class="label"><label for="onmousemove">onmousemove</label>:</td>
129
- <td><input id="onmousemove" name="onmousemove" type="text" value="" class="field" /></td>
130
- </tr>
131
-
132
- <tr>
133
- <td class="label"><label for="onmouseout">onmouseout</label>:</td>
134
- <td><input id="onmouseout" name="onmouseout" type="text" value="" class="field" /></td>
135
- </tr>
136
-
137
- <tr>
138
- <td class="label"><label for="onkeypress">onkeypress</label>:</td>
139
- <td><input id="onkeypress" name="onkeypress" type="text" value="" class="field" /></td>
140
- </tr>
141
-
142
- <tr>
143
- <td class="label"><label for="onkeydown">onkeydown</label>:</td>
144
- <td><input id="onkeydown" name="onkeydown" type="text" value="" class="field" /></td>
145
- </tr>
146
-
147
- <tr>
148
- <td class="label"><label for="onkeyup">onkeyup</label>:</td>
149
- <td><input id="onkeyup" name="onkeyup" type="text" value="" class="field" /></td>
150
- </tr>
151
- </table>
152
- </fieldset>
153
- </div>
154
- </div>
155
- <div class="mceActionPanel">
156
- <input type="submit" id="insert" name="insert" value="{#update}" />
157
- <input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeIns();" style="display: none;" />
158
- <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
159
- </div>
160
- </form>
161
- </body>
162
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/xhtmlxtras/js/abbr.js DELETED
@@ -1,28 +0,0 @@
1
- /**
2
- * abbr.js
3
- *
4
- * Copyright 2009, Moxiecode Systems AB
5
- * Released under LGPL License.
6
- *
7
- * License: http://tinymce.moxiecode.com/license
8
- * Contributing: http://tinymce.moxiecode.com/contributing
9
- */
10
-
11
- function init() {
12
- SXE.initElementDialog('abbr');
13
- if (SXE.currentAction == "update") {
14
- SXE.showRemoveButton();
15
- }
16
- }
17
-
18
- function insertAbbr() {
19
- SXE.insertElement('abbr');
20
- tinyMCEPopup.close();
21
- }
22
-
23
- function removeAbbr() {
24
- SXE.removeElement('abbr');
25
- tinyMCEPopup.close();
26
- }
27
-
28
- tinyMCEPopup.onInit.add(init);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/xhtmlxtras/js/acronym.js DELETED
@@ -1,28 +0,0 @@
1
- /**
2
- * acronym.js
3
- *
4
- * Copyright 2009, Moxiecode Systems AB
5
- * Released under LGPL License.
6
- *
7
- * License: http://tinymce.moxiecode.com/license
8
- * Contributing: http://tinymce.moxiecode.com/contributing
9
- */
10
-
11
- function init() {
12
- SXE.initElementDialog('acronym');
13
- if (SXE.currentAction == "update") {
14
- SXE.showRemoveButton();
15
- }
16
- }
17
-
18
- function insertAcronym() {
19
- SXE.insertElement('acronym');
20
- tinyMCEPopup.close();
21
- }
22
-
23
- function removeAcronym() {
24
- SXE.removeElement('acronym');
25
- tinyMCEPopup.close();
26
- }
27
-
28
- tinyMCEPopup.onInit.add(init);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/xhtmlxtras/js/attributes.js DELETED
@@ -1,111 +0,0 @@
1
- /**
2
- * attributes.js
3
- *
4
- * Copyright 2009, Moxiecode Systems AB
5
- * Released under LGPL License.
6
- *
7
- * License: http://tinymce.moxiecode.com/license
8
- * Contributing: http://tinymce.moxiecode.com/contributing
9
- */
10
-
11
- function init() {
12
- tinyMCEPopup.resizeToInnerSize();
13
- var inst = tinyMCEPopup.editor;
14
- var dom = inst.dom;
15
- var elm = inst.selection.getNode();
16
- var f = document.forms[0];
17
- var onclick = dom.getAttrib(elm, 'onclick');
18
-
19
- setFormValue('title', dom.getAttrib(elm, 'title'));
20
- setFormValue('id', dom.getAttrib(elm, 'id'));
21
- setFormValue('style', dom.getAttrib(elm, "style"));
22
- setFormValue('dir', dom.getAttrib(elm, 'dir'));
23
- setFormValue('lang', dom.getAttrib(elm, 'lang'));
24
- setFormValue('tabindex', dom.getAttrib(elm, 'tabindex', typeof(elm.tabindex) != "undefined" ? elm.tabindex : ""));
25
- setFormValue('accesskey', dom.getAttrib(elm, 'accesskey', typeof(elm.accesskey) != "undefined" ? elm.accesskey : ""));
26
- setFormValue('onfocus', dom.getAttrib(elm, 'onfocus'));
27
- setFormValue('onblur', dom.getAttrib(elm, 'onblur'));
28
- setFormValue('onclick', onclick);
29
- setFormValue('ondblclick', dom.getAttrib(elm, 'ondblclick'));
30
- setFormValue('onmousedown', dom.getAttrib(elm, 'onmousedown'));
31
- setFormValue('onmouseup', dom.getAttrib(elm, 'onmouseup'));
32
- setFormValue('onmouseover', dom.getAttrib(elm, 'onmouseover'));
33
- setFormValue('onmousemove', dom.getAttrib(elm, 'onmousemove'));
34
- setFormValue('onmouseout', dom.getAttrib(elm, 'onmouseout'));
35
- setFormValue('onkeypress', dom.getAttrib(elm, 'onkeypress'));
36
- setFormValue('onkeydown', dom.getAttrib(elm, 'onkeydown'));
37
- setFormValue('onkeyup', dom.getAttrib(elm, 'onkeyup'));
38
- className = dom.getAttrib(elm, 'class');
39
-
40
- addClassesToList('classlist', 'advlink_styles');
41
- selectByValue(f, 'classlist', className, true);
42
-
43
- TinyMCE_EditableSelects.init();
44
- }
45
-
46
- function setFormValue(name, value) {
47
- if(value && document.forms[0].elements[name]){
48
- document.forms[0].elements[name].value = value;
49
- }
50
- }
51
-
52
- function insertAction() {
53
- var inst = tinyMCEPopup.editor;
54
- var elm = inst.selection.getNode();
55
-
56
- setAllAttribs(elm);
57
- tinyMCEPopup.execCommand("mceEndUndoLevel");
58
- tinyMCEPopup.close();
59
- }
60
-
61
- function setAttrib(elm, attrib, value) {
62
- var formObj = document.forms[0];
63
- var valueElm = formObj.elements[attrib.toLowerCase()];
64
- var inst = tinyMCEPopup.editor;
65
- var dom = inst.dom;
66
-
67
- if (typeof(value) == "undefined" || value == null) {
68
- value = "";
69
-
70
- if (valueElm)
71
- value = valueElm.value;
72
- }
73
-
74
- dom.setAttrib(elm, attrib.toLowerCase(), value);
75
- }
76
-
77
- function setAllAttribs(elm) {
78
- var f = document.forms[0];
79
-
80
- setAttrib(elm, 'title');
81
- setAttrib(elm, 'id');
82
- setAttrib(elm, 'style');
83
- setAttrib(elm, 'class', getSelectValue(f, 'classlist'));
84
- setAttrib(elm, 'dir');
85
- setAttrib(elm, 'lang');
86
- setAttrib(elm, 'tabindex');
87
- setAttrib(elm, 'accesskey');
88
- setAttrib(elm, 'onfocus');
89
- setAttrib(elm, 'onblur');
90
- setAttrib(elm, 'onclick');
91
- setAttrib(elm, 'ondblclick');
92
- setAttrib(elm, 'onmousedown');
93
- setAttrib(elm, 'onmouseup');
94
- setAttrib(elm, 'onmouseover');
95
- setAttrib(elm, 'onmousemove');
96
- setAttrib(elm, 'onmouseout');
97
- setAttrib(elm, 'onkeypress');
98
- setAttrib(elm, 'onkeydown');
99
- setAttrib(elm, 'onkeyup');
100
-
101
- // Refresh in old MSIE
102
- // if (tinyMCE.isMSIE5)
103
- // elm.outerHTML = elm.outerHTML;
104
- }
105
-
106
- function insertAttribute() {
107
- tinyMCEPopup.close();
108
- }
109
-
110
- tinyMCEPopup.onInit.add(init);
111
- tinyMCEPopup.requireLangPack();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/xhtmlxtras/js/cite.js DELETED
@@ -1,28 +0,0 @@
1
- /**
2
- * cite.js
3
- *
4
- * Copyright 2009, Moxiecode Systems AB
5
- * Released under LGPL License.
6
- *
7
- * License: http://tinymce.moxiecode.com/license
8
- * Contributing: http://tinymce.moxiecode.com/contributing
9
- */
10
-
11
- function init() {
12
- SXE.initElementDialog('cite');
13
- if (SXE.currentAction == "update") {
14
- SXE.showRemoveButton();
15
- }
16
- }
17
-
18
- function insertCite() {
19
- SXE.insertElement('cite');
20
- tinyMCEPopup.close();
21
- }
22
-
23
- function removeCite() {
24
- SXE.removeElement('cite');
25
- tinyMCEPopup.close();
26
- }
27
-
28
- tinyMCEPopup.onInit.add(init);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/xhtmlxtras/js/del.js DELETED
@@ -1,53 +0,0 @@
1
- /**
2
- * del.js
3
- *
4
- * Copyright 2009, Moxiecode Systems AB
5
- * Released under LGPL License.
6
- *
7
- * License: http://tinymce.moxiecode.com/license
8
- * Contributing: http://tinymce.moxiecode.com/contributing
9
- */
10
-
11
- function init() {
12
- SXE.initElementDialog('del');
13
- if (SXE.currentAction == "update") {
14
- setFormValue('datetime', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'datetime'));
15
- setFormValue('cite', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'cite'));
16
- SXE.showRemoveButton();
17
- }
18
- }
19
-
20
- function setElementAttribs(elm) {
21
- setAllCommonAttribs(elm);
22
- setAttrib(elm, 'datetime');
23
- setAttrib(elm, 'cite');
24
- elm.removeAttribute('data-mce-new');
25
- }
26
-
27
- function insertDel() {
28
- var elm = tinyMCEPopup.editor.dom.getParent(SXE.focusElement, 'DEL');
29
-
30
- if (elm == null) {
31
- var s = SXE.inst.selection.getContent();
32
- if(s.length > 0) {
33
- insertInlineElement('del');
34
- var elementArray = SXE.inst.dom.select('del[data-mce-new]');
35
- for (var i=0; i<elementArray.length; i++) {
36
- var elm = elementArray[i];
37
- setElementAttribs(elm);
38
- }
39
- }
40
- } else {
41
- setElementAttribs(elm);
42
- }
43
- tinyMCEPopup.editor.nodeChanged();
44
- tinyMCEPopup.execCommand('mceEndUndoLevel');
45
- tinyMCEPopup.close();
46
- }
47
-
48
- function removeDel() {
49
- SXE.removeElement('del');
50
- tinyMCEPopup.close();
51
- }
52
-
53
- tinyMCEPopup.onInit.add(init);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/xhtmlxtras/js/element_common.js DELETED
@@ -1,229 +0,0 @@
1
- /**
2
- * element_common.js
3
- *
4
- * Copyright 2009, Moxiecode Systems AB
5
- * Released under LGPL License.
6
- *
7
- * License: http://tinymce.moxiecode.com/license
8
- * Contributing: http://tinymce.moxiecode.com/contributing
9
- */
10
-
11
- tinyMCEPopup.requireLangPack();
12
-
13
- function initCommonAttributes(elm) {
14
- var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
15
-
16
- // Setup form data for common element attributes
17
- setFormValue('title', dom.getAttrib(elm, 'title'));
18
- setFormValue('id', dom.getAttrib(elm, 'id'));
19
- selectByValue(formObj, 'class', dom.getAttrib(elm, 'class'), true);
20
- setFormValue('style', dom.getAttrib(elm, 'style'));
21
- selectByValue(formObj, 'dir', dom.getAttrib(elm, 'dir'));
22
- setFormValue('lang', dom.getAttrib(elm, 'lang'));
23
- setFormValue('onfocus', dom.getAttrib(elm, 'onfocus'));
24
- setFormValue('onblur', dom.getAttrib(elm, 'onblur'));
25
- setFormValue('onclick', dom.getAttrib(elm, 'onclick'));
26
- setFormValue('ondblclick', dom.getAttrib(elm, 'ondblclick'));
27
- setFormValue('onmousedown', dom.getAttrib(elm, 'onmousedown'));
28
- setFormValue('onmouseup', dom.getAttrib(elm, 'onmouseup'));
29
- setFormValue('onmouseover', dom.getAttrib(elm, 'onmouseover'));
30
- setFormValue('onmousemove', dom.getAttrib(elm, 'onmousemove'));
31
- setFormValue('onmouseout', dom.getAttrib(elm, 'onmouseout'));
32
- setFormValue('onkeypress', dom.getAttrib(elm, 'onkeypress'));
33
- setFormValue('onkeydown', dom.getAttrib(elm, 'onkeydown'));
34
- setFormValue('onkeyup', dom.getAttrib(elm, 'onkeyup'));
35
- }
36
-
37
- function setFormValue(name, value) {
38
- if(document.forms[0].elements[name]) document.forms[0].elements[name].value = value;
39
- }
40
-
41
- function insertDateTime(id) {
42
- document.getElementById(id).value = getDateTime(new Date(), "%Y-%m-%dT%H:%M:%S");
43
- }
44
-
45
- function getDateTime(d, fmt) {
46
- fmt = fmt.replace("%D", "%m/%d/%y");
47
- fmt = fmt.replace("%r", "%I:%M:%S %p");
48
- fmt = fmt.replace("%Y", "" + d.getFullYear());
49
- fmt = fmt.replace("%y", "" + d.getYear());
50
- fmt = fmt.replace("%m", addZeros(d.getMonth()+1, 2));
51
- fmt = fmt.replace("%d", addZeros(d.getDate(), 2));
52
- fmt = fmt.replace("%H", "" + addZeros(d.getHours(), 2));
53
- fmt = fmt.replace("%M", "" + addZeros(d.getMinutes(), 2));
54
- fmt = fmt.replace("%S", "" + addZeros(d.getSeconds(), 2));
55
- fmt = fmt.replace("%I", "" + ((d.getHours() + 11) % 12 + 1));
56
- fmt = fmt.replace("%p", "" + (d.getHours() < 12 ? "AM" : "PM"));
57
- fmt = fmt.replace("%%", "%");
58
-
59
- return fmt;
60
- }
61
-
62
- function addZeros(value, len) {
63
- var i;
64
-
65
- value = "" + value;
66
-
67
- if (value.length < len) {
68
- for (i=0; i<(len-value.length); i++)
69
- value = "0" + value;
70
- }
71
-
72
- return value;
73
- }
74
-
75
- function selectByValue(form_obj, field_name, value, add_custom, ignore_case) {
76
- if (!form_obj || !form_obj.elements[field_name])
77
- return;
78
-
79
- var sel = form_obj.elements[field_name];
80
-
81
- var found = false;
82
- for (var i=0; i<sel.options.length; i++) {
83
- var option = sel.options[i];
84
-
85
- if (option.value == value || (ignore_case && option.value.toLowerCase() == value.toLowerCase())) {
86
- option.selected = true;
87
- found = true;
88
- } else
89
- option.selected = false;
90
- }
91
-
92
- if (!found && add_custom && value != '') {
93
- var option = new Option('Value: ' + value, value);
94
- option.selected = true;
95
- sel.options[sel.options.length] = option;
96
- }
97
-
98
- return found;
99
- }
100
-
101
- function setAttrib(elm, attrib, value) {
102
- var formObj = document.forms[0];
103
- var valueElm = formObj.elements[attrib.toLowerCase()];
104
- tinyMCEPopup.editor.dom.setAttrib(elm, attrib, value || valueElm.value);
105
- }
106
-
107
- function setAllCommonAttribs(elm) {
108
- setAttrib(elm, 'title');
109
- setAttrib(elm, 'id');
110
- setAttrib(elm, 'class');
111
- setAttrib(elm, 'style');
112
- setAttrib(elm, 'dir');
113
- setAttrib(elm, 'lang');
114
- /*setAttrib(elm, 'onfocus');
115
- setAttrib(elm, 'onblur');
116
- setAttrib(elm, 'onclick');
117
- setAttrib(elm, 'ondblclick');
118
- setAttrib(elm, 'onmousedown');
119
- setAttrib(elm, 'onmouseup');
120
- setAttrib(elm, 'onmouseover');
121
- setAttrib(elm, 'onmousemove');
122
- setAttrib(elm, 'onmouseout');
123
- setAttrib(elm, 'onkeypress');
124
- setAttrib(elm, 'onkeydown');
125
- setAttrib(elm, 'onkeyup');*/
126
- }
127
-
128
- SXE = {
129
- currentAction : "insert",
130
- inst : tinyMCEPopup.editor,
131
- updateElement : null
132
- }
133
-
134
- SXE.focusElement = SXE.inst.selection.getNode();
135
-
136
- SXE.initElementDialog = function(element_name) {
137
- addClassesToList('class', 'xhtmlxtras_styles');
138
- TinyMCE_EditableSelects.init();
139
-
140
- element_name = element_name.toLowerCase();
141
- var elm = SXE.inst.dom.getParent(SXE.focusElement, element_name.toUpperCase());
142
- if (elm != null && elm.nodeName.toUpperCase() == element_name.toUpperCase()) {
143
- SXE.currentAction = "update";
144
- }
145
-
146
- if (SXE.currentAction == "update") {
147
- initCommonAttributes(elm);
148
- SXE.updateElement = elm;
149
- }
150
-
151
- document.forms[0].insert.value = tinyMCEPopup.getLang(SXE.currentAction, 'Insert', true);
152
- }
153
-
154
- SXE.insertElement = function(element_name) {
155
- var elm = SXE.inst.dom.getParent(SXE.focusElement, element_name.toUpperCase()), h, tagName;
156
-
157
- if (elm == null) {
158
- var s = SXE.inst.selection.getContent();
159
- if(s.length > 0) {
160
- tagName = element_name;
161
-
162
- insertInlineElement(element_name);
163
- var elementArray = tinymce.grep(SXE.inst.dom.select(element_name));
164
- for (var i=0; i<elementArray.length; i++) {
165
- var elm = elementArray[i];
166
-
167
- if (SXE.inst.dom.getAttrib(elm, 'data-mce-new')) {
168
- elm.id = '';
169
- elm.setAttribute('id', '');
170
- elm.removeAttribute('id');
171
- elm.removeAttribute('data-mce-new');
172
-
173
- setAllCommonAttribs(elm);
174
- }
175
- }
176
- }
177
- } else {
178
- setAllCommonAttribs(elm);
179
- }
180
- SXE.inst.nodeChanged();
181
- tinyMCEPopup.execCommand('mceEndUndoLevel');
182
- }
183
-
184
- SXE.removeElement = function(element_name){
185
- element_name = element_name.toLowerCase();
186
- elm = SXE.inst.dom.getParent(SXE.focusElement, element_name.toUpperCase());
187
- if(elm && elm.nodeName.toUpperCase() == element_name.toUpperCase()){
188
- tinyMCE.execCommand('mceRemoveNode', false, elm);
189
- SXE.inst.nodeChanged();
190
- tinyMCEPopup.execCommand('mceEndUndoLevel');
191
- }
192
- }
193
-
194
- SXE.showRemoveButton = function() {
195
- document.getElementById("remove").style.display = '';
196
- }
197
-
198
- SXE.containsClass = function(elm,cl) {
199
- return (elm.className.indexOf(cl) > -1) ? true : false;
200
- }
201
-
202
- SXE.removeClass = function(elm,cl) {
203
- if(elm.className == null || elm.className == "" || !SXE.containsClass(elm,cl)) {
204
- return true;
205
- }
206
- var classNames = elm.className.split(" ");
207
- var newClassNames = "";
208
- for (var x = 0, cnl = classNames.length; x < cnl; x++) {
209
- if (classNames[x] != cl) {
210
- newClassNames += (classNames[x] + " ");
211
- }
212
- }
213
- elm.className = newClassNames.substring(0,newClassNames.length-1); //removes extra space at the end
214
- }
215
-
216
- SXE.addClass = function(elm,cl) {
217
- if(!SXE.containsClass(elm,cl)) elm.className ? elm.className += " " + cl : elm.className = cl;
218
- return true;
219
- }
220
-
221
- function insertInlineElement(en) {
222
- var ed = tinyMCEPopup.editor, dom = ed.dom;
223
-
224
- ed.getDoc().execCommand('FontName', false, 'mceinline');
225
- tinymce.each(dom.select('span,font'), function(n) {
226
- if (n.style.fontFamily == 'mceinline' || n.face == 'mceinline')
227
- dom.replace(dom.create(en, {'data-mce-new' : 1}), n, 1);
228
- });
229
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/xhtmlxtras/js/ins.js DELETED
@@ -1,53 +0,0 @@
1
- /**
2
- * ins.js
3
- *
4
- * Copyright 2009, Moxiecode Systems AB
5
- * Released under LGPL License.
6
- *
7
- * License: http://tinymce.moxiecode.com/license
8
- * Contributing: http://tinymce.moxiecode.com/contributing
9
- */
10
-
11
- function init() {
12
- SXE.initElementDialog('ins');
13
- if (SXE.currentAction == "update") {
14
- setFormValue('datetime', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'datetime'));
15
- setFormValue('cite', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'cite'));
16
- SXE.showRemoveButton();
17
- }
18
- }
19
-
20
- function setElementAttribs(elm) {
21
- setAllCommonAttribs(elm);
22
- setAttrib(elm, 'datetime');
23
- setAttrib(elm, 'cite');
24
- elm.removeAttribute('data-mce-new');
25
- }
26
-
27
- function insertIns() {
28
- var elm = tinyMCEPopup.editor.dom.getParent(SXE.focusElement, 'INS');
29
-
30
- if (elm == null) {
31
- var s = SXE.inst.selection.getContent();
32
- if(s.length > 0) {
33
- insertInlineElement('ins');
34
- var elementArray = SXE.inst.dom.select('ins[data-mce-new]');
35
- for (var i=0; i<elementArray.length; i++) {
36
- var elm = elementArray[i];
37
- setElementAttribs(elm);
38
- }
39
- }
40
- } else {
41
- setElementAttribs(elm);
42
- }
43
- tinyMCEPopup.editor.nodeChanged();
44
- tinyMCEPopup.execCommand('mceEndUndoLevel');
45
- tinyMCEPopup.close();
46
- }
47
-
48
- function removeIns() {
49
- SXE.removeElement('ins');
50
- tinyMCEPopup.close();
51
- }
52
-
53
- tinyMCEPopup.onInit.add(init);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/xhtmlxtras/langs/de_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('de.xhtmlxtras_dlg',{"attribs_title":"Attribute einf\u00fcgen/bearbeiten","option_rtl":"Rechts nach links","option_ltr":"Links nach rechts","insert_date":"Aktuelle Zeit/Datum einf\u00fcgen",remove:"Entfernen","title_cite_element":"Quellenangabe","title_abbr_element":"Abk\u00fcrzung","title_acronym_element":"Akronym","title_del_element":"Entfernter Text","title_ins_element":"Eingef\u00fcgter Text","fieldset_events_tab":"Ereignisse","fieldset_attrib_tab":"Attribute","fieldset_general_tab":"Allgemeine Einstellungen","events_tab":"Ereignisse","attrib_tab":"Attribute","general_tab":"Allgemein","attribute_attrib_tab":"Attribute","attribute_events_tab":"Ereignisse","attribute_label_accesskey":"Tastenk\u00fcrzel","attribute_label_tabindex":"Tabindex","attribute_label_langcode":"Sprache","attribute_option_rtl":"Rechts nach links","attribute_option_ltr":"Links nach rechts","attribute_label_langdir":"Schriftrichtung","attribute_label_datetime":"Zeit/Datum","attribute_label_cite":"Quellenangabe","attribute_label_style":"Format","attribute_label_class":"Klasse","attribute_label_id":"ID","attribute_label_title":"Titel"});
 
mce/xhtmlxtras/langs/en_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('en.xhtmlxtras_dlg',{"attribs_title":"Insert/Edit Attributes","option_rtl":"Right to Left","option_ltr":"Left to Right","insert_date":"Insert Current Date/Time",remove:"Remove","title_cite_element":"Citation Element","title_abbr_element":"Abbreviation Element","title_acronym_element":"Acronym Element","title_del_element":"Deletion Element","title_ins_element":"Insertion Element","fieldset_events_tab":"Element Events","fieldset_attrib_tab":"Element Attributes","fieldset_general_tab":"General Settings","events_tab":"Events","attrib_tab":"Attributes","general_tab":"General","attribute_attrib_tab":"Attributes","attribute_events_tab":"Events","attribute_label_accesskey":"AccessKey","attribute_label_tabindex":"TabIndex","attribute_label_langcode":"Language","attribute_option_rtl":"Right to Left","attribute_option_ltr":"Left to Right","attribute_label_langdir":"Text Direction","attribute_label_datetime":"Date/Time","attribute_label_cite":"Cite","attribute_label_style":"Style","attribute_label_class":"Class","attribute_label_id":"ID","attribute_label_title":"Title"});
 
mce/xhtmlxtras/langs/es_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('es.xhtmlxtras_dlg',{"attribs_title":"Insertar/Editar atributos","option_rtl":"Derecha a izquierda","option_ltr":"Izquierda a derecha","insert_date":"Insertar fecha/hora actuales",remove:"Suprimir","title_cite_element":"Cita","title_abbr_element":"Abreviatura","title_acronym_element":"Acr\u00f3nimo","title_del_element":"Borrar","title_ins_element":"Insertar","fieldset_events_tab":"Evento","fieldset_attrib_tab":"Atributos","fieldset_general_tab":"Configuraci\u00f3n general","events_tab":"Eventos","attrib_tab":"Atributos","general_tab":"General","attribute_attrib_tab":"Atributos","attribute_events_tab":"Eventos","attribute_label_accesskey":"Tecla de acceso","attribute_label_tabindex":"Orden de tabulaci\u00f3n","attribute_label_langcode":"Lenguaje","attribute_option_rtl":"Derecha a izquierda","attribute_option_ltr":"Izquierda a derecha","attribute_label_langdir":"Direcci\u00f3n de texto","attribute_label_datetime":"Fecha/Hora","attribute_label_cite":"Cita","attribute_label_style":"Estilo","attribute_label_class":"Clase","attribute_label_id":"ID","attribute_label_title":"T\u00edtulo"});
 
mce/xhtmlxtras/langs/fr_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('fr.xhtmlxtras_dlg',{"attribs_title":"Ins\u00e9rer / \u00e9diter les attributs","option_rtl":"De droite \u00e0 gauche","option_ltr":"De gauche \u00e0 droite","insert_date":"Ins\u00e9rer la date et l\'heure actuelles",remove:"Enlever","title_cite_element":"Citation","title_abbr_element":"Abr\u00e9viation","title_acronym_element":"Acronyme","title_del_element":"Suppression","title_ins_element":"Insertion","fieldset_events_tab":"\u00c9v\u00e9nements","fieldset_attrib_tab":"Attributs","fieldset_general_tab":"Param\u00e8tres g\u00e9n\u00e9raux","events_tab":"\u00c9v\u00e9nements","attrib_tab":"Attributs","general_tab":"G\u00e9n\u00e9ral","attribute_attrib_tab":"Attributs","attribute_events_tab":"\u00c9v\u00e8nements","attribute_label_accesskey":"Accesskey","attribute_label_tabindex":"TabIndex","attribute_label_langcode":"Langue","attribute_option_rtl":"De droite \u00e0 gauche","attribute_option_ltr":"De gauche \u00e0 droite","attribute_label_langdir":"Sens de lecture","attribute_label_datetime":"Date / heure","attribute_label_cite":"Citation","attribute_label_style":"Style","attribute_label_class":"Classe","attribute_label_id":"ID","attribute_label_title":"Titre"});
 
mce/xhtmlxtras/langs/it_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('it.xhtmlxtras_dlg',{"attribs_title":"Inserisci/modifica attributi","option_rtl":"Destra verso sinistra","option_ltr":"Sinistra verso destra","insert_date":"Inserisci data/ora corrente",remove:"Rimuovi","title_cite_element":"Citazione elemento","title_abbr_element":"Abbreviazione elemento","title_acronym_element":"Acronimo elemento","title_del_element":"Cancellazione elemento","title_ins_element":"Inserimento elemento","fieldset_events_tab":"Eventi elemento","fieldset_attrib_tab":"Attributi elemento","fieldset_general_tab":"Impostazioni Generali","events_tab":"Eventi","attrib_tab":"Attributi","general_tab":"Generale","attribute_attrib_tab":"Attributi","attribute_events_tab":"Eventi","attribute_label_accesskey":"Tasto di accesso","attribute_label_tabindex":"Indice tabulazione","attribute_label_langcode":"Lingua","attribute_option_rtl":"Destra verso sinistra","attribute_option_ltr":"Sinistra verso destra","attribute_label_langdir":"Direzione del testo","attribute_label_datetime":"Date/Time","attribute_label_cite":"Citazione","attribute_label_style":"Style","attribute_label_class":"Classe","attribute_label_id":"ID","attribute_label_title":"Titolo"});
 
mce/xhtmlxtras/langs/ja_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('ja.xhtmlxtras_dlg',{"attribs_title":"\u5c5e\u6027\u306e\u633f\u5165\u3084\u524a\u9664","option_rtl":"\u53f3\u304b\u3089\u5de6","option_ltr":"\u5de6\u304b\u3089\u53f3","insert_date":"\u73fe\u5728\u306e\u65e5\u4ed8\u3084\u6642\u523b\u3092\u633f\u5165",remove:"\u524a\u9664","title_cite_element":"\u5f15\u7528\u8981\u7d20","title_abbr_element":"\u7565\u8a9e\u8981\u7d20","title_acronym_element":"\u982d\u5b57\u8a9e\u8981\u7d20","title_del_element":"\u8981\u7d20\u3092\u524a\u9664","title_ins_element":"\u8981\u7d20\u3092\u633f\u5165","fieldset_events_tab":"\u8981\u7d20\u306e\u30a4\u30d9\u30f3\u30c8","fieldset_attrib_tab":"\u8981\u7d20\u306e\u5c5e\u6027","fieldset_general_tab":"\u4e00\u822c\u7684\u306a\u8a2d\u5b9a","events_tab":"\u30a4\u30d9\u30f3\u30c8","attrib_tab":"\u5c5e\u6027","general_tab":"\u4e00\u822c","attribute_attrib_tab":"\u5c5e\u6027","attribute_events_tab":"\u30a4\u30d9\u30f3\u30c8","attribute_label_accesskey":"\u30a2\u30af\u30bb\u30b9\u30ad\u30fc","attribute_label_tabindex":"\u30bf\u30d6\u30a4\u30f3\u30c7\u30c3\u30af\u30b9","attribute_label_langcode":"\u8a00\u8a9e","attribute_option_rtl":"\u53f3\u304b\u3089\u5de6","attribute_option_ltr":"\u5de6\u304b\u3089\u53f3","attribute_label_langdir":"\u6587\u7ae0\u306e\u65b9\u5411","attribute_label_datetime":"\u65e5\u4ed8/\u6642\u523b","attribute_label_cite":"\u5f15\u7528","attribute_label_style":"\u30b9\u30bf\u30a4\u30eb","attribute_label_class":"\u30af\u30e9\u30b9","attribute_label_id":"ID","attribute_label_title":"\u30bf\u30a4\u30c8\u30eb"});
 
mce/xhtmlxtras/langs/langs.php DELETED
@@ -1,12 +0,0 @@
1
- <?php
2
- $lang_file = dirname(__FILE__) . '/' . $mce_locale . '_dlg.js';
3
-
4
- if ( ! is_file( $lang_file ) && defined( 'TINYMCE_ADVANCED_LANGUAGES_PATH' ) )
5
- $lang_file = TINYMCE_ADVANCED_LANGUAGES_PATH . 'xhtmlxtras/langs/' . $mce_locale . '_dlg.js';
6
-
7
- if ( is_file( $lang_file ) && is_readable( $lang_file ) ) {
8
- $strings = tdav_get_file( $lang_file );
9
- } else {
10
- $strings = tdav_get_file( dirname(__FILE__) . '/en_dlg.js' );
11
- $strings = preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $strings, 1 );
12
- }
 
 
 
 
 
 
 
 
 
 
 
 
mce/xhtmlxtras/langs/pt_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('pt.xhtmlxtras_dlg',{"attribs_title":"Inserir/editar atributos","option_rtl":"Da direita para a esquerda","option_ltr":"Da esquerda para a direita","insert_date":"Inserir data/hora",remove:"Remover","title_cite_element":"Cita\u00e7\u00e3o","title_abbr_element":"Abrevia\u00e7\u00e3o","title_acronym_element":"Acr\u00f4nimo","title_del_element":"Apagar","title_ins_element":"Inserir","fieldset_events_tab":"Eventos","fieldset_attrib_tab":"Atributos","fieldset_general_tab":"Configura\u00e7\u00f5es gerais","events_tab":"Eventos","attrib_tab":"Atributos","general_tab":"Geral","attribute_attrib_tab":"Atributos","attribute_events_tab":"Eventos","attribute_label_accesskey":"Tecla de Atalho","attribute_label_tabindex":"TabIndex","attribute_label_langcode":"Idioma","attribute_option_rtl":"Da direita para a esquerda","attribute_option_ltr":"Da esquerda para a direita","attribute_label_langdir":"Dire\u00e7\u00e3o do texto","attribute_label_datetime":"Data/Hora","attribute_label_cite":"Citar","attribute_label_style":"Estilo","attribute_label_class":"Classe","attribute_label_id":"ID","attribute_label_title":"T\u00edtulo"});
 
mce/xhtmlxtras/langs/ru_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('ru.xhtmlxtras_dlg',{"attribs_title":"\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430","option_rtl":"\u0421\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0435\u0432\u043e","option_ltr":"\u0421\u043b\u0435\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e","insert_date":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0434\u0430\u0442\u0443/\u0432\u0440\u0435\u043c\u044f",remove:"\u0423\u0434\u0430\u043b\u0438\u0442\u044c","title_cite_element":"\u0426\u0438\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435","title_abbr_element":"\u0421\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0435","title_acronym_element":"\u0410\u0431\u0431\u0440\u0435\u0432\u0438\u0430\u0446\u0438\u044f","title_del_element":"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435","title_ins_element":"\u0417\u0430\u043c\u0435\u043d\u0430","fieldset_events_tab":"\u0421\u043e\u0431\u044b\u0442\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430","fieldset_attrib_tab":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430","fieldset_general_tab":"\u041e\u0431\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b","events_tab":"\u0421\u043e\u0431\u044b\u0442\u0438\u044f","attrib_tab":"\u0410\u0442\u0440\u0438\u0431\u0443\u0442\u044b","general_tab":"\u041e\u0431\u0449\u0435\u0435","attribute_attrib_tab":"\u0410\u0442\u0440\u0438\u0431\u0443\u0442\u044b","attribute_events_tab":"\u0421\u043e\u0431\u044b\u0442\u0438\u044f","attribute_label_accesskey":"\u041a\u043b\u044e\u0447 \u0434\u043e\u0441\u0442\u0443\u043f\u0430","attribute_label_tabindex":"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a","attribute_label_langcode":"\u042f\u0437\u044b\u043a","attribute_option_rtl":"\u0421\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0435\u0432\u043e","attribute_option_ltr":"\u0421\u043b\u0435\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e","attribute_label_langdir":"\u041d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430","attribute_label_datetime":"\u0414\u0430\u0442\u0430/\u0412\u0440\u0435\u043c\u044f","attribute_label_cite":"\u0426\u0438\u0442\u0430\u0442\u0430","attribute_label_style":"\u0421\u0442\u0438\u043b\u044c","attribute_label_class":"\u041a\u043b\u0430\u0441\u0441","attribute_label_id":"\u0418\u043c\u044f","attribute_label_title":"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a"});
 
mce/xhtmlxtras/langs/zh_dlg.js DELETED
@@ -1 +0,0 @@
1
- tinyMCE.addI18n('zh.xhtmlxtras_dlg',{"attribs_title":"\u63d2\u5165/\u7f16\u8f91\u5c5e\u6027","option_rtl":"\u4ece\u53f3\u5230\u5de6","option_ltr":"\u4ece\u5de6\u5230\u53f3","insert_date":"\u63d2\u5165\u5f53\u524d\u65e5\u671f/\u65f6\u95f4",remove:"\u79fb\u9664","title_cite_element":"\u5f15\u7528\u5143\u7d20","title_abbr_element":"\u7f29\u5199\u5143\u7d20","title_acronym_element":"\u9996\u5b57\u6bcd\u7f29\u5199\u5143\u7d20","title_del_element":"\u5220\u9664\u5143\u7d20","title_ins_element":"\u63d2\u5165\u5143\u7d20","fieldset_events_tab":"\u5143\u7d20\u4e8b\u4ef6","fieldset_attrib_tab":"\u5143\u7d20\u5c5e\u6027","fieldset_general_tab":"\u666e\u901a\u8bbe\u7f6e","events_tab":"Javascript\u4e8b\u4ef6","attrib_tab":"\u5c5e\u6027","general_tab":"\u666e\u901a","attribute_attrib_tab":"\u5c5e\u6027","attribute_events_tab":"Javascript\u4e8b\u4ef6","attribute_label_accesskey":"\u5feb\u6377\u952e","attribute_label_tabindex":"Tab\u7d22\u5f15","attribute_label_langcode":"\u8bed\u8a00","attribute_option_rtl":"\u4ece\u53f3\u5230\u5de6","attribute_option_ltr":"\u4ece\u5de6\u5230\u53f3","attribute_label_langdir":"\u6587\u5b57\u4e66\u5199\u65b9\u5411","attribute_label_datetime":"\u65e5\u671f/\u65f6\u95f4","attribute_label_cite":"\u5f15\u7528","attribute_label_style":"\u6837\u5f0f","attribute_label_class":"\u7c7b","attribute_label_id":"ID","attribute_label_title":"\u6807\u9898"});
 
readme.txt CHANGED
@@ -2,27 +2,26 @@
2
  Contributors: azaozz
3
  Tags: wysiwyg, formatting, tinymce, write, editor
4
  License: GPL v2
5
- Requires at least: 3.7
6
- Tested up to: 3.8
7
- Stable tag: 3.5.9
8
 
9
  Enables the advanced features of TinyMCE, the WordPress WYSIWYG editor.
10
 
11
  == Description ==
12
 
13
  This plugin will let you add, remove and arrange the buttons that are shown on the Visual Editor toolbar.
14
- It includes 16 plugins for [TinyMCE](http://tinymce.com/) that are automatically enabled or disabled depending on what buttons are chosen.
15
 
16
  = Some of the features added by this plugin =
17
 
18
  * Support for creating and editing tables.
19
  * More options when inserting lists.
20
  * Search and Replace in the editor.
21
- * Editing in-line css styles.
22
- * Advanced image dialog that offer a lot of options.
23
- * Adding and removing HTML tag attributes.
24
 
25
- Included TinyMCE plugins: Advanced HR, Advanced Image, Advanced Link, Advanced List, Context Menu, Emotions (Smilies), Date and Time, IESpell, Layer, Nonbreaking, Print, Search and Replace, Style, Table, Visual Characters and XHTML Extras.
26
 
27
  = Language Support =
28
 
@@ -37,6 +36,9 @@ Best is to install directly from WordPress. If manual installation is required,
37
 
38
  == Changelog ==
39
 
 
 
 
40
  = 3.5.9.1 =
41
  Updated for WordPress 3.8, fixed auto-embedding of single line URLs when not removing paragraph tags.
42
 
@@ -99,7 +101,7 @@ Includes an admin page for arranging the TinyMCE toolbar buttons, easy installat
99
 
100
  == Frequently Asked Questions ==
101
 
102
- = No styles are imported in the Styles drop-down menu. =
103
 
104
  These styles are imported from your current theme editor-style.css file. However some themes do not have this functionality. For these themes TinyMCE Advanced has the option to let you add a customized editor-style.css and import it into the editor.
105
 
@@ -109,7 +111,7 @@ Log out of WordPress, clear your browser cache, quit and restart the browser and
109
 
110
  = When I add "Smilies", they do not show in the editor. =
111
 
112
- The "Emotions" button in TinyMCE adds the codes for the smilies. The actual images are added by WordPress when viewing the Post. Make sure the checkbox "Convert emoticons to graphics on display" in "Options - Writing" is checked.
113
 
114
  = The plugin does not add any buttons. =
115
 
@@ -117,7 +119,7 @@ Make sure the "Disable the visual editor when writing" checkbox under "Users - Y
117
 
118
  = I still see the "old" buttons in the editor =
119
 
120
- Click the "Remove Settings" button on the plugin settings page and then set the buttons again and save.
121
 
122
  = Other questions? More screenshots? =
123
 
@@ -126,4 +128,5 @@ Please post on the support forum or visit the homepage for [TinyMCE Advanced](ht
126
 
127
  == Screenshots ==
128
 
129
- 1. The TinyMCE Advanced options page
 
2
  Contributors: azaozz
3
  Tags: wysiwyg, formatting, tinymce, write, editor
4
  License: GPL v2
5
+ Requires at least: 3.9
6
+ Tested up to: 3.9
7
+ Stable tag: 4.0
8
 
9
  Enables the advanced features of TinyMCE, the WordPress WYSIWYG editor.
10
 
11
  == Description ==
12
 
13
  This plugin will let you add, remove and arrange the buttons that are shown on the Visual Editor toolbar.
14
+ It includes 14 plugins for [TinyMCE](http://tinymce.com/) that are automatically enabled or disabled depending on what buttons are chosen.
15
 
16
  = Some of the features added by this plugin =
17
 
18
  * Support for creating and editing tables.
19
  * More options when inserting lists.
20
  * Search and Replace in the editor.
21
+ * Abitity to set Font Family and Font Size.
22
+ * And many others.
 
23
 
24
+ With this plugin you will also be able to enable the TinyMCE menu. It is a convenient way to access a lot of features that are not used frequently.
25
 
26
  = Language Support =
27
 
36
 
37
  == Changelog ==
38
 
39
+ = 4.0 =
40
+ Updated for WordPress 3.9 and TinyMCE 4.0. Refreshed the settings screen. Added support for exporting and importing of the settings.
41
+
42
  = 3.5.9.1 =
43
  Updated for WordPress 3.8, fixed auto-embedding of single line URLs when not removing paragraph tags.
44
 
101
 
102
  == Frequently Asked Questions ==
103
 
104
+ = No styles are imported in the Formats sub-menu. =
105
 
106
  These styles are imported from your current theme editor-style.css file. However some themes do not have this functionality. For these themes TinyMCE Advanced has the option to let you add a customized editor-style.css and import it into the editor.
107
 
111
 
112
  = When I add "Smilies", they do not show in the editor. =
113
 
114
+ The "Emoticons" button in TinyMCE adds the codes for the smilies. The actual images are added by WordPress when viewing the Post. Make sure the checkbox "Convert emoticons to graphics on display" in "Options - Writing" is checked.
115
 
116
  = The plugin does not add any buttons. =
117
 
119
 
120
  = I still see the "old" buttons in the editor =
121
 
122
+ Click the "Restore Default Settings" button on the plugin settings page and then set the buttons again and save.
123
 
124
  = Other questions? More screenshots? =
125
 
128
 
129
  == Screenshots ==
130
 
131
+ 1. The WordPress editor after installing this plugin (default plugin settings).
132
+ 2. The TinyMCE Advanced settings page.
screenshot-1.png CHANGED
Binary file
screenshot-2.png ADDED
Binary file
tadv_admin.php CHANGED
@@ -1,33 +1,34 @@
1
  <?php
2
 
3
- if ( !defined('TADV_ADMIN_PAGE') || !current_user_can('manage_options') )
 
 
 
 
 
4
  wp_die('Access denied');
 
5
 
 
 
 
6
  if ( isset( $_POST['tadv_uninstall'] ) ) {
7
  check_admin_referer( 'tadv-uninstall' );
8
-
9
- delete_option('tadv_options');
10
- delete_option('tadv_toolbars');
11
- delete_option('tadv_plugins');
12
- delete_option('tadv_btns1');
13
- delete_option('tadv_btns2');
14
- delete_option('tadv_btns3');
15
- delete_option('tadv_btns4');
16
- delete_option('tadv_allbtns');
17
 
18
  ?>
19
  <div class="updated" style="margin-top:30px;">
20
- <p><?php _e('All options have been removed from the database. You can', 'tadv'); ?> <a href="plugins.php"><?php _e('deactivate TinyMCE Advanced', 'tadv'); ?></a> <?php _e('or', 'tadv'); ?> <a href=""> <?php _e('reload this page', 'tadv'); ?></a> <?php _e('to reset them to the default values.', 'tadv'); ?></p>
21
  </div>
22
  <?php
23
 
24
  return;
25
  }
26
 
27
- if ( ! isset( $GLOBALS['wp_version'] ) || version_compare( $GLOBALS['wp_version'], '3.6', '<' ) ) {
28
  ?>
29
  <div class="error" style="margin-top:30px;">
30
- <p><?php _e('This plugin requires WordPress version 3.6 or newer. Please upgrade your WordPress installation or download an', 'tadv'); ?> <a href="http://wordpress.org/extend/plugins/tinymce-advanced/download/"><?php _e('older version of the plugin.', 'tadv'); ?></a></p>
31
  </div>
32
  <?php
33
 
@@ -35,438 +36,381 @@ if ( ! isset( $GLOBALS['wp_version'] ) || version_compare( $GLOBALS['wp_version'
35
  }
36
 
37
  $imgpath = TADV_URL . 'images/';
38
- $tadv_toolbars = get_option('tadv_toolbars');
39
-
40
- function _tadv_parse_buttons($row) {
41
- $arr = array();
42
-
43
- if ( !empty($_POST['toolbar_' . $row . 'order']) ) {
44
- parse_str($_POST['toolbar_' . $row . 'order'], $arr);
45
-
46
- if ( !empty($arr['pre']) && is_array($arr['pre']) )
47
- $arr = $arr['pre'];
48
- }
49
-
50
- return $arr;
51
- }
52
-
53
- if ( empty($tadv_toolbars) || ! is_array($tadv_toolbars) ) {
54
- @include_once( TADV_PATH . 'tadv_defaults.php');
55
- } else {
56
- $tadv_options = get_option('tadv_options');
57
- $tadv_toolbars['toolbar_1'] = isset($tadv_toolbars['toolbar_1']) && is_array($tadv_toolbars['toolbar_1']) ? $tadv_toolbars['toolbar_1'] : array();
58
- $tadv_toolbars['toolbar_2'] = isset($tadv_toolbars['toolbar_2']) && is_array($tadv_toolbars['toolbar_2']) ? $tadv_toolbars['toolbar_2'] : array();
59
- $tadv_toolbars['toolbar_3'] = isset($tadv_toolbars['toolbar_3']) && is_array($tadv_toolbars['toolbar_3']) ? $tadv_toolbars['toolbar_3'] : array();
60
- $tadv_toolbars['toolbar_4'] = isset($tadv_toolbars['toolbar_4']) && is_array($tadv_toolbars['toolbar_4']) ? $tadv_toolbars['toolbar_4'] : array();
61
- }
62
 
63
  if ( isset( $_POST['tadv-save'] ) ) {
64
  check_admin_referer( 'tadv-save-buttons-order' );
65
-
66
- $tadv_toolbars['toolbar_1'] = _tadv_parse_buttons(1);
67
- $tadv_toolbars['toolbar_2'] = _tadv_parse_buttons(2);
68
- $tadv_toolbars['toolbar_3'] = _tadv_parse_buttons(3);
69
- $tadv_toolbars['toolbar_4'] = _tadv_parse_buttons(4);
70
-
71
- $tadv_options['advlink1'] = !empty($_POST['advlink1']) ? 1 : 0;
72
- $tadv_options['advimage'] = !empty($_POST['advimage']) ? 1 : 0;
73
- $tadv_options['advlist'] = !empty($_POST['advlist']) ? 1 : 0;
74
- $tadv_options['contextmenu'] = !empty($_POST['contextmenu']) ? 1 : 0;
75
-
76
- $tadv_options['editorstyle'] = !empty($_POST['editorstyle']) ? 1 : 0;
77
- $tadv_options['hideclasses'] = !empty($_POST['hideclasses']) ? 1 : 0;
78
- $tadv_options['no_autop'] = !empty($_POST['no_autop']) ? 1 : 0;
79
-
80
- update_option( 'tadv_toolbars', $tadv_toolbars );
81
- update_option( 'tadv_options', $tadv_options );
82
- }
83
-
84
- $btns = array();
85
- $hidden_row = 0;
86
- $i = 0;
87
- foreach ( $tadv_toolbars as $toolbar ) {
88
- $l = $t = false;
89
- $i++;
90
-
91
- if ( empty($toolbar) ) {
92
- $btns["toolbar_$i"] = array();
93
- continue;
94
  }
95
 
96
- foreach( $toolbar as $k => $v ) {
97
- if ( strpos($v, 'separator') !== false )
98
- $toolbar[$k] = 'separator';
99
-
100
- if ( 'layer' == $v )
101
- $l = $k;
102
 
103
- if ( 'tablecontrols' == $v )
104
- $t = $k;
105
-
106
- if ( empty($v) )
107
- unset($toolbar[$k]);
108
  }
109
 
110
- if ( $l !== false )
111
- array_splice( $toolbar, $l, 1, array('insertlayer', 'moveforward', 'movebackward', 'absolute') );
 
 
112
 
113
- if ( $t !== false )
114
- array_splice( $toolbar, $t + 1, 0, 'delete_table,' );
 
 
115
 
116
- $btns["toolbar_$i"] = $toolbar;
117
- }
118
- extract($btns);
119
 
120
- if ( empty($toolbar_1) && empty($toolbar_2) && empty($toolbar_3) && empty($toolbar_4) ) {
121
- ?><div class="error" id="message"><p><?php _e('All toolbars are empty! Default buttons loaded.', 'tadv'); ?></p></div><?php
 
122
 
123
- @include_once( TADV_PATH . 'tadv_defaults.php' );
124
- $used_buttons = array_merge( $tadv_btns1, $tadv_btns2, $tadv_btns3, $tadv_btns4 );
125
- } else {
126
- $used_buttons = array_merge( $toolbar_1, $toolbar_2, $toolbar_3, $toolbar_4 );
127
- }
 
 
128
 
129
- if ( in_array('advhr', $used_buttons, true) )
130
- $plugins[] = 'advhr';
 
131
 
132
- if ( in_array('insertlayer', $used_buttons, true) )
133
- $plugins[] = 'layer';
134
 
135
- if ( in_array('visualchars', $used_buttons, true) )
136
- $plugins[] = 'visualchars';
 
 
 
137
 
138
- if ( in_array('nonbreaking', $used_buttons, true) )
139
- $plugins[] = 'nonbreaking';
 
140
 
141
- if ( in_array('styleprops', $used_buttons, true) )
142
- $plugins[] = 'style';
143
 
144
- if ( in_array('emotions', $used_buttons, true) )
145
- $plugins[] = 'emotions';
 
 
146
 
147
- if ( in_array('insertdate', $used_buttons, true) || in_array('inserttime', $used_buttons, true) )
148
- $plugins[] = 'insertdatetime';
 
149
 
150
- if ( in_array('tablecontrols', $used_buttons, true) )
151
- $plugins[] = 'table';
 
 
 
 
152
 
153
- if ( in_array('print', $used_buttons, true) )
154
- $plugins[] = 'print';
 
155
 
156
- if ( in_array('iespell', $used_buttons, true) )
157
- $plugins[] = 'iespell';
 
158
 
159
- if ( in_array('search', $used_buttons, true) || in_array('replace', $used_buttons, true) )
160
- $plugins[] = 'searchreplace';
 
161
 
162
- if ( in_array('cite', $used_buttons, true) || in_array('ins', $used_buttons, true) ||
163
- in_array('del', $used_buttons, true) || in_array('abbr', $used_buttons, true) ||
164
- in_array('acronym', $used_buttons, true) || in_array('attribs', $used_buttons, true) )
165
- $plugins[] = 'xhtmlxtras';
166
 
167
- if ( !empty($tadv_options['advlink1']) )
168
- $plugins[] = 'advlink';
 
 
 
 
 
 
169
 
170
- if ( !empty($tadv_options['advlist']) )
171
- $plugins[] = 'advlist';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
172
 
173
- if ( !empty($tadv_options['advimage']) )
174
- $plugins[] = 'advimage';
 
 
 
 
 
 
 
 
 
 
 
 
 
175
 
176
- if ( !empty($tadv_options['contextmenu']) )
177
- $plugins[] = 'contextmenu';
 
 
 
 
178
 
179
- $buttons = array( 'Horizontal rule' => 'hr', 'Hide next row' => 'wp_adv', 'Quote' => 'blockquote', 'Bold' => 'bold', 'Italic' => 'italic', 'Strikethrough' => 'strikethrough', 'Underline' => 'underline', 'Bullet List' => 'bullist', 'Numbered List' => 'numlist', 'Outdent' => 'outdent', 'Indent' => 'indent', 'Allign Left' => 'justifyleft', 'Center' => 'justifycenter', 'Alligh Right' => 'justifyright', 'Justify' => 'justifyfull', 'Cut' => 'cut', 'Copy' => 'copy', 'Paste' => 'paste', 'Link' => 'link', 'Remove Link' => 'unlink', 'Insert Image' => 'image', 'More Tag' => 'wp_more', 'Split Page' => 'wp_page', 'Search' => 'search', 'Replace' => 'replace', '<!--fontselect-->' => 'fontselect', '<!--fontsizeselect-->' => 'fontsizeselect', 'Help' => 'wp_help', 'Full Screen' => 'fullscreen', '<!--styleselect-->' => 'styleselect', '<!--formatselect-->' => 'formatselect', 'Text Color' => 'forecolor', 'Back Color' => 'backcolor', 'Paste as Text' => 'pastetext', 'Paste from Word' => 'pasteword', 'Remove Format' => 'removeformat', 'Clean Code' => 'cleanup', 'Check Spelling' => 'spellchecker', 'Character Map' => 'charmap', 'Print' => 'print', 'Undo' => 'undo', 'Redo' => 'redo', 'Table' => 'tablecontrols', 'Citation' => 'cite', 'Inserted Text' => 'ins', 'Deleted Text' => 'del', 'Abbreviation' => 'abbr', 'Acronym' => 'acronym', 'XHTML Attribs' => 'attribs', 'Layer' => 'layer', 'Advanced HR' => 'advhr', 'View HTML' => 'code', 'Hidden Chars' => 'visualchars', 'NB Space' => 'nonbreaking', 'Sub' => 'sub', 'Sup' => 'sup', 'Visual Aids' => 'visualaid', 'Insert Date' => 'insertdate', 'Insert Time' => 'inserttime', 'Anchor' => 'anchor', 'Style' => 'styleprops', 'Smilies' => 'emotions', 'Insert Movie' => 'media', 'IE Spell' => 'iespell' );
180
 
181
- if ( function_exists('moxiecode_plugins_url') ) {
182
- if ( moxiecode_plugins_url('imagemanager') )
183
- $buttons['MCFileManager'] = 'insertimage';
184
 
185
- if ( moxiecode_plugins_url('filemanager') )
186
- $buttons['MCImageManager'] = 'insertfile';
 
187
  }
188
 
189
- $tadv_allbtns = array_values($buttons);
190
- $tadv_allbtns[] = 'separator';
191
- $tadv_allbtns[] = '|';
192
-
193
- if ( isset($_POST['tadv-save']) ) {
194
- update_option( 'tadv_plugins', $plugins );
195
- update_option( 'tadv_btns1', $toolbar_1 );
196
- update_option( 'tadv_btns2', $toolbar_2 );
197
- update_option( 'tadv_btns3', $toolbar_3 );
198
- update_option( 'tadv_btns4', $toolbar_4 );
199
- update_option( 'tadv_allbtns', $tadv_allbtns );
200
- ?>
201
- <div class="updated" id="message"><p><?php _e('Options saved', 'tadv'); ?></p></div>
202
- <?php } ?>
203
 
 
204
  <div class="wrap" id="contain">
205
- <h2><?php _e('TinyMCE Buttons Arrangement', 'tadv'); ?></h2>
206
- <form id="tadvadmin" method="post" action="" onsubmit="">
207
- <p><?php _e('Drag and drop buttons onto the toolbars below.', 'tadv'); ?></p>
208
-
209
- <div id="tadvzones">
210
- <input id="toolbar_1order" name="toolbar_1order" value="" type="hidden" />
211
- <input id="toolbar_2order" name="toolbar_2order" value="" type="hidden" />
212
- <input id="toolbar_3order" name="toolbar_3order" value="" type="hidden" />
213
- <input id="toolbar_4order" name="toolbar_4order" value="" type="hidden" />
214
- <input name="tadv-save" value="1" type="hidden" />
215
-
216
- <div class="tadvdropzone">
217
- <ul style="position: relative;" id="toolbar_1" class="container">
218
  <?php
219
 
220
- if ( is_array($tadv_toolbars['toolbar_1']) ) {
221
- $tb1 = array();
222
-
223
- foreach( $tadv_toolbars['toolbar_1'] as $k ) {
224
- $t = array_intersect( $buttons, (array) $k );
225
- $tb1 += $t;
226
- }
227
-
228
- foreach( $tb1 as $name => $btn ) {
229
- if ( strpos( $btn, 'separator' ) !== false )
230
- continue;
231
-
232
- ?>
233
- <li class="tadvmodule" id="pre_<?php echo $btn; ?>">
234
- <div class="tadvitem"><div id="<?php echo $btn; ?>" title="<?php echo $name; ?>"></div>
235
- <span class="descr"> <?php echo $name; ?></span>
236
- </div></li>
237
- <?php
238
- }
239
-
240
- $buttons = array_diff( $buttons, $tb1 );
241
  }
242
 
243
  ?>
244
- </ul></div>
245
- <br class="clear" />
246
-
247
- <div class="tadvdropzone">
248
- <ul style="position: relative;" id="toolbar_2" class="container">
249
- <?php
250
-
251
- if ( is_array($tadv_toolbars['toolbar_2']) ) {
252
- $tb2 = array();
253
-
254
- foreach( $tadv_toolbars['toolbar_2'] as $k ) {
255
- $t = array_intersect( $buttons, (array) $k );
256
- $tb2 = $tb2 + $t;
257
- }
258
-
259
- foreach( $tb2 as $name => $btn ) {
260
- if ( strpos( $btn, 'separator' ) !== false )
261
- continue;
262
 
263
- ?>
264
- <li class="tadvmodule" id="pre_<?php echo $btn; ?>">
265
- <div class="tadvitem"><div id="<?php echo $btn; ?>" title="<?php echo $name; ?>"></div>
266
- <span class="descr"> <?php echo $name; ?></span></div></li>
267
- <?php
268
- }
269
 
270
- $buttons = array_diff( $buttons, $tb2 );
271
- }
 
 
272
 
273
- ?>
274
- </ul></div>
275
- <br class="clear" />
276
 
277
- <div class="tadvdropzone">
278
- <ul style="position: relative;" id="toolbar_3" class="container">
279
  <?php
280
 
281
- if ( is_array($tadv_toolbars['toolbar_3']) ) {
282
- $tb3 = array();
283
 
284
- foreach( $tadv_toolbars['toolbar_3'] as $k ) {
285
- $t = array_intersect( $buttons, (array) $k );
286
- $tb3 += $t;
287
- }
288
-
289
- foreach( $tb3 as $name => $btn ) {
290
- if ( strpos( $btn, 'separator' ) !== false )
291
  continue;
292
-
293
- ?>
294
- <li class="tadvmodule" id="pre_<?php echo $btn; ?>">
295
- <div class="tadvitem"><div id="<?php echo $btn; ?>" title="<?php echo $name; ?>"></div>
296
- <span class="descr"> <?php echo $name; ?></span></div></li>
297
- <?php
298
- }
299
-
300
- $buttons = array_diff( $buttons, $tb3 );
301
- }
302
 
303
- ?>
304
- </ul></div>
305
- <br class="clear" />
306
-
307
- <div class="tadvdropzone">
308
- <ul style="position: relative;" id="toolbar_4" class="container">
309
- <?php
310
-
311
- if ( is_array($tadv_toolbars['toolbar_4']) ) {
312
- $tb4 = array();
313
 
314
- foreach( $tadv_toolbars['toolbar_4'] as $k ) {
315
- $t = array_intersect( $buttons, (array) $k );
316
- $tb4 += $t;
317
- }
318
 
319
- foreach( $tb4 as $name => $btn ) {
320
- if ( strpos( $btn, 'separator' ) !== false )
321
- continue;
322
-
323
  ?>
324
- <li class="tadvmodule" id="pre_<?php echo $btn; ?>">
325
- <div class="tadvitem"><div id="<?php echo $btn; ?>" title="<?php echo $name; ?>"></div>
326
- <span class="descr"> <?php echo $name; ?></span></div></li>
 
 
 
 
327
  <?php
 
328
  }
329
 
330
- $buttons = array_diff( $buttons, $tb4 );
 
 
331
  }
332
 
333
  ?>
334
- </ul></div>
335
- <br class="clear" />
336
  </div>
337
 
338
- <div id="tadvWarnmsg">&nbsp;
339
- <span id="too_long" style="display:none;"><?php _e('Adding too many buttons will make the toolbar too long and will not display correctly in TinyMCE!', 'tadv'); ?></span>
 
 
340
  </div>
341
-
342
- <div id="tadvpalettediv">
343
- <ul style="position: relative;" id="tadvpalette">
344
  <?php
345
 
346
- if ( is_array($buttons) ) {
347
- foreach( $buttons as $name => $btn ) {
348
- if ( strpos( $btn, 'separator' ) !== false )
349
- continue;
350
-
351
- ?>
352
- <li class="tadvmodule" id="pre_<?php echo $btn; ?>">
353
- <div class="tadvitem"><div id="<?php echo $btn; ?>" title="<?php echo $name; ?>"></div>
354
- <span class="descr"> <?php echo $name; ?></span></div></li>
355
- <?php
356
- }
 
 
 
 
 
 
357
  }
358
 
359
  ?>
360
  </ul>
361
  </div>
362
 
363
- <table class="clear" style="margin:10px 0">
364
- <tr><td style="padding:2px 12px 8px;">
365
- <?php _e('Also enable:', 'tadv'); ?>
366
-
367
- <label for="advimage" class="tadv-box">
368
- <input type="checkbox" class="tadv-chk" name="advimage" id="advimage" <?php if ( !empty($tadv_options['advimage']) ) echo ' checked="checked"'; ?> />
369
- <?php _e('Advanced Image', 'tadv'); ?>
370
- </label>
371
-
372
- <label for="advlist" class="tadv-box">
373
- <input type="checkbox" class="tadv-chk" name="advlist" id="advlist" <?php if ( !empty($tadv_options['advlist']) ) echo ' checked="checked"'; ?> />
374
- <?php _e('Advanced List Options', 'tadv'); ?>
375
  </label>
376
 
377
- <label for="contextmenu" class="tadv-box">
378
- <input type="checkbox" class="tadv-chk" name="contextmenu" id="contextmenu" <?php if ( !empty($tadv_options['contextmenu']) ) echo ' checked="checked"'; ?> />
379
  <?php _e('Context Menu', 'tadv'); ?>
380
  </label>
381
- </td></tr>
 
382
  <?php
383
 
384
- $mce_locale = get_locale();
385
- $mce_locale = empty( $mce_locale ) ? 'en' : strtolower( substr( $mce_locale, 0, 2 ) );
386
 
387
- if ( $mce_locale != 'en' && ! @file_exists( TADV_PATH . 'mce/advlink/langs/' . $mce_locale . '_dlg.js' ) ) {
388
- if ( in_array( $mce_locale, array( 'ar', 'be', 'nb', 'bg', 'ca', 'cn', 'cs', 'da', 'nl', 'fa', 'fi', 'gl', 'el', 'he', 'hi', 'hu', 'id', 'km', 'ko', 'lv', 'lt', 'mk', 'no', 'pl', 'ro', 'sk', 'sl', 'sv', 'tr', 'uk', 'cy' ), true ) ) {
 
 
 
 
 
389
  ?>
390
- <tr><td style="padding:2px 12px 8px;">
391
- <p><b><?php _e('Language Options'); ?></b></p>
392
- <p>
393
- <?php
394
-
395
- printf( __('Your WordPress language is set to <b>%1$s</b>, however there is no matching language installed for the TinyMCE components added from this plugin. You can install the <a href="%2$s">TnyMCE Advanced Language Pack</a> plugin to add it.', 'tadv'), esc_html( get_locale() ), esc_url('http://wordpress.org/plugins/tinymce-advanced-language-pack/') );
396
-
397
- ?>
398
- </p>
399
- </td></tr>
400
  <?php
401
  }
402
- } // end mce_locale
403
-
404
- ?>
405
- <tr><td style="border:1px solid #CD0000;padding:2px 12px 8px;">
406
- <p style="font-weight:bold;color:#CD0000;"><?php _e('Advanced Options', 'tadv'); ?></p>
407
 
 
408
  <p>
409
- <label for="advlink1" class="tadv-box">
410
- <input type="checkbox" class="tadv-chk" name="advlink1" id="advlink1" <?php if ( !empty($tadv_options['advlink1']) ) echo ' checked="checked"'; ?> />
411
- <?php _e('Advanced Link', 'tadv'); ?>
412
- </label>
413
- <?php _e('Enabling this TinyMCE plugin will overwrite the internal links feature in WordPress 3.1 and newer. Cuttently there is no way to enable both of them at the same time.', 'tadv'); ?>
414
  </p>
415
-
416
- <?php
417
 
418
- if ( ! current_theme_supports( 'editor-style' ) ) {
419
-
420
- ?>
421
  <p>
422
- <?php _e('It seems your theme (still) doesn\'t support customised styles for the editor. If you would like to use that, you can create a file named <i>editor-style.css</i> and add it to your theme\'s directory. You can use the editor-style.css from the Twenty Ten theme as a template.', 'tadv'); ?>
 
 
 
 
 
 
 
423
  </p>
424
 
425
  <p>
426
- <label for="editorstyle" class="tadv-box"><input type="checkbox" class="tadv-chk" name="editorstyle" id="editorstyle" <?php if ( !empty($tadv_options['editorstyle']) ) echo ' checked="checked"'; ?> />
427
- <?php _e('Import editor-style.css.', 'tadv'); ?>
428
- </label>
429
- <?php _e('This is only needed if you created that file. Themes that style the editor will import the stylesheet automatically.', 'tadv'); ?>
430
  </p>
 
431
  <?php
432
- }
433
 
 
434
  ?>
435
- <p>
436
- <label for="hideclasses" class="tadv-box">
437
- <input type="checkbox" class="tadv-chk" name="hideclasses" id="hideclasses" <?php if ( !empty($tadv_options['hideclasses']) ) echo ' checked="checked"'; ?> />
438
- <?php _e('Hide all CSS classes in the editor menus.', 'tadv'); ?>
439
- </label>
440
- <?php _e('Note that selecting this will also disable the Styles drop-down menu.', 'tadv'); ?>
441
- </p>
442
 
443
- <p>
444
- <label for="no_autop" class="tadv-box">
445
- <input type="checkbox" class="tadv-chk" name="no_autop" id="no_autop" <?php if ( !empty($tadv_options['no_autop']) ) echo ' checked="checked"'; ?> />
446
- <?php _e('Stop removing the &lt;p&gt; and &lt;br /&gt; tags when saving and show them in the HTML editor', 'tadv'); ?>
447
- </label>
448
- <?php _e('This will make it possible to use more advanced coding in the HTML editor without the back-end filtering affecting it much. However it may behave unexpectedly in rare cases, so test it thoroughly before enabling it permanently. Also line breaks in the HTML editor would still affect the output, in particular do not use empty lines, line breaks inside HTML tags or multiple &lt;br /&gt; tags.', 'tadv'); ?>
449
- </p>
450
- </td></tr>
451
- </table>
452
-
453
- <p>
454
  <?php wp_nonce_field( 'tadv-save-buttons-order' ); ?>
455
- <input class="button tadv_btn" type="button" class="tadv_btn" value="<?php _e('Remove Settings', 'tadv'); ?>" onclick="document.getElementById('tadv_uninst_div').style.display = 'block';" />
456
- <input class="button-primary tadv_btn" type="button" value="<?php _e('Save Changes', 'tadv'); ?>" onclick="tadvSortable.serialize();" />
457
  </p>
458
  </form>
459
 
460
- <div id="tadvWarnmsg2">&nbsp;
461
- <span id="sink_err" style="display:none;"><?php _e('The Kitchen Sink button shows/hides the next toolbar row. It will not work at the current place.', 'tadv'); ?></span>
462
  </div>
463
 
464
- <div id="tadv_uninst_div" style="">
465
  <form method="post" action="">
466
  <?php wp_nonce_field('tadv-uninstall'); ?>
467
- <div><?php _e('Remove all saved settings from the database?', 'tadv'); ?>
468
- <input class="button tadv_btn" type="button" name="cancel" value="<?php _e('Cancel', 'tadv'); ?>" onclick="document.getElementById('tadv_uninst_div').style.display = 'none';" style="margin-left:20px" />
469
- <input class="button tadv_btn" type="submit" name="tadv_uninstall" value="<?php _e('Continue', 'tadv'); ?>" /></div>
 
470
  </form>
471
  </div>
472
  </div>
1
  <?php
2
 
3
+ if ( ! defined( 'TADV_ADMIN_PAGE' ) ) {
4
+ exit;
5
+ }
6
+
7
+ // TODO
8
+ if ( ! current_user_can( 'manage_options' ) ) {
9
  wp_die('Access denied');
10
+ }
11
 
12
+ $message = '';
13
+
14
+ // TODO admin || SA
15
  if ( isset( $_POST['tadv_uninstall'] ) ) {
16
  check_admin_referer( 'tadv-uninstall' );
17
+ $this->remove_settings(true);
 
 
 
 
 
 
 
 
18
 
19
  ?>
20
  <div class="updated" style="margin-top:30px;">
21
+ <p><?php _e( 'All options have been removed from the database. You can', 'tadv'); ?> <a href="plugins.php"><?php _e('deactivate TinyMCE Advanced', 'tadv'); ?></a> <?php _e('or', 'tadv'); ?> <a href=""> <?php _e('reload this page', 'tadv'); ?></a> <?php _e('to reset them to the default values.', 'tadv'); ?></p>
22
  </div>
23
  <?php
24
 
25
  return;
26
  }
27
 
28
+ if ( ! $this->check_minimum_supported_version() ) {
29
  ?>
30
  <div class="error" style="margin-top:30px;">
31
+ <p><?php _e( 'This plugin requires WordPress version 3.9 or newer. Please upgrade your WordPress installation or download an', 'tadv'); ?> <a href="http://wordpress.org/extend/plugins/tinymce-advanced/download/"><?php _e('older version of the plugin.', 'tadv'); ?></a></p>
32
  </div>
33
  <?php
34
 
36
  }
37
 
38
  $imgpath = TADV_URL . 'images/';
39
+ $tadv_options_updated = false;
40
+ $settings = $admin_settings = array();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
 
42
  if ( isset( $_POST['tadv-save'] ) ) {
43
  check_admin_referer( 'tadv-save-buttons-order' );
44
+ $options_array = $admin_settings_array = $disabled_plugins = $plugins_array = array();
45
+
46
+ // User settings
47
+ for ( $i = 1; $i < 5; $i++ ) {
48
+ $buttons = $this->parse_buttons( 'tb' . $i );
49
+ // Layer plugin buttons??
50
+ $buttons = str_replace( 'insertlayer', 'insertlayer,moveforward,movebackward,absolute', $buttons );
51
+ $settings['toolbar_' . $i] = $buttons;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  }
53
 
54
+ if ( ! empty( $_POST['advlist'] ) ) {
55
+ $options_array[] = 'advlist';
56
+ }
 
 
 
57
 
58
+ if ( ! empty( $_POST['contextmenu'] ) ) {
59
+ $options_array[] = 'contextmenu';
 
 
 
60
  }
61
 
62
+ if ( ! empty( $_POST['menubar'] ) ) {
63
+ $options_array[] = 'menubar';
64
+ $plugins_array = array( 'anchor', 'code', 'insertdatetime', 'nonbreaking', 'print', 'searchreplace', 'table', 'visualblocks', 'visualchars' );
65
+ }
66
 
67
+ // Admin settings, TODO
68
+ if ( ! empty( $_POST['importcss'] ) ) {
69
+ $admin_settings_array[] = 'importcss';
70
+ }
71
 
72
+ if ( ! empty( $_POST['no_autop'] ) ) {
73
+ $admin_settings_array[] = 'no_autop';
74
+ }
75
 
76
+ if ( ! empty( $_POST['editorstyle'] ) ) {
77
+ $admin_settings_array[] = 'editorstyle';
78
+ }
79
 
80
+ if ( ! empty( $_POST['disabled_plugins'] ) && is_array( $_POST['disabled_plugins'] ) ) {
81
+ foreach( $_POST['disabled_plugins'] as $plugin ) {
82
+ if ( in_array( $this->all_plugins, $plugin, true ) ) {
83
+ $disabled_plugins[] = $plugin;
84
+ }
85
+ }
86
+ }
87
 
88
+ // Admin options
89
+ $admin_settings['options'] = implode( ',', $admin_settings_array );
90
+ $admin_settings['disabled_plugins'] = implode( ',', $disabled_plugins );
91
 
92
+ $this->admin_settings = $admin_settings;
93
+ update_option( 'tadv_admin_settings', $admin_settings );
94
 
95
+ // User options
96
+ // TODO allow editors, authors and contributors some access
97
+ $settings['options'] = implode( ',', $options_array );
98
+ $this->settings = $settings;
99
+ $this->load_settings();
100
 
101
+ // Merge the submitted plugins and from the buttons
102
+ $settings['plugins'] = implode( ',', $this->get_plugins( $plugins_array ) );
103
+ $this->plugins = $settings['plugins'];
104
 
105
+ // Save the new settings
106
+ update_option( 'tadv_settings', $settings );
107
 
108
+ } elseif ( isset( $_POST['tadv-restore-defaults'] ) ) {
109
+ // TODO admin || SA
110
+ $this->admin_settings = $this->default_admin_settings;
111
+ update_option( 'tadv_admin_settings', $this->default_admin_settings );
112
 
113
+ // can 'save_posts' ?
114
+ $this->settings = $this->default_settings;
115
+ update_option( 'tadv_settings', $this->default_settings );
116
 
117
+ $message = '<div class="updated"><p>' . __('Default settings restored.', 'tadv') . '</p></div>';
118
+ } elseif ( isset( $_POST['tadv-export-settings'] ) ) {
119
+ $this->load_settings();
120
+ $output = array( 'settings' => $this->settings );
121
+ // TODO admin || SA
122
+ $output['admin_settings'] = $this->admin_settings;
123
 
124
+ ?>
125
+ <div class="wrap">
126
+ <h2><?php _e('TinyMCE Advanced Settings Export', 'tadv'); ?></h2>
127
 
128
+ <div class="tadv-import-export">
129
+ <p>
130
+ <?php
131
 
132
+ _e( 'The settings are exported as a JSON encoded string. ', 'tadv' );
133
+ _e( 'Please copy the content and save it in a <b>text</b> (.txt) file, using a plain text editor like Notepad. ', 'tadv' );
134
+ _e( 'It is important that the export is not changed in any way, no spaces, line breaks, etc.', 'tadv' );
135
 
136
+ ?>
137
+ </p>
 
 
138
 
139
+ <form action="">
140
+ <p><textarea readonly="readonly" id="tadv-export"><?php echo json_encode( $output ); ?></textarea></p>
141
+ <p><button type="button" class="button" id="tadv-export-select"><?php _e( 'Select All', 'tadv' ); ?></button></p>
142
+ </form>
143
+ <p><a href=""><?php _e('Back to Editor Settings', 'tadv'); ?></a></p>
144
+ </div>
145
+ </div>
146
+ <?php
147
 
148
+ return;
149
+ } elseif ( isset( $_POST['tadv-import-settings'] ) ) {
150
+ // TODO ! admin && ! SA
151
+ ?>
152
+ <div class="wrap">
153
+ <h2><?php _e('TinyMCE Advanced Settings Import', 'tadv'); ?></h2>
154
+
155
+ <div class="tadv-import-export">
156
+ <p><?php
157
+
158
+ _e( 'The settings are imported from a JSON encoded string. Please paste the exported string in the textarea below.', 'tadv' );
159
+
160
+ ?></p>
161
+
162
+ <form action="" method="post">
163
+ <p><textarea id="tadv-import" name="tadv-import"></textarea></p>
164
+ <p>
165
+ <button type="button" class="button" id="tadv-import-verify"><?php _e( 'Verify', 'tadv' ); ?></button>
166
+ <input type="submit" class="button button-primary alignright" name="tadv-import-submit" value="<?php _e( 'Import', 'tadv' ); ?>" />
167
+ </p>
168
+ <?php wp_nonce_field('tadv-import'); ?>
169
+ <p id="tadv-import-error"></p>
170
+ </form>
171
+ <p><a href=""><?php _e('Back to Editor Settings', 'tadv'); ?></a></p>
172
+ </div>
173
+ </div>
174
+ <?php
175
+
176
+ return;
177
+ } elseif ( isset( $_POST['tadv-import-submit'] ) && ! empty( $_POST['tadv-import'] ) && is_string( $_POST['tadv-import'] ) ) {
178
+ check_admin_referer( 'tadv-import' );
179
+ $import = json_decode( trim( wp_unslash( $_POST['tadv-import'] ) ), true );
180
+ $settings = $admin_settings = array();
181
+
182
+ if ( is_array( $import ) ) {
183
+ if ( ! empty( $import['settings'] ) ) {
184
+ $settings = $this->sanitize_settings( $import['settings'] );
185
+ }
186
+
187
+ if ( ! empty( $import['admin_settings'] ) ) {
188
+ $admin_settings = $this->sanitize_settings( $import['admin_settings'] );
189
+ }
190
+ }
191
 
192
+ if ( empty( $settings ) ) {
193
+ $message = '<div class="error"><p>' . __('Importing of settings failed.', 'tadv') . '</p></div>';
194
+ } else {
195
+ $this->admin_settings = $admin_settings;
196
+ update_option( 'tadv_admin_settings', $admin_settings );
197
+
198
+ // User options
199
+ // TODO allow editors, authors and contributors some access
200
+ $this->settings = $settings;
201
+ $this->load_settings();
202
+
203
+ // Merge the submitted plugins and from the buttons
204
+ if ( ! empty( $settings['plugins'] ) ) {
205
+ $settings['plugins'] = implode( ',', $this->get_plugins( explode( ',', $settings['plugins'] ) ) );
206
+ }
207
 
208
+ $this->plugins = $settings['plugins'];
209
+
210
+ // Save the new settings
211
+ update_option( 'tadv_settings', $settings );
212
+ }
213
+ }
214
 
215
+ $this->load_settings();
216
 
217
+ if ( empty( $this->toolbar_1 ) && empty( $this->toolbar_2 ) && empty( $this->toolbar_3 ) && empty( $this->toolbar_4 ) ) {
218
+ $message = '<div class="error"><p>' . __('ERROR: All toolbars are empty. Default settings loaded.', 'tadv') . '</p></div>';
 
219
 
220
+ $this->admin_settings = $this->default_admin_settings;
221
+ $this->settings = $this->default_settings;
222
+ $this->load_settings();
223
  }
224
 
225
+ $used_buttons = array_merge( $this->toolbar_1, $this->toolbar_2, $this->toolbar_3, $this->toolbar_4 );
226
+ $all_buttons = $this->get_all_buttons();
 
 
 
 
 
 
 
 
 
 
 
 
227
 
228
+ ?>
229
  <div class="wrap" id="contain">
230
+ <h2><?php _e('Editor Settings', 'tadv'); ?></h2>
 
 
 
 
 
 
 
 
 
 
 
 
231
  <?php
232
 
233
+ if ( isset( $_POST['tadv-save'] ) && empty( $message ) ) {
234
+ ?><div class="updated" id="message"><p><?php _e( 'Settings saved.', 'tadv' ); ?></p></div><?php
235
+ } else {
236
+ echo $message;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
237
  }
238
 
239
  ?>
240
+ <form id="tadvadmin" method="post" action="">
241
+ <div id="tadvzones">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
242
 
243
+ <p><?php _e( 'New in TinyMCE 4.0/WordPress 3.9 is the editor menu. When it is enabled, most buttons are also available as menu items.', 'tadv' ); ?></p>
 
 
 
 
 
244
 
245
+ <p><label>
246
+ <input type="checkbox" name="menubar" id="menubar" <?php if ( $this->check_setting( 'menubar' ) ) { echo ' checked="checked"'; } ?>>
247
+ <?php _e('Enable the editor menu.', 'tadv'); ?>
248
+ </label></p>
249
 
250
+ <p id="tadv-menu-img" <?php if ( $this->check_setting( 'menubar' ) ) { echo ' class="enabled"'; } ?>>&nbsp;</p>
 
 
251
 
 
 
252
  <?php
253
 
254
+ for ( $i = 1; $i < 5; $i++ ) {
255
+ $toolbar = "toolbar_$i";
256
 
257
+ ?>
258
+ <div class="tadvdropzone">
259
+ <ul id="tb<?php echo $i; ?>" class="container">
260
+ <?php
261
+
262
+ foreach( $this->$toolbar as $button ) {
263
+ if ( strpos( $button, 'separator' ) !== false || in_array( $button, array( 'moveforward', 'movebackward', 'absolute' ) ) ) {
264
  continue;
265
+ }
 
 
 
 
 
 
 
 
 
266
 
267
+ if ( isset( $all_buttons[$button] ) ) {
268
+ $name = $all_buttons[$button];
269
+ unset( $all_buttons[$button] );
270
+ } else {
271
+ // error?..
272
+ continue;
273
+ }
 
 
 
274
 
275
+ if ( strpos( $name, '<!' ) === 0 )
276
+ $name = '';
 
 
277
 
 
 
 
 
278
  ?>
279
+ <li class="tadvmodule" id="<?php echo $button; ?>">
280
+ <div class="tadvitem">
281
+ <i class="mce-ico mce-i-<?php echo $button; ?>" title="<?php echo $name; ?>"></i>
282
+ <span class="descr"> <?php echo $name; ?></span>
283
+ <input type="hidden" class="tadv-button" name="tb<?php echo $i; ?>[]" value="<?php echo $button; ?>" />
284
+ </div>
285
+ </li>
286
  <?php
287
+
288
  }
289
 
290
+ ?>
291
+ </ul></div>
292
+ <?php
293
  }
294
 
295
  ?>
 
 
296
  </div>
297
 
298
+ <p><?php _e('Drag and drop buttons onto the toolbars above, or drag the buttons to rearrange them.', 'tadv'); ?></p>
299
+ <!--
300
+ <div id="length-error-message" class="tadv-error">
301
+ <?php _e('Adding too many buttons will make the toolbar too long and will not display correctly in TinyMCE!', 'tadv'); ?>
302
  </div>
303
+ -->
304
+ <div id="unuseddiv">
305
+ <ul id="unused">
306
  <?php
307
 
308
+ foreach( $all_buttons as $button => $name ) {
309
+ if ( strpos( $button, 'separator' ) !== false )
310
+ continue;
311
+
312
+ if ( strpos( $name, '<!' ) === 0 )
313
+ $name = '';
314
+
315
+ ?>
316
+ <li class="tadvmodule" id="<?php echo $button; ?>">
317
+ <div class="tadvitem">
318
+ <i class="mce-ico mce-i-<?php echo $button; ?>" title="<?php echo $name; ?>"></i>
319
+ <span class="descr"> <?php echo $name; ?></span>
320
+ <input type="hidden" class="tadv-button" name="unused[]" value="<?php echo $button; ?>" />
321
+ </div>
322
+ </li>
323
+ <?php
324
+
325
  }
326
 
327
  ?>
328
  </ul>
329
  </div>
330
 
331
+ <p class="tadv-more-plugins"><?php _e( 'Also enable:' ); ?>
332
+ <label>
333
+ <input type="checkbox" name="advlist" id="advlist" <?php if ( $this->check_setting('advlist') ) echo ' checked="checked"'; ?> />
334
+ <?php _e('List Style Options', 'tadv'); ?>
 
 
 
 
 
 
 
 
335
  </label>
336
 
337
+ <label>
338
+ <input type="checkbox" name="contextmenu" id="contextmenu" <?php if ( $this->check_setting('contextmenu') ) echo ' checked="checked"'; ?> />
339
  <?php _e('Context Menu', 'tadv'); ?>
340
  </label>
341
+ </p>
342
+
343
  <?php
344
 
345
+ if ( ! is_multisite() && current_user_can( 'manage_options' ) ) {
 
346
 
347
+ ?>
348
+ <div class="advanced-options">
349
+ <h3><?php _e('Advanced Options', 'tadv'); ?></h3>
350
+ <?php
351
+
352
+ if ( ! current_theme_supports( 'editor-style' ) ) {
353
+
354
  ?>
355
+ <p><?php
356
+ _e('It seems your theme doesn\'t support customised styles for the editor. ', 'tadv');
357
+ _e('You can create a CSS file named <code>editor-style.css</code> and upload it to your theme\'s directory. ', 'tadv');
358
+ _e('After that, enable this setting.', 'tadv');
359
+ ?></p>
360
+
361
+ <p>
362
+ <label><input type="checkbox" name="editorstyle" id="editorstyle" <?php if ( $this->check_setting( 'editorstyle', true ) ) echo ' checked="checked"'; ?> />
363
+ <?php _e('Import editor-style.css.', 'tadv'); ?></label>
364
+ </p>
365
  <?php
366
  }
 
 
 
 
 
367
 
368
+ ?>
369
  <p>
370
+ <label><input type="checkbox" name="importcss" id="importcss" <?php if ( $this->check_setting( 'importcss', true ) ) echo ' checked="checked"'; ?> />
371
+ <?php _e('Load the CSS classes used in editor-style.css and replace the Styles sub-menu.', 'tadv'); ?></label>
 
 
 
372
  </p>
 
 
373
 
 
 
 
374
  <p>
375
+ <label><input type="checkbox" name="no_autop" id="no_autop" <?php if ( $this->check_setting( 'no_autop', true ) ) echo ' checked="checked"'; ?> />
376
+ <?php _e('Stop removing the &lt;p&gt; and &lt;br /&gt; tags when saving and show them in the Text editor', 'tadv'); ?></label>
377
+ <br>
378
+ <?php
379
+ _e('This will make it possible to use more advanced coding in the HTML editor without the back-end filtering affecting it much. ', 'tadv');
380
+ _e('However it may behave unexpectedly in rare cases, so test it thoroughly before enabling it permanently. ', 'tadv');
381
+ _e('Line breaks in the HTML editor would still affect the output, in particular do not use empty lines, line breaks inside HTML tags or multiple &lt;br /&gt; tags.', 'tadv');
382
+ ?>
383
  </p>
384
 
385
  <p>
386
+ <button class="button" type="button" id="tadv-remove-settings"><?php _e('Remove Settings', 'tadv'); ?></button>
387
+ <input type="submit" class="button" name="tadv-export-settings" value="<?php _e( 'Export Settings', 'tadv' ); ?>" />
388
+ <input type="submit" class="button" name="tadv-import-settings" value="<?php _e( 'Import Settings', 'tadv' ); ?>" />
 
389
  </p>
390
+ </div>
391
  <?php
 
392
 
393
+ }
394
  ?>
 
 
 
 
 
 
 
395
 
396
+ <p class="tadv-submit">
 
 
 
 
 
 
 
 
 
 
397
  <?php wp_nonce_field( 'tadv-save-buttons-order' ); ?>
398
+ <input class="button" type="submit" name="tadv-restore-defaults" value="<?php _e('Restore Default Settings', 'tadv'); ?>" />
399
+ <input class="button-primary button-large" type="submit" name="tadv-save" value="<?php _e('Save Changes', 'tadv'); ?>" />
400
  </p>
401
  </form>
402
 
403
+ <div id="wp-adv-error-message" class="tadv-error">
404
+ <?php _e('The "Toolbar toggle" button shows/hides the second, third, and forth button rows. It will only work when it is in the first row and there are buttons in the second row.', 'tadv'); ?>
405
  </div>
406
 
407
+ <div id="tadv-confirm-uninstall" style="">
408
  <form method="post" action="">
409
  <?php wp_nonce_field('tadv-uninstall'); ?>
410
+ <div><?php _e('Remove all settings from the database?', 'tadv'); ?>
411
+ <input class="button" type="button" id="tadv-cancel" value="<?php _e('Cancel', 'tadv'); ?>" />
412
+ <input class="button" type="submit" name="tadv_uninstall" value="<?php _e('Continue', 'tadv'); ?>" />
413
+ </div>
414
  </form>
415
  </div>
416
  </div>
tadv_defaults.php DELETED
@@ -1,20 +0,0 @@
1
- <?php
2
-
3
- $tadv_options = array( 'advlink1' => 0, 'advimage' => 1, 'editorstyle' => 0, 'hideclasses' => 0, 'contextmenu' => 0, 'no_autop' => 0 );
4
-
5
- $tadv_plugins = array( 'style', 'emotions', 'print', 'searchreplace', 'xhtmlxtras', 'advimage' );
6
-
7
- $tadv_toolbars = array(
8
- 'toolbar_1' => array( 'bold', 'italic', 'strikethrough', 'underline', 'separator1', 'bullist', 'numlist', 'outdent', 'indent', 'separator2', 'justifyleft', 'justifycenter', 'justifyright', 'separator3', 'link', 'unlink', 'separator4', 'image', 'styleprops', 'separator12', 'wp_more', 'wp_page', 'separator5', 'spellchecker', 'search', 'separator6', 'fullscreen' ),
9
- 'toolbar_2' => array( 'fontsizeselect', 'formatselect', 'pastetext', 'pasteword', 'removeformat', 'separator8', 'charmap', 'print', 'separator9', 'forecolor', 'backcolor', 'emotions', 'separator10', 'sup', 'sub', 'media', 'separator11', 'undo', 'redo', 'attribs', 'wp_help' ),
10
- 'toolbar_3' => array(),
11
- 'toolbar_4' => array()
12
- );
13
-
14
- $tadv_btns1 = array( 'bold', 'italic', 'strikethrough', 'underline', 'separator', 'bullist', 'numlist', 'outdent', 'indent', 'separator', 'justifyleft', 'justifycenter', 'justifyright', 'separator', 'link', 'unlink', 'separator', 'image', 'styleprops', 'separator', 'wp_more', 'wp_page', 'separator', 'spellchecker', 'search', 'separator', 'fullscreen', 'wp_adv' );
15
-
16
- $tadv_btns2 = array( 'fontsizeselect', 'formatselect', 'pastetext', 'pasteword', 'removeformat', 'separator', 'charmap', 'print', 'separator', 'forecolor', 'backcolor', 'emotions', 'separator', 'sup', 'sub', 'media', 'separator', 'undo', 'redo', 'attribs', 'wp_help' );
17
-
18
- $tadv_btns3 = $tadv_btns4 = array();
19
-
20
- $tadv_allbtns = array( 'wp_adv', 'bold', 'italic', 'strikethrough', 'underline', 'bullist', 'numlist', 'outdent', 'indent', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'cut', 'copy', 'paste', 'link', 'unlink', 'image', 'wp_more', 'wp_page', 'search', 'replace', 'fontselect', 'fontsizeselect', 'wp_help', 'fullscreen', 'styleselect', 'formatselect', 'forecolor', 'backcolor', 'pastetext', 'pasteword', 'removeformat', 'cleanup', 'spellchecker', 'charmap', 'print', 'undo', 'redo', 'tablecontrols', 'cite', 'ins', 'del', 'abbr', 'acronym', 'attribs', 'layer', 'advhr', 'code', 'visualchars', 'nonbreaking', 'sub', 'sup', 'visualaid', 'insertdate', 'inserttime', 'anchor', 'styleprops', 'emotions', 'media', 'blockquote', 'separator', '|' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tiny_mce_popup.js DELETED
@@ -1,5 +0,0 @@
1
-
2
- // Uncomment and change this document.domain value if you are loading the script cross subdomains
3
- // document.domain = 'moxiecode.com';
4
-
5
- var tinymce=null,tinyMCEPopup,tinyMCE;tinyMCEPopup={init:function(){var b=this,a,c;a=b.getWin();tinymce=a.tinymce;tinyMCE=a.tinyMCE;b.editor=tinymce.EditorManager.activeEditor;b.params=b.editor.windowManager.params;b.features=b.editor.windowManager.features;b.dom=b.editor.windowManager.createInstance("tinymce.dom.DOMUtils",document,{ownEvents:true,proxy:tinyMCEPopup._eventProxy});b.dom.bind(window,"ready",b._onDOMLoaded,b);if(b.features.popup_css!==false){b.dom.loadCSS(b.features.popup_css||b.editor.settings.popup_css)}b.listeners=[];b.onInit={add:function(e,d){b.listeners.push({func:e,scope:d})}};b.isWindow=!b.getWindowArg("mce_inline");b.id=b.getWindowArg("mce_window_id");b.editor.windowManager.onOpen.dispatch(b.editor.windowManager,window)},getWin:function(){return(!window.frameElement&&window.dialogArguments)||opener||parent||top},getWindowArg:function(c,b){var a=this.params[c];return tinymce.is(a)?a:b},getParam:function(b,a){return this.editor.getParam(b,a)},getLang:function(b,a){return this.editor.getLang(b,a)},execCommand:function(d,c,e,b){b=b||{};b.skip_focus=1;this.restoreSelection();return this.editor.execCommand(d,c,e,b)},resizeToInnerSize:function(){var a=this;setTimeout(function(){var b=a.dom.getViewPort(window);a.editor.windowManager.resizeBy(a.getWindowArg("mce_width")-b.w,a.getWindowArg("mce_height")-b.h,a.id||window)},10)},executeOnLoad:function(s){this.onInit.add(function(){eval(s)})},storeSelection:function(){this.editor.windowManager.bookmark=tinyMCEPopup.editor.selection.getBookmark(1)},restoreSelection:function(){var a=tinyMCEPopup;if(!a.isWindow&&tinymce.isIE){a.editor.selection.moveToBookmark(a.editor.windowManager.bookmark)}},requireLangPack:function(){var b=this,a=b.getWindowArg("plugin_url")||b.getWindowArg("theme_url");if(a&&b.editor.settings.language&&b.features.translate_i18n!==false&&b.editor.settings.language_load!==false){a+="/langs/"+b.editor.settings.language+"_dlg.js";if(!tinymce.ScriptLoader.isDone(a)){document.write('<script type="text/javascript" src="'+tinymce._addVer(a)+'"><\/script>');tinymce.ScriptLoader.markDone(a)}}},pickColor:function(b,a){this.execCommand("mceColorPicker",true,{color:document.getElementById(a).value,func:function(e){document.getElementById(a).value=e;try{document.getElementById(a).onchange()}catch(d){}}})},openBrowser:function(a,c,b){tinyMCEPopup.restoreSelection();this.editor.execCallback("file_browser_callback",a,document.getElementById(a).value,c,window)},confirm:function(b,a,c){this.editor.windowManager.confirm(b,a,c,window)},alert:function(b,a,c){this.editor.windowManager.alert(b,a,c,window)},close:function(){var a=this;function b(){a.editor.windowManager.close(window);tinymce=tinyMCE=a.editor=a.params=a.dom=a.dom.doc=null}if(tinymce.isOpera){a.getWin().setTimeout(b,0)}else{b()}},_restoreSelection:function(a){var a=(a&&a.target)||window.event.srcElement;if(a.nodeName=="INPUT"&&(a.type=="submit"||a.type=="button")){tinyMCEPopup.restoreSelection()}},_onDOMLoaded:function(){var b=tinyMCEPopup,d=document.title,e,c,a;if(b.features.translate_i18n!==false){c=document.body.innerHTML;if(tinymce.isIE){c=c.replace(/ (value|title|alt)=([^"][^\s>]+)/gi,' $1="$2"')}document.dir=b.editor.getParam("directionality","");if((a=b.editor.translate(c))&&a!=c){document.body.innerHTML=a}if((a=b.editor.translate(d))&&a!=d){document.title=d=a}}if(!b.editor.getParam("browser_preferred_colors",false)||!b.isWindow){b.dom.addClass(document.body,"forceColors")}document.body.style.display="";if(tinymce.isIE&&!tinymce.isIE11){document.attachEvent("onmouseup",tinyMCEPopup._restoreSelection);b.dom.add(b.dom.select("head")[0],"base",{target:"_self"})}else{if(tinymce.isIE11){document.addEventListener("mouseup",tinyMCEPopup._restoreSelection,false)}}b.restoreSelection();b.resizeToInnerSize();if(!b.isWindow){b.editor.windowManager.setTitle(window,d)}else{window.focus()}if(!tinymce.isIE&&!b.isWindow){b.dom.bind(document,"focus",function(){b.editor.windowManager.focus(b.id)})}tinymce.each(b.dom.select("select"),function(f){f.onkeydown=tinyMCEPopup._accessHandler});tinymce.each(b.listeners,function(f){f.func.call(f.scope,b.editor)});if(b.getWindowArg("mce_auto_focus",true)){window.focus();tinymce.each(document.forms,function(g){tinymce.each(g.elements,function(f){if(b.dom.hasClass(f,"mceFocus")&&!f.disabled){f.focus();return false}})})}document.onkeyup=tinyMCEPopup._closeWinKeyHandler},_accessHandler:function(a){a=a||window.event;if(a.keyCode==13||a.keyCode==32){var b=a.target||a.srcElement;if(b.onchange){b.onchange()}return tinymce.dom.Event.cancel(a)}},_closeWinKeyHandler:function(a){a=a||window.event;if(a.keyCode==27){tinyMCEPopup.close()}},_eventProxy:function(a){return function(b){tinyMCEPopup.dom.events.callNativeHandler(a,b)}}};tinyMCEPopup.init();
 
 
 
 
 
tinymce-advanced.php CHANGED
@@ -3,220 +3,385 @@
3
  Plugin Name: TinyMCE Advanced
4
  Plugin URI: http://www.laptoptips.ca/projects/tinymce-advanced/
5
  Description: Enables advanced features and plugins in TinyMCE, the visual editor in WordPress.
6
- Version: 3.5.9.1
7
  Author: Andrew Ozz
8
  Author URI: http://www.laptoptips.ca/
9
 
10
- Some code and ideas from WordPress (http://wordpress.org/). The options page for this plugin uses jQuery (http://jquery.com/).
11
-
12
- Released under the GPL v.2, http://www.gnu.org/licenses/gpl-2.0.html
13
 
14
  This program is distributed in the hope that it will be useful,
15
  but WITHOUT ANY WARRANTY; without even the implied warranty of
16
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- GNU General Public License for more details.
18
  */
19
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
 
21
- if ( ! function_exists('tadv_paths') ) {
22
- // If using domain mapping or plugins that change the path dinamically, edit these to set the proper path and URL.
23
- function tadv_paths() {
24
- if ( !defined('TADV_URL') )
25
- define('TADV_URL', plugin_dir_url(__FILE__));
26
-
27
- if ( !defined('TADV_PATH') )
28
- define('TADV_PATH', plugin_dir_path(__FILE__));
29
- }
30
- add_action( 'plugins_loaded', 'tadv_paths', 50 );
31
- }
32
 
 
 
 
 
33
 
34
- if ( ! function_exists('tadv_version') ) {
35
- function tadv_version() {
36
- $ver = get_option('tadv_version', 0);
 
 
37
 
38
- if ( $ver < 3420 ) {
39
- update_option('tadv_version', 3420);
 
 
40
 
41
- $plugins = array_diff( get_option('tadv_plugins', array()), array('media') );
42
- update_option('tadv_plugins', $plugins);
43
- }
44
  }
45
- add_action( 'admin_init', 'tadv_version' );
46
- }
47
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
 
49
- if ( ! function_exists('tadv_add_scripts') ) {
50
- function tadv_add_scripts($page) {
51
  if ( 'settings_page_tinymce-advanced' == $page ) {
52
- wp_enqueue_script( 'tadv-js', TADV_URL . 'js/tadv.js', array('jquery-ui-sortable'), '3.4.2', true );
53
- wp_enqueue_style( 'tadv-css', TADV_URL . 'css/tadv-styles.css', array(), '3.5.9' );
 
54
  }
55
  }
56
- }
57
-
58
 
59
- if ( ! function_exists('tadv_load_defaults') ) {
60
- function tadv_load_defaults() {
61
- $tadv_options = get_option('tadv_options');
62
- if ( ! empty($tadv_options) )
63
- return;
64
 
65
- @include_once('tadv_defaults.php');
66
-
67
- if ( isset($tadv_toolbars) ) {
68
- add_option( 'tadv_options', $tadv_options );
69
- add_option( 'tadv_toolbars', $tadv_toolbars, '', 'no' );
70
- add_option( 'tadv_plugins', $tadv_plugins, '', 'no' );
71
- add_option( 'tadv_btns1', $tadv_btns1, '', 'no' );
72
- add_option( 'tadv_btns2', $tadv_btns2, '', 'no' );
73
- add_option( 'tadv_btns3', $tadv_btns3, '', 'no' );
74
- add_option( 'tadv_btns4', $tadv_btns4, '', 'no' );
75
- add_option( 'tadv_allbtns', $tadv_allbtns, '', 'no' );
76
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
  }
78
- add_action( 'admin_init', 'tadv_load_defaults' );
79
- }
80
 
81
- if ( ! function_exists('tdav_get_file') ) {
82
- function tdav_get_file($path) {
83
-
84
- if ( function_exists('realpath') )
85
- $path = realpath($path);
86
-
87
- if ( ! $path || ! @is_file($path) )
88
- return '';
89
-
90
- return @file_get_contents($path);
91
  }
92
- }
93
 
94
- $tadv_allbtns = array();
95
- $tadv_hidden_row = 0;
96
 
 
 
 
 
97
 
98
- if ( ! function_exists('tadv_mce_btns') ) {
99
- function tadv_mce_btns($orig) {
100
- global $tadv_allbtns, $tadv_hidden_row;
101
- $tadv_btns1 = (array) get_option('tadv_btns1', array());
102
- $tadv_allbtns = (array) get_option('tadv_allbtns', array());
103
- $tadv_options = get_option('tadv_options', array());
104
 
105
- if ( in_array( 'wp_adv', $tadv_btns1 ) )
106
- $tadv_hidden_row = 2;
 
 
 
107
 
108
- if ( is_array($orig) && ! empty($orig) ) {
109
- $orig = array_diff( $orig, $tadv_allbtns );
110
- $tadv_btns1 = array_merge( $tadv_btns1, $orig );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
111
  }
112
 
113
- return $tadv_btns1;
 
 
 
 
 
114
  }
115
- add_filter( 'mce_buttons', 'tadv_mce_btns', 999 );
116
- }
117
 
 
118
 
119
- if ( ! function_exists('tadv_mce_btns2') ) {
120
- function tadv_mce_btns2($orig) {
121
- global $tadv_allbtns, $tadv_hidden_row;
122
- $tadv_btns2 = (array) get_option('tadv_btns2', array());
123
 
124
- if ( in_array( 'wp_adv', $tadv_btns2 ) )
125
- $tadv_hidden_row = 3;
126
 
127
- if ( is_array($orig) && ! empty($orig) ) {
128
- $orig = array_diff( $orig, $tadv_allbtns );
129
- $tadv_btns2 = array_merge( $tadv_btns2, $orig );
130
- }
131
- return $tadv_btns2;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
  }
133
- add_filter( 'mce_buttons_2', 'tadv_mce_btns2', 999 );
134
- }
135
 
 
 
 
 
136
 
137
- if ( ! function_exists('tadv_mce_btns3') ) {
138
- function tadv_mce_btns3($orig) {
139
- global $tadv_allbtns, $tadv_hidden_row;
140
- $tadv_btns3 = (array) get_option('tadv_btns3', array());
141
 
142
- if ( in_array( 'wp_adv', $tadv_btns3 ) )
143
- $tadv_hidden_row = 4;
144
 
145
  if ( is_array($orig) && ! empty($orig) ) {
146
- $orig = array_diff( $orig, $tadv_allbtns );
147
- $tadv_btns3 = array_merge( $tadv_btns3, $orig );
148
  }
149
- return $tadv_btns3;
150
- }
151
- add_filter( 'mce_buttons_3', 'tadv_mce_btns3', 999 );
152
- }
153
 
 
 
154
 
155
- if ( ! function_exists('tadv_mce_btns4') ) {
156
- function tadv_mce_btns4($orig) {
157
- global $tadv_allbtns;
158
- $tadv_btns4 = (array) get_option('tadv_btns4', array());
159
 
160
  if ( is_array($orig) && ! empty($orig) ) {
161
- $orig = array_diff( $orig, $tadv_allbtns );
162
- $tadv_btns4 = array_merge( $tadv_btns4, $orig );
163
  }
164
- return $tadv_btns4;
 
165
  }
166
- add_filter( 'mce_buttons_4', 'tadv_mce_btns4', 999 );
167
- }
168
 
 
 
169
 
170
- if ( ! function_exists('tadv_mce_options') ) {
171
- function tadv_mce_options($init) {
172
- global $tadv_hidden_row;
173
- $tadv_options = get_option('tadv_options', array());
174
 
175
- if ( $tadv_hidden_row > 0 )
176
- $init['wordpress_adv_toolbar'] = 'toolbar' . $tadv_hidden_row;
177
- else
178
- $init['wordpress_adv_hidden'] = false;
179
 
180
- if ( isset($tadv_options['no_autop']) && $tadv_options['no_autop'] == 1 )
181
- $init['apply_source_formatting'] = true;
182
 
183
- if ( isset($tadv_options['hideclasses']) && $tadv_options['hideclasses'] == 1 )
184
- $init['class_filter'] = '[function(){return false;}]';
 
 
185
 
186
- return $init;
187
  }
188
- add_filter( 'tiny_mce_before_init', 'tadv_mce_options' );
189
- }
190
 
 
 
 
 
 
191
 
192
- if ( ! function_exists('tadv_htmledit') ) {
193
- function tadv_htmledit($c) {
194
- $tadv_options = get_option('tadv_options', array());
 
 
 
 
 
 
 
 
195
 
196
- if ( isset($tadv_options['no_autop']) && $tadv_options['no_autop'] == 1 ) {
 
197
  $c = str_replace( array('&amp;', '&lt;', '&gt;'), array('&', '<', '>'), $c );
198
- $c = wpautop($c);
199
  $c = preg_replace( '/^<p>(https?:\/\/[^<> "]+?)<\/p>$/im', '$1', $c );
200
  $c = htmlspecialchars( $c, ENT_NOQUOTES, get_option( 'blog_charset' ) );
201
  }
202
  return $c;
203
  }
204
- add_filter('htmledit_pre', 'tadv_htmledit', 999);
205
- }
206
-
207
 
208
- if ( ! function_exists('tmce_replace') ) {
209
- function tmce_replace() {
210
- $tadv_options = get_option('tadv_options', array());
211
-
212
- if ( empty( $tadv_options['no_autop'] ) ) {
213
  return;
214
  }
215
 
216
  ?>
217
  <script type="text/javascript">
218
  if ( typeof(jQuery) != 'undefined' ) {
219
- jQuery('body').on('afterPreWpautop', function( event, obj ) {
220
  var regex = [
221
  new RegExp('https?://(www\.)?youtube\.com/watch.*', 'i'),
222
  new RegExp('http://youtu.be/*'),
@@ -262,79 +427,85 @@ if ( ! function_exists('tmce_replace') ) {
262
  match = match.replace( /<br ?\/?>(\r\n|\n)?/g, '\n' );
263
  return match.replace( /<\/?p( [^>]*)?>(\r\n|\n)?/g, '\n' );
264
  });
265
- }).on('afterWpautop', function( event, obj ){
266
  obj.data = obj.unfiltered;
267
  });
268
  }
269
  </script>
270
  <?php
271
  }
272
- add_action( 'after_wp_tiny_mce', 'tmce_replace' );
273
- }
274
 
 
 
 
 
 
275
 
276
- if ( ! function_exists('tadv_load_plugins') ) {
277
- function tadv_load_plugins($plug) {
278
- $tadv_plugins = get_option('tadv_plugins');
279
- $tadv_options = get_option('tadv_options', array());
280
 
281
- if ( isset($tadv_options['editorstyle']) && $tadv_options['editorstyle'] == '1' )
282
- add_editor_style(); // import user created editor-style.css
 
283
 
284
- if ( empty($tadv_plugins) || !is_array($tadv_plugins) )
285
- return $plug;
 
286
 
287
- $plugpath = TADV_URL . 'mce/';
 
288
 
289
- $plug = (array) $plug;
290
- foreach( $tadv_plugins as $plugin )
291
- $plug["$plugin"] = $plugpath . $plugin . '/editor_plugin.js';
292
 
293
- return $plug;
 
 
 
 
 
294
  }
295
- add_filter( 'mce_external_plugins', 'tadv_load_plugins', 999 );
296
- }
297
 
 
 
 
 
 
 
298
 
299
- if ( ! function_exists('tadv_load_langs') ) {
300
- function tadv_load_langs($langs) {
301
- $tadv_plugins = get_option('tadv_plugins');
302
- if ( empty($tadv_plugins) || !is_array($tadv_plugins) )
303
- return $langs;
304
 
305
- $langpath = TADV_PATH . 'mce/';
306
- $dolangs = array( 'advhr', 'advimage', 'advlink', 'searchreplace', 'style', 'table', 'xhtmlxtras' );
 
307
 
308
- $langs = (array) $langs;
309
- foreach( $tadv_plugins as $plugin ) {
310
- if ( !in_array( $plugin, $dolangs ) )
311
- continue;
312
 
313
- $langs["$plugin"] = $langpath . $plugin . '/langs/langs.php';
 
 
 
 
314
  }
315
- return $langs;
316
- }
317
- add_filter( 'mce_external_languages', 'tadv_load_langs' );
318
- }
319
 
 
 
320
 
321
- if ( ! function_exists('tadv_page') ) {
322
- function tadv_page() {
323
- if ( !defined('TADV_ADMIN_PAGE') )
324
- define('TADV_ADMIN_PAGE', true);
325
 
326
- tadv_paths();
327
- include_once( TADV_PATH . 'tadv_admin.php');
328
  }
329
- }
330
 
331
- if ( ! function_exists('tadv_menu') ) {
332
- function tadv_menu() {
333
- if ( function_exists('add_options_page') ) {
334
- add_options_page( 'TinyMCE Advanced', 'TinyMCE Advanced', 'manage_options', 'tinymce-advanced', 'tadv_page' );
335
- add_action( 'admin_enqueue_scripts', 'tadv_add_scripts' );
336
- }
337
  }
338
- add_action( 'admin_menu', 'tadv_menu' );
339
  }
340
 
 
 
3
  Plugin Name: TinyMCE Advanced
4
  Plugin URI: http://www.laptoptips.ca/projects/tinymce-advanced/
5
  Description: Enables advanced features and plugins in TinyMCE, the visual editor in WordPress.
6
+ Version: 4.0
7
  Author: Andrew Ozz
8
  Author URI: http://www.laptoptips.ca/
9
 
10
+ Released under the GPL version 2.0, http://www.gnu.org/licenses/gpl-2.0.html
 
 
11
 
12
  This program is distributed in the hope that it will be useful,
13
  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ GNU General Public License version 2.0 for more details.
16
  */
17
 
18
+ if ( ! class_exists('Tinymce_Advanced') ) :
19
+
20
+ class Tinymce_Advanced {
21
+
22
+ private $settings;
23
+ private $admin_settings;
24
+ private $admin_options;
25
+
26
+ private $plugins;
27
+ private $options;
28
+ private $toolbar_1;
29
+ private $toolbar_2;
30
+ private $toolbar_3;
31
+ private $toolbar_4;
32
+ private $used_buttons;
33
+ private $all_buttons;
34
+ private $buttons_filter;
35
+ private $all_plugins = array( 'advlist','anchor','code','contextmenu','emoticons','importcss','insertdatetime','nonbreaking','print','searchreplace','table','visualblocks','visualchars' );
36
+
37
+ private $default_settings = array(
38
+ 'options' => 'menubar,advlist',
39
+ 'toolbar_1' => 'bold,italic,blockquote,bullist,numlist,alignleft,aligncenter,alignright,link,unlink,table,fullscreen,undo,redo,wp_adv',
40
+ 'toolbar_2' => 'formatselect,alignjustify,strikethrough,outdent,indent,pastetext,removeformat,charmap,wp_more,emoticons,forecolor,wp_help',
41
+ 'toolbar_3' => '',
42
+ 'toolbar_4' => '',
43
+ 'plugins' => 'anchor,code,insertdatetime,nonbreaking,print,searchreplace,table,visualblocks,visualchars,emoticons,advlist',
44
+ );
45
+
46
+ private $default_admin_settings = array( 'options' => array() );
47
+
48
+ function __construct() {
49
+ add_action( 'plugins_loaded', array( &$this, 'set_paths' ), 50 );
50
+
51
+ if ( is_admin() ) {
52
+ add_action( 'admin_menu', array( &$this, 'menu' ) );
53
+ add_action( 'admin_enqueue_scripts', array( &$this, 'enqueue_scripts' ) );
54
+ }
55
 
56
+ // Don't load on non-supported WP versions
57
+ if ( ! $this->check_minimum_supported_version() ) {
58
+ return;
59
+ }
 
 
 
 
 
 
 
60
 
61
+ add_filter( 'mce_buttons', array( &$this, 'mce_buttons_1' ), 999 );
62
+ add_filter( 'mce_buttons_2', array( &$this, 'mce_buttons_2' ), 999 );
63
+ add_filter( 'mce_buttons_3', array( &$this, 'mce_buttons_3' ), 999 );
64
+ add_filter( 'mce_buttons_4', array( &$this, 'mce_buttons_4' ), 999 );
65
 
66
+ add_filter( 'tiny_mce_before_init', array( &$this, 'mce_options' ) );
67
+ add_filter( 'htmledit_pre', array( &$this, 'htmledit' ), 999 );
68
+ add_action( 'after_wp_tiny_mce', array( &$this, 'tmce_replace' ) );
69
+ add_filter( 'mce_external_plugins', array( &$this, 'load_plugins' ), 999 );
70
+ }
71
 
72
+ // When using a plugin that changes the paths dinamically, set these earlier than 'plugins_loaded' 50.
73
+ function set_paths() {
74
+ if ( ! defined( 'TADV_URL' ) )
75
+ define( 'TADV_URL', plugin_dir_url( __FILE__ ) );
76
 
77
+ if ( ! defined( 'TADV_PATH' ) )
78
+ define( 'TADV_PATH', plugin_dir_path( __FILE__ ) );
 
79
  }
 
 
80
 
81
+ private function remove_settings( $all = false ) {
82
+ if ( $all ) {
83
+ delete_option( 'tadv_settings' );
84
+ delete_option( 'tadv_admin_settings' );
85
+ delete_option( 'tadv_version' );
86
+ }
87
+
88
+ // Delete old options
89
+ delete_option('tadv_options');
90
+ delete_option('tadv_toolbars');
91
+ delete_option('tadv_plugins');
92
+ delete_option('tadv_btns1');
93
+ delete_option('tadv_btns2');
94
+ delete_option('tadv_btns3');
95
+ delete_option('tadv_btns4');
96
+ delete_option('tadv_allbtns');
97
+ }
98
 
99
+ function enqueue_scripts( $page ) {
 
100
  if ( 'settings_page_tinymce-advanced' == $page ) {
101
+ wp_enqueue_script( 'tadv-js', TADV_URL . 'js/tadv.js', array( 'jquery-ui-sortable' ), '4.0', true );
102
+ wp_enqueue_style( 'tadv-mce-skin', includes_url( 'js/tinymce/skins/lightgray/skin.min.css' ), array(), '4.0' );
103
+ wp_enqueue_style( 'tadv-css', TADV_URL . 'css/tadv-styles.css', array( 'editor-buttons' ), '4.0' );
104
  }
105
  }
 
 
106
 
107
+ function load_settings() {
108
+ if ( empty( $_POST ) ) {
109
+ $this->check_plugin_version();
110
+ }
 
111
 
112
+ if ( empty( $this->settings ) ) {
113
+ $this->admin_settings = get_option( 'tadv_admin_settings', false );
114
+ $this->settings = get_option( 'tadv_settings', false );
 
 
 
 
 
 
 
 
115
  }
116
+
117
+ // load defaults if the options don't exist...
118
+ if ( $this->admin_settings === false )
119
+ $this->admin_settings = $this->default_admin_settings;
120
+
121
+ $this->admin_options = ! empty( $this->admin_settings['options'] ) ? explode( ',', $this->admin_settings['options'] ) : array();
122
+
123
+ if ( $this->settings === false )
124
+ $this->settings = $this->default_settings;
125
+
126
+ $this->options = ! empty( $this->settings['options'] ) ? explode( ',', $this->settings['options'] ) : array();
127
+ $this->plugins = ! empty( $this->settings['plugins'] ) ? explode( ',', $this->settings['plugins'] ) : array();
128
+ $this->toolbar_1 = ! empty( $this->settings['toolbar_1'] ) ? explode( ',', $this->settings['toolbar_1'] ) : array();
129
+ $this->toolbar_2 = ! empty( $this->settings['toolbar_2'] ) ? explode( ',', $this->settings['toolbar_2'] ) : array();
130
+ $this->toolbar_3 = ! empty( $this->settings['toolbar_3'] ) ? explode( ',', $this->settings['toolbar_3'] ) : array();
131
+ $this->toolbar_4 = ! empty( $this->settings['toolbar_4'] ) ? explode( ',', $this->settings['toolbar_4'] ) : array();
132
+
133
+ $this->used_buttons = array_merge( $this->toolbar_1, $this->toolbar_2, $this->toolbar_3, $this->toolbar_4 );
134
+ $this->get_all_buttons();
135
  }
 
 
136
 
137
+ // Min version 3.9-RC1
138
+ private function check_minimum_supported_version() {
139
+ return ( isset( $GLOBALS['wp_db_version'] ) && $GLOBALS['wp_db_version'] > 27000 );
 
 
 
 
 
 
 
140
  }
 
141
 
142
+ private function check_plugin_version() {
143
+ $version = get_option( 'tadv_version', 0 );
144
 
145
+ if ( ! $version || $version < 4000 ) {
146
+ // First install or upgrade to TinyMCE 4.0
147
+ $this->settings = $this->default_settings;
148
+ $this->admin_settings = $this->default_admin_settings;
149
 
150
+ update_option( 'tadv_settings', $this->settings );
151
+ update_option( 'tadv_admin_settings', $this->admin_settings );
152
+ update_option( 'tadv_version', 4000 );
153
+ }
 
 
154
 
155
+ if ( $version < 4000 ) {
156
+ // Upgrade to TinyMCE 4.0, clean options
157
+ $this->remove_settings();
158
+ }
159
+ }
160
 
161
+ function get_all_buttons() {
162
+ if ( ! empty( $this->all_buttons ) )
163
+ return $this->all_buttons;
164
+
165
+ $buttons = array(
166
+ // Core
167
+ 'bold' => 'Bold',
168
+ 'italic' => 'Italic',
169
+ 'underline' => 'Underline',
170
+ 'strikethrough' => 'Strikethrough',
171
+ 'alignleft' => 'Align Left',
172
+ 'aligncenter' => 'Align Center',
173
+ 'alignright' => 'Align Right',
174
+ 'alignjustify' => 'Justify',
175
+ 'styleselect' => '<!--styleselect-->',
176
+ 'formatselect' => '<!--formatselect-->',
177
+ 'fontselect' => '<!--fontselect-->',
178
+ 'fontsizeselect' => '<!--fontsizeselect-->',
179
+ 'cut' => 'Cut',
180
+ 'copy' => 'Copy',
181
+ 'paste' => 'Paste',
182
+ 'bullist' => 'Bullet List',
183
+ 'numlist' => 'Numbered List',
184
+ 'outdent' => 'Outdent',
185
+ 'indent' => 'Indent',
186
+ 'blockquote' => 'Quote',
187
+ 'undo' => 'Undo',
188
+ 'redo' => 'Redo',
189
+ 'removeformat' => 'Remove Formatting',
190
+ 'subscript' => 'Subscript',
191
+ 'superscript' => 'Superscript',
192
+
193
+ // From plugins
194
+ 'hr' => 'Horizontal Rule',
195
+ 'link' => 'Link',
196
+ 'unlink' => 'Remove Link',
197
+ 'image' => 'Edit Image',
198
+ 'charmap' => 'Character Map',
199
+ 'pastetext' => 'Paste as Text',
200
+ 'print' => 'Print',
201
+ 'anchor' => 'Insert Anchor',
202
+ 'searchreplace' => 'Search/Replace',
203
+ 'visualblocks' => 'Visual Blocks',
204
+ // 'visualchars' => 'Hidden Chars',
205
+ 'code' => 'HTML code',
206
+ 'fullscreen' => 'Full Screen',
207
+ 'insertdatetime' => 'Insert Date/Time',
208
+ 'media' => 'Insert Media',
209
+ 'nonbreaking' => 'Non-Break Space',
210
+ 'table' => 'Table',
211
+ 'ltr' => 'Left to Right',
212
+ 'rtl' => 'Right to Left',
213
+ 'emoticons' => 'Emoticons',
214
+ 'forecolor' => 'Text Color',
215
+ 'backcolor' => 'Text Background',
216
+
217
+ // Layer plugin ?
218
+ // 'insertlayer' => 'Layer',
219
+
220
+ // WP
221
+ 'wp_adv' => 'Toolbar toggle',
222
+ 'wp_help' => 'Help',
223
+ 'wp_more' => 'More Tag',
224
+ 'wp_page' => 'Page Break',
225
+ );
226
+
227
+ if ( function_exists('moxiecode_plugins_url') ) {
228
+ if ( moxiecode_plugins_url('imagemanager') )
229
+ $buttons['insertimage'] = 'MC Image Manager';
230
+
231
+ if ( moxiecode_plugins_url('filemanager') )
232
+ $buttons['insertfile'] = 'MC File Manager';
233
  }
234
 
235
+ // add/remove allowed buttons
236
+ $buttons = apply_filters( 'tadv_allowed_buttons', $buttons );
237
+
238
+ $this->all_buttons = $buttons;
239
+ $this->buttons_filter = array_keys( $buttons );
240
+ return $buttons;
241
  }
 
 
242
 
243
+ function get_plugins( $plugins = array() ) {
244
 
245
+ if ( ! is_array( $this->used_buttons ) ) {
246
+ $this->load_settings();
247
+ }
 
248
 
249
+ if ( in_array( 'anchor', $this->used_buttons, true ) )
250
+ $plugins[] = 'anchor';
251
 
252
+ if ( in_array( 'visualchars', $this->used_buttons, true ) )
253
+ $plugins[] = 'visualchars';
254
+
255
+ if ( in_array( 'visualblocks', $this->used_buttons, true ) )
256
+ $plugins[] = 'visualblocks';
257
+
258
+ if ( in_array( 'nonbreaking', $this->used_buttons, true ) )
259
+ $plugins[] = 'nonbreaking';
260
+
261
+ if ( in_array( 'emoticons', $this->used_buttons, true ) )
262
+ $plugins[] = 'emoticons';
263
+
264
+ if ( in_array( 'insertdatetime', $this->used_buttons, true ) )
265
+ $plugins[] = 'insertdatetime';
266
+
267
+ if ( in_array( 'table', $this->used_buttons, true ) )
268
+ $plugins[] = 'table';
269
+
270
+ if ( in_array( 'print', $this->used_buttons, true ) )
271
+ $plugins[] = 'print';
272
+
273
+ if ( in_array( 'searchreplace', $this->used_buttons, true ) )
274
+ $plugins[] = 'searchreplace';
275
+
276
+ if ( in_array( 'insertlayer', $this->used_buttons, true ) )
277
+ $plugins[] = 'layer';
278
+
279
+ // From options
280
+ if ( $this->check_setting( 'advlist' ) )
281
+ $plugins[] = 'advlist';
282
+
283
+ if ( $this->check_setting( 'importcss', true ) )
284
+ $plugins[] = 'importcss';
285
+
286
+ if ( $this->check_setting( 'contextmenu' ) )
287
+ $plugins[] = 'contextmenu';
288
+
289
+ // add/remove used plugins
290
+ $plugins = apply_filters( 'tadv_used_plugins', $plugins, $this->used_buttons );
291
+
292
+ return array_unique( $plugins );
293
  }
 
 
294
 
295
+ private function check_setting( $setting, $admin = false ) {
296
+ if ( ! is_array( $this->options ) ) {
297
+ $this->load_settings();
298
+ }
299
 
300
+ $array = $admin ? $this->admin_options : $this->options;
301
+ return in_array( $setting, $array, true );
302
+ }
 
303
 
304
+ function mce_buttons_1($orig) {
305
+ $buttons_1 = $this->toolbar_1;
306
 
307
  if ( is_array($orig) && ! empty($orig) ) {
308
+ $orig = array_diff( $orig, $this->buttons_filter );
309
+ $buttons_1 = array_merge( $buttons_1, $orig );
310
  }
 
 
 
 
311
 
312
+ return $buttons_1;
313
+ }
314
 
315
+ function mce_buttons_2($orig) {
316
+ $buttons_2 = $this->toolbar_2;
 
 
317
 
318
  if ( is_array($orig) && ! empty($orig) ) {
319
+ $orig = array_diff( $orig, $this->buttons_filter );
320
+ $buttons_2 = array_merge( $buttons_2, $orig );
321
  }
322
+
323
+ return $buttons_2;
324
  }
 
 
325
 
326
+ function mce_buttons_3($orig) {
327
+ $buttons_3 = $this->toolbar_3;
328
 
329
+ if ( is_array($orig) && ! empty($orig) ) {
330
+ $orig = array_diff( $orig, $this->buttons_filter );
331
+ $buttons_3 = array_merge( $buttons_3, $orig );
332
+ }
333
 
334
+ return $buttons_3;
335
+ }
 
 
336
 
337
+ function mce_buttons_4($orig) {
338
+ $buttons_4 = $this->toolbar_4;
339
 
340
+ if ( is_array($orig) && ! empty($orig) ) {
341
+ $orig = array_diff( $orig, $this->buttons_filter );
342
+ $buttons_4 = array_merge( $buttons_4, $orig );
343
+ }
344
 
345
+ return $buttons_4;
346
  }
 
 
347
 
348
+ function mce_options( $init ) {
349
+ if ( $this->check_setting( 'no_autop', true ) ) {
350
+ // $init['wpautop'] = false;
351
+ $init['indent'] = true;
352
+ }
353
 
354
+ if ( $this->check_setting('menubar') ) {
355
+ $init['menubar'] = true;
356
+ }
357
+
358
+ if ( $this->check_setting( 'importcss', true ) ) {
359
+ // $init['importcss_selector_filter'] = 'function(sel){return /^\.[a-z0-9]+$/i.test(sel);}';
360
+ $init['importcss_file_filter'] = 'editor-style.css';
361
+ }
362
+
363
+ return $init;
364
+ }
365
 
366
+ function htmledit( $c ) {
367
+ if ( $this->check_setting( 'no_autop', true ) ) {
368
  $c = str_replace( array('&amp;', '&lt;', '&gt;'), array('&', '<', '>'), $c );
369
+ $c = wpautop( $c );
370
  $c = preg_replace( '/^<p>(https?:\/\/[^<> "]+?)<\/p>$/im', '$1', $c );
371
  $c = htmlspecialchars( $c, ENT_NOQUOTES, get_option( 'blog_charset' ) );
372
  }
373
  return $c;
374
  }
 
 
 
375
 
376
+ function tmce_replace( $mce_settings ) {
377
+ if ( empty( $mce_settings ) || ! $this->check_setting( 'no_autop', true ) ) {
 
 
 
378
  return;
379
  }
380
 
381
  ?>
382
  <script type="text/javascript">
383
  if ( typeof(jQuery) != 'undefined' ) {
384
+ jQuery('body').on( 'afterPreWpautop', function( event, obj ) {
385
  var regex = [
386
  new RegExp('https?://(www\.)?youtube\.com/watch.*', 'i'),
387
  new RegExp('http://youtu.be/*'),
427
  match = match.replace( /<br ?\/?>(\r\n|\n)?/g, '\n' );
428
  return match.replace( /<\/?p( [^>]*)?>(\r\n|\n)?/g, '\n' );
429
  });
430
+ }).on( 'afterWpautop', function( event, obj ) {
431
  obj.data = obj.unfiltered;
432
  });
433
  }
434
  </script>
435
  <?php
436
  }
 
 
437
 
438
+ function load_plugins( $mce_plugins ) {
439
+ // import user created editor-style.css
440
+ if ( $this->check_setting( 'editorstyle', true ) ) {
441
+ add_editor_style();
442
+ }
443
 
444
+ if ( empty( $this->plugins ) || ! is_array( $this->plugins ) ) {
445
+ return $mce_plugins;
446
+ }
 
447
 
448
+ $plugpath = TADV_URL . 'mce/';
449
+ $mce_plugins = (array) $mce_plugins;
450
+ $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
451
 
452
+ foreach ( $this->plugins as $plugin ) {
453
+ $mce_plugins["$plugin"] = $plugpath . $plugin . "/plugin{$suffix}.js";
454
+ }
455
 
456
+ return $mce_plugins;
457
+ }
458
 
459
+ private function parse_buttons( $toolbar_id = false, $buttons = false ) {
460
+ if ( $toolbar_id && ! $buttons && ! empty( $_POST[$toolbar_id] ) )
461
+ $buttons = $_POST[$toolbar_id];
462
 
463
+ if ( is_array( $buttons ) ) {
464
+ $_buttons = array_map( array( @$this, 'filter_name' ), $buttons );
465
+ return implode( ',', array_filter( $_buttons ) );
466
+ }
467
+
468
+ return '';
469
  }
 
 
470
 
471
+ private function filter_name( $str ) {
472
+ if ( empty( $str ) || ! is_string( $str ) )
473
+ return '';
474
+ // Button names
475
+ return preg_replace( '/[^a-z0-9_]/i', '', $str );
476
+ }
477
 
478
+ private function sanitize_settings( $settings ) {
479
+ $_settings = array();
 
 
 
480
 
481
+ if ( ! is_array( $settings ) ) {
482
+ return $_settings;
483
+ }
484
 
485
+ foreach( $settings as $name => $value ) {
486
+ $name = preg_replace( '/[^a-z0-9_]+/', '', $name );
 
 
487
 
488
+ if ( strpos( $name, 'toolbar_' ) === 0 ) {
489
+ $_settings[$name] = $this->parse_buttons( false, explode( ',', $value ) );
490
+ } else if ( 'options' === $name || 'plugins' === $name || 'disabled_plugins' === $name ) {
491
+ $_settings[$name] = preg_replace( '/[^a-z0-9_,]+/', '', $value );
492
+ }
493
  }
 
 
 
 
494
 
495
+ return $_settings;
496
+ }
497
 
498
+ function settings_page() {
499
+ if ( ! defined( 'TADV_ADMIN_PAGE' ) )
500
+ define( 'TADV_ADMIN_PAGE', true );
 
501
 
502
+ include_once( TADV_PATH . 'tadv_admin.php' );
 
503
  }
 
504
 
505
+ function menu() {
506
+ add_options_page( 'TinyMCE Advanced', 'TinyMCE Advanced', 'manage_options', 'tinymce-advanced', array( &$this, 'settings_page' ) );
 
 
 
 
507
  }
 
508
  }
509
 
510
+ new Tinymce_Advanced;
511
+ endif;
utils/editable_selects.js DELETED
@@ -1,70 +0,0 @@
1
- /**
2
- * editable_selects.js
3
- *
4
- * Copyright 2009, Moxiecode Systems AB
5
- * Released under LGPL License.
6
- *
7
- * License: http://tinymce.moxiecode.com/license
8
- * Contributing: http://tinymce.moxiecode.com/contributing
9
- */
10
-
11
- var TinyMCE_EditableSelects = {
12
- editSelectElm : null,
13
-
14
- init : function() {
15
- var nl = document.getElementsByTagName("select"), i, d = document, o;
16
-
17
- for (i=0; i<nl.length; i++) {
18
- if (nl[i].className.indexOf('mceEditableSelect') != -1) {
19
- o = new Option(tinyMCEPopup.editor.translate('value'), '__mce_add_custom__');
20
-
21
- o.className = 'mceAddSelectValue';
22
-
23
- nl[i].options[nl[i].options.length] = o;
24
- nl[i].onchange = TinyMCE_EditableSelects.onChangeEditableSelect;
25
- }
26
- }
27
- },
28
-
29
- onChangeEditableSelect : function(e) {
30
- var d = document, ne, se = window.event ? window.event.srcElement : e.target;
31
-
32
- if (se.options[se.selectedIndex].value == '__mce_add_custom__') {
33
- ne = d.createElement("input");
34
- ne.id = se.id + "_custom";
35
- ne.name = se.name + "_custom";
36
- ne.type = "text";
37
-
38
- ne.style.width = se.offsetWidth + 'px';
39
- se.parentNode.insertBefore(ne, se);
40
- se.style.display = 'none';
41
- ne.focus();
42
- ne.onblur = TinyMCE_EditableSelects.onBlurEditableSelectInput;
43
- ne.onkeydown = TinyMCE_EditableSelects.onKeyDown;
44
- TinyMCE_EditableSelects.editSelectElm = se;
45
- }
46
- },
47
-
48
- onBlurEditableSelectInput : function() {
49
- var se = TinyMCE_EditableSelects.editSelectElm;
50
-
51
- if (se) {
52
- if (se.previousSibling.value != '') {
53
- addSelectValue(document.forms[0], se.id, se.previousSibling.value, se.previousSibling.value);
54
- selectByValue(document.forms[0], se.id, se.previousSibling.value);
55
- } else
56
- selectByValue(document.forms[0], se.id, '');
57
-
58
- se.style.display = 'inline';
59
- se.parentNode.removeChild(se.previousSibling);
60
- TinyMCE_EditableSelects.editSelectElm = null;
61
- }
62
- },
63
-
64
- onKeyDown : function(e) {
65
- e = e || window.event;
66
-
67
- if (e.keyCode == 13)
68
- TinyMCE_EditableSelects.onBlurEditableSelectInput();
69
- }
70
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
utils/form_utils.js DELETED
@@ -1,210 +0,0 @@
1
- /**
2
- * form_utils.js
3
- *
4
- * Copyright 2009, Moxiecode Systems AB
5
- * Released under LGPL License.
6
- *
7
- * License: http://tinymce.moxiecode.com/license
8
- * Contributing: http://tinymce.moxiecode.com/contributing
9
- */
10
-
11
- var themeBaseURL = tinyMCEPopup.editor.baseURI.toAbsolute('themes/' + tinyMCEPopup.getParam("theme"));
12
-
13
- function getColorPickerHTML(id, target_form_element) {
14
- var h = "", dom = tinyMCEPopup.dom;
15
-
16
- if (label = dom.select('label[for=' + target_form_element + ']')[0]) {
17
- label.id = label.id || dom.uniqueId();
18
- }
19
-
20
- h += '<a role="button" aria-labelledby="' + id + '_label" id="' + id + '_link" href="javascript:;" onclick="tinyMCEPopup.pickColor(event,\'' + target_form_element +'\');" onmousedown="return false;" class="pickcolor">';
21
- h += '<span id="' + id + '" title="' + tinyMCEPopup.getLang('browse') + '">&nbsp;<span id="' + id + '_label" class="mceVoiceLabel mceIconOnly" style="display:none;">' + tinyMCEPopup.getLang('browse') + '</span></span></a>';
22
-
23
- return h;
24
- }
25
-
26
- function updateColor(img_id, form_element_id) {
27
- document.getElementById(img_id).style.backgroundColor = document.forms[0].elements[form_element_id].value;
28
- }
29
-
30
- function setBrowserDisabled(id, state) {
31
- var img = document.getElementById(id);
32
- var lnk = document.getElementById(id + "_link");
33
-
34
- if (lnk) {
35
- if (state) {
36
- lnk.setAttribute("realhref", lnk.getAttribute("href"));
37
- lnk.removeAttribute("href");
38
- tinyMCEPopup.dom.addClass(img, 'disabled');
39
- } else {
40
- if (lnk.getAttribute("realhref"))
41
- lnk.setAttribute("href", lnk.getAttribute("realhref"));
42
-
43
- tinyMCEPopup.dom.removeClass(img, 'disabled');
44
- }
45
- }
46
- }
47
-
48
- function getBrowserHTML(id, target_form_element, type, prefix) {
49
- var option = prefix + "_" + type + "_browser_callback", cb, html;
50
-
51
- cb = tinyMCEPopup.getParam(option, tinyMCEPopup.getParam("file_browser_callback"));
52
-
53
- if (!cb)
54
- return "";
55
-
56
- html = "";
57
- html += '<a id="' + id + '_link" href="javascript:openBrowser(\'' + id + '\',\'' + target_form_element + '\', \'' + type + '\',\'' + option + '\');" onmousedown="return false;" class="browse">';
58
- html += '<span id="' + id + '" title="' + tinyMCEPopup.getLang('browse') + '">&nbsp;</span></a>';
59
-
60
- return html;
61
- }
62
-
63
- function openBrowser(img_id, target_form_element, type, option) {
64
- var img = document.getElementById(img_id);
65
-
66
- if (img.className != "mceButtonDisabled")
67
- tinyMCEPopup.openBrowser(target_form_element, type, option);
68
- }
69
-
70
- function selectByValue(form_obj, field_name, value, add_custom, ignore_case) {
71
- if (!form_obj || !form_obj.elements[field_name])
72
- return;
73
-
74
- if (!value)
75
- value = "";
76
-
77
- var sel = form_obj.elements[field_name];
78
-
79
- var found = false;
80
- for (var i=0; i<sel.options.length; i++) {
81
- var option = sel.options[i];
82
-
83
- if (option.value == value || (ignore_case && option.value.toLowerCase() == value.toLowerCase())) {
84
- option.selected = true;
85
- found = true;
86
- } else
87
- option.selected = false;
88
- }
89
-
90
- if (!found && add_custom && value != '') {
91
- var option = new Option(value, value);
92
- option.selected = true;
93
- sel.options[sel.options.length] = option;
94
- sel.selectedIndex = sel.options.length - 1;
95
- }
96
-
97
- return found;
98
- }
99
-
100
- function getSelectValue(form_obj, field_name) {
101
- var elm = form_obj.elements[field_name];
102
-
103
- if (elm == null || elm.options == null || elm.selectedIndex === -1)
104
- return "";
105
-
106
- return elm.options[elm.selectedIndex].value;
107
- }
108
-
109
- function addSelectValue(form_obj, field_name, name, value) {
110
- var s = form_obj.elements[field_name];
111
- var o = new Option(name, value);
112
- s.options[s.options.length] = o;
113
- }
114
-
115
- function addClassesToList(list_id, specific_option) {
116
- // Setup class droplist
117
- var styleSelectElm = document.getElementById(list_id);
118
- var styles = tinyMCEPopup.getParam('theme_advanced_styles', false);
119
- styles = tinyMCEPopup.getParam(specific_option, styles);
120
-
121
- if (styles) {
122
- var stylesAr = styles.split(';');
123
-
124
- for (var i=0; i<stylesAr.length; i++) {
125
- if (stylesAr != "") {
126
- var key, value;
127
-
128
- key = stylesAr[i].split('=')[0];
129
- value = stylesAr[i].split('=')[1];
130
-
131
- styleSelectElm.options[styleSelectElm.length] = new Option(key, value);
132
- }
133
- }
134
- } else {
135
- tinymce.each(tinyMCEPopup.editor.dom.getClasses(), function(o) {
136
- styleSelectElm.options[styleSelectElm.length] = new Option(o.title || o['class'], o['class']);
137
- });
138
- }
139
- }
140
-
141
- function isVisible(element_id) {
142
- var elm = document.getElementById(element_id);
143
-
144
- return elm && elm.style.display != "none";
145
- }
146
-
147
- function convertRGBToHex(col) {
148
- var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi");
149
-
150
- var rgb = col.replace(re, "$1,$2,$3").split(',');
151
- if (rgb.length == 3) {
152
- r = parseInt(rgb[0]).toString(16);
153
- g = parseInt(rgb[1]).toString(16);
154
- b = parseInt(rgb[2]).toString(16);
155
-
156
- r = r.length == 1 ? '0' + r : r;
157
- g = g.length == 1 ? '0' + g : g;
158
- b = b.length == 1 ? '0' + b : b;
159
-
160
- return "#" + r + g + b;
161
- }
162
-
163
- return col;
164
- }
165
-
166
- function convertHexToRGB(col) {
167
- if (col.indexOf('#') != -1) {
168
- col = col.replace(new RegExp('[^0-9A-F]', 'gi'), '');
169
-
170
- r = parseInt(col.substring(0, 2), 16);
171
- g = parseInt(col.substring(2, 4), 16);
172
- b = parseInt(col.substring(4, 6), 16);
173
-
174
- return "rgb(" + r + "," + g + "," + b + ")";
175
- }
176
-
177
- return col;
178
- }
179
-
180
- function trimSize(size) {
181
- return size.replace(/([0-9\.]+)(px|%|in|cm|mm|em|ex|pt|pc)/i, '$1$2');
182
- }
183
-
184
- function getCSSSize(size) {
185
- size = trimSize(size);
186
-
187
- if (size == "")
188
- return "";
189
-
190
- // Add px
191
- if (/^[0-9]+$/.test(size))
192
- size += 'px';
193
- // Sanity check, IE doesn't like broken values
194
- else if (!(/^[0-9\.]+(px|%|in|cm|mm|em|ex|pt|pc)$/i.test(size)))
195
- return "";
196
-
197
- return size;
198
- }
199
-
200
- function getStyle(elm, attrib, style) {
201
- var val = tinyMCEPopup.dom.getAttrib(elm, attrib);
202
-
203
- if (val != '')
204
- return '' + val;
205
-
206
- if (typeof(style) == 'undefined')
207
- style = attrib;
208
-
209
- return tinyMCEPopup.dom.getStyle(elm, style);
210
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
utils/mctabs.js DELETED
@@ -1,162 +0,0 @@
1
- /**
2
- * mctabs.js
3
- *
4
- * Copyright 2009, Moxiecode Systems AB
5
- * Released under LGPL License.
6
- *
7
- * License: http://tinymce.moxiecode.com/license
8
- * Contributing: http://tinymce.moxiecode.com/contributing
9
- */
10
-
11
- function MCTabs() {
12
- this.settings = [];
13
- this.onChange = tinyMCEPopup.editor.windowManager.createInstance('tinymce.util.Dispatcher');
14
- };
15
-
16
- MCTabs.prototype.init = function(settings) {
17
- this.settings = settings;
18
- };
19
-
20
- MCTabs.prototype.getParam = function(name, default_value) {
21
- var value = null;
22
-
23
- value = (typeof(this.settings[name]) == "undefined") ? default_value : this.settings[name];
24
-
25
- // Fix bool values
26
- if (value == "true" || value == "false")
27
- return (value == "true");
28
-
29
- return value;
30
- };
31
-
32
- MCTabs.prototype.showTab =function(tab){
33
- tab.className = 'current';
34
- tab.setAttribute("aria-selected", true);
35
- tab.setAttribute("aria-expanded", true);
36
- tab.tabIndex = 0;
37
- };
38
-
39
- MCTabs.prototype.hideTab =function(tab){
40
- var t=this;
41
-
42
- tab.className = '';
43
- tab.setAttribute("aria-selected", false);
44
- tab.setAttribute("aria-expanded", false);
45
- tab.tabIndex = -1;
46
- };
47
-
48
- MCTabs.prototype.showPanel = function(panel) {
49
- panel.className = 'current';
50
- panel.setAttribute("aria-hidden", false);
51
- };
52
-
53
- MCTabs.prototype.hidePanel = function(panel) {
54
- panel.className = 'panel';
55
- panel.setAttribute("aria-hidden", true);
56
- };
57
-
58
- MCTabs.prototype.getPanelForTab = function(tabElm) {
59
- return tinyMCEPopup.dom.getAttrib(tabElm, "aria-controls");
60
- };
61
-
62
- MCTabs.prototype.displayTab = function(tab_id, panel_id, avoid_focus) {
63
- var panelElm, panelContainerElm, tabElm, tabContainerElm, selectionClass, nodes, i, t = this;
64
-
65
- tabElm = document.getElementById(tab_id);
66
-
67
- if (panel_id === undefined) {
68
- panel_id = t.getPanelForTab(tabElm);
69
- }
70
-
71
- panelElm= document.getElementById(panel_id);
72
- panelContainerElm = panelElm ? panelElm.parentNode : null;
73
- tabContainerElm = tabElm ? tabElm.parentNode : null;
74
- selectionClass = t.getParam('selection_class', 'current');
75
-
76
- if (tabElm && tabContainerElm) {
77
- nodes = tabContainerElm.childNodes;
78
-
79
- // Hide all other tabs
80
- for (i = 0; i < nodes.length; i++) {
81
- if (nodes[i].nodeName == "LI") {
82
- t.hideTab(nodes[i]);
83
- }
84
- }
85
-
86
- // Show selected tab
87
- t.showTab(tabElm);
88
- }
89
-
90
- if (panelElm && panelContainerElm) {
91
- nodes = panelContainerElm.childNodes;
92
-
93
- // Hide all other panels
94
- for (i = 0; i < nodes.length; i++) {
95
- if (nodes[i].nodeName == "DIV")
96
- t.hidePanel(nodes[i]);
97
- }
98
-
99
- if (!avoid_focus) {
100
- tabElm.focus();
101
- }
102
-
103
- // Show selected panel
104
- t.showPanel(panelElm);
105
- }
106
- };
107
-
108
- MCTabs.prototype.getAnchor = function() {
109
- var pos, url = document.location.href;
110
-
111
- if ((pos = url.lastIndexOf('#')) != -1)
112
- return url.substring(pos + 1);
113
-
114
- return "";
115
- };
116
-
117
-
118
- //Global instance
119
- var mcTabs = new MCTabs();
120
-
121
- tinyMCEPopup.onInit.add(function() {
122
- var tinymce = tinyMCEPopup.getWin().tinymce, dom = tinyMCEPopup.dom, each = tinymce.each;
123
-
124
- each(dom.select('div.tabs'), function(tabContainerElm) {
125
- var keyNav;
126
-
127
- dom.setAttrib(tabContainerElm, "role", "tablist");
128
-
129
- var items = tinyMCEPopup.dom.select('li', tabContainerElm);
130
- var action = function(id) {
131
- mcTabs.displayTab(id, mcTabs.getPanelForTab(id));
132
- mcTabs.onChange.dispatch(id);
133
- };
134
-
135
- each(items, function(item) {
136
- dom.setAttrib(item, 'role', 'tab');
137
- dom.bind(item, 'click', function(evt) {
138
- action(item.id);
139
- });
140
- });
141
-
142
- dom.bind(dom.getRoot(), 'keydown', function(evt) {
143
- if (evt.keyCode === 9 && evt.ctrlKey && !evt.altKey) { // Tab
144
- keyNav.moveFocus(evt.shiftKey ? -1 : 1);
145
- tinymce.dom.Event.cancel(evt);
146
- }
147
- });
148
-
149
- each(dom.select('a', tabContainerElm), function(a) {
150
- dom.setAttrib(a, 'tabindex', '-1');
151
- });
152
-
153
- keyNav = tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', {
154
- root: tabContainerElm,
155
- items: items,
156
- onAction: action,
157
- actOnFocus: true,
158
- enableLeftRight: true,
159
- enableUpDown: true
160
- }, tinyMCEPopup.dom);
161
- });
162
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
utils/validate.js DELETED
@@ -1,252 +0,0 @@
1
- /**
2
- * validate.js
3
- *
4
- * Copyright 2009, Moxiecode Systems AB
5
- * Released under LGPL License.
6
- *
7
- * License: http://tinymce.moxiecode.com/license
8
- * Contributing: http://tinymce.moxiecode.com/contributing
9
- */
10
-
11
- /**
12
- // String validation:
13
-
14
- if (!Validator.isEmail('myemail'))
15
- alert('Invalid email.');
16
-
17
- // Form validation:
18
-
19
- var f = document.forms['myform'];
20
-
21
- if (!Validator.isEmail(f.myemail))
22
- alert('Invalid email.');
23
- */
24
-
25
- var Validator = {
26
- isEmail : function(s) {
27
- return this.test(s, '^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+@[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$');
28
- },
29
-
30
- isAbsUrl : function(s) {
31
- return this.test(s, '^(news|telnet|nttp|file|http|ftp|https)://[-A-Za-z0-9\\.]+\\/?.*$');
32
- },
33
-
34
- isSize : function(s) {
35
- return this.test(s, '^[0-9.]+(%|in|cm|mm|em|ex|pt|pc|px)?$');
36
- },
37
-
38
- isId : function(s) {
39
- return this.test(s, '^[A-Za-z_]([A-Za-z0-9_])*$');
40
- },
41
-
42
- isEmpty : function(s) {
43
- var nl, i;
44
-
45
- if (s.nodeName == 'SELECT' && s.selectedIndex < 1)
46
- return true;
47
-
48
- if (s.type == 'checkbox' && !s.checked)
49
- return true;
50
-
51
- if (s.type == 'radio') {
52
- for (i=0, nl = s.form.elements; i<nl.length; i++) {
53
- if (nl[i].type == "radio" && nl[i].name == s.name && nl[i].checked)
54
- return false;
55
- }
56
-
57
- return true;
58
- }
59
-
60
- return new RegExp('^\\s*$').test(s.nodeType == 1 ? s.value : s);
61
- },
62
-
63
- isNumber : function(s, d) {
64
- return !isNaN(s.nodeType == 1 ? s.value : s) && (!d || !this.test(s, '^-?[0-9]*\\.[0-9]*$'));
65
- },
66
-
67
- test : function(s, p) {
68
- s = s.nodeType == 1 ? s.value : s;
69
-
70
- return s == '' || new RegExp(p).test(s);
71
- }
72
- };
73
-
74
- var AutoValidator = {
75
- settings : {
76
- id_cls : 'id',
77
- int_cls : 'int',
78
- url_cls : 'url',
79
- number_cls : 'number',
80
- email_cls : 'email',
81
- size_cls : 'size',
82
- required_cls : 'required',
83
- invalid_cls : 'invalid',
84
- min_cls : 'min',
85
- max_cls : 'max'
86
- },
87
-
88
- init : function(s) {
89
- var n;
90
-
91
- for (n in s)
92
- this.settings[n] = s[n];
93
- },
94
-
95
- validate : function(f) {
96
- var i, nl, s = this.settings, c = 0;
97
-
98
- nl = this.tags(f, 'label');
99
- for (i=0; i<nl.length; i++) {
100
- this.removeClass(nl[i], s.invalid_cls);
101
- nl[i].setAttribute('aria-invalid', false);
102
- }
103
-
104
- c += this.validateElms(f, 'input');
105
- c += this.validateElms(f, 'select');
106
- c += this.validateElms(f, 'textarea');
107
-
108
- return c == 3;
109
- },
110
-
111
- invalidate : function(n) {
112
- this.mark(n.form, n);
113
- },
114
-
115
- getErrorMessages : function(f) {
116
- var nl, i, s = this.settings, field, msg, values, messages = [], ed = tinyMCEPopup.editor;
117
- nl = this.tags(f, "label");
118
- for (i=0; i<nl.length; i++) {
119
- if (this.hasClass(nl[i], s.invalid_cls)) {
120
- field = document.getElementById(nl[i].getAttribute("for"));
121
- values = { field: nl[i].textContent };
122
- if (this.hasClass(field, s.min_cls, true)) {
123
- message = ed.getLang('invalid_data_min');
124
- values.min = this.getNum(field, s.min_cls);
125
- } else if (this.hasClass(field, s.number_cls)) {
126
- message = ed.getLang('invalid_data_number');
127
- } else if (this.hasClass(field, s.size_cls)) {
128
- message = ed.getLang('invalid_data_size');
129
- } else {
130
- message = ed.getLang('invalid_data');
131
- }
132
-
133
- message = message.replace(/{\#([^}]+)\}/g, function(a, b) {
134
- return values[b] || '{#' + b + '}';
135
- });
136
- messages.push(message);
137
- }
138
- }
139
- return messages;
140
- },
141
-
142
- reset : function(e) {
143
- var t = ['label', 'input', 'select', 'textarea'];
144
- var i, j, nl, s = this.settings;
145
-
146
- if (e == null)
147
- return;
148
-
149
- for (i=0; i<t.length; i++) {
150
- nl = this.tags(e.form ? e.form : e, t[i]);
151
- for (j=0; j<nl.length; j++) {
152
- this.removeClass(nl[j], s.invalid_cls);
153
- nl[j].setAttribute('aria-invalid', false);
154
- }
155
- }
156
- },
157
-
158
- validateElms : function(f, e) {
159
- var nl, i, n, s = this.settings, st = true, va = Validator, v;
160
-
161
- nl = this.tags(f, e);
162
- for (i=0; i<nl.length; i++) {
163
- n = nl[i];
164
-
165
- this.removeClass(n, s.invalid_cls);
166
-
167
- if (this.hasClass(n, s.required_cls) && va.isEmpty(n))
168
- st = this.mark(f, n);
169
-
170
- if (this.hasClass(n, s.number_cls) && !va.isNumber(n))
171
- st = this.mark(f, n);
172
-
173
- if (this.hasClass(n, s.int_cls) && !va.isNumber(n, true))
174
- st = this.mark(f, n);
175
-
176
- if (this.hasClass(n, s.url_cls) && !va.isAbsUrl(n))
177
- st = this.mark(f, n);
178
-
179
- if (this.hasClass(n, s.email_cls) && !va.isEmail(n))
180
- st = this.mark(f, n);
181
-
182
- if (this.hasClass(n, s.size_cls) && !va.isSize(n))
183
- st = this.mark(f, n);
184
-
185
- if (this.hasClass(n, s.id_cls) && !va.isId(n))
186
- st = this.mark(f, n);
187
-
188
- if (this.hasClass(n, s.min_cls, true)) {
189
- v = this.getNum(n, s.min_cls);
190
-
191
- if (isNaN(v) || parseInt(n.value) < parseInt(v))
192
- st = this.mark(f, n);
193
- }
194
-
195
- if (this.hasClass(n, s.max_cls, true)) {
196
- v = this.getNum(n, s.max_cls);
197
-
198
- if (isNaN(v) || parseInt(n.value) > parseInt(v))
199
- st = this.mark(f, n);
200
- }
201
- }
202
-
203
- return st;
204
- },
205
-
206
- hasClass : function(n, c, d) {
207
- return new RegExp('\\b' + c + (d ? '[0-9]+' : '') + '\\b', 'g').test(n.className);
208
- },
209
-
210
- getNum : function(n, c) {
211
- c = n.className.match(new RegExp('\\b' + c + '([0-9]+)\\b', 'g'))[0];
212
- c = c.replace(/[^0-9]/g, '');
213
-
214
- return c;
215
- },
216
-
217
- addClass : function(n, c, b) {
218
- var o = this.removeClass(n, c);
219
- n.className = b ? c + (o != '' ? (' ' + o) : '') : (o != '' ? (o + ' ') : '') + c;
220
- },
221
-
222
- removeClass : function(n, c) {
223
- c = n.className.replace(new RegExp("(^|\\s+)" + c + "(\\s+|$)"), ' ');
224
- return n.className = c != ' ' ? c : '';
225
- },
226
-
227
- tags : function(f, s) {
228
- return f.getElementsByTagName(s);
229
- },
230
-
231
- mark : function(f, n) {
232
- var s = this.settings;
233
-
234
- this.addClass(n, s.invalid_cls);
235
- n.setAttribute('aria-invalid', 'true');
236
- this.markLabels(f, n, s.invalid_cls);
237
-
238
- return false;
239
- },
240
-
241
- markLabels : function(f, n, ic) {
242
- var nl, i;
243
-
244
- nl = this.tags(f, "label");
245
- for (i=0; i<nl.length; i++) {
246
- if (nl[i].getAttribute("for") == n.id || nl[i].htmlFor == n.id)
247
- this.addClass(nl[i], ic);
248
- }
249
-
250
- return null;
251
- }
252
- };