Custom Post Types and Custom Fields creator – WCK - Version 1.0.8

Version Description

  • Upload Field now uses the media manager added in WP 3.5
  • Now we prevent "Meta Field" and "Field Title" to be named "content" or "action" in Custom Fields Creator to prevent conflicts with existing WordPress Fields
  • Fixed bug in Custom Fields Creator that didn't display "0" values
  • Added Spanish translation ( thanks to Andrew Kurtis for providing the translation files )
Download this release

Release Info

Developer madalin.ungureanu
Plugin Icon 128x128 Custom Post Types and Custom Fields creator – WCK
Version 1.0.8
Comparing to
See all releases

Code changes from version 1.0.7 to 1.0.8

Files changed (65) hide show
  1. css/wck-cptc.css +11 -11
  2. languages/wck-es_ES.mo +0 -0
  3. languages/wck-es_ES.po +1157 -0
  4. readme.txt +9 -2
  5. wck-cfc.php +47 -9
  6. wck-cptc.php +1 -1
  7. wck-ctc.php +1 -1
  8. wck-template-api/wck-template-api-class.php +1 -1
  9. wck.php +1 -1
  10. wordpress-creation-kit-api/assets/js/tiny_mce/license.txt +504 -504
  11. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/directionality/editor_plugin_src.js +81 -81
  12. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/fullscreen/editor_plugin_src.js +158 -158
  13. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/fullscreen/fullscreen.htm +110 -110
  14. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +699 -699
  15. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css +90 -90
  16. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/inlinepopups/template.htm +387 -387
  17. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/media/css/media.css +17 -17
  18. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/media/editor_plugin_src.js +898 -898
  19. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/media/js/embed.js +73 -73
  20. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/media/js/media.js +470 -470
  21. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/media/langs/en_dlg.js +1 -1
  22. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/media/media.htm +922 -922
  23. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/paste/editor_plugin_src.js +871 -871
  24. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/paste/js/pastetext.js +36 -36
  25. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/paste/js/pasteword.js +51 -51
  26. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/paste/pastetext.htm +26 -26
  27. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/paste/pasteword.htm +21 -21
  28. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/spellchecker/css/content.css +1 -1
  29. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/spellchecker/editor_plugin_src.js +436 -436
  30. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/tabfocus/editor_plugin_src.js +122 -122
  31. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/wordcount/editor_plugin_src.js +122 -122
  32. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/about.htm +52 -52
  33. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/anchor.htm +26 -26
  34. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/charmap.htm +55 -55
  35. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/color_picker.htm +70 -70
  36. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/editor_template_src.js +1487 -1487
  37. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/image.htm +80 -80
  38. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/js/about.js +73 -73
  39. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/js/anchor.js +56 -56
  40. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/js/charmap.js +363 -363
  41. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/js/color_picker.js +345 -345
  42. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/js/image.js +253 -253
  43. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/js/link.js +159 -159
  44. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/js/source_editor.js +78 -78
  45. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/langs/en_dlg.js +1 -1
  46. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/link.htm +57 -57
  47. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/shortcuts.htm +47 -47
  48. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/default/content.css +50 -50
  49. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/default/dialog.css +118 -118
  50. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/default/ui.css +219 -219
  51. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/wp_theme/content.css +144 -144
  52. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/wp_theme/dialog.css +121 -121
  53. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/wp_theme/ui.css +1 -1
  54. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/source_editor.htm +25 -25
  55. wordpress-creation-kit-api/assets/js/tiny_mce/tiny_mce_popup.js +4 -4
  56. wordpress-creation-kit-api/assets/js/tiny_mce/utils/editable_selects.js +70 -70
  57. wordpress-creation-kit-api/assets/js/tiny_mce/utils/form_utils.js +210 -210
  58. wordpress-creation-kit-api/assets/js/tiny_mce/utils/mctabs.js +161 -161
  59. wordpress-creation-kit-api/assets/js/tiny_mce/utils/validate.js +252 -252
  60. wordpress-creation-kit-api/assets/js/tiny_mce/wck_tiny_mce_init.js +1 -0
  61. wordpress-creation-kit-api/fields/checkbox.php +1 -1
  62. wordpress-creation-kit-api/fields/upload.js +123 -0
  63. wordpress-creation-kit-api/fields/upload.php +42 -37
  64. wordpress-creation-kit-api/fields/wysiwyg editor.php +1 -1
  65. wordpress-creation-kit-api/wordpress-creation-kit.php +40 -131
css/wck-cptc.css CHANGED
@@ -1,12 +1,12 @@
1
- #wck_cptc .row-supports .mb-right-column > div, #container_wck_cptc .row-supports .mb-right-column > div{
2
- width:200px;
3
- }
4
-
5
- #wck_cptc .row-supports .mb-right-column > div:nth-child(2n), #container_wck_cptc .row-supports .mb-right-column > div:nth-child(2n){
6
- float:left;
7
- }
8
-
9
- #wck_cptc .row-supports .mb-right-column > div:nth-child(2n+1), #container_wck_cptc .row-supports .mb-right-column > div:nth-child(2n+1){
10
- float:left;
11
- clear:left;
12
  }
1
+ #wck_cptc .row-supports .mb-right-column > div, #container_wck_cptc .row-supports .mb-right-column > div{
2
+ width:200px;
3
+ }
4
+
5
+ #wck_cptc .row-supports .mb-right-column > div:nth-child(2n), #container_wck_cptc .row-supports .mb-right-column > div:nth-child(2n){
6
+ float:left;
7
+ }
8
+
9
+ #wck_cptc .row-supports .mb-right-column > div:nth-child(2n+1), #container_wck_cptc .row-supports .mb-right-column > div:nth-child(2n+1){
10
+ float:left;
11
+ clear:left;
12
  }
languages/wck-es_ES.mo ADDED
Binary file
languages/wck-es_ES.po ADDED
@@ -0,0 +1,1157 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: WCK\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2013-06-13 16:28+0200\n"
6
+ "PO-Revision-Date: 2014-01-24 11:10+0100\n"
7
+ "Last-Translator: jelena kovacevic <jecajeca260@gmail.com>\n"
8
+ "Language-Team: \n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e\n"
13
+ "X-Poedit-Basepath: .\n"
14
+ "X-Generator: Poedit 1.5.5\n"
15
+ "X-Poedit-SearchPath-0: d:\\!!!!!!!!!\\Free Version\\wck\n"
16
+
17
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:26
18
+ msgid "Add New Meta Box"
19
+ msgstr "Añadir nueva Meta Box"
20
+
21
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:27
22
+ msgid "Edit Meta Box"
23
+ msgstr "Editar Meta Box"
24
+
25
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:28
26
+ msgid "New Meta Box"
27
+ msgstr "Nueva Meta Box"
28
+
29
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:29 Version\wck/wck-sas.php:87
30
+ msgid "Custom Fields Creator"
31
+ msgstr "Creador de Campos Personalizados"
32
+
33
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:30
34
+ msgid "View Meta Box"
35
+ msgstr "Ver Meta Box"
36
+
37
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:31
38
+ msgid "Search Meta Boxes"
39
+ msgstr "Buscar Meta Boxes"
40
+
41
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:32
42
+ msgid "No Meta Boxes found"
43
+ msgstr "No se encontraron Meta Boxes"
44
+
45
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:33
46
+ msgid "No Meta Boxes found in Trash"
47
+ msgstr "No se encontraron Meta Boxes en la basura"
48
+
49
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:35
50
+ msgid "Custom Meta Boxes"
51
+ msgstr "Meta Boxes personalizados"
52
+
53
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:84
54
+ msgid "Meta name"
55
+ msgstr "Nombre Meta"
56
+
57
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:84
58
+ msgid ""
59
+ "The name of the meta field. It is the name by which you will query the data "
60
+ "in the frontend. Must be unique, only lowercase letters, no spaces and no "
61
+ "special characters."
62
+ msgstr ""
63
+ "El nombre del campo de metadatos. Es el nombre con el que podrás consultar "
64
+ "los datos en el frontend. Debe ser único, sólo letras minúsculas, sin "
65
+ "espacios ni caracteres especiales."
66
+
67
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:85 Version\wck/wck-cfc.php:442
68
+ msgid "Post Type"
69
+ msgstr "Tipo de Publicación"
70
+
71
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:85
72
+ msgid "What post type the meta box should be attached to"
73
+ msgstr "A qué tipo de publicación debe adjuntarse el Meta Box"
74
+
75
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:86
76
+ msgid "Repeater"
77
+ msgstr "Repetidor"
78
+
79
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:86
80
+ msgid ""
81
+ "Whether the box supports just one entry or if it is a repeater field. By "
82
+ "default it is a single field."
83
+ msgstr ""
84
+ "Si el cuadro es compatible con una sola entrada o si se trata de un campo "
85
+ "repetidor. Por defecto es un solo campo."
86
+
87
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:87
88
+ msgid "Sortable"
89
+ msgstr "Ordenable"
90
+
91
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:87
92
+ msgid ""
93
+ "Whether the entries are sortable or not. Thsi is valid for repeater fields."
94
+ msgstr ""
95
+ "Si las entradas se pueden ordenar o no. Esto es válido para los campos de "
96
+ "repetidores."
97
+
98
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:88
99
+ msgid "Post ID"
100
+ msgstr "Identificación de la publicación"
101
+
102
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:88
103
+ msgid "ID of a post on which the meta box should appear."
104
+ msgstr "Identificación de una publicación en la que debe aparecer el Meta Box."
105
+
106
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:92 Version\wck/wck-cfc.php:443
107
+ msgid "Page Template"
108
+ msgstr "Plantilla de Página"
109
+
110
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:92
111
+ msgid ""
112
+ "If post type is \"page\" you can further select a page templete. The meta "
113
+ "box will only appear on the page that has that selected page template."
114
+ msgstr ""
115
+ "Si el tipo de publicación es \"página\" se puede seleccionar además un "
116
+ "templete de página. El Meta Box solo se mostrará en la página que tiene esa "
117
+ "plantilla de página seleccionada."
118
+
119
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:97 Version\wck/wck-cfc.php:536
120
+ msgid "Meta Box Arguments"
121
+ msgstr "Argumentos Meta Box"
122
+
123
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:114
124
+ msgid "Field Title"
125
+ msgstr "Título Campo"
126
+
127
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:114
128
+ msgid "Title of the field. A slug will automatically be generated."
129
+ msgstr "Título del Campo. Automáticamente se genera un slug."
130
+
131
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:115
132
+ msgid "Field Type"
133
+ msgstr "Tipo de Campo"
134
+
135
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:115
136
+ msgid "The field type"
137
+ msgstr "El tipo de campo"
138
+
139
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:116 Version\wck/wck-cptc.php:48
140
+ msgid "Description"
141
+ msgstr "Descripción"
142
+
143
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:117
144
+ msgid "Required"
145
+ msgstr "Requerido"
146
+
147
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:117
148
+ msgid "Whether the field is required or not"
149
+ msgstr "Si el campo es obligatorio o no"
150
+
151
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:118
152
+ msgid "Default Value"
153
+ msgstr "Valor predeterminado"
154
+
155
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:118
156
+ msgid ""
157
+ "Default value of the field. For Checkboxes if there are multiple values "
158
+ "separete them with a \",\""
159
+ msgstr ""
160
+ "Valor predeterminado del campo. Para Casillas de verificación, si hay "
161
+ "múltiples valores separarlas con un \",\""
162
+
163
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:119
164
+ msgid "Options"
165
+ msgstr "Opciones"
166
+
167
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:119
168
+ msgid ""
169
+ "Options for field types \"select\", \"checkbox\" and \"radio\". For multiple "
170
+ "options separete them with a \",\". You can use the following structure if "
171
+ "you want the label to be different from the value: %LabelOne%valueone,"
172
+ "%LabelTwo%valuetwo,%LabelThree%valuethree"
173
+ msgstr ""
174
+ "Opciones de tipos de campo \"seleccionar\", \"casilla\" y \" radio\". Para "
175
+ "múltiples opciones de ellas separarlas con un \",\". Puede utilizar la "
176
+ "siguiente estructura, si desea que la etiqueta sea diferente del valor: "
177
+ "%LabelOne%valueone,%LabelTwo%valuetwo,%LabelThree%valuethree"
178
+
179
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:120
180
+ msgid "Attach upload to post"
181
+ msgstr "Adjuntar carga para publicación"
182
+
183
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:120
184
+ msgid "Whether or not the uploads should be attached to the post"
185
+ msgstr "Si los archivos a subir deben o no estar adjuntos a la publicación"
186
+
187
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:127 Version\wck/wck-cfc.php:542
188
+ msgid "Meta Box Fields"
189
+ msgstr "Campos Meta Box"
190
+
191
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:140
192
+ msgid "Enter below the arguments for the meta box."
193
+ msgstr "Escriba aquí los argumentos para la Meta Box"
194
+
195
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:220
196
+ msgid "Slug:"
197
+ msgstr "Slug:"
198
+
199
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:220
200
+ msgid ""
201
+ "(Note:changing the slug when you already have a lot of existing entries may "
202
+ "result in unexpected behavior.)"
203
+ msgstr ""
204
+ "(Nota: cambiar el slug cuando ya tiene una gran cantidad de entradas "
205
+ "existentes puede provocar un comportamiento inesperado)"
206
+
207
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:355
208
+ msgid "Choose a different Meta Name as this one contains spaces\n"
209
+ msgstr "Elija un nombre diferente Meta pues éste contiene espacios\n"
210
+
211
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:357
212
+ msgid "Choose a different Meta Name as this one already exists\n"
213
+ msgstr "Elija un nombre diferente Meta pues ya existe éste\n"
214
+
215
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:441
216
+ msgid "Id"
217
+ msgstr "Id"
218
+
219
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:506 Version\wck/wck-cptc.php:257
220
+ #: Version\wck/wck-ctc.php:215 Version\wck/wck.php:38
221
+ msgid "Wordpress Creation Kit"
222
+ msgstr "Wordpress Creación Kit"
223
+
224
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:530 Version\wck/wck-cptc.php:282
225
+ #: Version\wck/wck-ctc.php:239
226
+ msgid "Overview"
227
+ msgstr "Descripción general"
228
+
229
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:531
230
+ msgid ""
231
+ "WCK Custom Fields Creator allows you to easily create custom meta boxes for "
232
+ "Wordpress without any programming knowledge."
233
+ msgstr ""
234
+ "WCK Custom Fields Creator le permite crear fácilmente Meta Boxes para "
235
+ "Wordpress sin ningún conocimiento de programación."
236
+
237
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:537
238
+ msgid ""
239
+ "Define here the rules for the meta box. This rules are used to set up where "
240
+ "the meta box will appear, it's type and also the meta key name stored in the "
241
+ "database. The name of the entry (Enter title here) will be used as the meta "
242
+ "box title."
243
+ msgstr ""
244
+ "Defina aquí las reglas para la meta box. Estas reglas se usan para "
245
+ "establecer donde aparecerá el Meta Box, su tipo y también el nombre de clave "
246
+ "meta almacenada en la base de datos. El nombre de la entrada (Introduzca el "
247
+ "título aquí) será utilizado como el título del Meta Box."
248
+
249
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:543
250
+ msgid ""
251
+ "Define here the fields contained in the meta box. From \"Field Title\" a "
252
+ "slug will be automatically generated and you will use this slug to display "
253
+ "the data in the frontend."
254
+ msgstr ""
255
+ "Defina aquí los campos contenidos en la caja de meta. . Desde \"Título de "
256
+ "Campo\" un slug se ​​generará automáticamente y usted usará este slug para "
257
+ "mostrar los datos en el frontend."
258
+
259
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:548
260
+ msgid "CFC Frontend Example"
261
+ msgstr "Ejemplo de Frontend CFC"
262
+
263
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:549
264
+ msgid ""
265
+ "Let's consider we have a meta box with the following arguments:<br /> - Meta "
266
+ "name: books <br /> - Post Type: post <br />And we also have two fields "
267
+ "deffined:<br /> - A text field with the Field Title: Book name <br /> - And "
268
+ "another text field with the Field Title: Author name "
269
+ msgstr ""
270
+ "Consideremos que tenemos una meta box con los siguientes argumentos: <br /> "
271
+ "- Nombre Meta: libros <br /> - Tipo de Publicación: publicación <br /> Y "
272
+ "también tenemos dos campos definidos: <br /> - Otro campo de texto con el "
273
+ "Título de Campo: Nombre del Libro <br /> - Y otro campo de texto con el "
274
+ "título del campo : Nombre del autor"
275
+
276
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:549
277
+ msgid ""
278
+ "You will notice that slugs will automatically be created for the two text "
279
+ "fields. For \"Book name\" the slug will be \"book-name\" and for \"Author "
280
+ "name\" the slug will be \"author-name\""
281
+ msgstr ""
282
+ "Usted se dará cuenta de que los slugs se crearán automáticamente para los "
283
+ "dos campos de texto. Para \"Book name\" el slug será \"book-name \" y para "
284
+ "\"Nombre de autor\" el slug será \"author-name\""
285
+
286
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:549
287
+ msgid ""
288
+ "Let's see what the code for displaying the meta box values in single.php of "
289
+ "your theme would be:"
290
+ msgstr ""
291
+ "Vamos a ver cuál es el código para mostrar los valores del Meta Box en una "
292
+ "sola . php de su tema:"
293
+
294
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:549
295
+ msgid ""
296
+ "So as you can see the Meta Name \"books\" is used as the $key parameter of "
297
+ "the funtion <a href=\"http://codex.wordpress.org/Function_Reference/"
298
+ "get_post_meta\" target=\"_blank\">get_post_meta()</a> and the slugs of the "
299
+ "text fields are used as keys for the resulting array. Basically CFC stores "
300
+ "the entries as post meta in a multidimensioanl array. In our case the array "
301
+ "would be: <br /><pre>array( array( \"book-name\" => \"The Hitchhiker's Guide "
302
+ "To The Galaxy\", \"author-name\" => \"Douglas Adams\" ), array( \"book-name"
303
+ "\" => \"Ender's Game\", \"author-name\" => \"Orson Scott Card\" ) );</pre> "
304
+ "This is true even for single entries."
305
+ msgstr ""
306
+ "Así como usted puede ver el Meta Nombre \"libros\" se utiliza como parámetro "
307
+ "$ clave de la función <a href=\"http://codex.wordpress.org/"
308
+ "Function_Reference/get_post_meta\" target=\"_blank\">get_post_meta()</a> y "
309
+ "los slugs de los campos de texto se utilizan como claves para la matriz "
310
+ "resultante. Básicamente CFC almacena las entradas como post meta en una "
311
+ "matriz multidimensional. En nuestro caso, la matriz sería: <br /><pre>array"
312
+ "( array( \"book-name\" => \"The Hitchhiker's Guide To The Galaxy\", \"author-"
313
+ "name\" => \"Douglas Adams\" ), array( \"book-name\" => \"Ender's Game\", "
314
+ "\"author-name\" => \"Orson Scott Card\" ) );</pre> Esto es cierto incluso "
315
+ "para entradas individuales"
316
+
317
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:577
318
+ msgid "Metabox updated."
319
+ msgstr "Metabox actualizada."
320
+
321
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:6
322
+ msgid "WCK Post Type Creator"
323
+ msgstr "WCK Post Type Creator"
324
+
325
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:7 Version\wck/wck-sas.php:91
326
+ msgid "Post Type Creator"
327
+ msgstr "Post Type Creator"
328
+
329
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:47
330
+ msgid "Post type"
331
+ msgstr "Post type"
332
+
333
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:47
334
+ msgid ""
335
+ "(max. 20 characters, can not contain capital letters, hyphens, or spaces)"
336
+ msgstr ""
337
+ "(máx. 20 caracteres, no puede contener letras mayúsculas, guiones, ni "
338
+ "espacios)"
339
+
340
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:48
341
+ msgid "A short descriptive summary of what the post type is."
342
+ msgstr "Un resumen descriptivo debajo de lo que el tipo de publicación es."
343
+
344
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:49 Version\wck/wck-ctc.php:36
345
+ msgid "Singular Label"
346
+ msgstr "Etiqueta Individual"
347
+
348
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:49
349
+ msgid "ex. Book"
350
+ msgstr "ej. Libro"
351
+
352
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:50 Version\wck/wck-ctc.php:37
353
+ msgid "Plural Label"
354
+ msgstr "Etiqueta Plural"
355
+
356
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:50
357
+ msgid "ex. Books"
358
+ msgstr "ej. Libros"
359
+
360
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:51 Version\wck/wck-ctc.php:39
361
+ msgid "Hierarchical"
362
+ msgstr "Jerárquica"
363
+
364
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:51
365
+ msgid "Whether the post type is hierarchical. Allows Parent to be specified."
366
+ msgstr ""
367
+ "Si el tipo de la publicación es jerárquico. Permite que los padres se "
368
+ "determinen."
369
+
370
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:52
371
+ msgid "Has Archive"
372
+ msgstr "Tiene archivo"
373
+
374
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:52
375
+ msgid ""
376
+ "Enables post type archives. Will use string as archive slug. Will generate "
377
+ "the proper rewrite rules if rewrite is enabled."
378
+ msgstr ""
379
+ "Permite archivos de tipo de publicación. Utilizará cadena como slug de "
380
+ "archivo. Generará las reglas de reescritura adecuadas si reescritura está "
381
+ "habilitada."
382
+
383
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:53
384
+ msgid "Supports"
385
+ msgstr "Soporta"
386
+
387
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:56
388
+ msgid "Add New"
389
+ msgstr "Añadir Nuevo"
390
+
391
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:56
392
+ msgid "ex. Add New"
393
+ msgstr "ej. Añadir Nuevo"
394
+
395
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:57 Version\wck/wck-ctc.php:48
396
+ msgid "Add New Item"
397
+ msgstr "Crear Nuevo Artículo."
398
+
399
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:57
400
+ msgid "ex. Add New Book"
401
+ msgstr "ej Crear Nuevo Libro"
402
+
403
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:58 Version\wck/wck-ctc.php:46
404
+ msgid "Edit Item"
405
+ msgstr "Editar Artículo"
406
+
407
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:58
408
+ msgid "ex. Edit Book"
409
+ msgstr "ej. Editar Libro"
410
+
411
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:59
412
+ msgid "New Item"
413
+ msgstr "Nuevo Artículo"
414
+
415
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:59
416
+ msgid "ex. New Book"
417
+ msgstr "ej. Nuevo Libro"
418
+
419
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:60 Version\wck/wck-ctc.php:43
420
+ msgid "All Items"
421
+ msgstr "Todos los Artículos"
422
+
423
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:60
424
+ msgid "ex. All Books"
425
+ msgstr "ej. Todos los Libros"
426
+
427
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:61
428
+ msgid "View Items"
429
+ msgstr "Ver Artículos"
430
+
431
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:61
432
+ msgid "ex. View Books"
433
+ msgstr "ej. Ver Libros"
434
+
435
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:62 Version\wck/wck-ctc.php:41
436
+ msgid "Search Items"
437
+ msgstr "Buscar Artículos"
438
+
439
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:62
440
+ msgid "ex. Search Books"
441
+ msgstr "ej. Buscar Libros"
442
+
443
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:63
444
+ msgid "Not Found"
445
+ msgstr "No Encontrado"
446
+
447
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:63
448
+ msgid "ex. No Books Found"
449
+ msgstr "Ej. No hay libros encontrados"
450
+
451
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:64
452
+ msgid "Not Found In Trash"
453
+ msgstr "No se encuentran en la papelera"
454
+
455
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:64
456
+ msgid "ex. No Books found in Trash"
457
+ msgstr "ej. No se han encontrado Libros en la basura."
458
+
459
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:65 Version\wck/wck-ctc.php:45
460
+ msgid "Parent Item Colon"
461
+ msgstr "Colon Artículo Padre"
462
+
463
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:65
464
+ msgid ""
465
+ "the parent text. This string isn't used on non-hierarchical types. In "
466
+ "hierarchical ones the default is Parent Page "
467
+ msgstr ""
468
+ "el texto padre Esta cadena no se utiliza en los tipos no jerárquicos. En "
469
+ "los jerárquicos el valor predeterminado es la Página Padre"
470
+
471
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:66 Version\wck/wck-ctc.php:53
472
+ msgid "Menu Name"
473
+ msgstr "Nombre Menú"
474
+
475
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:68 Version\wck/wck-ctc.php:55
476
+ msgid "Public"
477
+ msgstr "Público"
478
+
479
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:68 Version\wck/wck-ctc.php:55
480
+ msgid ""
481
+ "Meta argument used to define default values for publicly_queriable, show_ui, "
482
+ "show_in_nav_menus and exclude_from_search"
483
+ msgstr ""
484
+ "Meta argumento utilizado para definir valores predeterminados para "
485
+ "publicly_queriable, show_ui, show_in_nav_menus y exclude_from_search"
486
+
487
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:69 Version\wck/wck-ctc.php:56
488
+ msgid "Show UI"
489
+ msgstr "Mostrar la interfaz de usuario"
490
+
491
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:69 Version\wck/wck-ctc.php:56
492
+ msgid "Whether to generate a default UI for managing this post type."
493
+ msgstr ""
494
+ "Si se debe generar una interfaz de usuario predeterminada para gestionar "
495
+ "este tipo de publicaciones."
496
+
497
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:70
498
+ msgid "Show In Nav Menus"
499
+ msgstr "Mostrar En Menús Nav"
500
+
501
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:70
502
+ msgid "Whether post_type is available for selection in navigation menus."
503
+ msgstr ""
504
+ "Si post_type está disponible para la selección en los menús de navegación."
505
+
506
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:71
507
+ msgid "Show In Menu"
508
+ msgstr "Mostrar En Menú"
509
+
510
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:71
511
+ msgid ""
512
+ "Whether to show the post type in the admin menu. show_ui must be true. "
513
+ "\"false\" - do not display in the admin menu, \"true\" - display as a top "
514
+ "level menu, \"some string\" - If an existing top level page such as \"tools."
515
+ "php\" or \"edit.php?post_type=page\", the post type will be placed as a sub "
516
+ "menu of that."
517
+ msgstr ""
518
+ "Si debe mostrar el tipo de publicación en el menú de administración. show_ui "
519
+ "debe ser cierto. \"false\" - no se muestra en el menú de administración, "
520
+ "\"true\" - pantalla como un menú de nivel superior, \"alguna cadena\" - Si "
521
+ "una página de nivel superior existente, como \"tools.php\" o \"edit.php? "
522
+ "post_type = page\", el tipo de publicación será colocado como un submenú de "
523
+ "eso."
524
+
525
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:72
526
+ msgid "Menu Position"
527
+ msgstr "Posición Menú"
528
+
529
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:72
530
+ msgid "The position in the menu order the post type should appear."
531
+ msgstr ""
532
+ "La posición en el orden de los menús en que el tipo publicación debería "
533
+ "aparecer."
534
+
535
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:73
536
+ msgid "Menu Icon"
537
+ msgstr "Icono Menú"
538
+
539
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:73
540
+ msgid "The url to the icon to be used for this menu."
541
+ msgstr "La url para el icono que se utilizará para este menú."
542
+
543
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:74
544
+ msgid "Capability Type"
545
+ msgstr "Tipo de Capacidad"
546
+
547
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:74
548
+ msgid "The string to use to build the read, edit, and delete capabilities."
549
+ msgstr ""
550
+ "La cadena que se utiliza para construir la lectura, editar y eliminar "
551
+ "capacidades."
552
+
553
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:75
554
+ msgid "Taxonomies"
555
+ msgstr "Taxonomías"
556
+
557
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:76
558
+ msgid "Rewrite"
559
+ msgstr "Reescribir"
560
+
561
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:76
562
+ msgid "Rewrite permalinks."
563
+ msgstr "Reescribir permalinks."
564
+
565
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:77
566
+ msgid "Rewrite Slug"
567
+ msgstr "Reescribir Slug"
568
+
569
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:77
570
+ msgid "Defaults to post type name."
571
+ msgstr "Predeterminados para el nombre del tipo de publicación."
572
+
573
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:83
574
+ msgid "Custom Post Type Creation"
575
+ msgstr "Creación personalizada Post Type"
576
+
577
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:108 Version\wck/wck-ctc.php:91
578
+ msgid "Add New "
579
+ msgstr "Añadir Nuevo"
580
+
581
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:109 Version\wck/wck-ctc.php:89
582
+ msgid "Edit "
583
+ msgstr "Editar"
584
+
585
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:110 Version\wck/wck-ctc.php:92
586
+ msgid "New "
587
+ msgstr "Nuevo"
588
+
589
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:111 Version\wck/wck-ctc.php:86
590
+ msgid "All "
591
+ msgstr "Todos"
592
+
593
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:112
594
+ msgid "View "
595
+ msgstr "Ver"
596
+
597
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:113 Version\wck/wck-ctc.php:84
598
+ msgid "Search "
599
+ msgstr "Buscar"
600
+
601
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:114 Version\wck/wck-cptc.php:115
602
+ msgid "No "
603
+ msgstr "No"
604
+
605
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:116
606
+ msgid "Parent Page"
607
+ msgstr "Página Padre"
608
+
609
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:169 Version\wck/wck-cptc.php:193
610
+ #: Version\wck/wck-ctc.php:134 Version\wck/wck-ctc.php:158
611
+ msgid "Show Advanced Label Options"
612
+ msgstr "Mostrar Opciones Avanzadas de Etiqueta"
613
+
614
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:169 Version\wck/wck-cptc.php:193
615
+ #: Version\wck/wck-ctc.php:134 Version\wck/wck-ctc.php:158
616
+ msgid "Hide Advanced Label Options"
617
+ msgstr "Esconder Opciones Avanzadas de Etiqueta"
618
+
619
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:181 Version\wck/wck-cptc.php:207
620
+ #: Version\wck/wck-cptc.php:236 Version\wck/wck-ctc.php:146
621
+ #: Version\wck/wck-ctc.php:172 Version\wck/wck-ctc.php:201
622
+ msgid "Show Advanced Options"
623
+ msgstr "Mostrar opciones avanzadas"
624
+
625
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:181 Version\wck/wck-cptc.php:207
626
+ #: Version\wck/wck-cptc.php:236 Version\wck/wck-ctc.php:146
627
+ #: Version\wck/wck-ctc.php:172 Version\wck/wck-ctc.php:201
628
+ msgid "Hide Advanced Options"
629
+ msgstr "Ocultar Opciones Avanzadas"
630
+
631
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:222 Version\wck/wck-ctc.php:187
632
+ msgid "Show Advanced Labels"
633
+ msgstr "Mostrar Etiquetas Avanzadas"
634
+
635
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:222 Version\wck/wck-ctc.php:187
636
+ msgid "Hide Advanced Labels"
637
+ msgstr "Ocultar Etiquetas Avanzadas"
638
+
639
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:283
640
+ msgid ""
641
+ "WCK Custom Post Type Creator allows you to easily create custom post types "
642
+ "for Wordpress without any programming knowledge.<br />Most of the common "
643
+ "options for creating a post type are displayed by default while the advanced "
644
+ "options and label are just one click away."
645
+ msgstr ""
646
+ "WCK Custom Post Type Creator te permite crear fácilmente los tipos de "
647
+ "correos personalizados para Wordpress y sin ningún conocimiento de "
648
+ "programación. <br/> La mayoría de las opciones comunes para la creación de "
649
+ "un puesto tipo se muestran de forma predeterminada, mientras que las "
650
+ "opciones avanzadas y la etiqueta están a sólo un clic de distancia."
651
+
652
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:288 Version\wck/wck-ctc.php:245
653
+ msgid "Labels"
654
+ msgstr "Etiquetas"
655
+
656
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:289
657
+ msgid ""
658
+ "For simplicity you are required to introduce only the Singular Label and "
659
+ "Plural Label from wchich the rest of the labels will be formed.<br />For a "
660
+ "more detailed control of the labels you just have to click the \"Show "
661
+ "Advanced Label Options\" link and all the availabel labels will be displayed."
662
+ msgstr ""
663
+ "Para simplicidad se requiere introducir sólo la etiqueta Singular y Plural "
664
+ "desde donde se formará el resto de las etiquetas. <br/> ¡Para un control más "
665
+ "detallado de las etiquetas, solo tienes que hacer clic en el enlace "
666
+ "\"Mostrar opciones avanzadas etiqueta\" y todas las etiquetas disponibles "
667
+ "serán mostradas."
668
+
669
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:294 Version\wck/wck-ctc.php:251
670
+ msgid "Advanced Options"
671
+ msgstr "Opciones avanzadas"
672
+
673
+ #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:295
674
+ msgid ""
675
+ "The Advanced Options are set to the most common defaults for custom post "
676
+ "types. To display them click the \"Show Advanced Options\" link."
677
+ msgstr ""
678
+ "Las opciones avanzadas se establecen en los valores predeterminados más "
679
+ "comunes para este tipo de publicación personalizado. Para visualizarlos, "
680
+ "haga clic en el enlace \"Mostrar opciones avanzadas\"."
681
+
682
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:6
683
+ msgid "WCK Taxonomy Creator"
684
+ msgstr "WCK Taxonomy Creador"
685
+
686
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:7 Version\wck/wck-sas.php:95
687
+ msgid "Taxonomy Creator"
688
+ msgstr "Creador deTaxonomía"
689
+
690
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:35
691
+ msgid "Taxonomy"
692
+ msgstr "Taxonomía"
693
+
694
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:35
695
+ msgid ""
696
+ "(The name of the taxonomy. Name must not contain capital letters or spaces.)"
697
+ msgstr ""
698
+ "(El nombre de la taxonomía. El nombre no debe contener letras mayúsculas o "
699
+ "espacios.)"
700
+
701
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:36
702
+ msgid "ex. Writer"
703
+ msgstr "ej Escritor"
704
+
705
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:37
706
+ msgid "ex. Writers"
707
+ msgstr "ej. Escritores"
708
+
709
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:38
710
+ msgid "Attach to"
711
+ msgstr "Adjuntar a"
712
+
713
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:39
714
+ msgid ""
715
+ "Is this taxonomy hierarchical (have descendants) like categories or not "
716
+ "hierarchical like tags."
717
+ msgstr ""
718
+ "¿Es esta taxonomía jerárquica (tiene descendientes) como categorías o no "
719
+ "jerárquica como las etiquetas?"
720
+
721
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:41
722
+ msgid "ex. Search Writers"
723
+ msgstr "Ej. Buscar Escritores"
724
+
725
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:42
726
+ msgid "Popular Items"
727
+ msgstr "Artículos populares"
728
+
729
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:42
730
+ msgid "ex. Popular Writers"
731
+ msgstr "ej. Escritores populares"
732
+
733
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:43
734
+ msgid "ex. All Writers"
735
+ msgstr "ej. Todos los Escritores"
736
+
737
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:44
738
+ msgid "Parent Item"
739
+ msgstr "Artículo Padre"
740
+
741
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:44
742
+ msgid "ex. Parent Genre"
743
+ msgstr "ej. Género Padre"
744
+
745
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:45
746
+ msgid "ex. Parent Genre:"
747
+ msgstr "ej. Género Padre"
748
+
749
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:46
750
+ msgid "ex. Edit Writer"
751
+ msgstr "ej. Editar Escritor"
752
+
753
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:47
754
+ msgid "Update Item"
755
+ msgstr "Actualizar Artículo"
756
+
757
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:47
758
+ msgid "ex. Update Writer"
759
+ msgstr "ej. Actualizar Escritor"
760
+
761
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:48
762
+ msgid "ex. Add New Writer"
763
+ msgstr "ej. Añadir Nuevo Escritor"
764
+
765
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:49
766
+ msgid "New Item Name"
767
+ msgstr "Nuevo Nombre del elemento"
768
+
769
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:49
770
+ msgid "ex. New Writer Name"
771
+ msgstr "ej. Nuevo Nombre Escritor"
772
+
773
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:50
774
+ msgid "Separate Items With Commas"
775
+ msgstr "Separe el Nombre con comas"
776
+
777
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:50
778
+ msgid "ex. Separate writers with commas"
779
+ msgstr "ej. Separe Escritores con comas"
780
+
781
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:51
782
+ msgid "Add Or Remove Items"
783
+ msgstr "Añadir o eliminar elementos"
784
+
785
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:51
786
+ msgid "ex. Add or remove writers"
787
+ msgstr "ej. Añadir o eliminar escritores"
788
+
789
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:52
790
+ msgid "Choose From Most Used"
791
+ msgstr "Elegir de los más usados."
792
+
793
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:52
794
+ msgid "ex. Choose from the most used writers"
795
+ msgstr "ej Elija uno de los escritores más utilizados"
796
+
797
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:57
798
+ msgid "Show Tagcloud"
799
+ msgstr "Muestre Tagcloud"
800
+
801
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:57
802
+ msgid "Whether to allow the Tag Cloud widget to use this taxonomy."
803
+ msgstr "Si permite que el Tag widget de nube utilice esta taxonomía."
804
+
805
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:62
806
+ msgid "Custom Taxonomy Creation"
807
+ msgstr "Creación de Taxonomía Personalizada"
808
+
809
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:85
810
+ msgid "Popular "
811
+ msgstr "Popular"
812
+
813
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:87 Version\wck/wck-ctc.php:88
814
+ msgid "Parent "
815
+ msgstr "Padre"
816
+
817
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:90
818
+ msgid "Update "
819
+ msgstr "Actualizar"
820
+
821
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:93
822
+ msgid "Separate "
823
+ msgstr "Separada"
824
+
825
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:94
826
+ msgid "Add or remove "
827
+ msgstr "Agregar o quitar"
828
+
829
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:95
830
+ msgid "Choose from the most used "
831
+ msgstr "Elija entre los más utilizados"
832
+
833
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:240
834
+ msgid ""
835
+ "WCK Custom Taxonomy Creator allows you to easily create custom taxonomy for "
836
+ "Wordpress without any programming knowledge.<br />Most of the common options "
837
+ "for creating a taxonomy are displayed by default while the advanced and "
838
+ "label options are just one click away."
839
+ msgstr ""
840
+ "WCK Custom Taxonomy Creador le permite crear fácilmente taxonomía "
841
+ "personalizada para Wordpress sin ningún conocimientos de programación. <br /"
842
+ "> La mayoría de las opciones comunes para la creación de una taxonomía se "
843
+ "muestran por defecto, mientras que las opciones avanzadas y etiquetas están "
844
+ "a sólo un clic de distancia."
845
+
846
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:246
847
+ msgid ""
848
+ "For simplicity you are required to introduce only the Singular Label and "
849
+ "Plural Label from wchich the rest of the labels will be formed.<br />For a "
850
+ "more detailed control of the labels you just have to click the \"Show "
851
+ "Advanced Label Options\" link and all the availabel labels will be displayed"
852
+ msgstr ""
853
+ "Por simplicidad, usted está obligado a introducir sólo la etiqueta Singular "
854
+ "y Plural desde donde el resto de las etiquetas se formará. <br /> ¡Para un "
855
+ "control más detallado de las etiquetas, solo tienes que hacer clic en el "
856
+ "enlace \"Mostrar opciones avanzadas de etiquetas\" y todas las etiquetas "
857
+ "disponibles se mostrarán"
858
+
859
+ #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:252
860
+ msgid ""
861
+ "The Advanced Options are set to the most common defaults for taxonomies. To "
862
+ "display them click the \"Show Advanced Options\" link."
863
+ msgstr ""
864
+ "Las opciones avanzadas están ajustadas a los valores predeterminados comunes "
865
+ "para las taxonomías. Para visualizarlos, haga clic en el enlace \"Mostrar "
866
+ "opciones avanzadas\"."
867
+
868
+ #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:15
869
+ msgid "Start Here & General Settings"
870
+ msgstr "Comience aquí y Ajustes generales"
871
+
872
+ #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:16
873
+ msgid "Start and Settings"
874
+ msgstr "Inicio y Configuración"
875
+
876
+ #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:34
877
+ msgid "Serial Number"
878
+ msgstr "Número de serie"
879
+
880
+ #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:34
881
+ msgid ""
882
+ "Please enter your serial number. For example: (e.g. WCKPRO-11-"
883
+ "SN-251r55baa4fbe7bf595b2aabb8d72985)"
884
+ msgstr ""
885
+ "Introduzca su número de serie. Por ejemplo: (por ejemplo WCKPRO-11-"
886
+ "SN-251r55baa4fbe7bf595b2aabb8d72985)"
887
+
888
+ #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:40
889
+ msgid "Register Your Version"
890
+ msgstr "Registre su Versión"
891
+
892
+ #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:67
893
+ #, php-format
894
+ msgid "Welcome to %s"
895
+ msgstr "Bienvenido a %s"
896
+
897
+ #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:68
898
+ msgid ""
899
+ "WCK helps you to improve the usability of the sites you build, making them "
900
+ "manageable by your clients. Your very own repeater custom fields and groups, "
901
+ "custom post type and taxonomy creator with front-end posting."
902
+ msgstr ""
903
+ "WCK le ayuda a mejorar la usabilidad de los sitios que usted construye, "
904
+ "haciéndolos manejables por sus clientes. . Sus propios campos y grupos "
905
+ "personalizados repetidor, el tipo de publicación personalizada y creador de "
906
+ "taxonomía con fijación frontal"
907
+
908
+ #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:69
909
+ #, php-format
910
+ msgid "Version %s"
911
+ msgstr "Versión %s"
912
+
913
+ #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:83
914
+ msgid "Quick Start-Up Guide"
915
+ msgstr "Quía Rápida de Inicio"
916
+
917
+ #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:88
918
+ msgid ""
919
+ "WordPress Creation Kit Pro has support for a wide list of custom fields: "
920
+ "WYSIWYG Editor, Upload Field, Date, User, Country, Text Input, Textarea, "
921
+ "Drop-Down, Select, Checkboxes, Radio Buttons"
922
+ msgstr ""
923
+ "WordPress Creación Kit Pro tiene soporte para una amplia lista de campos "
924
+ "personalizados: Editor WYSIWYG, Subi campo, Fecha , Usuario, país, entrada "
925
+ "de texto, Área de texto, desplegable, Seleccionar, casillas de verificación, "
926
+ "botones de radio"
927
+
928
+ #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:89
929
+ msgid ""
930
+ "Access documentation <a href=\"http://www.cozmoslabs.com/wordpress-creation-"
931
+ "kit/custom-fields-creator/\" target=\"_blank\">here</a> about how to display "
932
+ "them in your templates."
933
+ msgstr ""
934
+ "Documentación de Access <a href = \"http://www.cozmoslabs.com/wordpress-"
935
+ "creation-kit/custom-fields-creator/ \"target=\"_blank\"> aquí </a> sobre "
936
+ "cómo mostrarlos en sus plantillas."
937
+
938
+ #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:92
939
+ msgid "Create & manage all your custom content types"
940
+ msgstr "Crear y gestionar todos los tipos de contenido personalizado"
941
+
942
+ #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:93
943
+ msgid ""
944
+ "Access documentation <a href=\"http://www.cozmoslabs.com/wordpress-creation-"
945
+ "kit/custom-post-type-creator/\" target=\"_blank\">here</a> about how to "
946
+ "display them in your templates."
947
+ msgstr ""
948
+ "Documentación de acceso<a href=\"http://www.cozmoslabs.com/ wordpress-"
949
+ "creation-kit/custom-post-type-creator/\"target=\" _blank\"> aquí </a> sobre "
950
+ "cómo mostrarlos en sus plantillas."
951
+
952
+ #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:96
953
+ msgid "Create new taxonomies for filtering your content"
954
+ msgstr "Crear nuevas taxonomías para el filtrado de su contenido"
955
+
956
+ #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:97
957
+ msgid ""
958
+ "Access documentation <a href=\"http://www.cozmoslabs.com/wordpress-creation-"
959
+ "kit/custom-taxonomy-creator/\" target=\"_blank\">here</a> about how to "
960
+ "display them in your templates."
961
+ msgstr ""
962
+ "Documentación de acceso a<a href=\"http://www.cozmoslabs.com/wordpress-"
963
+ "creation-kit/custom-taxonomy-creator/\" target=\"_blank\"> aquí </a> sobre "
964
+ "cómo mostrarlos en sus plantillas"
965
+
966
+ #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:99
967
+ msgid "Front-End Posting (available in the Pro version)"
968
+ msgstr "Publicación Front-End (disponible en la versión Pro)"
969
+
970
+ #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:100
971
+ msgid ""
972
+ "Create and edit posts/pages or custom posts directly from the front-end."
973
+ msgstr ""
974
+ "Crear y editar publicaciones / páginas o publicaciones personalizadas "
975
+ "directamente desde el front-end."
976
+
977
+ #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:101
978
+ msgid "Available shortcodes:"
979
+ msgstr "Códigos cortos disponibles:"
980
+
981
+ #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:103
982
+ msgid ""
983
+ "[fep form_name=\"front-end-post-name\"] - displayes your form in the front-"
984
+ "end"
985
+ msgstr ""
986
+ "[fep form_name=\"front-end-post-name\"] - muestra su formulario en el front-"
987
+ "end"
988
+
989
+ #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:104
990
+ msgid ""
991
+ "[fep-dashboard] - the quick-dashboard allows: simple profile updates, "
992
+ "editing/deletion of posts, pages and custom post types."
993
+ msgstr ""
994
+ "[fep-dashboard] - el tablero rápido permite: actualizaciones de perfiles "
995
+ "simples, edición / borrado de publicaciones, páginas y tipos de publicación "
996
+ "personalizados"
997
+
998
+ #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:105
999
+ msgid ""
1000
+ "[fep-lilo] - login/logout/register widget with the simple usage of a "
1001
+ "shortcode. Can be added in a page or text widget."
1002
+ msgstr ""
1003
+ "[fep-lilo] – widget login/logout/register con el simple uso de un shortcode. "
1004
+ "Se puede añadir en una página o widget de texto."
1005
+
1006
+ #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:107
1007
+ msgid ""
1008
+ "Access documentation <a href=\"http://www.cozmoslabs.com/wordpress-creation-"
1009
+ "kit/frontend-posting/\" target=\"_blank\">here</a> about how to display them "
1010
+ "in your templates."
1011
+ msgstr ""
1012
+ "Documentación de Acceso <a href=\"http://www.cozmoslabs.com/wordpress-"
1013
+ "creation-kit/frontend-posting/\" target=\"_blank\"> aquí </a> sobre cómo "
1014
+ "mostrarlos en sus plantillas."
1015
+
1016
+ #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:109
1017
+ msgid "Option Pages (available in the Pro version)"
1018
+ msgstr "Páginas de opción (disponible en la versión Pro)"
1019
+
1020
+ #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:110
1021
+ msgid ""
1022
+ "The Options Page Creator Allows you to create a new menu item called "
1023
+ "\"Options\"(for example) which can hold advanced custom field groups. "
1024
+ "Perfect for theme options or a simple UI for your custom plugin (like a "
1025
+ "simple testimonials section in the front-end)."
1026
+ msgstr ""
1027
+ "El Options Page Creator Permite crear un nuevo elemento del menú llamado "
1028
+ "\"Opciones\" (por ejemplo) que puede albergar grupos de campos "
1029
+ "personalizados avanzados. Perfecto para las opciones del tema o una interfaz "
1030
+ "de usuario simple para su complemento personalizado (como una sección de "
1031
+ "testimonios simple en el front-end)."
1032
+
1033
+ #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:137
1034
+ msgid ""
1035
+ "Please enter your serial number to get access to automatic updates. If you "
1036
+ "do not have one, you can <a href=\"http://www.cozmoslabs.com/wordpress-"
1037
+ "creation-kit/\" target=\"_blank\">Get One Here</a>."
1038
+ msgstr ""
1039
+ "Introduzca, por favor su número de serie para tener acceso a las "
1040
+ "actualizaciones automáticas. Si usted no tiene uno, puede <a href=\"http://"
1041
+ "www.cozmoslabs.com/wordpress-creation-kit/\" target=\"_blank\"> conseguir "
1042
+ "uno aquí </a>."
1043
+
1044
+ #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:139
1045
+ msgid "Oups! Our serial verification server is down. Please try again later."
1046
+ msgstr ""
1047
+ "¡Ups ! Nuestro servidor de verificación de serie se encuentra abajo. Por "
1048
+ "favor, inténtelo de nuevo más tarde."
1049
+
1050
+ #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:141
1051
+ msgid ""
1052
+ "Oups! It seems the serial number you entered was not found in our database. "
1053
+ "To find out what's your serial number log-in to <a href=\"http://www."
1054
+ "cozmoslabs.com/account/\" target=\"_blank\">your account page</a> over at "
1055
+ "Cozmoslabs.com"
1056
+ msgstr ""
1057
+ "¡Ups! Al parecer, el número de serie que ha puesto no se encuentra en "
1058
+ "nuestra base de datos. Para saber cuál es el número de serie ingrese a <a "
1059
+ "href=\"http://www.cozmoslabs.com/account/\" target=\"_blank\"> página de su "
1060
+ "cuenta </a> sobre al Cozmoslabs.com"
1061
+
1062
+ #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:143
1063
+ msgid ""
1064
+ "Wohoo! Your serial number is valid and you have access to automatic updates."
1065
+ msgstr ""
1066
+ "Wohoo! Su número de serie es válido y tiene acceso a las actualizaciones "
1067
+ "automáticas."
1068
+
1069
+ #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:145
1070
+ msgid ""
1071
+ "It seems your serial number has <strong>expired</strong>. You'll continue to "
1072
+ "get automatic updates if update your serial number for another year from <a "
1073
+ "href=\"http://www.cozmoslabs.com/account/\" target=\"_blank\"><strong>your "
1074
+ "account page</strong></a>."
1075
+ msgstr ""
1076
+ "Parece que su número de serie <strong> ha expirado </ strong>. Tendrá que "
1077
+ "continuar para obtener actualizaciones automáticas si actualizar su número "
1078
+ "de serie para otro año de <a href=\"http://www.cozmoslabs.com/account/\" "
1079
+ "target=\"_blank\"> <strong> su página de cuenta </ strong> </a>."
1080
+
1081
+ #: d:\!!!!!!!!!\Free
1082
+ #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:282
1083
+ msgid "Add Entry"
1084
+ msgstr "Añadir entrada"
1085
+
1086
+ #: d:\!!!!!!!!!\Free
1087
+ #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:332
1088
+ msgid "Save Changes"
1089
+ msgstr "Guardar cambios"
1090
+
1091
+ #: d:\!!!!!!!!!\Free
1092
+ #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:333
1093
+ msgid "Cancel"
1094
+ msgstr "Cancelar"
1095
+
1096
+ #: d:\!!!!!!!!!\Free
1097
+ #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:370
1098
+ msgid "Content"
1099
+ msgstr "Contenido"
1100
+
1101
+ #: d:\!!!!!!!!!\Free
1102
+ #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:370
1103
+ #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:433
1104
+ msgid "Edit"
1105
+ msgstr "Editar"
1106
+
1107
+ #: d:\!!!!!!!!!\Free
1108
+ #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:370
1109
+ #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:434
1110
+ msgid "Delete"
1111
+ msgstr "Borrar"
1112
+
1113
+ #: d:\!!!!!!!!!\Free
1114
+ #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:433
1115
+ msgid "Edit this item"
1116
+ msgstr "Editar este artículo"
1117
+
1118
+ #: d:\!!!!!!!!!\Free
1119
+ #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:434
1120
+ msgid "Delete this item"
1121
+ msgstr "Borrar este artículo"
1122
+
1123
+ #: d:\!!!!!!!!!\Free
1124
+ #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:506
1125
+ msgid "Please enter a value for the required field "
1126
+ msgstr "Por favor, introduzca un valor para el campo requerido"
1127
+
1128
+ #: d:\!!!!!!!!!\Free
1129
+ #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:788
1130
+ msgid "Select File"
1131
+ msgstr "Seleccione Archivo"
1132
+
1133
+ #: d:\!!!!!!!!!\Free
1134
+ #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:828
1135
+ #: Version\wck/wordpress-creation-kit-api/fields/upload.php:28
1136
+ msgid "Remove"
1137
+ msgstr "Eliminar"
1138
+
1139
+ #: d:\!!!!!!!!!\Free
1140
+ #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:866
1141
+ msgid "Syncronize WCK"
1142
+ msgstr "Syncronizar WCK"
1143
+
1144
+ #: d:\!!!!!!!!!\Free
1145
+ #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:878
1146
+ msgid "Syncronize WCK Translation"
1147
+ msgstr "Traducción Syncronizar WCK"
1148
+
1149
+ #: d:\!!!!!!!!!\Free
1150
+ #: Version\wck/wordpress-creation-kit-api/fields/select.php:11
1151
+ msgid "...Chose"
1152
+ msgstr "... Elija"
1153
+
1154
+ #: d:\!!!!!!!!!\Free
1155
+ #: Version\wck/wordpress-creation-kit-api/fields/upload.php:40
1156
+ msgid "Upload "
1157
+ msgstr "Subir"
readme.txt CHANGED
@@ -5,8 +5,8 @@ Donate link: http://www.cozmoslabs.com/wordpress-creation-kit/
5
  Tags: custom fields, custom field, wordpress custom fields, advanced custom fields, custom post type, custom post types, post types, cpt, post type, repeater fields, repeater, repeatable fields, meta box, metabox, taxonomy, taxonomies, custom taxonomy, custom taxonomies, custom, custom fields creator, post meta, meta, get_post_meta, post creator, cck, content types, types
6
 
7
  Requires at least: 3.1
8
- Tested up to: 3.8
9
- Stable tag: 1.0.7
10
 
11
  A must have tool for creating custom fields, custom post types and taxonomies, fast and without any programming knowledge.
12
 
@@ -141,6 +141,13 @@ Creating a taxonomy generally automatically creates a special query variable usi
141
  10. Taxonomy listing
142
 
143
  == Changelog ==
 
 
 
 
 
 
 
144
  = 1.0.7 =
145
  * Small compatibility tweaks for WordPress 3.8
146
 
5
  Tags: custom fields, custom field, wordpress custom fields, advanced custom fields, custom post type, custom post types, post types, cpt, post type, repeater fields, repeater, repeatable fields, meta box, metabox, taxonomy, taxonomies, custom taxonomy, custom taxonomies, custom, custom fields creator, post meta, meta, get_post_meta, post creator, cck, content types, types
6
 
7
  Requires at least: 3.1
8
+ Tested up to: 3.8.1
9
+ Stable tag: 1.0.8
10
 
11
  A must have tool for creating custom fields, custom post types and taxonomies, fast and without any programming knowledge.
12
 
141
  10. Taxonomy listing
142
 
143
  == Changelog ==
144
+ = 1.0.8 =
145
+ * Upload Field now uses the media manager added in WP 3.5
146
+ * Now we prevent "Meta Field" and "Field Title" to be named "content" or "action" in Custom Fields Creator to prevent conflicts with existing WordPress Fields
147
+ * Fixed bug in Custom Fields Creator that didn't display "0" values
148
+ * Added Spanish translation ( thanks to Andrew Kurtis for providing the translation files )
149
+
150
+
151
  = 1.0.7 =
152
  * Small compatibility tweaks for WordPress 3.8
153
 
wck-cfc.php CHANGED
@@ -89,8 +89,9 @@ function wck_cfc_create_box(){
89
  global $wpdb;
90
 
91
  /* get post types */
 
92
  $args = array(
93
- 'public' => true
94
  );
95
  $output = 'objects'; // or objects
96
  $post_types = get_post_types($args,$output);
@@ -101,6 +102,16 @@ function wck_cfc_create_box(){
101
  $post_type_names[] = $post_type->name;
102
  }
103
  }
 
 
 
 
 
 
 
 
 
 
104
 
105
  /* get page templates */
106
  $templates = wck_get_page_templates();
@@ -142,7 +153,7 @@ function wck_cfc_create_box(){
142
  $field_types = apply_filters( 'wck_field_types', $field_types );
143
 
144
  /* setup post types */
145
- $post_types = get_post_types( '', 'names' );
146
 
147
  /* set up the fields array */
148
  $cfc_box_fields_fields = apply_filters( 'wck_cfc_box_fields_fields', array(
@@ -151,9 +162,9 @@ function wck_cfc_create_box(){
151
  array( 'type' => 'textarea', 'title' => __( 'Description', 'wck' ), 'description' => 'The description of the field.' ),
152
  array( 'type' => 'select', 'title' => __( 'Required', 'wck' ), 'options' => array( 'false', 'true' ), 'default' => 'false', 'description' => __( 'Whether the field is required or not', 'wck' ) ),
153
  array( 'type' => 'select', 'title' => __( 'CPT', 'wck' ), 'options' => $post_types, 'default' => 'post', 'description' => __( 'Select what custom post type should be used in the CPT Select.', 'wck' ) ),
154
- array( 'type' => 'text', 'title' => __( 'Default Value', 'wck' ), 'description' => __( 'Default value of the field. For Checkboxes if there are multiple values separate them with a ","', 'wck' ) ),
155
  array( 'type' => 'text', 'title' => __( 'Options', 'wck' ), 'description' => __( 'Options for field types "select", "checkbox" and "radio". For multiple options separate them with a ",". You can use the following structure if you want the label to be different from the value: %LabelOne%valueone,%LabelTwo%valuetwo,%LabelThree%valuethree', 'wck' ) ),
156
- array( 'type' => 'radio', 'title' => __( 'Attach upload to post', 'wck' ), 'description' => __( 'Whether or not the uploads should be attached to the post', 'wck' ), 'options' => array( 'yes', 'no' ) )
157
  ) );
158
 
159
 
@@ -239,7 +250,7 @@ function wck_cfc_create_boxes_args(){
239
  $fields_inner_array['required'] = $wck_cfc_field['required'] == 'false' ? false : true;
240
  if ( !empty( $wck_cfc_field['cpt'] ) )
241
  $fields_inner_array['cpt'] = $wck_cfc_field['cpt'];
242
- if( !empty( $wck_cfc_field['default-value'] ) )
243
  $fields_inner_array['default'] = $wck_cfc_field['default-value'];
244
  if( !empty( $wck_cfc_field['options'] ) ){
245
  $fields_inner_array['options'] = explode( ',', $wck_cfc_field['options'] );
@@ -263,8 +274,8 @@ function wck_cfc_create_boxes_args(){
263
 
264
  /* metabox_id must be different from meta_name */
265
  $metabox_id = Wordpress_Creation_Kit::wck_generate_slug( $box_title );
266
- if( $wck_cfc_arg['meta-name'] == $metabox_id )
267
- $metabox_id = 'wck-'. $metabox_id;
268
 
269
  $box_args = array(
270
  'metabox_id' => $metabox_id,
@@ -332,8 +343,13 @@ function wck_cfc_ceck_meta_name( $bool, $value, $post_id ){
332
  $contains_spaces = false;
333
  else
334
  $contains_spaces = true;
 
 
 
 
 
335
 
336
- return ( $check_meta_existance || empty($value) || $contains_spaces );
337
  }
338
 
339
  add_filter( 'wck_required_message_wck_cfc_args_meta-name', 'wck_cfc_change_meta_message', 10, 2 );
@@ -342,10 +358,32 @@ function wck_cfc_change_meta_message( $message, $value ){
342
  return $message;
343
  else if( strpos( $value, ' ' ) !== false )
344
  return __( "Choose a different Meta Name as this one contains spaces\n", "wck" );
 
 
345
  else
346
  return __( "Choose a different Meta Name as this one already exists\n", "wck" );
347
  }
348
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
349
  /* Add the separate meta for post type, post id and page template */
350
  add_action( 'wck_before_add_meta', 'wck_cfc_add_separate_meta', 10, 3 );
351
  function wck_cfc_add_separate_meta( $meta, $id, $values ){
@@ -515,7 +553,7 @@ function wck_cfc_add_side_boxes(){
515
  }
516
  function wck_cfc_side_box_one(){
517
  ?>
518
- <a href="http://www.cozmoslabs.com/wordpress-creation-kit/"><img src="<?php echo plugins_url('/images/banner_pro.png', __FILE__) ?>?v=1" width="260" height="385" alt="WCK-PRO"/></a>
519
  <?php
520
  }
521
 
89
  global $wpdb;
90
 
91
  /* get post types */
92
+ $public_cpt_arg = apply_filters( 'wck_cfc_public_cpt_arg', true );
93
  $args = array(
94
+ 'public' => $public_cpt_arg
95
  );
96
  $output = 'objects'; // or objects
97
  $post_types = get_post_types($args,$output);
102
  $post_type_names[] = $post_type->name;
103
  }
104
  }
105
+ /* add CPTC registered with WCK that are not public */
106
+ if( $public_cpt_arg ){
107
+ $cpts = get_option('wck_cptc');
108
+ if( !empty( $cpts ) ){
109
+ foreach( $cpts as $cpt ){
110
+ if( $cpt['public'] == 'false' )
111
+ $post_type_names[] = $cpt['post-type'];
112
+ }
113
+ }
114
+ }
115
 
116
  /* get page templates */
117
  $templates = wck_get_page_templates();
153
  $field_types = apply_filters( 'wck_field_types', $field_types );
154
 
155
  /* setup post types */
156
+ $post_types = get_post_types( array( 'public' => true ), 'names' );
157
 
158
  /* set up the fields array */
159
  $cfc_box_fields_fields = apply_filters( 'wck_cfc_box_fields_fields', array(
162
  array( 'type' => 'textarea', 'title' => __( 'Description', 'wck' ), 'description' => 'The description of the field.' ),
163
  array( 'type' => 'select', 'title' => __( 'Required', 'wck' ), 'options' => array( 'false', 'true' ), 'default' => 'false', 'description' => __( 'Whether the field is required or not', 'wck' ) ),
164
  array( 'type' => 'select', 'title' => __( 'CPT', 'wck' ), 'options' => $post_types, 'default' => 'post', 'description' => __( 'Select what custom post type should be used in the CPT Select.', 'wck' ) ),
165
+ array( 'type' => 'text', 'title' => __( 'Default Value', 'wck' ), 'description' => __( 'Default value of the field. For Checkboxes if there are multiple values separate them with a ",". For an Upload field input an attachment id.', 'wck' ) ),
166
  array( 'type' => 'text', 'title' => __( 'Options', 'wck' ), 'description' => __( 'Options for field types "select", "checkbox" and "radio". For multiple options separate them with a ",". You can use the following structure if you want the label to be different from the value: %LabelOne%valueone,%LabelTwo%valuetwo,%LabelThree%valuethree', 'wck' ) ),
167
+ array( 'type' => 'checkbox', 'title' => __( 'Attach upload to post', 'wck' ), 'description' => __( 'Uploads will be attached to the post if this is checked', 'wck' ), 'options' => array( 'yes' ), 'default' => 'yes' )
168
  ) );
169
 
170
 
250
  $fields_inner_array['required'] = $wck_cfc_field['required'] == 'false' ? false : true;
251
  if ( !empty( $wck_cfc_field['cpt'] ) )
252
  $fields_inner_array['cpt'] = $wck_cfc_field['cpt'];
253
+ if( isset( $wck_cfc_field['default-value'] ) )
254
  $fields_inner_array['default'] = $wck_cfc_field['default-value'];
255
  if( !empty( $wck_cfc_field['options'] ) ){
256
  $fields_inner_array['options'] = explode( ',', $wck_cfc_field['options'] );
274
 
275
  /* metabox_id must be different from meta_name */
276
  $metabox_id = Wordpress_Creation_Kit::wck_generate_slug( $box_title );
277
+ if( $wck_cfc_arg['meta-name'] == $metabox_id || 'content' == $metabox_id )
278
+ $metabox_id = 'wck-'. $metabox_id;
279
 
280
  $box_args = array(
281
  'metabox_id' => $metabox_id,
343
  $contains_spaces = false;
344
  else
345
  $contains_spaces = true;
346
+
347
+ if( trim( strtolower( $value ) ) !== 'content' && trim( strtolower( $value ) ) !== 'action' )
348
+ $restricted_name = false;
349
+ else
350
+ $restricted_name = true;
351
 
352
+ return ( $check_meta_existance || empty($value) || $contains_spaces || $restricted_name );
353
  }
354
 
355
  add_filter( 'wck_required_message_wck_cfc_args_meta-name', 'wck_cfc_change_meta_message', 10, 2 );
358
  return $message;
359
  else if( strpos( $value, ' ' ) !== false )
360
  return __( "Choose a different Meta Name as this one contains spaces\n", "wck" );
361
+ else if( trim( strtolower( $value ) ) === 'content' || trim( strtolower( $value ) ) === 'action' )
362
+ return __( "Choose a different Meta Name as this one is reserved\n", "wck" );
363
  else
364
  return __( "Choose a different Meta Name as this one already exists\n", "wck" );
365
  }
366
 
367
+ /* Field Name Verification */
368
+ add_filter( 'wck_required_test_wck_cfc_fields_field-title', 'wck_cfc_ceck_field_title', 10, 3 );
369
+ function wck_cfc_ceck_field_title( $bool, $value, $post_id ){
370
+
371
+ if( trim( strtolower( $value ) ) !== 'content' && trim( strtolower( $value ) ) !== 'action' )
372
+ $restricted_name = false;
373
+ else
374
+ $restricted_name = true;
375
+
376
+ return ( empty($value) || $restricted_name );
377
+ }
378
+
379
+ add_filter( 'wck_required_message_wck_cfc_fields_field-title', 'wck_cfc_change_field_title_message', 10, 2 );
380
+ function wck_cfc_change_field_title_message( $message, $value ){
381
+ if( empty( $value ) )
382
+ return $message;
383
+ else if( trim( strtolower( $value ) ) === 'content' || trim( strtolower( $value ) ) === 'action' )
384
+ return __( "Choose a different Field Title as this one is reserved\n", "wck" );
385
+ }
386
+
387
  /* Add the separate meta for post type, post id and page template */
388
  add_action( 'wck_before_add_meta', 'wck_cfc_add_separate_meta', 10, 3 );
389
  function wck_cfc_add_separate_meta( $meta, $id, $values ){
553
  }
554
  function wck_cfc_side_box_one(){
555
  ?>
556
+ <a href="http://www.cozmoslabs.com/wck-custom-fields-custom-post-types-plugin/?utm_source=wpbackend&utm_medium=clientsite&utm_campaign=WCKFree"><img src="<?php echo plugins_url('/images/banner_pro.png', __FILE__) ?>?v=1" width="260" height="385" alt="WCK-PRO"/></a>
557
  <?php
558
  }
559
 
wck-cptc.php CHANGED
@@ -263,7 +263,7 @@ function wck_cptc_add_side_boxes(){
263
  }
264
  function wck_cptc_side_box_one(){
265
  ?>
266
- <a href="http://www.cozmoslabs.com/wordpress-creation-kit/"><img src="<?php echo plugins_url('/images/banner_pro.png', __FILE__) ?>?v=1" width="260" height="385" alt="WCK-PRO"/></a>
267
  <?php
268
  }
269
 
263
  }
264
  function wck_cptc_side_box_one(){
265
  ?>
266
+ <a href="http://www.cozmoslabs.com/wck-custom-fields-custom-post-types-plugin/?utm_source=wpbackend&utm_medium=clientsite&utm_campaign=WCKFree"><img src="<?php echo plugins_url('/images/banner_pro.png', __FILE__) ?>?v=1" width="260" height="385" alt="WCK-PRO"/></a>
267
  <?php
268
  }
269
 
wck-ctc.php CHANGED
@@ -223,7 +223,7 @@ function wck_ctc_add_side_boxes(){
223
  }
224
  function wck_ctc_side_box_one(){
225
  ?>
226
- <a href="http://www.cozmoslabs.com/wordpress-creation-kit/"><img src="<?php echo plugins_url('/images/banner_pro.png', __FILE__) ?>?v=1" width="260" height="385" alt="WCK-PRO"/></a>
227
  <?php
228
  }
229
 
223
  }
224
  function wck_ctc_side_box_one(){
225
  ?>
226
+ <a href="http://www.cozmoslabs.com/wck-custom-fields-custom-post-types-plugin/?utm_source=wpbackend&utm_medium=clientsite&utm_campaign=WCKFree"><img src="<?php echo plugins_url('/images/banner_pro.png', __FILE__) ?>?v=1" width="260" height="385" alt="WCK-PRO"/></a>
227
  <?php
228
  }
229
 
wck-template-api/wck-template-api-class.php CHANGED
@@ -91,7 +91,7 @@ class WCK_Template_API{
91
  $args = array(
92
  'post_type' => 'wck-meta-box',
93
  'posts_per_page' => -1,
94
- 'post_status' => 'all',
95
  'fields' => 'ids',
96
  );
97
  $all_cfc = get_posts( $args );
91
  $args = array(
92
  'post_type' => 'wck-meta-box',
93
  'posts_per_page' => -1,
94
+ 'post_status' => array( 'publish' ),
95
  'fields' => 'ids',
96
  );
97
  $all_cfc = get_posts( $args );
wck.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WCK - Custom Fields and Custom Post Types Creator
4
  Description: WordPress Creation Kit consists of three tools that can help you create and maintain custom post types, custom taxonomies and most importantly, custom fields and metaboxes for your posts, pages or CPT's.
5
  Author: Reflection Media, Madalin Ungureanu, sareiodata
6
- Version: 1.0.7
7
  Author URI: http://www.reflectionmedia.ro
8
 
9
  License: GPL2
3
  Plugin Name: WCK - Custom Fields and Custom Post Types Creator
4
  Description: WordPress Creation Kit consists of three tools that can help you create and maintain custom post types, custom taxonomies and most importantly, custom fields and metaboxes for your posts, pages or CPT's.
5
  Author: Reflection Media, Madalin Ungureanu, sareiodata
6
+ Version: 1.0.8
7
  Author URI: http://www.reflectionmedia.ro
8
 
9
  License: GPL2
wordpress-creation-kit-api/assets/js/tiny_mce/license.txt CHANGED
@@ -1,504 +1,504 @@
1
- GNU LESSER GENERAL PUBLIC LICENSE
2
- Version 2.1, February 1999
3
-
4
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
5
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6
- Everyone is permitted to copy and distribute verbatim copies
7
- of this license document, but changing it is not allowed.
8
-
9
- [This is the first released version of the Lesser GPL. It also counts
10
- as the successor of the GNU Library Public License, version 2, hence
11
- the version number 2.1.]
12
-
13
- Preamble
14
-
15
- The licenses for most software are designed to take away your
16
- freedom to share and change it. By contrast, the GNU General Public
17
- Licenses are intended to guarantee your freedom to share and change
18
- free software--to make sure the software is free for all its users.
19
-
20
- This license, the Lesser General Public License, applies to some
21
- specially designated software packages--typically libraries--of the
22
- Free Software Foundation and other authors who decide to use it. You
23
- can use it too, but we suggest you first think carefully about whether
24
- this license or the ordinary General Public License is the better
25
- strategy to use in any particular case, based on the explanations below.
26
-
27
- When we speak of free software, we are referring to freedom of use,
28
- not price. Our General Public Licenses are designed to make sure that
29
- you have the freedom to distribute copies of free software (and charge
30
- for this service if you wish); that you receive source code or can get
31
- it if you want it; that you can change the software and use pieces of
32
- it in new free programs; and that you are informed that you can do
33
- these things.
34
-
35
- To protect your rights, we need to make restrictions that forbid
36
- distributors to deny you these rights or to ask you to surrender these
37
- rights. These restrictions translate to certain responsibilities for
38
- you if you distribute copies of the library or if you modify it.
39
-
40
- For example, if you distribute copies of the library, whether gratis
41
- or for a fee, you must give the recipients all the rights that we gave
42
- you. You must make sure that they, too, receive or can get the source
43
- code. If you link other code with the library, you must provide
44
- complete object files to the recipients, so that they can relink them
45
- with the library after making changes to the library and recompiling
46
- it. And you must show them these terms so they know their rights.
47
-
48
- We protect your rights with a two-step method: (1) we copyright the
49
- library, and (2) we offer you this license, which gives you legal
50
- permission to copy, distribute and/or modify the library.
51
-
52
- To protect each distributor, we want to make it very clear that
53
- there is no warranty for the free library. Also, if the library is
54
- modified by someone else and passed on, the recipients should know
55
- that what they have is not the original version, so that the original
56
- author's reputation will not be affected by problems that might be
57
- introduced by others.
58
-
59
- Finally, software patents pose a constant threat to the existence of
60
- any free program. We wish to make sure that a company cannot
61
- effectively restrict the users of a free program by obtaining a
62
- restrictive license from a patent holder. Therefore, we insist that
63
- any patent license obtained for a version of the library must be
64
- consistent with the full freedom of use specified in this license.
65
-
66
- Most GNU software, including some libraries, is covered by the
67
- ordinary GNU General Public License. This license, the GNU Lesser
68
- General Public License, applies to certain designated libraries, and
69
- is quite different from the ordinary General Public License. We use
70
- this license for certain libraries in order to permit linking those
71
- libraries into non-free programs.
72
-
73
- When a program is linked with a library, whether statically or using
74
- a shared library, the combination of the two is legally speaking a
75
- combined work, a derivative of the original library. The ordinary
76
- General Public License therefore permits such linking only if the
77
- entire combination fits its criteria of freedom. The Lesser General
78
- Public License permits more lax criteria for linking other code with
79
- the library.
80
-
81
- We call this license the "Lesser" General Public License because it
82
- does Less to protect the user's freedom than the ordinary General
83
- Public License. It also provides other free software developers Less
84
- of an advantage over competing non-free programs. These disadvantages
85
- are the reason we use the ordinary General Public License for many
86
- libraries. However, the Lesser license provides advantages in certain
87
- special circumstances.
88
-
89
- For example, on rare occasions, there may be a special need to
90
- encourage the widest possible use of a certain library, so that it becomes
91
- a de-facto standard. To achieve this, non-free programs must be
92
- allowed to use the library. A more frequent case is that a free
93
- library does the same job as widely used non-free libraries. In this
94
- case, there is little to gain by limiting the free library to free
95
- software only, so we use the Lesser General Public License.
96
-
97
- In other cases, permission to use a particular library in non-free
98
- programs enables a greater number of people to use a large body of
99
- free software. For example, permission to use the GNU C Library in
100
- non-free programs enables many more people to use the whole GNU
101
- operating system, as well as its variant, the GNU/Linux operating
102
- system.
103
-
104
- Although the Lesser General Public License is Less protective of the
105
- users' freedom, it does ensure that the user of a program that is
106
- linked with the Library has the freedom and the wherewithal to run
107
- that program using a modified version of the Library.
108
-
109
- The precise terms and conditions for copying, distribution and
110
- modification follow. Pay close attention to the difference between a
111
- "work based on the library" and a "work that uses the library". The
112
- former contains code derived from the library, whereas the latter must
113
- be combined with the library in order to run.
114
-
115
- GNU LESSER GENERAL PUBLIC LICENSE
116
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
117
-
118
- 0. This License Agreement applies to any software library or other
119
- program which contains a notice placed by the copyright holder or
120
- other authorized party saying it may be distributed under the terms of
121
- this Lesser General Public License (also called "this License").
122
- Each licensee is addressed as "you".
123
-
124
- A "library" means a collection of software functions and/or data
125
- prepared so as to be conveniently linked with application programs
126
- (which use some of those functions and data) to form executables.
127
-
128
- The "Library", below, refers to any such software library or work
129
- which has been distributed under these terms. A "work based on the
130
- Library" means either the Library or any derivative work under
131
- copyright law: that is to say, a work containing the Library or a
132
- portion of it, either verbatim or with modifications and/or translated
133
- straightforwardly into another language. (Hereinafter, translation is
134
- included without limitation in the term "modification".)
135
-
136
- "Source code" for a work means the preferred form of the work for
137
- making modifications to it. For a library, complete source code means
138
- all the source code for all modules it contains, plus any associated
139
- interface definition files, plus the scripts used to control compilation
140
- and installation of the library.
141
-
142
- Activities other than copying, distribution and modification are not
143
- covered by this License; they are outside its scope. The act of
144
- running a program using the Library is not restricted, and output from
145
- such a program is covered only if its contents constitute a work based
146
- on the Library (independent of the use of the Library in a tool for
147
- writing it). Whether that is true depends on what the Library does
148
- and what the program that uses the Library does.
149
-
150
- 1. You may copy and distribute verbatim copies of the Library's
151
- complete source code as you receive it, in any medium, provided that
152
- you conspicuously and appropriately publish on each copy an
153
- appropriate copyright notice and disclaimer of warranty; keep intact
154
- all the notices that refer to this License and to the absence of any
155
- warranty; and distribute a copy of this License along with the
156
- Library.
157
-
158
- You may charge a fee for the physical act of transferring a copy,
159
- and you may at your option offer warranty protection in exchange for a
160
- fee.
161
-
162
- 2. You may modify your copy or copies of the Library or any portion
163
- of it, thus forming a work based on the Library, and copy and
164
- distribute such modifications or work under the terms of Section 1
165
- above, provided that you also meet all of these conditions:
166
-
167
- a) The modified work must itself be a software library.
168
-
169
- b) You must cause the files modified to carry prominent notices
170
- stating that you changed the files and the date of any change.
171
-
172
- c) You must cause the whole of the work to be licensed at no
173
- charge to all third parties under the terms of this License.
174
-
175
- d) If a facility in the modified Library refers to a function or a
176
- table of data to be supplied by an application program that uses
177
- the facility, other than as an argument passed when the facility
178
- is invoked, then you must make a good faith effort to ensure that,
179
- in the event an application does not supply such function or
180
- table, the facility still operates, and performs whatever part of
181
- its purpose remains meaningful.
182
-
183
- (For example, a function in a library to compute square roots has
184
- a purpose that is entirely well-defined independent of the
185
- application. Therefore, Subsection 2d requires that any
186
- application-supplied function or table used by this function must
187
- be optional: if the application does not supply it, the square
188
- root function must still compute square roots.)
189
-
190
- These requirements apply to the modified work as a whole. If
191
- identifiable sections of that work are not derived from the Library,
192
- and can be reasonably considered independent and separate works in
193
- themselves, then this License, and its terms, do not apply to those
194
- sections when you distribute them as separate works. But when you
195
- distribute the same sections as part of a whole which is a work based
196
- on the Library, the distribution of the whole must be on the terms of
197
- this License, whose permissions for other licensees extend to the
198
- entire whole, and thus to each and every part regardless of who wrote
199
- it.
200
-
201
- Thus, it is not the intent of this section to claim rights or contest
202
- your rights to work written entirely by you; rather, the intent is to
203
- exercise the right to control the distribution of derivative or
204
- collective works based on the Library.
205
-
206
- In addition, mere aggregation of another work not based on the Library
207
- with the Library (or with a work based on the Library) on a volume of
208
- a storage or distribution medium does not bring the other work under
209
- the scope of this License.
210
-
211
- 3. You may opt to apply the terms of the ordinary GNU General Public
212
- License instead of this License to a given copy of the Library. To do
213
- this, you must alter all the notices that refer to this License, so
214
- that they refer to the ordinary GNU General Public License, version 2,
215
- instead of to this License. (If a newer version than version 2 of the
216
- ordinary GNU General Public License has appeared, then you can specify
217
- that version instead if you wish.) Do not make any other change in
218
- these notices.
219
-
220
- Once this change is made in a given copy, it is irreversible for
221
- that copy, so the ordinary GNU General Public License applies to all
222
- subsequent copies and derivative works made from that copy.
223
-
224
- This option is useful when you wish to copy part of the code of
225
- the Library into a program that is not a library.
226
-
227
- 4. You may copy and distribute the Library (or a portion or
228
- derivative of it, under Section 2) in object code or executable form
229
- under the terms of Sections 1 and 2 above provided that you accompany
230
- it with the complete corresponding machine-readable source code, which
231
- must be distributed under the terms of Sections 1 and 2 above on a
232
- medium customarily used for software interchange.
233
-
234
- If distribution of object code is made by offering access to copy
235
- from a designated place, then offering equivalent access to copy the
236
- source code from the same place satisfies the requirement to
237
- distribute the source code, even though third parties are not
238
- compelled to copy the source along with the object code.
239
-
240
- 5. A program that contains no derivative of any portion of the
241
- Library, but is designed to work with the Library by being compiled or
242
- linked with it, is called a "work that uses the Library". Such a
243
- work, in isolation, is not a derivative work of the Library, and
244
- therefore falls outside the scope of this License.
245
-
246
- However, linking a "work that uses the Library" with the Library
247
- creates an executable that is a derivative of the Library (because it
248
- contains portions of the Library), rather than a "work that uses the
249
- library". The executable is therefore covered by this License.
250
- Section 6 states terms for distribution of such executables.
251
-
252
- When a "work that uses the Library" uses material from a header file
253
- that is part of the Library, the object code for the work may be a
254
- derivative work of the Library even though the source code is not.
255
- Whether this is true is especially significant if the work can be
256
- linked without the Library, or if the work is itself a library. The
257
- threshold for this to be true is not precisely defined by law.
258
-
259
- If such an object file uses only numerical parameters, data
260
- structure layouts and accessors, and small macros and small inline
261
- functions (ten lines or less in length), then the use of the object
262
- file is unrestricted, regardless of whether it is legally a derivative
263
- work. (Executables containing this object code plus portions of the
264
- Library will still fall under Section 6.)
265
-
266
- Otherwise, if the work is a derivative of the Library, you may
267
- distribute the object code for the work under the terms of Section 6.
268
- Any executables containing that work also fall under Section 6,
269
- whether or not they are linked directly with the Library itself.
270
-
271
- 6. As an exception to the Sections above, you may also combine or
272
- link a "work that uses the Library" with the Library to produce a
273
- work containing portions of the Library, and distribute that work
274
- under terms of your choice, provided that the terms permit
275
- modification of the work for the customer's own use and reverse
276
- engineering for debugging such modifications.
277
-
278
- You must give prominent notice with each copy of the work that the
279
- Library is used in it and that the Library and its use are covered by
280
- this License. You must supply a copy of this License. If the work
281
- during execution displays copyright notices, you must include the
282
- copyright notice for the Library among them, as well as a reference
283
- directing the user to the copy of this License. Also, you must do one
284
- of these things:
285
-
286
- a) Accompany the work with the complete corresponding
287
- machine-readable source code for the Library including whatever
288
- changes were used in the work (which must be distributed under
289
- Sections 1 and 2 above); and, if the work is an executable linked
290
- with the Library, with the complete machine-readable "work that
291
- uses the Library", as object code and/or source code, so that the
292
- user can modify the Library and then relink to produce a modified
293
- executable containing the modified Library. (It is understood
294
- that the user who changes the contents of definitions files in the
295
- Library will not necessarily be able to recompile the application
296
- to use the modified definitions.)
297
-
298
- b) Use a suitable shared library mechanism for linking with the
299
- Library. A suitable mechanism is one that (1) uses at run time a
300
- copy of the library already present on the user's computer system,
301
- rather than copying library functions into the executable, and (2)
302
- will operate properly with a modified version of the library, if
303
- the user installs one, as long as the modified version is
304
- interface-compatible with the version that the work was made with.
305
-
306
- c) Accompany the work with a written offer, valid for at
307
- least three years, to give the same user the materials
308
- specified in Subsection 6a, above, for a charge no more
309
- than the cost of performing this distribution.
310
-
311
- d) If distribution of the work is made by offering access to copy
312
- from a designated place, offer equivalent access to copy the above
313
- specified materials from the same place.
314
-
315
- e) Verify that the user has already received a copy of these
316
- materials or that you have already sent this user a copy.
317
-
318
- For an executable, the required form of the "work that uses the
319
- Library" must include any data and utility programs needed for
320
- reproducing the executable from it. However, as a special exception,
321
- the materials to be distributed need not include anything that is
322
- normally distributed (in either source or binary form) with the major
323
- components (compiler, kernel, and so on) of the operating system on
324
- which the executable runs, unless that component itself accompanies
325
- the executable.
326
-
327
- It may happen that this requirement contradicts the license
328
- restrictions of other proprietary libraries that do not normally
329
- accompany the operating system. Such a contradiction means you cannot
330
- use both them and the Library together in an executable that you
331
- distribute.
332
-
333
- 7. You may place library facilities that are a work based on the
334
- Library side-by-side in a single library together with other library
335
- facilities not covered by this License, and distribute such a combined
336
- library, provided that the separate distribution of the work based on
337
- the Library and of the other library facilities is otherwise
338
- permitted, and provided that you do these two things:
339
-
340
- a) Accompany the combined library with a copy of the same work
341
- based on the Library, uncombined with any other library
342
- facilities. This must be distributed under the terms of the
343
- Sections above.
344
-
345
- b) Give prominent notice with the combined library of the fact
346
- that part of it is a work based on the Library, and explaining
347
- where to find the accompanying uncombined form of the same work.
348
-
349
- 8. You may not copy, modify, sublicense, link with, or distribute
350
- the Library except as expressly provided under this License. Any
351
- attempt otherwise to copy, modify, sublicense, link with, or
352
- distribute the Library is void, and will automatically terminate your
353
- rights under this License. However, parties who have received copies,
354
- or rights, from you under this License will not have their licenses
355
- terminated so long as such parties remain in full compliance.
356
-
357
- 9. You are not required to accept this License, since you have not
358
- signed it. However, nothing else grants you permission to modify or
359
- distribute the Library or its derivative works. These actions are
360
- prohibited by law if you do not accept this License. Therefore, by
361
- modifying or distributing the Library (or any work based on the
362
- Library), you indicate your acceptance of this License to do so, and
363
- all its terms and conditions for copying, distributing or modifying
364
- the Library or works based on it.
365
-
366
- 10. Each time you redistribute the Library (or any work based on the
367
- Library), the recipient automatically receives a license from the
368
- original licensor to copy, distribute, link with or modify the Library
369
- subject to these terms and conditions. You may not impose any further
370
- restrictions on the recipients' exercise of the rights granted herein.
371
- You are not responsible for enforcing compliance by third parties with
372
- this License.
373
-
374
- 11. If, as a consequence of a court judgment or allegation of patent
375
- infringement or for any other reason (not limited to patent issues),
376
- conditions are imposed on you (whether by court order, agreement or
377
- otherwise) that contradict the conditions of this License, they do not
378
- excuse you from the conditions of this License. If you cannot
379
- distribute so as to satisfy simultaneously your obligations under this
380
- License and any other pertinent obligations, then as a consequence you
381
- may not distribute the Library at all. For example, if a patent
382
- license would not permit royalty-free redistribution of the Library by
383
- all those who receive copies directly or indirectly through you, then
384
- the only way you could satisfy both it and this License would be to
385
- refrain entirely from distribution of the Library.
386
-
387
- If any portion of this section is held invalid or unenforceable under any
388
- particular circumstance, the balance of the section is intended to apply,
389
- and the section as a whole is intended to apply in other circumstances.
390
-
391
- It is not the purpose of this section to induce you to infringe any
392
- patents or other property right claims or to contest validity of any
393
- such claims; this section has the sole purpose of protecting the
394
- integrity of the free software distribution system which is
395
- implemented by public license practices. Many people have made
396
- generous contributions to the wide range of software distributed
397
- through that system in reliance on consistent application of that
398
- system; it is up to the author/donor to decide if he or she is willing
399
- to distribute software through any other system and a licensee cannot
400
- impose that choice.
401
-
402
- This section is intended to make thoroughly clear what is believed to
403
- be a consequence of the rest of this License.
404
-
405
- 12. If the distribution and/or use of the Library is restricted in
406
- certain countries either by patents or by copyrighted interfaces, the
407
- original copyright holder who places the Library under this License may add
408
- an explicit geographical distribution limitation excluding those countries,
409
- so that distribution is permitted only in or among countries not thus
410
- excluded. In such case, this License incorporates the limitation as if
411
- written in the body of this License.
412
-
413
- 13. The Free Software Foundation may publish revised and/or new
414
- versions of the Lesser General Public License from time to time.
415
- Such new versions will be similar in spirit to the present version,
416
- but may differ in detail to address new problems or concerns.
417
-
418
- Each version is given a distinguishing version number. If the Library
419
- specifies a version number of this License which applies to it and
420
- "any later version", you have the option of following the terms and
421
- conditions either of that version or of any later version published by
422
- the Free Software Foundation. If the Library does not specify a
423
- license version number, you may choose any version ever published by
424
- the Free Software Foundation.
425
-
426
- 14. If you wish to incorporate parts of the Library into other free
427
- programs whose distribution conditions are incompatible with these,
428
- write to the author to ask for permission. For software which is
429
- copyrighted by the Free Software Foundation, write to the Free
430
- Software Foundation; we sometimes make exceptions for this. Our
431
- decision will be guided by the two goals of preserving the free status
432
- of all derivatives of our free software and of promoting the sharing
433
- and reuse of software generally.
434
-
435
- NO WARRANTY
436
-
437
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
438
- WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
439
- EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
440
- OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
441
- KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
442
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
443
- PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
444
- LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
445
- THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
446
-
447
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
448
- WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
449
- AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
450
- FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
451
- CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
452
- LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
453
- RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
454
- FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
455
- SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
456
- DAMAGES.
457
-
458
- END OF TERMS AND CONDITIONS
459
-
460
- How to Apply These Terms to Your New Libraries
461
-
462
- If you develop a new library, and you want it to be of the greatest
463
- possible use to the public, we recommend making it free software that
464
- everyone can redistribute and change. You can do so by permitting
465
- redistribution under these terms (or, alternatively, under the terms of the
466
- ordinary General Public License).
467
-
468
- To apply these terms, attach the following notices to the library. It is
469
- safest to attach them to the start of each source file to most effectively
470
- convey the exclusion of warranty; and each file should have at least the
471
- "copyright" line and a pointer to where the full notice is found.
472
-
473
- <one line to give the library's name and a brief idea of what it does.>
474
- Copyright (C) <year> <name of author>
475
-
476
- This library is free software; you can redistribute it and/or
477
- modify it under the terms of the GNU Lesser General Public
478
- License as published by the Free Software Foundation; either
479
- version 2.1 of the License, or (at your option) any later version.
480
-
481
- This library is distributed in the hope that it will be useful,
482
- but WITHOUT ANY WARRANTY; without even the implied warranty of
483
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
484
- Lesser General Public License for more details.
485
-
486
- You should have received a copy of the GNU Lesser General Public
487
- License along with this library; if not, write to the Free Software
488
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
489
-
490
- Also add information on how to contact you by electronic and paper mail.
491
-
492
- You should also get your employer (if you work as a programmer) or your
493
- school, if any, to sign a "copyright disclaimer" for the library, if
494
- necessary. Here is a sample; alter the names:
495
-
496
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
497
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
498
-
499
- <signature of Ty Coon>, 1 April 1990
500
- Ty Coon, President of Vice
501
-
502
- That's all there is to it!
503
-
504
-
1
+ GNU LESSER GENERAL PUBLIC LICENSE
2
+ Version 2.1, February 1999
3
+
4
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
5
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6
+ Everyone is permitted to copy and distribute verbatim copies
7
+ of this license document, but changing it is not allowed.
8
+
9
+ [This is the first released version of the Lesser GPL. It also counts
10
+ as the successor of the GNU Library Public License, version 2, hence
11
+ the version number 2.1.]
12
+
13
+ Preamble
14
+
15
+ The licenses for most software are designed to take away your
16
+ freedom to share and change it. By contrast, the GNU General Public
17
+ Licenses are intended to guarantee your freedom to share and change
18
+ free software--to make sure the software is free for all its users.
19
+
20
+ This license, the Lesser General Public License, applies to some
21
+ specially designated software packages--typically libraries--of the
22
+ Free Software Foundation and other authors who decide to use it. You
23
+ can use it too, but we suggest you first think carefully about whether
24
+ this license or the ordinary General Public License is the better
25
+ strategy to use in any particular case, based on the explanations below.
26
+
27
+ When we speak of free software, we are referring to freedom of use,
28
+ not price. Our General Public Licenses are designed to make sure that
29
+ you have the freedom to distribute copies of free software (and charge
30
+ for this service if you wish); that you receive source code or can get
31
+ it if you want it; that you can change the software and use pieces of
32
+ it in new free programs; and that you are informed that you can do
33
+ these things.
34
+
35
+ To protect your rights, we need to make restrictions that forbid
36
+ distributors to deny you these rights or to ask you to surrender these
37
+ rights. These restrictions translate to certain responsibilities for
38
+ you if you distribute copies of the library or if you modify it.
39
+
40
+ For example, if you distribute copies of the library, whether gratis
41
+ or for a fee, you must give the recipients all the rights that we gave
42
+ you. You must make sure that they, too, receive or can get the source
43
+ code. If you link other code with the library, you must provide
44
+ complete object files to the recipients, so that they can relink them
45
+ with the library after making changes to the library and recompiling
46
+ it. And you must show them these terms so they know their rights.
47
+
48
+ We protect your rights with a two-step method: (1) we copyright the
49
+ library, and (2) we offer you this license, which gives you legal
50
+ permission to copy, distribute and/or modify the library.
51
+
52
+ To protect each distributor, we want to make it very clear that
53
+ there is no warranty for the free library. Also, if the library is
54
+ modified by someone else and passed on, the recipients should know
55
+ that what they have is not the original version, so that the original
56
+ author's reputation will not be affected by problems that might be
57
+ introduced by others.
58
+
59
+ Finally, software patents pose a constant threat to the existence of
60
+ any free program. We wish to make sure that a company cannot
61
+ effectively restrict the users of a free program by obtaining a
62
+ restrictive license from a patent holder. Therefore, we insist that
63
+ any patent license obtained for a version of the library must be
64
+ consistent with the full freedom of use specified in this license.
65
+
66
+ Most GNU software, including some libraries, is covered by the
67
+ ordinary GNU General Public License. This license, the GNU Lesser
68
+ General Public License, applies to certain designated libraries, and
69
+ is quite different from the ordinary General Public License. We use
70
+ this license for certain libraries in order to permit linking those
71
+ libraries into non-free programs.
72
+
73
+ When a program is linked with a library, whether statically or using
74
+ a shared library, the combination of the two is legally speaking a
75
+ combined work, a derivative of the original library. The ordinary
76
+ General Public License therefore permits such linking only if the
77
+ entire combination fits its criteria of freedom. The Lesser General
78
+ Public License permits more lax criteria for linking other code with
79
+ the library.
80
+
81
+ We call this license the "Lesser" General Public License because it
82
+ does Less to protect the user's freedom than the ordinary General
83
+ Public License. It also provides other free software developers Less
84
+ of an advantage over competing non-free programs. These disadvantages
85
+ are the reason we use the ordinary General Public License for many
86
+ libraries. However, the Lesser license provides advantages in certain
87
+ special circumstances.
88
+
89
+ For example, on rare occasions, there may be a special need to
90
+ encourage the widest possible use of a certain library, so that it becomes
91
+ a de-facto standard. To achieve this, non-free programs must be
92
+ allowed to use the library. A more frequent case is that a free
93
+ library does the same job as widely used non-free libraries. In this
94
+ case, there is little to gain by limiting the free library to free
95
+ software only, so we use the Lesser General Public License.
96
+
97
+ In other cases, permission to use a particular library in non-free
98
+ programs enables a greater number of people to use a large body of
99
+ free software. For example, permission to use the GNU C Library in
100
+ non-free programs enables many more people to use the whole GNU
101
+ operating system, as well as its variant, the GNU/Linux operating
102
+ system.
103
+
104
+ Although the Lesser General Public License is Less protective of the
105
+ users' freedom, it does ensure that the user of a program that is
106
+ linked with the Library has the freedom and the wherewithal to run
107
+ that program using a modified version of the Library.
108
+
109
+ The precise terms and conditions for copying, distribution and
110
+ modification follow. Pay close attention to the difference between a
111
+ "work based on the library" and a "work that uses the library". The
112
+ former contains code derived from the library, whereas the latter must
113
+ be combined with the library in order to run.
114
+
115
+ GNU LESSER GENERAL PUBLIC LICENSE
116
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
117
+
118
+ 0. This License Agreement applies to any software library or other
119
+ program which contains a notice placed by the copyright holder or
120
+ other authorized party saying it may be distributed under the terms of
121
+ this Lesser General Public License (also called "this License").
122
+ Each licensee is addressed as "you".
123
+
124
+ A "library" means a collection of software functions and/or data
125
+ prepared so as to be conveniently linked with application programs
126
+ (which use some of those functions and data) to form executables.
127
+
128
+ The "Library", below, refers to any such software library or work
129
+ which has been distributed under these terms. A "work based on the
130
+ Library" means either the Library or any derivative work under
131
+ copyright law: that is to say, a work containing the Library or a
132
+ portion of it, either verbatim or with modifications and/or translated
133
+ straightforwardly into another language. (Hereinafter, translation is
134
+ included without limitation in the term "modification".)
135
+
136
+ "Source code" for a work means the preferred form of the work for
137
+ making modifications to it. For a library, complete source code means
138
+ all the source code for all modules it contains, plus any associated
139
+ interface definition files, plus the scripts used to control compilation
140
+ and installation of the library.
141
+
142
+ Activities other than copying, distribution and modification are not
143
+ covered by this License; they are outside its scope. The act of
144
+ running a program using the Library is not restricted, and output from
145
+ such a program is covered only if its contents constitute a work based
146
+ on the Library (independent of the use of the Library in a tool for
147
+ writing it). Whether that is true depends on what the Library does
148
+ and what the program that uses the Library does.
149
+
150
+ 1. You may copy and distribute verbatim copies of the Library's
151
+ complete source code as you receive it, in any medium, provided that
152
+ you conspicuously and appropriately publish on each copy an
153
+ appropriate copyright notice and disclaimer of warranty; keep intact
154
+ all the notices that refer to this License and to the absence of any
155
+ warranty; and distribute a copy of this License along with the
156
+ Library.
157
+
158
+ You may charge a fee for the physical act of transferring a copy,
159
+ and you may at your option offer warranty protection in exchange for a
160
+ fee.
161
+
162
+ 2. You may modify your copy or copies of the Library or any portion
163
+ of it, thus forming a work based on the Library, and copy and
164
+ distribute such modifications or work under the terms of Section 1
165
+ above, provided that you also meet all of these conditions:
166
+
167
+ a) The modified work must itself be a software library.
168
+
169
+ b) You must cause the files modified to carry prominent notices
170
+ stating that you changed the files and the date of any change.
171
+
172
+ c) You must cause the whole of the work to be licensed at no
173
+ charge to all third parties under the terms of this License.
174
+
175
+ d) If a facility in the modified Library refers to a function or a
176
+ table of data to be supplied by an application program that uses
177
+ the facility, other than as an argument passed when the facility
178
+ is invoked, then you must make a good faith effort to ensure that,
179
+ in the event an application does not supply such function or
180
+ table, the facility still operates, and performs whatever part of
181
+ its purpose remains meaningful.
182
+
183
+ (For example, a function in a library to compute square roots has
184
+ a purpose that is entirely well-defined independent of the
185
+ application. Therefore, Subsection 2d requires that any
186
+ application-supplied function or table used by this function must
187
+ be optional: if the application does not supply it, the square
188
+ root function must still compute square roots.)
189
+
190
+ These requirements apply to the modified work as a whole. If
191
+ identifiable sections of that work are not derived from the Library,
192
+ and can be reasonably considered independent and separate works in
193
+ themselves, then this License, and its terms, do not apply to those
194
+ sections when you distribute them as separate works. But when you
195
+ distribute the same sections as part of a whole which is a work based
196
+ on the Library, the distribution of the whole must be on the terms of
197
+ this License, whose permissions for other licensees extend to the
198
+ entire whole, and thus to each and every part regardless of who wrote
199
+ it.
200
+
201
+ Thus, it is not the intent of this section to claim rights or contest
202
+ your rights to work written entirely by you; rather, the intent is to
203
+ exercise the right to control the distribution of derivative or
204
+ collective works based on the Library.
205
+
206
+ In addition, mere aggregation of another work not based on the Library
207
+ with the Library (or with a work based on the Library) on a volume of
208
+ a storage or distribution medium does not bring the other work under
209
+ the scope of this License.
210
+
211
+ 3. You may opt to apply the terms of the ordinary GNU General Public
212
+ License instead of this License to a given copy of the Library. To do
213
+ this, you must alter all the notices that refer to this License, so
214
+ that they refer to the ordinary GNU General Public License, version 2,
215
+ instead of to this License. (If a newer version than version 2 of the
216
+ ordinary GNU General Public License has appeared, then you can specify
217
+ that version instead if you wish.) Do not make any other change in
218
+ these notices.
219
+
220
+ Once this change is made in a given copy, it is irreversible for
221
+ that copy, so the ordinary GNU General Public License applies to all
222
+ subsequent copies and derivative works made from that copy.
223
+
224
+ This option is useful when you wish to copy part of the code of
225
+ the Library into a program that is not a library.
226
+
227
+ 4. You may copy and distribute the Library (or a portion or
228
+ derivative of it, under Section 2) in object code or executable form
229
+ under the terms of Sections 1 and 2 above provided that you accompany
230
+ it with the complete corresponding machine-readable source code, which
231
+ must be distributed under the terms of Sections 1 and 2 above on a
232
+ medium customarily used for software interchange.
233
+
234
+ If distribution of object code is made by offering access to copy
235
+ from a designated place, then offering equivalent access to copy the
236
+ source code from the same place satisfies the requirement to
237
+ distribute the source code, even though third parties are not
238
+ compelled to copy the source along with the object code.
239
+
240
+ 5. A program that contains no derivative of any portion of the
241
+ Library, but is designed to work with the Library by being compiled or
242
+ linked with it, is called a "work that uses the Library". Such a
243
+ work, in isolation, is not a derivative work of the Library, and
244
+ therefore falls outside the scope of this License.
245
+
246
+ However, linking a "work that uses the Library" with the Library
247
+ creates an executable that is a derivative of the Library (because it
248
+ contains portions of the Library), rather than a "work that uses the
249
+ library". The executable is therefore covered by this License.
250
+ Section 6 states terms for distribution of such executables.
251
+
252
+ When a "work that uses the Library" uses material from a header file
253
+ that is part of the Library, the object code for the work may be a
254
+ derivative work of the Library even though the source code is not.
255
+ Whether this is true is especially significant if the work can be
256
+ linked without the Library, or if the work is itself a library. The
257
+ threshold for this to be true is not precisely defined by law.
258
+
259
+ If such an object file uses only numerical parameters, data
260
+ structure layouts and accessors, and small macros and small inline
261
+ functions (ten lines or less in length), then the use of the object
262
+ file is unrestricted, regardless of whether it is legally a derivative
263
+ work. (Executables containing this object code plus portions of the
264
+ Library will still fall under Section 6.)
265
+
266
+ Otherwise, if the work is a derivative of the Library, you may
267
+ distribute the object code for the work under the terms of Section 6.
268
+ Any executables containing that work also fall under Section 6,
269
+ whether or not they are linked directly with the Library itself.
270
+
271
+ 6. As an exception to the Sections above, you may also combine or
272
+ link a "work that uses the Library" with the Library to produce a
273
+ work containing portions of the Library, and distribute that work
274
+ under terms of your choice, provided that the terms permit
275
+ modification of the work for the customer's own use and reverse
276
+ engineering for debugging such modifications.
277
+
278
+ You must give prominent notice with each copy of the work that the
279
+ Library is used in it and that the Library and its use are covered by
280
+ this License. You must supply a copy of this License. If the work
281
+ during execution displays copyright notices, you must include the
282
+ copyright notice for the Library among them, as well as a reference
283
+ directing the user to the copy of this License. Also, you must do one
284
+ of these things:
285
+
286
+ a) Accompany the work with the complete corresponding
287
+ machine-readable source code for the Library including whatever
288
+ changes were used in the work (which must be distributed under
289
+ Sections 1 and 2 above); and, if the work is an executable linked
290
+ with the Library, with the complete machine-readable "work that
291
+ uses the Library", as object code and/or source code, so that the
292
+ user can modify the Library and then relink to produce a modified
293
+ executable containing the modified Library. (It is understood
294
+ that the user who changes the contents of definitions files in the
295
+ Library will not necessarily be able to recompile the application
296
+ to use the modified definitions.)
297
+
298
+ b) Use a suitable shared library mechanism for linking with the
299
+ Library. A suitable mechanism is one that (1) uses at run time a
300
+ copy of the library already present on the user's computer system,
301
+ rather than copying library functions into the executable, and (2)
302
+ will operate properly with a modified version of the library, if
303
+ the user installs one, as long as the modified version is
304
+ interface-compatible with the version that the work was made with.
305
+
306
+ c) Accompany the work with a written offer, valid for at
307
+ least three years, to give the same user the materials
308
+ specified in Subsection 6a, above, for a charge no more
309
+ than the cost of performing this distribution.
310
+
311
+ d) If distribution of the work is made by offering access to copy
312
+ from a designated place, offer equivalent access to copy the above
313
+ specified materials from the same place.
314
+
315
+ e) Verify that the user has already received a copy of these
316
+ materials or that you have already sent this user a copy.
317
+
318
+ For an executable, the required form of the "work that uses the
319
+ Library" must include any data and utility programs needed for
320
+ reproducing the executable from it. However, as a special exception,
321
+ the materials to be distributed need not include anything that is
322
+ normally distributed (in either source or binary form) with the major
323
+ components (compiler, kernel, and so on) of the operating system on
324
+ which the executable runs, unless that component itself accompanies
325
+ the executable.
326
+
327
+ It may happen that this requirement contradicts the license
328
+ restrictions of other proprietary libraries that do not normally
329
+ accompany the operating system. Such a contradiction means you cannot
330
+ use both them and the Library together in an executable that you
331
+ distribute.
332
+
333
+ 7. You may place library facilities that are a work based on the
334
+ Library side-by-side in a single library together with other library
335
+ facilities not covered by this License, and distribute such a combined
336
+ library, provided that the separate distribution of the work based on
337
+ the Library and of the other library facilities is otherwise
338
+ permitted, and provided that you do these two things:
339
+
340
+ a) Accompany the combined library with a copy of the same work
341
+ based on the Library, uncombined with any other library
342
+ facilities. This must be distributed under the terms of the
343
+ Sections above.
344
+
345
+ b) Give prominent notice with the combined library of the fact
346
+ that part of it is a work based on the Library, and explaining
347
+ where to find the accompanying uncombined form of the same work.
348
+
349
+ 8. You may not copy, modify, sublicense, link with, or distribute
350
+ the Library except as expressly provided under this License. Any
351
+ attempt otherwise to copy, modify, sublicense, link with, or
352
+ distribute the Library is void, and will automatically terminate your
353
+ rights under this License. However, parties who have received copies,
354
+ or rights, from you under this License will not have their licenses
355
+ terminated so long as such parties remain in full compliance.
356
+
357
+ 9. You are not required to accept this License, since you have not
358
+ signed it. However, nothing else grants you permission to modify or
359
+ distribute the Library or its derivative works. These actions are
360
+ prohibited by law if you do not accept this License. Therefore, by
361
+ modifying or distributing the Library (or any work based on the
362
+ Library), you indicate your acceptance of this License to do so, and
363
+ all its terms and conditions for copying, distributing or modifying
364
+ the Library or works based on it.
365
+
366
+ 10. Each time you redistribute the Library (or any work based on the
367
+ Library), the recipient automatically receives a license from the
368
+ original licensor to copy, distribute, link with or modify the Library
369
+ subject to these terms and conditions. You may not impose any further
370
+ restrictions on the recipients' exercise of the rights granted herein.
371
+ You are not responsible for enforcing compliance by third parties with
372
+ this License.
373
+
374
+ 11. If, as a consequence of a court judgment or allegation of patent
375
+ infringement or for any other reason (not limited to patent issues),
376
+ conditions are imposed on you (whether by court order, agreement or
377
+ otherwise) that contradict the conditions of this License, they do not
378
+ excuse you from the conditions of this License. If you cannot
379
+ distribute so as to satisfy simultaneously your obligations under this
380
+ License and any other pertinent obligations, then as a consequence you
381
+ may not distribute the Library at all. For example, if a patent
382
+ license would not permit royalty-free redistribution of the Library by
383
+ all those who receive copies directly or indirectly through you, then
384
+ the only way you could satisfy both it and this License would be to
385
+ refrain entirely from distribution of the Library.
386
+
387
+ If any portion of this section is held invalid or unenforceable under any
388
+ particular circumstance, the balance of the section is intended to apply,
389
+ and the section as a whole is intended to apply in other circumstances.
390
+
391
+ It is not the purpose of this section to induce you to infringe any
392
+ patents or other property right claims or to contest validity of any
393
+ such claims; this section has the sole purpose of protecting the
394
+ integrity of the free software distribution system which is
395
+ implemented by public license practices. Many people have made
396
+ generous contributions to the wide range of software distributed
397
+ through that system in reliance on consistent application of that
398
+ system; it is up to the author/donor to decide if he or she is willing
399
+ to distribute software through any other system and a licensee cannot
400
+ impose that choice.
401
+
402
+ This section is intended to make thoroughly clear what is believed to
403
+ be a consequence of the rest of this License.
404
+
405
+ 12. If the distribution and/or use of the Library is restricted in
406
+ certain countries either by patents or by copyrighted interfaces, the
407
+ original copyright holder who places the Library under this License may add
408
+ an explicit geographical distribution limitation excluding those countries,
409
+ so that distribution is permitted only in or among countries not thus
410
+ excluded. In such case, this License incorporates the limitation as if
411
+ written in the body of this License.
412
+
413
+ 13. The Free Software Foundation may publish revised and/or new
414
+ versions of the Lesser General Public License from time to time.
415
+ Such new versions will be similar in spirit to the present version,
416
+ but may differ in detail to address new problems or concerns.
417
+
418
+ Each version is given a distinguishing version number. If the Library
419
+ specifies a version number of this License which applies to it and
420
+ "any later version", you have the option of following the terms and
421
+ conditions either of that version or of any later version published by
422
+ the Free Software Foundation. If the Library does not specify a
423
+ license version number, you may choose any version ever published by
424
+ the Free Software Foundation.
425
+
426
+ 14. If you wish to incorporate parts of the Library into other free
427
+ programs whose distribution conditions are incompatible with these,
428
+ write to the author to ask for permission. For software which is
429
+ copyrighted by the Free Software Foundation, write to the Free
430
+ Software Foundation; we sometimes make exceptions for this. Our
431
+ decision will be guided by the two goals of preserving the free status
432
+ of all derivatives of our free software and of promoting the sharing
433
+ and reuse of software generally.
434
+
435
+ NO WARRANTY
436
+
437
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
438
+ WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
439
+ EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
440
+ OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
441
+ KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
442
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
443
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
444
+ LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
445
+ THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
446
+
447
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
448
+ WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
449
+ AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
450
+ FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
451
+ CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
452
+ LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
453
+ RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
454
+ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
455
+ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
456
+ DAMAGES.
457
+
458
+ END OF TERMS AND CONDITIONS
459
+
460
+ How to Apply These Terms to Your New Libraries
461
+
462
+ If you develop a new library, and you want it to be of the greatest
463
+ possible use to the public, we recommend making it free software that
464
+ everyone can redistribute and change. You can do so by permitting
465
+ redistribution under these terms (or, alternatively, under the terms of the
466
+ ordinary General Public License).
467
+
468
+ To apply these terms, attach the following notices to the library. It is
469
+ safest to attach them to the start of each source file to most effectively
470
+ convey the exclusion of warranty; and each file should have at least the
471
+ "copyright" line and a pointer to where the full notice is found.
472
+
473
+ <one line to give the library's name and a brief idea of what it does.>
474
+ Copyright (C) <year> <name of author>
475
+
476
+ This library is free software; you can redistribute it and/or
477
+ modify it under the terms of the GNU Lesser General Public
478
+ License as published by the Free Software Foundation; either
479
+ version 2.1 of the License, or (at your option) any later version.
480
+
481
+ This library is distributed in the hope that it will be useful,
482
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
483
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
484
+ Lesser General Public License for more details.
485
+
486
+ You should have received a copy of the GNU Lesser General Public
487
+ License along with this library; if not, write to the Free Software
488
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
489
+
490
+ Also add information on how to contact you by electronic and paper mail.
491
+
492
+ You should also get your employer (if you work as a programmer) or your
493
+ school, if any, to sign a "copyright disclaimer" for the library, if
494
+ necessary. Here is a sample; alter the names:
495
+
496
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
497
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
498
+
499
+ <signature of Ty Coon>, 1 April 1990
500
+ Ty Coon, President of Vice
501
+
502
+ That's all there is to it!
503
+
504
+
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/directionality/editor_plugin_src.js CHANGED
@@ -1,82 +1,82 @@
1
- /**
2
- * editor_plugin_src.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() {
12
- tinymce.create('tinymce.plugins.Directionality', {
13
- init : function(ed, url) {
14
- var t = this;
15
-
16
- t.editor = ed;
17
-
18
- ed.addCommand('mceDirectionLTR', function() {
19
- var e = ed.dom.getParent(ed.selection.getNode(), ed.dom.isBlock);
20
-
21
- if (e) {
22
- if (ed.dom.getAttrib(e, "dir") != "ltr")
23
- ed.dom.setAttrib(e, "dir", "ltr");
24
- else
25
- ed.dom.setAttrib(e, "dir", "");
26
- }
27
-
28
- ed.nodeChanged();
29
- });
30
-
31
- ed.addCommand('mceDirectionRTL', function() {
32
- var e = ed.dom.getParent(ed.selection.getNode(), ed.dom.isBlock);
33
-
34
- if (e) {
35
- if (ed.dom.getAttrib(e, "dir") != "rtl")
36
- ed.dom.setAttrib(e, "dir", "rtl");
37
- else
38
- ed.dom.setAttrib(e, "dir", "");
39
- }
40
-
41
- ed.nodeChanged();
42
- });
43
-
44
- ed.addButton('ltr', {title : 'directionality.ltr_desc', cmd : 'mceDirectionLTR'});
45
- ed.addButton('rtl', {title : 'directionality.rtl_desc', cmd : 'mceDirectionRTL'});
46
-
47
- ed.onNodeChange.add(t._nodeChange, t);
48
- },
49
-
50
- getInfo : function() {
51
- return {
52
- longname : 'Directionality',
53
- author : 'Moxiecode Systems AB',
54
- authorurl : 'http://tinymce.moxiecode.com',
55
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality',
56
- version : tinymce.majorVersion + "." + tinymce.minorVersion
57
- };
58
- },
59
-
60
- // Private methods
61
-
62
- _nodeChange : function(ed, cm, n) {
63
- var dom = ed.dom, dir;
64
-
65
- n = dom.getParent(n, dom.isBlock);
66
- if (!n) {
67
- cm.setDisabled('ltr', 1);
68
- cm.setDisabled('rtl', 1);
69
- return;
70
- }
71
-
72
- dir = dom.getAttrib(n, 'dir');
73
- cm.setActive('ltr', dir == "ltr");
74
- cm.setDisabled('ltr', 0);
75
- cm.setActive('rtl', dir == "rtl");
76
- cm.setDisabled('rtl', 0);
77
- }
78
- });
79
-
80
- // Register plugin
81
- tinymce.PluginManager.add('directionality', tinymce.plugins.Directionality);
82
  })();
1
+ /**
2
+ * editor_plugin_src.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() {
12
+ tinymce.create('tinymce.plugins.Directionality', {
13
+ init : function(ed, url) {
14
+ var t = this;
15
+
16
+ t.editor = ed;
17
+
18
+ ed.addCommand('mceDirectionLTR', function() {
19
+ var e = ed.dom.getParent(ed.selection.getNode(), ed.dom.isBlock);
20
+
21
+ if (e) {
22
+ if (ed.dom.getAttrib(e, "dir") != "ltr")
23
+ ed.dom.setAttrib(e, "dir", "ltr");
24
+ else
25
+ ed.dom.setAttrib(e, "dir", "");
26
+ }
27
+
28
+ ed.nodeChanged();
29
+ });
30
+
31
+ ed.addCommand('mceDirectionRTL', function() {
32
+ var e = ed.dom.getParent(ed.selection.getNode(), ed.dom.isBlock);
33
+
34
+ if (e) {
35
+ if (ed.dom.getAttrib(e, "dir") != "rtl")
36
+ ed.dom.setAttrib(e, "dir", "rtl");
37
+ else
38
+ ed.dom.setAttrib(e, "dir", "");
39
+ }
40
+
41
+ ed.nodeChanged();
42
+ });
43
+
44
+ ed.addButton('ltr', {title : 'directionality.ltr_desc', cmd : 'mceDirectionLTR'});
45
+ ed.addButton('rtl', {title : 'directionality.rtl_desc', cmd : 'mceDirectionRTL'});
46
+
47
+ ed.onNodeChange.add(t._nodeChange, t);
48
+ },
49
+
50
+ getInfo : function() {
51
+ return {
52
+ longname : 'Directionality',
53
+ author : 'Moxiecode Systems AB',
54
+ authorurl : 'http://tinymce.moxiecode.com',
55
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality',
56
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
57
+ };
58
+ },
59
+
60
+ // Private methods
61
+
62
+ _nodeChange : function(ed, cm, n) {
63
+ var dom = ed.dom, dir;
64
+
65
+ n = dom.getParent(n, dom.isBlock);
66
+ if (!n) {
67
+ cm.setDisabled('ltr', 1);
68
+ cm.setDisabled('rtl', 1);
69
+ return;
70
+ }
71
+
72
+ dir = dom.getAttrib(n, 'dir');
73
+ cm.setActive('ltr', dir == "ltr");
74
+ cm.setDisabled('ltr', 0);
75
+ cm.setActive('rtl', dir == "rtl");
76
+ cm.setDisabled('rtl', 0);
77
+ }
78
+ });
79
+
80
+ // Register plugin
81
+ tinymce.PluginManager.add('directionality', tinymce.plugins.Directionality);
82
  })();
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/fullscreen/editor_plugin_src.js CHANGED
@@ -1,159 +1,159 @@
1
- /**
2
- * editor_plugin_src.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() {
12
- var DOM = tinymce.DOM;
13
-
14
- tinymce.create('tinymce.plugins.FullScreenPlugin', {
15
- init : function(ed, url) {
16
- var t = this, s = {}, vp, posCss;
17
-
18
- t.editor = ed;
19
-
20
- // Register commands
21
- ed.addCommand('mceFullScreen', function() {
22
- var win, de = DOM.doc.documentElement;
23
-
24
- if (ed.getParam('fullscreen_is_enabled')) {
25
- if (ed.getParam('fullscreen_new_window'))
26
- closeFullscreen(); // Call to close in new window
27
- else {
28
- DOM.win.setTimeout(function() {
29
- tinymce.dom.Event.remove(DOM.win, 'resize', t.resizeFunc);
30
- tinyMCE.get(ed.getParam('fullscreen_editor_id')).setContent(ed.getContent());
31
- tinyMCE.remove(ed);
32
- DOM.remove('mce_fullscreen_container');
33
- de.style.overflow = ed.getParam('fullscreen_html_overflow');
34
- DOM.setStyle(DOM.doc.body, 'overflow', ed.getParam('fullscreen_overflow'));
35
- DOM.win.scrollTo(ed.getParam('fullscreen_scrollx'), ed.getParam('fullscreen_scrolly'));
36
- tinyMCE.settings = tinyMCE.oldSettings; // Restore old settings
37
- }, 10);
38
- }
39
-
40
- return;
41
- }
42
-
43
- if (ed.getParam('fullscreen_new_window')) {
44
- win = DOM.win.open(url + "/fullscreen.htm", "mceFullScreenPopup", "fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width=" + screen.availWidth + ",height=" + screen.availHeight);
45
- try {
46
- win.resizeTo(screen.availWidth, screen.availHeight);
47
- } catch (e) {
48
- // Ignore
49
- }
50
- } else {
51
- tinyMCE.oldSettings = tinyMCE.settings; // Store old settings
52
- s.fullscreen_overflow = DOM.getStyle(DOM.doc.body, 'overflow', 1) || 'auto';
53
- s.fullscreen_html_overflow = DOM.getStyle(de, 'overflow', 1);
54
- vp = DOM.getViewPort();
55
- s.fullscreen_scrollx = vp.x;
56
- s.fullscreen_scrolly = vp.y;
57
-
58
- // Fixes an Opera bug where the scrollbars doesn't reappear
59
- if (tinymce.isOpera && s.fullscreen_overflow == 'visible')
60
- s.fullscreen_overflow = 'auto';
61
-
62
- // Fixes an IE bug where horizontal scrollbars would appear
63
- if (tinymce.isIE && s.fullscreen_overflow == 'scroll')
64
- s.fullscreen_overflow = 'auto';
65
-
66
- // Fixes an IE bug where the scrollbars doesn't reappear
67
- if (tinymce.isIE && (s.fullscreen_html_overflow == 'visible' || s.fullscreen_html_overflow == 'scroll'))
68
- s.fullscreen_html_overflow = 'auto';
69
-
70
- if (s.fullscreen_overflow == '0px')
71
- s.fullscreen_overflow = '';
72
-
73
- DOM.setStyle(DOM.doc.body, 'overflow', 'hidden');
74
- de.style.overflow = 'hidden'; //Fix for IE6/7
75
- vp = DOM.getViewPort();
76
- DOM.win.scrollTo(0, 0);
77
-
78
- if (tinymce.isIE)
79
- vp.h -= 1;
80
-
81
- // Use fixed position if it exists
82
- if (tinymce.isIE6 || document.compatMode == 'BackCompat')
83
- posCss = 'absolute;top:' + vp.y;
84
- else
85
- posCss = 'fixed;top:0';
86
-
87
- n = DOM.add(DOM.doc.body, 'div', {
88
- id : 'mce_fullscreen_container',
89
- style : 'position:' + posCss + ';left:0;width:' + vp.w + 'px;height:' + vp.h + 'px;z-index:200000;'});
90
- DOM.add(n, 'div', {id : 'mce_fullscreen'});
91
-
92
- tinymce.each(ed.settings, function(v, n) {
93
- s[n] = v;
94
- });
95
-
96
- s.id = 'mce_fullscreen';
97
- s.width = n.clientWidth;
98
- s.height = n.clientHeight - 15;
99
- s.fullscreen_is_enabled = true;
100
- s.fullscreen_editor_id = ed.id;
101
- s.theme_advanced_resizing = false;
102
- s.save_onsavecallback = function() {
103
- ed.setContent(tinyMCE.get(s.id).getContent());
104
- ed.execCommand('mceSave');
105
- };
106
-
107
- tinymce.each(ed.getParam('fullscreen_settings'), function(v, k) {
108
- s[k] = v;
109
- });
110
-
111
- if (s.theme_advanced_toolbar_location === 'external')
112
- s.theme_advanced_toolbar_location = 'top';
113
-
114
- t.fullscreenEditor = new tinymce.Editor('mce_fullscreen', s);
115
- t.fullscreenEditor.onInit.add(function() {
116
- t.fullscreenEditor.setContent(ed.getContent());
117
- t.fullscreenEditor.focus();
118
- });
119
-
120
- t.fullscreenEditor.render();
121
-
122
- t.fullscreenElement = new tinymce.dom.Element('mce_fullscreen_container');
123
- t.fullscreenElement.update();
124
- //document.body.overflow = 'hidden';
125
-
126
- t.resizeFunc = tinymce.dom.Event.add(DOM.win, 'resize', function() {
127
- var vp = tinymce.DOM.getViewPort(), fed = t.fullscreenEditor, outerSize, innerSize;
128
-
129
- // Get outer/inner size to get a delta size that can be used to calc the new iframe size
130
- outerSize = fed.dom.getSize(fed.getContainer().firstChild);
131
- innerSize = fed.dom.getSize(fed.getContainer().getElementsByTagName('iframe')[0]);
132
-
133
- fed.theme.resizeTo(vp.w - outerSize.w + innerSize.w, vp.h - outerSize.h + innerSize.h);
134
- });
135
- }
136
- });
137
-
138
- // Register buttons
139
- ed.addButton('fullscreen', {title : 'fullscreen.desc', cmd : 'mceFullScreen'});
140
-
141
- ed.onNodeChange.add(function(ed, cm) {
142
- cm.setActive('fullscreen', ed.getParam('fullscreen_is_enabled'));
143
- });
144
- },
145
-
146
- getInfo : function() {
147
- return {
148
- longname : 'Fullscreen',
149
- author : 'Moxiecode Systems AB',
150
- authorurl : 'http://tinymce.moxiecode.com',
151
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen',
152
- version : tinymce.majorVersion + "." + tinymce.minorVersion
153
- };
154
- }
155
- });
156
-
157
- // Register plugin
158
- tinymce.PluginManager.add('fullscreen', tinymce.plugins.FullScreenPlugin);
159
  })();
1
+ /**
2
+ * editor_plugin_src.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() {
12
+ var DOM = tinymce.DOM;
13
+
14
+ tinymce.create('tinymce.plugins.FullScreenPlugin', {
15
+ init : function(ed, url) {
16
+ var t = this, s = {}, vp, posCss;
17
+
18
+ t.editor = ed;
19
+
20
+ // Register commands
21
+ ed.addCommand('mceFullScreen', function() {
22
+ var win, de = DOM.doc.documentElement;
23
+
24
+ if (ed.getParam('fullscreen_is_enabled')) {
25
+ if (ed.getParam('fullscreen_new_window'))
26
+ closeFullscreen(); // Call to close in new window
27
+ else {
28
+ DOM.win.setTimeout(function() {
29
+ tinymce.dom.Event.remove(DOM.win, 'resize', t.resizeFunc);
30
+ tinyMCE.get(ed.getParam('fullscreen_editor_id')).setContent(ed.getContent());
31
+ tinyMCE.remove(ed);
32
+ DOM.remove('mce_fullscreen_container');
33
+ de.style.overflow = ed.getParam('fullscreen_html_overflow');
34
+ DOM.setStyle(DOM.doc.body, 'overflow', ed.getParam('fullscreen_overflow'));
35
+ DOM.win.scrollTo(ed.getParam('fullscreen_scrollx'), ed.getParam('fullscreen_scrolly'));
36
+ tinyMCE.settings = tinyMCE.oldSettings; // Restore old settings
37
+ }, 10);
38
+ }
39
+
40
+ return;
41
+ }
42
+
43
+ if (ed.getParam('fullscreen_new_window')) {
44
+ win = DOM.win.open(url + "/fullscreen.htm", "mceFullScreenPopup", "fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width=" + screen.availWidth + ",height=" + screen.availHeight);
45
+ try {
46
+ win.resizeTo(screen.availWidth, screen.availHeight);
47
+ } catch (e) {
48
+ // Ignore
49
+ }
50
+ } else {
51
+ tinyMCE.oldSettings = tinyMCE.settings; // Store old settings
52
+ s.fullscreen_overflow = DOM.getStyle(DOM.doc.body, 'overflow', 1) || 'auto';
53
+ s.fullscreen_html_overflow = DOM.getStyle(de, 'overflow', 1);
54
+ vp = DOM.getViewPort();
55
+ s.fullscreen_scrollx = vp.x;
56
+ s.fullscreen_scrolly = vp.y;
57
+
58
+ // Fixes an Opera bug where the scrollbars doesn't reappear
59
+ if (tinymce.isOpera && s.fullscreen_overflow == 'visible')
60
+ s.fullscreen_overflow = 'auto';
61
+
62
+ // Fixes an IE bug where horizontal scrollbars would appear
63
+ if (tinymce.isIE && s.fullscreen_overflow == 'scroll')
64
+ s.fullscreen_overflow = 'auto';
65
+
66
+ // Fixes an IE bug where the scrollbars doesn't reappear
67
+ if (tinymce.isIE && (s.fullscreen_html_overflow == 'visible' || s.fullscreen_html_overflow == 'scroll'))
68
+ s.fullscreen_html_overflow = 'auto';
69
+
70
+ if (s.fullscreen_overflow == '0px')
71
+ s.fullscreen_overflow = '';
72
+
73
+ DOM.setStyle(DOM.doc.body, 'overflow', 'hidden');
74
+ de.style.overflow = 'hidden'; //Fix for IE6/7
75
+ vp = DOM.getViewPort();
76
+ DOM.win.scrollTo(0, 0);
77
+
78
+ if (tinymce.isIE)
79
+ vp.h -= 1;
80
+
81
+ // Use fixed position if it exists
82
+ if (tinymce.isIE6 || document.compatMode == 'BackCompat')
83
+ posCss = 'absolute;top:' + vp.y;
84
+ else
85
+ posCss = 'fixed;top:0';
86
+
87
+ n = DOM.add(DOM.doc.body, 'div', {
88
+ id : 'mce_fullscreen_container',
89
+ style : 'position:' + posCss + ';left:0;width:' + vp.w + 'px;height:' + vp.h + 'px;z-index:200000;'});
90
+ DOM.add(n, 'div', {id : 'mce_fullscreen'});
91
+
92
+ tinymce.each(ed.settings, function(v, n) {
93
+ s[n] = v;
94
+ });
95
+
96
+ s.id = 'mce_fullscreen';
97
+ s.width = n.clientWidth;
98
+ s.height = n.clientHeight - 15;
99
+ s.fullscreen_is_enabled = true;
100
+ s.fullscreen_editor_id = ed.id;
101
+ s.theme_advanced_resizing = false;
102
+ s.save_onsavecallback = function() {
103
+ ed.setContent(tinyMCE.get(s.id).getContent());
104
+ ed.execCommand('mceSave');
105
+ };
106
+
107
+ tinymce.each(ed.getParam('fullscreen_settings'), function(v, k) {
108
+ s[k] = v;
109
+ });
110
+
111
+ if (s.theme_advanced_toolbar_location === 'external')
112
+ s.theme_advanced_toolbar_location = 'top';
113
+
114
+ t.fullscreenEditor = new tinymce.Editor('mce_fullscreen', s);
115
+ t.fullscreenEditor.onInit.add(function() {
116
+ t.fullscreenEditor.setContent(ed.getContent());
117
+ t.fullscreenEditor.focus();
118
+ });
119
+
120
+ t.fullscreenEditor.render();
121
+
122
+ t.fullscreenElement = new tinymce.dom.Element('mce_fullscreen_container');
123
+ t.fullscreenElement.update();
124
+ //document.body.overflow = 'hidden';
125
+
126
+ t.resizeFunc = tinymce.dom.Event.add(DOM.win, 'resize', function() {
127
+ var vp = tinymce.DOM.getViewPort(), fed = t.fullscreenEditor, outerSize, innerSize;
128
+
129
+ // Get outer/inner size to get a delta size that can be used to calc the new iframe size
130
+ outerSize = fed.dom.getSize(fed.getContainer().firstChild);
131
+ innerSize = fed.dom.getSize(fed.getContainer().getElementsByTagName('iframe')[0]);
132
+
133
+ fed.theme.resizeTo(vp.w - outerSize.w + innerSize.w, vp.h - outerSize.h + innerSize.h);
134
+ });
135
+ }
136
+ });
137
+
138
+ // Register buttons
139
+ ed.addButton('fullscreen', {title : 'fullscreen.desc', cmd : 'mceFullScreen'});
140
+
141
+ ed.onNodeChange.add(function(ed, cm) {
142
+ cm.setActive('fullscreen', ed.getParam('fullscreen_is_enabled'));
143
+ });
144
+ },
145
+
146
+ getInfo : function() {
147
+ return {
148
+ longname : 'Fullscreen',
149
+ author : 'Moxiecode Systems AB',
150
+ authorurl : 'http://tinymce.moxiecode.com',
151
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen',
152
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
153
+ };
154
+ }
155
+ });
156
+
157
+ // Register plugin
158
+ tinymce.PluginManager.add('fullscreen', tinymce.plugins.FullScreenPlugin);
159
  })();
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/fullscreen/fullscreen.htm CHANGED
@@ -1,110 +1,110 @@
1
- <!DOCTYPE html>
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <title></title>
5
- <meta http-equiv="X-UA-Compatible" content="IE=edge" />
6
- <script type="text/javascript" src="../../tiny_mce.js"></script>
7
- <script type="text/javascript">
8
- function patchCallback(settings, key) {
9
- if (settings[key])
10
- settings[key] = "window.opener." + settings[key];
11
- }
12
-
13
- var settings = {}, paSe = window.opener.tinyMCE.activeEditor.settings, oeID = window.opener.tinyMCE.activeEditor.id;
14
-
15
- // Clone array
16
- for (var n in paSe)
17
- settings[n] = paSe[n];
18
-
19
- // Override options for fullscreen
20
- for (var n in paSe.fullscreen_settings)
21
- settings[n] = paSe.fullscreen_settings[n];
22
-
23
- // Patch callbacks, make them point to window.opener
24
- patchCallback(settings, 'urlconverter_callback');
25
- patchCallback(settings, 'insertlink_callback');
26
- patchCallback(settings, 'insertimage_callback');
27
- patchCallback(settings, 'setupcontent_callback');
28
- patchCallback(settings, 'save_callback');
29
- patchCallback(settings, 'onchange_callback');
30
- patchCallback(settings, 'init_instance_callback');
31
- patchCallback(settings, 'file_browser_callback');
32
- patchCallback(settings, 'cleanup_callback');
33
- patchCallback(settings, 'execcommand_callback');
34
- patchCallback(settings, 'oninit');
35
-
36
- // Set options
37
- delete settings.id;
38
- settings['mode'] = 'exact';
39
- settings['elements'] = 'fullscreenarea';
40
- settings['add_unload_trigger'] = false;
41
- settings['ask'] = false;
42
- settings['document_base_url'] = window.opener.tinyMCE.activeEditor.documentBaseURI.getURI();
43
- settings['fullscreen_is_enabled'] = true;
44
- settings['fullscreen_editor_id'] = oeID;
45
- settings['theme_advanced_resizing'] = false;
46
- settings['strict_loading_mode'] = true;
47
-
48
- settings.save_onsavecallback = function() {
49
- window.opener.tinyMCE.get(oeID).setContent(tinyMCE.get('fullscreenarea').getContent({format : 'raw'}), {format : 'raw'});
50
- window.opener.tinyMCE.get(oeID).execCommand('mceSave');
51
- window.close();
52
- };
53
-
54
- function unloadHandler(e) {
55
- moveContent();
56
- }
57
-
58
- function moveContent() {
59
- window.opener.tinyMCE.get(oeID).setContent(tinyMCE.activeEditor.getContent());
60
- }
61
-
62
- function closeFullscreen() {
63
- moveContent();
64
- window.close();
65
- }
66
-
67
- function doParentSubmit() {
68
- moveContent();
69
-
70
- if (window.opener.tinyMCE.selectedInstance.formElement.form)
71
- window.opener.tinyMCE.selectedInstance.formElement.form.submit();
72
-
73
- window.close();
74
-
75
- return false;
76
- }
77
-
78
- function render() {
79
- var e = document.getElementById('fullscreenarea'), vp, ed, ow, oh, dom = tinymce.DOM;
80
-
81
- e.value = window.opener.tinyMCE.get(oeID).getContent();
82
-
83
- vp = dom.getViewPort();
84
- settings.width = vp.w;
85
- settings.height = vp.h - 15;
86
-
87
- tinymce.dom.Event.add(window, 'resize', function() {
88
- var vp = dom.getViewPort();
89
-
90
- tinyMCE.activeEditor.theme.resizeTo(vp.w, vp.h);
91
- });
92
-
93
- tinyMCE.init(settings);
94
- }
95
-
96
- // Add onunload
97
- tinymce.dom.Event.add(window, "beforeunload", unloadHandler);
98
- </script>
99
- </head>
100
- <body style="margin:0;overflow:hidden;width:100%;height:100%" scrolling="no" scroll="no">
101
- <form onsubmit="doParentSubmit();">
102
- <textarea id="fullscreenarea" style="width:100%; height:100%"></textarea>
103
- </form>
104
-
105
- <script type="text/javascript">
106
- render();
107
- </script>
108
-
109
- </body>
110
- </html>
1
+ <!DOCTYPE html>
2
+ <html xmlns="http://www.w3.org/1999/xhtml">
3
+ <head>
4
+ <title></title>
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
6
+ <script type="text/javascript" src="../../tiny_mce.js"></script>
7
+ <script type="text/javascript">
8
+ function patchCallback(settings, key) {
9
+ if (settings[key])
10
+ settings[key] = "window.opener." + settings[key];
11
+ }
12
+
13
+ var settings = {}, paSe = window.opener.tinyMCE.activeEditor.settings, oeID = window.opener.tinyMCE.activeEditor.id;
14
+
15
+ // Clone array
16
+ for (var n in paSe)
17
+ settings[n] = paSe[n];
18
+
19
+ // Override options for fullscreen
20
+ for (var n in paSe.fullscreen_settings)
21
+ settings[n] = paSe.fullscreen_settings[n];
22
+
23
+ // Patch callbacks, make them point to window.opener
24
+ patchCallback(settings, 'urlconverter_callback');
25
+ patchCallback(settings, 'insertlink_callback');
26
+ patchCallback(settings, 'insertimage_callback');
27
+ patchCallback(settings, 'setupcontent_callback');
28
+ patchCallback(settings, 'save_callback');
29
+ patchCallback(settings, 'onchange_callback');
30
+ patchCallback(settings, 'init_instance_callback');
31
+ patchCallback(settings, 'file_browser_callback');
32
+ patchCallback(settings, 'cleanup_callback');
33
+ patchCallback(settings, 'execcommand_callback');
34
+ patchCallback(settings, 'oninit');
35
+
36
+ // Set options
37
+ delete settings.id;
38
+ settings['mode'] = 'exact';
39
+ settings['elements'] = 'fullscreenarea';
40
+ settings['add_unload_trigger'] = false;
41
+ settings['ask'] = false;
42
+ settings['document_base_url'] = window.opener.tinyMCE.activeEditor.documentBaseURI.getURI();
43
+ settings['fullscreen_is_enabled'] = true;
44
+ settings['fullscreen_editor_id'] = oeID;
45
+ settings['theme_advanced_resizing'] = false;
46
+ settings['strict_loading_mode'] = true;
47
+
48
+ settings.save_onsavecallback = function() {
49
+ window.opener.tinyMCE.get(oeID).setContent(tinyMCE.get('fullscreenarea').getContent({format : 'raw'}), {format : 'raw'});
50
+ window.opener.tinyMCE.get(oeID).execCommand('mceSave');
51
+ window.close();
52
+ };
53
+
54
+ function unloadHandler(e) {
55
+ moveContent();
56
+ }
57
+
58
+ function moveContent() {
59
+ window.opener.tinyMCE.get(oeID).setContent(tinyMCE.activeEditor.getContent());
60
+ }
61
+
62
+ function closeFullscreen() {
63
+ moveContent();
64
+ window.close();
65
+ }
66
+
67
+ function doParentSubmit() {
68
+ moveContent();
69
+
70
+ if (window.opener.tinyMCE.selectedInstance.formElement.form)
71
+ window.opener.tinyMCE.selectedInstance.formElement.form.submit();
72
+
73
+ window.close();
74
+
75
+ return false;
76
+ }
77
+
78
+ function render() {
79
+ var e = document.getElementById('fullscreenarea'), vp, ed, ow, oh, dom = tinymce.DOM;
80
+
81
+ e.value = window.opener.tinyMCE.get(oeID).getContent();
82
+
83
+ vp = dom.getViewPort();
84
+ settings.width = vp.w;
85
+ settings.height = vp.h - 15;
86
+
87
+ tinymce.dom.Event.add(window, 'resize', function() {
88
+ var vp = dom.getViewPort();
89
+
90
+ tinyMCE.activeEditor.theme.resizeTo(vp.w, vp.h);
91
+ });
92
+
93
+ tinyMCE.init(settings);
94
+ }
95
+
96
+ // Add onunload
97
+ tinymce.dom.Event.add(window, "beforeunload", unloadHandler);
98
+ </script>
99
+ </head>
100
+ <body style="margin:0;overflow:hidden;width:100%;height:100%" scrolling="no" scroll="no">
101
+ <form onsubmit="doParentSubmit();">
102
+ <textarea id="fullscreenarea" style="width:100%; height:100%"></textarea>
103
+ </form>
104
+
105
+ <script type="text/javascript">
106
+ render();
107
+ </script>
108
+
109
+ </body>
110
+ </html>
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/inlinepopups/editor_plugin_src.js CHANGED
@@ -1,699 +1,699 @@
1
- /**
2
- * editor_plugin_src.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() {
12
- var DOM = tinymce.DOM, Element = tinymce.dom.Element, Event = tinymce.dom.Event, each = tinymce.each, is = tinymce.is;
13
-
14
- tinymce.create('tinymce.plugins.InlinePopups', {
15
- init : function(ed, url) {
16
- // Replace window manager
17
- ed.onBeforeRenderUI.add(function() {
18
- ed.windowManager = new tinymce.InlineWindowManager(ed);
19
- DOM.loadCSS(url + '/skins/' + (ed.settings.inlinepopups_skin || 'clearlooks2') + "/window.css");
20
- });
21
- },
22
-
23
- getInfo : function() {
24
- return {
25
- longname : 'InlinePopups',
26
- author : 'Moxiecode Systems AB',
27
- authorurl : 'http://tinymce.moxiecode.com',
28
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups',
29
- version : tinymce.majorVersion + "." + tinymce.minorVersion
30
- };
31
- }
32
- });
33
-
34
- tinymce.create('tinymce.InlineWindowManager:tinymce.WindowManager', {
35
- InlineWindowManager : function(ed) {
36
- var t = this;
37
-
38
- t.parent(ed);
39
- t.zIndex = 300000;
40
- t.count = 0;
41
- t.windows = {};
42
- },
43
-
44
- open : function(f, p) {
45
- var t = this, id, opt = '', ed = t.editor, dw = 0, dh = 0, vp, po, mdf, clf, we, w, u, parentWindow;
46
-
47
- f = f || {};
48
- p = p || {};
49
-
50
- // Run native windows
51
- if (!f.inline)
52
- return t.parent(f, p);
53
-
54
- parentWindow = t._frontWindow();
55
- if (parentWindow && DOM.get(parentWindow.id + '_ifr')) {
56
- parentWindow.focussedElement = DOM.get(parentWindow.id + '_ifr').contentWindow.document.activeElement;
57
- }
58
-
59
- // Only store selection if the type is a normal window
60
- if (!f.type)
61
- t.bookmark = ed.selection.getBookmark(1);
62
-
63
- id = DOM.uniqueId();
64
- vp = DOM.getViewPort();
65
- f.width = parseInt(f.width || 320);
66
- f.height = parseInt(f.height || 240) + (tinymce.isIE ? 8 : 0);
67
- f.min_width = parseInt(f.min_width || 150);
68
- f.min_height = parseInt(f.min_height || 100);
69
- f.max_width = parseInt(f.max_width || 2000);
70
- f.max_height = parseInt(f.max_height || 2000);
71
- f.left = f.left || Math.round(Math.max(vp.x, vp.x + (vp.w / 2.0) - (f.width / 2.0)));
72
- f.top = f.top || Math.round(Math.max(vp.y, vp.y + (vp.h / 2.0) - (f.height / 2.0)));
73
- f.movable = f.resizable = true;
74
- p.mce_width = f.width;
75
- p.mce_height = f.height;
76
- p.mce_inline = true;
77
- p.mce_window_id = id;
78
- p.mce_auto_focus = f.auto_focus;
79
-
80
- // Transpose
81
- // po = DOM.getPos(ed.getContainer());
82
- // f.left -= po.x;
83
- // f.top -= po.y;
84
-
85
- t.features = f;
86
- t.params = p;
87
- t.onOpen.dispatch(t, f, p);
88
-
89
- if (f.type) {
90
- opt += ' mceModal';
91
-
92
- if (f.type)
93
- opt += ' mce' + f.type.substring(0, 1).toUpperCase() + f.type.substring(1);
94
-
95
- f.resizable = false;
96
- }
97
-
98
- if (f.statusbar)
99
- opt += ' mceStatusbar';
100
-
101
- if (f.resizable)
102
- opt += ' mceResizable';
103
-
104
- if (f.minimizable)
105
- opt += ' mceMinimizable';
106
-
107
- if (f.maximizable)
108
- opt += ' mceMaximizable';
109
-
110
- if (f.movable)
111
- opt += ' mceMovable';
112
-
113
- // Create DOM objects
114
- t._addAll(DOM.doc.body,
115
- ['div', {id : id, role : 'dialog', 'aria-labelledby': f.type ? id + '_content' : id + '_title', 'class' : (ed.settings.inlinepopups_skin || 'clearlooks2') + (tinymce.isIE && window.getSelection ? ' ie9' : ''), style : 'width:100px;height:100px'},
116
- ['div', {id : id + '_wrapper', 'class' : 'mceWrapper' + opt},
117
- ['div', {id : id + '_top', 'class' : 'mceTop'},
118
- ['div', {'class' : 'mceLeft'}],
119
- ['div', {'class' : 'mceCenter'}],
120
- ['div', {'class' : 'mceRight'}],
121
- ['span', {id : id + '_title'}, f.title || '']
122
- ],
123
-
124
- ['div', {id : id + '_middle', 'class' : 'mceMiddle'},
125
- ['div', {id : id + '_left', 'class' : 'mceLeft', tabindex : '0'}],
126
- ['span', {id : id + '_content'}],
127
- ['div', {id : id + '_right', 'class' : 'mceRight', tabindex : '0'}]
128
- ],
129
-
130
- ['div', {id : id + '_bottom', 'class' : 'mceBottom'},
131
- ['div', {'class' : 'mceLeft'}],
132
- ['div', {'class' : 'mceCenter'}],
133
- ['div', {'class' : 'mceRight'}],
134
- ['span', {id : id + '_status'}, 'Content']
135
- ],
136
-
137
- ['a', {'class' : 'mceMove', tabindex : '-1', href : 'javascript:;'}],
138
- ['a', {'class' : 'mceMin', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
139
- ['a', {'class' : 'mceMax', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
140
- ['a', {'class' : 'mceMed', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
141
- ['a', {'class' : 'mceClose', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
142
- ['a', {id : id + '_resize_n', 'class' : 'mceResize mceResizeN', tabindex : '-1', href : 'javascript:;'}],
143
- ['a', {id : id + '_resize_s', 'class' : 'mceResize mceResizeS', tabindex : '-1', href : 'javascript:;'}],
144
- ['a', {id : id + '_resize_w', 'class' : 'mceResize mceResizeW', tabindex : '-1', href : 'javascript:;'}],
145
- ['a', {id : id + '_resize_e', 'class' : 'mceResize mceResizeE', tabindex : '-1', href : 'javascript:;'}],
146
- ['a', {id : id + '_resize_nw', 'class' : 'mceResize mceResizeNW', tabindex : '-1', href : 'javascript:;'}],
147
- ['a', {id : id + '_resize_ne', 'class' : 'mceResize mceResizeNE', tabindex : '-1', href : 'javascript:;'}],
148
- ['a', {id : id + '_resize_sw', 'class' : 'mceResize mceResizeSW', tabindex : '-1', href : 'javascript:;'}],
149
- ['a', {id : id + '_resize_se', 'class' : 'mceResize mceResizeSE', tabindex : '-1', href : 'javascript:;'}]
150
- ]
151
- ]
152
- );
153
-
154
- DOM.setStyles(id, {top : -10000, left : -10000});
155
-
156
- // Fix gecko rendering bug, where the editors iframe messed with window contents
157
- if (tinymce.isGecko)
158
- DOM.setStyle(id, 'overflow', 'auto');
159
-
160
- // Measure borders
161
- if (!f.type) {
162
- dw += DOM.get(id + '_left').clientWidth;
163
- dw += DOM.get(id + '_right').clientWidth;
164
- dh += DOM.get(id + '_top').clientHeight;
165
- dh += DOM.get(id + '_bottom').clientHeight;
166
- }
167
-
168
- // Resize window
169
- DOM.setStyles(id, {top : f.top, left : f.left, width : f.width + dw, height : f.height + dh});
170
-
171
- u = f.url || f.file;
172
- if (u) {
173
- if (tinymce.relaxedDomain)
174
- u += (u.indexOf('?') == -1 ? '?' : '&') + 'mce_rdomain=' + tinymce.relaxedDomain;
175
-
176
- u = tinymce._addVer(u);
177
- }
178
-
179
- if (!f.type) {
180
- DOM.add(id + '_content', 'iframe', {id : id + '_ifr', src : 'javascript:""', frameBorder : 0, style : 'border:0;width:10px;height:10px'});
181
- DOM.setStyles(id + '_ifr', {width : f.width, height : f.height});
182
- DOM.setAttrib(id + '_ifr', 'src', u);
183
- } else {
184
- DOM.add(id + '_wrapper', 'a', {id : id + '_ok', 'class' : 'mceButton mceOk', href : 'javascript:;', onmousedown : 'return false;'}, 'Ok');
185
-
186
- if (f.type == 'confirm')
187
- DOM.add(id + '_wrapper', 'a', {'class' : 'mceButton mceCancel', href : 'javascript:;', onmousedown : 'return false;'}, 'Cancel');
188
-
189
- DOM.add(id + '_middle', 'div', {'class' : 'mceIcon'});
190
- DOM.setHTML(id + '_content', f.content.replace('\n', '<br />'));
191
-
192
- Event.add(id, 'keyup', function(evt) {
193
- var VK_ESCAPE = 27;
194
- if (evt.keyCode === VK_ESCAPE) {
195
- f.button_func(false);
196
- return Event.cancel(evt);
197
- }
198
- });
199
-
200
- Event.add(id, 'keydown', function(evt) {
201
- var cancelButton, VK_TAB = 9;
202
- if (evt.keyCode === VK_TAB) {
203
- cancelButton = DOM.select('a.mceCancel', id + '_wrapper')[0];
204
- if (cancelButton && cancelButton !== evt.target) {
205
- cancelButton.focus();
206
- } else {
207
- DOM.get(id + '_ok').focus();
208
- }
209
- return Event.cancel(evt);
210
- }
211
- });
212
- }
213
-
214
- // Register events
215
- mdf = Event.add(id, 'mousedown', function(e) {
216
- var n = e.target, w, vp;
217
-
218
- w = t.windows[id];
219
- t.focus(id);
220
-
221
- if (n.nodeName == 'A' || n.nodeName == 'a') {
222
- if (n.className == 'mceClose') {
223
- t.close(null, id);
224
- return Event.cancel(e);
225
- } else if (n.className == 'mceMax') {
226
- w.oldPos = w.element.getXY();
227
- w.oldSize = w.element.getSize();
228
-
229
- vp = DOM.getViewPort();
230
-
231
- // Reduce viewport size to avoid scrollbars
232
- vp.w -= 2;
233
- vp.h -= 2;
234
-
235
- w.element.moveTo(vp.x, vp.y);
236
- w.element.resizeTo(vp.w, vp.h);
237
- DOM.setStyles(id + '_ifr', {width : vp.w - w.deltaWidth, height : vp.h - w.deltaHeight});
238
- DOM.addClass(id + '_wrapper', 'mceMaximized');
239
- } else if (n.className == 'mceMed') {
240
- // Reset to old size
241
- w.element.moveTo(w.oldPos.x, w.oldPos.y);
242
- w.element.resizeTo(w.oldSize.w, w.oldSize.h);
243
- w.iframeElement.resizeTo(w.oldSize.w - w.deltaWidth, w.oldSize.h - w.deltaHeight);
244
-
245
- DOM.removeClass(id + '_wrapper', 'mceMaximized');
246
- } else if (n.className == 'mceMove')
247
- return t._startDrag(id, e, n.className);
248
- else if (DOM.hasClass(n, 'mceResize'))
249
- return t._startDrag(id, e, n.className.substring(13));
250
- }
251
- });
252
-
253
- clf = Event.add(id, 'click', function(e) {
254
- var n = e.target;
255
-
256
- t.focus(id);
257
-
258
- if (n.nodeName == 'A' || n.nodeName == 'a') {
259
- switch (n.className) {
260
- case 'mceClose':
261
- t.close(null, id);
262
- return Event.cancel(e);
263
-
264
- case 'mceButton mceOk':
265
- case 'mceButton mceCancel':
266
- f.button_func(n.className == 'mceButton mceOk');
267
- return Event.cancel(e);
268
- }
269
- }
270
- });
271
-
272
- // Make sure the tab order loops within the dialog.
273
- Event.add([id + '_left', id + '_right'], 'focus', function(evt) {
274
- var iframe = DOM.get(id + '_ifr');
275
- if (iframe) {
276
- var body = iframe.contentWindow.document.body;
277
- var focusable = DOM.select(':input:enabled,*[tabindex=0]', body);
278
- if (evt.target.id === (id + '_left')) {
279
- focusable[focusable.length - 1].focus();
280
- } else {
281
- focusable[0].focus();
282
- }
283
- } else {
284
- DOM.get(id + '_ok').focus();
285
- }
286
- });
287
-
288
- // Add window
289
- w = t.windows[id] = {
290
- id : id,
291
- mousedown_func : mdf,
292
- click_func : clf,
293
- element : new Element(id, {blocker : 1, container : ed.getContainer()}),
294
- iframeElement : new Element(id + '_ifr'),
295
- features : f,
296
- deltaWidth : dw,
297
- deltaHeight : dh
298
- };
299
-
300
- w.iframeElement.on('focus', function() {
301
- t.focus(id);
302
- });
303
-
304
- // Setup blocker
305
- if (t.count == 0 && t.editor.getParam('dialog_type', 'modal') == 'modal') {
306
- DOM.add(DOM.doc.body, 'div', {
307
- id : 'mceModalBlocker',
308
- 'class' : (t.editor.settings.inlinepopups_skin || 'clearlooks2') + '_modalBlocker',
309
- style : {zIndex : t.zIndex - 1}
310
- });
311
-
312
- DOM.show('mceModalBlocker'); // Reduces flicker in IE
313
- DOM.setAttrib(DOM.doc.body, 'aria-hidden', 'true');
314
- } else
315
- DOM.setStyle('mceModalBlocker', 'z-index', t.zIndex - 1);
316
-
317
- if (tinymce.isIE6 || /Firefox\/2\./.test(navigator.userAgent) || (tinymce.isIE && !DOM.boxModel))
318
- DOM.setStyles('mceModalBlocker', {position : 'absolute', left : vp.x, top : vp.y, width : vp.w - 2, height : vp.h - 2});
319
-
320
- DOM.setAttrib(id, 'aria-hidden', 'false');
321
- t.focus(id);
322
- t._fixIELayout(id, 1);
323
-
324
- // Focus ok button
325
- if (DOM.get(id + '_ok'))
326
- DOM.get(id + '_ok').focus();
327
- t.count++;
328
-
329
- return w;
330
- },
331
-
332
- focus : function(id) {
333
- var t = this, w;
334
-
335
- if (w = t.windows[id]) {
336
- w.zIndex = this.zIndex++;
337
- w.element.setStyle('zIndex', w.zIndex);
338
- w.element.update();
339
-
340
- id = id + '_wrapper';
341
- DOM.removeClass(t.lastId, 'mceFocus');
342
- DOM.addClass(id, 'mceFocus');
343
- t.lastId = id;
344
-
345
- if (w.focussedElement) {
346
- w.focussedElement.focus();
347
- } else if (DOM.get(id + '_ok')) {
348
- DOM.get(w.id + '_ok').focus();
349
- } else if (DOM.get(w.id + '_ifr')) {
350
- DOM.get(w.id + '_ifr').focus();
351
- }
352
- }
353
- },
354
-
355
- _addAll : function(te, ne) {
356
- var i, n, t = this, dom = tinymce.DOM;
357
-
358
- if (is(ne, 'string'))
359
- te.appendChild(dom.doc.createTextNode(ne));
360
- else if (ne.length) {
361
- te = te.appendChild(dom.create(ne[0], ne[1]));
362
-
363
- for (i=2; i<ne.length; i++)
364
- t._addAll(te, ne[i]);
365
- }
366
- },
367
-
368
- _startDrag : function(id, se, ac) {
369
- var t = this, mu, mm, d = DOM.doc, eb, w = t.windows[id], we = w.element, sp = we.getXY(), p, sz, ph, cp, vp, sx, sy, sex, sey, dx, dy, dw, dh;
370
-
371
- // Get positons and sizes
372
- // cp = DOM.getPos(t.editor.getContainer());
373
- cp = {x : 0, y : 0};
374
- vp = DOM.getViewPort();
375
-
376
- // Reduce viewport size to avoid scrollbars while dragging
377
- vp.w -= 2;
378
- vp.h -= 2;
379
-
380
- sex = se.screenX;
381
- sey = se.screenY;
382
- dx = dy = dw = dh = 0;
383
-
384
- // Handle mouse up
385
- mu = Event.add(d, 'mouseup', function(e) {
386
- Event.remove(d, 'mouseup', mu);
387
- Event.remove(d, 'mousemove', mm);
388
-
389
- if (eb)
390
- eb.remove();
391
-
392
- we.moveBy(dx, dy);
393
- we.resizeBy(dw, dh);
394
- sz = we.getSize();
395
- DOM.setStyles(id + '_ifr', {width : sz.w - w.deltaWidth, height : sz.h - w.deltaHeight});
396
- t._fixIELayout(id, 1);
397
-
398
- return Event.cancel(e);
399
- });
400
-
401
- if (ac != 'Move')
402
- startMove();
403
-
404
- function startMove() {
405
- if (eb)
406
- return;
407
-
408
- t._fixIELayout(id, 0);
409
-
410
- // Setup event blocker
411
- DOM.add(d.body, 'div', {
412
- id : 'mceEventBlocker',
413
- 'class' : 'mceEventBlocker ' + (t.editor.settings.inlinepopups_skin || 'clearlooks2'),
414
- style : {zIndex : t.zIndex + 1}
415
- });
416
-
417
- if (tinymce.isIE6 || (tinymce.isIE && !DOM.boxModel))
418
- DOM.setStyles('mceEventBlocker', {position : 'absolute', left : vp.x, top : vp.y, width : vp.w - 2, height : vp.h - 2});
419
-
420
- eb = new Element('mceEventBlocker');
421
- eb.update();
422
-
423
- // Setup placeholder
424
- p = we.getXY();
425
- sz = we.getSize();
426
- sx = cp.x + p.x - vp.x;
427
- sy = cp.y + p.y - vp.y;
428
- DOM.add(eb.get(), 'div', {id : 'mcePlaceHolder', 'class' : 'mcePlaceHolder', style : {left : sx, top : sy, width : sz.w, height : sz.h}});
429
- ph = new Element('mcePlaceHolder');
430
- };
431
-
432
- // Handle mouse move/drag
433
- mm = Event.add(d, 'mousemove', function(e) {
434
- var x, y, v;
435
-
436
- startMove();
437
-
438
- x = e.screenX - sex;
439
- y = e.screenY - sey;
440
-
441
- switch (ac) {
442
- case 'ResizeW':
443
- dx = x;
444
- dw = 0 - x;
445
- break;
446
-
447
- case 'ResizeE':
448
- dw = x;
449
- break;
450
-
451
- case 'ResizeN':
452
- case 'ResizeNW':
453
- case 'ResizeNE':
454
- if (ac == "ResizeNW") {
455
- dx = x;
456
- dw = 0 - x;
457
- } else if (ac == "ResizeNE")
458
- dw = x;
459
-
460
- dy = y;
461
- dh = 0 - y;
462
- break;
463
-
464
- case 'ResizeS':
465
- case 'ResizeSW':
466
- case 'ResizeSE':
467
- if (ac == "ResizeSW") {
468
- dx = x;
469
- dw = 0 - x;
470
- } else if (ac == "ResizeSE")
471
- dw = x;
472
-
473
- dh = y;
474
- break;
475
-
476
- case 'mceMove':
477
- dx = x;
478
- dy = y;
479
- break;
480
- }
481
-
482
- // Boundary check
483
- if (dw < (v = w.features.min_width - sz.w)) {
484
- if (dx !== 0)
485
- dx += dw - v;
486
-
487
- dw = v;
488
- }
489
-
490
- if (dh < (v = w.features.min_height - sz.h)) {
491
- if (dy !== 0)
492
- dy += dh - v;
493
-
494
- dh = v;
495
- }
496
-
497
- dw = Math.min(dw, w.features.max_width - sz.w);
498
- dh = Math.min(dh, w.features.max_height - sz.h);
499
- dx = Math.max(dx, vp.x - (sx + vp.x));
500
- dy = Math.max(dy, vp.y - (sy + vp.y));
501
- dx = Math.min(dx, (vp.w + vp.x) - (sx + sz.w + vp.x));
502
- dy = Math.min(dy, (vp.h + vp.y) - (sy + sz.h + vp.y));
503
-
504
- // Move if needed
505
- if (dx + dy !== 0) {
506
- if (sx + dx < 0)
507
- dx = 0;
508
-
509
- if (sy + dy < 0)
510
- dy = 0;
511
-
512
- ph.moveTo(sx + dx, sy + dy);
513
- }
514
-
515
- // Resize if needed
516
- if (dw + dh !== 0)
517
- ph.resizeTo(sz.w + dw, sz.h + dh);
518
-
519
- return Event.cancel(e);
520
- });
521
-
522
- return Event.cancel(se);
523
- },
524
-
525
- resizeBy : function(dw, dh, id) {
526
- var w = this.windows[id];
527
-
528
- if (w) {
529
- w.element.resizeBy(dw, dh);
530
- w.iframeElement.resizeBy(dw, dh);
531
- }
532
- },
533
-
534
- close : function(win, id) {
535
- var t = this, w, d = DOM.doc, fw, id;
536
-
537
- id = t._findId(id || win);
538
-
539
- // Probably not inline
540
- if (!t.windows[id]) {
541
- t.parent(win);
542
- return;
543
- }
544
-
545
- t.count--;
546
-
547
- if (t.count == 0) {
548
- DOM.remove('mceModalBlocker');
549
- DOM.setAttrib(DOM.doc.body, 'aria-hidden', 'false');
550
- t.editor.focus();
551
- }
552
-
553
- if (w = t.windows[id]) {
554
- t.onClose.dispatch(t);
555
- Event.remove(d, 'mousedown', w.mousedownFunc);
556
- Event.remove(d, 'click', w.clickFunc);
557
- Event.clear(id);
558
- Event.clear(id + '_ifr');
559
-
560
- DOM.setAttrib(id + '_ifr', 'src', 'javascript:""'); // Prevent leak
561
- w.element.remove();
562
- delete t.windows[id];
563
-
564
- fw = t._frontWindow();
565
-
566
- if (fw)
567
- t.focus(fw.id);
568
- }
569
- },
570
-
571
- // Find front most window
572
- _frontWindow : function() {
573
- var fw, ix = 0;
574
- // Find front most window and focus that
575
- each (this.windows, function(w) {
576
- if (w.zIndex > ix) {
577
- fw = w;
578
- ix = w.zIndex;
579
- }
580
- });
581
- return fw;
582
- },
583
-
584
- setTitle : function(w, ti) {
585
- var e;
586
-
587
- w = this._findId(w);
588
-
589
- if (e = DOM.get(w + '_title'))
590
- e.innerHTML = DOM.encode(ti);
591
- },
592
-
593
- alert : function(txt, cb, s) {
594
- var t = this, w;
595
-
596
- w = t.open({
597
- title : t,
598
- type : 'alert',
599
- button_func : function(s) {
600
- if (cb)
601
- cb.call(s || t, s);
602
-
603
- t.close(null, w.id);
604
- },
605
- content : DOM.encode(t.editor.getLang(txt, txt)),
606
- inline : 1,
607
- width : 400,
608
- height : 130
609
- });
610
- },
611
-
612
- confirm : function(txt, cb, s) {
613
- var t = this, w;
614
-
615
- w = t.open({
616
- title : t,
617
- type : 'confirm',
618
- button_func : function(s) {
619
- if (cb)
620
- cb.call(s || t, s);
621
-
622
- t.close(null, w.id);
623
- },
624
- content : DOM.encode(t.editor.getLang(txt, txt)),
625
- inline : 1,
626
- width : 400,
627
- height : 130
628
- });
629
- },
630
-
631
- // Internal functions
632
-
633
- _findId : function(w) {
634
- var t = this;
635
-
636
- if (typeof(w) == 'string')
637
- return w;
638
-
639
- each(t.windows, function(wo) {
640
- var ifr = DOM.get(wo.id + '_ifr');
641
-
642
- if (ifr && w == ifr.contentWindow) {
643
- w = wo.id;
644
- return false;
645
- }
646
- });
647
-
648
- return w;
649
- },
650
-
651
- _fixIELayout : function(id, s) {
652
- var w, img;
653
-
654
- if (!tinymce.isIE6)
655
- return;
656
-
657
- // Fixes the bug where hover flickers and does odd things in IE6
658
- each(['n','s','w','e','nw','ne','sw','se'], function(v) {
659
- var e = DOM.get(id + '_resize_' + v);
660
-
661
- DOM.setStyles(e, {
662
- width : s ? e.clientWidth : '',
663
- height : s ? e.clientHeight : '',
664
- cursor : DOM.getStyle(e, 'cursor', 1)
665
- });
666
-
667
- DOM.setStyle(id + "_bottom", 'bottom', '-1px');
668
-
669
- e = 0;
670
- });
671
-
672
- // Fixes graphics glitch
673
- if (w = this.windows[id]) {
674
- // Fixes rendering bug after resize
675
- w.element.hide();
676
- w.element.show();
677
-
678
- // Forced a repaint of the window
679
- //DOM.get(id).style.filter = '';
680
-
681
- // IE has a bug where images used in CSS won't get loaded
682
- // sometimes when the cache in the browser is disabled
683
- // This fix tries to solve it by loading the images using the image object
684
- each(DOM.select('div,a', id), function(e, i) {
685
- if (e.currentStyle.backgroundImage != 'none') {
686
- img = new Image();
687
- img.src = e.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/, '$1');
688
- }
689
- });
690
-
691
- DOM.get(id).style.filter = '';
692
- }
693
- }
694
- });
695
-
696
- // Register plugin
697
- tinymce.PluginManager.add('inlinepopups', tinymce.plugins.InlinePopups);
698
- })();
699
-
1
+ /**
2
+ * editor_plugin_src.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() {
12
+ var DOM = tinymce.DOM, Element = tinymce.dom.Element, Event = tinymce.dom.Event, each = tinymce.each, is = tinymce.is;
13
+
14
+ tinymce.create('tinymce.plugins.InlinePopups', {
15
+ init : function(ed, url) {
16
+ // Replace window manager
17
+ ed.onBeforeRenderUI.add(function() {
18
+ ed.windowManager = new tinymce.InlineWindowManager(ed);
19
+ DOM.loadCSS(url + '/skins/' + (ed.settings.inlinepopups_skin || 'clearlooks2') + "/window.css");
20
+ });
21
+ },
22
+
23
+ getInfo : function() {
24
+ return {
25
+ longname : 'InlinePopups',
26
+ author : 'Moxiecode Systems AB',
27
+ authorurl : 'http://tinymce.moxiecode.com',
28
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups',
29
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
30
+ };
31
+ }
32
+ });
33
+
34
+ tinymce.create('tinymce.InlineWindowManager:tinymce.WindowManager', {
35
+ InlineWindowManager : function(ed) {
36
+ var t = this;
37
+
38
+ t.parent(ed);
39
+ t.zIndex = 300000;
40
+ t.count = 0;
41
+ t.windows = {};
42
+ },
43
+
44
+ open : function(f, p) {
45
+ var t = this, id, opt = '', ed = t.editor, dw = 0, dh = 0, vp, po, mdf, clf, we, w, u, parentWindow;
46
+
47
+ f = f || {};
48
+ p = p || {};
49
+
50
+ // Run native windows
51
+ if (!f.inline)
52
+ return t.parent(f, p);
53
+
54
+ parentWindow = t._frontWindow();
55
+ if (parentWindow && DOM.get(parentWindow.id + '_ifr')) {
56
+ parentWindow.focussedElement = DOM.get(parentWindow.id + '_ifr').contentWindow.document.activeElement;
57
+ }
58
+
59
+ // Only store selection if the type is a normal window
60
+ if (!f.type)
61
+ t.bookmark = ed.selection.getBookmark(1);
62
+
63
+ id = DOM.uniqueId();
64
+ vp = DOM.getViewPort();
65
+ f.width = parseInt(f.width || 320);
66
+ f.height = parseInt(f.height || 240) + (tinymce.isIE ? 8 : 0);
67
+ f.min_width = parseInt(f.min_width || 150);
68
+ f.min_height = parseInt(f.min_height || 100);
69
+ f.max_width = parseInt(f.max_width || 2000);
70
+ f.max_height = parseInt(f.max_height || 2000);
71
+ f.left = f.left || Math.round(Math.max(vp.x, vp.x + (vp.w / 2.0) - (f.width / 2.0)));
72
+ f.top = f.top || Math.round(Math.max(vp.y, vp.y + (vp.h / 2.0) - (f.height / 2.0)));
73
+ f.movable = f.resizable = true;
74
+ p.mce_width = f.width;
75
+ p.mce_height = f.height;
76
+ p.mce_inline = true;
77
+ p.mce_window_id = id;
78
+ p.mce_auto_focus = f.auto_focus;
79
+
80
+ // Transpose
81
+ // po = DOM.getPos(ed.getContainer());
82
+ // f.left -= po.x;
83
+ // f.top -= po.y;
84
+
85
+ t.features = f;
86
+ t.params = p;
87
+ t.onOpen.dispatch(t, f, p);
88
+
89
+ if (f.type) {
90
+ opt += ' mceModal';
91
+
92
+ if (f.type)
93
+ opt += ' mce' + f.type.substring(0, 1).toUpperCase() + f.type.substring(1);
94
+
95
+ f.resizable = false;
96
+ }
97
+
98
+ if (f.statusbar)
99
+ opt += ' mceStatusbar';
100
+
101
+ if (f.resizable)
102
+ opt += ' mceResizable';
103
+
104
+ if (f.minimizable)
105
+ opt += ' mceMinimizable';
106
+
107
+ if (f.maximizable)
108
+ opt += ' mceMaximizable';
109
+
110
+ if (f.movable)
111
+ opt += ' mceMovable';
112
+
113
+ // Create DOM objects
114
+ t._addAll(DOM.doc.body,
115
+ ['div', {id : id, role : 'dialog', 'aria-labelledby': f.type ? id + '_content' : id + '_title', 'class' : (ed.settings.inlinepopups_skin || 'clearlooks2') + (tinymce.isIE && window.getSelection ? ' ie9' : ''), style : 'width:100px;height:100px'},
116
+ ['div', {id : id + '_wrapper', 'class' : 'mceWrapper' + opt},
117
+ ['div', {id : id + '_top', 'class' : 'mceTop'},
118
+ ['div', {'class' : 'mceLeft'}],
119
+ ['div', {'class' : 'mceCenter'}],
120
+ ['div', {'class' : 'mceRight'}],
121
+ ['span', {id : id + '_title'}, f.title || '']
122
+ ],
123
+
124
+ ['div', {id : id + '_middle', 'class' : 'mceMiddle'},
125
+ ['div', {id : id + '_left', 'class' : 'mceLeft', tabindex : '0'}],
126
+ ['span', {id : id + '_content'}],
127
+ ['div', {id : id + '_right', 'class' : 'mceRight', tabindex : '0'}]
128
+ ],
129
+
130
+ ['div', {id : id + '_bottom', 'class' : 'mceBottom'},
131
+ ['div', {'class' : 'mceLeft'}],
132
+ ['div', {'class' : 'mceCenter'}],
133
+ ['div', {'class' : 'mceRight'}],
134
+ ['span', {id : id + '_status'}, 'Content']
135
+ ],
136
+
137
+ ['a', {'class' : 'mceMove', tabindex : '-1', href : 'javascript:;'}],
138
+ ['a', {'class' : 'mceMin', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
139
+ ['a', {'class' : 'mceMax', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
140
+ ['a', {'class' : 'mceMed', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
141
+ ['a', {'class' : 'mceClose', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
142
+ ['a', {id : id + '_resize_n', 'class' : 'mceResize mceResizeN', tabindex : '-1', href : 'javascript:;'}],
143
+ ['a', {id : id + '_resize_s', 'class' : 'mceResize mceResizeS', tabindex : '-1', href : 'javascript:;'}],
144
+ ['a', {id : id + '_resize_w', 'class' : 'mceResize mceResizeW', tabindex : '-1', href : 'javascript:;'}],
145
+ ['a', {id : id + '_resize_e', 'class' : 'mceResize mceResizeE', tabindex : '-1', href : 'javascript:;'}],
146
+ ['a', {id : id + '_resize_nw', 'class' : 'mceResize mceResizeNW', tabindex : '-1', href : 'javascript:;'}],
147
+ ['a', {id : id + '_resize_ne', 'class' : 'mceResize mceResizeNE', tabindex : '-1', href : 'javascript:;'}],
148
+ ['a', {id : id + '_resize_sw', 'class' : 'mceResize mceResizeSW', tabindex : '-1', href : 'javascript:;'}],
149
+ ['a', {id : id + '_resize_se', 'class' : 'mceResize mceResizeSE', tabindex : '-1', href : 'javascript:;'}]
150
+ ]
151
+ ]
152
+ );
153
+
154
+ DOM.setStyles(id, {top : -10000, left : -10000});
155
+
156
+ // Fix gecko rendering bug, where the editors iframe messed with window contents
157
+ if (tinymce.isGecko)
158
+ DOM.setStyle(id, 'overflow', 'auto');
159
+
160
+ // Measure borders
161
+ if (!f.type) {
162
+ dw += DOM.get(id + '_left').clientWidth;
163
+ dw += DOM.get(id + '_right').clientWidth;
164
+ dh += DOM.get(id + '_top').clientHeight;
165
+ dh += DOM.get(id + '_bottom').clientHeight;
166
+ }
167
+
168
+ // Resize window
169
+ DOM.setStyles(id, {top : f.top, left : f.left, width : f.width + dw, height : f.height + dh});
170
+
171
+ u = f.url || f.file;
172
+ if (u) {
173
+ if (tinymce.relaxedDomain)
174
+ u += (u.indexOf('?') == -1 ? '?' : '&') + 'mce_rdomain=' + tinymce.relaxedDomain;
175
+
176
+ u = tinymce._addVer(u);
177
+ }
178
+
179
+ if (!f.type) {
180
+ DOM.add(id + '_content', 'iframe', {id : id + '_ifr', src : 'javascript:""', frameBorder : 0, style : 'border:0;width:10px;height:10px'});
181
+ DOM.setStyles(id + '_ifr', {width : f.width, height : f.height});
182
+ DOM.setAttrib(id + '_ifr', 'src', u);
183
+ } else {
184
+ DOM.add(id + '_wrapper', 'a', {id : id + '_ok', 'class' : 'mceButton mceOk', href : 'javascript:;', onmousedown : 'return false;'}, 'Ok');
185
+
186
+ if (f.type == 'confirm')
187
+ DOM.add(id + '_wrapper', 'a', {'class' : 'mceButton mceCancel', href : 'javascript:;', onmousedown : 'return false;'}, 'Cancel');
188
+
189
+ DOM.add(id + '_middle', 'div', {'class' : 'mceIcon'});
190
+ DOM.setHTML(id + '_content', f.content.replace('\n', '<br />'));
191
+
192
+ Event.add(id, 'keyup', function(evt) {
193
+ var VK_ESCAPE = 27;
194
+ if (evt.keyCode === VK_ESCAPE) {
195
+ f.button_func(false);
196
+ return Event.cancel(evt);
197
+ }
198
+ });
199
+
200
+ Event.add(id, 'keydown', function(evt) {
201
+ var cancelButton, VK_TAB = 9;
202
+ if (evt.keyCode === VK_TAB) {
203
+ cancelButton = DOM.select('a.mceCancel', id + '_wrapper')[0];
204
+ if (cancelButton && cancelButton !== evt.target) {
205
+ cancelButton.focus();
206
+ } else {
207
+ DOM.get(id + '_ok').focus();
208
+ }
209
+ return Event.cancel(evt);
210
+ }
211
+ });
212
+ }
213
+
214
+ // Register events
215
+ mdf = Event.add(id, 'mousedown', function(e) {
216
+ var n = e.target, w, vp;
217
+
218
+ w = t.windows[id];
219
+ t.focus(id);
220
+
221
+ if (n.nodeName == 'A' || n.nodeName == 'a') {
222
+ if (n.className == 'mceClose') {
223
+ t.close(null, id);
224
+ return Event.cancel(e);
225
+ } else if (n.className == 'mceMax') {
226
+ w.oldPos = w.element.getXY();
227
+ w.oldSize = w.element.getSize();
228
+
229
+ vp = DOM.getViewPort();
230
+
231
+ // Reduce viewport size to avoid scrollbars
232
+ vp.w -= 2;
233
+ vp.h -= 2;
234
+
235
+ w.element.moveTo(vp.x, vp.y);
236
+ w.element.resizeTo(vp.w, vp.h);
237
+ DOM.setStyles(id + '_ifr', {width : vp.w - w.deltaWidth, height : vp.h - w.deltaHeight});
238
+ DOM.addClass(id + '_wrapper', 'mceMaximized');
239
+ } else if (n.className == 'mceMed') {
240
+ // Reset to old size
241
+ w.element.moveTo(w.oldPos.x, w.oldPos.y);
242
+ w.element.resizeTo(w.oldSize.w, w.oldSize.h);
243
+ w.iframeElement.resizeTo(w.oldSize.w - w.deltaWidth, w.oldSize.h - w.deltaHeight);
244
+
245
+ DOM.removeClass(id + '_wrapper', 'mceMaximized');
246
+ } else if (n.className == 'mceMove')
247
+ return t._startDrag(id, e, n.className);
248
+ else if (DOM.hasClass(n, 'mceResize'))
249
+ return t._startDrag(id, e, n.className.substring(13));
250
+ }
251
+ });
252
+
253
+ clf = Event.add(id, 'click', function(e) {
254
+ var n = e.target;
255
+
256
+ t.focus(id);
257
+
258
+ if (n.nodeName == 'A' || n.nodeName == 'a') {
259
+ switch (n.className) {
260
+ case 'mceClose':
261
+ t.close(null, id);
262
+ return Event.cancel(e);
263
+
264
+ case 'mceButton mceOk':
265
+ case 'mceButton mceCancel':
266
+ f.button_func(n.className == 'mceButton mceOk');
267
+ return Event.cancel(e);
268
+ }
269
+ }
270
+ });
271
+
272
+ // Make sure the tab order loops within the dialog.
273
+ Event.add([id + '_left', id + '_right'], 'focus', function(evt) {
274
+ var iframe = DOM.get(id + '_ifr');
275
+ if (iframe) {
276
+ var body = iframe.contentWindow.document.body;
277
+ var focusable = DOM.select(':input:enabled,*[tabindex=0]', body);
278
+ if (evt.target.id === (id + '_left')) {
279
+ focusable[focusable.length - 1].focus();
280
+ } else {
281
+ focusable[0].focus();
282
+ }
283
+ } else {
284
+ DOM.get(id + '_ok').focus();
285
+ }
286
+ });
287
+
288
+ // Add window
289
+ w = t.windows[id] = {
290
+ id : id,
291
+ mousedown_func : mdf,
292
+ click_func : clf,
293
+ element : new Element(id, {blocker : 1, container : ed.getContainer()}),
294
+ iframeElement : new Element(id + '_ifr'),
295
+ features : f,
296
+ deltaWidth : dw,
297
+ deltaHeight : dh
298
+ };
299
+
300
+ w.iframeElement.on('focus', function() {
301
+ t.focus(id);
302
+ });
303
+
304
+ // Setup blocker
305
+ if (t.count == 0 && t.editor.getParam('dialog_type', 'modal') == 'modal') {
306
+ DOM.add(DOM.doc.body, 'div', {
307
+ id : 'mceModalBlocker',
308
+ 'class' : (t.editor.settings.inlinepopups_skin || 'clearlooks2') + '_modalBlocker',
309
+ style : {zIndex : t.zIndex - 1}
310
+ });
311
+
312
+ DOM.show('mceModalBlocker'); // Reduces flicker in IE
313
+ DOM.setAttrib(DOM.doc.body, 'aria-hidden', 'true');
314
+ } else
315
+ DOM.setStyle('mceModalBlocker', 'z-index', t.zIndex - 1);
316
+
317
+ if (tinymce.isIE6 || /Firefox\/2\./.test(navigator.userAgent) || (tinymce.isIE && !DOM.boxModel))
318
+ DOM.setStyles('mceModalBlocker', {position : 'absolute', left : vp.x, top : vp.y, width : vp.w - 2, height : vp.h - 2});
319
+
320
+ DOM.setAttrib(id, 'aria-hidden', 'false');
321
+ t.focus(id);
322
+ t._fixIELayout(id, 1);
323
+
324
+ // Focus ok button
325
+ if (DOM.get(id + '_ok'))
326
+ DOM.get(id + '_ok').focus();
327
+ t.count++;
328
+
329
+ return w;
330
+ },
331
+
332
+ focus : function(id) {
333
+ var t = this, w;
334
+
335
+ if (w = t.windows[id]) {
336
+ w.zIndex = this.zIndex++;
337
+ w.element.setStyle('zIndex', w.zIndex);
338
+ w.element.update();
339
+
340
+ id = id + '_wrapper';
341
+ DOM.removeClass(t.lastId, 'mceFocus');
342
+ DOM.addClass(id, 'mceFocus');
343
+ t.lastId = id;
344
+
345
+ if (w.focussedElement) {
346
+ w.focussedElement.focus();
347
+ } else if (DOM.get(id + '_ok')) {
348
+ DOM.get(w.id + '_ok').focus();
349
+ } else if (DOM.get(w.id + '_ifr')) {
350
+ DOM.get(w.id + '_ifr').focus();
351
+ }
352
+ }
353
+ },
354
+
355
+ _addAll : function(te, ne) {
356
+ var i, n, t = this, dom = tinymce.DOM;
357
+
358
+ if (is(ne, 'string'))
359
+ te.appendChild(dom.doc.createTextNode(ne));
360
+ else if (ne.length) {
361
+ te = te.appendChild(dom.create(ne[0], ne[1]));
362
+
363
+ for (i=2; i<ne.length; i++)
364
+ t._addAll(te, ne[i]);
365
+ }
366
+ },
367
+
368
+ _startDrag : function(id, se, ac) {
369
+ var t = this, mu, mm, d = DOM.doc, eb, w = t.windows[id], we = w.element, sp = we.getXY(), p, sz, ph, cp, vp, sx, sy, sex, sey, dx, dy, dw, dh;
370
+
371
+ // Get positons and sizes
372
+ // cp = DOM.getPos(t.editor.getContainer());
373
+ cp = {x : 0, y : 0};
374
+ vp = DOM.getViewPort();
375
+
376
+ // Reduce viewport size to avoid scrollbars while dragging
377
+ vp.w -= 2;
378
+ vp.h -= 2;
379
+
380
+ sex = se.screenX;
381
+ sey = se.screenY;
382
+ dx = dy = dw = dh = 0;
383
+
384
+ // Handle mouse up
385
+ mu = Event.add(d, 'mouseup', function(e) {
386
+ Event.remove(d, 'mouseup', mu);
387
+ Event.remove(d, 'mousemove', mm);
388
+
389
+ if (eb)
390
+ eb.remove();
391
+
392
+ we.moveBy(dx, dy);
393
+ we.resizeBy(dw, dh);
394
+ sz = we.getSize();
395
+ DOM.setStyles(id + '_ifr', {width : sz.w - w.deltaWidth, height : sz.h - w.deltaHeight});
396
+ t._fixIELayout(id, 1);
397
+
398
+ return Event.cancel(e);
399
+ });
400
+
401
+ if (ac != 'Move')
402
+ startMove();
403
+
404
+ function startMove() {
405
+ if (eb)
406
+ return;
407
+
408
+ t._fixIELayout(id, 0);
409
+
410
+ // Setup event blocker
411
+ DOM.add(d.body, 'div', {
412
+ id : 'mceEventBlocker',
413
+ 'class' : 'mceEventBlocker ' + (t.editor.settings.inlinepopups_skin || 'clearlooks2'),
414
+ style : {zIndex : t.zIndex + 1}
415
+ });
416
+
417
+ if (tinymce.isIE6 || (tinymce.isIE && !DOM.boxModel))
418
+ DOM.setStyles('mceEventBlocker', {position : 'absolute', left : vp.x, top : vp.y, width : vp.w - 2, height : vp.h - 2});
419
+
420
+ eb = new Element('mceEventBlocker');
421
+ eb.update();
422
+
423
+ // Setup placeholder
424
+ p = we.getXY();
425
+ sz = we.getSize();
426
+ sx = cp.x + p.x - vp.x;
427
+ sy = cp.y + p.y - vp.y;
428
+ DOM.add(eb.get(), 'div', {id : 'mcePlaceHolder', 'class' : 'mcePlaceHolder', style : {left : sx, top : sy, width : sz.w, height : sz.h}});
429
+ ph = new Element('mcePlaceHolder');
430
+ };
431
+
432
+ // Handle mouse move/drag
433
+ mm = Event.add(d, 'mousemove', function(e) {
434
+ var x, y, v;
435
+
436
+ startMove();
437
+
438
+ x = e.screenX - sex;
439
+ y = e.screenY - sey;
440
+
441
+ switch (ac) {
442
+ case 'ResizeW':
443
+ dx = x;
444
+ dw = 0 - x;
445
+ break;
446
+
447
+ case 'ResizeE':
448
+ dw = x;
449
+ break;
450
+
451
+ case 'ResizeN':
452
+ case 'ResizeNW':
453
+ case 'ResizeNE':
454
+ if (ac == "ResizeNW") {
455
+ dx = x;
456
+ dw = 0 - x;
457
+ } else if (ac == "ResizeNE")
458
+ dw = x;
459
+
460
+ dy = y;
461
+ dh = 0 - y;
462
+ break;
463
+
464
+ case 'ResizeS':
465
+ case 'ResizeSW':
466
+ case 'ResizeSE':
467
+ if (ac == "ResizeSW") {
468
+ dx = x;
469
+ dw = 0 - x;
470
+ } else if (ac == "ResizeSE")
471
+ dw = x;
472
+
473
+ dh = y;
474
+ break;
475
+
476
+ case 'mceMove':
477
+ dx = x;
478
+ dy = y;
479
+ break;
480
+ }
481
+
482
+ // Boundary check
483
+ if (dw < (v = w.features.min_width - sz.w)) {
484
+ if (dx !== 0)
485
+ dx += dw - v;
486
+
487
+ dw = v;
488
+ }
489
+
490
+ if (dh < (v = w.features.min_height - sz.h)) {
491
+ if (dy !== 0)
492
+ dy += dh - v;
493
+
494
+ dh = v;
495
+ }
496
+
497
+ dw = Math.min(dw, w.features.max_width - sz.w);
498
+ dh = Math.min(dh, w.features.max_height - sz.h);
499
+ dx = Math.max(dx, vp.x - (sx + vp.x));
500
+ dy = Math.max(dy, vp.y - (sy + vp.y));
501
+ dx = Math.min(dx, (vp.w + vp.x) - (sx + sz.w + vp.x));
502
+ dy = Math.min(dy, (vp.h + vp.y) - (sy + sz.h + vp.y));
503
+
504
+ // Move if needed
505
+ if (dx + dy !== 0) {
506
+ if (sx + dx < 0)
507
+ dx = 0;
508
+
509
+ if (sy + dy < 0)
510
+ dy = 0;
511
+
512
+ ph.moveTo(sx + dx, sy + dy);
513
+ }
514
+
515
+ // Resize if needed
516
+ if (dw + dh !== 0)
517
+ ph.resizeTo(sz.w + dw, sz.h + dh);
518
+
519
+ return Event.cancel(e);
520
+ });
521
+
522
+ return Event.cancel(se);
523
+ },
524
+
525
+ resizeBy : function(dw, dh, id) {
526
+ var w = this.windows[id];
527
+
528
+ if (w) {
529
+ w.element.resizeBy(dw, dh);
530
+ w.iframeElement.resizeBy(dw, dh);
531
+ }
532
+ },
533
+
534
+ close : function(win, id) {
535
+ var t = this, w, d = DOM.doc, fw, id;
536
+
537
+ id = t._findId(id || win);
538
+
539
+ // Probably not inline
540
+ if (!t.windows[id]) {
541
+ t.parent(win);
542
+ return;
543
+ }
544
+
545
+ t.count--;
546
+
547
+ if (t.count == 0) {
548
+ DOM.remove('mceModalBlocker');
549
+ DOM.setAttrib(DOM.doc.body, 'aria-hidden', 'false');
550
+ t.editor.focus();
551
+ }
552
+
553
+ if (w = t.windows[id]) {
554
+ t.onClose.dispatch(t);
555
+ Event.remove(d, 'mousedown', w.mousedownFunc);
556
+ Event.remove(d, 'click', w.clickFunc);
557
+ Event.clear(id);
558
+ Event.clear(id + '_ifr');
559
+
560
+ DOM.setAttrib(id + '_ifr', 'src', 'javascript:""'); // Prevent leak
561
+ w.element.remove();
562
+ delete t.windows[id];
563
+
564
+ fw = t._frontWindow();
565
+
566
+ if (fw)
567
+ t.focus(fw.id);
568
+ }
569
+ },
570
+
571
+ // Find front most window
572
+ _frontWindow : function() {
573
+ var fw, ix = 0;
574
+ // Find front most window and focus that
575
+ each (this.windows, function(w) {
576
+ if (w.zIndex > ix) {
577
+ fw = w;
578
+ ix = w.zIndex;
579
+ }
580
+ });
581
+ return fw;
582
+ },
583
+
584
+ setTitle : function(w, ti) {
585
+ var e;
586
+
587
+ w = this._findId(w);
588
+
589
+ if (e = DOM.get(w + '_title'))
590
+ e.innerHTML = DOM.encode(ti);
591
+ },
592
+
593
+ alert : function(txt, cb, s) {
594
+ var t = this, w;
595
+
596
+ w = t.open({
597
+ title : t,
598
+ type : 'alert',
599
+ button_func : function(s) {
600
+ if (cb)
601
+ cb.call(s || t, s);
602
+
603
+ t.close(null, w.id);
604
+ },
605
+ content : DOM.encode(t.editor.getLang(txt, txt)),
606
+ inline : 1,
607
+ width : 400,
608
+ height : 130
609
+ });
610
+ },
611
+
612
+ confirm : function(txt, cb, s) {
613
+ var t = this, w;
614
+
615
+ w = t.open({
616
+ title : t,
617
+ type : 'confirm',
618
+ button_func : function(s) {
619
+ if (cb)
620
+ cb.call(s || t, s);
621
+
622
+ t.close(null, w.id);
623
+ },
624
+ content : DOM.encode(t.editor.getLang(txt, txt)),
625
+ inline : 1,
626
+ width : 400,
627
+ height : 130
628
+ });
629
+ },
630
+
631
+ // Internal functions
632
+
633
+ _findId : function(w) {
634
+ var t = this;
635
+
636
+ if (typeof(w) == 'string')
637
+ return w;
638
+
639
+ each(t.windows, function(wo) {
640
+ var ifr = DOM.get(wo.id + '_ifr');
641
+
642
+ if (ifr && w == ifr.contentWindow) {
643
+ w = wo.id;
644
+ return false;
645
+ }
646
+ });
647
+
648
+ return w;
649
+ },
650
+
651
+ _fixIELayout : function(id, s) {
652
+ var w, img;
653
+
654
+ if (!tinymce.isIE6)
655
+ return;
656
+
657
+ // Fixes the bug where hover flickers and does odd things in IE6
658
+ each(['n','s','w','e','nw','ne','sw','se'], function(v) {
659
+ var e = DOM.get(id + '_resize_' + v);
660
+
661
+ DOM.setStyles(e, {
662
+ width : s ? e.clientWidth : '',
663
+ height : s ? e.clientHeight : '',
664
+ cursor : DOM.getStyle(e, 'cursor', 1)
665
+ });
666
+
667
+ DOM.setStyle(id + "_bottom", 'bottom', '-1px');
668
+
669
+ e = 0;
670
+ });
671
+
672
+ // Fixes graphics glitch
673
+ if (w = this.windows[id]) {
674
+ // Fixes rendering bug after resize
675
+ w.element.hide();
676
+ w.element.show();
677
+
678
+ // Forced a repaint of the window
679
+ //DOM.get(id).style.filter = '';
680
+
681
+ // IE has a bug where images used in CSS won't get loaded
682
+ // sometimes when the cache in the browser is disabled
683
+ // This fix tries to solve it by loading the images using the image object
684
+ each(DOM.select('div,a', id), function(e, i) {
685
+ if (e.currentStyle.backgroundImage != 'none') {
686
+ img = new Image();
687
+ img.src = e.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/, '$1');
688
+ }
689
+ });
690
+
691
+ DOM.get(id).style.filter = '';
692
+ }
693
+ }
694
+ });
695
+
696
+ // Register plugin
697
+ tinymce.PluginManager.add('inlinepopups', tinymce.plugins.InlinePopups);
698
+ })();
699
+
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css CHANGED
@@ -1,90 +1,90 @@
1
- /* Clearlooks 2 */
2
-
3
- /* Reset */
4
- .clearlooks2, .clearlooks2 div, .clearlooks2 span, .clearlooks2 a {vertical-align:baseline; text-align:left; position:absolute; border:0; padding:0; margin:0; background:transparent; font-family:Arial,Verdana; font-size:11px; color:#000; text-decoration:none; font-weight:normal; width:auto; height:auto; overflow:hidden; display:block}
5
-
6
- /* General */
7
- .clearlooks2 {position:absolute; direction:ltr}
8
- .clearlooks2 .mceWrapper {position:static}
9
- .mceEventBlocker {position:fixed; left:0; top:0; background:url(img/horizontal.gif) no-repeat 0 -75px; width:100%; height:100%}
10
- .clearlooks2 .mcePlaceHolder {border:1px solid #000; background:#888; top:0; left:0; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50)}
11
- .clearlooks2_modalBlocker {position:fixed; left:0; top:0; width:100%; height:100%; background:#FFF; opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60); display:none}
12
-
13
- /* Top */
14
- .clearlooks2 .mceTop, .clearlooks2 .mceTop div {top:0; width:100%; height:23px}
15
- .clearlooks2 .mceTop .mceLeft {width:6px; background:url(img/corners.gif)}
16
- .clearlooks2 .mceTop .mceCenter {right:6px; width:100%; height:23px; background:url(img/horizontal.gif) 12px 0; clip:rect(auto auto auto 12px)}
17
- .clearlooks2 .mceTop .mceRight {right:0; width:6px; height:23px; background:url(img/corners.gif) -12px 0}
18
- .clearlooks2 .mceTop span {width:100%; text-align:center; vertical-align:middle; line-height:23px; font-weight:bold}
19
- .clearlooks2 .mceFocus .mceTop .mceLeft {background:url(img/corners.gif) -6px 0}
20
- .clearlooks2 .mceFocus .mceTop .mceCenter {background:url(img/horizontal.gif) 0 -23px}
21
- .clearlooks2 .mceFocus .mceTop .mceRight {background:url(img/corners.gif) -18px 0}
22
- .clearlooks2 .mceFocus .mceTop span {color:#FFF}
23
-
24
- /* Middle */
25
- .clearlooks2 .mceMiddle, .clearlooks2 .mceMiddle div {top:0}
26
- .clearlooks2 .mceMiddle {width:100%; height:100%; clip:rect(23px auto auto auto)}
27
- .clearlooks2 .mceMiddle .mceLeft {left:0; width:5px; height:100%; background:url(img/vertical.gif) -5px 0}
28
- .clearlooks2 .mceMiddle span {top:23px; left:5px; width:100%; height:100%; background:#FFF}
29
- .clearlooks2 .mceMiddle .mceRight {right:0; width:5px; height:100%; background:url(img/vertical.gif)}
30
-
31
- /* Bottom */
32
- .clearlooks2 .mceBottom, .clearlooks2 .mceBottom div {height:6px}
33
- .clearlooks2 .mceBottom {left:0; bottom:0; width:100%}
34
- .clearlooks2 .mceBottom div {top:0}
35
- .clearlooks2 .mceBottom .mceLeft {left:0; width:5px; background:url(img/corners.gif) -34px -6px}
36
- .clearlooks2 .mceBottom .mceCenter {left:5px; width:100%; background:url(img/horizontal.gif) 0 -46px}
37
- .clearlooks2 .mceBottom .mceRight {right:0; width:5px; background: url(img/corners.gif) -34px 0}
38
- .clearlooks2 .mceBottom span {display:none}
39
- .clearlooks2 .mceStatusbar .mceBottom, .clearlooks2 .mceStatusbar .mceBottom div {height:23px}
40
- .clearlooks2 .mceStatusbar .mceBottom .mceLeft {background:url(img/corners.gif) -29px 0}
41
- .clearlooks2 .mceStatusbar .mceBottom .mceCenter {background:url(img/horizontal.gif) 0 -52px}
42
- .clearlooks2 .mceStatusbar .mceBottom .mceRight {background:url(img/corners.gif) -24px 0}
43
- .clearlooks2 .mceStatusbar .mceBottom span {display:block; left:7px; font-family:Arial, Verdana; font-size:11px; line-height:23px}
44
-
45
- /* Actions */
46
- .clearlooks2 a {width:29px; height:16px; top:3px;}
47
- .clearlooks2 .mceClose {right:6px; background:url(img/buttons.gif) -87px 0}
48
- .clearlooks2 .mceMin {display:none; right:68px; background:url(img/buttons.gif) 0 0}
49
- .clearlooks2 .mceMed {display:none; right:37px; background:url(img/buttons.gif) -29px 0}
50
- .clearlooks2 .mceMax {display:none; right:37px; background:url(img/buttons.gif) -58px 0}
51
- .clearlooks2 .mceMove {display:none;width:100%;cursor:move;background:url(img/corners.gif) no-repeat -100px -100px}
52
- .clearlooks2 .mceMovable .mceMove {display:block}
53
- .clearlooks2 .mceFocus .mceClose {right:6px; background:url(img/buttons.gif) -87px -16px}
54
- .clearlooks2 .mceFocus .mceMin {right:68px; background:url(img/buttons.gif) 0 -16px}
55
- .clearlooks2 .mceFocus .mceMed {right:37px; background:url(img/buttons.gif) -29px -16px}
56
- .clearlooks2 .mceFocus .mceMax {right:37px; background:url(img/buttons.gif) -58px -16px}
57
- .clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px}
58
- .clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px}
59
- .clearlooks2 .mceFocus .mceMin:hover {right:68px; background:url(img/buttons.gif) 0 -32px}
60
- .clearlooks2 .mceFocus .mceMed:hover {right:37px; background:url(img/buttons.gif) -29px -32px}
61
- .clearlooks2 .mceFocus .mceMax:hover {right:37px; background:url(img/buttons.gif) -58px -32px}
62
-
63
- /* Resize */
64
- .clearlooks2 .mceResize {top:auto; left:auto; display:none; width:5px; height:5px; background:url(img/horizontal.gif) no-repeat 0 -75px}
65
- .clearlooks2 .mceResizable .mceResize {display:block}
66
- .clearlooks2 .mceResizable .mceMin, .clearlooks2 .mceMax {display:none}
67
- .clearlooks2 .mceMinimizable .mceMin {display:block}
68
- .clearlooks2 .mceMaximizable .mceMax {display:block}
69
- .clearlooks2 .mceMaximized .mceMed {display:block}
70
- .clearlooks2 .mceMaximized .mceMax {display:none}
71
- .clearlooks2 a.mceResizeN {top:0; left:0; width:100%; cursor:n-resize}
72
- .clearlooks2 a.mceResizeNW {top:0; left:0; cursor:nw-resize}
73
- .clearlooks2 a.mceResizeNE {top:0; right:0; cursor:ne-resize}
74
- .clearlooks2 a.mceResizeW {top:0; left:0; height:100%; cursor:w-resize;}
75
- .clearlooks2 a.mceResizeE {top:0; right:0; height:100%; cursor:e-resize}
76
- .clearlooks2 a.mceResizeS {bottom:0; left:0; width:100%; cursor:s-resize}
77
- .clearlooks2 a.mceResizeSW {bottom:0; left:0; cursor:sw-resize}
78
- .clearlooks2 a.mceResizeSE {bottom:0; right:0; cursor:se-resize}
79
-
80
- /* Alert/Confirm */
81
- .clearlooks2 .mceButton {font-weight:bold; bottom:10px; width:80px; height:30px; background:url(img/button.gif); line-height:30px; vertical-align:middle; text-align:center; outline:0}
82
- .clearlooks2 .mceMiddle .mceIcon {left:15px; top:35px; width:32px; height:32px}
83
- .clearlooks2 .mceAlert .mceMiddle span, .clearlooks2 .mceConfirm .mceMiddle span {background:transparent;left:60px; top:35px; width:320px; height:50px; font-weight:bold; overflow:auto; white-space:normal}
84
- .clearlooks2 a:hover {font-weight:bold;}
85
- .clearlooks2 .mceAlert .mceMiddle, .clearlooks2 .mceConfirm .mceMiddle {background:#D6D7D5}
86
- .clearlooks2 .mceAlert .mceOk {left:50%; top:auto; margin-left: -40px}
87
- .clearlooks2 .mceAlert .mceIcon {background:url(img/alert.gif)}
88
- .clearlooks2 .mceConfirm .mceOk {left:50%; top:auto; margin-left: -90px}
89
- .clearlooks2 .mceConfirm .mceCancel {left:50%; top:auto}
90
- .clearlooks2 .mceConfirm .mceIcon {background:url(img/confirm.gif)}
1
+ /* Clearlooks 2 */
2
+
3
+ /* Reset */
4
+ .clearlooks2, .clearlooks2 div, .clearlooks2 span, .clearlooks2 a {vertical-align:baseline; text-align:left; position:absolute; border:0; padding:0; margin:0; background:transparent; font-family:Arial,Verdana; font-size:11px; color:#000; text-decoration:none; font-weight:normal; width:auto; height:auto; overflow:hidden; display:block}
5
+
6
+ /* General */
7
+ .clearlooks2 {position:absolute; direction:ltr}
8
+ .clearlooks2 .mceWrapper {position:static}
9
+ .mceEventBlocker {position:fixed; left:0; top:0; background:url(img/horizontal.gif) no-repeat 0 -75px; width:100%; height:100%}
10
+ .clearlooks2 .mcePlaceHolder {border:1px solid #000; background:#888; top:0; left:0; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50)}
11
+ .clearlooks2_modalBlocker {position:fixed; left:0; top:0; width:100%; height:100%; background:#FFF; opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60); display:none}
12
+
13
+ /* Top */
14
+ .clearlooks2 .mceTop, .clearlooks2 .mceTop div {top:0; width:100%; height:23px}
15
+ .clearlooks2 .mceTop .mceLeft {width:6px; background:url(img/corners.gif)}
16
+ .clearlooks2 .mceTop .mceCenter {right:6px; width:100%; height:23px; background:url(img/horizontal.gif) 12px 0; clip:rect(auto auto auto 12px)}
17
+ .clearlooks2 .mceTop .mceRight {right:0; width:6px; height:23px; background:url(img/corners.gif) -12px 0}
18
+ .clearlooks2 .mceTop span {width:100%; text-align:center; vertical-align:middle; line-height:23px; font-weight:bold}
19
+ .clearlooks2 .mceFocus .mceTop .mceLeft {background:url(img/corners.gif) -6px 0}
20
+ .clearlooks2 .mceFocus .mceTop .mceCenter {background:url(img/horizontal.gif) 0 -23px}
21
+ .clearlooks2 .mceFocus .mceTop .mceRight {background:url(img/corners.gif) -18px 0}
22
+ .clearlooks2 .mceFocus .mceTop span {color:#FFF}
23
+
24
+ /* Middle */
25
+ .clearlooks2 .mceMiddle, .clearlooks2 .mceMiddle div {top:0}
26
+ .clearlooks2 .mceMiddle {width:100%; height:100%; clip:rect(23px auto auto auto)}
27
+ .clearlooks2 .mceMiddle .mceLeft {left:0; width:5px; height:100%; background:url(img/vertical.gif) -5px 0}
28
+ .clearlooks2 .mceMiddle span {top:23px; left:5px; width:100%; height:100%; background:#FFF}
29
+ .clearlooks2 .mceMiddle .mceRight {right:0; width:5px; height:100%; background:url(img/vertical.gif)}
30
+
31
+ /* Bottom */
32
+ .clearlooks2 .mceBottom, .clearlooks2 .mceBottom div {height:6px}
33
+ .clearlooks2 .mceBottom {left:0; bottom:0; width:100%}
34
+ .clearlooks2 .mceBottom div {top:0}
35
+ .clearlooks2 .mceBottom .mceLeft {left:0; width:5px; background:url(img/corners.gif) -34px -6px}
36
+ .clearlooks2 .mceBottom .mceCenter {left:5px; width:100%; background:url(img/horizontal.gif) 0 -46px}
37
+ .clearlooks2 .mceBottom .mceRight {right:0; width:5px; background: url(img/corners.gif) -34px 0}
38
+ .clearlooks2 .mceBottom span {display:none}
39
+ .clearlooks2 .mceStatusbar .mceBottom, .clearlooks2 .mceStatusbar .mceBottom div {height:23px}
40
+ .clearlooks2 .mceStatusbar .mceBottom .mceLeft {background:url(img/corners.gif) -29px 0}
41
+ .clearlooks2 .mceStatusbar .mceBottom .mceCenter {background:url(img/horizontal.gif) 0 -52px}
42
+ .clearlooks2 .mceStatusbar .mceBottom .mceRight {background:url(img/corners.gif) -24px 0}
43
+ .clearlooks2 .mceStatusbar .mceBottom span {display:block; left:7px; font-family:Arial, Verdana; font-size:11px; line-height:23px}
44
+
45
+ /* Actions */
46
+ .clearlooks2 a {width:29px; height:16px; top:3px;}
47
+ .clearlooks2 .mceClose {right:6px; background:url(img/buttons.gif) -87px 0}
48
+ .clearlooks2 .mceMin {display:none; right:68px; background:url(img/buttons.gif) 0 0}
49
+ .clearlooks2 .mceMed {display:none; right:37px; background:url(img/buttons.gif) -29px 0}
50
+ .clearlooks2 .mceMax {display:none; right:37px; background:url(img/buttons.gif) -58px 0}
51
+ .clearlooks2 .mceMove {display:none;width:100%;cursor:move;background:url(img/corners.gif) no-repeat -100px -100px}
52
+ .clearlooks2 .mceMovable .mceMove {display:block}
53
+ .clearlooks2 .mceFocus .mceClose {right:6px; background:url(img/buttons.gif) -87px -16px}
54
+ .clearlooks2 .mceFocus .mceMin {right:68px; background:url(img/buttons.gif) 0 -16px}
55
+ .clearlooks2 .mceFocus .mceMed {right:37px; background:url(img/buttons.gif) -29px -16px}
56
+ .clearlooks2 .mceFocus .mceMax {right:37px; background:url(img/buttons.gif) -58px -16px}
57
+ .clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px}
58
+ .clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px}
59
+ .clearlooks2 .mceFocus .mceMin:hover {right:68px; background:url(img/buttons.gif) 0 -32px}
60
+ .clearlooks2 .mceFocus .mceMed:hover {right:37px; background:url(img/buttons.gif) -29px -32px}
61
+ .clearlooks2 .mceFocus .mceMax:hover {right:37px; background:url(img/buttons.gif) -58px -32px}
62
+
63
+ /* Resize */
64
+ .clearlooks2 .mceResize {top:auto; left:auto; display:none; width:5px; height:5px; background:url(img/horizontal.gif) no-repeat 0 -75px}
65
+ .clearlooks2 .mceResizable .mceResize {display:block}
66
+ .clearlooks2 .mceResizable .mceMin, .clearlooks2 .mceMax {display:none}
67
+ .clearlooks2 .mceMinimizable .mceMin {display:block}
68
+ .clearlooks2 .mceMaximizable .mceMax {display:block}
69
+ .clearlooks2 .mceMaximized .mceMed {display:block}
70
+ .clearlooks2 .mceMaximized .mceMax {display:none}
71
+ .clearlooks2 a.mceResizeN {top:0; left:0; width:100%; cursor:n-resize}
72
+ .clearlooks2 a.mceResizeNW {top:0; left:0; cursor:nw-resize}
73
+ .clearlooks2 a.mceResizeNE {top:0; right:0; cursor:ne-resize}
74
+ .clearlooks2 a.mceResizeW {top:0; left:0; height:100%; cursor:w-resize;}
75
+ .clearlooks2 a.mceResizeE {top:0; right:0; height:100%; cursor:e-resize}
76
+ .clearlooks2 a.mceResizeS {bottom:0; left:0; width:100%; cursor:s-resize}
77
+ .clearlooks2 a.mceResizeSW {bottom:0; left:0; cursor:sw-resize}
78
+ .clearlooks2 a.mceResizeSE {bottom:0; right:0; cursor:se-resize}
79
+
80
+ /* Alert/Confirm */
81
+ .clearlooks2 .mceButton {font-weight:bold; bottom:10px; width:80px; height:30px; background:url(img/button.gif); line-height:30px; vertical-align:middle; text-align:center; outline:0}
82
+ .clearlooks2 .mceMiddle .mceIcon {left:15px; top:35px; width:32px; height:32px}
83
+ .clearlooks2 .mceAlert .mceMiddle span, .clearlooks2 .mceConfirm .mceMiddle span {background:transparent;left:60px; top:35px; width:320px; height:50px; font-weight:bold; overflow:auto; white-space:normal}
84
+ .clearlooks2 a:hover {font-weight:bold;}
85
+ .clearlooks2 .mceAlert .mceMiddle, .clearlooks2 .mceConfirm .mceMiddle {background:#D6D7D5}
86
+ .clearlooks2 .mceAlert .mceOk {left:50%; top:auto; margin-left: -40px}
87
+ .clearlooks2 .mceAlert .mceIcon {background:url(img/alert.gif)}
88
+ .clearlooks2 .mceConfirm .mceOk {left:50%; top:auto; margin-left: -90px}
89
+ .clearlooks2 .mceConfirm .mceCancel {left:50%; top:auto}
90
+ .clearlooks2 .mceConfirm .mceIcon {background:url(img/confirm.gif)}
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/inlinepopups/template.htm CHANGED
@@ -1,387 +1,387 @@
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>Template for dialogs</title>
5
- <link rel="stylesheet" type="text/css" href="skins/clearlooks2/window.css" />
6
- </head>
7
- <body>
8
-
9
- <div class="mceEditor">
10
- <div class="clearlooks2" style="width:400px; height:100px; left:10px;">
11
- <div class="mceWrapper">
12
- <div class="mceTop">
13
- <div class="mceLeft"></div>
14
- <div class="mceCenter"></div>
15
- <div class="mceRight"></div>
16
- <span>Blured</span>
17
- </div>
18
-
19
- <div class="mceMiddle">
20
- <div class="mceLeft"></div>
21
- <span>Content</span>
22
- <div class="mceRight"></div>
23
- </div>
24
-
25
- <div class="mceBottom">
26
- <div class="mceLeft"></div>
27
- <div class="mceCenter"></div>
28
- <div class="mceRight"></div>
29
- <span>Statusbar text.</span>
30
- </div>
31
-
32
- <a class="mceMove" href="#"></a>
33
- <a class="mceMin" href="#"></a>
34
- <a class="mceMax" href="#"></a>
35
- <a class="mceMed" href="#"></a>
36
- <a class="mceClose" href="#"></a>
37
- <a class="mceResize mceResizeN" href="#"></a>
38
- <a class="mceResize mceResizeS" href="#"></a>
39
- <a class="mceResize mceResizeW" href="#"></a>
40
- <a class="mceResize mceResizeE" href="#"></a>
41
- <a class="mceResize mceResizeNW" href="#"></a>
42
- <a class="mceResize mceResizeNE" href="#"></a>
43
- <a class="mceResize mceResizeSW" href="#"></a>
44
- <a class="mceResize mceResizeSE" href="#"></a>
45
- </div>
46
- </div>
47
-
48
- <div class="clearlooks2" style="width:400px; height:100px; left:420px;">
49
- <div class="mceWrapper mceMovable mceFocus">
50
- <div class="mceTop">
51
- <div class="mceLeft"></div>
52
- <div class="mceCenter"></div>
53
- <div class="mceRight"></div>
54
- <span>Focused</span>
55
- </div>
56
-
57
- <div class="mceMiddle">
58
- <div class="mceLeft"></div>
59
- <span>Content</span>
60
- <div class="mceRight"></div>
61
- </div>
62
-
63
- <div class="mceBottom">
64
- <div class="mceLeft"></div>
65
- <div class="mceCenter"></div>
66
- <div class="mceRight"></div>
67
- <span>Statusbar text.</span>
68
- </div>
69
-
70
- <a class="mceMove" href="#"></a>
71
- <a class="mceMin" href="#"></a>
72
- <a class="mceMax" href="#"></a>
73
- <a class="mceMed" href="#"></a>
74
- <a class="mceClose" href="#"></a>
75
- <a class="mceResize mceResizeN" href="#"></a>
76
- <a class="mceResize mceResizeS" href="#"></a>
77
- <a class="mceResize mceResizeW" href="#"></a>
78
- <a class="mceResize mceResizeE" href="#"></a>
79
- <a class="mceResize mceResizeNW" href="#"></a>
80
- <a class="mceResize mceResizeNE" href="#"></a>
81
- <a class="mceResize mceResizeSW" href="#"></a>
82
- <a class="mceResize mceResizeSE" href="#"></a>
83
- </div>
84
- </div>
85
-
86
- <div class="clearlooks2" style="width:400px; height:100px; left:10px; top:120px;">
87
- <div class="mceWrapper mceMovable mceFocus mceStatusbar">
88
- <div class="mceTop">
89
- <div class="mceLeft"></div>
90
- <div class="mceCenter"></div>
91
- <div class="mceRight"></div>
92
- <span>Statusbar</span>
93
- </div>
94
-
95
- <div class="mceMiddle">
96
- <div class="mceLeft"></div>
97
- <span>Content</span>
98
- <div class="mceRight"></div>
99
- </div>
100
-
101
- <div class="mceBottom">
102
- <div class="mceLeft"></div>
103
- <div class="mceCenter"></div>
104
- <div class="mceRight"></div>
105
- <span>Statusbar text.</span>
106
- </div>
107
-
108
- <a class="mceMove" href="#"></a>
109
- <a class="mceMin" href="#"></a>
110
- <a class="mceMax" href="#"></a>
111
- <a class="mceMed" href="#"></a>
112
- <a class="mceClose" href="#"></a>
113
- <a class="mceResize mceResizeN" href="#"></a>
114
- <a class="mceResize mceResizeS" href="#"></a>
115
- <a class="mceResize mceResizeW" href="#"></a>
116
- <a class="mceResize mceResizeE" href="#"></a>
117
- <a class="mceResize mceResizeNW" href="#"></a>
118
- <a class="mceResize mceResizeNE" href="#"></a>
119
- <a class="mceResize mceResizeSW" href="#"></a>
120
- <a class="mceResize mceResizeSE" href="#"></a>
121
- </div>
122
- </div>
123
-
124
- <div class="clearlooks2" style="width:400px; height:100px; left:420px; top:120px;">
125
- <div class="mceWrapper mceMovable mceFocus mceStatusbar mceResizable">
126
- <div class="mceTop">
127
- <div class="mceLeft"></div>
128
- <div class="mceCenter"></div>
129
- <div class="mceRight"></div>
130
- <span>Statusbar, Resizable</span>
131
- </div>
132
-
133
- <div class="mceMiddle">
134
- <div class="mceLeft"></div>
135
- <span>Content</span>
136
- <div class="mceRight"></div>
137
- </div>
138
-
139
- <div class="mceBottom">
140
- <div class="mceLeft"></div>
141
- <div class="mceCenter"></div>
142
- <div class="mceRight"></div>
143
- <span>Statusbar text.</span>
144
- </div>
145
-
146
- <a class="mceMove" href="#"></a>
147
- <a class="mceMin" href="#"></a>
148
- <a class="mceMax" href="#"></a>
149
- <a class="mceMed" href="#"></a>
150
- <a class="mceClose" href="#"></a>
151
- <a class="mceResize mceResizeN" href="#"></a>
152
- <a class="mceResize mceResizeS" href="#"></a>
153
- <a class="mceResize mceResizeW" href="#"></a>
154
- <a class="mceResize mceResizeE" href="#"></a>
155
- <a class="mceResize mceResizeNW" href="#"></a>
156
- <a class="mceResize mceResizeNE" href="#"></a>
157
- <a class="mceResize mceResizeSW" href="#"></a>
158
- <a class="mceResize mceResizeSE" href="#"></a>
159
- </div>
160
- </div>
161
-
162
- <div class="clearlooks2" style="width:400px; height:100px; left:10px; top:230px;">
163
- <div class="mceWrapper mceMovable mceFocus mceResizable mceMaximizable">
164
- <div class="mceTop">
165
- <div class="mceLeft"></div>
166
- <div class="mceCenter"></div>
167
- <div class="mceRight"></div>
168
- <span>Resizable, Maximizable</span>
169
- </div>
170
-
171
- <div class="mceMiddle">
172
- <div class="mceLeft"></div>
173
- <span>Content</span>
174
- <div class="mceRight"></div>
175
- </div>
176
-
177
- <div class="mceBottom">
178
- <div class="mceLeft"></div>
179
- <div class="mceCenter"></div>
180
- <div class="mceRight"></div>
181
- <span>Statusbar text.</span>
182
- </div>
183
-
184
- <a class="mceMove" href="#"></a>
185
- <a class="mceMin" href="#"></a>
186
- <a class="mceMax" href="#"></a>
187
- <a class="mceMed" href="#"></a>
188
- <a class="mceClose" href="#"></a>
189
- <a class="mceResize mceResizeN" href="#"></a>
190
- <a class="mceResize mceResizeS" href="#"></a>
191
- <a class="mceResize mceResizeW" href="#"></a>
192
- <a class="mceResize mceResizeE" href="#"></a>
193
- <a class="mceResize mceResizeNW" href="#"></a>
194
- <a class="mceResize mceResizeNE" href="#"></a>
195
- <a class="mceResize mceResizeSW" href="#"></a>
196
- <a class="mceResize mceResizeSE" href="#"></a>
197
- </div>
198
- </div>
199
-
200
- <div class="clearlooks2" style="width:400px; height:100px; left:420px; top:230px;">
201
- <div class="mceWrapper mceMovable mceStatusbar mceResizable mceMaximizable">
202
- <div class="mceTop">
203
- <div class="mceLeft"></div>
204
- <div class="mceCenter"></div>
205
- <div class="mceRight"></div>
206
- <span>Blurred, Maximizable, Statusbar, Resizable</span>
207
- </div>
208
-
209
- <div class="mceMiddle">
210
- <div class="mceLeft"></div>
211
- <span>Content</span>
212
- <div class="mceRight"></div>
213
- </div>
214
-
215
- <div class="mceBottom">
216
- <div class="mceLeft"></div>
217
- <div class="mceCenter"></div>
218
- <div class="mceRight"></div>
219
- <span>Statusbar text.</span>
220
- </div>
221
-
222
- <a class="mceMove" href="#"></a>
223
- <a class="mceMin" href="#"></a>
224
- <a class="mceMax" href="#"></a>
225
- <a class="mceMed" href="#"></a>
226
- <a class="mceClose" href="#"></a>
227
- <a class="mceResize mceResizeN" href="#"></a>
228
- <a class="mceResize mceResizeS" href="#"></a>
229
- <a class="mceResize mceResizeW" href="#"></a>
230
- <a class="mceResize mceResizeE" href="#"></a>
231
- <a class="mceResize mceResizeNW" href="#"></a>
232
- <a class="mceResize mceResizeNE" href="#"></a>
233
- <a class="mceResize mceResizeSW" href="#"></a>
234
- <a class="mceResize mceResizeSE" href="#"></a>
235
- </div>
236
- </div>
237
-
238
- <div class="clearlooks2" style="width:400px; height:100px; left:10px; top:340px;">
239
- <div class="mceWrapper mceMovable mceFocus mceResizable mceMaximized mceMinimizable mceMaximizable">
240
- <div class="mceTop">
241
- <div class="mceLeft"></div>
242
- <div class="mceCenter"></div>
243
- <div class="mceRight"></div>
244
- <span>Maximized, Maximizable, Minimizable</span>
245
- </div>
246
-
247
- <div class="mceMiddle">
248
- <div class="mceLeft"></div>
249
- <span>Content</span>
250
- <div class="mceRight"></div>
251
- </div>
252
-
253
- <div class="mceBottom">
254
- <div class="mceLeft"></div>
255
- <div class="mceCenter"></div>
256
- <div class="mceRight"></div>
257
- <span>Statusbar text.</span>
258
- </div>
259
-
260
- <a class="mceMove" href="#"></a>
261
- <a class="mceMin" href="#"></a>
262
- <a class="mceMax" href="#"></a>
263
- <a class="mceMed" href="#"></a>
264
- <a class="mceClose" href="#"></a>
265
- <a class="mceResize mceResizeN" href="#"></a>
266
- <a class="mceResize mceResizeS" href="#"></a>
267
- <a class="mceResize mceResizeW" href="#"></a>
268
- <a class="mceResize mceResizeE" href="#"></a>
269
- <a class="mceResize mceResizeNW" href="#"></a>
270
- <a class="mceResize mceResizeNE" href="#"></a>
271
- <a class="mceResize mceResizeSW" href="#"></a>
272
- <a class="mceResize mceResizeSE" href="#"></a>
273
- </div>
274
- </div>
275
-
276
- <div class="clearlooks2" style="width:400px; height:100px; left:420px; top:340px;">
277
- <div class="mceWrapper mceMovable mceStatusbar mceResizable mceMaximized mceMinimizable mceMaximizable">
278
- <div class="mceTop">
279
- <div class="mceLeft"></div>
280
- <div class="mceCenter"></div>
281
- <div class="mceRight"></div>
282
- <span>Blured</span>
283
- </div>
284
-
285
- <div class="mceMiddle">
286
- <div class="mceLeft"></div>
287
- <span>Content</span>
288
- <div class="mceRight"></div>
289
- </div>
290
-
291
- <div class="mceBottom">
292
- <div class="mceLeft"></div>
293
- <div class="mceCenter"></div>
294
- <div class="mceRight"></div>
295
- <span>Statusbar text.</span>
296
- </div>
297
-
298
- <a class="mceMove" href="#"></a>
299
- <a class="mceMin" href="#"></a>
300
- <a class="mceMax" href="#"></a>
301
- <a class="mceMed" href="#"></a>
302
- <a class="mceClose" href="#"></a>
303
- <a class="mceResize mceResizeN" href="#"></a>
304
- <a class="mceResize mceResizeS" href="#"></a>
305
- <a class="mceResize mceResizeW" href="#"></a>
306
- <a class="mceResize mceResizeE" href="#"></a>
307
- <a class="mceResize mceResizeNW" href="#"></a>
308
- <a class="mceResize mceResizeNE" href="#"></a>
309
- <a class="mceResize mceResizeSW" href="#"></a>
310
- <a class="mceResize mceResizeSE" href="#"></a>
311
- </div>
312
- </div>
313
-
314
- <div class="clearlooks2" style="width:400px; height:130px; left:10px; top:450px;">
315
- <div class="mceWrapper mceMovable mceFocus mceModal mceAlert">
316
- <div class="mceTop">
317
- <div class="mceLeft"></div>
318
- <div class="mceCenter"></div>
319
- <div class="mceRight"></div>
320
- <span>Alert</span>
321
- </div>
322
-
323
- <div class="mceMiddle">
324
- <div class="mceLeft"></div>
325
- <span>
326
- This is a very long error message. This is a very long error message.
327
- This is a very long error message. This is a very long error message.
328
- This is a very long error message. This is a very long error message.
329
- This is a very long error message. This is a very long error message.
330
- This is a very long error message. This is a very long error message.
331
- This is a very long error message. This is a very long error message.
332
- </span>
333
- <div class="mceRight"></div>
334
- <div class="mceIcon"></div>
335
- </div>
336
-
337
- <div class="mceBottom">
338
- <div class="mceLeft"></div>
339
- <div class="mceCenter"></div>
340
- <div class="mceRight"></div>
341
- </div>
342
-
343
- <a class="mceMove" href="#"></a>
344
- <a class="mceButton mceOk" href="#">Ok</a>
345
- <a class="mceClose" href="#"></a>
346
- </div>
347
- </div>
348
-
349
- <div class="clearlooks2" style="width:400px; height:130px; left:420px; top:450px;">
350
- <div class="mceWrapper mceMovable mceFocus mceModal mceConfirm">
351
- <div class="mceTop">
352
- <div class="mceLeft"></div>
353
- <div class="mceCenter"></div>
354
- <div class="mceRight"></div>
355
- <span>Confirm</span>
356
- </div>
357
-
358
- <div class="mceMiddle">
359
- <div class="mceLeft"></div>
360
- <span>
361
- This is a very long error message. This is a very long error message.
362
- This is a very long error message. This is a very long error message.
363
- This is a very long error message. This is a very long error message.
364
- This is a very long error message. This is a very long error message.
365
- This is a very long error message. This is a very long error message.
366
- This is a very long error message. This is a very long error message.
367
- </span>
368
- <div class="mceRight"></div>
369
- <div class="mceIcon"></div>
370
- </div>
371
-
372
- <div class="mceBottom">
373
- <div class="mceLeft"></div>
374
- <div class="mceCenter"></div>
375
- <div class="mceRight"></div>
376
- </div>
377
-
378
- <a class="mceMove" href="#"></a>
379
- <a class="mceButton mceOk" href="#">Ok</a>
380
- <a class="mceButton mceCancel" href="#">Cancel</a>
381
- <a class="mceClose" href="#"></a>
382
- </div>
383
- </div>
384
- </div>
385
-
386
- </body>
387
- </html>
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>Template for dialogs</title>
5
+ <link rel="stylesheet" type="text/css" href="skins/clearlooks2/window.css" />
6
+ </head>
7
+ <body>
8
+
9
+ <div class="mceEditor">
10
+ <div class="clearlooks2" style="width:400px; height:100px; left:10px;">
11
+ <div class="mceWrapper">
12
+ <div class="mceTop">
13
+ <div class="mceLeft"></div>
14
+ <div class="mceCenter"></div>
15
+ <div class="mceRight"></div>
16
+ <span>Blured</span>
17
+ </div>
18
+
19
+ <div class="mceMiddle">
20
+ <div class="mceLeft"></div>
21
+ <span>Content</span>
22
+ <div class="mceRight"></div>
23
+ </div>
24
+
25
+ <div class="mceBottom">
26
+ <div class="mceLeft"></div>
27
+ <div class="mceCenter"></div>
28
+ <div class="mceRight"></div>
29
+ <span>Statusbar text.</span>
30
+ </div>
31
+
32
+ <a class="mceMove" href="#"></a>
33
+ <a class="mceMin" href="#"></a>
34
+ <a class="mceMax" href="#"></a>
35
+ <a class="mceMed" href="#"></a>
36
+ <a class="mceClose" href="#"></a>
37
+ <a class="mceResize mceResizeN" href="#"></a>
38
+ <a class="mceResize mceResizeS" href="#"></a>
39
+ <a class="mceResize mceResizeW" href="#"></a>
40
+ <a class="mceResize mceResizeE" href="#"></a>
41
+ <a class="mceResize mceResizeNW" href="#"></a>
42
+ <a class="mceResize mceResizeNE" href="#"></a>
43
+ <a class="mceResize mceResizeSW" href="#"></a>
44
+ <a class="mceResize mceResizeSE" href="#"></a>
45
+ </div>
46
+ </div>
47
+
48
+ <div class="clearlooks2" style="width:400px; height:100px; left:420px;">
49
+ <div class="mceWrapper mceMovable mceFocus">
50
+ <div class="mceTop">
51
+ <div class="mceLeft"></div>
52
+ <div class="mceCenter"></div>
53
+ <div class="mceRight"></div>
54
+ <span>Focused</span>
55
+ </div>
56
+
57
+ <div class="mceMiddle">
58
+ <div class="mceLeft"></div>
59
+ <span>Content</span>
60
+ <div class="mceRight"></div>
61
+ </div>
62
+
63
+ <div class="mceBottom">
64
+ <div class="mceLeft"></div>
65
+ <div class="mceCenter"></div>
66
+ <div class="mceRight"></div>
67
+ <span>Statusbar text.</span>
68
+ </div>
69
+
70
+ <a class="mceMove" href="#"></a>
71
+ <a class="mceMin" href="#"></a>
72
+ <a class="mceMax" href="#"></a>
73
+ <a class="mceMed" href="#"></a>
74
+ <a class="mceClose" href="#"></a>
75
+ <a class="mceResize mceResizeN" href="#"></a>
76
+ <a class="mceResize mceResizeS" href="#"></a>
77
+ <a class="mceResize mceResizeW" href="#"></a>
78
+ <a class="mceResize mceResizeE" href="#"></a>
79
+ <a class="mceResize mceResizeNW" href="#"></a>
80
+ <a class="mceResize mceResizeNE" href="#"></a>
81
+ <a class="mceResize mceResizeSW" href="#"></a>
82
+ <a class="mceResize mceResizeSE" href="#"></a>
83
+ </div>
84
+ </div>
85
+
86
+ <div class="clearlooks2" style="width:400px; height:100px; left:10px; top:120px;">
87
+ <div class="mceWrapper mceMovable mceFocus mceStatusbar">
88
+ <div class="mceTop">
89
+ <div class="mceLeft"></div>
90
+ <div class="mceCenter"></div>
91
+ <div class="mceRight"></div>
92
+ <span>Statusbar</span>
93
+ </div>
94
+
95
+ <div class="mceMiddle">
96
+ <div class="mceLeft"></div>
97
+ <span>Content</span>
98
+ <div class="mceRight"></div>
99
+ </div>
100
+
101
+ <div class="mceBottom">
102
+ <div class="mceLeft"></div>
103
+ <div class="mceCenter"></div>
104
+ <div class="mceRight"></div>
105
+ <span>Statusbar text.</span>
106
+ </div>
107
+
108
+ <a class="mceMove" href="#"></a>
109
+ <a class="mceMin" href="#"></a>
110
+ <a class="mceMax" href="#"></a>
111
+ <a class="mceMed" href="#"></a>
112
+ <a class="mceClose" href="#"></a>
113
+ <a class="mceResize mceResizeN" href="#"></a>
114
+ <a class="mceResize mceResizeS" href="#"></a>
115
+ <a class="mceResize mceResizeW" href="#"></a>
116
+ <a class="mceResize mceResizeE" href="#"></a>
117
+ <a class="mceResize mceResizeNW" href="#"></a>
118
+ <a class="mceResize mceResizeNE" href="#"></a>
119
+ <a class="mceResize mceResizeSW" href="#"></a>
120
+ <a class="mceResize mceResizeSE" href="#"></a>
121
+ </div>
122
+ </div>
123
+
124
+ <div class="clearlooks2" style="width:400px; height:100px; left:420px; top:120px;">
125
+ <div class="mceWrapper mceMovable mceFocus mceStatusbar mceResizable">
126
+ <div class="mceTop">
127
+ <div class="mceLeft"></div>
128
+ <div class="mceCenter"></div>
129
+ <div class="mceRight"></div>
130
+ <span>Statusbar, Resizable</span>
131
+ </div>
132
+
133
+ <div class="mceMiddle">
134
+ <div class="mceLeft"></div>
135
+ <span>Content</span>
136
+ <div class="mceRight"></div>
137
+ </div>
138
+
139
+ <div class="mceBottom">
140
+ <div class="mceLeft"></div>
141
+ <div class="mceCenter"></div>
142
+ <div class="mceRight"></div>
143
+ <span>Statusbar text.</span>
144
+ </div>
145
+
146
+ <a class="mceMove" href="#"></a>
147
+ <a class="mceMin" href="#"></a>
148
+ <a class="mceMax" href="#"></a>
149
+ <a class="mceMed" href="#"></a>
150
+ <a class="mceClose" href="#"></a>
151
+ <a class="mceResize mceResizeN" href="#"></a>
152
+ <a class="mceResize mceResizeS" href="#"></a>
153
+ <a class="mceResize mceResizeW" href="#"></a>
154
+ <a class="mceResize mceResizeE" href="#"></a>
155
+ <a class="mceResize mceResizeNW" href="#"></a>
156
+ <a class="mceResize mceResizeNE" href="#"></a>
157
+ <a class="mceResize mceResizeSW" href="#"></a>
158
+ <a class="mceResize mceResizeSE" href="#"></a>
159
+ </div>
160
+ </div>
161
+
162
+ <div class="clearlooks2" style="width:400px; height:100px; left:10px; top:230px;">
163
+ <div class="mceWrapper mceMovable mceFocus mceResizable mceMaximizable">
164
+ <div class="mceTop">
165
+ <div class="mceLeft"></div>
166
+ <div class="mceCenter"></div>
167
+ <div class="mceRight"></div>
168
+ <span>Resizable, Maximizable</span>
169
+ </div>
170
+
171
+ <div class="mceMiddle">
172
+ <div class="mceLeft"></div>
173
+ <span>Content</span>
174
+ <div class="mceRight"></div>
175
+ </div>
176
+
177
+ <div class="mceBottom">
178
+ <div class="mceLeft"></div>
179
+ <div class="mceCenter"></div>
180
+ <div class="mceRight"></div>
181
+ <span>Statusbar text.</span>
182
+ </div>
183
+
184
+ <a class="mceMove" href="#"></a>
185
+ <a class="mceMin" href="#"></a>
186
+ <a class="mceMax" href="#"></a>
187
+ <a class="mceMed" href="#"></a>
188
+ <a class="mceClose" href="#"></a>
189
+ <a class="mceResize mceResizeN" href="#"></a>
190
+ <a class="mceResize mceResizeS" href="#"></a>
191
+ <a class="mceResize mceResizeW" href="#"></a>
192
+ <a class="mceResize mceResizeE" href="#"></a>
193
+ <a class="mceResize mceResizeNW" href="#"></a>
194
+ <a class="mceResize mceResizeNE" href="#"></a>
195
+ <a class="mceResize mceResizeSW" href="#"></a>
196
+ <a class="mceResize mceResizeSE" href="#"></a>
197
+ </div>
198
+ </div>
199
+
200
+ <div class="clearlooks2" style="width:400px; height:100px; left:420px; top:230px;">
201
+ <div class="mceWrapper mceMovable mceStatusbar mceResizable mceMaximizable">
202
+ <div class="mceTop">
203
+ <div class="mceLeft"></div>
204
+ <div class="mceCenter"></div>
205
+ <div class="mceRight"></div>
206
+ <span>Blurred, Maximizable, Statusbar, Resizable</span>
207
+ </div>
208
+
209
+ <div class="mceMiddle">
210
+ <div class="mceLeft"></div>
211
+ <span>Content</span>
212
+ <div class="mceRight"></div>
213
+ </div>
214
+
215
+ <div class="mceBottom">
216
+ <div class="mceLeft"></div>
217
+ <div class="mceCenter"></div>
218
+ <div class="mceRight"></div>
219
+ <span>Statusbar text.</span>
220
+ </div>
221
+
222
+ <a class="mceMove" href="#"></a>
223
+ <a class="mceMin" href="#"></a>
224
+ <a class="mceMax" href="#"></a>
225
+ <a class="mceMed" href="#"></a>
226
+ <a class="mceClose" href="#"></a>
227
+ <a class="mceResize mceResizeN" href="#"></a>
228
+ <a class="mceResize mceResizeS" href="#"></a>
229
+ <a class="mceResize mceResizeW" href="#"></a>
230
+ <a class="mceResize mceResizeE" href="#"></a>
231
+ <a class="mceResize mceResizeNW" href="#"></a>
232
+ <a class="mceResize mceResizeNE" href="#"></a>
233
+ <a class="mceResize mceResizeSW" href="#"></a>
234
+ <a class="mceResize mceResizeSE" href="#"></a>
235
+ </div>
236
+ </div>
237
+
238
+ <div class="clearlooks2" style="width:400px; height:100px; left:10px; top:340px;">
239
+ <div class="mceWrapper mceMovable mceFocus mceResizable mceMaximized mceMinimizable mceMaximizable">
240
+ <div class="mceTop">
241
+ <div class="mceLeft"></div>
242
+ <div class="mceCenter"></div>
243
+ <div class="mceRight"></div>
244
+ <span>Maximized, Maximizable, Minimizable</span>
245
+ </div>
246
+
247
+ <div class="mceMiddle">
248
+ <div class="mceLeft"></div>
249
+ <span>Content</span>
250
+ <div class="mceRight"></div>
251
+ </div>
252
+
253
+ <div class="mceBottom">
254
+ <div class="mceLeft"></div>
255
+ <div class="mceCenter"></div>
256
+ <div class="mceRight"></div>
257
+ <span>Statusbar text.</span>
258
+ </div>
259
+
260
+ <a class="mceMove" href="#"></a>
261
+ <a class="mceMin" href="#"></a>
262
+ <a class="mceMax" href="#"></a>
263
+ <a class="mceMed" href="#"></a>
264
+ <a class="mceClose" href="#"></a>
265
+ <a class="mceResize mceResizeN" href="#"></a>
266
+ <a class="mceResize mceResizeS" href="#"></a>
267
+ <a class="mceResize mceResizeW" href="#"></a>
268
+ <a class="mceResize mceResizeE" href="#"></a>
269
+ <a class="mceResize mceResizeNW" href="#"></a>
270
+ <a class="mceResize mceResizeNE" href="#"></a>
271
+ <a class="mceResize mceResizeSW" href="#"></a>
272
+ <a class="mceResize mceResizeSE" href="#"></a>
273
+ </div>
274
+ </div>
275
+
276
+ <div class="clearlooks2" style="width:400px; height:100px; left:420px; top:340px;">
277
+ <div class="mceWrapper mceMovable mceStatusbar mceResizable mceMaximized mceMinimizable mceMaximizable">
278
+ <div class="mceTop">
279
+ <div class="mceLeft"></div>
280
+ <div class="mceCenter"></div>
281
+ <div class="mceRight"></div>
282
+ <span>Blured</span>
283
+ </div>
284
+
285
+ <div class="mceMiddle">
286
+ <div class="mceLeft"></div>
287
+ <span>Content</span>
288
+ <div class="mceRight"></div>
289
+ </div>
290
+
291
+ <div class="mceBottom">
292
+ <div class="mceLeft"></div>
293
+ <div class="mceCenter"></div>
294
+ <div class="mceRight"></div>
295
+ <span>Statusbar text.</span>
296
+ </div>
297
+
298
+ <a class="mceMove" href="#"></a>
299
+ <a class="mceMin" href="#"></a>
300
+ <a class="mceMax" href="#"></a>
301
+ <a class="mceMed" href="#"></a>
302
+ <a class="mceClose" href="#"></a>
303
+ <a class="mceResize mceResizeN" href="#"></a>
304
+ <a class="mceResize mceResizeS" href="#"></a>
305
+ <a class="mceResize mceResizeW" href="#"></a>
306
+ <a class="mceResize mceResizeE" href="#"></a>
307
+ <a class="mceResize mceResizeNW" href="#"></a>
308
+ <a class="mceResize mceResizeNE" href="#"></a>
309
+ <a class="mceResize mceResizeSW" href="#"></a>
310
+ <a class="mceResize mceResizeSE" href="#"></a>
311
+ </div>
312
+ </div>
313
+
314
+ <div class="clearlooks2" style="width:400px; height:130px; left:10px; top:450px;">
315
+ <div class="mceWrapper mceMovable mceFocus mceModal mceAlert">
316
+ <div class="mceTop">
317
+ <div class="mceLeft"></div>
318
+ <div class="mceCenter"></div>
319
+ <div class="mceRight"></div>
320
+ <span>Alert</span>
321
+ </div>
322
+
323
+ <div class="mceMiddle">
324
+ <div class="mceLeft"></div>
325
+ <span>
326
+ This is a very long error message. This is a very long error message.
327
+ This is a very long error message. This is a very long error message.
328
+ This is a very long error message. This is a very long error message.
329
+ This is a very long error message. This is a very long error message.
330
+ This is a very long error message. This is a very long error message.
331
+ This is a very long error message. This is a very long error message.
332
+ </span>
333
+ <div class="mceRight"></div>
334
+ <div class="mceIcon"></div>
335
+ </div>
336
+
337
+ <div class="mceBottom">
338
+ <div class="mceLeft"></div>
339
+ <div class="mceCenter"></div>
340
+ <div class="mceRight"></div>
341
+ </div>
342
+
343
+ <a class="mceMove" href="#"></a>
344
+ <a class="mceButton mceOk" href="#">Ok</a>
345
+ <a class="mceClose" href="#"></a>
346
+ </div>
347
+ </div>
348
+
349
+ <div class="clearlooks2" style="width:400px; height:130px; left:420px; top:450px;">
350
+ <div class="mceWrapper mceMovable mceFocus mceModal mceConfirm">
351
+ <div class="mceTop">
352
+ <div class="mceLeft"></div>
353
+ <div class="mceCenter"></div>
354
+ <div class="mceRight"></div>
355
+ <span>Confirm</span>
356
+ </div>
357
+
358
+ <div class="mceMiddle">
359
+ <div class="mceLeft"></div>
360
+ <span>
361
+ This is a very long error message. This is a very long error message.
362
+ This is a very long error message. This is a very long error message.
363
+ This is a very long error message. This is a very long error message.
364
+ This is a very long error message. This is a very long error message.
365
+ This is a very long error message. This is a very long error message.
366
+ This is a very long error message. This is a very long error message.
367
+ </span>
368
+ <div class="mceRight"></div>
369
+ <div class="mceIcon"></div>
370
+ </div>
371
+
372
+ <div class="mceBottom">
373
+ <div class="mceLeft"></div>
374
+ <div class="mceCenter"></div>
375
+ <div class="mceRight"></div>
376
+ </div>
377
+
378
+ <a class="mceMove" href="#"></a>
379
+ <a class="mceButton mceOk" href="#">Ok</a>
380
+ <a class="mceButton mceCancel" href="#">Cancel</a>
381
+ <a class="mceClose" href="#"></a>
382
+ </div>
383
+ </div>
384
+ </div>
385
+
386
+ </body>
387
+ </html>
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/media/css/media.css CHANGED
@@ -1,17 +1,17 @@
1
- #id, #name, #hspace, #vspace, #class_name, #align { width: 100px }
2
- #hspace, #vspace { width: 50px }
3
- #flash_quality, #flash_align, #flash_scale, #flash_salign, #flash_wmode { width: 100px }
4
- #flash_base, #flash_flashvars, #html5_altsource1, #html5_altsource2, #html5_poster { width: 240px }
5
- #width, #height { width: 40px }
6
- #src, #media_type { width: 250px }
7
- #class { width: 120px }
8
- #prev { margin: 0; border: 1px solid black; width: 380px; height: 260px; overflow: auto }
9
- .panel_wrapper div.current { height: 420px; overflow: auto }
10
- #flash_options, #shockwave_options, #qt_options, #wmp_options, #rmp_options { display: none }
11
- .mceAddSelectValue { background-color: #DDDDDD }
12
- #qt_starttime, #qt_endtime, #qt_fov, #qt_href, #qt_moveid, #qt_moviename, #qt_node, #qt_pan, #qt_qtsrc, #qt_qtsrcchokespeed, #qt_target, #qt_tilt, #qt_urlsubstituten, #qt_volume { width: 70px }
13
- #wmp_balance, #wmp_baseurl, #wmp_captioningid, #wmp_currentmarker, #wmp_currentposition, #wmp_defaultframe, #wmp_playcount, #wmp_rate, #wmp_uimode, #wmp_volume { width: 70px }
14
- #rmp_console, #rmp_numloop, #rmp_controls, #rmp_scriptcallbacks { width: 70px }
15
- #shockwave_swvolume, #shockwave_swframe, #shockwave_swurl, #shockwave_swstretchvalign, #shockwave_swstretchhalign, #shockwave_swstretchstyle { width: 90px }
16
- #qt_qtsrc { width: 200px }
17
- iframe {border: 1px solid gray}
1
+ #id, #name, #hspace, #vspace, #class_name, #align { width: 100px }
2
+ #hspace, #vspace { width: 50px }
3
+ #flash_quality, #flash_align, #flash_scale, #flash_salign, #flash_wmode { width: 100px }
4
+ #flash_base, #flash_flashvars, #html5_altsource1, #html5_altsource2, #html5_poster { width: 240px }
5
+ #width, #height { width: 40px }
6
+ #src, #media_type { width: 250px }
7
+ #class { width: 120px }
8
+ #prev { margin: 0; border: 1px solid black; width: 380px; height: 260px; overflow: auto }
9
+ .panel_wrapper div.current { height: 420px; overflow: auto }
10
+ #flash_options, #shockwave_options, #qt_options, #wmp_options, #rmp_options { display: none }
11
+ .mceAddSelectValue { background-color: #DDDDDD }
12
+ #qt_starttime, #qt_endtime, #qt_fov, #qt_href, #qt_moveid, #qt_moviename, #qt_node, #qt_pan, #qt_qtsrc, #qt_qtsrcchokespeed, #qt_target, #qt_tilt, #qt_urlsubstituten, #qt_volume { width: 70px }
13
+ #wmp_balance, #wmp_baseurl, #wmp_captioningid, #wmp_currentmarker, #wmp_currentposition, #wmp_defaultframe, #wmp_playcount, #wmp_rate, #wmp_uimode, #wmp_volume { width: 70px }
14
+ #rmp_console, #rmp_numloop, #rmp_controls, #rmp_scriptcallbacks { width: 70px }
15
+ #shockwave_swvolume, #shockwave_swframe, #shockwave_swurl, #shockwave_swstretchvalign, #shockwave_swstretchhalign, #shockwave_swstretchstyle { width: 90px }
16
+ #qt_qtsrc { width: 200px }
17
+ iframe {border: 1px solid gray}
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/media/editor_plugin_src.js CHANGED
@@ -1,898 +1,898 @@
1
- /**
2
- * editor_plugin_src.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() {
12
- var rootAttributes = tinymce.explode('id,name,width,height,style,align,class,hspace,vspace,bgcolor,type'), excludedAttrs = tinymce.makeMap(rootAttributes.join(',')), Node = tinymce.html.Node,
13
- mediaTypes, scriptRegExp, JSON = tinymce.util.JSON, mimeTypes;
14
-
15
- // Media types supported by this plugin
16
- mediaTypes = [
17
- // Type, clsid:s, mime types, codebase
18
- ["Flash", "d27cdb6e-ae6d-11cf-96b8-444553540000", "application/x-shockwave-flash", "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],
19
- ["ShockWave", "166b1bca-3f9c-11cf-8075-444553540000", "application/x-director", "http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0"],
20
- ["WindowsMedia", "6bf52a52-394a-11d3-b153-00c04f79faa6,22d6f312-b0f6-11d0-94ab-0080c74c7e95,05589fa1-c356-11ce-bf01-00aa0055595a", "application/x-mplayer2", "http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"],
21
- ["QuickTime", "02bf25d5-8c17-4b23-bc80-d3488abddc6b", "video/quicktime", "http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"],
22
- ["RealMedia", "cfcdaa03-8be4-11cf-b84b-0020afbbccfa", "audio/x-pn-realaudio-plugin", "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],
23
- ["Java", "8ad9c840-044e-11d1-b3e9-00805f499d93", "application/x-java-applet", "http://java.sun.com/products/plugin/autodl/jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0"],
24
- ["Silverlight", "dfeaf541-f3e1-4c24-acac-99c30715084a", "application/x-silverlight-2"],
25
- ["Iframe"],
26
- ["Video"],
27
- ["EmbeddedAudio"],
28
- ["Audio"]
29
- ];
30
-
31
- function normalizeSize(size) {
32
- return typeof(size) == "string" ? size.replace(/[^0-9%]/g, '') : size;
33
- }
34
-
35
- function toArray(obj) {
36
- var undef, out, i;
37
-
38
- if (obj && !obj.splice) {
39
- out = [];
40
-
41
- for (i = 0; true; i++) {
42
- if (obj[i])
43
- out[i] = obj[i];
44
- else
45
- break;
46
- }
47
-
48
- return out;
49
- }
50
-
51
- return obj;
52
- };
53
-
54
- tinymce.create('tinymce.plugins.MediaPlugin', {
55
- init : function(ed, url) {
56
- var self = this, lookup = {}, i, y, item, name;
57
-
58
- function isMediaImg(node) {
59
- return node && node.nodeName === 'IMG' && ed.dom.hasClass(node, 'mceItemMedia');
60
- };
61
-
62
- self.editor = ed;
63
- self.url = url;
64
-
65
- // Parse media types into a lookup table
66
- scriptRegExp = '';
67
- for (i = 0; i < mediaTypes.length; i++) {
68
- name = mediaTypes[i][0];
69
-
70
- item = {
71
- name : name,
72
- clsids : tinymce.explode(mediaTypes[i][1] || ''),
73
- mimes : tinymce.explode(mediaTypes[i][2] || ''),
74
- codebase : mediaTypes[i][3]
75
- };
76
-
77
- for (y = 0; y < item.clsids.length; y++)
78
- lookup['clsid:' + item.clsids[y]] = item;
79
-
80
- for (y = 0; y < item.mimes.length; y++)
81
- lookup[item.mimes[y]] = item;
82
-
83
- lookup['mceItem' + name] = item;
84
- lookup[name.toLowerCase()] = item;
85
-
86
- scriptRegExp += (scriptRegExp ? '|' : '') + name;
87
- }
88
-
89
- // Handle the media_types setting
90
- tinymce.each(ed.getParam("media_types",
91
- "video=mp4,m4v,ogv,webm;" +
92
- "silverlight=xap;" +
93
- "flash=swf,flv;" +
94
- "shockwave=dcr;" +
95
- "quicktime=mov,qt,mpg,mpeg;" +
96
- "shockwave=dcr;" +
97
- "windowsmedia=avi,wmv,wm,asf,asx,wmx,wvx;" +
98
- "realmedia=rm,ra,ram;" +
99
- "java=jar;" +
100
- "audio=mp3,ogg"
101
- ).split(';'), function(item) {
102
- var i, extensions, type;
103
-
104
- item = item.split(/=/);
105
- extensions = tinymce.explode(item[1].toLowerCase());
106
- for (i = 0; i < extensions.length; i++) {
107
- type = lookup[item[0].toLowerCase()];
108
-
109
- if (type)
110
- lookup[extensions[i]] = type;
111
- }
112
- });
113
-
114
- scriptRegExp = new RegExp('write(' + scriptRegExp + ')\\(([^)]+)\\)');
115
- self.lookup = lookup;
116
-
117
- ed.onPreInit.add(function() {
118
- // Allow video elements
119
- ed.schema.addValidElements('object[id|style|width|height|classid|codebase|*],param[name|value],embed[id|style|width|height|type|src|*],video[*],audio[*],source[*]');
120
-
121
- // Convert video elements to image placeholder
122
- ed.parser.addNodeFilter('object,embed,video,audio,script,iframe', function(nodes) {
123
- var i = nodes.length;
124
-
125
- while (i--)
126
- self.objectToImg(nodes[i]);
127
- });
128
-
129
- // Convert image placeholders to video elements
130
- ed.serializer.addNodeFilter('img', function(nodes, name, args) {
131
- var i = nodes.length, node;
132
-
133
- while (i--) {
134
- node = nodes[i];
135
- if ((node.attr('class') || '').indexOf('mceItemMedia') !== -1)
136
- self.imgToObject(node, args);
137
- }
138
- });
139
- });
140
-
141
- ed.onInit.add(function() {
142
- // Display "media" instead of "img" in element path
143
- if (ed.theme && ed.theme.onResolveName) {
144
- ed.theme.onResolveName.add(function(theme, path_object) {
145
- if (path_object.name === 'img' && ed.dom.hasClass(path_object.node, 'mceItemMedia'))
146
- path_object.name = 'media';
147
- });
148
- }
149
-
150
- // Add contect menu if it's loaded
151
- if (ed && ed.plugins.contextmenu) {
152
- ed.plugins.contextmenu.onContextMenu.add(function(plugin, menu, element) {
153
- if (element.nodeName === 'IMG' && element.className.indexOf('mceItemMedia') !== -1)
154
- menu.add({title : 'media.edit', icon : 'media', cmd : 'mceMedia'});
155
- });
156
- }
157
- });
158
-
159
- // Register commands
160
- ed.addCommand('mceMedia', function() {
161
- var data, img;
162
-
163
- img = ed.selection.getNode();
164
- if (isMediaImg(img)) {
165
- data = ed.dom.getAttrib(img, 'data-mce-json');
166
- if (data) {
167
- data = JSON.parse(data);
168
-
169
- // Add some extra properties to the data object
170
- tinymce.each(rootAttributes, function(name) {
171
- var value = ed.dom.getAttrib(img, name);
172
-
173
- if (value)
174
- data[name] = value;
175
- });
176
-
177
- data.type = self.getType(img.className).name.toLowerCase();
178
- }
179
- }
180
-
181
- if (!data) {
182
- data = {
183
- type : 'flash',
184
- video: {sources:[]},
185
- params: {}
186
- };
187
- }
188
-
189
- ed.windowManager.open({
190
- file : url + '/media.htm',
191
- width : 430 + parseInt(ed.getLang('media.delta_width', 0)),
192
- height : 500 + parseInt(ed.getLang('media.delta_height', 0)),
193
- inline : 1
194
- }, {
195
- plugin_url : url,
196
- data : data
197
- });
198
- });
199
-
200
- // Register buttons
201
- ed.addButton('media', {title : 'media.desc', cmd : 'mceMedia'});
202
-
203
- // Update media selection status
204
- ed.onNodeChange.add(function(ed, cm, node) {
205
- cm.setActive('media', isMediaImg(node));
206
- });
207
- },
208
-
209
- convertUrl : function(url, force_absolute) {
210
- var self = this, editor = self.editor, settings = editor.settings,
211
- urlConverter = settings.url_converter,
212
- urlConverterScope = settings.url_converter_scope || self;
213
-
214
- if (!url)
215
- return url;
216
-
217
- if (force_absolute)
218
- return editor.documentBaseURI.toAbsolute(url);
219
-
220
- return urlConverter.call(urlConverterScope, url, 'src', 'object');
221
- },
222
-
223
- getInfo : function() {
224
- return {
225
- longname : 'Media',
226
- author : 'Moxiecode Systems AB',
227
- authorurl : 'http://tinymce.moxiecode.com',
228
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media',
229
- version : tinymce.majorVersion + "." + tinymce.minorVersion
230
- };
231
- },
232
-
233
- /**
234
- * Converts the JSON data object to an img node.
235
- */
236
- dataToImg : function(data, force_absolute) {
237
- var self = this, editor = self.editor, baseUri = editor.documentBaseURI, sources, attrs, img, i;
238
-
239
- data.params.src = self.convertUrl(data.params.src, force_absolute);
240
-
241
- attrs = data.video.attrs;
242
- if (attrs)
243
- attrs.src = self.convertUrl(attrs.src, force_absolute);
244
-
245
- if (attrs)
246
- attrs.poster = self.convertUrl(attrs.poster, force_absolute);
247
-
248
- sources = toArray(data.video.sources);
249
- if (sources) {
250
- for (i = 0; i < sources.length; i++)
251
- sources[i].src = self.convertUrl(sources[i].src, force_absolute);
252
- }
253
-
254
- img = self.editor.dom.create('img', {
255
- id : data.id,
256
- style : data.style,
257
- align : data.align,
258
- hspace : data.hspace,
259
- vspace : data.vspace,
260
- src : self.editor.theme.url + '/img/trans.gif',
261
- 'class' : 'mceItemMedia mceItem' + self.getType(data.type).name,
262
- 'data-mce-json' : JSON.serialize(data, "'")
263
- });
264
-
265
- img.width = data.width = normalizeSize(data.width || (data.type == 'audio' ? "300" : "320"));
266
- img.height = data.height = normalizeSize(data.height || (data.type == 'audio' ? "32" : "240"));
267
-
268
- return img;
269
- },
270
-
271
- /**
272
- * Converts the JSON data object to a HTML string.
273
- */
274
- dataToHtml : function(data, force_absolute) {
275
- return this.editor.serializer.serialize(this.dataToImg(data, force_absolute), {forced_root_block : '', force_absolute : force_absolute});
276
- },
277
-
278
- /**
279
- * Converts the JSON data object to a HTML string.
280
- */
281
- htmlToData : function(html) {
282
- var fragment, img, data;
283
-
284
- data = {
285
- type : 'flash',
286
- video: {sources:[]},
287
- params: {}
288
- };
289
-
290
- fragment = this.editor.parser.parse(html);
291
- img = fragment.getAll('img')[0];
292
-
293
- if (img) {
294
- data = JSON.parse(img.attr('data-mce-json'));
295
- data.type = this.getType(img.attr('class')).name.toLowerCase();
296
-
297
- // Add some extra properties to the data object
298
- tinymce.each(rootAttributes, function(name) {
299
- var value = img.attr(name);
300
-
301
- if (value)
302
- data[name] = value;
303
- });
304
- }
305
-
306
- return data;
307
- },
308
-
309
- /**
310
- * Get type item by extension, class, clsid or mime type.
311
- *
312
- * @method getType
313
- * @param {String} value Value to get type item by.
314
- * @return {Object} Type item object or undefined.
315
- */
316
- getType : function(value) {
317
- var i, values, typeItem;
318
-
319
- // Find type by checking the classes
320
- values = tinymce.explode(value, ' ');
321
- for (i = 0; i < values.length; i++) {
322
- typeItem = this.lookup[values[i]];
323
-
324
- if (typeItem)
325
- return typeItem;
326
- }
327
- },
328
-
329
- /**
330
- * Converts a tinymce.html.Node image element to video/object/embed.
331
- */
332
- imgToObject : function(node, args) {
333
- var self = this, editor = self.editor, video, object, embed, iframe, name, value, data,
334
- source, sources, params, param, typeItem, i, item, mp4Source, replacement,
335
- posterSrc, style, audio;
336
-
337
- // Adds the flash player
338
- function addPlayer(video_src, poster_src) {
339
- var baseUri, flashVars, flashVarsOutput, params, flashPlayer;
340
-
341
- flashPlayer = editor.getParam('flash_video_player_url', self.convertUrl(self.url + '/moxieplayer.swf'));
342
- if (flashPlayer) {
343
- baseUri = editor.documentBaseURI;
344
- data.params.src = flashPlayer;
345
-
346
- // Convert the movie url to absolute urls
347
- if (editor.getParam('flash_video_player_absvideourl', true)) {
348
- video_src = baseUri.toAbsolute(video_src || '', true);
349
- poster_src = baseUri.toAbsolute(poster_src || '', true);
350
- }
351
-
352
- // Generate flash vars
353
- flashVarsOutput = '';
354
- flashVars = editor.getParam('flash_video_player_flashvars', {url : '$url', poster : '$poster'});
355
- tinymce.each(flashVars, function(value, name) {
356
- // Replace $url and $poster variables in flashvars value
357
- value = value.replace(/\$url/, video_src || '');
358
- value = value.replace(/\$poster/, poster_src || '');
359
-
360
- if (value.length > 0)
361
- flashVarsOutput += (flashVarsOutput ? '&' : '') + name + '=' + escape(value);
362
- });
363
-
364
- if (flashVarsOutput.length)
365
- data.params.flashvars = flashVarsOutput;
366
-
367
- params = editor.getParam('flash_video_player_params', {
368
- allowfullscreen: true,
369
- allowscriptaccess: true
370
- });
371
-
372
- tinymce.each(params, function(value, name) {
373
- data.params[name] = "" + value;
374
- });
375
- }
376
- };
377
-
378
- data = node.attr('data-mce-json');
379
- if (!data)
380
- return;
381
-
382
- data = JSON.parse(data);
383
- typeItem = this.getType(node.attr('class'));
384
-
385
- style = node.attr('data-mce-style')
386
- if (!style) {
387
- style = node.attr('style');
388
-
389
- if (style)
390
- style = editor.dom.serializeStyle(editor.dom.parseStyle(style, 'img'));
391
- }
392
-
393
- // Use node width/height to override the data width/height when the placeholder is resized
394
- data.width = node.attr('width') || data.width;
395
- data.height = node.attr('height') || data.height;
396
-
397
- // Handle iframe
398
- if (typeItem.name === 'Iframe') {
399
- replacement = new Node('iframe', 1);
400
-
401
- tinymce.each(rootAttributes, function(name) {
402
- var value = node.attr(name);
403
-
404
- if (name == 'class' && value)
405
- value = value.replace(/mceItem.+ ?/g, '');
406
-
407
- if (value && value.length > 0)
408
- replacement.attr(name, value);
409
- });
410
-
411
- for (name in data.params)
412
- replacement.attr(name, data.params[name]);
413
-
414
- replacement.attr({
415
- style: style,
416
- src: data.params.src
417
- });
418
-
419
- node.replace(replacement);
420
-
421
- return;
422
- }
423
-
424
- // Handle scripts
425
- if (this.editor.settings.media_use_script) {
426
- replacement = new Node('script', 1).attr('type', 'text/javascript');
427
-
428
- value = new Node('#text', 3);
429
- value.value = 'write' + typeItem.name + '(' + JSON.serialize(tinymce.extend(data.params, {
430
- width: node.attr('width'),
431
- height: node.attr('height')
432
- })) + ');';
433
-
434
- replacement.append(value);
435
- node.replace(replacement);
436
-
437
- return;
438
- }
439
-
440
- // Add HTML5 video element
441
- if (typeItem.name === 'Video' && data.video.sources[0]) {
442
- // Create new object element
443
- video = new Node('video', 1).attr(tinymce.extend({
444
- id : node.attr('id'),
445
- width: normalizeSize(node.attr('width')),
446
- height: normalizeSize(node.attr('height')),
447
- style : style
448
- }, data.video.attrs));
449
-
450
- // Get poster source and use that for flash fallback
451
- if (data.video.attrs)
452
- posterSrc = data.video.attrs.poster;
453
-
454
- sources = data.video.sources = toArray(data.video.sources);
455
- for (i = 0; i < sources.length; i++) {
456
- if (/\.mp4$/.test(sources[i].src))
457
- mp4Source = sources[i].src;
458
- }
459
-
460
- if (!sources[0].type) {
461
- video.attr('src', sources[0].src);
462
- sources.splice(0, 1);
463
- }
464
-
465
- for (i = 0; i < sources.length; i++) {
466
- source = new Node('source', 1).attr(sources[i]);
467
- source.shortEnded = true;
468
- video.append(source);
469
- }
470
-
471
- // Create flash fallback for video if we have a mp4 source
472
- if (mp4Source) {
473
- addPlayer(mp4Source, posterSrc);
474
- typeItem = self.getType('flash');
475
- } else
476
- data.params.src = '';
477
- }
478
-
479
- // Add HTML5 audio element
480
- if (typeItem.name === 'Audio' && data.video.sources[0]) {
481
- // Create new object element
482
- audio = new Node('audio', 1).attr(tinymce.extend({
483
- id : node.attr('id'),
484
- width: normalizeSize(node.attr('width')),
485
- height: normalizeSize(node.attr('height')),
486
- style : style
487
- }, data.video.attrs));
488
-
489
- // Get poster source and use that for flash fallback
490
- if (data.video.attrs)
491
- posterSrc = data.video.attrs.poster;
492
-
493
- sources = data.video.sources = toArray(data.video.sources);
494
- if (!sources[0].type) {
495
- audio.attr('src', sources[0].src);
496
- sources.splice(0, 1);
497
- }
498
-
499
- for (i = 0; i < sources.length; i++) {
500
- source = new Node('source', 1).attr(sources[i]);
501
- source.shortEnded = true;
502
- audio.append(source);
503
- }
504
-
505
- data.params.src = '';
506
- }
507
-
508
- if (typeItem.name === 'EmbeddedAudio') {
509
- embed = new Node('embed', 1);
510
- embed.shortEnded = true;
511
- embed.attr({
512
- id: node.attr('id'),
513
- width: normalizeSize(node.attr('width')),
514
- height: normalizeSize(node.attr('height')),
515
- style : style,
516
- type: node.attr('type')
517
- });
518
-
519
- for (name in data.params)
520
- embed.attr(name, data.params[name]);
521
-
522
- tinymce.each(rootAttributes, function(name) {
523
- if (data[name] && name != 'type')
524
- embed.attr(name, data[name]);
525
- });
526
-
527
- data.params.src = '';
528
- }
529
-
530
- // Do we have a params src then we can generate object
531
- if (data.params.src) {
532
- // Is flv movie add player for it
533
- if (/\.flv$/i.test(data.params.src))
534
- addPlayer(data.params.src, '');
535
-
536
- if (args && args.force_absolute)
537
- data.params.src = editor.documentBaseURI.toAbsolute(data.params.src);
538
-
539
- // Create new object element
540
- object = new Node('object', 1).attr({
541
- id : node.attr('id'),
542
- width: normalizeSize(node.attr('width')),
543
- height: normalizeSize(node.attr('height')),
544
- style : style
545
- });
546
-
547
- tinymce.each(rootAttributes, function(name) {
548
- var value = data[name];
549
-
550
- if (name == 'class' && value)
551
- value = value.replace(/mceItem.+ ?/g, '');
552
-
553
- if (value && name != 'type')
554
- object.attr(name, value);
555
- });
556
-
557
- // Add params
558
- for (name in data.params) {
559
- param = new Node('param', 1);
560
- param.shortEnded = true;
561
- value = data.params[name];
562
-
563
- // Windows media needs to use url instead of src for the media URL
564
- if (name === 'src' && typeItem.name === 'WindowsMedia')
565
- name = 'url';
566
-
567
- param.attr({name: name, value: value});
568
- object.append(param);
569
- }
570
-
571
- // Setup add type and classid if strict is disabled
572
- if (this.editor.getParam('media_strict', true)) {
573
- object.attr({
574
- data: data.params.src,
575
- type: typeItem.mimes[0]
576
- });
577
- } else {
578
- object.attr({
579
- classid: "clsid:" + typeItem.clsids[0],
580
- codebase: typeItem.codebase
581
- });
582
-
583
- embed = new Node('embed', 1);
584
- embed.shortEnded = true;
585
- embed.attr({
586
- id: node.attr('id'),
587
- width: normalizeSize(node.attr('width')),
588
- height: normalizeSize(node.attr('height')),
589
- style : style,
590
- type: typeItem.mimes[0]
591
- });
592
-
593
- for (name in data.params)
594
- embed.attr(name, data.params[name]);
595
-
596
- tinymce.each(rootAttributes, function(name) {
597
- if (data[name] && name != 'type')
598
- embed.attr(name, data[name]);
599
- });
600
-
601
- object.append(embed);
602
- }
603
-
604
- // Insert raw HTML
605
- if (data.object_html) {
606
- value = new Node('#text', 3);
607
- value.raw = true;
608
- value.value = data.object_html;
609
- object.append(value);
610
- }
611
-
612
- // Append object to video element if it exists
613
- if (video)
614
- video.append(object);
615
- }
616
-
617
- if (video) {
618
- // Insert raw HTML
619
- if (data.video_html) {
620
- value = new Node('#text', 3);
621
- value.raw = true;
622
- value.value = data.video_html;
623
- video.append(value);
624
- }
625
- }
626
-
627
- if (audio) {
628
- // Insert raw HTML
629
- if (data.video_html) {
630
- value = new Node('#text', 3);
631
- value.raw = true;
632
- value.value = data.video_html;
633
- audio.append(value);
634
- }
635
- }
636
-
637
- var n = video || audio || object || embed;
638
- if (n)
639
- node.replace(n);
640
- else
641
- node.remove();
642
- },
643
-
644
- /**
645
- * Converts a tinymce.html.Node video/object/embed to an img element.
646
- *
647
- * The video/object/embed will be converted into an image placeholder with a JSON data attribute like this:
648
- * <img class="mceItemMedia mceItemFlash" width="100" height="100" data-mce-json="{..}" />
649
- *
650
- * The JSON structure will be like this:
651
- * {'params':{'flashvars':'something','quality':'high','src':'someurl'}, 'video':{'sources':[{src: 'someurl', type: 'video/mp4'}]}}
652
- */
653
- objectToImg : function(node) {
654
- var object, embed, video, iframe, img, name, id, width, height, style, i, html,
655
- param, params, source, sources, data, type, lookup = this.lookup,
656
- matches, attrs, urlConverter = this.editor.settings.url_converter,
657
- urlConverterScope = this.editor.settings.url_converter_scope,
658
- hspace, vspace, align, bgcolor;
659
-
660
- function getInnerHTML(node) {
661
- return new tinymce.html.Serializer({
662
- inner: true,
663
- validate: false
664
- }).serialize(node);
665
- };
666
-
667
- function lookupAttribute(o, attr) {
668
- return lookup[(o.attr(attr) || '').toLowerCase()];
669
- }
670
-
671
- function lookupExtension(src) {
672
- var ext = src.replace(/^.*\.([^.]+)$/, '$1');
673
- return lookup[ext.toLowerCase() || ''];
674
- }
675
-
676
- // If node isn't in document
677
- if (!node.parent)
678
- return;
679
-
680
- // Handle media scripts
681
- if (node.name === 'script') {
682
- if (node.firstChild)
683
- matches = scriptRegExp.exec(node.firstChild.value);
684
-
685
- if (!matches)
686
- return;
687
-
688
- type = matches[1];
689
- data = {video : {}, params : JSON.parse(matches[2])};
690
- width = data.params.width;
691
- height = data.params.height;
692
- }
693
-
694
- // Setup data objects
695
- data = data || {
696
- video : {},
697
- params : {}
698
- };
699
-
700
- // Setup new image object
701
- img = new Node('img', 1);
702
- img.attr({
703
- src : this.editor.theme.url + '/img/trans.gif'
704
- });
705
-
706
- // Video element
707
- name = node.name;
708
- if (name === 'video' || name == 'audio') {
709
- video = node;
710
- object = node.getAll('object')[0];
711
- embed = node.getAll('embed')[0];
712
- width = video.attr('width');
713
- height = video.attr('height');
714
- id = video.attr('id');
715
- data.video = {attrs : {}, sources : []};
716
-
717
- // Get all video attributes
718
- attrs = data.video.attrs;
719
- for (name in video.attributes.map)
720
- attrs[name] = video.attributes.map[name];
721
-
722
- source = node.attr('src');
723
- if (source)
724
- data.video.sources.push({src : urlConverter.call(urlConverterScope, source, 'src', node.name)});
725
-
726
- // Get all sources
727
- sources = video.getAll("source");
728
- for (i = 0; i < sources.length; i++) {
729
- source = sources[i].remove();
730
-
731
- data.video.sources.push({
732
- src: urlConverter.call(urlConverterScope, source.attr('src'), 'src', 'source'),
733
- type: source.attr('type'),
734
- media: source.attr('media')
735
- });
736
- }
737
-
738
- // Convert the poster URL
739
- if (attrs.poster)
740
- attrs.poster = urlConverter.call(urlConverterScope, attrs.poster, 'poster', node.name);
741
- }
742
-
743
- // Object element
744
- if (node.name === 'object') {
745
- object = node;
746
- embed = node.getAll('embed')[0];
747
- }
748
-
749
- // Embed element
750
- if (node.name === 'embed')
751
- embed = node;
752
-
753
- // Iframe element
754
- if (node.name === 'iframe') {
755
- iframe = node;
756
- type = 'Iframe';
757
- }
758
-
759
- if (object) {
760
- // Get width/height
761
- width = width || object.attr('width');
762
- height = height || object.attr('height');
763
- style = style || object.attr('style');
764
- id = id || object.attr('id');
765
- hspace = hspace || object.attr('hspace');
766
- vspace = vspace || object.attr('vspace');
767
- align = align || object.attr('align');
768
- bgcolor = bgcolor || object.attr('bgcolor');
769
- data.name = object.attr('name');
770
-
771
- // Get all object params
772
- params = object.getAll("param");
773
- for (i = 0; i < params.length; i++) {
774
- param = params[i];
775
- name = param.remove().attr('name');
776
-
777
- if (!excludedAttrs[name])
778
- data.params[name] = param.attr('value');
779
- }
780
-
781
- data.params.src = data.params.src || object.attr('data');
782
- }
783
-
784
- if (embed) {
785
- // Get width/height
786
- width = width || embed.attr('width');
787
- height = height || embed.attr('height');
788
- style = style || embed.attr('style');
789
- id = id || embed.attr('id');
790
- hspace = hspace || embed.attr('hspace');
791
- vspace = vspace || embed.attr('vspace');
792
- align = align || embed.attr('align');
793
- bgcolor = bgcolor || embed.attr('bgcolor');
794
-
795
- // Get all embed attributes
796
- for (name in embed.attributes.map) {
797
- if (!excludedAttrs[name] && !data.params[name])
798
- data.params[name] = embed.attributes.map[name];
799
- }
800
- }
801
-
802
- if (iframe) {
803
- // Get width/height
804
- width = normalizeSize(iframe.attr('width'));
805
- height = normalizeSize(iframe.attr('height'));
806
- style = style || iframe.attr('style');
807
- id = iframe.attr('id');
808
- hspace = iframe.attr('hspace');
809
- vspace = iframe.attr('vspace');
810
- align = iframe.attr('align');
811
- bgcolor = iframe.attr('bgcolor');
812
-
813
- tinymce.each(rootAttributes, function(name) {
814
- img.attr(name, iframe.attr(name));
815
- });
816
-
817
- // Get all iframe attributes
818
- for (name in iframe.attributes.map) {
819
- if (!excludedAttrs[name] && !data.params[name])
820
- data.params[name] = iframe.attributes.map[name];
821
- }
822
- }
823
-
824
- // Use src not movie
825
- if (data.params.movie) {
826
- data.params.src = data.params.src || data.params.movie;
827
- delete data.params.movie;
828
- }
829
-
830
- // Convert the URL to relative/absolute depending on configuration
831
- if (data.params.src)
832
- data.params.src = urlConverter.call(urlConverterScope, data.params.src, 'src', 'object');
833
-
834
- if (video) {
835
- if (node.name === 'video')
836
- type = lookup.video.name;
837
- else if (node.name === 'audio')
838
- type = lookup.audio.name;
839
- }
840
-
841
- if (object && !type)
842
- type = (lookupAttribute(object, 'clsid') || lookupAttribute(object, 'classid') || lookupAttribute(object, 'type') || {}).name;
843
-
844
- if (embed && !type)
845
- type = (lookupAttribute(embed, 'type') || lookupExtension(data.params.src) || {}).name;
846
-
847
- // for embedded audio we preserve the original specified type
848
- if (embed && type == 'EmbeddedAudio') {
849
- data.params.type = embed.attr('type');
850
- }
851
-
852
- // Replace the video/object/embed element with a placeholder image containing the data
853
- node.replace(img);
854
-
855
- // Remove embed
856
- if (embed)
857
- embed.remove();
858
-
859
- // Serialize the inner HTML of the object element
860
- if (object) {
861
- html = getInnerHTML(object.remove());
862
-
863
- if (html)
864
- data.object_html = html;
865
- }
866
-
867
- // Serialize the inner HTML of the video element
868
- if (video) {
869
- html = getInnerHTML(video.remove());
870
-
871
- if (html)
872
- data.video_html = html;
873
- }
874
-
875
- data.hspace = hspace;
876
- data.vspace = vspace;
877
- data.align = align;
878
- data.bgcolor = bgcolor;
879
-
880
- // Set width/height of placeholder
881
- img.attr({
882
- id : id,
883
- 'class' : 'mceItemMedia mceItem' + (type || 'Flash'),
884
- style : style,
885
- width : width || (node.name == 'audio' ? "300" : "320"),
886
- height : height || (node.name == 'audio' ? "32" : "240"),
887
- hspace : hspace,
888
- vspace : vspace,
889
- align : align,
890
- bgcolor : bgcolor,
891
- "data-mce-json" : JSON.serialize(data, "'")
892
- });
893
- }
894
- });
895
-
896
- // Register plugin
897
- tinymce.PluginManager.add('media', tinymce.plugins.MediaPlugin);
898
- })();
1
+ /**
2
+ * editor_plugin_src.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() {
12
+ var rootAttributes = tinymce.explode('id,name,width,height,style,align,class,hspace,vspace,bgcolor,type'), excludedAttrs = tinymce.makeMap(rootAttributes.join(',')), Node = tinymce.html.Node,
13
+ mediaTypes, scriptRegExp, JSON = tinymce.util.JSON, mimeTypes;
14
+
15
+ // Media types supported by this plugin
16
+ mediaTypes = [
17
+ // Type, clsid:s, mime types, codebase
18
+ ["Flash", "d27cdb6e-ae6d-11cf-96b8-444553540000", "application/x-shockwave-flash", "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],
19
+ ["ShockWave", "166b1bca-3f9c-11cf-8075-444553540000", "application/x-director", "http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0"],
20
+ ["WindowsMedia", "6bf52a52-394a-11d3-b153-00c04f79faa6,22d6f312-b0f6-11d0-94ab-0080c74c7e95,05589fa1-c356-11ce-bf01-00aa0055595a", "application/x-mplayer2", "http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"],
21
+ ["QuickTime", "02bf25d5-8c17-4b23-bc80-d3488abddc6b", "video/quicktime", "http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"],
22
+ ["RealMedia", "cfcdaa03-8be4-11cf-b84b-0020afbbccfa", "audio/x-pn-realaudio-plugin", "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],
23
+ ["Java", "8ad9c840-044e-11d1-b3e9-00805f499d93", "application/x-java-applet", "http://java.sun.com/products/plugin/autodl/jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0"],
24
+ ["Silverlight", "dfeaf541-f3e1-4c24-acac-99c30715084a", "application/x-silverlight-2"],
25
+ ["Iframe"],
26
+ ["Video"],
27
+ ["EmbeddedAudio"],
28
+ ["Audio"]
29
+ ];
30
+
31
+ function normalizeSize(size) {
32
+ return typeof(size) == "string" ? size.replace(/[^0-9%]/g, '') : size;
33
+ }
34
+
35
+ function toArray(obj) {
36
+ var undef, out, i;
37
+
38
+ if (obj && !obj.splice) {
39
+ out = [];
40
+
41
+ for (i = 0; true; i++) {
42
+ if (obj[i])
43
+ out[i] = obj[i];
44
+ else
45
+ break;
46
+ }
47
+
48
+ return out;
49
+ }
50
+
51
+ return obj;
52
+ };
53
+
54
+ tinymce.create('tinymce.plugins.MediaPlugin', {
55
+ init : function(ed, url) {
56
+ var self = this, lookup = {}, i, y, item, name;
57
+
58
+ function isMediaImg(node) {
59
+ return node && node.nodeName === 'IMG' && ed.dom.hasClass(node, 'mceItemMedia');
60
+ };
61
+
62
+ self.editor = ed;
63
+ self.url = url;
64
+
65
+ // Parse media types into a lookup table
66
+ scriptRegExp = '';
67
+ for (i = 0; i < mediaTypes.length; i++) {
68
+ name = mediaTypes[i][0];
69
+
70
+ item = {
71
+ name : name,
72
+ clsids : tinymce.explode(mediaTypes[i][1] || ''),
73
+ mimes : tinymce.explode(mediaTypes[i][2] || ''),
74
+ codebase : mediaTypes[i][3]
75
+ };
76
+
77
+ for (y = 0; y < item.clsids.length; y++)
78
+ lookup['clsid:' + item.clsids[y]] = item;
79
+
80
+ for (y = 0; y < item.mimes.length; y++)
81
+ lookup[item.mimes[y]] = item;
82
+
83
+ lookup['mceItem' + name] = item;
84
+ lookup[name.toLowerCase()] = item;
85
+
86
+ scriptRegExp += (scriptRegExp ? '|' : '') + name;
87
+ }
88
+
89
+ // Handle the media_types setting
90
+ tinymce.each(ed.getParam("media_types",
91
+ "video=mp4,m4v,ogv,webm;" +
92
+ "silverlight=xap;" +
93
+ "flash=swf,flv;" +
94
+ "shockwave=dcr;" +
95
+ "quicktime=mov,qt,mpg,mpeg;" +
96
+ "shockwave=dcr;" +
97
+ "windowsmedia=avi,wmv,wm,asf,asx,wmx,wvx;" +
98
+ "realmedia=rm,ra,ram;" +
99
+ "java=jar;" +
100
+ "audio=mp3,ogg"
101
+ ).split(';'), function(item) {
102
+ var i, extensions, type;
103
+
104
+ item = item.split(/=/);
105
+ extensions = tinymce.explode(item[1].toLowerCase());
106
+ for (i = 0; i < extensions.length; i++) {
107
+ type = lookup[item[0].toLowerCase()];
108
+
109
+ if (type)
110
+ lookup[extensions[i]] = type;
111
+ }
112
+ });
113
+
114
+ scriptRegExp = new RegExp('write(' + scriptRegExp + ')\\(([^)]+)\\)');
115
+ self.lookup = lookup;
116
+
117
+ ed.onPreInit.add(function() {
118
+ // Allow video elements
119
+ ed.schema.addValidElements('object[id|style|width|height|classid|codebase|*],param[name|value],embed[id|style|width|height|type|src|*],video[*],audio[*],source[*]');
120
+
121
+ // Convert video elements to image placeholder
122
+ ed.parser.addNodeFilter('object,embed,video,audio,script,iframe', function(nodes) {
123
+ var i = nodes.length;
124
+
125
+ while (i--)
126
+ self.objectToImg(nodes[i]);
127
+ });
128
+
129
+ // Convert image placeholders to video elements
130
+ ed.serializer.addNodeFilter('img', function(nodes, name, args) {
131
+ var i = nodes.length, node;
132
+
133
+ while (i--) {
134
+ node = nodes[i];
135
+ if ((node.attr('class') || '').indexOf('mceItemMedia') !== -1)
136
+ self.imgToObject(node, args);
137
+ }
138
+ });
139
+ });
140
+
141
+ ed.onInit.add(function() {
142
+ // Display "media" instead of "img" in element path
143
+ if (ed.theme && ed.theme.onResolveName) {
144
+ ed.theme.onResolveName.add(function(theme, path_object) {
145
+ if (path_object.name === 'img' && ed.dom.hasClass(path_object.node, 'mceItemMedia'))
146
+ path_object.name = 'media';
147
+ });
148
+ }
149
+
150
+ // Add contect menu if it's loaded
151
+ if (ed && ed.plugins.contextmenu) {
152
+ ed.plugins.contextmenu.onContextMenu.add(function(plugin, menu, element) {
153
+ if (element.nodeName === 'IMG' && element.className.indexOf('mceItemMedia') !== -1)
154
+ menu.add({title : 'media.edit', icon : 'media', cmd : 'mceMedia'});
155
+ });
156
+ }
157
+ });
158
+
159
+ // Register commands
160
+ ed.addCommand('mceMedia', function() {
161
+ var data, img;
162
+
163
+ img = ed.selection.getNode();
164
+ if (isMediaImg(img)) {
165
+ data = ed.dom.getAttrib(img, 'data-mce-json');
166
+ if (data) {
167
+ data = JSON.parse(data);
168
+
169
+ // Add some extra properties to the data object
170
+ tinymce.each(rootAttributes, function(name) {
171
+ var value = ed.dom.getAttrib(img, name);
172
+
173
+ if (value)
174
+ data[name] = value;
175
+ });
176
+
177
+ data.type = self.getType(img.className).name.toLowerCase();
178
+ }
179
+ }
180
+
181
+ if (!data) {
182
+ data = {
183
+ type : 'flash',
184
+ video: {sources:[]},
185
+ params: {}
186
+ };
187
+ }
188
+
189
+ ed.windowManager.open({
190
+ file : url + '/media.htm',
191
+ width : 430 + parseInt(ed.getLang('media.delta_width', 0)),
192
+ height : 500 + parseInt(ed.getLang('media.delta_height', 0)),
193
+ inline : 1
194
+ }, {
195
+ plugin_url : url,
196
+ data : data
197
+ });
198
+ });
199
+
200
+ // Register buttons
201
+ ed.addButton('media', {title : 'media.desc', cmd : 'mceMedia'});
202
+
203
+ // Update media selection status
204
+ ed.onNodeChange.add(function(ed, cm, node) {
205
+ cm.setActive('media', isMediaImg(node));
206
+ });
207
+ },
208
+
209
+ convertUrl : function(url, force_absolute) {
210
+ var self = this, editor = self.editor, settings = editor.settings,
211
+ urlConverter = settings.url_converter,
212
+ urlConverterScope = settings.url_converter_scope || self;
213
+
214
+ if (!url)
215
+ return url;
216
+
217
+ if (force_absolute)
218
+ return editor.documentBaseURI.toAbsolute(url);
219
+
220
+ return urlConverter.call(urlConverterScope, url, 'src', 'object');
221
+ },
222
+
223
+ getInfo : function() {
224
+ return {
225
+ longname : 'Media',
226
+ author : 'Moxiecode Systems AB',
227
+ authorurl : 'http://tinymce.moxiecode.com',
228
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media',
229
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
230
+ };
231
+ },
232
+
233
+ /**
234
+ * Converts the JSON data object to an img node.
235
+ */
236
+ dataToImg : function(data, force_absolute) {
237
+ var self = this, editor = self.editor, baseUri = editor.documentBaseURI, sources, attrs, img, i;
238
+
239
+ data.params.src = self.convertUrl(data.params.src, force_absolute);
240
+
241
+ attrs = data.video.attrs;
242
+ if (attrs)
243
+ attrs.src = self.convertUrl(attrs.src, force_absolute);
244
+
245
+ if (attrs)
246
+ attrs.poster = self.convertUrl(attrs.poster, force_absolute);
247
+
248
+ sources = toArray(data.video.sources);
249
+ if (sources) {
250
+ for (i = 0; i < sources.length; i++)
251
+ sources[i].src = self.convertUrl(sources[i].src, force_absolute);
252
+ }
253
+
254
+ img = self.editor.dom.create('img', {
255
+ id : data.id,
256
+ style : data.style,
257
+ align : data.align,
258
+ hspace : data.hspace,
259
+ vspace : data.vspace,
260
+ src : self.editor.theme.url + '/img/trans.gif',
261
+ 'class' : 'mceItemMedia mceItem' + self.getType(data.type).name,
262
+ 'data-mce-json' : JSON.serialize(data, "'")
263
+ });
264
+
265
+ img.width = data.width = normalizeSize(data.width || (data.type == 'audio' ? "300" : "320"));
266
+ img.height = data.height = normalizeSize(data.height || (data.type == 'audio' ? "32" : "240"));
267
+
268
+ return img;
269
+ },
270
+
271
+ /**
272
+ * Converts the JSON data object to a HTML string.
273
+ */
274
+ dataToHtml : function(data, force_absolute) {
275
+ return this.editor.serializer.serialize(this.dataToImg(data, force_absolute), {forced_root_block : '', force_absolute : force_absolute});
276
+ },
277
+
278
+ /**
279
+ * Converts the JSON data object to a HTML string.
280
+ */
281
+ htmlToData : function(html) {
282
+ var fragment, img, data;
283
+
284
+ data = {
285
+ type : 'flash',
286
+ video: {sources:[]},
287
+ params: {}
288
+ };
289
+
290
+ fragment = this.editor.parser.parse(html);
291
+ img = fragment.getAll('img')[0];
292
+
293
+ if (img) {
294
+ data = JSON.parse(img.attr('data-mce-json'));
295
+ data.type = this.getType(img.attr('class')).name.toLowerCase();
296
+
297
+ // Add some extra properties to the data object
298
+ tinymce.each(rootAttributes, function(name) {
299
+ var value = img.attr(name);
300
+
301
+ if (value)
302
+ data[name] = value;
303
+ });
304
+ }
305
+
306
+ return data;
307
+ },
308
+
309
+ /**
310
+ * Get type item by extension, class, clsid or mime type.
311
+ *
312
+ * @method getType
313
+ * @param {String} value Value to get type item by.
314
+ * @return {Object} Type item object or undefined.
315
+ */
316
+ getType : function(value) {
317
+ var i, values, typeItem;
318
+
319
+ // Find type by checking the classes
320
+ values = tinymce.explode(value, ' ');
321
+ for (i = 0; i < values.length; i++) {
322
+ typeItem = this.lookup[values[i]];
323
+
324
+ if (typeItem)
325
+ return typeItem;
326
+ }
327
+ },
328
+
329
+ /**
330
+ * Converts a tinymce.html.Node image element to video/object/embed.
331
+ */
332
+ imgToObject : function(node, args) {
333
+ var self = this, editor = self.editor, video, object, embed, iframe, name, value, data,
334
+ source, sources, params, param, typeItem, i, item, mp4Source, replacement,
335
+ posterSrc, style, audio;
336
+
337
+ // Adds the flash player
338
+ function addPlayer(video_src, poster_src) {
339
+ var baseUri, flashVars, flashVarsOutput, params, flashPlayer;
340
+
341
+ flashPlayer = editor.getParam('flash_video_player_url', self.convertUrl(self.url + '/moxieplayer.swf'));
342
+ if (flashPlayer) {
343
+ baseUri = editor.documentBaseURI;
344
+ data.params.src = flashPlayer;
345
+
346
+ // Convert the movie url to absolute urls
347
+ if (editor.getParam('flash_video_player_absvideourl', true)) {
348
+ video_src = baseUri.toAbsolute(video_src || '', true);
349
+ poster_src = baseUri.toAbsolute(poster_src || '', true);
350
+ }
351
+
352
+ // Generate flash vars
353
+ flashVarsOutput = '';
354
+ flashVars = editor.getParam('flash_video_player_flashvars', {url : '$url', poster : '$poster'});
355
+ tinymce.each(flashVars, function(value, name) {
356
+ // Replace $url and $poster variables in flashvars value
357
+ value = value.replace(/\$url/, video_src || '');
358
+ value = value.replace(/\$poster/, poster_src || '');
359
+
360
+ if (value.length > 0)
361
+ flashVarsOutput += (flashVarsOutput ? '&' : '') + name + '=' + escape(value);
362
+ });
363
+
364
+ if (flashVarsOutput.length)
365
+ data.params.flashvars = flashVarsOutput;
366
+
367
+ params = editor.getParam('flash_video_player_params', {
368
+ allowfullscreen: true,
369
+ allowscriptaccess: true
370
+ });
371
+
372
+ tinymce.each(params, function(value, name) {
373
+ data.params[name] = "" + value;
374
+ });
375
+ }
376
+ };
377
+
378
+ data = node.attr('data-mce-json');
379
+ if (!data)
380
+ return;
381
+
382
+ data = JSON.parse(data);
383
+ typeItem = this.getType(node.attr('class'));
384
+
385
+ style = node.attr('data-mce-style')
386
+ if (!style) {
387
+ style = node.attr('style');
388
+
389
+ if (style)
390
+ style = editor.dom.serializeStyle(editor.dom.parseStyle(style, 'img'));
391
+ }
392
+
393
+ // Use node width/height to override the data width/height when the placeholder is resized
394
+ data.width = node.attr('width') || data.width;
395
+ data.height = node.attr('height') || data.height;
396
+
397
+ // Handle iframe
398
+ if (typeItem.name === 'Iframe') {
399
+ replacement = new Node('iframe', 1);
400
+
401
+ tinymce.each(rootAttributes, function(name) {
402
+ var value = node.attr(name);
403
+
404
+ if (name == 'class' && value)
405
+ value = value.replace(/mceItem.+ ?/g, '');
406
+
407
+ if (value && value.length > 0)
408
+ replacement.attr(name, value);
409
+ });
410
+
411
+ for (name in data.params)
412
+ replacement.attr(name, data.params[name]);
413
+
414
+ replacement.attr({
415
+ style: style,
416
+ src: data.params.src
417
+ });
418
+
419
+ node.replace(replacement);
420
+
421
+ return;
422
+ }
423
+
424
+ // Handle scripts
425
+ if (this.editor.settings.media_use_script) {
426
+ replacement = new Node('script', 1).attr('type', 'text/javascript');
427
+
428
+ value = new Node('#text', 3);
429
+ value.value = 'write' + typeItem.name + '(' + JSON.serialize(tinymce.extend(data.params, {
430
+ width: node.attr('width'),
431
+ height: node.attr('height')
432
+ })) + ');';
433
+
434
+ replacement.append(value);
435
+ node.replace(replacement);
436
+
437
+ return;
438
+ }
439
+
440
+ // Add HTML5 video element
441
+ if (typeItem.name === 'Video' && data.video.sources[0]) {
442
+ // Create new object element
443
+ video = new Node('video', 1).attr(tinymce.extend({
444
+ id : node.attr('id'),
445
+ width: normalizeSize(node.attr('width')),
446
+ height: normalizeSize(node.attr('height')),
447
+ style : style
448
+ }, data.video.attrs));
449
+
450
+ // Get poster source and use that for flash fallback
451
+ if (data.video.attrs)
452
+ posterSrc = data.video.attrs.poster;
453
+
454
+ sources = data.video.sources = toArray(data.video.sources);
455
+ for (i = 0; i < sources.length; i++) {
456
+ if (/\.mp4$/.test(sources[i].src))
457
+ mp4Source = sources[i].src;
458
+ }
459
+
460
+ if (!sources[0].type) {
461
+ video.attr('src', sources[0].src);
462
+ sources.splice(0, 1);
463
+ }
464
+
465
+ for (i = 0; i < sources.length; i++) {
466
+ source = new Node('source', 1).attr(sources[i]);
467
+ source.shortEnded = true;
468
+ video.append(source);
469
+ }
470
+
471
+ // Create flash fallback for video if we have a mp4 source
472
+ if (mp4Source) {
473
+ addPlayer(mp4Source, posterSrc);
474
+ typeItem = self.getType('flash');
475
+ } else
476
+ data.params.src = '';
477
+ }
478
+
479
+ // Add HTML5 audio element
480
+ if (typeItem.name === 'Audio' && data.video.sources[0]) {
481
+ // Create new object element
482
+ audio = new Node('audio', 1).attr(tinymce.extend({
483
+ id : node.attr('id'),
484
+ width: normalizeSize(node.attr('width')),
485
+ height: normalizeSize(node.attr('height')),
486
+ style : style
487
+ }, data.video.attrs));
488
+
489
+ // Get poster source and use that for flash fallback
490
+ if (data.video.attrs)
491
+ posterSrc = data.video.attrs.poster;
492
+
493
+ sources = data.video.sources = toArray(data.video.sources);
494
+ if (!sources[0].type) {
495
+ audio.attr('src', sources[0].src);
496
+ sources.splice(0, 1);
497
+ }
498
+
499
+ for (i = 0; i < sources.length; i++) {
500
+ source = new Node('source', 1).attr(sources[i]);
501
+ source.shortEnded = true;
502
+ audio.append(source);
503
+ }
504
+
505
+ data.params.src = '';
506
+ }
507
+
508
+ if (typeItem.name === 'EmbeddedAudio') {
509
+ embed = new Node('embed', 1);
510
+ embed.shortEnded = true;
511
+ embed.attr({
512
+ id: node.attr('id'),
513
+ width: normalizeSize(node.attr('width')),
514
+ height: normalizeSize(node.attr('height')),
515
+ style : style,
516
+ type: node.attr('type')
517
+ });
518
+
519
+ for (name in data.params)
520
+ embed.attr(name, data.params[name]);
521
+
522
+ tinymce.each(rootAttributes, function(name) {
523
+ if (data[name] && name != 'type')
524
+ embed.attr(name, data[name]);
525
+ });
526
+
527
+ data.params.src = '';
528
+ }
529
+
530
+ // Do we have a params src then we can generate object
531
+ if (data.params.src) {
532
+ // Is flv movie add player for it
533
+ if (/\.flv$/i.test(data.params.src))
534
+ addPlayer(data.params.src, '');
535
+
536
+ if (args && args.force_absolute)
537
+ data.params.src = editor.documentBaseURI.toAbsolute(data.params.src);
538
+
539
+ // Create new object element
540
+ object = new Node('object', 1).attr({
541
+ id : node.attr('id'),
542
+ width: normalizeSize(node.attr('width')),
543
+ height: normalizeSize(node.attr('height')),
544
+ style : style
545
+ });
546
+
547
+ tinymce.each(rootAttributes, function(name) {
548
+ var value = data[name];
549
+
550
+ if (name == 'class' && value)
551
+ value = value.replace(/mceItem.+ ?/g, '');
552
+
553
+ if (value && name != 'type')
554
+ object.attr(name, value);
555
+ });
556
+
557
+ // Add params
558
+ for (name in data.params) {
559
+ param = new Node('param', 1);
560
+ param.shortEnded = true;
561
+ value = data.params[name];
562
+
563
+ // Windows media needs to use url instead of src for the media URL
564
+ if (name === 'src' && typeItem.name === 'WindowsMedia')
565
+ name = 'url';
566
+
567
+ param.attr({name: name, value: value});
568
+ object.append(param);
569
+ }
570
+
571
+ // Setup add type and classid if strict is disabled
572
+ if (this.editor.getParam('media_strict', true)) {
573
+ object.attr({
574
+ data: data.params.src,
575
+ type: typeItem.mimes[0]
576
+ });
577
+ } else {
578
+ object.attr({
579
+ classid: "clsid:" + typeItem.clsids[0],
580
+ codebase: typeItem.codebase
581
+ });
582
+
583
+ embed = new Node('embed', 1);
584
+ embed.shortEnded = true;
585
+ embed.attr({
586
+ id: node.attr('id'),
587
+ width: normalizeSize(node.attr('width')),
588
+ height: normalizeSize(node.attr('height')),
589
+ style : style,
590
+ type: typeItem.mimes[0]
591
+ });
592
+
593
+ for (name in data.params)
594
+ embed.attr(name, data.params[name]);
595
+
596
+ tinymce.each(rootAttributes, function(name) {
597
+ if (data[name] && name != 'type')
598
+ embed.attr(name, data[name]);
599
+ });
600
+
601
+ object.append(embed);
602
+ }
603
+
604
+ // Insert raw HTML
605
+ if (data.object_html) {
606
+ value = new Node('#text', 3);
607
+ value.raw = true;
608
+ value.value = data.object_html;
609
+ object.append(value);
610
+ }
611
+
612
+ // Append object to video element if it exists
613
+ if (video)
614
+ video.append(object);
615
+ }
616
+
617
+ if (video) {
618
+ // Insert raw HTML
619
+ if (data.video_html) {
620
+ value = new Node('#text', 3);
621
+ value.raw = true;
622
+ value.value = data.video_html;
623
+ video.append(value);
624
+ }
625
+ }
626
+
627
+ if (audio) {
628
+ // Insert raw HTML
629
+ if (data.video_html) {
630
+ value = new Node('#text', 3);
631
+ value.raw = true;
632
+ value.value = data.video_html;
633
+ audio.append(value);
634
+ }
635
+ }
636
+
637
+ var n = video || audio || object || embed;
638
+ if (n)
639
+ node.replace(n);
640
+ else
641
+ node.remove();
642
+ },
643
+
644
+ /**
645
+ * Converts a tinymce.html.Node video/object/embed to an img element.
646
+ *
647
+ * The video/object/embed will be converted into an image placeholder with a JSON data attribute like this:
648
+ * <img class="mceItemMedia mceItemFlash" width="100" height="100" data-mce-json="{..}" />
649
+ *
650
+ * The JSON structure will be like this:
651
+ * {'params':{'flashvars':'something','quality':'high','src':'someurl'}, 'video':{'sources':[{src: 'someurl', type: 'video/mp4'}]}}
652
+ */
653
+ objectToImg : function(node) {
654
+ var object, embed, video, iframe, img, name, id, width, height, style, i, html,
655
+ param, params, source, sources, data, type, lookup = this.lookup,
656
+ matches, attrs, urlConverter = this.editor.settings.url_converter,
657
+ urlConverterScope = this.editor.settings.url_converter_scope,
658
+ hspace, vspace, align, bgcolor;
659
+
660
+ function getInnerHTML(node) {
661
+ return new tinymce.html.Serializer({
662
+ inner: true,
663
+ validate: false
664
+ }).serialize(node);
665
+ };
666
+
667
+ function lookupAttribute(o, attr) {
668
+ return lookup[(o.attr(attr) || '').toLowerCase()];
669
+ }
670
+
671
+ function lookupExtension(src) {
672
+ var ext = src.replace(/^.*\.([^.]+)$/, '$1');
673
+ return lookup[ext.toLowerCase() || ''];
674
+ }
675
+
676
+ // If node isn't in document
677
+ if (!node.parent)
678
+ return;
679
+
680
+ // Handle media scripts
681
+ if (node.name === 'script') {
682
+ if (node.firstChild)
683
+ matches = scriptRegExp.exec(node.firstChild.value);
684
+
685
+ if (!matches)
686
+ return;
687
+
688
+ type = matches[1];
689
+ data = {video : {}, params : JSON.parse(matches[2])};
690
+ width = data.params.width;
691
+ height = data.params.height;
692
+ }
693
+
694
+ // Setup data objects
695
+ data = data || {
696
+ video : {},
697
+ params : {}
698
+ };
699
+
700
+ // Setup new image object
701
+ img = new Node('img', 1);
702
+ img.attr({
703
+ src : this.editor.theme.url + '/img/trans.gif'
704
+ });
705
+
706
+ // Video element
707
+ name = node.name;
708
+ if (name === 'video' || name == 'audio') {
709
+ video = node;
710
+ object = node.getAll('object')[0];
711
+ embed = node.getAll('embed')[0];
712
+ width = video.attr('width');
713
+ height = video.attr('height');
714
+ id = video.attr('id');
715
+ data.video = {attrs : {}, sources : []};
716
+
717
+ // Get all video attributes
718
+ attrs = data.video.attrs;
719
+ for (name in video.attributes.map)
720
+ attrs[name] = video.attributes.map[name];
721
+
722
+ source = node.attr('src');
723
+ if (source)
724
+ data.video.sources.push({src : urlConverter.call(urlConverterScope, source, 'src', node.name)});
725
+
726
+ // Get all sources
727
+ sources = video.getAll("source");
728
+ for (i = 0; i < sources.length; i++) {
729
+ source = sources[i].remove();
730
+
731
+ data.video.sources.push({
732
+ src: urlConverter.call(urlConverterScope, source.attr('src'), 'src', 'source'),
733
+ type: source.attr('type'),
734
+ media: source.attr('media')
735
+ });
736
+ }
737
+
738
+ // Convert the poster URL
739
+ if (attrs.poster)
740
+ attrs.poster = urlConverter.call(urlConverterScope, attrs.poster, 'poster', node.name);
741
+ }
742
+
743
+ // Object element
744
+ if (node.name === 'object') {
745
+ object = node;
746
+ embed = node.getAll('embed')[0];
747
+ }
748
+
749
+ // Embed element
750
+ if (node.name === 'embed')
751
+ embed = node;
752
+
753
+ // Iframe element
754
+ if (node.name === 'iframe') {
755
+ iframe = node;
756
+ type = 'Iframe';
757
+ }
758
+
759
+ if (object) {
760
+ // Get width/height
761
+ width = width || object.attr('width');
762
+ height = height || object.attr('height');
763
+ style = style || object.attr('style');
764
+ id = id || object.attr('id');
765
+ hspace = hspace || object.attr('hspace');
766
+ vspace = vspace || object.attr('vspace');
767
+ align = align || object.attr('align');
768
+ bgcolor = bgcolor || object.attr('bgcolor');
769
+ data.name = object.attr('name');
770
+
771
+ // Get all object params
772
+ params = object.getAll("param");
773
+ for (i = 0; i < params.length; i++) {
774
+ param = params[i];
775
+ name = param.remove().attr('name');
776
+
777
+ if (!excludedAttrs[name])
778
+ data.params[name] = param.attr('value');
779
+ }
780
+
781
+ data.params.src = data.params.src || object.attr('data');
782
+ }
783
+
784
+ if (embed) {
785
+ // Get width/height
786
+ width = width || embed.attr('width');
787
+ height = height || embed.attr('height');
788
+ style = style || embed.attr('style');
789
+ id = id || embed.attr('id');
790
+ hspace = hspace || embed.attr('hspace');
791
+ vspace = vspace || embed.attr('vspace');
792
+ align = align || embed.attr('align');
793
+ bgcolor = bgcolor || embed.attr('bgcolor');
794
+
795
+ // Get all embed attributes
796
+ for (name in embed.attributes.map) {
797
+ if (!excludedAttrs[name] && !data.params[name])
798
+ data.params[name] = embed.attributes.map[name];
799
+ }
800
+ }
801
+
802
+ if (iframe) {
803
+ // Get width/height
804
+ width = normalizeSize(iframe.attr('width'));
805
+ height = normalizeSize(iframe.attr('height'));
806
+ style = style || iframe.attr('style');
807
+ id = iframe.attr('id');
808
+ hspace = iframe.attr('hspace');
809
+ vspace = iframe.attr('vspace');
810
+ align = iframe.attr('align');
811
+ bgcolor = iframe.attr('bgcolor');
812
+
813
+ tinymce.each(rootAttributes, function(name) {
814
+ img.attr(name, iframe.attr(name));
815
+ });
816
+
817
+ // Get all iframe attributes
818
+ for (name in iframe.attributes.map) {
819
+ if (!excludedAttrs[name] && !data.params[name])
820
+ data.params[name] = iframe.attributes.map[name];
821
+ }
822
+ }
823
+
824
+ // Use src not movie
825
+ if (data.params.movie) {
826
+ data.params.src = data.params.src || data.params.movie;
827
+ delete data.params.movie;
828
+ }
829
+
830
+ // Convert the URL to relative/absolute depending on configuration
831
+ if (data.params.src)
832
+ data.params.src = urlConverter.call(urlConverterScope, data.params.src, 'src', 'object');
833
+
834
+ if (video) {
835
+ if (node.name === 'video')
836
+ type = lookup.video.name;
837
+ else if (node.name === 'audio')
838
+ type = lookup.audio.name;
839
+ }
840
+
841
+ if (object && !type)
842
+ type = (lookupAttribute(object, 'clsid') || lookupAttribute(object, 'classid') || lookupAttribute(object, 'type') || {}).name;
843
+
844
+ if (embed && !type)
845
+ type = (lookupAttribute(embed, 'type') || lookupExtension(data.params.src) || {}).name;
846
+
847
+ // for embedded audio we preserve the original specified type
848
+ if (embed && type == 'EmbeddedAudio') {
849
+ data.params.type = embed.attr('type');
850
+ }
851
+
852
+ // Replace the video/object/embed element with a placeholder image containing the data
853
+ node.replace(img);
854
+
855
+ // Remove embed
856
+ if (embed)
857
+ embed.remove();
858
+
859
+ // Serialize the inner HTML of the object element
860
+ if (object) {
861
+ html = getInnerHTML(object.remove());
862
+
863
+ if (html)
864
+ data.object_html = html;
865
+ }
866
+
867
+ // Serialize the inner HTML of the video element
868
+ if (video) {
869
+ html = getInnerHTML(video.remove());
870
+
871
+ if (html)
872
+ data.video_html = html;
873
+ }
874
+
875
+ data.hspace = hspace;
876
+ data.vspace = vspace;
877
+ data.align = align;
878
+ data.bgcolor = bgcolor;
879
+
880
+ // Set width/height of placeholder
881
+ img.attr({
882
+ id : id,
883
+ 'class' : 'mceItemMedia mceItem' + (type || 'Flash'),
884
+ style : style,
885
+ width : width || (node.name == 'audio' ? "300" : "320"),
886
+ height : height || (node.name == 'audio' ? "32" : "240"),
887
+ hspace : hspace,
888
+ vspace : vspace,
889
+ align : align,
890
+ bgcolor : bgcolor,
891
+ "data-mce-json" : JSON.serialize(data, "'")
892
+ });
893
+ }
894
+ });
895
+
896
+ // Register plugin
897
+ tinymce.PluginManager.add('media', tinymce.plugins.MediaPlugin);
898
+ })();
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/media/js/embed.js CHANGED
@@ -1,73 +1,73 @@
1
- /**
2
- * This script contains embed functions for common plugins. This scripts are complety free to use for any purpose.
3
- */
4
-
5
- function writeFlash(p) {
6
- writeEmbed(
7
- 'D27CDB6E-AE6D-11cf-96B8-444553540000',
8
- 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
9
- 'application/x-shockwave-flash',
10
- p
11
- );
12
- }
13
-
14
- function writeShockWave(p) {
15
- writeEmbed(
16
- '166B1BCA-3F9C-11CF-8075-444553540000',
17
- 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0',
18
- 'application/x-director',
19
- p
20
- );
21
- }
22
-
23
- function writeQuickTime(p) {
24
- writeEmbed(
25
- '02BF25D5-8C17-4B23-BC80-D3488ABDDC6B',
26
- 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0',
27
- 'video/quicktime',
28
- p
29
- );
30
- }
31
-
32
- function writeRealMedia(p) {
33
- writeEmbed(
34
- 'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA',
35
- 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
36
- 'audio/x-pn-realaudio-plugin',
37
- p
38
- );
39
- }
40
-
41
- function writeWindowsMedia(p) {
42
- p.url = p.src;
43
- writeEmbed(
44
- '6BF52A52-394A-11D3-B153-00C04F79FAA6',
45
- 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701',
46
- 'application/x-mplayer2',
47
- p
48
- );
49
- }
50
-
51
- function writeEmbed(cls, cb, mt, p) {
52
- var h = '', n;
53
-
54
- h += '<object classid="clsid:' + cls + '" codebase="' + cb + '"';
55
- h += typeof(p.id) != "undefined" ? 'id="' + p.id + '"' : '';
56
- h += typeof(p.name) != "undefined" ? 'name="' + p.name + '"' : '';
57
- h += typeof(p.width) != "undefined" ? 'width="' + p.width + '"' : '';
58
- h += typeof(p.height) != "undefined" ? 'height="' + p.height + '"' : '';
59
- h += typeof(p.align) != "undefined" ? 'align="' + p.align + '"' : '';
60
- h += '>';
61
-
62
- for (n in p)
63
- h += '<param name="' + n + '" value="' + p[n] + '">';
64
-
65
- h += '<embed type="' + mt + '"';
66
-
67
- for (n in p)
68
- h += n + '="' + p[n] + '" ';
69
-
70
- h += '></embed></object>';
71
-
72
- document.write(h);
73
- }
1
+ /**
2
+ * This script contains embed functions for common plugins. This scripts are complety free to use for any purpose.
3
+ */
4
+
5
+ function writeFlash(p) {
6
+ writeEmbed(
7
+ 'D27CDB6E-AE6D-11cf-96B8-444553540000',
8
+ 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
9
+ 'application/x-shockwave-flash',
10
+ p
11
+ );
12
+ }
13
+
14
+ function writeShockWave(p) {
15
+ writeEmbed(
16
+ '166B1BCA-3F9C-11CF-8075-444553540000',
17
+ 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0',
18
+ 'application/x-director',
19
+ p
20
+ );
21
+ }
22
+
23
+ function writeQuickTime(p) {
24
+ writeEmbed(
25
+ '02BF25D5-8C17-4B23-BC80-D3488ABDDC6B',
26
+ 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0',
27
+ 'video/quicktime',
28
+ p
29
+ );
30
+ }
31
+
32
+ function writeRealMedia(p) {
33
+ writeEmbed(
34
+ 'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA',
35
+ 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
36
+ 'audio/x-pn-realaudio-plugin',
37
+ p
38
+ );
39
+ }
40
+
41
+ function writeWindowsMedia(p) {
42
+ p.url = p.src;
43
+ writeEmbed(
44
+ '6BF52A52-394A-11D3-B153-00C04F79FAA6',
45
+ 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701',
46
+ 'application/x-mplayer2',
47
+ p
48
+ );
49
+ }
50
+
51
+ function writeEmbed(cls, cb, mt, p) {
52
+ var h = '', n;
53
+
54
+ h += '<object classid="clsid:' + cls + '" codebase="' + cb + '"';
55
+ h += typeof(p.id) != "undefined" ? 'id="' + p.id + '"' : '';
56
+ h += typeof(p.name) != "undefined" ? 'name="' + p.name + '"' : '';
57
+ h += typeof(p.width) != "undefined" ? 'width="' + p.width + '"' : '';
58
+ h += typeof(p.height) != "undefined" ? 'height="' + p.height + '"' : '';
59
+ h += typeof(p.align) != "undefined" ? 'align="' + p.align + '"' : '';
60
+ h += '>';
61
+
62
+ for (n in p)
63
+ h += '<param name="' + n + '" value="' + p[n] + '">';
64
+
65
+ h += '<embed type="' + mt + '"';
66
+
67
+ for (n in p)
68
+ h += n + '="' + p[n] + '" ';
69
+
70
+ h += '></embed></object>';
71
+
72
+ document.write(h);
73
+ }
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/media/js/media.js CHANGED
@@ -1,470 +1,470 @@
1
- (function() {
2
- var url;
3
-
4
- if (url = tinyMCEPopup.getParam("media_external_list_url"))
5
- document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
6
-
7
- function get(id) {
8
- return document.getElementById(id);
9
- }
10
-
11
- function clone(obj) {
12
- var i, len, copy, attr;
13
-
14
- if (null == obj || "object" != typeof obj)
15
- return obj;
16
-
17
- // Handle Array
18
- if ('length' in obj) {
19
- copy = [];
20
-
21
- for (i = 0, len = obj.length; i < len; ++i) {
22
- copy[i] = clone(obj[i]);
23
- }
24
-
25
- return copy;
26
- }
27
-
28
- // Handle Object
29
- copy = {};
30
- for (attr in obj) {
31
- if (obj.hasOwnProperty(attr))
32
- copy[attr] = clone(obj[attr]);
33
- }
34
-
35
- return copy;
36
- }
37
-
38
- function getVal(id) {
39
- var elm = get(id);
40
-
41
- if (elm.nodeName == "SELECT")
42
- return elm.options[elm.selectedIndex].value;
43
-
44
- if (elm.type == "checkbox")
45
- return elm.checked;
46
-
47
- return elm.value;
48
- }
49
-
50
- function setVal(id, value, name) {
51
- if (typeof(value) != 'undefined' && value != null) {
52
- var elm = get(id);
53
-
54
- if (elm.nodeName == "SELECT")
55
- selectByValue(document.forms[0], id, value);
56
- else if (elm.type == "checkbox") {
57
- if (typeof(value) == 'string') {
58
- value = value.toLowerCase();
59
- value = (!name && value === 'true') || (name && value === name.toLowerCase());
60
- }
61
- elm.checked = !!value;
62
- } else
63
- elm.value = value;
64
- }
65
- }
66
-
67
- window.Media = {
68
- init : function() {
69
- var html, editor, self = this;
70
-
71
- self.editor = editor = tinyMCEPopup.editor;
72
-
73
- // Setup file browsers and color pickers
74
- get('filebrowsercontainer').innerHTML = getBrowserHTML('filebrowser','src','media','media');
75
- get('qtsrcfilebrowsercontainer').innerHTML = getBrowserHTML('qtsrcfilebrowser','quicktime_qtsrc','media','media');
76
- get('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
77
- get('video_altsource1_filebrowser').innerHTML = getBrowserHTML('video_filebrowser_altsource1','video_altsource1','media','media');
78
- get('video_altsource2_filebrowser').innerHTML = getBrowserHTML('video_filebrowser_altsource2','video_altsource2','media','media');
79
- get('audio_altsource1_filebrowser').innerHTML = getBrowserHTML('audio_filebrowser_altsource1','audio_altsource1','media','media');
80
- get('audio_altsource2_filebrowser').innerHTML = getBrowserHTML('audio_filebrowser_altsource2','audio_altsource2','media','media');
81
- get('video_poster_filebrowser').innerHTML = getBrowserHTML('filebrowser_poster','video_poster','media','image');
82
-
83
- html = self.getMediaListHTML('medialist', 'src', 'media', 'media');
84
- if (html == "")
85
- get("linklistrow").style.display = 'none';
86
- else
87
- get("linklistcontainer").innerHTML = html;
88
-
89
- if (isVisible('filebrowser'))
90
- get('src').style.width = '230px';
91
-
92
- if (isVisible('video_filebrowser_altsource1'))
93
- get('video_altsource1').style.width = '220px';
94
-
95
- if (isVisible('video_filebrowser_altsource2'))
96
- get('video_altsource2').style.width = '220px';
97
-
98
- if (isVisible('audio_filebrowser_altsource1'))
99
- get('audio_altsource1').style.width = '220px';
100
-
101
- if (isVisible('audio_filebrowser_altsource2'))
102
- get('audio_altsource2').style.width = '220px';
103
-
104
- if (isVisible('filebrowser_poster'))
105
- get('video_poster').style.width = '220px';
106
-
107
- editor.dom.setOuterHTML(get('media_type'), self.getMediaTypeHTML(editor));
108
-
109
- self.setDefaultDialogSettings(editor);
110
- self.data = clone(tinyMCEPopup.getWindowArg('data'));
111
- self.dataToForm();
112
- self.preview();
113
-
114
- updateColor('bgcolor_pick', 'bgcolor');
115
- },
116
-
117
- insert : function() {
118
- var editor = tinyMCEPopup.editor;
119
-
120
- this.formToData();
121
- editor.execCommand('mceRepaint');
122
- tinyMCEPopup.restoreSelection();
123
- editor.selection.setNode(editor.plugins.media.dataToImg(this.data));
124
- tinyMCEPopup.close();
125
- },
126
-
127
- preview : function() {
128
- get('prev').innerHTML = this.editor.plugins.media.dataToHtml(this.data, true);
129
- },
130
-
131
- moveStates : function(to_form, field) {
132
- var data = this.data, editor = this.editor,
133
- mediaPlugin = editor.plugins.media, ext, src, typeInfo, defaultStates, src;
134
-
135
- defaultStates = {
136
- // QuickTime
137
- quicktime_autoplay : true,
138
- quicktime_controller : true,
139
-
140
- // Flash
141
- flash_play : true,
142
- flash_loop : true,
143
- flash_menu : true,
144
-
145
- // WindowsMedia
146
- windowsmedia_autostart : true,
147
- windowsmedia_enablecontextmenu : true,
148
- windowsmedia_invokeurls : true,
149
-
150
- // RealMedia
151
- realmedia_autogotourl : true,
152
- realmedia_imagestatus : true
153
- };
154
-
155
- function parseQueryParams(str) {
156
- var out = {};
157
-
158
- if (str) {
159
- tinymce.each(str.split('&'), function(item) {
160
- var parts = item.split('=');
161
-
162
- out[unescape(parts[0])] = unescape(parts[1]);
163
- });
164
- }
165
-
166
- return out;
167
- };
168
-
169
- function setOptions(type, names) {
170
- var i, name, formItemName, value, list;
171
-
172
- if (type == data.type || type == 'global') {
173
- names = tinymce.explode(names);
174
- for (i = 0; i < names.length; i++) {
175
- name = names[i];
176
- formItemName = type == 'global' ? name : type + '_' + name;
177
-
178
- if (type == 'global')
179
- list = data;
180
- else if (type == 'video' || type == 'audio') {
181
- list = data.video.attrs;
182
-
183
- if (!list && !to_form)
184
- data.video.attrs = list = {};
185
- } else
186
- list = data.params;
187
-
188
- if (list) {
189
- if (to_form) {
190
- setVal(formItemName, list[name], type == 'video' || type == 'audio' ? name : '');
191
- } else {
192
- delete list[name];
193
-
194
- value = getVal(formItemName);
195
- if ((type == 'video' || type == 'audio') && value === true)
196
- value = name;
197
-
198
- if (defaultStates[formItemName]) {
199
- if (value !== defaultStates[formItemName]) {
200
- value = "" + value;
201
- list[name] = value;
202
- }
203
- } else if (value) {
204
- value = "" + value;
205
- list[name] = value;
206
- }
207
- }
208
- }
209
- }
210
- }
211
- }
212
-
213
- if (!to_form) {
214
- data.type = get('media_type').options[get('media_type').selectedIndex].value;
215
- data.width = getVal('width');
216
- data.height = getVal('height');
217
-
218
- // Switch type based on extension
219
- src = getVal('src');
220
- if (field == 'src') {
221
- ext = src.replace(/^.*\.([^.]+)$/, '$1');
222
- if (typeInfo = mediaPlugin.getType(ext))
223
- data.type = typeInfo.name.toLowerCase();
224
-
225
- setVal('media_type', data.type);
226
- }
227
-
228
- if (data.type == "video" || data.type == "audio") {
229
- if (!data.video.sources)
230
- data.video.sources = [];
231
-
232
- data.video.sources[0] = {src: getVal('src')};
233
- }
234
- }
235
-
236
- // Hide all fieldsets and show the one active
237
- get('video_options').style.display = 'none';
238
- get('audio_options').style.display = 'none';
239
- get('flash_options').style.display = 'none';
240
- get('quicktime_options').style.display = 'none';
241
- get('shockwave_options').style.display = 'none';
242
- get('windowsmedia_options').style.display = 'none';
243
- get('realmedia_options').style.display = 'none';
244
- get('embeddedaudio_options').style.display = 'none';
245
-
246
- if (get(data.type + '_options'))
247
- get(data.type + '_options').style.display = 'block';
248
-
249
- setVal('media_type', data.type);
250
-
251
- setOptions('flash', 'play,loop,menu,swliveconnect,quality,scale,salign,wmode,base,flashvars');
252
- setOptions('quicktime', 'loop,autoplay,cache,controller,correction,enablejavascript,kioskmode,autohref,playeveryframe,targetcache,scale,starttime,endtime,target,qtsrcchokespeed,volume,qtsrc');
253
- setOptions('shockwave', 'sound,progress,autostart,swliveconnect,swvolume,swstretchstyle,swstretchhalign,swstretchvalign');
254
- setOptions('windowsmedia', 'autostart,enabled,enablecontextmenu,fullscreen,invokeurls,mute,stretchtofit,windowlessvideo,balance,baseurl,captioningid,currentmarker,currentposition,defaultframe,playcount,rate,uimode,volume');
255
- setOptions('realmedia', 'autostart,loop,autogotourl,center,imagestatus,maintainaspect,nojava,prefetch,shuffle,console,controls,numloop,scriptcallbacks');
256
- setOptions('video', 'poster,autoplay,loop,muted,preload,controls');
257
- setOptions('audio', 'autoplay,loop,preload,controls');
258
- setOptions('embeddedaudio', 'autoplay,loop,controls');
259
- setOptions('global', 'id,name,vspace,hspace,bgcolor,align,width,height');
260
-
261
- if (to_form) {
262
- if (data.type == 'video') {
263
- if (data.video.sources[0])
264
- setVal('src', data.video.sources[0].src);
265
-
266
- src = data.video.sources[1];
267
- if (src)
268
- setVal('video_altsource1', src.src);
269
-
270
- src = data.video.sources[2];
271
- if (src)
272
- setVal('video_altsource2', src.src);
273
- } else if (data.type == 'audio') {
274
- if (data.video.sources[0])
275
- setVal('src', data.video.sources[0].src);
276
-
277
- src = data.video.sources[1];
278
- if (src)
279
- setVal('audio_altsource1', src.src);
280
-
281
- src = data.video.sources[2];
282
- if (src)
283
- setVal('audio_altsource2', src.src);
284
- } else {
285
- // Check flash vars
286
- if (data.type == 'flash') {
287
- tinymce.each(editor.getParam('flash_video_player_flashvars', {url : '$url', poster : '$poster'}), function(value, name) {
288
- if (value == '$url')
289
- data.params.src = parseQueryParams(data.params.flashvars)[name] || data.params.src || '';
290
- });
291
- }
292
-
293
- setVal('src', data.params.src);
294
- }
295
- } else {
296
- src = getVal("src");
297
-
298
- // YouTube *NEW*
299
- if (src.match(/youtu.be\/[a-z1-9.-_]+/)) {
300
- data.width = 425;
301
- data.height = 350;
302
- data.params.frameborder = '0';
303
- data.type = 'iframe';
304
- src = 'http://www.youtube.com/embed/' + src.match(/youtu.be\/([a-z1-9.-_]+)/)[1];
305
- setVal('src', src);
306
- setVal('media_type', data.type);
307
- }
308
-
309
- // YouTube
310
- if (src.match(/youtube.com(.+)v=([^&]+)/)) {
311
- data.width = 425;
312
- data.height = 350;
313
- data.params.frameborder = '0';
314
- data.type = 'iframe';
315
- src = 'http://www.youtube.com/embed/' + src.match(/v=([^&]+)/)[1];
316
- setVal('src', src);
317
- setVal('media_type', data.type);
318
- }
319
-
320
- // Google video
321
- if (src.match(/video.google.com(.+)docid=([^&]+)/)) {
322
- data.width = 425;
323
- data.height = 326;
324
- data.type = 'flash';
325
- src = 'http://video.google.com/googleplayer.swf?docId=' + src.match(/docid=([^&]+)/)[1] + '&hl=en';
326
- setVal('src', src);
327
- setVal('media_type', data.type);
328
- }
329
-
330
- if (data.type == 'video') {
331
- if (!data.video.sources)
332
- data.video.sources = [];
333
-
334
- data.video.sources[0] = {src : src};
335
-
336
- src = getVal("video_altsource1");
337
- if (src)
338
- data.video.sources[1] = {src : src};
339
-
340
- src = getVal("video_altsource2");
341
- if (src)
342
- data.video.sources[2] = {src : src};
343
- } else if (data.type == 'audio') {
344
- if (!data.video.sources)
345
- data.video.sources = [];
346
-
347
- data.video.sources[0] = {src : src};
348
-
349
- src = getVal("audio_altsource1");
350
- if (src)
351
- data.video.sources[1] = {src : src};
352
-
353
- src = getVal("audio_altsource2");
354
- if (src)
355
- data.video.sources[2] = {src : src};
356
- } else
357
- data.params.src = src;
358
-
359
- // Set default size
360
- setVal('width', data.width || (data.type == 'audio' ? 300 : 320));
361
- setVal('height', data.height || (data.type == 'audio' ? 32 : 240));
362
- }
363
- },
364
-
365
- dataToForm : function() {
366
- this.moveStates(true);
367
- },
368
-
369
- formToData : function(field) {
370
- if (field == "width" || field == "height")
371
- this.changeSize(field);
372
-
373
- if (field == 'source') {
374
- this.moveStates(false, field);
375
- setVal('source', this.editor.plugins.media.dataToHtml(this.data));
376
- this.panel = 'source';
377
- } else {
378
- if (this.panel == 'source') {
379
- this.data = clone(this.editor.plugins.media.htmlToData(getVal('source')));
380
- this.dataToForm();
381
- this.panel = '';
382
- }
383
-
384
- this.moveStates(false, field);
385
- this.preview();
386
- }
387
- },
388
-
389
- beforeResize : function() {
390
- this.width = parseInt(getVal('width') || (this.data.type == 'audio' ? "300" : "320"), 10);
391
- this.height = parseInt(getVal('height') || (this.data.type == 'audio' ? "32" : "240"), 10);
392
- },
393
-
394
- changeSize : function(type) {
395
- var width, height, scale, size;
396
-
397
- if (get('constrain').checked) {
398
- width = parseInt(getVal('width') || (this.data.type == 'audio' ? "300" : "320"), 10);
399
- height = parseInt(getVal('height') || (this.data.type == 'audio' ? "32" : "240"), 10);
400
-
401
- if (type == 'width') {
402
- this.height = Math.round((width / this.width) * height);
403
- setVal('height', this.height);
404
- } else {
405
- this.width = Math.round((height / this.height) * width);
406
- setVal('width', this.width);
407
- }
408
- }
409
- },
410
-
411
- getMediaListHTML : function() {
412
- if (typeof(tinyMCEMediaList) != "undefined" && tinyMCEMediaList.length > 0) {
413
- var html = "";
414
-
415
- html += '<select id="linklist" name="linklist" style="width: 250px" onchange="this.form.src.value=this.options[this.selectedIndex].value;Media.formToData(\'src\');">';
416
- html += '<option value="">---</option>';
417
-
418
- for (var i=0; i<tinyMCEMediaList.length; i++)
419
- html += '<option value="' + tinyMCEMediaList[i][1] + '">' + tinyMCEMediaList[i][0] + '</option>';
420
-
421
- html += '</select>';
422
-
423
- return html;
424
- }
425
-
426
- return "";
427
- },
428
-
429
- getMediaTypeHTML : function(editor) {
430
- function option(media_type, element) {
431
- if (!editor.schema.getElementRule(element || media_type)) {
432
- return '';
433
- }
434
-
435
- return '<option value="'+media_type+'">'+tinyMCEPopup.editor.translate("media_dlg."+media_type)+'</option>'
436
- }
437
-
438
- var html = "";
439
-
440
- html += '<select id="media_type" name="media_type" onchange="Media.formToData(\'type\');">';
441
- html += option("video");
442
- html += option("audio");
443
- html += option("flash", "object");
444
- html += option("quicktime", "object");
445
- html += option("shockwave", "object");
446
- html += option("windowsmedia", "object");
447
- html += option("realmedia", "object");
448
- html += option("iframe");
449
-
450
- if (editor.getParam('media_embedded_audio', false)) {
451
- html += option('embeddedaudio', "object");
452
- }
453
-
454
- html += '</select>';
455
- return html;
456
- },
457
-
458
- setDefaultDialogSettings : function(editor) {
459
- var defaultDialogSettings = editor.getParam("media_dialog_defaults", {});
460
- tinymce.each(defaultDialogSettings, function(v, k) {
461
- setVal(k, v);
462
- });
463
- }
464
- };
465
-
466
- tinyMCEPopup.requireLangPack();
467
- tinyMCEPopup.onInit.add(function() {
468
- Media.init();
469
- });
470
- })();
1
+ (function() {
2
+ var url;
3
+
4
+ if (url = tinyMCEPopup.getParam("media_external_list_url"))
5
+ document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
6
+
7
+ function get(id) {
8
+ return document.getElementById(id);
9
+ }
10
+
11
+ function clone(obj) {
12
+ var i, len, copy, attr;
13
+
14
+ if (null == obj || "object" != typeof obj)
15
+ return obj;
16
+
17
+ // Handle Array
18
+ if ('length' in obj) {
19
+ copy = [];
20
+
21
+ for (i = 0, len = obj.length; i < len; ++i) {
22
+ copy[i] = clone(obj[i]);
23
+ }
24
+
25
+ return copy;
26
+ }
27
+
28
+ // Handle Object
29
+ copy = {};
30
+ for (attr in obj) {
31
+ if (obj.hasOwnProperty(attr))
32
+ copy[attr] = clone(obj[attr]);
33
+ }
34
+
35
+ return copy;
36
+ }
37
+
38
+ function getVal(id) {
39
+ var elm = get(id);
40
+
41
+ if (elm.nodeName == "SELECT")
42
+ return elm.options[elm.selectedIndex].value;
43
+
44
+ if (elm.type == "checkbox")
45
+ return elm.checked;
46
+
47
+ return elm.value;
48
+ }
49
+
50
+ function setVal(id, value, name) {
51
+ if (typeof(value) != 'undefined' && value != null) {
52
+ var elm = get(id);
53
+
54
+ if (elm.nodeName == "SELECT")
55
+ selectByValue(document.forms[0], id, value);
56
+ else if (elm.type == "checkbox") {
57
+ if (typeof(value) == 'string') {
58
+ value = value.toLowerCase();
59
+ value = (!name && value === 'true') || (name && value === name.toLowerCase());
60
+ }
61
+ elm.checked = !!value;
62
+ } else
63
+ elm.value = value;
64
+ }
65
+ }
66
+
67
+ window.Media = {
68
+ init : function() {
69
+ var html, editor, self = this;
70
+
71
+ self.editor = editor = tinyMCEPopup.editor;
72
+
73
+ // Setup file browsers and color pickers
74
+ get('filebrowsercontainer').innerHTML = getBrowserHTML('filebrowser','src','media','media');
75
+ get('qtsrcfilebrowsercontainer').innerHTML = getBrowserHTML('qtsrcfilebrowser','quicktime_qtsrc','media','media');
76
+ get('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
77
+ get('video_altsource1_filebrowser').innerHTML = getBrowserHTML('video_filebrowser_altsource1','video_altsource1','media','media');
78
+ get('video_altsource2_filebrowser').innerHTML = getBrowserHTML('video_filebrowser_altsource2','video_altsource2','media','media');
79
+ get('audio_altsource1_filebrowser').innerHTML = getBrowserHTML('audio_filebrowser_altsource1','audio_altsource1','media','media');
80
+ get('audio_altsource2_filebrowser').innerHTML = getBrowserHTML('audio_filebrowser_altsource2','audio_altsource2','media','media');
81
+ get('video_poster_filebrowser').innerHTML = getBrowserHTML('filebrowser_poster','video_poster','media','image');
82
+
83
+ html = self.getMediaListHTML('medialist', 'src', 'media', 'media');
84
+ if (html == "")
85
+ get("linklistrow").style.display = 'none';
86
+ else
87
+ get("linklistcontainer").innerHTML = html;
88
+
89
+ if (isVisible('filebrowser'))
90
+ get('src').style.width = '230px';
91
+
92
+ if (isVisible('video_filebrowser_altsource1'))
93
+ get('video_altsource1').style.width = '220px';
94
+
95
+ if (isVisible('video_filebrowser_altsource2'))
96
+ get('video_altsource2').style.width = '220px';
97
+
98
+ if (isVisible('audio_filebrowser_altsource1'))
99
+ get('audio_altsource1').style.width = '220px';
100
+
101
+ if (isVisible('audio_filebrowser_altsource2'))
102
+ get('audio_altsource2').style.width = '220px';
103
+
104
+ if (isVisible('filebrowser_poster'))
105
+ get('video_poster').style.width = '220px';
106
+
107
+ editor.dom.setOuterHTML(get('media_type'), self.getMediaTypeHTML(editor));
108
+
109
+ self.setDefaultDialogSettings(editor);
110
+ self.data = clone(tinyMCEPopup.getWindowArg('data'));
111
+ self.dataToForm();
112
+ self.preview();
113
+
114
+ updateColor('bgcolor_pick', 'bgcolor');
115
+ },
116
+
117
+ insert : function() {
118
+ var editor = tinyMCEPopup.editor;
119
+
120
+ this.formToData();
121
+ editor.execCommand('mceRepaint');
122
+ tinyMCEPopup.restoreSelection();
123
+ editor.selection.setNode(editor.plugins.media.dataToImg(this.data));
124
+ tinyMCEPopup.close();
125
+ },
126
+
127
+ preview : function() {
128
+ get('prev').innerHTML = this.editor.plugins.media.dataToHtml(this.data, true);
129
+ },
130
+
131
+ moveStates : function(to_form, field) {
132
+ var data = this.data, editor = this.editor,
133
+ mediaPlugin = editor.plugins.media, ext, src, typeInfo, defaultStates, src;
134
+
135
+ defaultStates = {
136
+ // QuickTime
137
+ quicktime_autoplay : true,
138
+ quicktime_controller : true,
139
+
140
+ // Flash
141
+ flash_play : true,
142
+ flash_loop : true,
143
+ flash_menu : true,
144
+
145
+ // WindowsMedia
146
+ windowsmedia_autostart : true,
147
+ windowsmedia_enablecontextmenu : true,
148
+ windowsmedia_invokeurls : true,
149
+
150
+ // RealMedia
151
+ realmedia_autogotourl : true,
152
+ realmedia_imagestatus : true
153
+ };
154
+
155
+ function parseQueryParams(str) {
156
+ var out = {};
157
+
158
+ if (str) {
159
+ tinymce.each(str.split('&'), function(item) {
160
+ var parts = item.split('=');
161
+
162
+ out[unescape(parts[0])] = unescape(parts[1]);
163
+ });
164
+ }
165
+
166
+ return out;
167
+ };
168
+
169
+ function setOptions(type, names) {
170
+ var i, name, formItemName, value, list;
171
+
172
+ if (type == data.type || type == 'global') {
173
+ names = tinymce.explode(names);
174
+ for (i = 0; i < names.length; i++) {
175
+ name = names[i];
176
+ formItemName = type == 'global' ? name : type + '_' + name;
177
+
178
+ if (type == 'global')
179
+ list = data;
180
+ else if (type == 'video' || type == 'audio') {
181
+ list = data.video.attrs;
182
+
183
+ if (!list && !to_form)
184
+ data.video.attrs = list = {};
185
+ } else
186
+ list = data.params;
187
+
188
+ if (list) {
189
+ if (to_form) {
190
+ setVal(formItemName, list[name], type == 'video' || type == 'audio' ? name : '');
191
+ } else {
192
+ delete list[name];
193
+
194
+ value = getVal(formItemName);
195
+ if ((type == 'video' || type == 'audio') && value === true)
196
+ value = name;
197
+
198
+ if (defaultStates[formItemName]) {
199
+ if (value !== defaultStates[formItemName]) {
200
+ value = "" + value;
201
+ list[name] = value;
202
+ }
203
+ } else if (value) {
204
+ value = "" + value;
205
+ list[name] = value;
206
+ }
207
+ }
208
+ }
209
+ }
210
+ }
211
+ }
212
+
213
+ if (!to_form) {
214
+ data.type = get('media_type').options[get('media_type').selectedIndex].value;
215
+ data.width = getVal('width');
216
+ data.height = getVal('height');
217
+
218
+ // Switch type based on extension
219
+ src = getVal('src');
220
+ if (field == 'src') {
221
+ ext = src.replace(/^.*\.([^.]+)$/, '$1');
222
+ if (typeInfo = mediaPlugin.getType(ext))
223
+ data.type = typeInfo.name.toLowerCase();
224
+
225
+ setVal('media_type', data.type);
226
+ }
227
+
228
+ if (data.type == "video" || data.type == "audio") {
229
+ if (!data.video.sources)
230
+ data.video.sources = [];
231
+
232
+ data.video.sources[0] = {src: getVal('src')};
233
+ }
234
+ }
235
+
236
+ // Hide all fieldsets and show the one active
237
+ get('video_options').style.display = 'none';
238
+ get('audio_options').style.display = 'none';
239
+ get('flash_options').style.display = 'none';
240
+ get('quicktime_options').style.display = 'none';
241
+ get('shockwave_options').style.display = 'none';
242
+ get('windowsmedia_options').style.display = 'none';
243
+ get('realmedia_options').style.display = 'none';
244
+ get('embeddedaudio_options').style.display = 'none';
245
+
246
+ if (get(data.type + '_options'))
247
+ get(data.type + '_options').style.display = 'block';
248
+
249
+ setVal('media_type', data.type);
250
+
251
+ setOptions('flash', 'play,loop,menu,swliveconnect,quality,scale,salign,wmode,base,flashvars');
252
+ setOptions('quicktime', 'loop,autoplay,cache,controller,correction,enablejavascript,kioskmode,autohref,playeveryframe,targetcache,scale,starttime,endtime,target,qtsrcchokespeed,volume,qtsrc');
253
+ setOptions('shockwave', 'sound,progress,autostart,swliveconnect,swvolume,swstretchstyle,swstretchhalign,swstretchvalign');
254
+ setOptions('windowsmedia', 'autostart,enabled,enablecontextmenu,fullscreen,invokeurls,mute,stretchtofit,windowlessvideo,balance,baseurl,captioningid,currentmarker,currentposition,defaultframe,playcount,rate,uimode,volume');
255
+ setOptions('realmedia', 'autostart,loop,autogotourl,center,imagestatus,maintainaspect,nojava,prefetch,shuffle,console,controls,numloop,scriptcallbacks');
256
+ setOptions('video', 'poster,autoplay,loop,muted,preload,controls');
257
+ setOptions('audio', 'autoplay,loop,preload,controls');
258
+ setOptions('embeddedaudio', 'autoplay,loop,controls');
259
+ setOptions('global', 'id,name,vspace,hspace,bgcolor,align,width,height');
260
+
261
+ if (to_form) {
262
+ if (data.type == 'video') {
263
+ if (data.video.sources[0])
264
+ setVal('src', data.video.sources[0].src);
265
+
266
+ src = data.video.sources[1];
267
+ if (src)
268
+ setVal('video_altsource1', src.src);
269
+
270
+ src = data.video.sources[2];
271
+ if (src)
272
+ setVal('video_altsource2', src.src);
273
+ } else if (data.type == 'audio') {
274
+ if (data.video.sources[0])
275
+ setVal('src', data.video.sources[0].src);
276
+
277
+ src = data.video.sources[1];
278
+ if (src)
279
+ setVal('audio_altsource1', src.src);
280
+
281
+ src = data.video.sources[2];
282
+ if (src)
283
+ setVal('audio_altsource2', src.src);
284
+ } else {
285
+ // Check flash vars
286
+ if (data.type == 'flash') {
287
+ tinymce.each(editor.getParam('flash_video_player_flashvars', {url : '$url', poster : '$poster'}), function(value, name) {
288
+ if (value == '$url')
289
+ data.params.src = parseQueryParams(data.params.flashvars)[name] || data.params.src || '';
290
+ });
291
+ }
292
+
293
+ setVal('src', data.params.src);
294
+ }
295
+ } else {
296
+ src = getVal("src");
297
+
298
+ // YouTube *NEW*
299
+ if (src.match(/youtu.be\/[a-z1-9.-_]+/)) {
300
+ data.width = 425;
301
+ data.height = 350;
302
+ data.params.frameborder = '0';
303
+ data.type = 'iframe';
304
+ src = 'http://www.youtube.com/embed/' + src.match(/youtu.be\/([a-z1-9.-_]+)/)[1];
305
+ setVal('src', src);
306
+ setVal('media_type', data.type);
307
+ }
308
+
309
+ // YouTube
310
+ if (src.match(/youtube.com(.+)v=([^&]+)/)) {
311
+ data.width = 425;
312
+ data.height = 350;
313
+ data.params.frameborder = '0';
314
+ data.type = 'iframe';
315
+ src = 'http://www.youtube.com/embed/' + src.match(/v=([^&]+)/)[1];
316
+ setVal('src', src);
317
+ setVal('media_type', data.type);
318
+ }
319
+
320
+ // Google video
321
+ if (src.match(/video.google.com(.+)docid=([^&]+)/)) {
322
+ data.width = 425;
323
+ data.height = 326;
324
+ data.type = 'flash';
325
+ src = 'http://video.google.com/googleplayer.swf?docId=' + src.match(/docid=([^&]+)/)[1] + '&hl=en';
326
+ setVal('src', src);
327
+ setVal('media_type', data.type);
328
+ }
329
+
330
+ if (data.type == 'video') {
331
+ if (!data.video.sources)
332
+ data.video.sources = [];
333
+
334
+ data.video.sources[0] = {src : src};
335
+
336
+ src = getVal("video_altsource1");
337
+ if (src)
338
+ data.video.sources[1] = {src : src};
339
+
340
+ src = getVal("video_altsource2");
341
+ if (src)
342
+ data.video.sources[2] = {src : src};
343
+ } else if (data.type == 'audio') {
344
+ if (!data.video.sources)
345
+ data.video.sources = [];
346
+
347
+ data.video.sources[0] = {src : src};
348
+
349
+ src = getVal("audio_altsource1");
350
+ if (src)
351
+ data.video.sources[1] = {src : src};
352
+
353
+ src = getVal("audio_altsource2");
354
+ if (src)
355
+ data.video.sources[2] = {src : src};
356
+ } else
357
+ data.params.src = src;
358
+
359
+ // Set default size
360
+ setVal('width', data.width || (data.type == 'audio' ? 300 : 320));
361
+ setVal('height', data.height || (data.type == 'audio' ? 32 : 240));
362
+ }
363
+ },
364
+
365
+ dataToForm : function() {
366
+ this.moveStates(true);
367
+ },
368
+
369
+ formToData : function(field) {
370
+ if (field == "width" || field == "height")
371
+ this.changeSize(field);
372
+
373
+ if (field == 'source') {
374
+ this.moveStates(false, field);
375
+ setVal('source', this.editor.plugins.media.dataToHtml(this.data));
376
+ this.panel = 'source';
377
+ } else {
378
+ if (this.panel == 'source') {
379
+ this.data = clone(this.editor.plugins.media.htmlToData(getVal('source')));
380
+ this.dataToForm();
381
+ this.panel = '';
382
+ }
383
+
384
+ this.moveStates(false, field);
385
+ this.preview();
386
+ }
387
+ },
388
+
389
+ beforeResize : function() {
390
+ this.width = parseInt(getVal('width') || (this.data.type == 'audio' ? "300" : "320"), 10);
391
+ this.height = parseInt(getVal('height') || (this.data.type == 'audio' ? "32" : "240"), 10);
392
+ },
393
+
394
+ changeSize : function(type) {
395
+ var width, height, scale, size;
396
+
397
+ if (get('constrain').checked) {
398
+ width = parseInt(getVal('width') || (this.data.type == 'audio' ? "300" : "320"), 10);
399
+ height = parseInt(getVal('height') || (this.data.type == 'audio' ? "32" : "240"), 10);
400
+
401
+ if (type == 'width') {
402
+ this.height = Math.round((width / this.width) * height);
403
+ setVal('height', this.height);
404
+ } else {
405
+ this.width = Math.round((height / this.height) * width);
406
+ setVal('width', this.width);
407
+ }
408
+ }
409
+ },
410
+
411
+ getMediaListHTML : function() {
412
+ if (typeof(tinyMCEMediaList) != "undefined" && tinyMCEMediaList.length > 0) {
413
+ var html = "";
414
+
415
+ html += '<select id="linklist" name="linklist" style="width: 250px" onchange="this.form.src.value=this.options[this.selectedIndex].value;Media.formToData(\'src\');">';
416
+ html += '<option value="">---</option>';
417
+
418
+ for (var i=0; i<tinyMCEMediaList.length; i++)
419
+ html += '<option value="' + tinyMCEMediaList[i][1] + '">' + tinyMCEMediaList[i][0] + '</option>';
420
+
421
+ html += '</select>';
422
+
423
+ return html;
424
+ }
425
+
426
+ return "";
427
+ },
428
+
429
+ getMediaTypeHTML : function(editor) {
430
+ function option(media_type, element) {
431
+ if (!editor.schema.getElementRule(element || media_type)) {
432
+ return '';
433
+ }
434
+
435
+ return '<option value="'+media_type+'">'+tinyMCEPopup.editor.translate("media_dlg."+media_type)+'</option>'
436
+ }
437
+
438
+ var html = "";
439
+
440
+ html += '<select id="media_type" name="media_type" onchange="Media.formToData(\'type\');">';
441
+ html += option("video");
442
+ html += option("audio");
443
+ html += option("flash", "object");
444
+ html += option("quicktime", "object");
445
+ html += option("shockwave", "object");
446
+ html += option("windowsmedia", "object");
447
+ html += option("realmedia", "object");
448
+ html += option("iframe");
449
+
450
+ if (editor.getParam('media_embedded_audio', false)) {
451
+ html += option('embeddedaudio', "object");
452
+ }
453
+
454
+ html += '</select>';
455
+ return html;
456
+ },
457
+
458
+ setDefaultDialogSettings : function(editor) {
459
+ var defaultDialogSettings = editor.getParam("media_dialog_defaults", {});
460
+ tinymce.each(defaultDialogSettings, function(v, k) {
461
+ setVal(k, v);
462
+ });
463
+ }
464
+ };
465
+
466
+ tinyMCEPopup.requireLangPack();
467
+ tinyMCEPopup.onInit.add(function() {
468
+ Media.init();
469
+ });
470
+ })();
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/media/langs/en_dlg.js CHANGED
@@ -1 +1 @@
1
- tinyMCE.addI18n('en.media_dlg',{list:"List",file:"File/URL",advanced:"Advanced",general:"General",title:"Insert/Edit Embedded Media","align_top_left":"Top Left","align_center":"Center","align_left":"Left","align_bottom":"Bottom","align_right":"Right","align_top":"Top","qt_stream_warn":"Streamed RTSP resources should be added to the QT Source field under the Advanced tab.\nYou should also add a non-streamed version to the Source field.",qtsrc:"QT Source",progress:"Progress",sound:"Sound",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch Style",scriptcallbacks:"Script Callbacks","align_top_right":"Top Right",uimode:"UI Mode",rate:"Rate",playcount:"Play Count",defaultframe:"Default Frame",currentposition:"Current Position",currentmarker:"Current Marker",captioningid:"Captioning ID",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Windowless Video",stretchtofit:"Stretch to Fit",mute:"Mute",invokeurls:"Invoke URLs",fullscreen:"Full Screen",enabled:"Enabled",autostart:"Auto Start",volume:"Volume",target:"Target",qtsrcchokespeed:"Choke Speed",href:"HREF",endtime:"End Time",starttime:"Start Time",enablejavascript:"Enable JavaScript",correction:"No Correction",targetcache:"Target Cache",playeveryframe:"Play Every Frame",kioskmode:"Kiosk Mode",controller:"Controller",menu:"Show Menu",loop:"Loop",play:"Auto Play",hspace:"H-Space",vspace:"V-Space","class_name":"Class",name:"Name",id:"ID",type:"Type",size:"Dimensions",preview:"Preview","constrain_proportions":"Constrain Proportions",controls:"Controls",numloop:"Num Loops",console:"Console",cache:"Cache",autohref:"Auto HREF",liveconnect:"SWLiveConnect",flashvars:"Flash Vars",base:"Base",bgcolor:"Background",wmode:"WMode",salign:"SAlign",align:"Align",scale:"Scale",quality:"Quality",shuffle:"Shuffle",prefetch:"Prefetch",nojava:"No Java",maintainaspect:"Maintain Aspect",imagestatus:"Image Status",center:"Center",autogotourl:"Auto Goto URL","shockwave_options":"Shockwave Options","rmp_options":"Real Media Player Options","wmp_options":"Windows Media Player Options","qt_options":"QuickTime Options","flash_options":"Flash Options",hidden:"Hidden","align_bottom_left":"Bottom Left","align_bottom_right":"Bottom Right","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",preload:"Preload",poster:"Poster",source:"Source","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide", "embedded_audio_options":"Embedded Audio Options", video:"HTML5 Video", audio:"HTML5 Audio", flash:"Flash", quicktime:"QuickTime", shockwave:"Shockwave", windowsmedia:"Windows Media", realmedia:"Real Media", iframe:"Iframe", embeddedaudio:"Embedded Audio" });
1
+ tinyMCE.addI18n('en.media_dlg',{list:"List",file:"File/URL",advanced:"Advanced",general:"General",title:"Insert/Edit Embedded Media","align_top_left":"Top Left","align_center":"Center","align_left":"Left","align_bottom":"Bottom","align_right":"Right","align_top":"Top","qt_stream_warn":"Streamed RTSP resources should be added to the QT Source field under the Advanced tab.\nYou should also add a non-streamed version to the Source field.",qtsrc:"QT Source",progress:"Progress",sound:"Sound",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch Style",scriptcallbacks:"Script Callbacks","align_top_right":"Top Right",uimode:"UI Mode",rate:"Rate",playcount:"Play Count",defaultframe:"Default Frame",currentposition:"Current Position",currentmarker:"Current Marker",captioningid:"Captioning ID",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Windowless Video",stretchtofit:"Stretch to Fit",mute:"Mute",invokeurls:"Invoke URLs",fullscreen:"Full Screen",enabled:"Enabled",autostart:"Auto Start",volume:"Volume",target:"Target",qtsrcchokespeed:"Choke Speed",href:"HREF",endtime:"End Time",starttime:"Start Time",enablejavascript:"Enable JavaScript",correction:"No Correction",targetcache:"Target Cache",playeveryframe:"Play Every Frame",kioskmode:"Kiosk Mode",controller:"Controller",menu:"Show Menu",loop:"Loop",play:"Auto Play",hspace:"H-Space",vspace:"V-Space","class_name":"Class",name:"Name",id:"ID",type:"Type",size:"Dimensions",preview:"Preview","constrain_proportions":"Constrain Proportions",controls:"Controls",numloop:"Num Loops",console:"Console",cache:"Cache",autohref:"Auto HREF",liveconnect:"SWLiveConnect",flashvars:"Flash Vars",base:"Base",bgcolor:"Background",wmode:"WMode",salign:"SAlign",align:"Align",scale:"Scale",quality:"Quality",shuffle:"Shuffle",prefetch:"Prefetch",nojava:"No Java",maintainaspect:"Maintain Aspect",imagestatus:"Image Status",center:"Center",autogotourl:"Auto Goto URL","shockwave_options":"Shockwave Options","rmp_options":"Real Media Player Options","wmp_options":"Windows Media Player Options","qt_options":"QuickTime Options","flash_options":"Flash Options",hidden:"Hidden","align_bottom_left":"Bottom Left","align_bottom_right":"Bottom Right","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",preload:"Preload",poster:"Poster",source:"Source","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide", "embedded_audio_options":"Embedded Audio Options", video:"HTML5 Video", audio:"HTML5 Audio", flash:"Flash", quicktime:"QuickTime", shockwave:"Shockwave", windowsmedia:"Windows Media", realmedia:"Real Media", iframe:"Iframe", embeddedaudio:"Embedded Audio" });
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/media/media.htm CHANGED
@@ -1,922 +1,922 @@
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>{#media_dlg.title}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
6
- <script type="text/javascript" src="js/media.js"></script>
7
- <script type="text/javascript" src="../../utils/mctabs.js"></script>
8
- <script type="text/javascript" src="../../utils/validate.js"></script>
9
- <script type="text/javascript" src="../../utils/form_utils.js"></script>
10
- <script type="text/javascript" src="../../utils/editable_selects.js"></script>
11
- <link href="css/media.css" rel="stylesheet" type="text/css" />
12
- </head>
13
- <body style="display: none" role="application">
14
- <form onsubmit="Media.insert();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');Media.formToData();" onmousedown="return false;">{#media_dlg.general}</a></span></li>
18
- <li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');Media.formToData();" onmousedown="return false;">{#media_dlg.advanced}</a></span></li>
19
- <li id="source_tab" aria-controls="source_panel"><span><a href="javascript:mcTabs.displayTab('source_tab','source_panel');Media.formToData('source');" onmousedown="return false;">{#media_dlg.source}</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>{#media_dlg.general}</legend>
27
-
28
- <table role="presentation" border="0" cellpadding="4" cellspacing="0">
29
- <tr>
30
- <td><label for="media_type">{#media_dlg.type}</label></td>
31
- <td>
32
- <select id="media_type"></select>
33
- </td>
34
- </tr>
35
- <tr>
36
- <td><label for="src">{#media_dlg.file}</label></td>
37
- <td>
38
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
39
- <tr>
40
- <td><input id="src" name="src" type="text" value="" class="mceFocus" onchange="Media.formToData();" /></td>
41
- <td id="filebrowsercontainer">&nbsp;</td>
42
- </tr>
43
- </table>
44
- </td>
45
- </tr>
46
- <tr id="linklistrow">
47
- <td><label for="linklist">{#media_dlg.list}</label></td>
48
- <td id="linklistcontainer"><select id="linklist"><option value=""></option></select></td>
49
- </tr>
50
- <tr>
51
- <td><label for="width">{#media_dlg.size}</label></td>
52
- <td>
53
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
54
- <tr>
55
- <td><input type="text" id="width" name="width" value="" class="size" onchange="Media.formToData('width');" onfocus="Media.beforeResize();" /> x <input type="text" id="height" name="height" value="" class="size" onfocus="Media.beforeResize();" onchange="Media.formToData('height');" /></td>
56
- <td>&nbsp;&nbsp;<input id="constrain" type="checkbox" name="constrain" class="checkbox" checked="checked" /></td>
57
- <td><label id="constrainlabel" for="constrain">{#media_dlg.constrain_proportions}</label></td>
58
- </tr>
59
- </table>
60
- </td>
61
- </tr>
62
- </table>
63
- </fieldset>
64
-
65
- <fieldset>
66
- <legend>{#media_dlg.preview}</legend>
67
- <div id="prev"></div>
68
- </fieldset>
69
- </div>
70
-
71
- <div id="advanced_panel" class="panel">
72
- <fieldset>
73
- <legend>{#media_dlg.advanced}</legend>
74
-
75
- <table role="presentation" border="0" cellpadding="4" cellspacing="0" width="100%">
76
- <tr>
77
- <td><label for="id">{#media_dlg.id}</label></td>
78
- <td><input type="text" id="id" name="id" onchange="Media.formToData();" /></td>
79
- <td><label for="name">{#media_dlg.name}</label></td>
80
- <td><input type="text" id="name" name="name" onchange="Media.formToData();" /></td>
81
- </tr>
82
-
83
- <tr>
84
- <td><label for="align">{#media_dlg.align}</label></td>
85
- <td>
86
- <select id="align" name="align" onchange="Media.formToData();">
87
- <option value="">{#not_set}</option>
88
- <option value="top">{#media_dlg.align_top}</option>
89
- <option value="right">{#media_dlg.align_right}</option>
90
- <option value="bottom">{#media_dlg.align_bottom}</option>
91
- <option value="left">{#media_dlg.align_left}</option>
92
- </select>
93
- </td>
94
-
95
- <td><label for="bgcolor">{#media_dlg.bgcolor}</label></td>
96
- <td>
97
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
98
- <tr>
99
- <td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');Media.formToData();" /></td>
100
- <td id="bgcolor_pickcontainer">&nbsp;</td>
101
- </tr>
102
- </table>
103
- </td>
104
- </tr>
105
-
106
- <tr>
107
- <td><label for="vspace">{#media_dlg.vspace}</label></td>
108
- <td><input type="text" id="vspace" name="vspace" class="number" onchange="Media.formToData();" /></td>
109
- <td><label for="hspace">{#media_dlg.hspace}</label></td>
110
- <td><input type="text" id="hspace" name="hspace" class="number" onchange="Media.formToData();" /></td>
111
- </tr>
112
- </table>
113
- </fieldset>
114
-
115
- <fieldset id="video_options">
116
- <legend>{#media_dlg.html5_video_options}</legend>
117
-
118
- <table role="presentation">
119
- <tr>
120
- <td><label for="video_altsource1">{#media_dlg.altsource1}</label></td>
121
- <td>
122
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
123
- <tr>
124
- <td><input type="text" id="video_altsource1" name="video_altsource1" onchange="Media.formToData();" style="width: 240px" /></td>
125
- <td id="video_altsource1_filebrowser">&nbsp;</td>
126
- </tr>
127
- </table>
128
- </td>
129
- </tr>
130
-
131
- <tr>
132
- <td><label for="video_altsource2">{#media_dlg.altsource2}</label></td>
133
- <td>
134
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
135
- <tr>
136
- <td><input type="text" id="video_altsource2" name="video_altsource2" onchange="Media.formToData();" style="width: 240px" /></td>
137
- <td id="video_altsource2_filebrowser">&nbsp;</td>
138
- </tr>
139
- </table>
140
- </td>
141
- </tr>
142
-
143
- <tr>
144
- <td><label for="video_poster">{#media_dlg.poster}</label></td>
145
- <td>
146
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
147
- <tr>
148
- <td><input type="text" id="video_poster" name="video_poster" onchange="Media.formToData();" style="width: 240px" /></td>
149
- <td id="video_poster_filebrowser">&nbsp;</td>
150
- </tr>
151
- </table>
152
- </td>
153
- </tr>
154
-
155
- <tr>
156
- <td><label for="video_preload">{#media_dlg.preload}</label></td>
157
- <td>
158
- <select id="video_preload" name="video_preload" onchange="Media.formToData();">
159
- <option value="none">{#media_dlg.preload_none}</option>
160
- <option value="metadata">{#media_dlg.preload_metadata}</option>
161
- <option value="auto">{#media_dlg.preload_auto}</option>
162
- </select>
163
- </td>
164
- </tr>
165
- </table>
166
-
167
- <table role="presentation" border="0" cellpadding="4" cellspacing="0">
168
- <tr>
169
- <td>
170
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
171
- <tr>
172
- <td><input type="checkbox" class="checkbox" id="video_autoplay" name="video_autoplay" onchange="Media.formToData();" /></td>
173
- <td><label for="video_autoplay">{#media_dlg.play}</label></td>
174
- </tr>
175
- </table>
176
- </td>
177
-
178
- <td>
179
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
180
- <tr>
181
- <td><input type="checkbox" class="checkbox" id="video_muted" name="video_muted" onchange="Media.formToData();" /></td>
182
- <td><label for="video_muted">{#media_dlg.mute}</label></td>
183
- </tr>
184
- </table>
185
- </td>
186
-
187
- <td>
188
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
189
- <tr>
190
- <td><input type="checkbox" class="checkbox" id="video_loop" name="video_loop" onchange="Media.formToData();" /></td>
191
- <td><label for="video_loop">{#media_dlg.loop}</label></td>
192
- </tr>
193
- </table>
194
- </td>
195
-
196
- <td>
197
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
198
- <tr>
199
- <td><input type="checkbox" class="checkbox" id="video_controls" name="video_controls" onchange="Media.formToData();" /></td>
200
- <td><label for="video_controls">{#media_dlg.controls}</label></td>
201
- </tr>
202
- </table>
203
- </td>
204
- </tr>
205
- </table>
206
- </fieldset>
207
-
208
- <fieldset id="embeddedaudio_options">
209
- <legend>{#media_dlg.embedded_audio_options}</legend>
210
-
211
- <table role="presentation" border="0" cellpadding="4" cellspacing="0">
212
- <tr>
213
- <td>
214
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
215
- <tr>
216
- <td><input type="checkbox" class="checkbox" id="embeddedaudio_autoplay" name="audio_autoplay" onchange="Media.formToData();" /></td>
217
- <td><label for="audio_autoplay">{#media_dlg.play}</label></td>
218
- </tr>
219
- </table>
220
- </td>
221
-
222
- <td>
223
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
224
- <tr>
225
- <td><input type="checkbox" class="checkbox" id="embeddedaudio_loop" name="audio_loop" onchange="Media.formToData();" /></td>
226
- <td><label for="audio_loop">{#media_dlg.loop}</label></td>
227
- </tr>
228
- </table>
229
- </td>
230
-
231
- <td>
232
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
233
- <tr>
234
- <td><input type="checkbox" class="checkbox" id="embeddedaudio_controls" name="audio_controls" onchange="Media.formToData();" /></td>
235
- <td><label for="audio_controls">{#media_dlg.controls}</label></td>
236
- </tr>
237
- </table>
238
- </td>
239
- </tr>
240
- </table>
241
- </fieldset>
242
-
243
- <fieldset id="audio_options">
244
- <legend>{#media_dlg.html5_audio_options}</legend>
245
-
246
- <table role="presentation">
247
- <tr>
248
- <td><label for="audio_altsource1">{#media_dlg.altsource1}</label></td>
249
- <td>
250
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
251
- <tr>
252
- <td><input type="text" id="audio_altsource1" name="audio_altsource1" onchange="Media.formToData();" style="width: 240px" /></td>
253
- <td id="audio_altsource1_filebrowser">&nbsp;</td>
254
- </tr>
255
- </table>
256
- </td>
257
- </tr>
258
-
259
- <tr>
260
- <td><label for="audio_altsource2">{#media_dlg.altsource2}</label></td>
261
- <td>
262
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
263
- <tr>
264
- <td><input type="text" id="audio_altsource2" name="audio_altsource2" onchange="Media.formToData();" style="width: 240px" /></td>
265
- <td id="audio_altsource2_filebrowser">&nbsp;</td>
266
- </tr>
267
- </table>
268
- </td>
269
- </tr>
270
-
271
- <tr>
272
- <td><label for="audio_preload">{#media_dlg.preload}</label></td>
273
- <td>
274
- <select id="audio_preload" name="audio_preload" onchange="Media.formToData();">
275
- <option value="none">{#media_dlg.preload_none}</option>
276
- <option value="metadata">{#media_dlg.preload_metadata}</option>
277
- <option value="auto">{#media_dlg.preload_auto}</option>
278
- </select>
279
- </td>
280
- </tr>
281
- </table>
282
-
283
- <table role="presentation" border="0" cellpadding="4" cellspacing="0">
284
- <tr>
285
- <td>
286
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
287
- <tr>
288
- <td><input type="checkbox" class="checkbox" id="audio_autoplay" name="audio_autoplay" onchange="Media.formToData();" /></td>
289
- <td><label for="audio_autoplay">{#media_dlg.play}</label></td>
290
- </tr>
291
- </table>
292
- </td>
293
-
294
- <td>
295
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
296
- <tr>
297
- <td><input type="checkbox" class="checkbox" id="audio_loop" name="audio_loop" onchange="Media.formToData();" /></td>
298
- <td><label for="audio_loop">{#media_dlg.loop}</label></td>
299
- </tr>
300
- </table>
301
- </td>
302
-
303
- <td>
304
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
305
- <tr>
306
- <td><input type="checkbox" class="checkbox" id="audio_controls" name="audio_controls" onchange="Media.formToData();" /></td>
307
- <td><label for="audio_controls">{#media_dlg.controls}</label></td>
308
- </tr>
309
- </table>
310
- </td>
311
- </tr>
312
- </table>
313
- </fieldset>
314
-
315
- <fieldset id="flash_options">
316
- <legend>{#media_dlg.flash_options}</legend>
317
-
318
- <table role="presentation" border="0" cellpadding="4" cellspacing="0">
319
- <tr>
320
- <td><label for="flash_quality">{#media_dlg.quality}</label></td>
321
- <td>
322
- <select id="flash_quality" name="flash_quality" onchange="Media.formToData();">
323
- <option value="">{#not_set}</option>
324
- <option value="high">high</option>
325
- <option value="low">low</option>
326
- <option value="autolow">autolow</option>
327
- <option value="autohigh">autohigh</option>
328
- <option value="best">best</option>
329
- </select>
330
- </td>
331
-
332
- <td><label for="flash_scale">{#media_dlg.scale}</label></td>
333
- <td>
334
- <select id="flash_scale" name="flash_scale" onchange="Media.formToData();">
335
- <option value="">{#not_set}</option>
336
- <option value="showall">showall</option>
337
- <option value="noborder">noborder</option>
338
- <option value="exactfit">exactfit</option>
339
- <option value="noscale">noscale</option>
340
- </select>
341
- </td>
342
- </tr>
343
-
344
- <tr>
345
- <td><label for="flash_wmode">{#media_dlg.wmode}</label></td>
346
- <td>
347
- <select id="flash_wmode" name="flash_wmode" onchange="Media.formToData();">
348
- <option value="">{#not_set}</option>
349
- <option value="window">window</option>
350
- <option value="opaque">opaque</option>
351
- <option value="transparent">transparent</option>
352
- </select>
353
- </td>
354
-
355
- <td><label for="flash_salign">{#media_dlg.salign}</label></td>
356
- <td>
357
- <select id="flash_salign" name="flash_salign" onchange="Media.formToData();">
358
- <option value="">{#not_set}</option>
359
- <option value="l">{#media_dlg.align_left}</option>
360
- <option value="t">{#media_dlg.align_top}</option>
361
- <option value="r">{#media_dlg.align_right}</option>
362
- <option value="b">{#media_dlg.align_bottom}</option>
363
- <option value="tl">{#media_dlg.align_top_left}</option>
364
- <option value="tr">{#media_dlg.align_top_right}</option>
365
- <option value="bl">{#media_dlg.align_bottom_left}</option>
366
- <option value="br">{#media_dlg.align_bottom_right}</option>
367
- </select>
368
- </td>
369
- </tr>
370
-
371
- <tr>
372
- <td colspan="2">
373
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
374
- <tr>
375
- <td><input type="checkbox" class="checkbox" id="flash_play" name="flash_play" checked="checked" onchange="Media.formToData();" /></td>
376
- <td><label for="flash_play">{#media_dlg.play}</label></td>
377
- </tr>
378
- </table>
379
- </td>
380
-
381
- <td colspan="2">
382
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
383
- <tr>
384
- <td><input type="checkbox" class="checkbox" id="flash_loop" name="flash_loop" checked="checked" onchange="Media.formToData();" /></td>
385
- <td><label for="flash_loop">{#media_dlg.loop}</label></td>
386
- </tr>
387
- </table>
388
- </td>
389
- </tr>
390
-
391
- <tr>
392
- <td colspan="2">
393
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
394
- <tr>
395
- <td><input type="checkbox" class="checkbox" id="flash_menu" name="flash_menu" checked="checked" onchange="Media.formToData();" /></td>
396
- <td><label for="flash_menu">{#media_dlg.menu}</label></td>
397
- </tr>
398
- </table>
399
- </td>
400
-
401
- <td colspan="2">
402
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
403
- <tr>
404
- <td><input type="checkbox" class="checkbox" id="flash_swliveconnect" name="flash_swliveconnect" onchange="Media.formToData();" /></td>
405
- <td><label for="flash_swliveconnect">{#media_dlg.liveconnect}</label></td>
406
- </tr>
407
- </table>
408
- </td>
409
- </tr>
410
- </table>
411
-
412
- <table role="presentation">
413
- <tr>
414
- <td><label for="flash_base">{#media_dlg.base}</label></td>
415
- <td><input type="text" id="flash_base" name="flash_base" onchange="Media.formToData();" /></td>
416
- </tr>
417
-
418
- <tr>
419
- <td><label for="flash_flashvars">{#media_dlg.flashvars}</label></td>
420
- <td><input type="text" id="flash_flashvars" name="flash_flashvars" onchange="Media.formToData();" /></td>
421
- </tr>
422
- </table>
423
- </fieldset>
424
-
425
- <fieldset id="quicktime_options">
426
- <legend>{#media_dlg.qt_options}</legend>
427
-
428
- <table role="presentation" border="0" cellpadding="4" cellspacing="0">
429
- <tr>
430
- <td colspan="2">
431
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
432
- <tr>
433
- <td><input type="checkbox" class="checkbox" id="quicktime_loop" name="quicktime_loop" onchange="Media.formToData();" /></td>
434
- <td><label for="quicktime_loop">{#media_dlg.loop}</label></td>
435
- </tr>
436
- </table>
437
- </td>
438
-
439
- <td colspan="2">
440
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
441
- <tr>
442
- <td><input type="checkbox" class="checkbox" id="quicktime_autoplay" name="quicktime_autoplay" checked="checked" onchange="Media.formToData();" /></td>
443
- <td><label for="quicktime_autoplay">{#media_dlg.play}</label></td>
444
- </tr>
445
- </table>
446
- </td>
447
- </tr>
448
-
449
- <tr>
450
- <td colspan="2">
451
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
452
- <tr>
453
- <td><input type="checkbox" class="checkbox" id="quicktime_cache" name="quicktime_cache" onchange="Media.formToData();" /></td>
454
- <td><label for="quicktime_cache">{#media_dlg.cache}</label></td>
455
- </tr>
456
- </table>
457
- </td>
458
-
459
- <td colspan="2">
460
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
461
- <tr>
462
- <td><input type="checkbox" class="checkbox" id="quicktime_controller" name="quicktime_controller" checked="checked" onchange="Media.formToData();" /></td>
463
- <td><label for="quicktime_controller">{#media_dlg.controller}</label></td>
464
- </tr>
465
- </table>
466
- </td>
467
- </tr>
468
-
469
- <tr>
470
- <td colspan="2">
471
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
472
- <tr>
473
- <td><input type="checkbox" class="checkbox" id="quicktime_correction" name="quicktime_correction" onchange="Media.formToData();" /></td>
474
- <td><label for="quicktime_correction">{#media_dlg.correction}</label></td>
475
- </tr>
476
- </table>
477
- </td>
478
-
479
- <td colspan="2">
480
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
481
- <tr>
482
- <td><input type="checkbox" class="checkbox" id="quicktime_enablejavascript" name="quicktime_enablejavascript" onchange="Media.formToData();" /></td>
483
- <td><label for="quicktime_enablejavascript">{#media_dlg.enablejavascript}</label></td>
484
- </tr>
485
- </table>
486
- </td>
487
- </tr>
488
-
489
- <tr>
490
- <td colspan="2">
491
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
492
- <tr>
493
- <td><input type="checkbox" class="checkbox" id="quicktime_kioskmode" name="quicktime_kioskmode" onchange="Media.formToData();" /></td>
494
- <td><label for="quicktime_kioskmode">{#media_dlg.kioskmode}</label></td>
495
- </tr>
496
- </table>
497
- </td>
498
-
499
- <td colspan="2">
500
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
501
- <tr>
502
- <td><input type="checkbox" class="checkbox" id="quicktime_autohref" name="quicktime_autohref" onchange="Media.formToData();" /></td>
503
- <td><label for="quicktime_autohref">{#media_dlg.autohref}</label></td>
504
- </tr>
505
- </table>
506
- </td>
507
- </tr>
508
-
509
- <tr>
510
- <td colspan="2">
511
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
512
- <tr>
513
- <td><input type="checkbox" class="checkbox" id="quicktime_playeveryframe" name="quicktime_playeveryframe" onchange="Media.formToData();" /></td>
514
- <td><label for="quicktime_playeveryframe">{#media_dlg.playeveryframe}</label></td>
515
- </tr>
516
- </table>
517
- </td>
518
-
519
- <td colspan="2">
520
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
521
- <tr>
522
- <td><input type="checkbox" class="checkbox" id="quicktime_targetcache" name="quicktime_targetcache" onchange="Media.formToData();" /></td>
523
- <td><label for="quicktime_targetcache">{#media_dlg.targetcache}</label></td>
524
- </tr>
525
- </table>
526
- </td>
527
- </tr>
528
-
529
- <tr>
530
- <td><label for="quicktime_scale">{#media_dlg.scale}</label></td>
531
- <td><select id="quicktime_scale" name="quicktime_scale" class="mceEditableSelect" onchange="Media.formToData();">
532
- <option value="">{#not_set}</option>
533
- <option value="tofit">tofit</option>
534
- <option value="aspect">aspect</option>
535
- </select>
536
- </td>
537
-
538
- <td colspan="2">&nbsp;</td>
539
- </tr>
540
-
541
- <tr>
542
- <td><label for="quicktime_starttime">{#media_dlg.starttime}</label></td>
543
- <td><input type="text" id="quicktime_starttime" name="quicktime_starttime" onchange="Media.formToData();" /></td>
544
-
545
- <td><label for="quicktime_endtime">{#media_dlg.endtime}</label></td>
546
- <td><input type="text" id="quicktime_endtime" name="quicktime_endtime" onchange="Media.formToData();" /></td>
547
- </tr>
548
-
549
- <tr>
550
- <td><label for="quicktime_target">{#media_dlg.target}</label></td>
551
- <td><input type="text" id="quicktime_target" name="quicktime_target" onchange="Media.formToData();" /></td>
552
-
553
- <td><label for="quicktime_href">{#media_dlg.href}</label></td>
554
- <td><input type="text" id="quicktime_href" name="quicktime_href" onchange="Media.formToData();" /></td>
555
- </tr>
556
-
557
- <tr>
558
- <td><label for="quicktime_qtsrcchokespeed">{#media_dlg.qtsrcchokespeed}</label></td>
559
- <td><input type="text" id="quicktime_qtsrcchokespeed" name="quicktime_qtsrcchokespeed" onchange="Media.formToData();" /></td>
560
-
561
- <td><label for="quicktime_volume">{#media_dlg.volume}</label></td>
562
- <td><input type="text" id="quicktime_volume" name="quicktime_volume" onchange="Media.formToData();" /></td>
563
- </tr>
564
-
565
- <tr>
566
- <td><label for="quicktime_qtsrc">{#media_dlg.qtsrc}</label></td>
567
- <td colspan="4">
568
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
569
- <tr>
570
- <td><input type="text" id="quicktime_qtsrc" name="quicktime_qtsrc" onchange="Media.formToData();" /></td>
571
- <td id="qtsrcfilebrowsercontainer">&nbsp;</td>
572
- </tr>
573
- </table>
574
- </td>
575
- </tr>
576
- </table>
577
- </fieldset>
578
-
579
- <fieldset id="windowsmedia_options">
580
- <legend>{#media_dlg.wmp_options}</legend>
581
-
582
- <table role="presentation" border="0" cellpadding="4" cellspacing="0">
583
- <tr>
584
- <td colspan="2">
585
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
586
- <tr>
587
- <td><input type="checkbox" class="checkbox" id="windowsmedia_autostart" name="windowsmedia_autostart" checked="checked" onchange="Media.formToData();" /></td>
588
- <td><label for="windowsmedia_autostart">{#media_dlg.autostart}</label></td>
589
- </tr>
590
- </table>
591
- </td>
592
-
593
- <td colspan="2">
594
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
595
- <tr>
596
- <td><input type="checkbox" class="checkbox" id="windowsmedia_enabled" name="windowsmedia_enabled" onchange="Media.formToData();" /></td>
597
- <td><label for="windowsmedia_enabled">{#media_dlg.enabled}</label></td>
598
- </tr>
599
- </table>
600
- </td>
601
- </tr>
602
-
603
- <tr>
604
- <td colspan="2">
605
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
606
- <tr>
607
- <td><input type="checkbox" class="checkbox" id="windowsmedia_enablecontextmenu" name="windowsmedia_enablecontextmenu" checked="checked" onchange="Media.formToData();" /></td>
608
- <td><label for="windowsmedia_enablecontextmenu">{#media_dlg.menu}</label></td>
609
- </tr>
610
- </table>
611
- </td>
612
-
613
- <td colspan="2">
614
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
615
- <tr>
616
- <td><input type="checkbox" class="checkbox" id="windowsmedia_fullscreen" name="windowsmedia_fullscreen" onchange="Media.formToData();" /></td>
617
- <td><label for="windowsmedia_fullscreen">{#media_dlg.fullscreen}</label></td>
618
- </tr>
619
- </table>
620
- </td>
621
- </tr>
622
-
623
- <tr>
624
- <td colspan="2">
625
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
626
- <tr>
627
- <td><input type="checkbox" class="checkbox" id="windowsmedia_invokeurls" name="windowsmedia_invokeurls" checked="checked" onchange="Media.formToData();" /></td>
628
- <td><label for="windowsmedia_invokeurls">{#media_dlg.invokeurls}</label></td>
629
- </tr>
630
- </table>
631
- </td>
632
-
633
- <td colspan="2">
634
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
635
- <tr>
636
- <td><input type="checkbox" class="checkbox" id="windowsmedia_mute" name="windowsmedia_mute" onchange="Media.formToData();" /></td>
637
- <td><label for="windowsmedia_mute">{#media_dlg.mute}</label></td>
638
- </tr>
639
- </table>
640
- </td>
641
- </tr>
642
-
643
- <tr>
644
- <td colspan="2">
645
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
646
- <tr>
647
- <td><input type="checkbox" class="checkbox" id="windowsmedia_stretchtofit" name="windowsmedia_stretchtofit" onchange="Media.formToData();" /></td>
648
- <td><label for="windowsmedia_stretchtofit">{#media_dlg.stretchtofit}</label></td>
649
- </tr>
650
- </table>
651
- </td>
652
-
653
- <td colspan="2">
654
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
655
- <tr>
656
- <td><input type="checkbox" class="checkbox" id="windowsmedia_windowlessvideo" name="windowsmedia_windowlessvideo" onchange="Media.formToData();" /></td>
657
- <td><label for="windowsmedia_windowlessvideo">{#media_dlg.windowlessvideo}</label></td>
658
- </tr>
659
- </table>
660
- </td>
661
- </tr>
662
-
663
- <tr>
664
- <td><label for="windowsmedia_balance">{#media_dlg.balance}</label></td>
665
- <td><input type="text" id="windowsmedia_balance" name="windowsmedia_balance" onchange="Media.formToData();" /></td>
666
-
667
- <td><label for="windowsmedia_baseurl">{#media_dlg.baseurl}</label></td>
668
- <td><input type="text" id="windowsmedia_baseurl" name="windowsmedia_baseurl" onchange="Media.formToData();" /></td>
669
- </tr>
670
-
671
- <tr>
672
- <td><label for="windowsmedia_captioningid">{#media_dlg.captioningid}</label></td>
673
- <td><input type="text" id="windowsmedia_captioningid" name="windowsmedia_captioningid" onchange="Media.formToData();" /></td>
674
-
675
- <td><label for="windowsmedia_currentmarker">{#media_dlg.currentmarker}</label></td>
676
- <td><input type="text" id="windowsmedia_currentmarker" name="windowsmedia_currentmarker" onchange="Media.formToData();" /></td>
677
- </tr>
678
-
679
- <tr>
680
- <td><label for="windowsmedia_currentposition">{#media_dlg.currentposition}</label></td>
681
- <td><input type="text" id="windowsmedia_currentposition" name="windowsmedia_currentposition" onchange="Media.formToData();" /></td>
682
-
683
- <td><label for="windowsmedia_defaultframe">{#media_dlg.defaultframe}</label></td>
684
- <td><input type="text" id="windowsmedia_defaultframe" name="windowsmedia_defaultframe" onchange="Media.formToData();" /></td>
685
- </tr>
686
-
687
- <tr>
688
- <td><label for="windowsmedia_playcount">{#media_dlg.playcount}</label></td>
689
- <td><input type="text" id="windowsmedia_playcount" name="windowsmedia_playcount" onchange="Media.formToData();" /></td>
690
-
691
- <td><label for="windowsmedia_rate">{#media_dlg.rate}</label></td>
692
- <td><input type="text" id="windowsmedia_rate" name="windowsmedia_rate" onchange="Media.formToData();" /></td>
693
- </tr>
694
-
695
- <tr>
696
- <td><label for="windowsmedia_uimode">{#media_dlg.uimode}</label></td>
697
- <td><input type="text" id="windowsmedia_uimode" name="windowsmedia_uimode" onchange="Media.formToData();" /></td>
698
-
699
- <td><label for="windowsmedia_volume">{#media_dlg.volume}</label></td>
700
- <td><input type="text" id="windowsmedia_volume" name="windowsmedia_volume" onchange="Media.formToData();" /></td>
701
- </tr>
702
-
703
- </table>
704
- </fieldset>
705
-
706
- <fieldset id="realmedia_options">
707
- <legend>{#media_dlg.rmp_options}</legend>
708
-
709
- <table role="presentation" border="0" cellpadding="4" cellspacing="0">
710
- <tr>
711
- <td colspan="2">
712
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
713
- <tr>
714
- <td><input type="checkbox" class="checkbox" id="realmedia_autostart" name="realmedia_autostart" onchange="Media.formToData();" /></td>
715
- <td><label for="realmedia_autostart">{#media_dlg.autostart}</label></td>
716
- </tr>
717
- </table>
718
- </td>
719
-
720
- <td colspan="2">
721
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
722
- <tr>
723
- <td><input type="checkbox" class="checkbox" id="realmedia_loop" name="realmedia_loop" onchange="Media.formToData();" /></td>
724
- <td><label for="realmedia_loop">{#media_dlg.loop}</label></td>
725
- </tr>
726
- </table>
727
- </td>
728
- </tr>
729
-
730
- <tr>
731
- <td colspan="2">
732
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
733
- <tr>
734
- <td><input type="checkbox" class="checkbox" id="realmedia_autogotourl" name="realmedia_autogotourl" checked="checked" onchange="Media.formToData();" /></td>
735
- <td><label for="realmedia_autogotourl">{#media_dlg.autogotourl}</label></td>
736
- </tr>
737
- </table>
738
- </td>
739
-
740
- <td colspan="2">
741
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
742
- <tr>
743
- <td><input type="checkbox" class="checkbox" id="realmedia_center" name="realmedia_center" onchange="Media.formToData();" /></td>
744
- <td><label for="realmedia_center">{#media_dlg.center}</label></td>
745
- </tr>
746
- </table>
747
- </td>
748
- </tr>
749
-
750
- <tr>
751
- <td colspan="2">
752
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
753
- <tr>
754
- <td><input type="checkbox" class="checkbox" id="realmedia_imagestatus" name="realmedia_imagestatus" checked="checked" onchange="Media.formToData();" /></td>
755
- <td><label for="realmedia_imagestatus">{#media_dlg.imagestatus}</label></td>
756
- </tr>
757
- </table>
758
- </td>
759
-
760
- <td colspan="2">
761
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
762
- <tr>
763
- <td><input type="checkbox" class="checkbox" id="realmedia_maintainaspect" name="realmedia_maintainaspect" onchange="Media.formToData();" /></td>
764
- <td><label for="realmedia_maintainaspect">{#media_dlg.maintainaspect}</label></td>
765
- </tr>
766
- </table>
767
- </td>
768
- </tr>
769
-
770
- <tr>
771
- <td colspan="2">
772
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
773
- <tr>
774
- <td><input type="checkbox" class="checkbox" id="realmedia_nojava" name="realmedia_nojava" onchange="Media.formToData();" /></td>
775
- <td><label for="realmedia_nojava">{#media_dlg.nojava}</label></td>
776
- </tr>
777
- </table>
778
- </td>
779
-
780
- <td colspan="2">
781
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
782
- <tr>
783
- <td><input type="checkbox" class="checkbox" id="realmedia_prefetch" name="realmedia_prefetch" onchange="Media.formToData();" /></td>
784
- <td><label for="realmedia_prefetch">{#media_dlg.prefetch}</label></td>
785
- </tr>
786
- </table>
787
- </td>
788
- </tr>
789
-
790
- <tr>
791
- <td colspan="2">
792
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
793
- <tr>
794
- <td><input type="checkbox" class="checkbox" id="realmedia_shuffle" name="realmedia_shuffle" onchange="Media.formToData();" /></td>
795
- <td><label for="realmedia_shuffle">{#media_dlg.shuffle}</label></td>
796
- </tr>
797
- </table>
798
- </td>
799
-
800
- <td colspan="2">
801
- &nbsp;
802
- </td>
803
- </tr>
804
-
805
- <tr>
806
- <td><label for="realmedia_console">{#media_dlg.console}</label></td>
807
- <td><input type="text" id="realmedia_console" name="realmedia_console" onchange="Media.formToData();" /></td>
808
-
809
- <td><label for="realmedia_controls">{#media_dlg.controls}</label></td>
810
- <td><input type="text" id="realmedia_controls" name="realmedia_controls" onchange="Media.formToData();" /></td>
811
- </tr>
812
-
813
- <tr>
814
- <td><label for="realmedia_numloop">{#media_dlg.numloop}</label></td>
815
- <td><input type="text" id="realmedia_numloop" name="realmedia_numloop" onchange="Media.formToData();" /></td>
816
-
817
- <td><label for="realmedia_scriptcallbacks">{#media_dlg.scriptcallbacks}</label></td>
818
- <td><input type="text" id="realmedia_scriptcallbacks" name="realmedia_scriptcallbacks" onchange="Media.formToData();" /></td>
819
- </tr>
820
- </table>
821
- </fieldset>
822
-
823
- <fieldset id="shockwave_options">
824
- <legend>{#media_dlg.shockwave_options}</legend>
825
-
826
- <table role="presentation" border="0" cellpadding="4" cellspacing="0">
827
- <tr>
828
- <td><label for="shockwave_swstretchstyle">{#media_dlg.swstretchstyle}</label></td>
829
- <td>
830
- <select id="shockwave_swstretchstyle" name="shockwave_swstretchstyle" onchange="Media.formToData();">
831
- <option value="none">{#not_set}</option>
832
- <option value="meet">Meet</option>
833
- <option value="fill">Fill</option>
834
- <option value="stage">Stage</option>
835
- </select>
836
- </td>
837
-
838
- <td><label for="shockwave_swvolume">{#media_dlg.volume}</label></td>
839
- <td><input type="text" id="shockwave_swvolume" name="shockwave_swvolume" onchange="Media.formToData();" /></td>
840
- </tr>
841
-
842
- <tr>
843
- <td><label for="shockwave_swstretchhalign">{#media_dlg.swstretchhalign}</label></td>
844
- <td>
845
- <select id="shockwave_swstretchhalign" name="shockwave_swstretchhalign" onchange="Media.formToData();">
846
- <option value="none">{#not_set}</option>
847
- <option value="left">{#media_dlg.align_left}</option>
848
- <option value="center">{#media_dlg.align_center}</option>
849
- <option value="right">{#media_dlg.align_right}</option>
850
- </select>
851
- </td>
852
-
853
- <td><label for="shockwave_swstretchvalign">{#media_dlg.swstretchvalign}</label></td>
854
- <td>
855
- <select id="shockwave_swstretchvalign" name="shockwave_swstretchvalign" onchange="Media.formToData();">
856
- <option value="none">{#not_set}</option>
857
- <option value="meet">Meet</option>
858
- <option value="fill">Fill</option>
859
- <option value="stage">Stage</option>
860
- </select>
861
- </td>
862
- </tr>
863
-
864
- <tr>
865
- <td colspan="2">
866
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
867
- <tr>
868
- <td><input type="checkbox" class="checkbox" id="shockwave_autostart" name="shockwave_autostart" onchange="Media.formToData();" checked="checked" /></td>
869
- <td><label for="shockwave_autostart">{#media_dlg.autostart}</label></td>
870
- </tr>
871
- </table>
872
- </td>
873
-
874
- <td colspan="2">
875
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
876
- <tr>
877
- <td><input type="checkbox" class="checkbox" id="shockwave_sound" name="shockwave_sound" onchange="Media.formToData();" checked="checked" /></td>
878
- <td><label for="shockwave_sound">{#media_dlg.sound}</label></td>
879
- </tr>
880
- </table>
881
- </td>
882
- </tr>
883
-
884
-
885
- <tr>
886
- <td colspan="2">
887
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
888
- <tr>
889
- <td><input type="checkbox" class="checkbox" id="shockwave_swliveconnect" name="shockwave_swliveconnect" onchange="Media.formToData();" /></td>
890
- <td><label for="shockwave_swliveconnect">{#media_dlg.liveconnect}</label></td>
891
- </tr>
892
- </table>
893
- </td>
894
-
895
- <td colspan="2">
896
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
897
- <tr>
898
- <td><input type="checkbox" class="checkbox" id="shockwave_progress" name="shockwave_progress" onchange="Media.formToData();" checked="checked" /></td>
899
- <td><label for="shockwave_progress">{#media_dlg.progress}</label></td>
900
- </tr>
901
- </table>
902
- </td>
903
- </tr>
904
- </table>
905
- </fieldset>
906
- </div>
907
-
908
- <div id="source_panel" class="panel">
909
- <fieldset>
910
- <legend>{#media_dlg.source}</legend>
911
- <textarea id="source" style="width: 99%; height: 390px"></textarea>
912
- </fieldset>
913
- </div>
914
- </div>
915
-
916
- <div class="mceActionPanel">
917
- <input type="submit" id="insert" name="insert" value="{#insert}" />
918
- <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
919
- </div>
920
- </form>
921
- </body>
922
- </html>
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>{#media_dlg.title}</title>
5
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
6
+ <script type="text/javascript" src="js/media.js"></script>
7
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
8
+ <script type="text/javascript" src="../../utils/validate.js"></script>
9
+ <script type="text/javascript" src="../../utils/form_utils.js"></script>
10
+ <script type="text/javascript" src="../../utils/editable_selects.js"></script>
11
+ <link href="css/media.css" rel="stylesheet" type="text/css" />
12
+ </head>
13
+ <body style="display: none" role="application">
14
+ <form onsubmit="Media.insert();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');Media.formToData();" onmousedown="return false;">{#media_dlg.general}</a></span></li>
18
+ <li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');Media.formToData();" onmousedown="return false;">{#media_dlg.advanced}</a></span></li>
19
+ <li id="source_tab" aria-controls="source_panel"><span><a href="javascript:mcTabs.displayTab('source_tab','source_panel');Media.formToData('source');" onmousedown="return false;">{#media_dlg.source}</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>{#media_dlg.general}</legend>
27
+
28
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0">
29
+ <tr>
30
+ <td><label for="media_type">{#media_dlg.type}</label></td>
31
+ <td>
32
+ <select id="media_type"></select>
33
+ </td>
34
+ </tr>
35
+ <tr>
36
+ <td><label for="src">{#media_dlg.file}</label></td>
37
+ <td>
38
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
39
+ <tr>
40
+ <td><input id="src" name="src" type="text" value="" class="mceFocus" onchange="Media.formToData();" /></td>
41
+ <td id="filebrowsercontainer">&nbsp;</td>
42
+ </tr>
43
+ </table>
44
+ </td>
45
+ </tr>
46
+ <tr id="linklistrow">
47
+ <td><label for="linklist">{#media_dlg.list}</label></td>
48
+ <td id="linklistcontainer"><select id="linklist"><option value=""></option></select></td>
49
+ </tr>
50
+ <tr>
51
+ <td><label for="width">{#media_dlg.size}</label></td>
52
+ <td>
53
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
54
+ <tr>
55
+ <td><input type="text" id="width" name="width" value="" class="size" onchange="Media.formToData('width');" onfocus="Media.beforeResize();" /> x <input type="text" id="height" name="height" value="" class="size" onfocus="Media.beforeResize();" onchange="Media.formToData('height');" /></td>
56
+ <td>&nbsp;&nbsp;<input id="constrain" type="checkbox" name="constrain" class="checkbox" checked="checked" /></td>
57
+ <td><label id="constrainlabel" for="constrain">{#media_dlg.constrain_proportions}</label></td>
58
+ </tr>
59
+ </table>
60
+ </td>
61
+ </tr>
62
+ </table>
63
+ </fieldset>
64
+
65
+ <fieldset>
66
+ <legend>{#media_dlg.preview}</legend>
67
+ <div id="prev"></div>
68
+ </fieldset>
69
+ </div>
70
+
71
+ <div id="advanced_panel" class="panel">
72
+ <fieldset>
73
+ <legend>{#media_dlg.advanced}</legend>
74
+
75
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0" width="100%">
76
+ <tr>
77
+ <td><label for="id">{#media_dlg.id}</label></td>
78
+ <td><input type="text" id="id" name="id" onchange="Media.formToData();" /></td>
79
+ <td><label for="name">{#media_dlg.name}</label></td>
80
+ <td><input type="text" id="name" name="name" onchange="Media.formToData();" /></td>
81
+ </tr>
82
+
83
+ <tr>
84
+ <td><label for="align">{#media_dlg.align}</label></td>
85
+ <td>
86
+ <select id="align" name="align" onchange="Media.formToData();">
87
+ <option value="">{#not_set}</option>
88
+ <option value="top">{#media_dlg.align_top}</option>
89
+ <option value="right">{#media_dlg.align_right}</option>
90
+ <option value="bottom">{#media_dlg.align_bottom}</option>
91
+ <option value="left">{#media_dlg.align_left}</option>
92
+ </select>
93
+ </td>
94
+
95
+ <td><label for="bgcolor">{#media_dlg.bgcolor}</label></td>
96
+ <td>
97
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
98
+ <tr>
99
+ <td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');Media.formToData();" /></td>
100
+ <td id="bgcolor_pickcontainer">&nbsp;</td>
101
+ </tr>
102
+ </table>
103
+ </td>
104
+ </tr>
105
+
106
+ <tr>
107
+ <td><label for="vspace">{#media_dlg.vspace}</label></td>
108
+ <td><input type="text" id="vspace" name="vspace" class="number" onchange="Media.formToData();" /></td>
109
+ <td><label for="hspace">{#media_dlg.hspace}</label></td>
110
+ <td><input type="text" id="hspace" name="hspace" class="number" onchange="Media.formToData();" /></td>
111
+ </tr>
112
+ </table>
113
+ </fieldset>
114
+
115
+ <fieldset id="video_options">
116
+ <legend>{#media_dlg.html5_video_options}</legend>
117
+
118
+ <table role="presentation">
119
+ <tr>
120
+ <td><label for="video_altsource1">{#media_dlg.altsource1}</label></td>
121
+ <td>
122
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
123
+ <tr>
124
+ <td><input type="text" id="video_altsource1" name="video_altsource1" onchange="Media.formToData();" style="width: 240px" /></td>
125
+ <td id="video_altsource1_filebrowser">&nbsp;</td>
126
+ </tr>
127
+ </table>
128
+ </td>
129
+ </tr>
130
+
131
+ <tr>
132
+ <td><label for="video_altsource2">{#media_dlg.altsource2}</label></td>
133
+ <td>
134
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
135
+ <tr>
136
+ <td><input type="text" id="video_altsource2" name="video_altsource2" onchange="Media.formToData();" style="width: 240px" /></td>
137
+ <td id="video_altsource2_filebrowser">&nbsp;</td>
138
+ </tr>
139
+ </table>
140
+ </td>
141
+ </tr>
142
+
143
+ <tr>
144
+ <td><label for="video_poster">{#media_dlg.poster}</label></td>
145
+ <td>
146
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
147
+ <tr>
148
+ <td><input type="text" id="video_poster" name="video_poster" onchange="Media.formToData();" style="width: 240px" /></td>
149
+ <td id="video_poster_filebrowser">&nbsp;</td>
150
+ </tr>
151
+ </table>
152
+ </td>
153
+ </tr>
154
+
155
+ <tr>
156
+ <td><label for="video_preload">{#media_dlg.preload}</label></td>
157
+ <td>
158
+ <select id="video_preload" name="video_preload" onchange="Media.formToData();">
159
+ <option value="none">{#media_dlg.preload_none}</option>
160
+ <option value="metadata">{#media_dlg.preload_metadata}</option>
161
+ <option value="auto">{#media_dlg.preload_auto}</option>
162
+ </select>
163
+ </td>
164
+ </tr>
165
+ </table>
166
+
167
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0">
168
+ <tr>
169
+ <td>
170
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
171
+ <tr>
172
+ <td><input type="checkbox" class="checkbox" id="video_autoplay" name="video_autoplay" onchange="Media.formToData();" /></td>
173
+ <td><label for="video_autoplay">{#media_dlg.play}</label></td>
174
+ </tr>
175
+ </table>
176
+ </td>
177
+
178
+ <td>
179
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
180
+ <tr>
181
+ <td><input type="checkbox" class="checkbox" id="video_muted" name="video_muted" onchange="Media.formToData();" /></td>
182
+ <td><label for="video_muted">{#media_dlg.mute}</label></td>
183
+ </tr>
184
+ </table>
185
+ </td>
186
+
187
+ <td>
188
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
189
+ <tr>
190
+ <td><input type="checkbox" class="checkbox" id="video_loop" name="video_loop" onchange="Media.formToData();" /></td>
191
+ <td><label for="video_loop">{#media_dlg.loop}</label></td>
192
+ </tr>
193
+ </table>
194
+ </td>
195
+
196
+ <td>
197
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
198
+ <tr>
199
+ <td><input type="checkbox" class="checkbox" id="video_controls" name="video_controls" onchange="Media.formToData();" /></td>
200
+ <td><label for="video_controls">{#media_dlg.controls}</label></td>
201
+ </tr>
202
+ </table>
203
+ </td>
204
+ </tr>
205
+ </table>
206
+ </fieldset>
207
+
208
+ <fieldset id="embeddedaudio_options">
209
+ <legend>{#media_dlg.embedded_audio_options}</legend>
210
+
211
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0">
212
+ <tr>
213
+ <td>
214
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
215
+ <tr>
216
+ <td><input type="checkbox" class="checkbox" id="embeddedaudio_autoplay" name="audio_autoplay" onchange="Media.formToData();" /></td>
217
+ <td><label for="audio_autoplay">{#media_dlg.play}</label></td>
218
+ </tr>
219
+ </table>
220
+ </td>
221
+
222
+ <td>
223
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
224
+ <tr>
225
+ <td><input type="checkbox" class="checkbox" id="embeddedaudio_loop" name="audio_loop" onchange="Media.formToData();" /></td>
226
+ <td><label for="audio_loop">{#media_dlg.loop}</label></td>
227
+ </tr>
228
+ </table>
229
+ </td>
230
+
231
+ <td>
232
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
233
+ <tr>
234
+ <td><input type="checkbox" class="checkbox" id="embeddedaudio_controls" name="audio_controls" onchange="Media.formToData();" /></td>
235
+ <td><label for="audio_controls">{#media_dlg.controls}</label></td>
236
+ </tr>
237
+ </table>
238
+ </td>
239
+ </tr>
240
+ </table>
241
+ </fieldset>
242
+
243
+ <fieldset id="audio_options">
244
+ <legend>{#media_dlg.html5_audio_options}</legend>
245
+
246
+ <table role="presentation">
247
+ <tr>
248
+ <td><label for="audio_altsource1">{#media_dlg.altsource1}</label></td>
249
+ <td>
250
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
251
+ <tr>
252
+ <td><input type="text" id="audio_altsource1" name="audio_altsource1" onchange="Media.formToData();" style="width: 240px" /></td>
253
+ <td id="audio_altsource1_filebrowser">&nbsp;</td>
254
+ </tr>
255
+ </table>
256
+ </td>
257
+ </tr>
258
+
259
+ <tr>
260
+ <td><label for="audio_altsource2">{#media_dlg.altsource2}</label></td>
261
+ <td>
262
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
263
+ <tr>
264
+ <td><input type="text" id="audio_altsource2" name="audio_altsource2" onchange="Media.formToData();" style="width: 240px" /></td>
265
+ <td id="audio_altsource2_filebrowser">&nbsp;</td>
266
+ </tr>
267
+ </table>
268
+ </td>
269
+ </tr>
270
+
271
+ <tr>
272
+ <td><label for="audio_preload">{#media_dlg.preload}</label></td>
273
+ <td>
274
+ <select id="audio_preload" name="audio_preload" onchange="Media.formToData();">
275
+ <option value="none">{#media_dlg.preload_none}</option>
276
+ <option value="metadata">{#media_dlg.preload_metadata}</option>
277
+ <option value="auto">{#media_dlg.preload_auto}</option>
278
+ </select>
279
+ </td>
280
+ </tr>
281
+ </table>
282
+
283
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0">
284
+ <tr>
285
+ <td>
286
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
287
+ <tr>
288
+ <td><input type="checkbox" class="checkbox" id="audio_autoplay" name="audio_autoplay" onchange="Media.formToData();" /></td>
289
+ <td><label for="audio_autoplay">{#media_dlg.play}</label></td>
290
+ </tr>
291
+ </table>
292
+ </td>
293
+
294
+ <td>
295
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
296
+ <tr>
297
+ <td><input type="checkbox" class="checkbox" id="audio_loop" name="audio_loop" onchange="Media.formToData();" /></td>
298
+ <td><label for="audio_loop">{#media_dlg.loop}</label></td>
299
+ </tr>
300
+ </table>
301
+ </td>
302
+
303
+ <td>
304
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
305
+ <tr>
306
+ <td><input type="checkbox" class="checkbox" id="audio_controls" name="audio_controls" onchange="Media.formToData();" /></td>
307
+ <td><label for="audio_controls">{#media_dlg.controls}</label></td>
308
+ </tr>
309
+ </table>
310
+ </td>
311
+ </tr>
312
+ </table>
313
+ </fieldset>
314
+
315
+ <fieldset id="flash_options">
316
+ <legend>{#media_dlg.flash_options}</legend>
317
+
318
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0">
319
+ <tr>
320
+ <td><label for="flash_quality">{#media_dlg.quality}</label></td>
321
+ <td>
322
+ <select id="flash_quality" name="flash_quality" onchange="Media.formToData();">
323
+ <option value="">{#not_set}</option>
324
+ <option value="high">high</option>
325
+ <option value="low">low</option>
326
+ <option value="autolow">autolow</option>
327
+ <option value="autohigh">autohigh</option>
328
+ <option value="best">best</option>
329
+ </select>
330
+ </td>
331
+
332
+ <td><label for="flash_scale">{#media_dlg.scale}</label></td>
333
+ <td>
334
+ <select id="flash_scale" name="flash_scale" onchange="Media.formToData();">
335
+ <option value="">{#not_set}</option>
336
+ <option value="showall">showall</option>
337
+ <option value="noborder">noborder</option>
338
+ <option value="exactfit">exactfit</option>
339
+ <option value="noscale">noscale</option>
340
+ </select>
341
+ </td>
342
+ </tr>
343
+
344
+ <tr>
345
+ <td><label for="flash_wmode">{#media_dlg.wmode}</label></td>
346
+ <td>
347
+ <select id="flash_wmode" name="flash_wmode" onchange="Media.formToData();">
348
+ <option value="">{#not_set}</option>
349
+ <option value="window">window</option>
350
+ <option value="opaque">opaque</option>
351
+ <option value="transparent">transparent</option>
352
+ </select>
353
+ </td>
354
+
355
+ <td><label for="flash_salign">{#media_dlg.salign}</label></td>
356
+ <td>
357
+ <select id="flash_salign" name="flash_salign" onchange="Media.formToData();">
358
+ <option value="">{#not_set}</option>
359
+ <option value="l">{#media_dlg.align_left}</option>
360
+ <option value="t">{#media_dlg.align_top}</option>
361
+ <option value="r">{#media_dlg.align_right}</option>
362
+ <option value="b">{#media_dlg.align_bottom}</option>
363
+ <option value="tl">{#media_dlg.align_top_left}</option>
364
+ <option value="tr">{#media_dlg.align_top_right}</option>
365
+ <option value="bl">{#media_dlg.align_bottom_left}</option>
366
+ <option value="br">{#media_dlg.align_bottom_right}</option>
367
+ </select>
368
+ </td>
369
+ </tr>
370
+
371
+ <tr>
372
+ <td colspan="2">
373
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
374
+ <tr>
375
+ <td><input type="checkbox" class="checkbox" id="flash_play" name="flash_play" checked="checked" onchange="Media.formToData();" /></td>
376
+ <td><label for="flash_play">{#media_dlg.play}</label></td>
377
+ </tr>
378
+ </table>
379
+ </td>
380
+
381
+ <td colspan="2">
382
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
383
+ <tr>
384
+ <td><input type="checkbox" class="checkbox" id="flash_loop" name="flash_loop" checked="checked" onchange="Media.formToData();" /></td>
385
+ <td><label for="flash_loop">{#media_dlg.loop}</label></td>
386
+ </tr>
387
+ </table>
388
+ </td>
389
+ </tr>
390
+
391
+ <tr>
392
+ <td colspan="2">
393
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
394
+ <tr>
395
+ <td><input type="checkbox" class="checkbox" id="flash_menu" name="flash_menu" checked="checked" onchange="Media.formToData();" /></td>
396
+ <td><label for="flash_menu">{#media_dlg.menu}</label></td>
397
+ </tr>
398
+ </table>
399
+ </td>
400
+
401
+ <td colspan="2">
402
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
403
+ <tr>
404
+ <td><input type="checkbox" class="checkbox" id="flash_swliveconnect" name="flash_swliveconnect" onchange="Media.formToData();" /></td>
405
+ <td><label for="flash_swliveconnect">{#media_dlg.liveconnect}</label></td>
406
+ </tr>
407
+ </table>
408
+ </td>
409
+ </tr>
410
+ </table>
411
+
412
+ <table role="presentation">
413
+ <tr>
414
+ <td><label for="flash_base">{#media_dlg.base}</label></td>
415
+ <td><input type="text" id="flash_base" name="flash_base" onchange="Media.formToData();" /></td>
416
+ </tr>
417
+
418
+ <tr>
419
+ <td><label for="flash_flashvars">{#media_dlg.flashvars}</label></td>
420
+ <td><input type="text" id="flash_flashvars" name="flash_flashvars" onchange="Media.formToData();" /></td>
421
+ </tr>
422
+ </table>
423
+ </fieldset>
424
+
425
+ <fieldset id="quicktime_options">
426
+ <legend>{#media_dlg.qt_options}</legend>
427
+
428
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0">
429
+ <tr>
430
+ <td colspan="2">
431
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
432
+ <tr>
433
+ <td><input type="checkbox" class="checkbox" id="quicktime_loop" name="quicktime_loop" onchange="Media.formToData();" /></td>
434
+ <td><label for="quicktime_loop">{#media_dlg.loop}</label></td>
435
+ </tr>
436
+ </table>
437
+ </td>
438
+
439
+ <td colspan="2">
440
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
441
+ <tr>
442
+ <td><input type="checkbox" class="checkbox" id="quicktime_autoplay" name="quicktime_autoplay" checked="checked" onchange="Media.formToData();" /></td>
443
+ <td><label for="quicktime_autoplay">{#media_dlg.play}</label></td>
444
+ </tr>
445
+ </table>
446
+ </td>
447
+ </tr>
448
+
449
+ <tr>
450
+ <td colspan="2">
451
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
452
+ <tr>
453
+ <td><input type="checkbox" class="checkbox" id="quicktime_cache" name="quicktime_cache" onchange="Media.formToData();" /></td>
454
+ <td><label for="quicktime_cache">{#media_dlg.cache}</label></td>
455
+ </tr>
456
+ </table>
457
+ </td>
458
+
459
+ <td colspan="2">
460
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
461
+ <tr>
462
+ <td><input type="checkbox" class="checkbox" id="quicktime_controller" name="quicktime_controller" checked="checked" onchange="Media.formToData();" /></td>
463
+ <td><label for="quicktime_controller">{#media_dlg.controller}</label></td>
464
+ </tr>
465
+ </table>
466
+ </td>
467
+ </tr>
468
+
469
+ <tr>
470
+ <td colspan="2">
471
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
472
+ <tr>
473
+ <td><input type="checkbox" class="checkbox" id="quicktime_correction" name="quicktime_correction" onchange="Media.formToData();" /></td>
474
+ <td><label for="quicktime_correction">{#media_dlg.correction}</label></td>
475
+ </tr>
476
+ </table>
477
+ </td>
478
+
479
+ <td colspan="2">
480
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
481
+ <tr>
482
+ <td><input type="checkbox" class="checkbox" id="quicktime_enablejavascript" name="quicktime_enablejavascript" onchange="Media.formToData();" /></td>
483
+ <td><label for="quicktime_enablejavascript">{#media_dlg.enablejavascript}</label></td>
484
+ </tr>
485
+ </table>
486
+ </td>
487
+ </tr>
488
+
489
+ <tr>
490
+ <td colspan="2">
491
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
492
+ <tr>
493
+ <td><input type="checkbox" class="checkbox" id="quicktime_kioskmode" name="quicktime_kioskmode" onchange="Media.formToData();" /></td>
494
+ <td><label for="quicktime_kioskmode">{#media_dlg.kioskmode}</label></td>
495
+ </tr>
496
+ </table>
497
+ </td>
498
+
499
+ <td colspan="2">
500
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
501
+ <tr>
502
+ <td><input type="checkbox" class="checkbox" id="quicktime_autohref" name="quicktime_autohref" onchange="Media.formToData();" /></td>
503
+ <td><label for="quicktime_autohref">{#media_dlg.autohref}</label></td>
504
+ </tr>
505
+ </table>
506
+ </td>
507
+ </tr>
508
+
509
+ <tr>
510
+ <td colspan="2">
511
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
512
+ <tr>
513
+ <td><input type="checkbox" class="checkbox" id="quicktime_playeveryframe" name="quicktime_playeveryframe" onchange="Media.formToData();" /></td>
514
+ <td><label for="quicktime_playeveryframe">{#media_dlg.playeveryframe}</label></td>
515
+ </tr>
516
+ </table>
517
+ </td>
518
+
519
+ <td colspan="2">
520
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
521
+ <tr>
522
+ <td><input type="checkbox" class="checkbox" id="quicktime_targetcache" name="quicktime_targetcache" onchange="Media.formToData();" /></td>
523
+ <td><label for="quicktime_targetcache">{#media_dlg.targetcache}</label></td>
524
+ </tr>
525
+ </table>
526
+ </td>
527
+ </tr>
528
+
529
+ <tr>
530
+ <td><label for="quicktime_scale">{#media_dlg.scale}</label></td>
531
+ <td><select id="quicktime_scale" name="quicktime_scale" class="mceEditableSelect" onchange="Media.formToData();">
532
+ <option value="">{#not_set}</option>
533
+ <option value="tofit">tofit</option>
534
+ <option value="aspect">aspect</option>
535
+ </select>
536
+ </td>
537
+
538
+ <td colspan="2">&nbsp;</td>
539
+ </tr>
540
+
541
+ <tr>
542
+ <td><label for="quicktime_starttime">{#media_dlg.starttime}</label></td>
543
+ <td><input type="text" id="quicktime_starttime" name="quicktime_starttime" onchange="Media.formToData();" /></td>
544
+
545
+ <td><label for="quicktime_endtime">{#media_dlg.endtime}</label></td>
546
+ <td><input type="text" id="quicktime_endtime" name="quicktime_endtime" onchange="Media.formToData();" /></td>
547
+ </tr>
548
+
549
+ <tr>
550
+ <td><label for="quicktime_target">{#media_dlg.target}</label></td>
551
+ <td><input type="text" id="quicktime_target" name="quicktime_target" onchange="Media.formToData();" /></td>
552
+
553
+ <td><label for="quicktime_href">{#media_dlg.href}</label></td>
554
+ <td><input type="text" id="quicktime_href" name="quicktime_href" onchange="Media.formToData();" /></td>
555
+ </tr>
556
+
557
+ <tr>
558
+ <td><label for="quicktime_qtsrcchokespeed">{#media_dlg.qtsrcchokespeed}</label></td>
559
+ <td><input type="text" id="quicktime_qtsrcchokespeed" name="quicktime_qtsrcchokespeed" onchange="Media.formToData();" /></td>
560
+
561
+ <td><label for="quicktime_volume">{#media_dlg.volume}</label></td>
562
+ <td><input type="text" id="quicktime_volume" name="quicktime_volume" onchange="Media.formToData();" /></td>
563
+ </tr>
564
+
565
+ <tr>
566
+ <td><label for="quicktime_qtsrc">{#media_dlg.qtsrc}</label></td>
567
+ <td colspan="4">
568
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
569
+ <tr>
570
+ <td><input type="text" id="quicktime_qtsrc" name="quicktime_qtsrc" onchange="Media.formToData();" /></td>
571
+ <td id="qtsrcfilebrowsercontainer">&nbsp;</td>
572
+ </tr>
573
+ </table>
574
+ </td>
575
+ </tr>
576
+ </table>
577
+ </fieldset>
578
+
579
+ <fieldset id="windowsmedia_options">
580
+ <legend>{#media_dlg.wmp_options}</legend>
581
+
582
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0">
583
+ <tr>
584
+ <td colspan="2">
585
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
586
+ <tr>
587
+ <td><input type="checkbox" class="checkbox" id="windowsmedia_autostart" name="windowsmedia_autostart" checked="checked" onchange="Media.formToData();" /></td>
588
+ <td><label for="windowsmedia_autostart">{#media_dlg.autostart}</label></td>
589
+ </tr>
590
+ </table>
591
+ </td>
592
+
593
+ <td colspan="2">
594
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
595
+ <tr>
596
+ <td><input type="checkbox" class="checkbox" id="windowsmedia_enabled" name="windowsmedia_enabled" onchange="Media.formToData();" /></td>
597
+ <td><label for="windowsmedia_enabled">{#media_dlg.enabled}</label></td>
598
+ </tr>
599
+ </table>
600
+ </td>
601
+ </tr>
602
+
603
+ <tr>
604
+ <td colspan="2">
605
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
606
+ <tr>
607
+ <td><input type="checkbox" class="checkbox" id="windowsmedia_enablecontextmenu" name="windowsmedia_enablecontextmenu" checked="checked" onchange="Media.formToData();" /></td>
608
+ <td><label for="windowsmedia_enablecontextmenu">{#media_dlg.menu}</label></td>
609
+ </tr>
610
+ </table>
611
+ </td>
612
+
613
+ <td colspan="2">
614
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
615
+ <tr>
616
+ <td><input type="checkbox" class="checkbox" id="windowsmedia_fullscreen" name="windowsmedia_fullscreen" onchange="Media.formToData();" /></td>
617
+ <td><label for="windowsmedia_fullscreen">{#media_dlg.fullscreen}</label></td>
618
+ </tr>
619
+ </table>
620
+ </td>
621
+ </tr>
622
+
623
+ <tr>
624
+ <td colspan="2">
625
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
626
+ <tr>
627
+ <td><input type="checkbox" class="checkbox" id="windowsmedia_invokeurls" name="windowsmedia_invokeurls" checked="checked" onchange="Media.formToData();" /></td>
628
+ <td><label for="windowsmedia_invokeurls">{#media_dlg.invokeurls}</label></td>
629
+ </tr>
630
+ </table>
631
+ </td>
632
+
633
+ <td colspan="2">
634
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
635
+ <tr>
636
+ <td><input type="checkbox" class="checkbox" id="windowsmedia_mute" name="windowsmedia_mute" onchange="Media.formToData();" /></td>
637
+ <td><label for="windowsmedia_mute">{#media_dlg.mute}</label></td>
638
+ </tr>
639
+ </table>
640
+ </td>
641
+ </tr>
642
+
643
+ <tr>
644
+ <td colspan="2">
645
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
646
+ <tr>
647
+ <td><input type="checkbox" class="checkbox" id="windowsmedia_stretchtofit" name="windowsmedia_stretchtofit" onchange="Media.formToData();" /></td>
648
+ <td><label for="windowsmedia_stretchtofit">{#media_dlg.stretchtofit}</label></td>
649
+ </tr>
650
+ </table>
651
+ </td>
652
+
653
+ <td colspan="2">
654
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
655
+ <tr>
656
+ <td><input type="checkbox" class="checkbox" id="windowsmedia_windowlessvideo" name="windowsmedia_windowlessvideo" onchange="Media.formToData();" /></td>
657
+ <td><label for="windowsmedia_windowlessvideo">{#media_dlg.windowlessvideo}</label></td>
658
+ </tr>
659
+ </table>
660
+ </td>
661
+ </tr>
662
+
663
+ <tr>
664
+ <td><label for="windowsmedia_balance">{#media_dlg.balance}</label></td>
665
+ <td><input type="text" id="windowsmedia_balance" name="windowsmedia_balance" onchange="Media.formToData();" /></td>
666
+
667
+ <td><label for="windowsmedia_baseurl">{#media_dlg.baseurl}</label></td>
668
+ <td><input type="text" id="windowsmedia_baseurl" name="windowsmedia_baseurl" onchange="Media.formToData();" /></td>
669
+ </tr>
670
+
671
+ <tr>
672
+ <td><label for="windowsmedia_captioningid">{#media_dlg.captioningid}</label></td>
673
+ <td><input type="text" id="windowsmedia_captioningid" name="windowsmedia_captioningid" onchange="Media.formToData();" /></td>
674
+
675
+ <td><label for="windowsmedia_currentmarker">{#media_dlg.currentmarker}</label></td>
676
+ <td><input type="text" id="windowsmedia_currentmarker" name="windowsmedia_currentmarker" onchange="Media.formToData();" /></td>
677
+ </tr>
678
+
679
+ <tr>
680
+ <td><label for="windowsmedia_currentposition">{#media_dlg.currentposition}</label></td>
681
+ <td><input type="text" id="windowsmedia_currentposition" name="windowsmedia_currentposition" onchange="Media.formToData();" /></td>
682
+
683
+ <td><label for="windowsmedia_defaultframe">{#media_dlg.defaultframe}</label></td>
684
+ <td><input type="text" id="windowsmedia_defaultframe" name="windowsmedia_defaultframe" onchange="Media.formToData();" /></td>
685
+ </tr>
686
+
687
+ <tr>
688
+ <td><label for="windowsmedia_playcount">{#media_dlg.playcount}</label></td>
689
+ <td><input type="text" id="windowsmedia_playcount" name="windowsmedia_playcount" onchange="Media.formToData();" /></td>
690
+
691
+ <td><label for="windowsmedia_rate">{#media_dlg.rate}</label></td>
692
+ <td><input type="text" id="windowsmedia_rate" name="windowsmedia_rate" onchange="Media.formToData();" /></td>
693
+ </tr>
694
+
695
+ <tr>
696
+ <td><label for="windowsmedia_uimode">{#media_dlg.uimode}</label></td>
697
+ <td><input type="text" id="windowsmedia_uimode" name="windowsmedia_uimode" onchange="Media.formToData();" /></td>
698
+
699
+ <td><label for="windowsmedia_volume">{#media_dlg.volume}</label></td>
700
+ <td><input type="text" id="windowsmedia_volume" name="windowsmedia_volume" onchange="Media.formToData();" /></td>
701
+ </tr>
702
+
703
+ </table>
704
+ </fieldset>
705
+
706
+ <fieldset id="realmedia_options">
707
+ <legend>{#media_dlg.rmp_options}</legend>
708
+
709
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0">
710
+ <tr>
711
+ <td colspan="2">
712
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
713
+ <tr>
714
+ <td><input type="checkbox" class="checkbox" id="realmedia_autostart" name="realmedia_autostart" onchange="Media.formToData();" /></td>
715
+ <td><label for="realmedia_autostart">{#media_dlg.autostart}</label></td>
716
+ </tr>
717
+ </table>
718
+ </td>
719
+
720
+ <td colspan="2">
721
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
722
+ <tr>
723
+ <td><input type="checkbox" class="checkbox" id="realmedia_loop" name="realmedia_loop" onchange="Media.formToData();" /></td>
724
+ <td><label for="realmedia_loop">{#media_dlg.loop}</label></td>
725
+ </tr>
726
+ </table>
727
+ </td>
728
+ </tr>
729
+
730
+ <tr>
731
+ <td colspan="2">
732
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
733
+ <tr>
734
+ <td><input type="checkbox" class="checkbox" id="realmedia_autogotourl" name="realmedia_autogotourl" checked="checked" onchange="Media.formToData();" /></td>
735
+ <td><label for="realmedia_autogotourl">{#media_dlg.autogotourl}</label></td>
736
+ </tr>
737
+ </table>
738
+ </td>
739
+
740
+ <td colspan="2">
741
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
742
+ <tr>
743
+ <td><input type="checkbox" class="checkbox" id="realmedia_center" name="realmedia_center" onchange="Media.formToData();" /></td>
744
+ <td><label for="realmedia_center">{#media_dlg.center}</label></td>
745
+ </tr>
746
+ </table>
747
+ </td>
748
+ </tr>
749
+
750
+ <tr>
751
+ <td colspan="2">
752
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
753
+ <tr>
754
+ <td><input type="checkbox" class="checkbox" id="realmedia_imagestatus" name="realmedia_imagestatus" checked="checked" onchange="Media.formToData();" /></td>
755
+ <td><label for="realmedia_imagestatus">{#media_dlg.imagestatus}</label></td>
756
+ </tr>
757
+ </table>
758
+ </td>
759
+
760
+ <td colspan="2">
761
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
762
+ <tr>
763
+ <td><input type="checkbox" class="checkbox" id="realmedia_maintainaspect" name="realmedia_maintainaspect" onchange="Media.formToData();" /></td>
764
+ <td><label for="realmedia_maintainaspect">{#media_dlg.maintainaspect}</label></td>
765
+ </tr>
766
+ </table>
767
+ </td>
768
+ </tr>
769
+
770
+ <tr>
771
+ <td colspan="2">
772
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
773
+ <tr>
774
+ <td><input type="checkbox" class="checkbox" id="realmedia_nojava" name="realmedia_nojava" onchange="Media.formToData();" /></td>
775
+ <td><label for="realmedia_nojava">{#media_dlg.nojava}</label></td>
776
+ </tr>
777
+ </table>
778
+ </td>
779
+
780
+ <td colspan="2">
781
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
782
+ <tr>
783
+ <td><input type="checkbox" class="checkbox" id="realmedia_prefetch" name="realmedia_prefetch" onchange="Media.formToData();" /></td>
784
+ <td><label for="realmedia_prefetch">{#media_dlg.prefetch}</label></td>
785
+ </tr>
786
+ </table>
787
+ </td>
788
+ </tr>
789
+
790
+ <tr>
791
+ <td colspan="2">
792
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
793
+ <tr>
794
+ <td><input type="checkbox" class="checkbox" id="realmedia_shuffle" name="realmedia_shuffle" onchange="Media.formToData();" /></td>
795
+ <td><label for="realmedia_shuffle">{#media_dlg.shuffle}</label></td>
796
+ </tr>
797
+ </table>
798
+ </td>
799
+
800
+ <td colspan="2">
801
+ &nbsp;
802
+ </td>
803
+ </tr>
804
+
805
+ <tr>
806
+ <td><label for="realmedia_console">{#media_dlg.console}</label></td>
807
+ <td><input type="text" id="realmedia_console" name="realmedia_console" onchange="Media.formToData();" /></td>
808
+
809
+ <td><label for="realmedia_controls">{#media_dlg.controls}</label></td>
810
+ <td><input type="text" id="realmedia_controls" name="realmedia_controls" onchange="Media.formToData();" /></td>
811
+ </tr>
812
+
813
+ <tr>
814
+ <td><label for="realmedia_numloop">{#media_dlg.numloop}</label></td>
815
+ <td><input type="text" id="realmedia_numloop" name="realmedia_numloop" onchange="Media.formToData();" /></td>
816
+
817
+ <td><label for="realmedia_scriptcallbacks">{#media_dlg.scriptcallbacks}</label></td>
818
+ <td><input type="text" id="realmedia_scriptcallbacks" name="realmedia_scriptcallbacks" onchange="Media.formToData();" /></td>
819
+ </tr>
820
+ </table>
821
+ </fieldset>
822
+
823
+ <fieldset id="shockwave_options">
824
+ <legend>{#media_dlg.shockwave_options}</legend>
825
+
826
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0">
827
+ <tr>
828
+ <td><label for="shockwave_swstretchstyle">{#media_dlg.swstretchstyle}</label></td>
829
+ <td>
830
+ <select id="shockwave_swstretchstyle" name="shockwave_swstretchstyle" onchange="Media.formToData();">
831
+ <option value="none">{#not_set}</option>
832
+ <option value="meet">Meet</option>
833
+ <option value="fill">Fill</option>
834
+ <option value="stage">Stage</option>
835
+ </select>
836
+ </td>
837
+
838
+ <td><label for="shockwave_swvolume">{#media_dlg.volume}</label></td>
839
+ <td><input type="text" id="shockwave_swvolume" name="shockwave_swvolume" onchange="Media.formToData();" /></td>
840
+ </tr>
841
+
842
+ <tr>
843
+ <td><label for="shockwave_swstretchhalign">{#media_dlg.swstretchhalign}</label></td>
844
+ <td>
845
+ <select id="shockwave_swstretchhalign" name="shockwave_swstretchhalign" onchange="Media.formToData();">
846
+ <option value="none">{#not_set}</option>
847
+ <option value="left">{#media_dlg.align_left}</option>
848
+ <option value="center">{#media_dlg.align_center}</option>
849
+ <option value="right">{#media_dlg.align_right}</option>
850
+ </select>
851
+ </td>
852
+
853
+ <td><label for="shockwave_swstretchvalign">{#media_dlg.swstretchvalign}</label></td>
854
+ <td>
855
+ <select id="shockwave_swstretchvalign" name="shockwave_swstretchvalign" onchange="Media.formToData();">
856
+ <option value="none">{#not_set}</option>
857
+ <option value="meet">Meet</option>
858
+ <option value="fill">Fill</option>
859
+ <option value="stage">Stage</option>
860
+ </select>
861
+ </td>
862
+ </tr>
863
+
864
+ <tr>
865
+ <td colspan="2">
866
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
867
+ <tr>
868
+ <td><input type="checkbox" class="checkbox" id="shockwave_autostart" name="shockwave_autostart" onchange="Media.formToData();" checked="checked" /></td>
869
+ <td><label for="shockwave_autostart">{#media_dlg.autostart}</label></td>
870
+ </tr>
871
+ </table>
872
+ </td>
873
+
874
+ <td colspan="2">
875
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
876
+ <tr>
877
+ <td><input type="checkbox" class="checkbox" id="shockwave_sound" name="shockwave_sound" onchange="Media.formToData();" checked="checked" /></td>
878
+ <td><label for="shockwave_sound">{#media_dlg.sound}</label></td>
879
+ </tr>
880
+ </table>
881
+ </td>
882
+ </tr>
883
+
884
+
885
+ <tr>
886
+ <td colspan="2">
887
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
888
+ <tr>
889
+ <td><input type="checkbox" class="checkbox" id="shockwave_swliveconnect" name="shockwave_swliveconnect" onchange="Media.formToData();" /></td>
890
+ <td><label for="shockwave_swliveconnect">{#media_dlg.liveconnect}</label></td>
891
+ </tr>
892
+ </table>
893
+ </td>
894
+
895
+ <td colspan="2">
896
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
897
+ <tr>
898
+ <td><input type="checkbox" class="checkbox" id="shockwave_progress" name="shockwave_progress" onchange="Media.formToData();" checked="checked" /></td>
899
+ <td><label for="shockwave_progress">{#media_dlg.progress}</label></td>
900
+ </tr>
901
+ </table>
902
+ </td>
903
+ </tr>
904
+ </table>
905
+ </fieldset>
906
+ </div>
907
+
908
+ <div id="source_panel" class="panel">
909
+ <fieldset>
910
+ <legend>{#media_dlg.source}</legend>
911
+ <textarea id="source" style="width: 99%; height: 390px"></textarea>
912
+ </fieldset>
913
+ </div>
914
+ </div>
915
+
916
+ <div class="mceActionPanel">
917
+ <input type="submit" id="insert" name="insert" value="{#insert}" />
918
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
919
+ </div>
920
+ </form>
921
+ </body>
922
+ </html>
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/paste/editor_plugin_src.js CHANGED
@@ -1,871 +1,871 @@
1
- /**
2
- * editor_plugin_src.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() {
12
- var each = tinymce.each,
13
- defs = {
14
- paste_auto_cleanup_on_paste : true,
15
- paste_enable_default_filters : true,
16
- paste_block_drop : false,
17
- paste_retain_style_properties : "none",
18
- paste_strip_class_attributes : "mso",
19
- paste_remove_spans : false,
20
- paste_remove_styles : false,
21
- paste_remove_styles_if_webkit : true,
22
- paste_convert_middot_lists : true,
23
- paste_convert_headers_to_strong : false,
24
- paste_dialog_width : "450",
25
- paste_dialog_height : "400",
26
- paste_text_use_dialog : false,
27
- paste_text_sticky : false,
28
- paste_text_sticky_default : false,
29
- paste_text_notifyalways : false,
30
- paste_text_linebreaktype : "combined",
31
- paste_text_replacements : [
32
- [/\u2026/g, "..."],
33
- [/[\x93\x94\u201c\u201d]/g, '"'],
34
- [/[\x60\x91\x92\u2018\u2019]/g, "'"]
35
- ]
36
- };
37
-
38
- function getParam(ed, name) {
39
- return ed.getParam(name, defs[name]);
40
- }
41
-
42
- tinymce.create('tinymce.plugins.PastePlugin', {
43
- init : function(ed, url) {
44
- var t = this;
45
-
46
- t.editor = ed;
47
- t.url = url;
48
-
49
- // Setup plugin events
50
- t.onPreProcess = new tinymce.util.Dispatcher(t);
51
- t.onPostProcess = new tinymce.util.Dispatcher(t);
52
-
53
- // Register default handlers
54
- t.onPreProcess.add(t._preProcess);
55
- t.onPostProcess.add(t._postProcess);
56
-
57
- // Register optional preprocess handler
58
- t.onPreProcess.add(function(pl, o) {
59
- ed.execCallback('paste_preprocess', pl, o);
60
- });
61
-
62
- // Register optional postprocess
63
- t.onPostProcess.add(function(pl, o) {
64
- ed.execCallback('paste_postprocess', pl, o);
65
- });
66
-
67
- ed.onKeyDown.addToTop(function(ed, e) {
68
- // Block ctrl+v from adding an undo level since the default logic in tinymce.Editor will add that
69
- if (((tinymce.isMac ? e.metaKey : e.ctrlKey) && e.keyCode == 86) || (e.shiftKey && e.keyCode == 45))
70
- return false; // Stop other listeners
71
- });
72
-
73
- // Initialize plain text flag
74
- ed.pasteAsPlainText = getParam(ed, 'paste_text_sticky_default');
75
-
76
- // This function executes the process handlers and inserts the contents
77
- // force_rich overrides plain text mode set by user, important for pasting with execCommand
78
- function process(o, force_rich) {
79
- var dom = ed.dom, rng;
80
-
81
- // Execute pre process handlers
82
- t.onPreProcess.dispatch(t, o);
83
-
84
- // Create DOM structure
85
- o.node = dom.create('div', 0, o.content);
86
-
87
- // If pasting inside the same element and the contents is only one block
88
- // remove the block and keep the text since Firefox will copy parts of pre and h1-h6 as a pre element
89
- if (tinymce.isGecko) {
90
- rng = ed.selection.getRng(true);
91
- if (rng.startContainer == rng.endContainer && rng.startContainer.nodeType == 3) {
92
- // Is only one block node and it doesn't contain word stuff
93
- if (o.node.childNodes.length === 1 && /^(p|h[1-6]|pre)$/i.test(o.node.firstChild.nodeName) && o.content.indexOf('__MCE_ITEM__') === -1)
94
- dom.remove(o.node.firstChild, true);
95
- }
96
- }
97
-
98
- // Execute post process handlers
99
- t.onPostProcess.dispatch(t, o);
100
-
101
- // Serialize content
102
- o.content = ed.serializer.serialize(o.node, {getInner : 1, forced_root_block : ''});
103
-
104
- // Plain text option active?
105
- if ((!force_rich) && (ed.pasteAsPlainText)) {
106
- t._insertPlainText(o.content);
107
-
108
- if (!getParam(ed, "paste_text_sticky")) {
109
- ed.pasteAsPlainText = false;
110
- ed.controlManager.setActive("pastetext", false);
111
- }
112
- } else {
113
- t._insert(o.content);
114
- }
115
- }
116
-
117
- // Add command for external usage
118
- ed.addCommand('mceInsertClipboardContent', function(u, o) {
119
- process(o, true);
120
- });
121
-
122
- if (!getParam(ed, "paste_text_use_dialog")) {
123
- ed.addCommand('mcePasteText', function(u, v) {
124
- var cookie = tinymce.util.Cookie;
125
-
126
- ed.pasteAsPlainText = !ed.pasteAsPlainText;
127
- ed.controlManager.setActive('pastetext', ed.pasteAsPlainText);
128
-
129
- if ((ed.pasteAsPlainText) && (!cookie.get("tinymcePasteText"))) {
130
- if (getParam(ed, "paste_text_sticky")) {
131
- ed.windowManager.alert(ed.translate('paste.plaintext_mode_sticky'));
132
- } else {
133
- ed.windowManager.alert(ed.translate('paste.plaintext_mode'));
134
- }
135
-
136
- if (!getParam(ed, "paste_text_notifyalways")) {
137
- cookie.set("tinymcePasteText", "1", new Date(new Date().getFullYear() + 1, 12, 31))
138
- }
139
- }
140
- });
141
- }
142
-
143
- ed.addButton('pastetext', {title: 'paste.paste_text_desc', cmd: 'mcePasteText'});
144
- ed.addButton('selectall', {title: 'paste.selectall_desc', cmd: 'selectall'});
145
-
146
- // This function grabs the contents from the clipboard by adding a
147
- // hidden div and placing the caret inside it and after the browser paste
148
- // is done it grabs that contents and processes that
149
- function grabContent(e) {
150
- var n, or, rng, oldRng, sel = ed.selection, dom = ed.dom, body = ed.getBody(), posY, textContent;
151
-
152
- // Check if browser supports direct plaintext access
153
- if (e.clipboardData || dom.doc.dataTransfer) {
154
- textContent = (e.clipboardData || dom.doc.dataTransfer).getData('Text');
155
-
156
- if (ed.pasteAsPlainText) {
157
- e.preventDefault();
158
- process({content : dom.encode(textContent).replace(/\r?\n/g, '<br />')});
159
- return;
160
- }
161
- }
162
-
163
- if (dom.get('_mcePaste'))
164
- return;
165
-
166
- // Create container to paste into
167
- n = dom.add(body, 'div', {id : '_mcePaste', 'class' : 'mcePaste', 'data-mce-bogus' : '1'}, '\uFEFF\uFEFF');
168
-
169
- // If contentEditable mode we need to find out the position of the closest element
170
- if (body != ed.getDoc().body)
171
- posY = dom.getPos(ed.selection.getStart(), body).y;
172
- else
173
- posY = body.scrollTop + dom.getViewPort(ed.getWin()).y;
174
-
175
- // Styles needs to be applied after the element is added to the document since WebKit will otherwise remove all styles
176
- // If also needs to be in view on IE or the paste would fail
177
- dom.setStyles(n, {
178
- position : 'absolute',
179
- left : tinymce.isGecko ? -40 : 0, // Need to move it out of site on Gecko since it will othewise display a ghost resize rect for the div
180
- top : posY - 25,
181
- width : 1,
182
- height : 1,
183
- overflow : 'hidden'
184
- });
185
-
186
- if (tinymce.isIE) {
187
- // Store away the old range
188
- oldRng = sel.getRng();
189
-
190
- // Select the container
191
- rng = dom.doc.body.createTextRange();
192
- rng.moveToElementText(n);
193
- rng.execCommand('Paste');
194
-
195
- // Remove container
196
- dom.remove(n);
197
-
198
- // Check if the contents was changed, if it wasn't then clipboard extraction failed probably due
199
- // to IE security settings so we pass the junk though better than nothing right
200
- if (n.innerHTML === '\uFEFF\uFEFF') {
201
- ed.execCommand('mcePasteWord');
202
- e.preventDefault();
203
- return;
204
- }
205
-
206
- // Restore the old range and clear the contents before pasting
207
- sel.setRng(oldRng);
208
- sel.setContent('');
209
-
210
- // For some odd reason we need to detach the the mceInsertContent call from the paste event
211
- // It's like IE has a reference to the parent element that you paste in and the selection gets messed up
212
- // when it tries to restore the selection
213
- setTimeout(function() {
214
- // Process contents
215
- process({content : n.innerHTML});
216
- }, 0);
217
-
218
- // Block the real paste event
219
- return tinymce.dom.Event.cancel(e);
220
- } else {
221
- function block(e) {
222
- e.preventDefault();
223
- };
224
-
225
- // Block mousedown and click to prevent selection change
226
- dom.bind(ed.getDoc(), 'mousedown', block);
227
- dom.bind(ed.getDoc(), 'keydown', block);
228
-
229
- or = ed.selection.getRng();
230
-
231
- // Move select contents inside DIV
232
- n = n.firstChild;
233
- rng = ed.getDoc().createRange();
234
- rng.setStart(n, 0);
235
- rng.setEnd(n, 2);
236
- sel.setRng(rng);
237
-
238
- // Wait a while and grab the pasted contents
239
- window.setTimeout(function() {
240
- var h = '', nl;
241
-
242
- // Paste divs duplicated in paste divs seems to happen when you paste plain text so lets first look for that broken behavior in WebKit
243
- if (!dom.select('div.mcePaste > div.mcePaste').length) {
244
- nl = dom.select('div.mcePaste');
245
-
246
- // WebKit will split the div into multiple ones so this will loop through then all and join them to get the whole HTML string
247
- each(nl, function(n) {
248
- var child = n.firstChild;
249
-
250
- // WebKit inserts a DIV container with lots of odd styles
251
- if (child && child.nodeName == 'DIV' && child.style.marginTop && child.style.backgroundColor) {
252
- dom.remove(child, 1);
253
- }
254
-
255
- // Remove apply style spans
256
- each(dom.select('span.Apple-style-span', n), function(n) {
257
- dom.remove(n, 1);
258
- });
259
-
260
- // Remove bogus br elements
261
- each(dom.select('br[data-mce-bogus]', n), function(n) {
262
- dom.remove(n);
263
- });
264
-
265
- // WebKit will make a copy of the DIV for each line of plain text pasted and insert them into the DIV
266
- if (n.parentNode.className != 'mcePaste')
267
- h += n.innerHTML;
268
- });
269
- } else {
270
- // Found WebKit weirdness so force the content into paragraphs this seems to happen when you paste plain text from Nodepad etc
271
- // So this logic will replace double enter with paragraphs and single enter with br so it kind of looks the same
272
- h = '<p>' + dom.encode(textContent).replace(/\r?\n\r?\n/g, '</p><p>').replace(/\r?\n/g, '<br />') + '</p>';
273
- }
274
-
275
- // Remove the nodes
276
- each(dom.select('div.mcePaste'), function(n) {
277
- dom.remove(n);
278
- });
279
-
280
- // Restore the old selection
281
- if (or)
282
- sel.setRng(or);
283
-
284
- process({content : h});
285
-
286
- // Unblock events ones we got the contents
287
- dom.unbind(ed.getDoc(), 'mousedown', block);
288
- dom.unbind(ed.getDoc(), 'keydown', block);
289
- }, 0);
290
- }
291
- }
292
-
293
- // Check if we should use the new auto process method
294
- if (getParam(ed, "paste_auto_cleanup_on_paste")) {
295
- // Is it's Opera or older FF use key handler
296
- if (tinymce.isOpera || /Firefox\/2/.test(navigator.userAgent)) {
297
- ed.onKeyDown.addToTop(function(ed, e) {
298
- if (((tinymce.isMac ? e.metaKey : e.ctrlKey) && e.keyCode == 86) || (e.shiftKey && e.keyCode == 45))
299
- grabContent(e);
300
- });
301
- } else {
302
- // Grab contents on paste event on Gecko and WebKit
303
- ed.onPaste.addToTop(function(ed, e) {
304
- return grabContent(e);
305
- });
306
- }
307
- }
308
-
309
- ed.onInit.add(function() {
310
- ed.controlManager.setActive("pastetext", ed.pasteAsPlainText);
311
-
312
- // Block all drag/drop events
313
- if (getParam(ed, "paste_block_drop")) {
314
- ed.dom.bind(ed.getBody(), ['dragend', 'dragover', 'draggesture', 'dragdrop', 'drop', 'drag'], function(e) {
315
- e.preventDefault();
316
- e.stopPropagation();
317
-
318
- return false;
319
- });
320
- }
321
- });
322
-
323
- // Add legacy support
324
- t._legacySupport();
325
- },
326
-
327
- getInfo : function() {
328
- return {
329
- longname : 'Paste text/word',
330
- author : 'Moxiecode Systems AB',
331
- authorurl : 'http://tinymce.moxiecode.com',
332
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste',
333
- version : tinymce.majorVersion + "." + tinymce.minorVersion
334
- };
335
- },
336
-
337
- _preProcess : function(pl, o) {
338
- var ed = this.editor,
339
- h = o.content,
340
- grep = tinymce.grep,
341
- explode = tinymce.explode,
342
- trim = tinymce.trim,
343
- len, stripClass;
344
-
345
- //console.log('Before preprocess:' + o.content);
346
-
347
- function process(items) {
348
- each(items, function(v) {
349
- // Remove or replace
350
- if (v.constructor == RegExp)
351
- h = h.replace(v, '');
352
- else
353
- h = h.replace(v[0], v[1]);
354
- });
355
- }
356
-
357
- if (ed.settings.paste_enable_default_filters == false) {
358
- return;
359
- }
360
-
361
- // IE9 adds BRs before/after block elements when contents is pasted from word or for example another browser
362
- if (tinymce.isIE && document.documentMode >= 9 && /<(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)/.test(o.content)) {
363
- // IE9 adds BRs before/after block elements when contents is pasted from word or for example another browser
364
- process([[/(?:<br>&nbsp;[\s\r\n]+|<br>)*(<\/?(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)[^>]*>)(?:<br>&nbsp;[\s\r\n]+|<br>)*/g, '$1']]);
365
-
366
- // IE9 also adds an extra BR element for each soft-linefeed and it also adds a BR for each word wrap break
367
- process([
368
- [/<br><br>/g, '<BR><BR>'], // Replace multiple BR elements with uppercase BR to keep them intact
369
- [/<br>/g, ' '], // Replace single br elements with space since they are word wrap BR:s
370
- [/<BR><BR>/g, '<br>'] // Replace back the double brs but into a single BR
371
- ]);
372
- }
373
-
374
- // Detect Word content and process it more aggressive
375
- if (/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(h) || o.wordContent) {
376
- o.wordContent = true; // Mark the pasted contents as word specific content
377
- //console.log('Word contents detected.');
378
-
379
- // Process away some basic content
380
- process([
381
- /^\s*(&nbsp;)+/gi, // &nbsp; entities at the start of contents
382
- /(&nbsp;|<br[^>]*>)+\s*$/gi // &nbsp; entities at the end of contents
383
- ]);
384
-
385
- if (getParam(ed, "paste_convert_headers_to_strong")) {
386
- h = h.replace(/<p [^>]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi, "<p><strong>$1</strong></p>");
387
- }
388
-
389
- if (getParam(ed, "paste_convert_middot_lists")) {
390
- process([
391
- [/<!--\[if !supportLists\]-->/gi, '$&__MCE_ITEM__'], // Convert supportLists to a list item marker
392
- [/(<span[^>]+(?:mso-list:|:\s*symbol)[^>]+>)/gi, '$1__MCE_ITEM__'], // Convert mso-list and symbol spans to item markers
393
- [/(<p[^>]+(?:MsoListParagraph)[^>]+>)/gi, '$1__MCE_ITEM__'] // Convert mso-list and symbol paragraphs to item markers (FF)
394
- ]);
395
- }
396
-
397
- process([
398
- // Word comments like conditional comments etc
399
- /<!--[\s\S]+?-->/gi,
400
-
401
- // Remove comments, scripts (e.g., msoShowComment), XML tag, VML content, MS Office namespaced tags, and a few other tags
402
- /<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,
403
-
404
- // Convert <s> into <strike> for line-though
405
- [/<(\/?)s>/gi, "<$1strike>"],
406
-
407
- // Replace nsbp entites to char since it's easier to handle
408
- [/&nbsp;/gi, "\u00a0"]
409
- ]);
410
-
411
- // Remove bad attributes, with or without quotes, ensuring that attribute text is really inside a tag.
412
- // If JavaScript had a RegExp look-behind, we could have integrated this with the last process() array and got rid of the loop. But alas, it does not, so we cannot.
413
- do {
414
- len = h.length;
415
- h = h.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi, "$1");
416
- } while (len != h.length);
417
-
418
- // Remove all spans if no styles is to be retained
419
- if (getParam(ed, "paste_retain_style_properties").replace(/^none$/i, "").length == 0) {
420
- h = h.replace(/<\/?span[^>]*>/gi, "");
421
- } else {
422
- // We're keeping styles, so at least clean them up.
423
- // CSS Reference: http://msdn.microsoft.com/en-us/library/aa155477.aspx
424
-
425
- process([
426
- // Convert <span style="mso-spacerun:yes">___</span> to string of alternating breaking/non-breaking spaces of same length
427
- [/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,
428
- function(str, spaces) {
429
- return (spaces.length > 0)? spaces.replace(/./, " ").slice(Math.floor(spaces.length/2)).split("").join("\u00a0") : "";
430
- }
431
- ],
432
-
433
- // Examine all styles: delete junk, transform some, and keep the rest
434
- [/(<[a-z][^>]*)\sstyle="([^"]*)"/gi,
435
- function(str, tag, style) {
436
- var n = [],
437
- i = 0,
438
- s = explode(trim(style).replace(/&quot;/gi, "'"), ";");
439
-
440
- // Examine each style definition within the tag's style attribute
441
- each(s, function(v) {
442
- var name, value,
443
- parts = explode(v, ":");
444
-
445
- function ensureUnits(v) {
446
- return v + ((v !== "0") && (/\d$/.test(v)))? "px" : "";
447
- }
448
-
449
- if (parts.length == 2) {
450
- name = parts[0].toLowerCase();
451
- value = parts[1].toLowerCase();
452
-
453
- // Translate certain MS Office styles into their CSS equivalents
454
- switch (name) {
455
- case "mso-padding-alt":
456
- case "mso-padding-top-alt":
457
- case "mso-padding-right-alt":
458
- case "mso-padding-bottom-alt":
459
- case "mso-padding-left-alt":
460
- case "mso-margin-alt":
461
- case "mso-margin-top-alt":
462
- case "mso-margin-right-alt":
463
- case "mso-margin-bottom-alt":
464
- case "mso-margin-left-alt":
465
- case "mso-table-layout-alt":
466
- case "mso-height":
467
- case "mso-width":
468
- case "mso-vertical-align-alt":
469
- n[i++] = name.replace(/^mso-|-alt$/g, "") + ":" + ensureUnits(value);
470
- return;
471
-
472
- case "horiz-align":
473
- n[i++] = "text-align:" + value;
474
- return;
475
-
476
- case "vert-align":
477
- n[i++] = "vertical-align:" + value;
478
- return;
479
-
480
- case "font-color":
481
- case "mso-foreground":
482
- n[i++] = "color:" + value;
483
- return;
484
-
485
- case "mso-background":
486
- case "mso-highlight":
487
- n[i++] = "background:" + value;
488
- return;
489
-
490
- case "mso-default-height":
491
- n[i++] = "min-height:" + ensureUnits(value);
492
- return;
493
-
494
- case "mso-default-width":
495
- n[i++] = "min-width:" + ensureUnits(value);
496
- return;
497
-
498
- case "mso-padding-between-alt":
499
- n[i++] = "border-collapse:separate;border-spacing:" + ensureUnits(value);
500
- return;
501
-
502
- case "text-line-through":
503
- if ((value == "single") || (value == "double")) {
504
- n[i++] = "text-decoration:line-through";
505
- }
506
- return;
507
-
508
- case "mso-zero-height":
509
- if (value == "yes") {
510
- n[i++] = "display:none";
511
- }
512
- return;
513
- }
514
-
515
- // Eliminate all MS Office style definitions that have no CSS equivalent by examining the first characters in the name
516
- if (/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(name)) {
517
- return;
518
- }
519
-
520
- // If it reached this point, it must be a valid CSS style
521
- n[i++] = name + ":" + parts[1]; // Lower-case name, but keep value case
522
- }
523
- });
524
-
525
- // If style attribute contained any valid styles the re-write it; otherwise delete style attribute.
526
- if (i > 0) {
527
- return tag + ' style="' + n.join(';') + '"';
528
- } else {
529
- return tag;
530
- }
531
- }
532
- ]
533
- ]);
534
- }
535
- }
536
-
537
- // Replace headers with <strong>
538
- if (getParam(ed, "paste_convert_headers_to_strong")) {
539
- process([
540
- [/<h[1-6][^>]*>/gi, "<p><strong>"],
541
- [/<\/h[1-6][^>]*>/gi, "</strong></p>"]
542
- ]);
543
- }
544
-
545
- process([
546
- // Copy paste from Java like Open Office will produce this junk on FF
547
- [/Version:[\d.]+\nStartHTML:\d+\nEndHTML:\d+\nStartFragment:\d+\nEndFragment:\d+/gi, '']
548
- ]);
549
-
550
- // Class attribute options are: leave all as-is ("none"), remove all ("all"), or remove only those starting with mso ("mso").
551
- // Note:- paste_strip_class_attributes: "none", verify_css_classes: true is also a good variation.
552
- stripClass = getParam(ed, "paste_strip_class_attributes");
553
-
554
- if (stripClass !== "none") {
555
- function removeClasses(match, g1) {
556
- if (stripClass === "all")
557
- return '';
558
-
559
- var cls = grep(explode(g1.replace(/^(["'])(.*)\1$/, "$2"), " "),
560
- function(v) {
561
- return (/^(?!mso)/i.test(v));
562
- }
563
- );
564
-
565
- return cls.length ? ' class="' + cls.join(" ") + '"' : '';
566
- };
567
-
568
- h = h.replace(/ class="([^"]+)"/gi, removeClasses);
569
- h = h.replace(/ class=([\-\w]+)/gi, removeClasses);
570
- }
571
-
572
- // Remove spans option
573
- if (getParam(ed, "paste_remove_spans")) {
574
- h = h.replace(/<\/?span[^>]*>/gi, "");
575
- }
576
-
577
- //console.log('After preprocess:' + h);
578
-
579
- o.content = h;
580
- },
581
-
582
- /**
583
- * Various post process items.
584
- */
585
- _postProcess : function(pl, o) {
586
- var t = this, ed = t.editor, dom = ed.dom, styleProps;
587
-
588
- if (ed.settings.paste_enable_default_filters == false) {
589
- return;
590
- }
591
-
592
- if (o.wordContent) {
593
- // Remove named anchors or TOC links
594
- each(dom.select('a', o.node), function(a) {
595
- if (!a.href || a.href.indexOf('#_Toc') != -1)
596
- dom.remove(a, 1);
597
- });
598
-
599
- if (getParam(ed, "paste_convert_middot_lists")) {
600
- t._convertLists(pl, o);
601
- }
602
-
603
- // Process styles
604
- styleProps = getParam(ed, "paste_retain_style_properties"); // retained properties
605
-
606
- // Process only if a string was specified and not equal to "all" or "*"
607
- if ((tinymce.is(styleProps, "string")) && (styleProps !== "all") && (styleProps !== "*")) {
608
- styleProps = tinymce.explode(styleProps.replace(/^none$/i, ""));
609
-
610
- // Retains some style properties
611
- each(dom.select('*', o.node), function(el) {
612
- var newStyle = {}, npc = 0, i, sp, sv;
613
-
614
- // Store a subset of the existing styles
615
- if (styleProps) {
616
- for (i = 0; i < styleProps.length; i++) {
617
- sp = styleProps[i];
618
- sv = dom.getStyle(el, sp);
619
-
620
- if (sv) {
621
- newStyle[sp] = sv;
622
- npc++;
623
- }
624
- }
625
- }
626
-
627
- // Remove all of the existing styles
628
- dom.setAttrib(el, 'style', '');
629
-
630
- if (styleProps && npc > 0)
631
- dom.setStyles(el, newStyle); // Add back the stored subset of styles
632
- else // Remove empty span tags that do not have class attributes
633
- if (el.nodeName == 'SPAN' && !el.className)
634
- dom.remove(el, true);
635
- });
636
- }
637
- }
638
-
639
- // Remove all style information or only specifically on WebKit to avoid the style bug on that browser
640
- if (getParam(ed, "paste_remove_styles") || (getParam(ed, "paste_remove_styles_if_webkit") && tinymce.isWebKit)) {
641
- each(dom.select('*[style]', o.node), function(el) {
642
- el.removeAttribute('style');
643
- el.removeAttribute('data-mce-style');
644
- });
645
- } else {
646
- if (tinymce.isWebKit) {
647
- // We need to compress the styles on WebKit since if you paste <img border="0" /> it will become <img border="0" style="... lots of junk ..." />
648
- // Removing the mce_style that contains the real value will force the Serializer engine to compress the styles
649
- each(dom.select('*', o.node), function(el) {
650
- el.removeAttribute('data-mce-style');
651
- });
652
- }
653
- }
654
- },
655
-
656
- /**
657
- * Converts the most common bullet and number formats in Office into a real semantic UL/LI list.
658
- */
659
- _convertLists : function(pl, o) {
660
- var dom = pl.editor.dom, listElm, li, lastMargin = -1, margin, levels = [], lastType, html;
661
-
662
- // Convert middot lists into real semantic lists
663
- each(dom.select('p', o.node), function(p) {
664
- var sib, val = '', type, html, idx, parents;
665
-
666
- // Get text node value at beginning of paragraph
667
- for (sib = p.firstChild; sib && sib.nodeType == 3; sib = sib.nextSibling)
668
- val += sib.nodeValue;
669
-
670
- val = p.innerHTML.replace(/<\/?\w+[^>]*>/gi, '').replace(/&nbsp;/g, '\u00a0');
671
-
672
- // Detect unordered lists look for bullets
673
- if (/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*\u00a0*/.test(val))
674
- type = 'ul';
675
-
676
- // Detect ordered lists 1., a. or ixv.
677
- if (/^__MCE_ITEM__\s*\w+\.\s*\u00a0+/.test(val))
678
- type = 'ol';
679
-
680
- // Check if node value matches the list pattern: o&nbsp;&nbsp;
681
- if (type) {
682
- margin = parseFloat(p.style.marginLeft || 0);
683
-
684
- if (margin > lastMargin)
685
- levels.push(margin);
686
-
687
- if (!listElm || type != lastType) {
688
- listElm = dom.create(type);
689
- dom.insertAfter(listElm, p);
690
- } else {
691
- // Nested list element
692
- if (margin > lastMargin) {
693
- listElm = li.appendChild(dom.create(type));
694
- } else if (margin < lastMargin) {
695
- // Find parent level based on margin value
696
- idx = tinymce.inArray(levels, margin);
697
- parents = dom.getParents(listElm.parentNode, type);
698
- listElm = parents[parents.length - 1 - idx] || listElm;
699
- }
700
- }
701
-
702
- // Remove middot or number spans if they exists
703
- each(dom.select('span', p), function(span) {
704
- var html = span.innerHTML.replace(/<\/?\w+[^>]*>/gi, '');
705
-
706
- // Remove span with the middot or the number
707
- if (type == 'ul' && /^__MCE_ITEM__[\u2022\u00b7\u00a7\u00d8o\u25CF]/.test(html))
708
- dom.remove(span);
709
- else if (/^__MCE_ITEM__[\s\S]*\w+\.(&nbsp;|\u00a0)*\s*/.test(html))
710
- dom.remove(span);
711
- });
712
-
713
- html = p.innerHTML;
714
-
715
- // Remove middot/list items
716
- if (type == 'ul')
717
- html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*(&nbsp;|\u00a0)+\s*/, '');
718
- else
719
- html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^\s*\w+\.(&nbsp;|\u00a0)+\s*/, '');
720
-
721
- // Create li and add paragraph data into the new li
722
- li = listElm.appendChild(dom.create('li', 0, html));
723
- dom.remove(p);
724
-
725
- lastMargin = margin;
726
- lastType = type;
727
- } else
728
- listElm = lastMargin = 0; // End list element
729
- });
730
-
731
- // Remove any left over makers
732
- html = o.node.innerHTML;
733
- if (html.indexOf('__MCE_ITEM__') != -1)
734
- o.node.innerHTML = html.replace(/__MCE_ITEM__/g, '');
735
- },
736
-
737
- /**
738
- * Inserts the specified contents at the caret position.
739
- */
740
- _insert : function(h, skip_undo) {
741
- var ed = this.editor, r = ed.selection.getRng();
742
-
743
- // First delete the contents seems to work better on WebKit when the selection spans multiple list items or multiple table cells.
744
- if (!ed.selection.isCollapsed() && r.startContainer != r.endContainer)
745
- ed.getDoc().execCommand('Delete', false, null);
746
-
747
- ed.execCommand('mceInsertContent', false, h, {skip_undo : skip_undo});
748
- },
749
-
750
- /**
751
- * Instead of the old plain text method which tried to re-create a paste operation, the
752
- * new approach adds a plain text mode toggle switch that changes the behavior of paste.
753
- * This function is passed the same input that the regular paste plugin produces.
754
- * It performs additional scrubbing and produces (and inserts) the plain text.
755
- * This approach leverages all of the great existing functionality in the paste
756
- * plugin, and requires minimal changes to add the new functionality.
757
- * Speednet - June 2009
758
- */
759
- _insertPlainText : function(content) {
760
- var ed = this.editor,
761
- linebr = getParam(ed, "paste_text_linebreaktype"),
762
- rl = getParam(ed, "paste_text_replacements"),
763
- is = tinymce.is;
764
-
765
- function process(items) {
766
- each(items, function(v) {
767
- if (v.constructor == RegExp)
768
- content = content.replace(v, "");
769
- else
770
- content = content.replace(v[0], v[1]);
771
- });
772
- };
773
-
774
- if ((typeof(content) === "string") && (content.length > 0)) {
775
- // If HTML content with line-breaking tags, then remove all cr/lf chars because only tags will break a line
776
- if (/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(content)) {
777
- process([
778
- /[\n\r]+/g
779
- ]);
780
- } else {
781
- // Otherwise just get rid of carriage returns (only need linefeeds)
782
- process([
783
- /\r+/g
784
- ]);
785
- }
786
-
787
- process([
788
- [/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi, "\n\n"], // Block tags get a blank line after them
789
- [/<br[^>]*>|<\/tr>/gi, "\n"], // Single linebreak for <br /> tags and table rows
790
- [/<\/t[dh]>\s*<t[dh][^>]*>/gi, "\t"], // Table cells get tabs betweem them
791
- /<[a-z!\/?][^>]*>/gi, // Delete all remaining tags
792
- [/&nbsp;/gi, " "], // Convert non-break spaces to regular spaces (remember, *plain text*)
793
- [/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi, "$1"],// Cool little RegExp deletes whitespace around linebreak chars.
794
- [/\n{3,}/g, "\n\n"] // Max. 2 consecutive linebreaks
795
- ]);
796
-
797
- content = ed.dom.decode(tinymce.html.Entities.encodeRaw(content));
798
-
799
- // Perform default or custom replacements
800
- if (is(rl, "array")) {
801
- process(rl);
802
- } else if (is(rl, "string")) {
803
- process(new RegExp(rl, "gi"));
804
- }
805
-
806
- // Treat paragraphs as specified in the config
807
- if (linebr == "none") {
808
- // Convert all line breaks to space
809
- process([
810
- [/\n+/g, " "]
811
- ]);
812
- } else if (linebr == "br") {
813
- // Convert all line breaks to <br />
814
- process([
815
- [/\n/g, "<br />"]
816
- ]);
817
- } else if (linebr == "p") {
818
- // Convert all line breaks to <p>...</p>
819
- process([
820
- [/\n+/g, "</p><p>"],
821
- [/^(.*<\/p>)(<p>)$/, '<p>$1']
822
- ]);
823
- } else {
824
- // defaults to "combined"
825
- // Convert single line breaks to <br /> and double line breaks to <p>...</p>
826
- process([
827
- [/\n\n/g, "</p><p>"],
828
- [/^(.*<\/p>)(<p>)$/, '<p>$1'],
829
- [/\n/g, "<br />"]
830
- ]);
831
- }
832
-
833
- ed.execCommand('mceInsertContent', false, content);
834
- }
835
- },
836
-
837
- /**
838
- * This method will open the old style paste dialogs. Some users might want the old behavior but still use the new cleanup engine.
839
- */
840
- _legacySupport : function() {
841
- var t = this, ed = t.editor;
842
-
843
- // Register command(s) for backwards compatibility
844
- ed.addCommand("mcePasteWord", function() {
845
- ed.windowManager.open({
846
- file: t.url + "/pasteword.htm",
847
- width: parseInt(getParam(ed, "paste_dialog_width")),
848
- height: parseInt(getParam(ed, "paste_dialog_height")),
849
- inline: 1
850
- });
851
- });
852
-
853
- if (getParam(ed, "paste_text_use_dialog")) {
854
- ed.addCommand("mcePasteText", function() {
855
- ed.windowManager.open({
856
- file : t.url + "/pastetext.htm",
857
- width: parseInt(getParam(ed, "paste_dialog_width")),
858
- height: parseInt(getParam(ed, "paste_dialog_height")),
859
- inline : 1
860
- });
861
- });
862
- }
863
-
864
- // Register button for backwards compatibility
865
- ed.addButton("pasteword", {title : "paste.paste_word_desc", cmd : "mcePasteWord"});
866
- }
867
- });
868
-
869
- // Register plugin
870
- tinymce.PluginManager.add("paste", tinymce.plugins.PastePlugin);
871
- })();
1
+ /**
2
+ * editor_plugin_src.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() {
12
+ var each = tinymce.each,
13
+ defs = {
14
+ paste_auto_cleanup_on_paste : true,
15
+ paste_enable_default_filters : true,
16
+ paste_block_drop : false,
17
+ paste_retain_style_properties : "none",
18
+ paste_strip_class_attributes : "mso",
19
+ paste_remove_spans : false,
20
+ paste_remove_styles : false,
21
+ paste_remove_styles_if_webkit : true,
22
+ paste_convert_middot_lists : true,
23
+ paste_convert_headers_to_strong : false,
24
+ paste_dialog_width : "450",
25
+ paste_dialog_height : "400",
26
+ paste_text_use_dialog : false,
27
+ paste_text_sticky : false,
28
+ paste_text_sticky_default : false,
29
+ paste_text_notifyalways : false,
30
+ paste_text_linebreaktype : "combined",
31
+ paste_text_replacements : [
32
+ [/\u2026/g, "..."],
33
+ [/[\x93\x94\u201c\u201d]/g, '"'],
34
+ [/[\x60\x91\x92\u2018\u2019]/g, "'"]
35
+ ]
36
+ };
37
+
38
+ function getParam(ed, name) {
39
+ return ed.getParam(name, defs[name]);
40
+ }
41
+
42
+ tinymce.create('tinymce.plugins.PastePlugin', {
43
+ init : function(ed, url) {
44
+ var t = this;
45
+
46
+ t.editor = ed;
47
+ t.url = url;
48
+
49
+ // Setup plugin events
50
+ t.onPreProcess = new tinymce.util.Dispatcher(t);
51
+ t.onPostProcess = new tinymce.util.Dispatcher(t);
52
+
53
+ // Register default handlers
54
+ t.onPreProcess.add(t._preProcess);
55
+ t.onPostProcess.add(t._postProcess);
56
+
57
+ // Register optional preprocess handler
58
+ t.onPreProcess.add(function(pl, o) {
59
+ ed.execCallback('paste_preprocess', pl, o);
60
+ });
61
+
62
+ // Register optional postprocess
63
+ t.onPostProcess.add(function(pl, o) {
64
+ ed.execCallback('paste_postprocess', pl, o);
65
+ });
66
+
67
+ ed.onKeyDown.addToTop(function(ed, e) {
68
+ // Block ctrl+v from adding an undo level since the default logic in tinymce.Editor will add that
69
+ if (((tinymce.isMac ? e.metaKey : e.ctrlKey) && e.keyCode == 86) || (e.shiftKey && e.keyCode == 45))
70
+ return false; // Stop other listeners
71
+ });
72
+
73
+ // Initialize plain text flag
74
+ ed.pasteAsPlainText = getParam(ed, 'paste_text_sticky_default');
75
+
76
+ // This function executes the process handlers and inserts the contents
77
+ // force_rich overrides plain text mode set by user, important for pasting with execCommand
78
+ function process(o, force_rich) {
79
+ var dom = ed.dom, rng;
80
+
81
+ // Execute pre process handlers
82
+ t.onPreProcess.dispatch(t, o);
83
+
84
+ // Create DOM structure
85
+ o.node = dom.create('div', 0, o.content);
86
+
87
+ // If pasting inside the same element and the contents is only one block
88
+ // remove the block and keep the text since Firefox will copy parts of pre and h1-h6 as a pre element
89
+ if (tinymce.isGecko) {
90
+ rng = ed.selection.getRng(true);
91
+ if (rng.startContainer == rng.endContainer && rng.startContainer.nodeType == 3) {
92
+ // Is only one block node and it doesn't contain word stuff
93
+ if (o.node.childNodes.length === 1 && /^(p|h[1-6]|pre)$/i.test(o.node.firstChild.nodeName) && o.content.indexOf('__MCE_ITEM__') === -1)
94
+ dom.remove(o.node.firstChild, true);
95
+ }
96
+ }
97
+
98
+ // Execute post process handlers
99
+ t.onPostProcess.dispatch(t, o);
100
+
101
+ // Serialize content
102
+ o.content = ed.serializer.serialize(o.node, {getInner : 1, forced_root_block : ''});
103
+
104
+ // Plain text option active?
105
+ if ((!force_rich) && (ed.pasteAsPlainText)) {
106
+ t._insertPlainText(o.content);
107
+
108
+ if (!getParam(ed, "paste_text_sticky")) {
109
+ ed.pasteAsPlainText = false;
110
+ ed.controlManager.setActive("pastetext", false);
111
+ }
112
+ } else {
113
+ t._insert(o.content);
114
+ }
115
+ }
116
+
117
+ // Add command for external usage
118
+ ed.addCommand('mceInsertClipboardContent', function(u, o) {
119
+ process(o, true);
120
+ });
121
+
122
+ if (!getParam(ed, "paste_text_use_dialog")) {
123
+ ed.addCommand('mcePasteText', function(u, v) {
124
+ var cookie = tinymce.util.Cookie;
125
+
126
+ ed.pasteAsPlainText = !ed.pasteAsPlainText;
127
+ ed.controlManager.setActive('pastetext', ed.pasteAsPlainText);
128
+
129
+ if ((ed.pasteAsPlainText) && (!cookie.get("tinymcePasteText"))) {
130
+ if (getParam(ed, "paste_text_sticky")) {
131
+ ed.windowManager.alert(ed.translate('paste.plaintext_mode_sticky'));
132
+ } else {
133
+ ed.windowManager.alert(ed.translate('paste.plaintext_mode'));
134
+ }
135
+
136
+ if (!getParam(ed, "paste_text_notifyalways")) {
137
+ cookie.set("tinymcePasteText", "1", new Date(new Date().getFullYear() + 1, 12, 31))
138
+ }
139
+ }
140
+ });
141
+ }
142
+
143
+ ed.addButton('pastetext', {title: 'paste.paste_text_desc', cmd: 'mcePasteText'});
144
+ ed.addButton('selectall', {title: 'paste.selectall_desc', cmd: 'selectall'});
145
+
146
+ // This function grabs the contents from the clipboard by adding a
147
+ // hidden div and placing the caret inside it and after the browser paste
148
+ // is done it grabs that contents and processes that
149
+ function grabContent(e) {
150
+ var n, or, rng, oldRng, sel = ed.selection, dom = ed.dom, body = ed.getBody(), posY, textContent;
151
+
152
+ // Check if browser supports direct plaintext access
153
+ if (e.clipboardData || dom.doc.dataTransfer) {
154
+ textContent = (e.clipboardData || dom.doc.dataTransfer).getData('Text');
155
+
156
+ if (ed.pasteAsPlainText) {
157
+ e.preventDefault();
158
+ process({content : dom.encode(textContent).replace(/\r?\n/g, '<br />')});
159
+ return;
160
+ }
161
+ }
162
+
163
+ if (dom.get('_mcePaste'))
164
+ return;
165
+
166
+ // Create container to paste into
167
+ n = dom.add(body, 'div', {id : '_mcePaste', 'class' : 'mcePaste', 'data-mce-bogus' : '1'}, '\uFEFF\uFEFF');
168
+
169
+ // If contentEditable mode we need to find out the position of the closest element
170
+ if (body != ed.getDoc().body)
171
+ posY = dom.getPos(ed.selection.getStart(), body).y;
172
+ else
173
+ posY = body.scrollTop + dom.getViewPort(ed.getWin()).y;
174
+
175
+ // Styles needs to be applied after the element is added to the document since WebKit will otherwise remove all styles
176
+ // If also needs to be in view on IE or the paste would fail
177
+ dom.setStyles(n, {
178
+ position : 'absolute',
179
+ left : tinymce.isGecko ? -40 : 0, // Need to move it out of site on Gecko since it will othewise display a ghost resize rect for the div
180
+ top : posY - 25,
181
+ width : 1,
182
+ height : 1,
183
+ overflow : 'hidden'
184
+ });
185
+
186
+ if (tinymce.isIE) {
187
+ // Store away the old range
188
+ oldRng = sel.getRng();
189
+
190
+ // Select the container
191
+ rng = dom.doc.body.createTextRange();
192
+ rng.moveToElementText(n);
193
+ rng.execCommand('Paste');
194
+
195
+ // Remove container
196
+ dom.remove(n);
197
+
198
+ // Check if the contents was changed, if it wasn't then clipboard extraction failed probably due
199
+ // to IE security settings so we pass the junk though better than nothing right
200
+ if (n.innerHTML === '\uFEFF\uFEFF') {
201
+ ed.execCommand('mcePasteWord');
202
+ e.preventDefault();
203
+ return;
204
+ }
205
+
206
+ // Restore the old range and clear the contents before pasting
207
+ sel.setRng(oldRng);
208
+ sel.setContent('');
209
+
210
+ // For some odd reason we need to detach the the mceInsertContent call from the paste event
211
+ // It's like IE has a reference to the parent element that you paste in and the selection gets messed up
212
+ // when it tries to restore the selection
213
+ setTimeout(function() {
214
+ // Process contents
215
+ process({content : n.innerHTML});
216
+ }, 0);
217
+
218
+ // Block the real paste event
219
+ return tinymce.dom.Event.cancel(e);
220
+ } else {
221
+ function block(e) {
222
+ e.preventDefault();
223
+ };
224
+
225
+ // Block mousedown and click to prevent selection change
226
+ dom.bind(ed.getDoc(), 'mousedown', block);
227
+ dom.bind(ed.getDoc(), 'keydown', block);
228
+
229
+ or = ed.selection.getRng();
230
+
231
+ // Move select contents inside DIV
232
+ n = n.firstChild;
233
+ rng = ed.getDoc().createRange();
234
+ rng.setStart(n, 0);
235
+ rng.setEnd(n, 2);
236
+ sel.setRng(rng);
237
+
238
+ // Wait a while and grab the pasted contents
239
+ window.setTimeout(function() {
240
+ var h = '', nl;
241
+
242
+ // Paste divs duplicated in paste divs seems to happen when you paste plain text so lets first look for that broken behavior in WebKit
243
+ if (!dom.select('div.mcePaste > div.mcePaste').length) {
244
+ nl = dom.select('div.mcePaste');
245
+
246
+ // WebKit will split the div into multiple ones so this will loop through then all and join them to get the whole HTML string
247
+ each(nl, function(n) {
248
+ var child = n.firstChild;
249
+
250
+ // WebKit inserts a DIV container with lots of odd styles
251
+ if (child && child.nodeName == 'DIV' && child.style.marginTop && child.style.backgroundColor) {
252
+ dom.remove(child, 1);
253
+ }
254
+
255
+ // Remove apply style spans
256
+ each(dom.select('span.Apple-style-span', n), function(n) {
257
+ dom.remove(n, 1);
258
+ });
259
+
260
+ // Remove bogus br elements
261
+ each(dom.select('br[data-mce-bogus]', n), function(n) {
262
+ dom.remove(n);
263
+ });
264
+
265
+ // WebKit will make a copy of the DIV for each line of plain text pasted and insert them into the DIV
266
+ if (n.parentNode.className != 'mcePaste')
267
+ h += n.innerHTML;
268
+ });
269
+ } else {
270
+ // Found WebKit weirdness so force the content into paragraphs this seems to happen when you paste plain text from Nodepad etc
271
+ // So this logic will replace double enter with paragraphs and single enter with br so it kind of looks the same
272
+ h = '<p>' + dom.encode(textContent).replace(/\r?\n\r?\n/g, '</p><p>').replace(/\r?\n/g, '<br />') + '</p>';
273
+ }
274
+
275
+ // Remove the nodes
276
+ each(dom.select('div.mcePaste'), function(n) {
277
+ dom.remove(n);
278
+ });
279
+
280
+ // Restore the old selection
281
+ if (or)
282
+ sel.setRng(or);
283
+
284
+ process({content : h});
285
+
286
+ // Unblock events ones we got the contents
287
+ dom.unbind(ed.getDoc(), 'mousedown', block);
288
+ dom.unbind(ed.getDoc(), 'keydown', block);
289
+ }, 0);
290
+ }
291
+ }
292
+
293
+ // Check if we should use the new auto process method
294
+ if (getParam(ed, "paste_auto_cleanup_on_paste")) {
295
+ // Is it's Opera or older FF use key handler
296
+ if (tinymce.isOpera || /Firefox\/2/.test(navigator.userAgent)) {
297
+ ed.onKeyDown.addToTop(function(ed, e) {
298
+ if (((tinymce.isMac ? e.metaKey : e.ctrlKey) && e.keyCode == 86) || (e.shiftKey && e.keyCode == 45))
299
+ grabContent(e);
300
+ });
301
+ } else {
302
+ // Grab contents on paste event on Gecko and WebKit
303
+ ed.onPaste.addToTop(function(ed, e) {
304
+ return grabContent(e);
305
+ });
306
+ }
307
+ }
308
+
309
+ ed.onInit.add(function() {
310
+ ed.controlManager.setActive("pastetext", ed.pasteAsPlainText);
311
+
312
+ // Block all drag/drop events
313
+ if (getParam(ed, "paste_block_drop")) {
314
+ ed.dom.bind(ed.getBody(), ['dragend', 'dragover', 'draggesture', 'dragdrop', 'drop', 'drag'], function(e) {
315
+ e.preventDefault();
316
+ e.stopPropagation();
317
+
318
+ return false;
319
+ });
320
+ }
321
+ });
322
+
323
+ // Add legacy support
324
+ t._legacySupport();
325
+ },
326
+
327
+ getInfo : function() {
328
+ return {
329
+ longname : 'Paste text/word',
330
+ author : 'Moxiecode Systems AB',
331
+ authorurl : 'http://tinymce.moxiecode.com',
332
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste',
333
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
334
+ };
335
+ },
336
+
337
+ _preProcess : function(pl, o) {
338
+ var ed = this.editor,
339
+ h = o.content,
340
+ grep = tinymce.grep,
341
+ explode = tinymce.explode,
342
+ trim = tinymce.trim,
343
+ len, stripClass;
344
+
345
+ //console.log('Before preprocess:' + o.content);
346
+
347
+ function process(items) {
348
+ each(items, function(v) {
349
+ // Remove or replace
350
+ if (v.constructor == RegExp)
351
+ h = h.replace(v, '');
352
+ else
353
+ h = h.replace(v[0], v[1]);
354
+ });
355
+ }
356
+
357
+ if (ed.settings.paste_enable_default_filters == false) {
358
+ return;
359
+ }
360
+
361
+ // IE9 adds BRs before/after block elements when contents is pasted from word or for example another browser
362
+ if (tinymce.isIE && document.documentMode >= 9 && /<(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)/.test(o.content)) {
363
+ // IE9 adds BRs before/after block elements when contents is pasted from word or for example another browser
364
+ process([[/(?:<br>&nbsp;[\s\r\n]+|<br>)*(<\/?(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)[^>]*>)(?:<br>&nbsp;[\s\r\n]+|<br>)*/g, '$1']]);
365
+
366
+ // IE9 also adds an extra BR element for each soft-linefeed and it also adds a BR for each word wrap break
367
+ process([
368
+ [/<br><br>/g, '<BR><BR>'], // Replace multiple BR elements with uppercase BR to keep them intact
369
+ [/<br>/g, ' '], // Replace single br elements with space since they are word wrap BR:s
370
+ [/<BR><BR>/g, '<br>'] // Replace back the double brs but into a single BR
371
+ ]);
372
+ }
373
+
374
+ // Detect Word content and process it more aggressive
375
+ if (/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(h) || o.wordContent) {
376
+ o.wordContent = true; // Mark the pasted contents as word specific content
377
+ //console.log('Word contents detected.');
378
+
379
+ // Process away some basic content
380
+ process([
381
+ /^\s*(&nbsp;)+/gi, // &nbsp; entities at the start of contents
382
+ /(&nbsp;|<br[^>]*>)+\s*$/gi // &nbsp; entities at the end of contents
383
+ ]);
384
+
385
+ if (getParam(ed, "paste_convert_headers_to_strong")) {
386
+ h = h.replace(/<p [^>]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi, "<p><strong>$1</strong></p>");
387
+ }
388
+
389
+ if (getParam(ed, "paste_convert_middot_lists")) {
390
+ process([
391
+ [/<!--\[if !supportLists\]-->/gi, '$&__MCE_ITEM__'], // Convert supportLists to a list item marker
392
+ [/(<span[^>]+(?:mso-list:|:\s*symbol)[^>]+>)/gi, '$1__MCE_ITEM__'], // Convert mso-list and symbol spans to item markers
393
+ [/(<p[^>]+(?:MsoListParagraph)[^>]+>)/gi, '$1__MCE_ITEM__'] // Convert mso-list and symbol paragraphs to item markers (FF)
394
+ ]);
395
+ }
396
+
397
+ process([
398
+ // Word comments like conditional comments etc
399
+ /<!--[\s\S]+?-->/gi,
400
+
401
+ // Remove comments, scripts (e.g., msoShowComment), XML tag, VML content, MS Office namespaced tags, and a few other tags
402
+ /<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,
403
+
404
+ // Convert <s> into <strike> for line-though
405
+ [/<(\/?)s>/gi, "<$1strike>"],
406
+
407
+ // Replace nsbp entites to char since it's easier to handle
408
+ [/&nbsp;/gi, "\u00a0"]
409
+ ]);
410
+
411
+ // Remove bad attributes, with or without quotes, ensuring that attribute text is really inside a tag.
412
+ // If JavaScript had a RegExp look-behind, we could have integrated this with the last process() array and got rid of the loop. But alas, it does not, so we cannot.
413
+ do {
414
+ len = h.length;
415
+ h = h.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi, "$1");
416
+ } while (len != h.length);
417
+
418
+ // Remove all spans if no styles is to be retained
419
+ if (getParam(ed, "paste_retain_style_properties").replace(/^none$/i, "").length == 0) {
420
+ h = h.replace(/<\/?span[^>]*>/gi, "");
421
+ } else {
422
+ // We're keeping styles, so at least clean them up.
423
+ // CSS Reference: http://msdn.microsoft.com/en-us/library/aa155477.aspx
424
+
425
+ process([
426
+ // Convert <span style="mso-spacerun:yes">___</span> to string of alternating breaking/non-breaking spaces of same length
427
+ [/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,
428
+ function(str, spaces) {
429
+ return (spaces.length > 0)? spaces.replace(/./, " ").slice(Math.floor(spaces.length/2)).split("").join("\u00a0") : "";
430
+ }
431
+ ],
432
+
433
+ // Examine all styles: delete junk, transform some, and keep the rest
434
+ [/(<[a-z][^>]*)\sstyle="([^"]*)"/gi,
435
+ function(str, tag, style) {
436
+ var n = [],
437
+ i = 0,
438
+ s = explode(trim(style).replace(/&quot;/gi, "'"), ";");
439
+
440
+ // Examine each style definition within the tag's style attribute
441
+ each(s, function(v) {
442
+ var name, value,
443
+ parts = explode(v, ":");
444
+
445
+ function ensureUnits(v) {
446
+ return v + ((v !== "0") && (/\d$/.test(v)))? "px" : "";
447
+ }
448
+
449
+ if (parts.length == 2) {
450
+ name = parts[0].toLowerCase();
451
+ value = parts[1].toLowerCase();
452
+
453
+ // Translate certain MS Office styles into their CSS equivalents
454
+ switch (name) {
455
+ case "mso-padding-alt":
456
+ case "mso-padding-top-alt":
457
+ case "mso-padding-right-alt":
458
+ case "mso-padding-bottom-alt":
459
+ case "mso-padding-left-alt":
460
+ case "mso-margin-alt":
461
+ case "mso-margin-top-alt":
462
+ case "mso-margin-right-alt":
463
+ case "mso-margin-bottom-alt":
464
+ case "mso-margin-left-alt":
465
+ case "mso-table-layout-alt":
466
+ case "mso-height":
467
+ case "mso-width":
468
+ case "mso-vertical-align-alt":
469
+ n[i++] = name.replace(/^mso-|-alt$/g, "") + ":" + ensureUnits(value);
470
+ return;
471
+
472
+ case "horiz-align":
473
+ n[i++] = "text-align:" + value;
474
+ return;
475
+
476
+ case "vert-align":
477
+ n[i++] = "vertical-align:" + value;
478
+ return;
479
+
480
+ case "font-color":
481
+ case "mso-foreground":
482
+ n[i++] = "color:" + value;
483
+ return;
484
+
485
+ case "mso-background":
486
+ case "mso-highlight":
487
+ n[i++] = "background:" + value;
488
+ return;
489
+
490
+ case "mso-default-height":
491
+ n[i++] = "min-height:" + ensureUnits(value);
492
+ return;
493
+
494
+ case "mso-default-width":
495
+ n[i++] = "min-width:" + ensureUnits(value);
496
+ return;
497
+
498
+ case "mso-padding-between-alt":
499
+ n[i++] = "border-collapse:separate;border-spacing:" + ensureUnits(value);
500
+ return;
501
+
502
+ case "text-line-through":
503
+ if ((value == "single") || (value == "double")) {
504
+ n[i++] = "text-decoration:line-through";
505
+ }
506
+ return;
507
+
508
+ case "mso-zero-height":
509
+ if (value == "yes") {
510
+ n[i++] = "display:none";
511
+ }
512
+ return;
513
+ }
514
+
515
+ // Eliminate all MS Office style definitions that have no CSS equivalent by examining the first characters in the name
516
+ if (/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(name)) {
517
+ return;
518
+ }
519
+
520
+ // If it reached this point, it must be a valid CSS style
521
+ n[i++] = name + ":" + parts[1]; // Lower-case name, but keep value case
522
+ }
523
+ });
524
+
525
+ // If style attribute contained any valid styles the re-write it; otherwise delete style attribute.
526
+ if (i > 0) {
527
+ return tag + ' style="' + n.join(';') + '"';
528
+ } else {
529
+ return tag;
530
+ }
531
+ }
532
+ ]
533
+ ]);
534
+ }
535
+ }
536
+
537
+ // Replace headers with <strong>
538
+ if (getParam(ed, "paste_convert_headers_to_strong")) {
539
+ process([
540
+ [/<h[1-6][^>]*>/gi, "<p><strong>"],
541
+ [/<\/h[1-6][^>]*>/gi, "</strong></p>"]
542
+ ]);
543
+ }
544
+
545
+ process([
546
+ // Copy paste from Java like Open Office will produce this junk on FF
547
+ [/Version:[\d.]+\nStartHTML:\d+\nEndHTML:\d+\nStartFragment:\d+\nEndFragment:\d+/gi, '']
548
+ ]);
549
+
550
+ // Class attribute options are: leave all as-is ("none"), remove all ("all"), or remove only those starting with mso ("mso").
551
+ // Note:- paste_strip_class_attributes: "none", verify_css_classes: true is also a good variation.
552
+ stripClass = getParam(ed, "paste_strip_class_attributes");
553
+
554
+ if (stripClass !== "none") {
555
+ function removeClasses(match, g1) {
556
+ if (stripClass === "all")
557
+ return '';
558
+
559
+ var cls = grep(explode(g1.replace(/^(["'])(.*)\1$/, "$2"), " "),
560
+ function(v) {
561
+ return (/^(?!mso)/i.test(v));
562
+ }
563
+ );
564
+
565
+ return cls.length ? ' class="' + cls.join(" ") + '"' : '';
566
+ };
567
+
568
+ h = h.replace(/ class="([^"]+)"/gi, removeClasses);
569
+ h = h.replace(/ class=([\-\w]+)/gi, removeClasses);
570
+ }
571
+
572
+ // Remove spans option
573
+ if (getParam(ed, "paste_remove_spans")) {
574
+ h = h.replace(/<\/?span[^>]*>/gi, "");
575
+ }
576
+
577
+ //console.log('After preprocess:' + h);
578
+
579
+ o.content = h;
580
+ },
581
+
582
+ /**
583
+ * Various post process items.
584
+ */
585
+ _postProcess : function(pl, o) {
586
+ var t = this, ed = t.editor, dom = ed.dom, styleProps;
587
+
588
+ if (ed.settings.paste_enable_default_filters == false) {
589
+ return;
590
+ }
591
+
592
+ if (o.wordContent) {
593
+ // Remove named anchors or TOC links
594
+ each(dom.select('a', o.node), function(a) {
595
+ if (!a.href || a.href.indexOf('#_Toc') != -1)
596
+ dom.remove(a, 1);
597
+ });
598
+
599
+ if (getParam(ed, "paste_convert_middot_lists")) {
600
+ t._convertLists(pl, o);
601
+ }
602
+
603
+ // Process styles
604
+ styleProps = getParam(ed, "paste_retain_style_properties"); // retained properties
605
+
606
+ // Process only if a string was specified and not equal to "all" or "*"
607
+ if ((tinymce.is(styleProps, "string")) && (styleProps !== "all") && (styleProps !== "*")) {
608
+ styleProps = tinymce.explode(styleProps.replace(/^none$/i, ""));
609
+
610
+ // Retains some style properties
611
+ each(dom.select('*', o.node), function(el) {
612
+ var newStyle = {}, npc = 0, i, sp, sv;
613
+
614
+ // Store a subset of the existing styles
615
+ if (styleProps) {
616
+ for (i = 0; i < styleProps.length; i++) {
617
+ sp = styleProps[i];
618
+ sv = dom.getStyle(el, sp);
619
+
620
+ if (sv) {
621
+ newStyle[sp] = sv;
622
+ npc++;
623
+ }
624
+ }
625
+ }
626
+
627
+ // Remove all of the existing styles
628
+ dom.setAttrib(el, 'style', '');
629
+
630
+ if (styleProps && npc > 0)
631
+ dom.setStyles(el, newStyle); // Add back the stored subset of styles
632
+ else // Remove empty span tags that do not have class attributes
633
+ if (el.nodeName == 'SPAN' && !el.className)
634
+ dom.remove(el, true);
635
+ });
636
+ }
637
+ }
638
+
639
+ // Remove all style information or only specifically on WebKit to avoid the style bug on that browser
640
+ if (getParam(ed, "paste_remove_styles") || (getParam(ed, "paste_remove_styles_if_webkit") && tinymce.isWebKit)) {
641
+ each(dom.select('*[style]', o.node), function(el) {
642
+ el.removeAttribute('style');
643
+ el.removeAttribute('data-mce-style');
644
+ });
645
+ } else {
646
+ if (tinymce.isWebKit) {
647
+ // We need to compress the styles on WebKit since if you paste <img border="0" /> it will become <img border="0" style="... lots of junk ..." />
648
+ // Removing the mce_style that contains the real value will force the Serializer engine to compress the styles
649
+ each(dom.select('*', o.node), function(el) {
650
+ el.removeAttribute('data-mce-style');
651
+ });
652
+ }
653
+ }
654
+ },
655
+
656
+ /**
657
+ * Converts the most common bullet and number formats in Office into a real semantic UL/LI list.
658
+ */
659
+ _convertLists : function(pl, o) {
660
+ var dom = pl.editor.dom, listElm, li, lastMargin = -1, margin, levels = [], lastType, html;
661
+
662
+ // Convert middot lists into real semantic lists
663
+ each(dom.select('p', o.node), function(p) {
664
+ var sib, val = '', type, html, idx, parents;
665
+
666
+ // Get text node value at beginning of paragraph
667
+ for (sib = p.firstChild; sib && sib.nodeType == 3; sib = sib.nextSibling)
668
+ val += sib.nodeValue;
669
+
670
+ val = p.innerHTML.replace(/<\/?\w+[^>]*>/gi, '').replace(/&nbsp;/g, '\u00a0');
671
+
672
+ // Detect unordered lists look for bullets
673
+ if (/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*\u00a0*/.test(val))
674
+ type = 'ul';
675
+
676
+ // Detect ordered lists 1., a. or ixv.
677
+ if (/^__MCE_ITEM__\s*\w+\.\s*\u00a0+/.test(val))
678
+ type = 'ol';
679
+
680
+ // Check if node value matches the list pattern: o&nbsp;&nbsp;
681
+ if (type) {
682
+ margin = parseFloat(p.style.marginLeft || 0);
683
+
684
+ if (margin > lastMargin)
685
+ levels.push(margin);
686
+
687
+ if (!listElm || type != lastType) {
688
+ listElm = dom.create(type);
689
+ dom.insertAfter(listElm, p);
690
+ } else {
691
+ // Nested list element
692
+ if (margin > lastMargin) {
693
+ listElm = li.appendChild(dom.create(type));
694
+ } else if (margin < lastMargin) {
695
+ // Find parent level based on margin value
696
+ idx = tinymce.inArray(levels, margin);
697
+ parents = dom.getParents(listElm.parentNode, type);
698
+ listElm = parents[parents.length - 1 - idx] || listElm;
699
+ }
700
+ }
701
+
702
+ // Remove middot or number spans if they exists
703
+ each(dom.select('span', p), function(span) {
704
+ var html = span.innerHTML.replace(/<\/?\w+[^>]*>/gi, '');
705
+
706
+ // Remove span with the middot or the number
707
+ if (type == 'ul' && /^__MCE_ITEM__[\u2022\u00b7\u00a7\u00d8o\u25CF]/.test(html))
708
+ dom.remove(span);
709
+ else if (/^__MCE_ITEM__[\s\S]*\w+\.(&nbsp;|\u00a0)*\s*/.test(html))
710
+ dom.remove(span);
711
+ });
712
+
713
+ html = p.innerHTML;
714
+
715
+ // Remove middot/list items
716
+ if (type == 'ul')
717
+ html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*(&nbsp;|\u00a0)+\s*/, '');
718
+ else
719
+ html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^\s*\w+\.(&nbsp;|\u00a0)+\s*/, '');
720
+
721
+ // Create li and add paragraph data into the new li
722
+ li = listElm.appendChild(dom.create('li', 0, html));
723
+ dom.remove(p);
724
+
725
+ lastMargin = margin;
726
+ lastType = type;
727
+ } else
728
+ listElm = lastMargin = 0; // End list element
729
+ });
730
+
731
+ // Remove any left over makers
732
+ html = o.node.innerHTML;
733
+ if (html.indexOf('__MCE_ITEM__') != -1)
734
+ o.node.innerHTML = html.replace(/__MCE_ITEM__/g, '');
735
+ },
736
+
737
+ /**
738
+ * Inserts the specified contents at the caret position.
739
+ */
740
+ _insert : function(h, skip_undo) {
741
+ var ed = this.editor, r = ed.selection.getRng();
742
+
743
+ // First delete the contents seems to work better on WebKit when the selection spans multiple list items or multiple table cells.
744
+ if (!ed.selection.isCollapsed() && r.startContainer != r.endContainer)
745
+ ed.getDoc().execCommand('Delete', false, null);
746
+
747
+ ed.execCommand('mceInsertContent', false, h, {skip_undo : skip_undo});
748
+ },
749
+
750
+ /**
751
+ * Instead of the old plain text method which tried to re-create a paste operation, the
752
+ * new approach adds a plain text mode toggle switch that changes the behavior of paste.
753
+ * This function is passed the same input that the regular paste plugin produces.
754
+ * It performs additional scrubbing and produces (and inserts) the plain text.
755
+ * This approach leverages all of the great existing functionality in the paste
756
+ * plugin, and requires minimal changes to add the new functionality.
757
+ * Speednet - June 2009
758
+ */
759
+ _insertPlainText : function(content) {
760
+ var ed = this.editor,
761
+ linebr = getParam(ed, "paste_text_linebreaktype"),
762
+ rl = getParam(ed, "paste_text_replacements"),
763
+ is = tinymce.is;
764
+
765
+ function process(items) {
766
+ each(items, function(v) {
767
+ if (v.constructor == RegExp)
768
+ content = content.replace(v, "");
769
+ else
770
+ content = content.replace(v[0], v[1]);
771
+ });
772
+ };
773
+
774
+ if ((typeof(content) === "string") && (content.length > 0)) {
775
+ // If HTML content with line-breaking tags, then remove all cr/lf chars because only tags will break a line
776
+ if (/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(content)) {
777
+ process([
778
+ /[\n\r]+/g
779
+ ]);
780
+ } else {
781
+ // Otherwise just get rid of carriage returns (only need linefeeds)
782
+ process([
783
+ /\r+/g
784
+ ]);
785
+ }
786
+
787
+ process([
788
+ [/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi, "\n\n"], // Block tags get a blank line after them
789
+ [/<br[^>]*>|<\/tr>/gi, "\n"], // Single linebreak for <br /> tags and table rows
790
+ [/<\/t[dh]>\s*<t[dh][^>]*>/gi, "\t"], // Table cells get tabs betweem them
791
+ /<[a-z!\/?][^>]*>/gi, // Delete all remaining tags
792
+ [/&nbsp;/gi, " "], // Convert non-break spaces to regular spaces (remember, *plain text*)
793
+ [/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi, "$1"],// Cool little RegExp deletes whitespace around linebreak chars.
794
+ [/\n{3,}/g, "\n\n"] // Max. 2 consecutive linebreaks
795
+ ]);
796
+
797
+ content = ed.dom.decode(tinymce.html.Entities.encodeRaw(content));
798
+
799
+ // Perform default or custom replacements
800
+ if (is(rl, "array")) {
801
+ process(rl);
802
+ } else if (is(rl, "string")) {
803
+ process(new RegExp(rl, "gi"));
804
+ }
805
+
806
+ // Treat paragraphs as specified in the config
807
+ if (linebr == "none") {
808
+ // Convert all line breaks to space
809
+ process([
810
+ [/\n+/g, " "]
811
+ ]);
812
+ } else if (linebr == "br") {
813
+ // Convert all line breaks to <br />
814
+ process([
815
+ [/\n/g, "<br />"]
816
+ ]);
817
+ } else if (linebr == "p") {
818
+ // Convert all line breaks to <p>...</p>
819
+ process([
820
+ [/\n+/g, "</p><p>"],
821
+ [/^(.*<\/p>)(<p>)$/, '<p>$1']
822
+ ]);
823
+ } else {
824
+ // defaults to "combined"
825
+ // Convert single line breaks to <br /> and double line breaks to <p>...</p>
826
+ process([
827
+ [/\n\n/g, "</p><p>"],
828
+ [/^(.*<\/p>)(<p>)$/, '<p>$1'],
829
+ [/\n/g, "<br />"]
830
+ ]);
831
+ }
832
+
833
+ ed.execCommand('mceInsertContent', false, content);
834
+ }
835
+ },
836
+
837
+ /**
838
+ * This method will open the old style paste dialogs. Some users might want the old behavior but still use the new cleanup engine.
839
+ */
840
+ _legacySupport : function() {
841
+ var t = this, ed = t.editor;
842
+
843
+ // Register command(s) for backwards compatibility
844
+ ed.addCommand("mcePasteWord", function() {
845
+ ed.windowManager.open({
846
+ file: t.url + "/pasteword.htm",
847
+ width: parseInt(getParam(ed, "paste_dialog_width")),
848
+ height: parseInt(getParam(ed, "paste_dialog_height")),
849
+ inline: 1
850
+ });
851
+ });
852
+
853
+ if (getParam(ed, "paste_text_use_dialog")) {
854
+ ed.addCommand("mcePasteText", function() {
855
+ ed.windowManager.open({
856
+ file : t.url + "/pastetext.htm",
857
+ width: parseInt(getParam(ed, "paste_dialog_width")),
858
+ height: parseInt(getParam(ed, "paste_dialog_height")),
859
+ inline : 1
860
+ });
861
+ });
862
+ }
863
+
864
+ // Register button for backwards compatibility
865
+ ed.addButton("pasteword", {title : "paste.paste_word_desc", cmd : "mcePasteWord"});
866
+ }
867
+ });
868
+
869
+ // Register plugin
870
+ tinymce.PluginManager.add("paste", tinymce.plugins.PastePlugin);
871
+ })();
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/paste/js/pastetext.js CHANGED
@@ -1,36 +1,36 @@
1
- tinyMCEPopup.requireLangPack();
2
-
3
- var PasteTextDialog = {
4
- init : function() {
5
- this.resize();
6
- },
7
-
8
- insert : function() {
9
- var h = tinyMCEPopup.dom.encode(document.getElementById('content').value), lines;
10
-
11
- // Convert linebreaks into paragraphs
12
- if (document.getElementById('linebreaks').checked) {
13
- lines = h.split(/\r?\n/);
14
- if (lines.length > 1) {
15
- h = '';
16
- tinymce.each(lines, function(row) {
17
- h += '<p>' + row + '</p>';
18
- });
19
- }
20
- }
21
-
22
- tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h});
23
- tinyMCEPopup.close();
24
- },
25
-
26
- resize : function() {
27
- var vp = tinyMCEPopup.dom.getViewPort(window), el;
28
-
29
- el = document.getElementById('content');
30
-
31
- el.style.width = (vp.w - 20) + 'px';
32
- el.style.height = (vp.h - 90) + 'px';
33
- }
34
- };
35
-
36
- tinyMCEPopup.onInit.add(PasteTextDialog.init, PasteTextDialog);
1
+ tinyMCEPopup.requireLangPack();
2
+
3
+ var PasteTextDialog = {
4
+ init : function() {
5
+ this.resize();
6
+ },
7
+
8
+ insert : function() {
9
+ var h = tinyMCEPopup.dom.encode(document.getElementById('content').value), lines;
10
+
11
+ // Convert linebreaks into paragraphs
12
+ if (document.getElementById('linebreaks').checked) {
13
+ lines = h.split(/\r?\n/);
14
+ if (lines.length > 1) {
15
+ h = '';
16
+ tinymce.each(lines, function(row) {
17
+ h += '<p>' + row + '</p>';
18
+ });
19
+ }
20
+ }
21
+
22
+ tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h});
23
+ tinyMCEPopup.close();
24
+ },
25
+
26
+ resize : function() {
27
+ var vp = tinyMCEPopup.dom.getViewPort(window), el;
28
+
29
+ el = document.getElementById('content');
30
+
31
+ el.style.width = (vp.w - 20) + 'px';
32
+ el.style.height = (vp.h - 90) + 'px';
33
+ }
34
+ };
35
+
36
+ tinyMCEPopup.onInit.add(PasteTextDialog.init, PasteTextDialog);
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/paste/js/pasteword.js CHANGED
@@ -1,51 +1,51 @@
1
- tinyMCEPopup.requireLangPack();
2
-
3
- var PasteWordDialog = {
4
- init : function() {
5
- var ed = tinyMCEPopup.editor, el = document.getElementById('iframecontainer'), ifr, doc, css, cssHTML = '';
6
-
7
- // Create iframe
8
- el.innerHTML = '<iframe id="iframe" src="javascript:\'\';" frameBorder="0" style="border: 1px solid gray"></iframe>';
9
- ifr = document.getElementById('iframe');
10
- doc = ifr.contentWindow.document;
11
-
12
- // Force absolute CSS urls
13
- css = [ed.baseURI.toAbsolute("themes/" + ed.settings.theme + "/skins/" + ed.settings.skin + "/content.css")];
14
- css = css.concat(tinymce.explode(ed.settings.content_css) || []);
15
- tinymce.each(css, function(u) {
16
- cssHTML += '<link href="' + ed.documentBaseURI.toAbsolute('' + u) + '" rel="stylesheet" type="text/css" />';
17
- });
18
-
19
- // Write content into iframe
20
- doc.open();
21
- doc.write('<html><head>' + cssHTML + '</head><body class="mceContentBody" spellcheck="false"></body></html>');
22
- doc.close();
23
-
24
- doc.designMode = 'on';
25
- this.resize();
26
-
27
- window.setTimeout(function() {
28
- ifr.contentWindow.focus();
29
- }, 10);
30
- },
31
-
32
- insert : function() {
33
- var h = document.getElementById('iframe').contentWindow.document.body.innerHTML;
34
-
35
- tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h, wordContent : true});
36
- tinyMCEPopup.close();
37
- },
38
-
39
- resize : function() {
40
- var vp = tinyMCEPopup.dom.getViewPort(window), el;
41
-
42
- el = document.getElementById('iframe');
43
-
44
- if (el) {
45
- el.style.width = (vp.w - 20) + 'px';
46
- el.style.height = (vp.h - 90) + 'px';
47
- }
48
- }
49
- };
50
-
51
- tinyMCEPopup.onInit.add(PasteWordDialog.init, PasteWordDialog);
1
+ tinyMCEPopup.requireLangPack();
2
+
3
+ var PasteWordDialog = {
4
+ init : function() {
5
+ var ed = tinyMCEPopup.editor, el = document.getElementById('iframecontainer'), ifr, doc, css, cssHTML = '';
6
+
7
+ // Create iframe
8
+ el.innerHTML = '<iframe id="iframe" src="javascript:\'\';" frameBorder="0" style="border: 1px solid gray"></iframe>';
9
+ ifr = document.getElementById('iframe');
10
+ doc = ifr.contentWindow.document;
11
+
12
+ // Force absolute CSS urls
13
+ css = [ed.baseURI.toAbsolute("themes/" + ed.settings.theme + "/skins/" + ed.settings.skin + "/content.css")];
14
+ css = css.concat(tinymce.explode(ed.settings.content_css) || []);
15
+ tinymce.each(css, function(u) {
16
+ cssHTML += '<link href="' + ed.documentBaseURI.toAbsolute('' + u) + '" rel="stylesheet" type="text/css" />';
17
+ });
18
+
19
+ // Write content into iframe
20
+ doc.open();
21
+ doc.write('<html><head>' + cssHTML + '</head><body class="mceContentBody" spellcheck="false"></body></html>');
22
+ doc.close();
23
+
24
+ doc.designMode = 'on';
25
+ this.resize();
26
+
27
+ window.setTimeout(function() {
28
+ ifr.contentWindow.focus();
29
+ }, 10);
30
+ },
31
+
32
+ insert : function() {
33
+ var h = document.getElementById('iframe').contentWindow.document.body.innerHTML;
34
+
35
+ tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h, wordContent : true});
36
+ tinyMCEPopup.close();
37
+ },
38
+
39
+ resize : function() {
40
+ var vp = tinyMCEPopup.dom.getViewPort(window), el;
41
+
42
+ el = document.getElementById('iframe');
43
+
44
+ if (el) {
45
+ el.style.width = (vp.w - 20) + 'px';
46
+ el.style.height = (vp.h - 90) + 'px';
47
+ }
48
+ }
49
+ };
50
+
51
+ tinyMCEPopup.onInit.add(PasteWordDialog.init, PasteWordDialog);
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/paste/pastetext.htm CHANGED
@@ -1,27 +1,27 @@
1
- <html xmlns="http://www.w3.org/1999/xhtml">
2
- <head>
3
- <title>{#paste.paste_text_desc}</title>
4
- <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
5
- <script type="text/javascript" src="js/pastetext.js"></script>
6
- </head>
7
- <body onresize="PasteTextDialog.resize();" style="display:none; overflow:hidden;">
8
- <form name="source" onsubmit="return PasteTextDialog.insert();" action="#">
9
- <div style="float: left" class="title">{#paste.paste_text_desc}</div>
10
-
11
- <div style="float: right">
12
- <input type="checkbox" name="linebreaks" id="linebreaks" class="wordWrapCode" checked="checked" /><label for="linebreaks">{#paste_dlg.text_linebreaks}</label>
13
- </div>
14
-
15
- <br style="clear: both" />
16
-
17
- <div>{#paste_dlg.text_title}</div>
18
-
19
- <textarea id="content" name="content" rows="15" cols="100" style="width: 100%; height: 100%; font-family: 'Courier New',Courier,mono; font-size: 12px;" dir="ltr" wrap="soft" class="mceFocus"></textarea>
20
-
21
- <div class="mceActionPanel">
22
- <input type="submit" name="insert" value="{#insert}" id="insert" />
23
- <input type="button" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" id="cancel" />
24
- </div>
25
- </form>
26
- </body>
27
  </html>
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <title>{#paste.paste_text_desc}</title>
4
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
5
+ <script type="text/javascript" src="js/pastetext.js"></script>
6
+ </head>
7
+ <body onresize="PasteTextDialog.resize();" style="display:none; overflow:hidden;">
8
+ <form name="source" onsubmit="return PasteTextDialog.insert();" action="#">
9
+ <div style="float: left" class="title">{#paste.paste_text_desc}</div>
10
+
11
+ <div style="float: right">
12
+ <input type="checkbox" name="linebreaks" id="linebreaks" class="wordWrapCode" checked="checked" /><label for="linebreaks">{#paste_dlg.text_linebreaks}</label>
13
+ </div>
14
+
15
+ <br style="clear: both" />
16
+
17
+ <div>{#paste_dlg.text_title}</div>
18
+
19
+ <textarea id="content" name="content" rows="15" cols="100" style="width: 100%; height: 100%; font-family: 'Courier New',Courier,mono; font-size: 12px;" dir="ltr" wrap="soft" class="mceFocus"></textarea>
20
+
21
+ <div class="mceActionPanel">
22
+ <input type="submit" name="insert" value="{#insert}" id="insert" />
23
+ <input type="button" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" id="cancel" />
24
+ </div>
25
+ </form>
26
+ </body>
27
  </html>
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/paste/pasteword.htm CHANGED
@@ -1,21 +1,21 @@
1
- <html xmlns="http://www.w3.org/1999/xhtml">
2
- <head>
3
- <title>{#paste.paste_word_desc}</title>
4
- <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
5
- <script type="text/javascript" src="js/pasteword.js"></script>
6
- </head>
7
- <body onresize="PasteWordDialog.resize();" style="display:none; overflow:hidden;">
8
- <form name="source" onsubmit="return PasteWordDialog.insert();" action="#">
9
- <div class="title">{#paste.paste_word_desc}</div>
10
-
11
- <div>{#paste_dlg.word_title}</div>
12
-
13
- <div id="iframecontainer"></div>
14
-
15
- <div class="mceActionPanel">
16
- <input type="submit" id="insert" name="insert" value="{#insert}" />
17
- <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
18
- </div>
19
- </form>
20
- </body>
21
- </html>
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <title>{#paste.paste_word_desc}</title>
4
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
5
+ <script type="text/javascript" src="js/pasteword.js"></script>
6
+ </head>
7
+ <body onresize="PasteWordDialog.resize();" style="display:none; overflow:hidden;">
8
+ <form name="source" onsubmit="return PasteWordDialog.insert();" action="#">
9
+ <div class="title">{#paste.paste_word_desc}</div>
10
+
11
+ <div>{#paste_dlg.word_title}</div>
12
+
13
+ <div id="iframecontainer"></div>
14
+
15
+ <div class="mceActionPanel">
16
+ <input type="submit" id="insert" name="insert" value="{#insert}" />
17
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
18
+ </div>
19
+ </form>
20
+ </body>
21
+ </html>
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/spellchecker/css/content.css CHANGED
@@ -1 +1 @@
1
- .mceItemHiddenSpellWord {background:url(../img/wline.gif) repeat-x bottom left; cursor:default;}
1
+ .mceItemHiddenSpellWord {background:url(../img/wline.gif) repeat-x bottom left; cursor:default;}
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/spellchecker/editor_plugin_src.js CHANGED
@@ -1,436 +1,436 @@
1
- /**
2
- * editor_plugin_src.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() {
12
- var JSONRequest = tinymce.util.JSONRequest, each = tinymce.each, DOM = tinymce.DOM;
13
-
14
- tinymce.create('tinymce.plugins.SpellcheckerPlugin', {
15
- getInfo : function() {
16
- return {
17
- longname : 'Spellchecker',
18
- author : 'Moxiecode Systems AB',
19
- authorurl : 'http://tinymce.moxiecode.com',
20
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker',
21
- version : tinymce.majorVersion + "." + tinymce.minorVersion
22
- };
23
- },
24
-
25
- init : function(ed, url) {
26
- var t = this, cm;
27
-
28
- t.url = url;
29
- t.editor = ed;
30
- t.rpcUrl = ed.getParam("spellchecker_rpc_url", "{backend}");
31
-
32
- if (t.rpcUrl == '{backend}') {
33
- // Sniff if the browser supports native spellchecking (Don't know of a better way)
34
- if (tinymce.isIE)
35
- return;
36
-
37
- t.hasSupport = true;
38
-
39
- // Disable the context menu when spellchecking is active
40
- ed.onContextMenu.addToTop(function(ed, e) {
41
- if (t.active)
42
- return false;
43
- });
44
- }
45
-
46
- // Register commands
47
- ed.addCommand('mceSpellCheck', function() {
48
- if (t.rpcUrl == '{backend}') {
49
- // Enable/disable native spellchecker
50
- t.editor.getBody().spellcheck = t.active = !t.active;
51
- return;
52
- }
53
-
54
- if (!t.active) {
55
- ed.setProgressState(1);
56
- t._sendRPC('checkWords', [t.selectedLang, t._getWords()], function(r) {
57
- if (r.length > 0) {
58
- t.active = 1;
59
- t._markWords(r);
60
- ed.setProgressState(0);
61
- ed.nodeChanged();
62
- } else {
63
- ed.setProgressState(0);
64
-
65
- if (ed.getParam('spellchecker_report_no_misspellings', true))
66
- ed.windowManager.alert('spellchecker.no_mpell');
67
- }
68
- });
69
- } else
70
- t._done();
71
- });
72
-
73
- if (ed.settings.content_css !== false)
74
- ed.contentCSS.push(url + '/css/content.css');
75
-
76
- ed.onClick.add(t._showMenu, t);
77
- ed.onContextMenu.add(t._showMenu, t);
78
- ed.onBeforeGetContent.add(function() {
79
- if (t.active)
80
- t._removeWords();
81
- });
82
-
83
- ed.onNodeChange.add(function(ed, cm) {
84
- cm.setActive('spellchecker', t.active);
85
- });
86
-
87
- ed.onSetContent.add(function() {
88
- t._done();
89
- });
90
-
91
- ed.onBeforeGetContent.add(function() {
92
- t._done();
93
- });
94
-
95
- ed.onBeforeExecCommand.add(function(ed, cmd) {
96
- if (cmd == 'mceFullScreen')
97
- t._done();
98
- });
99
-
100
- // Find selected language
101
- t.languages = {};
102
- each(ed.getParam('spellchecker_languages', '+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv', 'hash'), function(v, k) {
103
- if (k.indexOf('+') === 0) {
104
- k = k.substring(1);
105
- t.selectedLang = v;
106
- }
107
-
108
- t.languages[k] = v;
109
- });
110
- },
111
-
112
- createControl : function(n, cm) {
113
- var t = this, c, ed = t.editor;
114
-
115
- if (n == 'spellchecker') {
116
- // Use basic button if we use the native spellchecker
117
- if (t.rpcUrl == '{backend}') {
118
- // Create simple toggle button if we have native support
119
- if (t.hasSupport)
120
- c = cm.createButton(n, {title : 'spellchecker.desc', cmd : 'mceSpellCheck', scope : t});
121
-
122
- return c;
123
- }
124
-
125
- c = cm.createSplitButton(n, {title : 'spellchecker.desc', cmd : 'mceSpellCheck', scope : t});
126
-
127
- c.onRenderMenu.add(function(c, m) {
128
- m.add({title : 'spellchecker.langs', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
129
- each(t.languages, function(v, k) {
130
- var o = {icon : 1}, mi;
131
-
132
- o.onclick = function() {
133
- if (v == t.selectedLang) {
134
- return;
135
- }
136
- mi.setSelected(1);
137
- t.selectedItem.setSelected(0);
138
- t.selectedItem = mi;
139
- t.selectedLang = v;
140
- };
141
-
142
- o.title = k;
143
- mi = m.add(o);
144
- mi.setSelected(v == t.selectedLang);
145
-
146
- if (v == t.selectedLang)
147
- t.selectedItem = mi;
148
- })
149
- });
150
-
151
- return c;
152
- }
153
- },
154
-
155
- // Internal functions
156
-
157
- _walk : function(n, f) {
158
- var d = this.editor.getDoc(), w;
159
-
160
- if (d.createTreeWalker) {
161
- w = d.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, false);
162
-
163
- while ((n = w.nextNode()) != null)
164
- f.call(this, n);
165
- } else
166
- tinymce.walk(n, f, 'childNodes');
167
- },
168
-
169
- _getSeparators : function() {
170
- var re = '', i, str = this.editor.getParam('spellchecker_word_separator_chars', '\\s!"#$%&()*+,-./:;<=>?@[\]^_{|}����������������\u201d\u201c');
171
-
172
- // Build word separator regexp
173
- for (i=0; i<str.length; i++)
174
- re += '\\' + str.charAt(i);
175
-
176
- return re;
177
- },
178
-
179
- _getWords : function() {
180
- var ed = this.editor, wl = [], tx = '', lo = {}, rawWords = [];
181
-
182
- // Get area text
183
- this._walk(ed.getBody(), function(n) {
184
- if (n.nodeType == 3)
185
- tx += n.nodeValue + ' ';
186
- });
187
-
188
- // split the text up into individual words
189
- if (ed.getParam('spellchecker_word_pattern')) {
190
- // look for words that match the pattern
191
- rawWords = tx.match('(' + ed.getParam('spellchecker_word_pattern') + ')', 'gi');
192
- } else {
193
- // Split words by separator
194
- tx = tx.replace(new RegExp('([0-9]|[' + this._getSeparators() + '])', 'g'), ' ');
195
- tx = tinymce.trim(tx.replace(/(\s+)/g, ' '));
196
- rawWords = tx.split(' ');
197
- }
198
-
199
- // Build word array and remove duplicates
200
- each(rawWords, function(v) {
201
- if (!lo[v]) {
202
- wl.push(v);
203
- lo[v] = 1;
204
- }
205
- });
206
-
207
- return wl;
208
- },
209
-
210
- _removeWords : function(w) {
211
- var ed = this.editor, dom = ed.dom, se = ed.selection, r = se.getRng(true);
212
-
213
- each(dom.select('span').reverse(), function(n) {
214
- if (n && (dom.hasClass(n, 'mceItemHiddenSpellWord') || dom.hasClass(n, 'mceItemHidden'))) {
215
- if (!w || dom.decode(n.innerHTML) == w)
216
- dom.remove(n, 1);
217
- }
218
- });
219
-
220
- se.setRng(r);
221
- },
222
-
223
- _markWords : function(wl) {
224
- var ed = this.editor, dom = ed.dom, doc = ed.getDoc(), se = ed.selection, r = se.getRng(true), nl = [],
225
- w = wl.join('|'), re = this._getSeparators(), rx = new RegExp('(^|[' + re + '])(' + w + ')(?=[' + re + ']|$)', 'g');
226
-
227
- // Collect all text nodes
228
- this._walk(ed.getBody(), function(n) {
229
- if (n.nodeType == 3) {
230
- nl.push(n);
231
- }
232
- });
233
-
234
- // Wrap incorrect words in spans
235
- each(nl, function(n) {
236
- var node, elem, txt, pos, v = n.nodeValue;
237
-
238
- if (rx.test(v)) {
239
- // Encode the content
240
- v = dom.encode(v);
241
- // Create container element
242
- elem = dom.create('span', {'class' : 'mceItemHidden'});
243
-
244
- // Following code fixes IE issues by creating text nodes
245
- // using DOM methods instead of innerHTML.
246
- // Bug #3124: <PRE> elements content is broken after spellchecking.
247
- // Bug #1408: Preceding whitespace characters are removed
248
- // @TODO: I'm not sure that both are still issues on IE9.
249
- if (tinymce.isIE) {
250
- // Enclose mispelled words with temporal tag
251
- v = v.replace(rx, '$1<mcespell>$2</mcespell>');
252
- // Loop over the content finding mispelled words
253
- while ((pos = v.indexOf('<mcespell>')) != -1) {
254
- // Add text node for the content before the word
255
- txt = v.substring(0, pos);
256
- if (txt.length) {
257
- node = doc.createTextNode(dom.decode(txt));
258
- elem.appendChild(node);
259
- }
260
- v = v.substring(pos+10);
261
- pos = v.indexOf('</mcespell>');
262
- txt = v.substring(0, pos);
263
- v = v.substring(pos+11);
264
- // Add span element for the word
265
- elem.appendChild(dom.create('span', {'class' : 'mceItemHiddenSpellWord'}, txt));
266
- }
267
- // Add text node for the rest of the content
268
- if (v.length) {
269
- node = doc.createTextNode(dom.decode(v));
270
- elem.appendChild(node);
271
- }
272
- } else {
273
- // Other browsers preserve whitespace characters on innerHTML usage
274
- elem.innerHTML = v.replace(rx, '$1<span class="mceItemHiddenSpellWord">$2</span>');
275
- }
276
-
277
- // Finally, replace the node with the container
278
- dom.replace(elem, n);
279
- }
280
- });
281
-
282
- se.setRng(r);
283
- },
284
-
285
- _showMenu : function(ed, e) {
286
- var t = this, ed = t.editor, m = t._menu, p1, dom = ed.dom, vp = dom.getViewPort(ed.getWin()), wordSpan = e.target;
287
-
288
- e = 0; // Fixes IE memory leak
289
-
290
- if (!m) {
291
- m = ed.controlManager.createDropMenu('spellcheckermenu', {'class' : 'mceNoIcons'});
292
- t._menu = m;
293
- }
294
-
295
- if (dom.hasClass(wordSpan, 'mceItemHiddenSpellWord')) {
296
- m.removeAll();
297
- m.add({title : 'spellchecker.wait', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
298
-
299
- t._sendRPC('getSuggestions', [t.selectedLang, dom.decode(wordSpan.innerHTML)], function(r) {
300
- var ignoreRpc;
301
-
302
- m.removeAll();
303
-
304
- if (r.length > 0) {
305
- m.add({title : 'spellchecker.sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
306
- each(r, function(v) {
307
- m.add({title : v, onclick : function() {
308
- dom.replace(ed.getDoc().createTextNode(v), wordSpan);
309
- t._checkDone();
310
- }});
311
- });
312
-
313
- m.addSeparator();
314
- } else
315
- m.add({title : 'spellchecker.no_sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
316
-
317
- if (ed.getParam('show_ignore_words', true)) {
318
- ignoreRpc = t.editor.getParam("spellchecker_enable_ignore_rpc", '');
319
- m.add({
320
- title : 'spellchecker.ignore_word',
321
- onclick : function() {
322
- var word = wordSpan.innerHTML;
323
-
324
- dom.remove(wordSpan, 1);
325
- t._checkDone();
326
-
327
- // tell the server if we need to
328
- if (ignoreRpc) {
329
- ed.setProgressState(1);
330
- t._sendRPC('ignoreWord', [t.selectedLang, word], function(r) {
331
- ed.setProgressState(0);
332
- });
333
- }
334
- }
335
- });
336
-
337
- m.add({
338
- title : 'spellchecker.ignore_words',
339
- onclick : function() {
340
- var word = wordSpan.innerHTML;
341
-
342
- t._removeWords(dom.decode(word));
343
- t._checkDone();
344
-
345
- // tell the server if we need to
346
- if (ignoreRpc) {
347
- ed.setProgressState(1);
348
- t._sendRPC('ignoreWords', [t.selectedLang, word], function(r) {
349
- ed.setProgressState(0);
350
- });
351
- }
352
- }
353
- });
354
- }
355
-
356
- if (t.editor.getParam("spellchecker_enable_learn_rpc")) {
357
- m.add({
358
- title : 'spellchecker.learn_word',
359
- onclick : function() {
360
- var word = wordSpan.innerHTML;
361
-
362
- dom.remove(wordSpan, 1);
363
- t._checkDone();
364
-
365
- ed.setProgressState(1);
366
- t._sendRPC('learnWord', [t.selectedLang, word], function(r) {
367
- ed.setProgressState(0);
368
- });
369
- }
370
- });
371
- }
372
-
373
- m.update();
374
- });
375
-
376
- p1 = DOM.getPos(ed.getContentAreaContainer());
377
- m.settings.offset_x = p1.x;
378
- m.settings.offset_y = p1.y;
379
-
380
- ed.selection.select(wordSpan);
381
- p1 = dom.getPos(wordSpan);
382
- m.showMenu(p1.x, p1.y + wordSpan.offsetHeight - vp.y);
383
-
384
- return tinymce.dom.Event.cancel(e);
385
- } else
386
- m.hideMenu();
387
- },
388
-
389
- _checkDone : function() {
390
- var t = this, ed = t.editor, dom = ed.dom, o;
391
-
392
- each(dom.select('span'), function(n) {
393
- if (n && dom.hasClass(n, 'mceItemHiddenSpellWord')) {
394
- o = true;
395
- return false;
396
- }
397
- });
398
-
399
- if (!o)
400
- t._done();
401
- },
402
-
403
- _done : function() {
404
- var t = this, la = t.active;
405
-
406
- if (t.active) {
407
- t.active = 0;
408
- t._removeWords();
409
-
410
- if (t._menu)
411
- t._menu.hideMenu();
412
-
413
- if (la)
414
- t.editor.nodeChanged();
415
- }
416
- },
417
-
418
- _sendRPC : function(m, p, cb) {
419
- var t = this;
420
-
421
- JSONRequest.sendRPC({
422
- url : t.rpcUrl,
423
- method : m,
424
- params : p,
425
- success : cb,
426
- error : function(e, x) {
427
- t.editor.setProgressState(0);
428
- t.editor.windowManager.alert(e.errstr || ('Error response: ' + x.responseText));
429
- }
430
- });
431
- }
432
- });
433
-
434
- // Register plugin
435
- tinymce.PluginManager.add('spellchecker', tinymce.plugins.SpellcheckerPlugin);
436
- })();
1
+ /**
2
+ * editor_plugin_src.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() {
12
+ var JSONRequest = tinymce.util.JSONRequest, each = tinymce.each, DOM = tinymce.DOM;
13
+
14
+ tinymce.create('tinymce.plugins.SpellcheckerPlugin', {
15
+ getInfo : function() {
16
+ return {
17
+ longname : 'Spellchecker',
18
+ author : 'Moxiecode Systems AB',
19
+ authorurl : 'http://tinymce.moxiecode.com',
20
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker',
21
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
22
+ };
23
+ },
24
+
25
+ init : function(ed, url) {
26
+ var t = this, cm;
27
+
28
+ t.url = url;
29
+ t.editor = ed;
30
+ t.rpcUrl = ed.getParam("spellchecker_rpc_url", "{backend}");
31
+
32
+ if (t.rpcUrl == '{backend}') {
33
+ // Sniff if the browser supports native spellchecking (Don't know of a better way)
34
+ if (tinymce.isIE)
35
+ return;
36
+
37
+ t.hasSupport = true;
38
+
39
+ // Disable the context menu when spellchecking is active
40
+ ed.onContextMenu.addToTop(function(ed, e) {
41
+ if (t.active)
42
+ return false;
43
+ });
44
+ }
45
+
46
+ // Register commands
47
+ ed.addCommand('mceSpellCheck', function() {
48
+ if (t.rpcUrl == '{backend}') {
49
+ // Enable/disable native spellchecker
50
+ t.editor.getBody().spellcheck = t.active = !t.active;
51
+ return;
52
+ }
53
+
54
+ if (!t.active) {
55
+ ed.setProgressState(1);
56
+ t._sendRPC('checkWords', [t.selectedLang, t._getWords()], function(r) {
57
+ if (r.length > 0) {
58
+ t.active = 1;
59
+ t._markWords(r);
60
+ ed.setProgressState(0);
61
+ ed.nodeChanged();
62
+ } else {
63
+ ed.setProgressState(0);
64
+
65
+ if (ed.getParam('spellchecker_report_no_misspellings', true))
66
+ ed.windowManager.alert('spellchecker.no_mpell');
67
+ }
68
+ });
69
+ } else
70
+ t._done();
71
+ });
72
+
73
+ if (ed.settings.content_css !== false)
74
+ ed.contentCSS.push(url + '/css/content.css');
75
+
76
+ ed.onClick.add(t._showMenu, t);
77
+ ed.onContextMenu.add(t._showMenu, t);
78
+ ed.onBeforeGetContent.add(function() {
79
+ if (t.active)
80
+ t._removeWords();
81
+ });
82
+
83
+ ed.onNodeChange.add(function(ed, cm) {
84
+ cm.setActive('spellchecker', t.active);
85
+ });
86
+
87
+ ed.onSetContent.add(function() {
88
+ t._done();
89
+ });
90
+
91
+ ed.onBeforeGetContent.add(function() {
92
+ t._done();
93
+ });
94
+
95
+ ed.onBeforeExecCommand.add(function(ed, cmd) {
96
+ if (cmd == 'mceFullScreen')
97
+ t._done();
98
+ });
99
+
100
+ // Find selected language
101
+ t.languages = {};
102
+ each(ed.getParam('spellchecker_languages', '+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv', 'hash'), function(v, k) {
103
+ if (k.indexOf('+') === 0) {
104
+ k = k.substring(1);
105
+ t.selectedLang = v;
106
+ }
107
+
108
+ t.languages[k] = v;
109
+ });
110
+ },
111
+
112
+ createControl : function(n, cm) {
113
+ var t = this, c, ed = t.editor;
114
+
115
+ if (n == 'spellchecker') {
116
+ // Use basic button if we use the native spellchecker
117
+ if (t.rpcUrl == '{backend}') {
118
+ // Create simple toggle button if we have native support
119
+ if (t.hasSupport)
120
+ c = cm.createButton(n, {title : 'spellchecker.desc', cmd : 'mceSpellCheck', scope : t});
121
+
122
+ return c;
123
+ }
124
+
125
+ c = cm.createSplitButton(n, {title : 'spellchecker.desc', cmd : 'mceSpellCheck', scope : t});
126
+
127
+ c.onRenderMenu.add(function(c, m) {
128
+ m.add({title : 'spellchecker.langs', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
129
+ each(t.languages, function(v, k) {
130
+ var o = {icon : 1}, mi;
131
+
132
+ o.onclick = function() {
133
+ if (v == t.selectedLang) {
134
+ return;
135
+ }
136
+ mi.setSelected(1);
137
+ t.selectedItem.setSelected(0);
138
+ t.selectedItem = mi;
139
+ t.selectedLang = v;
140
+ };
141
+
142
+ o.title = k;
143
+ mi = m.add(o);
144
+ mi.setSelected(v == t.selectedLang);
145
+
146
+ if (v == t.selectedLang)
147
+ t.selectedItem = mi;
148
+ })
149
+ });
150
+
151
+ return c;
152
+ }
153
+ },
154
+
155
+ // Internal functions
156
+
157
+ _walk : function(n, f) {
158
+ var d = this.editor.getDoc(), w;
159
+
160
+ if (d.createTreeWalker) {
161
+ w = d.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, false);
162
+
163
+ while ((n = w.nextNode()) != null)
164
+ f.call(this, n);
165
+ } else
166
+ tinymce.walk(n, f, 'childNodes');
167
+ },
168
+
169
+ _getSeparators : function() {
170
+ var re = '', i, str = this.editor.getParam('spellchecker_word_separator_chars', '\\s!"#$%&()*+,-./:;<=>?@[\]^_{|}����������������\u201d\u201c');
171
+
172
+ // Build word separator regexp
173
+ for (i=0; i<str.length; i++)
174
+ re += '\\' + str.charAt(i);
175
+
176
+ return re;
177
+ },
178
+
179
+ _getWords : function() {
180
+ var ed = this.editor, wl = [], tx = '', lo = {}, rawWords = [];
181
+
182
+ // Get area text
183
+ this._walk(ed.getBody(), function(n) {
184
+ if (n.nodeType == 3)
185
+ tx += n.nodeValue + ' ';
186
+ });
187
+
188
+ // split the text up into individual words
189
+ if (ed.getParam('spellchecker_word_pattern')) {
190
+ // look for words that match the pattern
191
+ rawWords = tx.match('(' + ed.getParam('spellchecker_word_pattern') + ')', 'gi');
192
+ } else {
193
+ // Split words by separator
194
+ tx = tx.replace(new RegExp('([0-9]|[' + this._getSeparators() + '])', 'g'), ' ');
195
+ tx = tinymce.trim(tx.replace(/(\s+)/g, ' '));
196
+ rawWords = tx.split(' ');
197
+ }
198
+
199
+ // Build word array and remove duplicates
200
+ each(rawWords, function(v) {
201
+ if (!lo[v]) {
202
+ wl.push(v);
203
+ lo[v] = 1;
204
+ }
205
+ });
206
+
207
+ return wl;
208
+ },
209
+
210
+ _removeWords : function(w) {
211
+ var ed = this.editor, dom = ed.dom, se = ed.selection, r = se.getRng(true);
212
+
213
+ each(dom.select('span').reverse(), function(n) {
214
+ if (n && (dom.hasClass(n, 'mceItemHiddenSpellWord') || dom.hasClass(n, 'mceItemHidden'))) {
215
+ if (!w || dom.decode(n.innerHTML) == w)
216
+ dom.remove(n, 1);
217
+ }
218
+ });
219
+
220
+ se.setRng(r);
221
+ },
222
+
223
+ _markWords : function(wl) {
224
+ var ed = this.editor, dom = ed.dom, doc = ed.getDoc(), se = ed.selection, r = se.getRng(true), nl = [],
225
+ w = wl.join('|'), re = this._getSeparators(), rx = new RegExp('(^|[' + re + '])(' + w + ')(?=[' + re + ']|$)', 'g');
226
+
227
+ // Collect all text nodes
228
+ this._walk(ed.getBody(), function(n) {
229
+ if (n.nodeType == 3) {
230
+ nl.push(n);
231
+ }
232
+ });
233
+
234
+ // Wrap incorrect words in spans
235
+ each(nl, function(n) {
236
+ var node, elem, txt, pos, v = n.nodeValue;
237
+
238
+ if (rx.test(v)) {
239
+ // Encode the content
240
+ v = dom.encode(v);
241
+ // Create container element
242
+ elem = dom.create('span', {'class' : 'mceItemHidden'});
243
+
244
+ // Following code fixes IE issues by creating text nodes
245
+ // using DOM methods instead of innerHTML.
246
+ // Bug #3124: <PRE> elements content is broken after spellchecking.
247
+ // Bug #1408: Preceding whitespace characters are removed
248
+ // @TODO: I'm not sure that both are still issues on IE9.
249
+ if (tinymce.isIE) {
250
+ // Enclose mispelled words with temporal tag
251
+ v = v.replace(rx, '$1<mcespell>$2</mcespell>');
252
+ // Loop over the content finding mispelled words
253
+ while ((pos = v.indexOf('<mcespell>')) != -1) {
254
+ // Add text node for the content before the word
255
+ txt = v.substring(0, pos);
256
+ if (txt.length) {
257
+ node = doc.createTextNode(dom.decode(txt));
258
+ elem.appendChild(node);
259
+ }
260
+ v = v.substring(pos+10);
261
+ pos = v.indexOf('</mcespell>');
262
+ txt = v.substring(0, pos);
263
+ v = v.substring(pos+11);
264
+ // Add span element for the word
265
+ elem.appendChild(dom.create('span', {'class' : 'mceItemHiddenSpellWord'}, txt));
266
+ }
267
+ // Add text node for the rest of the content
268
+ if (v.length) {
269
+ node = doc.createTextNode(dom.decode(v));
270
+ elem.appendChild(node);
271
+ }
272
+ } else {
273
+ // Other browsers preserve whitespace characters on innerHTML usage
274
+ elem.innerHTML = v.replace(rx, '$1<span class="mceItemHiddenSpellWord">$2</span>');
275
+ }
276
+
277
+ // Finally, replace the node with the container
278
+ dom.replace(elem, n);
279
+ }
280
+ });
281
+
282
+ se.setRng(r);
283
+ },
284
+
285
+ _showMenu : function(ed, e) {
286
+ var t = this, ed = t.editor, m = t._menu, p1, dom = ed.dom, vp = dom.getViewPort(ed.getWin()), wordSpan = e.target;
287
+
288
+ e = 0; // Fixes IE memory leak
289
+
290
+ if (!m) {
291
+ m = ed.controlManager.createDropMenu('spellcheckermenu', {'class' : 'mceNoIcons'});
292
+ t._menu = m;
293
+ }
294
+
295
+ if (dom.hasClass(wordSpan, 'mceItemHiddenSpellWord')) {
296
+ m.removeAll();
297
+ m.add({title : 'spellchecker.wait', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
298
+
299
+ t._sendRPC('getSuggestions', [t.selectedLang, dom.decode(wordSpan.innerHTML)], function(r) {
300
+ var ignoreRpc;
301
+
302
+ m.removeAll();
303
+
304
+ if (r.length > 0) {
305
+ m.add({title : 'spellchecker.sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
306
+ each(r, function(v) {
307
+ m.add({title : v, onclick : function() {
308
+ dom.replace(ed.getDoc().createTextNode(v), wordSpan);
309
+ t._checkDone();
310
+ }});
311
+ });
312
+
313
+ m.addSeparator();
314
+ } else
315
+ m.add({title : 'spellchecker.no_sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
316
+
317
+ if (ed.getParam('show_ignore_words', true)) {
318
+ ignoreRpc = t.editor.getParam("spellchecker_enable_ignore_rpc", '');
319
+ m.add({
320
+ title : 'spellchecker.ignore_word',
321
+ onclick : function() {
322
+ var word = wordSpan.innerHTML;
323
+
324
+ dom.remove(wordSpan, 1);
325
+ t._checkDone();
326
+
327
+ // tell the server if we need to
328
+ if (ignoreRpc) {
329
+ ed.setProgressState(1);
330
+ t._sendRPC('ignoreWord', [t.selectedLang, word], function(r) {
331
+ ed.setProgressState(0);
332
+ });
333
+ }
334
+ }
335
+ });
336
+
337
+ m.add({
338
+ title : 'spellchecker.ignore_words',
339
+ onclick : function() {
340
+ var word = wordSpan.innerHTML;
341
+
342
+ t._removeWords(dom.decode(word));
343
+ t._checkDone();
344
+
345
+ // tell the server if we need to
346
+ if (ignoreRpc) {
347
+ ed.setProgressState(1);
348
+ t._sendRPC('ignoreWords', [t.selectedLang, word], function(r) {
349
+ ed.setProgressState(0);
350
+ });
351
+ }
352
+ }
353
+ });
354
+ }
355
+
356
+ if (t.editor.getParam("spellchecker_enable_learn_rpc")) {
357
+ m.add({
358
+ title : 'spellchecker.learn_word',
359
+ onclick : function() {
360
+ var word = wordSpan.innerHTML;
361
+
362
+ dom.remove(wordSpan, 1);
363
+ t._checkDone();
364
+
365
+ ed.setProgressState(1);
366
+ t._sendRPC('learnWord', [t.selectedLang, word], function(r) {
367
+ ed.setProgressState(0);
368
+ });
369
+ }
370
+ });
371
+ }
372
+
373
+ m.update();
374
+ });
375
+
376
+ p1 = DOM.getPos(ed.getContentAreaContainer());
377
+ m.settings.offset_x = p1.x;
378
+ m.settings.offset_y = p1.y;
379
+
380
+ ed.selection.select(wordSpan);
381
+ p1 = dom.getPos(wordSpan);
382
+ m.showMenu(p1.x, p1.y + wordSpan.offsetHeight - vp.y);
383
+
384
+ return tinymce.dom.Event.cancel(e);
385
+ } else
386
+ m.hideMenu();
387
+ },
388
+
389
+ _checkDone : function() {
390
+ var t = this, ed = t.editor, dom = ed.dom, o;
391
+
392
+ each(dom.select('span'), function(n) {
393
+ if (n && dom.hasClass(n, 'mceItemHiddenSpellWord')) {
394
+ o = true;
395
+ return false;
396
+ }
397
+ });
398
+
399
+ if (!o)
400
+ t._done();
401
+ },
402
+
403
+ _done : function() {
404
+ var t = this, la = t.active;
405
+
406
+ if (t.active) {
407
+ t.active = 0;
408
+ t._removeWords();
409
+
410
+ if (t._menu)
411
+ t._menu.hideMenu();
412
+
413
+ if (la)
414
+ t.editor.nodeChanged();
415
+ }
416
+ },
417
+
418
+ _sendRPC : function(m, p, cb) {
419
+ var t = this;
420
+
421
+ JSONRequest.sendRPC({
422
+ url : t.rpcUrl,
423
+ method : m,
424
+ params : p,
425
+ success : cb,
426
+ error : function(e, x) {
427
+ t.editor.setProgressState(0);
428
+ t.editor.windowManager.alert(e.errstr || ('Error response: ' + x.responseText));
429
+ }
430
+ });
431
+ }
432
+ });
433
+
434
+ // Register plugin
435
+ tinymce.PluginManager.add('spellchecker', tinymce.plugins.SpellcheckerPlugin);
436
+ })();
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/tabfocus/editor_plugin_src.js CHANGED
@@ -1,122 +1,122 @@
1
- /**
2
- * editor_plugin_src.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() {
12
- var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, explode = tinymce.explode;
13
-
14
- tinymce.create('tinymce.plugins.TabFocusPlugin', {
15
- init : function(ed, url) {
16
- function tabCancel(ed, e) {
17
- if (e.keyCode === 9)
18
- return Event.cancel(e);
19
- }
20
-
21
- function tabHandler(ed, e) {
22
- var x, i, f, el, v;
23
-
24
- function find(d) {
25
- el = DOM.select(':input:enabled,*[tabindex]:not(iframe)');
26
-
27
- function canSelectRecursive(e) {
28
- return e.nodeName==="BODY" || (e.type != 'hidden' &&
29
- !(e.style.display == "none") &&
30
- !(e.style.visibility == "hidden") && canSelectRecursive(e.parentNode));
31
- }
32
- function canSelectInOldIe(el) {
33
- return el.attributes["tabIndex"].specified || el.nodeName == "INPUT" || el.nodeName == "TEXTAREA";
34
- }
35
- function isOldIe() {
36
- return tinymce.isIE6 || tinymce.isIE7;
37
- }
38
- function canSelect(el) {
39
- return ((!isOldIe() || canSelectInOldIe(el))) && el.getAttribute("tabindex") != '-1' && canSelectRecursive(el);
40
- }
41
-
42
- each(el, function(e, i) {
43
- if (e.id == ed.id) {
44
- x = i;
45
- return false;
46
- }
47
- });
48
- if (d > 0) {
49
- for (i = x + 1; i < el.length; i++) {
50
- if (canSelect(el[i]))
51
- return el[i];
52
- }
53
- } else {
54
- for (i = x - 1; i >= 0; i--) {
55
- if (canSelect(el[i]))
56
- return el[i];
57
- }
58
- }
59
-
60
- return null;
61
- }
62
-
63
- if (e.keyCode === 9) {
64
- v = explode(ed.getParam('tab_focus', ed.getParam('tabfocus_elements', ':prev,:next')));
65
-
66
- if (v.length == 1) {
67
- v[1] = v[0];
68
- v[0] = ':prev';
69
- }
70
-
71
- // Find element to focus
72
- if (e.shiftKey) {
73
- if (v[0] == ':prev')
74
- el = find(-1);
75
- else
76
- el = DOM.get(v[0]);
77
- } else {
78
- if (v[1] == ':next')
79
- el = find(1);
80
- else
81
- el = DOM.get(v[1]);
82
- }
83
-
84
- if (el) {
85
- if (el.id && (ed = tinymce.get(el.id || el.name)))
86
- ed.focus();
87
- else
88
- window.setTimeout(function() {
89
- if (!tinymce.isWebKit)
90
- window.focus();
91
- el.focus();
92
- }, 10);
93
-
94
- return Event.cancel(e);
95
- }
96
- }
97
- }
98
-
99
- ed.onKeyUp.add(tabCancel);
100
-
101
- if (tinymce.isGecko) {
102
- ed.onKeyPress.add(tabHandler);
103
- ed.onKeyDown.add(tabCancel);
104
- } else
105
- ed.onKeyDown.add(tabHandler);
106
-
107
- },
108
-
109
- getInfo : function() {
110
- return {
111
- longname : 'Tabfocus',
112
- author : 'Moxiecode Systems AB',
113
- authorurl : 'http://tinymce.moxiecode.com',
114
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus',
115
- version : tinymce.majorVersion + "." + tinymce.minorVersion
116
- };
117
- }
118
- });
119
-
120
- // Register plugin
121
- tinymce.PluginManager.add('tabfocus', tinymce.plugins.TabFocusPlugin);
122
- })();
1
+ /**
2
+ * editor_plugin_src.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() {
12
+ var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, explode = tinymce.explode;
13
+
14
+ tinymce.create('tinymce.plugins.TabFocusPlugin', {
15
+ init : function(ed, url) {
16
+ function tabCancel(ed, e) {
17
+ if (e.keyCode === 9)
18
+ return Event.cancel(e);
19
+ }
20
+
21
+ function tabHandler(ed, e) {
22
+ var x, i, f, el, v;
23
+
24
+ function find(d) {
25
+ el = DOM.select(':input:enabled,*[tabindex]:not(iframe)');
26
+
27
+ function canSelectRecursive(e) {
28
+ return e.nodeName==="BODY" || (e.type != 'hidden' &&
29
+ !(e.style.display == "none") &&
30
+ !(e.style.visibility == "hidden") && canSelectRecursive(e.parentNode));
31
+ }
32
+ function canSelectInOldIe(el) {
33
+ return el.attributes["tabIndex"].specified || el.nodeName == "INPUT" || el.nodeName == "TEXTAREA";
34
+ }
35
+ function isOldIe() {
36
+ return tinymce.isIE6 || tinymce.isIE7;
37
+ }
38
+ function canSelect(el) {
39
+ return ((!isOldIe() || canSelectInOldIe(el))) && el.getAttribute("tabindex") != '-1' && canSelectRecursive(el);
40
+ }
41
+
42
+ each(el, function(e, i) {
43
+ if (e.id == ed.id) {
44
+ x = i;
45
+ return false;
46
+ }
47
+ });
48
+ if (d > 0) {
49
+ for (i = x + 1; i < el.length; i++) {
50
+ if (canSelect(el[i]))
51
+ return el[i];
52
+ }
53
+ } else {
54
+ for (i = x - 1; i >= 0; i--) {
55
+ if (canSelect(el[i]))
56
+ return el[i];
57
+ }
58
+ }
59
+
60
+ return null;
61
+ }
62
+
63
+ if (e.keyCode === 9) {
64
+ v = explode(ed.getParam('tab_focus', ed.getParam('tabfocus_elements', ':prev,:next')));
65
+
66
+ if (v.length == 1) {
67
+ v[1] = v[0];
68
+ v[0] = ':prev';
69
+ }
70
+
71
+ // Find element to focus
72
+ if (e.shiftKey) {
73
+ if (v[0] == ':prev')
74
+ el = find(-1);
75
+ else
76
+ el = DOM.get(v[0]);
77
+ } else {
78
+ if (v[1] == ':next')
79
+ el = find(1);
80
+ else
81
+ el = DOM.get(v[1]);
82
+ }
83
+
84
+ if (el) {
85
+ if (el.id && (ed = tinymce.get(el.id || el.name)))
86
+ ed.focus();
87
+ else
88
+ window.setTimeout(function() {
89
+ if (!tinymce.isWebKit)
90
+ window.focus();
91
+ el.focus();
92
+ }, 10);
93
+
94
+ return Event.cancel(e);
95
+ }
96
+ }
97
+ }
98
+
99
+ ed.onKeyUp.add(tabCancel);
100
+
101
+ if (tinymce.isGecko) {
102
+ ed.onKeyPress.add(tabHandler);
103
+ ed.onKeyDown.add(tabCancel);
104
+ } else
105
+ ed.onKeyDown.add(tabHandler);
106
+
107
+ },
108
+
109
+ getInfo : function() {
110
+ return {
111
+ longname : 'Tabfocus',
112
+ author : 'Moxiecode Systems AB',
113
+ authorurl : 'http://tinymce.moxiecode.com',
114
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus',
115
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
116
+ };
117
+ }
118
+ });
119
+
120
+ // Register plugin
121
+ tinymce.PluginManager.add('tabfocus', tinymce.plugins.TabFocusPlugin);
122
+ })();
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/wordcount/editor_plugin_src.js CHANGED
@@ -1,122 +1,122 @@
1
- /**
2
- * editor_plugin_src.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() {
12
- tinymce.create('tinymce.plugins.WordCount', {
13
- block : 0,
14
- id : null,
15
- countre : null,
16
- cleanre : null,
17
-
18
- init : function(ed, url) {
19
- var t = this, last = 0, VK = tinymce.VK;
20
-
21
- t.countre = ed.getParam('wordcount_countregex', /[\w\u2019\'-]+/g); // u2019 == &rsquo;
22
- t.cleanre = ed.getParam('wordcount_cleanregex', /[0-9.(),;:!?%#$?\'\"_+=\\\/-]*/g);
23
- t.update_rate = ed.getParam('wordcount_update_rate', 2000);
24
- t.update_on_delete = ed.getParam('wordcount_update_on_delete', false);
25
- t.id = ed.id + '-word-count';
26
-
27
- ed.onPostRender.add(function(ed, cm) {
28
- var row, id;
29
-
30
- // Add it to the specified id or the theme advanced path
31
- id = ed.getParam('wordcount_target_id');
32
- if (!id) {
33
- row = tinymce.DOM.get(ed.id + '_path_row');
34
-
35
- if (row)
36
- tinymce.DOM.add(row.parentNode, 'div', {'style': 'float: right'}, ed.getLang('wordcount.words', 'Words: ') + '<span id="' + t.id + '">0</span>');
37
- } else {
38
- tinymce.DOM.add(id, 'span', {}, '<span id="' + t.id + '">0</span>');
39
- }
40
- });
41
-
42
- ed.onInit.add(function(ed) {
43
- ed.selection.onSetContent.add(function() {
44
- t._count(ed);
45
- });
46
-
47
- t._count(ed);
48
- });
49
-
50
- ed.onSetContent.add(function(ed) {
51
- t._count(ed);
52
- });
53
-
54
- function checkKeys(key) {
55
- return key !== last && (key === VK.ENTER || last === VK.SPACEBAR || checkDelOrBksp(last));
56
- }
57
-
58
- function checkDelOrBksp(key) {
59
- return key === VK.DELETE || key === VK.BACKSPACE;
60
- }
61
-
62
- ed.onKeyUp.add(function(ed, e) {
63
- if (checkKeys(e.keyCode) || t.update_on_delete && checkDelOrBksp(e.keyCode)) {
64
- t._count(ed);
65
- }
66
-
67
- last = e.keyCode;
68
- });
69
- },
70
-
71
- _getCount : function(ed) {
72
- var tc = 0;
73
- var tx = ed.getContent({ format: 'raw' });
74
-
75
- if (tx) {
76
- tx = tx.replace(/\.\.\./g, ' '); // convert ellipses to spaces
77
- tx = tx.replace(/<.[^<>]*?>/g, ' ').replace(/&nbsp;|&#160;/gi, ' '); // remove html tags and space chars
78
-
79
- // deal with html entities
80
- tx = tx.replace(/(\w+)(&.+?;)+(\w+)/, "$1$3").replace(/&.+?;/g, ' ');
81
- tx = tx.replace(this.cleanre, ''); // remove numbers and punctuation
82
-
83
- var wordArray = tx.match(this.countre);
84
- if (wordArray) {
85
- tc = wordArray.length;
86
- }
87
- }
88
-
89
- return tc;
90
- },
91
-
92
- _count : function(ed) {
93
- var t = this;
94
-
95
- // Keep multiple calls from happening at the same time
96
- if (t.block)
97
- return;
98
-
99
- t.block = 1;
100
-
101
- setTimeout(function() {
102
- if (!ed.destroyed) {
103
- var tc = t._getCount(ed);
104
- tinymce.DOM.setHTML(t.id, tc.toString());
105
- setTimeout(function() {t.block = 0;}, t.update_rate);
106
- }
107
- }, 1);
108
- },
109
-
110
- getInfo: function() {
111
- return {
112
- longname : 'Word Count plugin',
113
- author : 'Moxiecode Systems AB',
114
- authorurl : 'http://tinymce.moxiecode.com',
115
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/wordcount',
116
- version : tinymce.majorVersion + "." + tinymce.minorVersion
117
- };
118
- }
119
- });
120
-
121
- tinymce.PluginManager.add('wordcount', tinymce.plugins.WordCount);
122
- })();
1
+ /**
2
+ * editor_plugin_src.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() {
12
+ tinymce.create('tinymce.plugins.WordCount', {
13
+ block : 0,
14
+ id : null,
15
+ countre : null,
16
+ cleanre : null,
17
+
18
+ init : function(ed, url) {
19
+ var t = this, last = 0, VK = tinymce.VK;
20
+
21
+ t.countre = ed.getParam('wordcount_countregex', /[\w\u2019\'-]+/g); // u2019 == &rsquo;
22
+ t.cleanre = ed.getParam('wordcount_cleanregex', /[0-9.(),;:!?%#$?\'\"_+=\\\/-]*/g);
23
+ t.update_rate = ed.getParam('wordcount_update_rate', 2000);
24
+ t.update_on_delete = ed.getParam('wordcount_update_on_delete', false);
25
+ t.id = ed.id + '-word-count';
26
+
27
+ ed.onPostRender.add(function(ed, cm) {
28
+ var row, id;
29
+
30
+ // Add it to the specified id or the theme advanced path
31
+ id = ed.getParam('wordcount_target_id');
32
+ if (!id) {
33
+ row = tinymce.DOM.get(ed.id + '_path_row');
34
+
35
+ if (row)
36
+ tinymce.DOM.add(row.parentNode, 'div', {'style': 'float: right'}, ed.getLang('wordcount.words', 'Words: ') + '<span id="' + t.id + '">0</span>');
37
+ } else {
38
+ tinymce.DOM.add(id, 'span', {}, '<span id="' + t.id + '">0</span>');
39
+ }
40
+ });
41
+
42
+ ed.onInit.add(function(ed) {
43
+ ed.selection.onSetContent.add(function() {
44
+ t._count(ed);
45
+ });
46
+
47
+ t._count(ed);
48
+ });
49
+
50
+ ed.onSetContent.add(function(ed) {
51
+ t._count(ed);
52
+ });
53
+
54
+ function checkKeys(key) {
55
+ return key !== last && (key === VK.ENTER || last === VK.SPACEBAR || checkDelOrBksp(last));
56
+ }
57
+
58
+ function checkDelOrBksp(key) {
59
+ return key === VK.DELETE || key === VK.BACKSPACE;
60
+ }
61
+
62
+ ed.onKeyUp.add(function(ed, e) {
63
+ if (checkKeys(e.keyCode) || t.update_on_delete && checkDelOrBksp(e.keyCode)) {
64
+ t._count(ed);
65
+ }
66
+
67
+ last = e.keyCode;
68
+ });
69
+ },
70
+
71
+ _getCount : function(ed) {
72
+ var tc = 0;
73
+ var tx = ed.getContent({ format: 'raw' });
74
+
75
+ if (tx) {
76
+ tx = tx.replace(/\.\.\./g, ' '); // convert ellipses to spaces
77
+ tx = tx.replace(/<.[^<>]*?>/g, ' ').replace(/&nbsp;|&#160;/gi, ' '); // remove html tags and space chars
78
+
79
+ // deal with html entities
80
+ tx = tx.replace(/(\w+)(&.+?;)+(\w+)/, "$1$3").replace(/&.+?;/g, ' ');
81
+ tx = tx.replace(this.cleanre, ''); // remove numbers and punctuation
82
+
83
+ var wordArray = tx.match(this.countre);
84
+ if (wordArray) {
85
+ tc = wordArray.length;
86
+ }
87
+ }
88
+
89
+ return tc;
90
+ },
91
+
92
+ _count : function(ed) {
93
+ var t = this;
94
+
95
+ // Keep multiple calls from happening at the same time
96
+ if (t.block)
97
+ return;
98
+
99
+ t.block = 1;
100
+
101
+ setTimeout(function() {
102
+ if (!ed.destroyed) {
103
+ var tc = t._getCount(ed);
104
+ tinymce.DOM.setHTML(t.id, tc.toString());
105
+ setTimeout(function() {t.block = 0;}, t.update_rate);
106
+ }
107
+ }, 1);
108
+ },
109
+
110
+ getInfo: function() {
111
+ return {
112
+ longname : 'Word Count plugin',
113
+ author : 'Moxiecode Systems AB',
114
+ authorurl : 'http://tinymce.moxiecode.com',
115
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/wordcount',
116
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
117
+ };
118
+ }
119
+ });
120
+
121
+ tinymce.PluginManager.add('wordcount', tinymce.plugins.WordCount);
122
+ })();
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/about.htm CHANGED
@@ -1,52 +1,52 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <title>{#advanced_dlg.about_title}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js"></script>
7
- <script type="text/javascript" src="js/about.js"></script>
8
- </head>
9
- <body id="about" style="display: none">
10
- <div class="tabs">
11
- <ul>
12
- <li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advanced_dlg.about_general}</a></span></li>
13
- <li id="help_tab" style="display:none" aria-hidden="true" aria-controls="help_panel"><span><a href="javascript:mcTabs.displayTab('help_tab','help_panel');" onmousedown="return false;">{#advanced_dlg.about_help}</a></span></li>
14
- <li id="plugins_tab" aria-controls="plugins_panel"><span><a href="javascript:mcTabs.displayTab('plugins_tab','plugins_panel');" onmousedown="return false;">{#advanced_dlg.about_plugins}</a></span></li>
15
- </ul>
16
- </div>
17
-
18
- <div class="panel_wrapper">
19
- <div id="general_panel" class="panel current">
20
- <h3>{#advanced_dlg.about_title}</h3>
21
- <p>Version: <span id="version"></span> (<span id="date"></span>)</p>
22
- <p>TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under <a href="../../license.txt" target="_blank">LGPL</a>
23
- by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.</p>
24
- <p>Copyright &copy; 2003-2008, <a href="http://www.moxiecode.com" target="_blank">Moxiecode Systems AB</a>, All rights reserved.</p>
25
- <p>For more information about this software visit the <a href="http://tinymce.moxiecode.com" target="_blank">TinyMCE website</a>.</p>
26
-
27
- <div id="buttoncontainer">
28
- <a href="http://www.moxiecode.com" target="_blank"><img src="http://tinymce.moxiecode.com/images/gotmoxie.png" alt="Got Moxie?" border="0" /></a>
29
- </div>
30
- </div>
31
-
32
- <div id="plugins_panel" class="panel">
33
- <div id="pluginscontainer">
34
- <h3>{#advanced_dlg.about_loaded}</h3>
35
-
36
- <div id="plugintablecontainer">
37
- </div>
38
-
39
- <p>&nbsp;</p>
40
- </div>
41
- </div>
42
-
43
- <div id="help_panel" class="panel noscroll" style="overflow: visible;">
44
- <div id="iframecontainer"></div>
45
- </div>
46
- </div>
47
-
48
- <div class="mceActionPanel">
49
- <input type="button" id="cancel" name="cancel" value="{#close}" onclick="tinyMCEPopup.close();" />
50
- </div>
51
- </body>
52
- </html>
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml">
3
+ <head>
4
+ <title>{#advanced_dlg.about_title}</title>
5
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
7
+ <script type="text/javascript" src="js/about.js"></script>
8
+ </head>
9
+ <body id="about" style="display: none">
10
+ <div class="tabs">
11
+ <ul>
12
+ <li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advanced_dlg.about_general}</a></span></li>
13
+ <li id="help_tab" style="display:none" aria-hidden="true" aria-controls="help_panel"><span><a href="javascript:mcTabs.displayTab('help_tab','help_panel');" onmousedown="return false;">{#advanced_dlg.about_help}</a></span></li>
14
+ <li id="plugins_tab" aria-controls="plugins_panel"><span><a href="javascript:mcTabs.displayTab('plugins_tab','plugins_panel');" onmousedown="return false;">{#advanced_dlg.about_plugins}</a></span></li>
15
+ </ul>
16
+ </div>
17
+
18
+ <div class="panel_wrapper">
19
+ <div id="general_panel" class="panel current">
20
+ <h3>{#advanced_dlg.about_title}</h3>
21
+ <p>Version: <span id="version"></span> (<span id="date"></span>)</p>
22
+ <p>TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under <a href="../../license.txt" target="_blank">LGPL</a>
23
+ by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.</p>
24
+ <p>Copyright &copy; 2003-2008, <a href="http://www.moxiecode.com" target="_blank">Moxiecode Systems AB</a>, All rights reserved.</p>
25
+ <p>For more information about this software visit the <a href="http://tinymce.moxiecode.com" target="_blank">TinyMCE website</a>.</p>
26
+
27
+ <div id="buttoncontainer">
28
+ <a href="http://www.moxiecode.com" target="_blank"><img src="http://tinymce.moxiecode.com/images/gotmoxie.png" alt="Got Moxie?" border="0" /></a>
29
+ </div>
30
+ </div>
31
+
32
+ <div id="plugins_panel" class="panel">
33
+ <div id="pluginscontainer">
34
+ <h3>{#advanced_dlg.about_loaded}</h3>
35
+
36
+ <div id="plugintablecontainer">
37
+ </div>
38
+
39
+ <p>&nbsp;</p>
40
+ </div>
41
+ </div>
42
+
43
+ <div id="help_panel" class="panel noscroll" style="overflow: visible;">
44
+ <div id="iframecontainer"></div>
45
+ </div>
46
+ </div>
47
+
48
+ <div class="mceActionPanel">
49
+ <input type="button" id="cancel" name="cancel" value="{#close}" onclick="tinyMCEPopup.close();" />
50
+ </div>
51
+ </body>
52
+ </html>
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/anchor.htm CHANGED
@@ -1,26 +1,26 @@
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>{#advanced_dlg.anchor_title}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
6
- <script type="text/javascript" src="js/anchor.js"></script>
7
- </head>
8
- <body style="display: none" role="application" aria-labelledby="app_title">
9
- <form onsubmit="AnchorDialog.update();return false;" action="#">
10
- <table border="0" cellpadding="4" cellspacing="0" role="presentation">
11
- <tr>
12
- <td colspan="2" class="title" id="app_title">{#advanced_dlg.anchor_title}</td>
13
- </tr>
14
- <tr>
15
- <td class="nowrap"><label for="anchorName">{#advanced_dlg.anchor_name}:</label></td>
16
- <td><input name="anchorName" type="text" class="mceFocus" id="anchorName" value="" style="width: 200px" aria-required="true" /></td>
17
- </tr>
18
- </table>
19
-
20
- <div class="mceActionPanel">
21
- <input type="submit" id="insert" name="insert" value="{#update}" />
22
- <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
23
- </div>
24
- </form>
25
- </body>
26
- </html>
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>{#advanced_dlg.anchor_title}</title>
5
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
6
+ <script type="text/javascript" src="js/anchor.js"></script>
7
+ </head>
8
+ <body style="display: none" role="application" aria-labelledby="app_title">
9
+ <form onsubmit="AnchorDialog.update();return false;" action="#">
10
+ <table border="0" cellpadding="4" cellspacing="0" role="presentation">
11
+ <tr>
12
+ <td colspan="2" class="title" id="app_title">{#advanced_dlg.anchor_title}</td>
13
+ </tr>
14
+ <tr>
15
+ <td class="nowrap"><label for="anchorName">{#advanced_dlg.anchor_name}:</label></td>
16
+ <td><input name="anchorName" type="text" class="mceFocus" id="anchorName" value="" style="width: 200px" aria-required="true" /></td>
17
+ </tr>
18
+ </table>
19
+
20
+ <div class="mceActionPanel">
21
+ <input type="submit" id="insert" name="insert" value="{#update}" />
22
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
23
+ </div>
24
+ </form>
25
+ </body>
26
+ </html>
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/charmap.htm CHANGED
@@ -1,55 +1,55 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <title>{#advanced_dlg.charmap_title}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
6
- <script type="text/javascript" src="js/charmap.js"></script>
7
- </head>
8
- <body id="charmap" style="display:none" role="application">
9
- <table align="center" border="0" cellspacing="0" cellpadding="2" role="presentation">
10
- <tr>
11
- <td colspan="2" class="title" ><label for="charmapView" id="charmap_label">{#advanced_dlg.charmap_title}</label></td>
12
- </tr>
13
- <tr>
14
- <td id="charmapView" rowspan="2" align="left" valign="top">
15
- <!-- Chars will be rendered here -->
16
- </td>
17
- <td width="100" align="center" valign="top">
18
- <table border="0" cellpadding="0" cellspacing="0" width="100" style="height:100px" role="presentation">
19
- <tr>
20
- <td id="codeV">&nbsp;</td>
21
- </tr>
22
- <tr>
23
- <td id="codeN">&nbsp;</td>
24
- </tr>
25
- </table>
26
- </td>
27
- </tr>
28
- <tr>
29
- <td valign="bottom" style="padding-bottom: 3px;">
30
- <table width="100" align="center" border="0" cellpadding="2" cellspacing="0" role="presentation">
31
- <tr>
32
- <td align="center" style="border-left: 1px solid #666699; border-top: 1px solid #666699; border-right: 1px solid #666699;"><label for="codeA">HTML-Code</label></td>
33
- </tr>
34
- <tr>
35
- <td style="font-size: 16px; font-weight: bold; border-left: 1px solid #666699; border-bottom: 1px solid #666699; border-right: 1px solid #666699;" id="codeA" align="center">&nbsp;</td>
36
- </tr>
37
- <tr>
38
- <td style="font-size: 1px;">&nbsp;</td>
39
- </tr>
40
- <tr>
41
- <td align="center" style="border-left: 1px solid #666699; border-top: 1px solid #666699; border-right: 1px solid #666699;"><label for="codeB">NUM-Code</label></td>
42
- </tr>
43
- <tr>
44
- <td style="font-size: 16px; font-weight: bold; border-left: 1px solid #666699; border-bottom: 1px solid #666699; border-right: 1px solid #666699;" id="codeB" align="center">&nbsp;</td>
45
- </tr>
46
- </table>
47
- </td>
48
- </tr>
49
- <tr>
50
- <td colspan="2" id="charmap_usage">{#advanced_dlg.charmap_usage}</td>
51
- </tr>
52
-
53
- </table>
54
- </body>
55
- </html>
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml">
3
+ <head>
4
+ <title>{#advanced_dlg.charmap_title}</title>
5
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
6
+ <script type="text/javascript" src="js/charmap.js"></script>
7
+ </head>
8
+ <body id="charmap" style="display:none" role="application">
9
+ <table align="center" border="0" cellspacing="0" cellpadding="2" role="presentation">
10
+ <tr>
11
+ <td colspan="2" class="title" ><label for="charmapView" id="charmap_label">{#advanced_dlg.charmap_title}</label></td>
12
+ </tr>
13
+ <tr>
14
+ <td id="charmapView" rowspan="2" align="left" valign="top">
15
+ <!-- Chars will be rendered here -->
16
+ </td>
17
+ <td width="100" align="center" valign="top">
18
+ <table border="0" cellpadding="0" cellspacing="0" width="100" style="height:100px" role="presentation">
19
+ <tr>
20
+ <td id="codeV">&nbsp;</td>
21
+ </tr>
22
+ <tr>
23
+ <td id="codeN">&nbsp;</td>
24
+ </tr>
25
+ </table>
26
+ </td>
27
+ </tr>
28
+ <tr>
29
+ <td valign="bottom" style="padding-bottom: 3px;">
30
+ <table width="100" align="center" border="0" cellpadding="2" cellspacing="0" role="presentation">
31
+ <tr>
32
+ <td align="center" style="border-left: 1px solid #666699; border-top: 1px solid #666699; border-right: 1px solid #666699;"><label for="codeA">HTML-Code</label></td>
33
+ </tr>
34
+ <tr>
35
+ <td style="font-size: 16px; font-weight: bold; border-left: 1px solid #666699; border-bottom: 1px solid #666699; border-right: 1px solid #666699;" id="codeA" align="center">&nbsp;</td>
36
+ </tr>
37
+ <tr>
38
+ <td style="font-size: 1px;">&nbsp;</td>
39
+ </tr>
40
+ <tr>
41
+ <td align="center" style="border-left: 1px solid #666699; border-top: 1px solid #666699; border-right: 1px solid #666699;"><label for="codeB">NUM-Code</label></td>
42
+ </tr>
43
+ <tr>
44
+ <td style="font-size: 16px; font-weight: bold; border-left: 1px solid #666699; border-bottom: 1px solid #666699; border-right: 1px solid #666699;" id="codeB" align="center">&nbsp;</td>
45
+ </tr>
46
+ </table>
47
+ </td>
48
+ </tr>
49
+ <tr>
50
+ <td colspan="2" id="charmap_usage">{#advanced_dlg.charmap_usage}</td>
51
+ </tr>
52
+
53
+ </table>
54
+ </body>
55
+ </html>
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/color_picker.htm CHANGED
@@ -1,70 +1,70 @@
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>{#advanced_dlg.colorpicker_title}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js"></script>
7
- <script type="text/javascript" src="js/color_picker.js"></script>
8
- </head>
9
- <body id="colorpicker" style="display: none" role="application" aria-labelledby="app_label">
10
- <span class="mceVoiceLabel" id="app_label" style="display:none;">{#advanced_dlg.colorpicker_title}</span>
11
- <form onsubmit="insertAction();return false" action="#">
12
- <div class="tabs">
13
- <ul>
14
- <li id="picker_tab" aria-controls="picker_panel" class="current"><span><a href="javascript:mcTabs.displayTab('picker_tab','picker_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_picker_tab}</a></span></li>
15
- <li id="rgb_tab" aria-controls="rgb_panel"><span><a href="javascript:;" onclick="mcTabs.displayTab('rgb_tab','rgb_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_palette_tab}</a></span></li>
16
- <li id="named_tab" aria-controls="named_panel"><span><a href="javascript:;" onclick="javascript:mcTabs.displayTab('named_tab','named_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_named_tab}</a></span></li>
17
- </ul>
18
- </div>
19
-
20
- <div class="panel_wrapper">
21
- <div id="picker_panel" class="panel current">
22
- <fieldset>
23
- <legend>{#advanced_dlg.colorpicker_picker_title}</legend>
24
- <div id="picker">
25
- <img id="colors" src="img/colorpicker.jpg" onclick="computeColor(event)" onmousedown="isMouseDown = true;return false;" onmouseup="isMouseDown = false;" onmousemove="if (isMouseDown && isMouseOver) computeColor(event); return false;" onmouseover="isMouseOver=true;" onmouseout="isMouseOver=false;" alt="" />
26
-
27
- <div id="light">
28
- <!-- Will be filled with divs -->
29
- </div>
30
-
31
- <br style="clear: both" />
32
- </div>
33
- </fieldset>
34
- </div>
35
-
36
- <div id="rgb_panel" class="panel">
37
- <fieldset>
38
- <legend id="webcolors_title">{#advanced_dlg.colorpicker_palette_title}</legend>
39
- <div id="webcolors">
40
- <!-- Gets filled with web safe colors-->
41
- </div>
42
-
43
- <br style="clear: both" />
44
- </fieldset>
45
- </div>
46
-
47
- <div id="named_panel" class="panel">
48
- <fieldset id="named_picker_label">
49
- <legend id="named_title">{#advanced_dlg.colorpicker_named_title}</legend>
50
- <div id="namedcolors" role="listbox" tabindex="0" aria-labelledby="named_picker_label">
51
- <!-- Gets filled with named colors-->
52
- </div>
53
-
54
- <br style="clear: both" />
55
-
56
- <div id="colornamecontainer">
57
- {#advanced_dlg.colorpicker_name} <span id="colorname"></span>
58
- </div>
59
- </fieldset>
60
- </div>
61
- </div>
62
-
63
- <div class="mceActionPanel">
64
- <input type="submit" id="insert" name="insert" value="{#apply}" />
65
- <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();"/>
66
- <div id="preview_wrapper"><div id="previewblock"><label for="color">{#advanced_dlg.colorpicker_color}</label> <input id="color" type="text" size="8" class="text mceFocus" aria-required="true" /></div><span id="preview"></span></div>
67
- </div>
68
- </form>
69
- </body>
70
- </html>
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>{#advanced_dlg.colorpicker_title}</title>
5
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
7
+ <script type="text/javascript" src="js/color_picker.js"></script>
8
+ </head>
9
+ <body id="colorpicker" style="display: none" role="application" aria-labelledby="app_label">
10
+ <span class="mceVoiceLabel" id="app_label" style="display:none;">{#advanced_dlg.colorpicker_title}</span>
11
+ <form onsubmit="insertAction();return false" action="#">
12
+ <div class="tabs">
13
+ <ul>
14
+ <li id="picker_tab" aria-controls="picker_panel" class="current"><span><a href="javascript:mcTabs.displayTab('picker_tab','picker_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_picker_tab}</a></span></li>
15
+ <li id="rgb_tab" aria-controls="rgb_panel"><span><a href="javascript:;" onclick="mcTabs.displayTab('rgb_tab','rgb_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_palette_tab}</a></span></li>
16
+ <li id="named_tab" aria-controls="named_panel"><span><a href="javascript:;" onclick="javascript:mcTabs.displayTab('named_tab','named_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_named_tab}</a></span></li>
17
+ </ul>
18
+ </div>
19
+
20
+ <div class="panel_wrapper">
21
+ <div id="picker_panel" class="panel current">
22
+ <fieldset>
23
+ <legend>{#advanced_dlg.colorpicker_picker_title}</legend>
24
+ <div id="picker">
25
+ <img id="colors" src="img/colorpicker.jpg" onclick="computeColor(event)" onmousedown="isMouseDown = true;return false;" onmouseup="isMouseDown = false;" onmousemove="if (isMouseDown && isMouseOver) computeColor(event); return false;" onmouseover="isMouseOver=true;" onmouseout="isMouseOver=false;" alt="" />
26
+
27
+ <div id="light">
28
+ <!-- Will be filled with divs -->
29
+ </div>
30
+
31
+ <br style="clear: both" />
32
+ </div>
33
+ </fieldset>
34
+ </div>
35
+
36
+ <div id="rgb_panel" class="panel">
37
+ <fieldset>
38
+ <legend id="webcolors_title">{#advanced_dlg.colorpicker_palette_title}</legend>
39
+ <div id="webcolors">
40
+ <!-- Gets filled with web safe colors-->
41
+ </div>
42
+
43
+ <br style="clear: both" />
44
+ </fieldset>
45
+ </div>
46
+
47
+ <div id="named_panel" class="panel">
48
+ <fieldset id="named_picker_label">
49
+ <legend id="named_title">{#advanced_dlg.colorpicker_named_title}</legend>
50
+ <div id="namedcolors" role="listbox" tabindex="0" aria-labelledby="named_picker_label">
51
+ <!-- Gets filled with named colors-->
52
+ </div>
53
+
54
+ <br style="clear: both" />
55
+
56
+ <div id="colornamecontainer">
57
+ {#advanced_dlg.colorpicker_name} <span id="colorname"></span>
58
+ </div>
59
+ </fieldset>
60
+ </div>
61
+ </div>
62
+
63
+ <div class="mceActionPanel">
64
+ <input type="submit" id="insert" name="insert" value="{#apply}" />
65
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();"/>
66
+ <div id="preview_wrapper"><div id="previewblock"><label for="color">{#advanced_dlg.colorpicker_color}</label> <input id="color" type="text" size="8" class="text mceFocus" aria-required="true" /></div><span id="preview"></span></div>
67
+ </div>
68
+ </form>
69
+ </body>
70
+ </html>
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/editor_template_src.js CHANGED
@@ -1,1487 +1,1487 @@
1
- /**
2
- * editor_template_src.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(tinymce) {
12
- var DOM = tinymce.DOM, Event = tinymce.dom.Event, extend = tinymce.extend, each = tinymce.each, Cookie = tinymce.util.Cookie, lastExtID, explode = tinymce.explode;
13
-
14
- // Generates a preview for a format
15
- function getPreviewCss(ed, fmt) {
16
- var previewElm, dom = ed.dom, previewCss = '', parentFontSize, previewStylesName;
17
-
18
- previewStyles = ed.settings.preview_styles;
19
-
20
- // No preview forced
21
- if (previewStyles === false)
22
- return '';
23
-
24
- // Default preview
25
- if (!previewStyles)
26
- previewStyles = 'font-family font-size font-weight text-decoration text-transform color background-color';
27
-
28
- // Removes any variables since these can't be previewed
29
- function removeVars(val) {
30
- return val.replace(/%(\w+)/g, '');
31
- };
32
-
33
- // Create block/inline element to use for preview
34
- name = fmt.block || fmt.inline || 'span';
35
- previewElm = dom.create(name);
36
-
37
- // Add format styles to preview element
38
- each(fmt.styles, function(value, name) {
39
- value = removeVars(value);
40
-
41
- if (value)
42
- dom.setStyle(previewElm, name, value);
43
- });
44
-
45
- // Add attributes to preview element
46
- each(fmt.attributes, function(value, name) {
47
- value = removeVars(value);
48
-
49
- if (value)
50
- dom.setAttrib(previewElm, name, value);
51
- });
52
-
53
- // Add classes to preview element
54
- each(fmt.classes, function(value) {
55
- value = removeVars(value);
56
-
57
- if (!dom.hasClass(previewElm, value))
58
- dom.addClass(previewElm, value);
59
- });
60
-
61
- // Add the previewElm outside the visual area
62
- dom.setStyles(previewElm, {position: 'absolute', left: -0xFFFF});
63
- ed.getBody().appendChild(previewElm);
64
-
65
- // Get parent container font size so we can compute px values out of em/% for older IE:s
66
- parentFontSize = dom.getStyle(ed.getBody(), 'fontSize', true);
67
- parentFontSize = /px$/.test(parentFontSize) ? parseInt(parentFontSize, 10) : 0;
68
-
69
- each(previewStyles.split(' '), function(name) {
70
- var value = dom.getStyle(previewElm, name, true);
71
-
72
- // If background is transparent then check if the body has a background color we can use
73
- if (name == 'background-color' && /transparent|rgba\s*\([^)]+,\s*0\)/.test(value)) {
74
- value = dom.getStyle(ed.getBody(), name, true);
75
-
76
- // Ignore white since it's the default color, not the nicest fix
77
- if (dom.toHex(value).toLowerCase() == '#ffffff') {
78
- return;
79
- }
80
- }
81
-
82
- // Old IE won't calculate the font size so we need to do that manually
83
- if (name == 'font-size') {
84
- if (/em|%$/.test(value)) {
85
- if (parentFontSize === 0) {
86
- return;
87
- }
88
-
89
- // Convert font size from em/% to px
90
- value = parseFloat(value, 10) / (/%$/.test(value) ? 100 : 1);
91
- value = (value * parentFontSize) + 'px';
92
- }
93
- }
94
-
95
- previewCss += name + ':' + value + ';';
96
- });
97
-
98
- dom.remove(previewElm);
99
-
100
- return previewCss;
101
- };
102
-
103
- // Tell it to load theme specific language pack(s)
104
- tinymce.ThemeManager.requireLangPack('advanced');
105
-
106
- tinymce.create('tinymce.themes.AdvancedTheme', {
107
- sizes : [8, 10, 12, 14, 18, 24, 36],
108
-
109
- // Control name lookup, format: title, command
110
- controls : {
111
- bold : ['bold_desc', 'Bold'],
112
- italic : ['italic_desc', 'Italic'],
113
- underline : ['underline_desc', 'Underline'],
114
- strikethrough : ['striketrough_desc', 'Strikethrough'],
115
- justifyleft : ['justifyleft_desc', 'JustifyLeft'],
116
- justifycenter : ['justifycenter_desc', 'JustifyCenter'],
117
- justifyright : ['justifyright_desc', 'JustifyRight'],
118
- justifyfull : ['justifyfull_desc', 'JustifyFull'],
119
- bullist : ['bullist_desc', 'InsertUnorderedList'],
120
- numlist : ['numlist_desc', 'InsertOrderedList'],
121
- outdent : ['outdent_desc', 'Outdent'],
122
- indent : ['indent_desc', 'Indent'],
123
- cut : ['cut_desc', 'Cut'],
124
- copy : ['copy_desc', 'Copy'],
125
- paste : ['paste_desc', 'Paste'],
126
- undo : ['undo_desc', 'Undo'],
127
- redo : ['redo_desc', 'Redo'],
128
- link : ['link_desc', 'mceLink'],
129
- unlink : ['unlink_desc', 'unlink'],
130
- image : ['image_desc', 'mceImage'],
131
- cleanup : ['cleanup_desc', 'mceCleanup'],
132
- help : ['help_desc', 'mceHelp'],
133
- code : ['code_desc', 'mceCodeEditor'],
134
- hr : ['hr_desc', 'InsertHorizontalRule'],
135
- removeformat : ['removeformat_desc', 'RemoveFormat'],
136
- sub : ['sub_desc', 'subscript'],
137
- sup : ['sup_desc', 'superscript'],
138
- forecolor : ['forecolor_desc', 'ForeColor'],
139
- forecolorpicker : ['forecolor_desc', 'mceForeColor'],
140
- backcolor : ['backcolor_desc', 'HiliteColor'],
141
- backcolorpicker : ['backcolor_desc', 'mceBackColor'],
142
- charmap : ['charmap_desc', 'mceCharMap'],
143
- visualaid : ['visualaid_desc', 'mceToggleVisualAid'],
144
- anchor : ['anchor_desc', 'mceInsertAnchor'],
145
- newdocument : ['newdocument_desc', 'mceNewDocument'],
146
- blockquote : ['blockquote_desc', 'mceBlockQuote']
147
- },
148
-
149
- stateControls : ['bold', 'italic', 'underline', 'strikethrough', 'bullist', 'numlist', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'sub', 'sup', 'blockquote'],
150
-
151
- init : function(ed, url) {
152
- var t = this, s, v, o;
153
-
154
- t.editor = ed;
155
- t.url = url;
156
- t.onResolveName = new tinymce.util.Dispatcher(this);
157
- s = ed.settings;
158
-
159
- ed.forcedHighContrastMode = ed.settings.detect_highcontrast && t._isHighContrast();
160
- ed.settings.skin = ed.forcedHighContrastMode ? 'highcontrast' : ed.settings.skin;
161
-
162
- // Setup default buttons
163
- if (!s.theme_advanced_buttons1) {
164
- s = extend({
165
- theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",
166
- theme_advanced_buttons2 : "bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",
167
- theme_advanced_buttons3 : "hr,removeformat,visualaid,|,sub,sup,|,charmap"
168
- }, s);
169
- }
170
-
171
- // Default settings
172
- t.settings = s = extend({
173
- theme_advanced_path : true,
174
- theme_advanced_toolbar_location : 'top',
175
- theme_advanced_blockformats : "p,address,pre,h1,h2,h3,h4,h5,h6",
176
- theme_advanced_toolbar_align : "left",
177
- theme_advanced_statusbar_location : "bottom",
178
- theme_advanced_fonts : "Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",
179
- theme_advanced_more_colors : 1,
180
- theme_advanced_row_height : 23,
181
- theme_advanced_resize_horizontal : 1,
182
- theme_advanced_resizing_use_cookie : 1,
183
- theme_advanced_font_sizes : "1,2,3,4,5,6,7",
184
- theme_advanced_font_selector : "span",
185
- theme_advanced_show_current_color: 0,
186
- readonly : ed.settings.readonly
187
- }, s);
188
-
189
- // Setup default font_size_style_values
190
- if (!s.font_size_style_values)
191
- s.font_size_style_values = "8pt,10pt,12pt,14pt,18pt,24pt,36pt";
192
-
193
- if (tinymce.is(s.theme_advanced_font_sizes, 'string')) {
194
- s.font_size_style_values = tinymce.explode(s.font_size_style_values);
195
- s.font_size_classes = tinymce.explode(s.font_size_classes || '');
196
-
197
- // Parse string value
198
- o = {};
199
- ed.settings.theme_advanced_font_sizes = s.theme_advanced_font_sizes;
200
- each(ed.getParam('theme_advanced_font_sizes', '', 'hash'), function(v, k) {
201
- var cl;
202
-
203
- if (k == v && v >= 1 && v <= 7) {
204
- k = v + ' (' + t.sizes[v - 1] + 'pt)';
205
- cl = s.font_size_classes[v - 1];
206
- v = s.font_size_style_values[v - 1] || (t.sizes[v - 1] + 'pt');
207
- }
208
-
209
- if (/^\s*\./.test(v))
210
- cl = v.replace(/\./g, '');
211
-
212
- o[k] = cl ? {'class' : cl} : {fontSize : v};
213
- });
214
-
215
- s.theme_advanced_font_sizes = o;
216
- }
217
-
218
- if ((v = s.theme_advanced_path_location) && v != 'none')
219
- s.theme_advanced_statusbar_location = s.theme_advanced_path_location;
220
-
221
- if (s.theme_advanced_statusbar_location == 'none')
222
- s.theme_advanced_statusbar_location = 0;
223
-
224
- if (ed.settings.content_css !== false)
225
- ed.contentCSS.push(ed.baseURI.toAbsolute(url + "/skins/" + ed.settings.skin + "/content.css"));
226
-
227
- // Init editor
228
- ed.onInit.add(function() {
229
- if (!ed.settings.readonly) {
230
- ed.onNodeChange.add(t._nodeChanged, t);
231
- ed.onKeyUp.add(t._updateUndoStatus, t);
232
- ed.onMouseUp.add(t._updateUndoStatus, t);
233
- ed.dom.bind(ed.dom.getRoot(), 'dragend', function() {
234
- t._updateUndoStatus(ed);
235
- });
236
- }
237
- });
238
-
239
- ed.onSetProgressState.add(function(ed, b, ti) {
240
- var co, id = ed.id, tb;
241
-
242
- if (b) {
243
- t.progressTimer = setTimeout(function() {
244
- co = ed.getContainer();
245
- co = co.insertBefore(DOM.create('DIV', {style : 'position:relative'}), co.firstChild);
246
- tb = DOM.get(ed.id + '_tbl');
247
-
248
- DOM.add(co, 'div', {id : id + '_blocker', 'class' : 'mceBlocker', style : {width : tb.clientWidth + 2, height : tb.clientHeight + 2}});
249
- DOM.add(co, 'div', {id : id + '_progress', 'class' : 'mceProgress', style : {left : tb.clientWidth / 2, top : tb.clientHeight / 2}});
250
- }, ti || 0);
251
- } else {
252
- DOM.remove(id + '_blocker');
253
- DOM.remove(id + '_progress');
254
- clearTimeout(t.progressTimer);
255
- }
256
- });
257
-
258
- DOM.loadCSS(s.editor_css ? ed.documentBaseURI.toAbsolute(s.editor_css) : url + "/skins/" + ed.settings.skin + "/ui.css");
259
-
260
- if (s.skin_variant)
261
- DOM.loadCSS(url + "/skins/" + ed.settings.skin + "/ui_" + s.skin_variant + ".css");
262
- },
263
-
264
- _isHighContrast : function() {
265
- var actualColor, div = DOM.add(DOM.getRoot(), 'div', {'style': 'background-color: rgb(171,239,86);'});
266
-
267
- actualColor = (DOM.getStyle(div, 'background-color', true) + '').toLowerCase().replace(/ /g, '');
268
- DOM.remove(div);
269
-
270
- return actualColor != 'rgb(171,239,86)' && actualColor != '#abef56';
271
- },
272
-
273
- createControl : function(n, cf) {
274
- var cd, c;
275
-
276
- if (c = cf.createControl(n))
277
- return c;
278
-
279
- switch (n) {
280
- case "styleselect":
281
- return this._createStyleSelect();
282
-
283
- case "formatselect":
284
- return this._createBlockFormats();
285
-
286
- case "fontselect":
287
- return this._createFontSelect();
288
-
289
- case "fontsizeselect":
290
- return this._createFontSizeSelect();
291
-
292
- case "forecolor":
293
- return this._createForeColorMenu();
294
-
295
- case "backcolor":
296
- return this._createBackColorMenu();
297
- }
298
-
299
- if ((cd = this.controls[n]))
300
- return cf.createButton(n, {title : "advanced." + cd[0], cmd : cd[1], ui : cd[2], value : cd[3]});
301
- },
302
-
303
- execCommand : function(cmd, ui, val) {
304
- var f = this['_' + cmd];
305
-
306
- if (f) {
307
- f.call(this, ui, val);
308
- return true;
309
- }
310
-
311
- return false;
312
- },
313
-
314
- _importClasses : function(e) {
315
- var ed = this.editor, ctrl = ed.controlManager.get('styleselect');
316
-
317
- if (ctrl.getLength() == 0) {
318
- each(ed.dom.getClasses(), function(o, idx) {
319
- var name = 'style_' + idx, fmt;
320
-
321
- fmt = {
322
- inline : 'span',
323
- attributes : {'class' : o['class']},
324
- selector : '*'
325
- };
326
-
327
- ed.formatter.register(name, fmt);
328
-
329
- ctrl.add(o['class'], name, {
330
- style: function() {
331
- return getPreviewCss(ed, fmt);
332
- }
333
- });
334
- });
335
- }
336
- },
337
-
338
- _createStyleSelect : function(n) {
339
- var t = this, ed = t.editor, ctrlMan = ed.controlManager, ctrl;
340
-
341
- // Setup style select box
342
- ctrl = ctrlMan.createListBox('styleselect', {
343
- title : 'advanced.style_select',
344
- onselect : function(name) {
345
- var matches, formatNames = [], removedFormat;
346
-
347
- each(ctrl.items, function(item) {
348
- formatNames.push(item.value);
349
- });
350
-
351
- ed.focus();
352
- ed.undoManager.add();
353
-
354
- // Toggle off the current format(s)
355
- matches = ed.formatter.matchAll(formatNames);
356
- tinymce.each(matches, function(match) {
357
- if (!name || match == name) {
358
- if (match)
359
- ed.formatter.remove(match);
360
-
361
- removedFormat = true;
362
- }
363
- });
364
-
365
- if (!removedFormat)
366
- ed.formatter.apply(name);
367
-
368
- ed.undoManager.add();
369
- ed.nodeChanged();
370
-
371
- return false; // No auto select
372
- }
373
- });
374
-
375
- // Handle specified format
376
- ed.onPreInit.add(function() {
377
- var counter = 0, formats = ed.getParam('style_formats');
378
-
379
- if (formats) {
380
- each(formats, function(fmt) {
381
- var name, keys = 0;
382
-
383
- each(fmt, function() {keys++;});
384
-
385
- if (keys > 1) {
386
- name = fmt.name = fmt.name || 'style_' + (counter++);
387
- ed.formatter.register(name, fmt);
388
- ctrl.add(fmt.title, name, {
389
- style: function() {
390
- return getPreviewCss(ed, fmt);
391
- }
392
- });
393
- } else
394
- ctrl.add(fmt.title);
395
- });
396
- } else {
397
- each(ed.getParam('theme_advanced_styles', '', 'hash'), function(val, key) {
398
- var name, fmt;
399
-
400
- if (val) {
401
- name = 'style_' + (counter++);
402
- fmt = {
403
- inline : 'span',
404
- classes : val,
405
- selector : '*'
406
- };
407
-
408
- ed.formatter.register(name, fmt);
409
- ctrl.add(t.editor.translate(key), name, {
410
- style: function() {
411
- return getPreviewCss(ed, fmt);
412
- }
413
- });
414
- }
415
- });
416
- }
417
- });
418
-
419
- // Auto import classes if the ctrl box is empty
420
- if (ctrl.getLength() == 0) {
421
- ctrl.onPostRender.add(function(ed, n) {
422
- if (!ctrl.NativeListBox) {
423
- Event.add(n.id + '_text', 'focus', t._importClasses, t);
424
- Event.add(n.id + '_text', 'mousedown', t._importClasses, t);
425
- Event.add(n.id + '_open', 'focus', t._importClasses, t);
426
- Event.add(n.id + '_open', 'mousedown', t._importClasses, t);
427
- } else
428
- Event.add(n.id, 'focus', t._importClasses, t);
429
- });
430
- }
431
-
432
- return ctrl;
433
- },
434
-
435
- _createFontSelect : function() {
436
- var c, t = this, ed = t.editor;
437
-
438
- c = ed.controlManager.createListBox('fontselect', {
439
- title : 'advanced.fontdefault',
440
- onselect : function(v) {
441
- var cur = c.items[c.selectedIndex];
442
-
443
- if (!v && cur) {
444
- ed.execCommand('FontName', false, cur.value);
445
- return;
446
- }
447
-
448
- ed.execCommand('FontName', false, v);
449
-
450
- // Fake selection, execCommand will fire a nodeChange and update the selection
451
- c.select(function(sv) {
452
- return v == sv;
453
- });
454
-
455
- if (cur && cur.value == v) {
456
- c.select(null);
457
- }
458
-
459
- return false; // No auto select
460
- }
461
- });
462
-
463
- if (c) {
464
- each(ed.getParam('theme_advanced_fonts', t.settings.theme_advanced_fonts, 'hash'), function(v, k) {
465
- c.add(ed.translate(k), v, {style : v.indexOf('dings') == -1 ? 'font-family:' + v : ''});
466
- });
467
- }
468
-
469
- return c;
470
- },
471
-
472
- _createFontSizeSelect : function() {
473
- var t = this, ed = t.editor, c, i = 0, cl = [];
474
-
475
- c = ed.controlManager.createListBox('fontsizeselect', {title : 'advanced.font_size', onselect : function(v) {
476
- var cur = c.items[c.selectedIndex];
477
-
478
- if (!v && cur) {
479
- cur = cur.value;
480
-
481
- if (cur['class']) {
482
- ed.formatter.toggle('fontsize_class', {value : cur['class']});
483
- ed.undoManager.add();
484
- ed.nodeChanged();
485
- } else {
486
- ed.execCommand('FontSize', false, cur.fontSize);
487
- }
488
-
489
- return;
490
- }
491
-
492
- if (v['class']) {
493
- ed.focus();
494
- ed.undoManager.add();
495
- ed.formatter.toggle('fontsize_class', {value : v['class']});
496
- ed.undoManager.add();
497
- ed.nodeChanged();
498
- } else
499
- ed.execCommand('FontSize', false, v.fontSize);
500
-
501
- // Fake selection, execCommand will fire a nodeChange and update the selection
502
- c.select(function(sv) {
503
- return v == sv;
504
- });
505
-
506
- if (cur && (cur.value.fontSize == v.fontSize || cur.value['class'] && cur.value['class'] == v['class'])) {
507
- c.select(null);
508
- }
509
-
510
- return false; // No auto select
511
- }});
512
-
513
- if (c) {
514
- each(t.settings.theme_advanced_font_sizes, function(v, k) {
515
- var fz = v.fontSize;
516
-
517
- if (fz >= 1 && fz <= 7)
518
- fz = t.sizes[parseInt(fz) - 1] + 'pt';
519
-
520
- c.add(k, v, {'style' : 'font-size:' + fz, 'class' : 'mceFontSize' + (i++) + (' ' + (v['class'] || ''))});
521
- });
522
- }
523
-
524
- return c;
525
- },
526
-
527
- _createBlockFormats : function() {
528
- var c, fmts = {
529
- p : 'advanced.paragraph',
530
- address : 'advanced.address',
531
- pre : 'advanced.pre',
532
- h1 : 'advanced.h1',
533
- h2 : 'advanced.h2',
534
- h3 : 'advanced.h3',
535
- h4 : 'advanced.h4',
536
- h5 : 'advanced.h5',
537
- h6 : 'advanced.h6',
538
- div : 'advanced.div',
539
- blockquote : 'advanced.blockquote',
540
- code : 'advanced.code',
541
- dt : 'advanced.dt',
542
- dd : 'advanced.dd',
543
- samp : 'advanced.samp'
544
- }, t = this;
545
-
546
- c = t.editor.controlManager.createListBox('formatselect', {title : 'advanced.block', onselect : function(v) {
547
- t.editor.execCommand('FormatBlock', false, v);
548
- return false;
549
- }});
550
-
551
- if (c) {
552
- each(t.editor.getParam('theme_advanced_blockformats', t.settings.theme_advanced_blockformats, 'hash'), function(v, k) {
553
- c.add(t.editor.translate(k != v ? k : fmts[v]), v, {'class' : 'mce_formatPreview mce_' + v, style: function() {
554
- return getPreviewCss(t.editor, {block: v});
555
- }});
556
- });
557
- }
558
-
559
- return c;
560
- },
561
-
562
- _createForeColorMenu : function() {
563
- var c, t = this, s = t.settings, o = {}, v;
564
-
565
- if (s.theme_advanced_more_colors) {
566
- o.more_colors_func = function() {
567
- t._mceColorPicker(0, {
568
- color : c.value,
569
- func : function(co) {
570
- c.setColor(co);
571
- }
572
- });
573
- };
574
- }
575
-
576
- if (v = s.theme_advanced_text_colors)
577
- o.colors = v;
578
-
579
- if (s.theme_advanced_default_foreground_color)
580
- o.default_color = s.theme_advanced_default_foreground_color;
581
-
582
- o.title = 'advanced.forecolor_desc';
583
- o.cmd = 'ForeColor';
584
- o.scope = this;
585
-
586
- c = t.editor.controlManager.createColorSplitButton('forecolor', o);
587
-
588
- return c;
589
- },
590
-
591
- _createBackColorMenu : function() {
592
- var c, t = this, s = t.settings, o = {}, v;
593
-
594
- if (s.theme_advanced_more_colors) {
595
- o.more_colors_func = function() {
596
- t._mceColorPicker(0, {
597
- color : c.value,
598
- func : function(co) {
599
- c.setColor(co);
600
- }
601
- });
602
- };
603
- }
604
-
605
- if (v = s.theme_advanced_background_colors)
606
- o.colors = v;
607
-
608
- if (s.theme_advanced_default_background_color)
609
- o.default_color = s.theme_advanced_default_background_color;
610
-
611
- o.title = 'advanced.backcolor_desc';
612
- o.cmd = 'HiliteColor';
613
- o.scope = this;
614
-
615
- c = t.editor.controlManager.createColorSplitButton('backcolor', o);
616
-
617
- return c;
618
- },
619
-
620
- renderUI : function(o) {
621
- var n, ic, tb, t = this, ed = t.editor, s = t.settings, sc, p, nl;
622
-
623
- if (ed.settings) {
624
- ed.settings.aria_label = s.aria_label + ed.getLang('advanced.help_shortcut');
625
- }
626
-
627
- // TODO: ACC Should have an aria-describedby attribute which is user-configurable to describe what this field is actually for.
628
- // Maybe actually inherit it from the original textara?
629
- n = p = DOM.create('span', {role : 'application', 'aria-labelledby' : ed.id + '_voice', id : ed.id + '_parent', 'class' : 'mceEditor ' + ed.settings.skin + 'Skin' + (s.skin_variant ? ' ' + ed.settings.skin + 'Skin' + t._ufirst(s.skin_variant) : '') + (ed.settings.directionality == "rtl" ? ' mceRtl' : '')});
630
- DOM.add(n, 'span', {'class': 'mceVoiceLabel', 'style': 'display:none;', id: ed.id + '_voice'}, s.aria_label);
631
-
632
- if (!DOM.boxModel)
633
- n = DOM.add(n, 'div', {'class' : 'mceOldBoxModel'});
634
-
635
- n = sc = DOM.add(n, 'table', {role : "presentation", id : ed.id + '_tbl', 'class' : 'mceLayout', cellSpacing : 0, cellPadding : 0});
636
- n = tb = DOM.add(n, 'tbody');
637
-
638
- switch ((s.theme_advanced_layout_manager || '').toLowerCase()) {
639
- case "rowlayout":
640
- ic = t._rowLayout(s, tb, o);
641
- break;
642
-
643
- case "customlayout":
644
- ic = ed.execCallback("theme_advanced_custom_layout", s, tb, o, p);
645
- break;
646
-
647
- default:
648
- ic = t._simpleLayout(s, tb, o, p);
649
- }
650
-
651
- n = o.targetNode;
652
-
653
- // Add classes to first and last TRs
654
- nl = sc.rows;
655
- DOM.addClass(nl[0], 'mceFirst');
656
- DOM.addClass(nl[nl.length - 1], 'mceLast');
657
-
658
- // Add classes to first and last TDs
659
- each(DOM.select('tr', tb), function(n) {
660
- DOM.addClass(n.firstChild, 'mceFirst');
661
- DOM.addClass(n.childNodes[n.childNodes.length - 1], 'mceLast');
662
- });
663
-
664
- if (DOM.get(s.theme_advanced_toolbar_container))
665
- DOM.get(s.theme_advanced_toolbar_container).appendChild(p);
666
- else
667
- DOM.insertAfter(p, n);
668
-
669
- Event.add(ed.id + '_path_row', 'click', function(e) {
670
- e = e.target;
671
-
672
- if (e.nodeName == 'A') {
673
- t._sel(e.className.replace(/^.*mcePath_([0-9]+).*$/, '$1'));
674
- return false;
675
- }
676
- });
677
- /*
678
- if (DOM.get(ed.id + '_path_row')) {
679
- Event.add(ed.id + '_tbl', 'mouseover', function(e) {
680
- var re;
681
-
682
- e = e.target;
683
-
684
- if (e.nodeName == 'SPAN' && DOM.hasClass(e.parentNode, 'mceButton')) {
685
- re = DOM.get(ed.id + '_path_row');
686
- t.lastPath = re.innerHTML;
687
- DOM.setHTML(re, e.parentNode.title);
688
- }
689
- });
690
-
691
- Event.add(ed.id + '_tbl', 'mouseout', function(e) {
692
- if (t.lastPath) {
693
- DOM.setHTML(ed.id + '_path_row', t.lastPath);
694
- t.lastPath = 0;
695
- }
696
- });
697
- }
698
- */
699
-
700
- if (!ed.getParam('accessibility_focus'))
701
- Event.add(DOM.add(p, 'a', {href : '#'}, '<!-- IE -->'), 'focus', function() {tinyMCE.get(ed.id).focus();});
702
-
703
- if (s.theme_advanced_toolbar_location == 'external')
704
- o.deltaHeight = 0;
705
-
706
- t.deltaHeight = o.deltaHeight;
707
- o.targetNode = null;
708
-
709
- ed.onKeyDown.add(function(ed, evt) {
710
- var DOM_VK_F10 = 121, DOM_VK_F11 = 122;
711
-
712
- if (evt.altKey) {
713
- if (evt.keyCode === DOM_VK_F10) {
714
- // Make sure focus is given to toolbar in Safari.
715
- // We can't do this in IE as it prevents giving focus to toolbar when editor is in a frame
716
- if (tinymce.isWebKit) {
717
- window.focus();
718
- }
719
- t.toolbarGroup.focus();
720
- return Event.cancel(evt);
721
- } else if (evt.keyCode === DOM_VK_F11) {
722
- DOM.get(ed.id + '_path_row').focus();
723
- return Event.cancel(evt);
724
- }
725
- }
726
- });
727
-
728
- // alt+0 is the UK recommended shortcut for accessing the list of access controls.
729
- ed.addShortcut('alt+0', '', 'mceShortcuts', t);
730
-
731
- return {
732
- iframeContainer : ic,
733
- editorContainer : ed.id + '_parent',
734
- sizeContainer : sc,
735
- deltaHeight : o.deltaHeight
736
- };
737
- },
738
-
739
- getInfo : function() {
740
- return {
741
- longname : 'Advanced theme',
742
- author : 'Moxiecode Systems AB',
743
- authorurl : 'http://tinymce.moxiecode.com',
744
- version : tinymce.majorVersion + "." + tinymce.minorVersion
745
- }
746
- },
747
-
748
- resizeBy : function(dw, dh) {
749
- var e = DOM.get(this.editor.id + '_ifr');
750
-
751
- this.resizeTo(e.clientWidth + dw, e.clientHeight + dh);
752
- },
753
-
754
- resizeTo : function(w, h, store) {
755
- var ed = this.editor, s = this.settings, e = DOM.get(ed.id + '_tbl'), ifr = DOM.get(ed.id + '_ifr');
756
-
757
- // Boundery fix box
758
- w = Math.max(s.theme_advanced_resizing_min_width || 100, w);
759
- h = Math.max(s.theme_advanced_resizing_min_height || 100, h);
760
- w = Math.min(s.theme_advanced_resizing_max_width || 0xFFFF, w);
761
- h = Math.min(s.theme_advanced_resizing_max_height || 0xFFFF, h);
762
-
763
- // Resize iframe and container
764
- DOM.setStyle(e, 'height', '');
765
- DOM.setStyle(ifr, 'height', h);
766
-
767
- if (s.theme_advanced_resize_horizontal) {
768
- DOM.setStyle(e, 'width', '');
769
- DOM.setStyle(ifr, 'width', w);
770
-
771
- // Make sure that the size is never smaller than the over all ui
772
- if (w < e.clientWidth) {
773
- w = e.clientWidth;
774
- DOM.setStyle(ifr, 'width', e.clientWidth);
775
- }
776
- }
777
-
778
- // Store away the size
779
- if (store && s.theme_advanced_resizing_use_cookie) {
780
- Cookie.setHash("TinyMCE_" + ed.id + "_size", {
781
- cw : w,
782
- ch : h
783
- });
784
- }
785
- },
786
-
787
- destroy : function() {
788
- var id = this.editor.id;
789
-
790
- Event.clear(id + '_resize');
791
- Event.clear(id + '_path_row');
792
- Event.clear(id + '_external_close');
793
- },
794
-
795
- // Internal functions
796
-
797
- _simpleLayout : function(s, tb, o, p) {
798
- var t = this, ed = t.editor, lo = s.theme_advanced_toolbar_location, sl = s.theme_advanced_statusbar_location, n, ic, etb, c;
799
-
800
- if (s.readonly) {
801
- n = DOM.add(tb, 'tr');
802
- n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});
803
- return ic;
804
- }
805
-
806
- // Create toolbar container at top
807
- if (lo == 'top')
808
- t._addToolbars(tb, o);
809
-
810
- // Create external toolbar
811
- if (lo == 'external') {
812
- n = c = DOM.create('div', {style : 'position:relative'});
813
- n = DOM.add(n, 'div', {id : ed.id + '_external', 'class' : 'mceExternalToolbar'});
814
- DOM.add(n, 'a', {id : ed.id + '_external_close', href : 'javascript:;', 'class' : 'mceExternalClose'});
815
- n = DOM.add(n, 'table', {id : ed.id + '_tblext', cellSpacing : 0, cellPadding : 0});
816
- etb = DOM.add(n, 'tbody');
817
-
818
- if (p.firstChild.className == 'mceOldBoxModel')
819
- p.firstChild.appendChild(c);
820
- else
821
- p.insertBefore(c, p.firstChild);
822
-
823
- t._addToolbars(etb, o);
824
-
825
- ed.onMouseUp.add(function() {
826
- var e = DOM.get(ed.id + '_external');
827
- DOM.show(e);
828
-
829
- DOM.hide(lastExtID);
830
-
831
- var f = Event.add(ed.id + '_external_close', 'click', function() {
832
- DOM.hide(ed.id + '_external');
833
- Event.remove(ed.id + '_external_close', 'click', f);
834
- });
835
-
836
- DOM.show(e);
837
- DOM.setStyle(e, 'top', 0 - DOM.getRect(ed.id + '_tblext').h - 1);
838
-
839
- // Fixes IE rendering bug
840
- DOM.hide(e);
841
- DOM.show(e);
842
- e.style.filter = '';
843
-
844
- lastExtID = ed.id + '_external';
845
-
846
- e = null;
847
- });
848
- }
849
-
850
- if (sl == 'top')
851
- t._addStatusBar(tb, o);
852
-
853
- // Create iframe container
854
- if (!s.theme_advanced_toolbar_container) {
855
- n = DOM.add(tb, 'tr');
856
- n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});
857
- }
858
-
859
- // Create toolbar container at bottom
860
- if (lo == 'bottom')
861
- t._addToolbars(tb, o);
862
-
863
- if (sl == 'bottom')
864
- t._addStatusBar(tb, o);
865
-
866
- return ic;
867
- },
868
-
869
- _rowLayout : function(s, tb, o) {
870
- var t = this, ed = t.editor, dc, da, cf = ed.controlManager, n, ic, to, a;
871
-
872
- dc = s.theme_advanced_containers_default_class || '';
873
- da = s.theme_advanced_containers_default_align || 'center';
874
-
875
- each(explode(s.theme_advanced_containers || ''), function(c, i) {
876
- var v = s['theme_advanced_container_' + c] || '';
877
-
878
- switch (c.toLowerCase()) {
879
- case 'mceeditor':
880
- n = DOM.add(tb, 'tr');
881
- n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});
882
- break;
883
-
884
- case 'mceelementpath':
885
- t._addStatusBar(tb, o);
886
- break;
887
-
888
- default:
889
- a = (s['theme_advanced_container_' + c + '_align'] || da).toLowerCase();
890
- a = 'mce' + t._ufirst(a);
891
-
892
- n = DOM.add(DOM.add(tb, 'tr'), 'td', {
893
- 'class' : 'mceToolbar ' + (s['theme_advanced_container_' + c + '_class'] || dc) + ' ' + a || da
894
- });
895
-
896
- to = cf.createToolbar("toolbar" + i);
897
- t._addControls(v, to);
898
- DOM.setHTML(n, to.renderHTML());
899
- o.deltaHeight -= s.theme_advanced_row_height;
900
- }
901
- });
902
-
903
- return ic;
904
- },
905
-
906
- _addControls : function(v, tb) {
907
- var t = this, s = t.settings, di, cf = t.editor.controlManager;
908
-
909
- if (s.theme_advanced_disable && !t._disabled) {
910
- di = {};
911
-
912
- each(explode(s.theme_advanced_disable), function(v) {
913
- di[v] = 1;
914
- });
915
-
916
- t._disabled = di;
917
- } else
918
- di = t._disabled;
919
-
920
- each(explode(v), function(n) {
921
- var c;
922
-
923
- if (di && di[n])
924
- return;
925
-
926
- // Compatiblity with 2.x
927
- if (n == 'tablecontrols') {
928
- each(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"], function(n) {
929
- n = t.createControl(n, cf);
930
-
931
- if (n)
932
- tb.add(n);
933
- });
934
-
935
- return;
936
- }
937
-
938
- c = t.createControl(n, cf);
939
-
940
- if (c)
941
- tb.add(c);
942
- });
943
- },
944
-
945
- _addToolbars : function(c, o) {
946
- var t = this, i, tb, ed = t.editor, s = t.settings, v, cf = ed.controlManager, di, n, h = [], a, toolbarGroup, toolbarsExist = false;
947
-
948
- toolbarGroup = cf.createToolbarGroup('toolbargroup', {
949
- 'name': ed.getLang('advanced.toolbar'),
950
- 'tab_focus_toolbar':ed.getParam('theme_advanced_tab_focus_toolbar')
951
- });
952
-
953
- t.toolbarGroup = toolbarGroup;
954
-
955
- a = s.theme_advanced_toolbar_align.toLowerCase();
956
- a = 'mce' + t._ufirst(a);
957
-
958
- n = DOM.add(DOM.add(c, 'tr', {role: 'presentation'}), 'td', {'class' : 'mceToolbar ' + a, "role":"presentation"});
959
-
960
- // Create toolbar and add the controls
961
- for (i=1; (v = s['theme_advanced_buttons' + i]); i++) {
962
- toolbarsExist = true;
963
- tb = cf.createToolbar("toolbar" + i, {'class' : 'mceToolbarRow' + i});
964
-
965
- if (s['theme_advanced_buttons' + i + '_add'])
966
- v += ',' + s['theme_advanced_buttons' + i + '_add'];
967
-
968
- if (s['theme_advanced_buttons' + i + '_add_before'])
969
- v = s['theme_advanced_buttons' + i + '_add_before'] + ',' + v;
970
-
971
- t._addControls(v, tb);
972
- toolbarGroup.add(tb);
973
-
974
- o.deltaHeight -= s.theme_advanced_row_height;
975
- }
976
- // Handle case when there are no toolbar buttons and ensure editor height is adjusted accordingly
977
- if (!toolbarsExist)
978
- o.deltaHeight -= s.theme_advanced_row_height;
979
- h.push(toolbarGroup.renderHTML());
980
- h.push(DOM.createHTML('a', {href : '#', accesskey : 'z', title : ed.getLang("advanced.toolbar_focus"), onfocus : 'tinyMCE.getInstanceById(\'' + ed.id + '\').focus();'}, '<!-- IE -->'));
981
- DOM.setHTML(n, h.join(''));
982
- },
983
-
984
- _addStatusBar : function(tb, o) {
985
- var n, t = this, ed = t.editor, s = t.settings, r, mf, me, td;
986
-
987
- n = DOM.add(tb, 'tr');
988
- n = td = DOM.add(n, 'td', {'class' : 'mceStatusbar'});
989
- n = DOM.add(n, 'div', {id : ed.id + '_path_row', 'role': 'group', 'aria-labelledby': ed.id + '_path_voice'});
990
- if (s.theme_advanced_path) {
991
- DOM.add(n, 'span', {id: ed.id + '_path_voice'}, ed.translate('advanced.path'));
992
- DOM.add(n, 'span', {}, ': ');
993
- } else {
994
- DOM.add(n, 'span', {}, '&#160;');
995
- }
996
-
997
-
998
- if (s.theme_advanced_resizing) {
999
- DOM.add(td, 'a', {id : ed.id + '_resize', href : 'javascript:;', onclick : "return false;", 'class' : 'mceResize', tabIndex:"-1"});
1000
-
1001
- if (s.theme_advanced_resizing_use_cookie) {
1002
- ed.onPostRender.add(function() {
1003
- var o = Cookie.getHash("TinyMCE_" + ed.id + "_size"), c = DOM.get(ed.id + '_tbl');
1004
-
1005
- if (!o)
1006
- return;
1007
-
1008
- t.resizeTo(o.cw, o.ch);
1009
- });
1010
- }
1011
-
1012
- ed.onPostRender.add(function() {
1013
- Event.add(ed.id + '_resize', 'click', function(e) {
1014
- e.preventDefault();
1015
- });
1016
-
1017
- Event.add(ed.id + '_resize', 'mousedown', function(e) {
1018
- var mouseMoveHandler1, mouseMoveHandler2,
1019
- mouseUpHandler1, mouseUpHandler2,
1020
- startX, startY, startWidth, startHeight, width, height, ifrElm;
1021
-
1022
- function resizeOnMove(e) {
1023
- e.preventDefault();
1024
-
1025
- width = startWidth + (e.screenX - startX);
1026
- height = startHeight + (e.screenY - startY);
1027
-
1028
- t.resizeTo(width, height);
1029
- };
1030
-
1031
- function endResize(e) {
1032
- // Stop listening
1033
- Event.remove(DOM.doc, 'mousemove', mouseMoveHandler1);
1034
- Event.remove(ed.getDoc(), 'mousemove', mouseMoveHandler2);
1035
- Event.remove(DOM.doc, 'mouseup', mouseUpHandler1);
1036
- Event.remove(ed.getDoc(), 'mouseup', mouseUpHandler2);
1037
-
1038
- width = startWidth + (e.screenX - startX);
1039
- height = startHeight + (e.screenY - startY);
1040
- t.resizeTo(width, height, true);
1041
- };
1042
-
1043
- e.preventDefault();
1044
-
1045
- // Get the current rect size
1046
- startX = e.screenX;
1047
- startY = e.screenY;
1048
- ifrElm = DOM.get(t.editor.id + '_ifr');
1049
- startWidth = width = ifrElm.clientWidth;
1050
- startHeight = height = ifrElm.clientHeight;
1051
-
1052
- // Register envent handlers
1053
- mouseMoveHandler1 = Event.add(DOM.doc, 'mousemove', resizeOnMove);
1054
- mouseMoveHandler2 = Event.add(ed.getDoc(), 'mousemove', resizeOnMove);
1055
- mouseUpHandler1 = Event.add(DOM.doc, 'mouseup', endResize);
1056
- mouseUpHandler2 = Event.add(ed.getDoc(), 'mouseup', endResize);
1057
- });
1058
- });
1059
- }
1060
-
1061
- o.deltaHeight -= 21;
1062
- n = tb = null;
1063
- },
1064
-
1065
- _updateUndoStatus : function(ed) {
1066
- var cm = ed.controlManager, um = ed.undoManager;
1067
-
1068
- cm.setDisabled('undo', !um.hasUndo() && !um.typing);
1069
- cm.setDisabled('redo', !um.hasRedo());
1070
- },
1071
-
1072
- _nodeChanged : function(ed, cm, n, co, ob) {
1073
- var t = this, p, de = 0, v, c, s = t.settings, cl, fz, fn, fc, bc, formatNames, matches;
1074
-
1075
- tinymce.each(t.stateControls, function(c) {
1076
- cm.setActive(c, ed.queryCommandState(t.controls[c][1]));
1077
- });
1078
-
1079
- function getParent(name) {
1080
- var i, parents = ob.parents, func = name;
1081
-
1082
- if (typeof(name) == 'string') {
1083
- func = function(node) {
1084
- return node.nodeName == name;
1085
- };
1086
- }
1087
-
1088
- for (i = 0; i < parents.length; i++) {
1089
- if (func(parents[i]))
1090
- return parents[i];
1091
- }
1092
- };
1093
-
1094
- cm.setActive('visualaid', ed.hasVisual);
1095
- t._updateUndoStatus(ed);
1096
- cm.setDisabled('outdent', !ed.queryCommandState('Outdent'));
1097
-
1098
- p = getParent('A');
1099
- if (c = cm.get('link')) {
1100
- c.setDisabled((!p && co) || (p && !p.href));
1101
- c.setActive(!!p && (!p.name && !p.id));
1102
- }
1103
-
1104
- if (c = cm.get('unlink')) {
1105
- c.setDisabled(!p && co);
1106
- c.setActive(!!p && !p.name && !p.id);
1107
- }
1108
-
1109
- if (c = cm.get('anchor')) {
1110
- c.setActive(!co && !!p && (p.name || (p.id && !p.href)));
1111
- }
1112
-
1113
- p = getParent('IMG');
1114
- if (c = cm.get('image'))
1115
- c.setActive(!co && !!p && n.className.indexOf('mceItem') == -1);
1116
-
1117
- if (c = cm.get('styleselect')) {
1118
- t._importClasses();
1119
-
1120
- formatNames = [];
1121
- each(c.items, function(item) {
1122
- formatNames.push(item.value);
1123
- });
1124
-
1125
- matches = ed.formatter.matchAll(formatNames);
1126
- c.select(matches[0]);
1127
- tinymce.each(matches, function(match, index) {
1128
- if (index > 0) {
1129
- c.mark(match);
1130
- }
1131
- });
1132
- }
1133
-
1134
- if (c = cm.get('formatselect')) {
1135
- p = getParent(ed.dom.isBlock);
1136
-
1137
- if (p)
1138
- c.select(p.nodeName.toLowerCase());
1139
- }
1140
-
1141
- // Find out current fontSize, fontFamily and fontClass
1142
- getParent(function(n) {
1143
- if (n.nodeName === 'SPAN') {
1144
- if (!cl && n.className)
1145
- cl = n.className;
1146
- }
1147
-
1148
- if (ed.dom.is(n, s.theme_advanced_font_selector)) {
1149
- if (!fz && n.style.fontSize)
1150
- fz = n.style.fontSize;
1151
-
1152
- if (!fn && n.style.fontFamily)
1153
- fn = n.style.fontFamily.replace(/[\"\']+/g, '').replace(/^([^,]+).*/, '$1').toLowerCase();
1154
-
1155
- if (!fc && n.style.color)
1156
- fc = n.style.color;
1157
-
1158
- if (!bc && n.style.backgroundColor)
1159
- bc = n.style.backgroundColor;
1160
- }
1161
-
1162
- return false;
1163
- });
1164
-
1165
- if (c = cm.get('fontselect')) {
1166
- c.select(function(v) {
1167
- return v.replace(/^([^,]+).*/, '$1').toLowerCase() == fn;
1168
- });
1169
- }
1170
-
1171
- // Select font size
1172
- if (c = cm.get('fontsizeselect')) {
1173
- // Use computed style
1174
- if (s.theme_advanced_runtime_fontsize && !fz && !cl)
1175
- fz = ed.dom.getStyle(n, 'fontSize', true);
1176
-
1177
- c.select(function(v) {
1178
- if (v.fontSize && v.fontSize === fz)
1179
- return true;
1180
-
1181
- if (v['class'] && v['class'] === cl)
1182
- return true;
1183
- });
1184
- }
1185
-
1186
- if (s.theme_advanced_show_current_color) {
1187
- function updateColor(controlId, color) {
1188
- if (c = cm.get(controlId)) {
1189
- if (!color)
1190
- color = c.settings.default_color;
1191
- if (color !== c.value) {
1192
- c.displayColor(color);
1193
- }
1194
- }
1195
- }
1196
- updateColor('forecolor', fc);
1197
- updateColor('backcolor', bc);
1198
- }
1199
-
1200
- if (s.theme_advanced_show_current_color) {
1201
- function updateColor(controlId, color) {
1202
- if (c = cm.get(controlId)) {
1203
- if (!color)
1204
- color = c.settings.default_color;
1205
- if (color !== c.value) {
1206
- c.displayColor(color);
1207
- }
1208
- }
1209
- };
1210
-
1211
- updateColor('forecolor', fc);
1212
- updateColor('backcolor', bc);
1213
- }
1214
-
1215
- if (s.theme_advanced_path && s.theme_advanced_statusbar_location) {
1216
- p = DOM.get(ed.id + '_path') || DOM.add(ed.id + '_path_row', 'span', {id : ed.id + '_path'});
1217
-
1218
- if (t.statusKeyboardNavigation) {
1219
- t.statusKeyboardNavigation.destroy();
1220
- t.statusKeyboardNavigation = null;
1221
- }
1222
-
1223
- DOM.setHTML(p, '');
1224
-
1225
- getParent(function(n) {
1226
- var na = n.nodeName.toLowerCase(), u, pi, ti = '';
1227
-
1228
- // Ignore non element and bogus/hidden elements
1229
- if (n.nodeType != 1 || na === 'br' || n.getAttribute('data-mce-bogus') || DOM.hasClass(n, 'mceItemHidden') || DOM.hasClass(n, 'mceItemRemoved'))
1230
- return;
1231
-
1232
- // Handle prefix
1233
- if (tinymce.isIE && n.scopeName !== 'HTML' && n.scopeName)
1234
- na = n.scopeName + ':' + na;
1235
-
1236
- // Remove internal prefix
1237
- na = na.replace(/mce\:/g, '');
1238
-
1239
- // Handle node name
1240
- switch (na) {
1241
- case 'b':
1242
- na = 'strong';
1243
- break;
1244
-
1245
- case 'i':
1246
- na = 'em';
1247
- break;
1248
-
1249
- case 'img':
1250
- if (v = DOM.getAttrib(n, 'src'))
1251
- ti += 'src: ' + v + ' ';
1252
-
1253
- break;
1254
-
1255
- case 'a':
1256
- if (v = DOM.getAttrib(n, 'name')) {
1257
- ti += 'name: ' + v + ' ';
1258
- na += '#' + v;
1259
- }
1260
-
1261
- if (v = DOM.getAttrib(n, 'href'))
1262
- ti += 'href: ' + v + ' ';
1263
-
1264
- break;
1265
-
1266
- case 'font':
1267
- if (v = DOM.getAttrib(n, 'face'))
1268
- ti += 'font: ' + v + ' ';
1269
-
1270
- if (v = DOM.getAttrib(n, 'size'))
1271
- ti += 'size: ' + v + ' ';
1272
-
1273
- if (v = DOM.getAttrib(n, 'color'))
1274
- ti += 'color: ' + v + ' ';
1275
-
1276
- break;
1277
-
1278
- case 'span':
1279
- if (v = DOM.getAttrib(n, 'style'))
1280
- ti += 'style: ' + v + ' ';
1281
-
1282
- break;
1283
- }
1284
-
1285
- if (v = DOM.getAttrib(n, 'id'))
1286
- ti += 'id: ' + v + ' ';
1287
-
1288
- if (v = n.className) {
1289
- v = v.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g, '')
1290
-
1291
- if (v) {
1292
- ti += 'class: ' + v + ' ';
1293
-
1294
- if (ed.dom.isBlock(n) || na == 'img' || na == 'span')
1295
- na += '.' + v;
1296
- }
1297
- }
1298
-
1299
- na = na.replace(/(html:)/g, '');
1300
- na = {name : na, node : n, title : ti};
1301
- t.onResolveName.dispatch(t, na);
1302
- ti = na.title;
1303
- na = na.name;
1304
-
1305
- //u = "javascript:tinymce.EditorManager.get('" + ed.id + "').theme._sel('" + (de++) + "');";
1306
- pi = DOM.create('a', {'href' : "javascript:;", role: 'button', onmousedown : "return false;", title : ti, 'class' : 'mcePath_' + (de++)}, na);
1307
-
1308
- if (p.hasChildNodes()) {
1309
- p.insertBefore(DOM.create('span', {'aria-hidden': 'true'}, '\u00a0\u00bb '), p.firstChild);
1310
- p.insertBefore(pi, p.firstChild);
1311
- } else
1312
- p.appendChild(pi);
1313
- }, ed.getBody());
1314
-
1315
- if (DOM.select('a', p).length > 0) {
1316
- t.statusKeyboardNavigation = new tinymce.ui.KeyboardNavigation({
1317
- root: ed.id + "_path_row",
1318
- items: DOM.select('a', p),
1319
- excludeFromTabOrder: true,
1320
- onCancel: function() {
1321
- ed.focus();
1322
- }
1323
- }, DOM);
1324
- }
1325
- }
1326
- },
1327
-
1328
- // Commands gets called by execCommand
1329
-
1330
- _sel : function(v) {
1331
- this.editor.execCommand('mceSelectNodeDepth', false, v);
1332
- },
1333
-
1334
- _mceInsertAnchor : function(ui, v) {
1335
- var ed = this.editor;
1336
-
1337
- ed.windowManager.open({
1338
- url : this.url + '/anchor.htm',
1339
- width : 320 + parseInt(ed.getLang('advanced.anchor_delta_width', 0)),
1340
- height : 90 + parseInt(ed.getLang('advanced.anchor_delta_height', 0)),
1341
- inline : true
1342
- }, {
1343
- theme_url : this.url
1344
- });
1345
- },
1346
-
1347
- _mceCharMap : function() {
1348
- var ed = this.editor;
1349
-
1350
- ed.windowManager.open({
1351
- url : this.url + '/charmap.htm',
1352
- width : 550 + parseInt(ed.getLang('advanced.charmap_delta_width', 0)),
1353
- height : 265 + parseInt(ed.getLang('advanced.charmap_delta_height', 0)),
1354
- inline : true
1355
- }, {
1356
- theme_url : this.url
1357
- });
1358
- },
1359
-
1360
- _mceHelp : function() {
1361
- var ed = this.editor;
1362
-
1363
- ed.windowManager.open({
1364
- url : this.url + '/about.htm',
1365
- width : 480,
1366
- height : 380,
1367
- inline : true
1368
- }, {
1369
- theme_url : this.url
1370
- });
1371
- },
1372
-
1373
- _mceShortcuts : function() {
1374
- var ed = this.editor;
1375
- ed.windowManager.open({
1376
- url: this.url + '/shortcuts.htm',
1377
- width: 480,
1378
- height: 380,
1379
- inline: true
1380
- }, {
1381
- theme_url: this.url
1382
- });
1383
- },
1384
-
1385
- _mceColorPicker : function(u, v) {
1386
- var ed = this.editor;
1387
-
1388
- v = v || {};
1389
-
1390
- ed.windowManager.open({
1391
- url : this.url + '/color_picker.htm',
1392
- width : 375 + parseInt(ed.getLang('advanced.colorpicker_delta_width', 0)),
1393
- height : 250 + parseInt(ed.getLang('advanced.colorpicker_delta_height', 0)),
1394
- close_previous : false,
1395
- inline : true
1396
- }, {
1397
- input_color : v.color,
1398
- func : v.func,
1399
- theme_url : this.url
1400
- });
1401
- },
1402
-
1403
- _mceCodeEditor : function(ui, val) {
1404
- var ed = this.editor;
1405
-
1406
- ed.windowManager.open({
1407
- url : this.url + '/source_editor.htm',
1408
- width : parseInt(ed.getParam("theme_advanced_source_editor_width", 720)),
1409
- height : parseInt(ed.getParam("theme_advanced_source_editor_height", 580)),
1410
- inline : true,
1411
- resizable : true,
1412
- maximizable : true
1413
- }, {
1414
- theme_url : this.url
1415
- });
1416
- },
1417
-
1418
- _mceImage : function(ui, val) {
1419
- var ed = this.editor;
1420
-
1421
- // Internal image object like a flash placeholder
1422
- if (ed.dom.getAttrib(ed.selection.getNode(), 'class', '').indexOf('mceItem') != -1)
1423
- return;
1424
-
1425
- ed.windowManager.open({
1426
- url : this.url + '/image.htm',
1427
- width : 355 + parseInt(ed.getLang('advanced.image_delta_width', 0)),
1428
- height : 275 + parseInt(ed.getLang('advanced.image_delta_height', 0)),
1429
- inline : true
1430
- }, {
1431
- theme_url : this.url
1432
- });
1433
- },
1434
-
1435
- _mceLink : function(ui, val) {
1436
- var ed = this.editor;
1437
-
1438
- ed.windowManager.open({
1439
- url : this.url + '/link.htm',
1440
- width : 310 + parseInt(ed.getLang('advanced.link_delta_width', 0)),
1441
- height : 200 + parseInt(ed.getLang('advanced.link_delta_height', 0)),
1442
- inline : true
1443
- }, {
1444
- theme_url : this.url
1445
- });
1446
- },
1447
-
1448
- _mceNewDocument : function() {
1449
- var ed = this.editor;
1450
-
1451
- ed.windowManager.confirm('advanced.newdocument', function(s) {
1452
- if (s)
1453
- ed.execCommand('mceSetContent', false, '');
1454
- });
1455
- },
1456
-
1457
- _mceForeColor : function() {
1458
- var t = this;
1459
-
1460
- this._mceColorPicker(0, {
1461
- color: t.fgColor,
1462
- func : function(co) {
1463
- t.fgColor = co;
1464
- t.editor.execCommand('ForeColor', false, co);
1465
- }
1466
- });
1467
- },
1468
-
1469
- _mceBackColor : function() {
1470
- var t = this;
1471
-
1472
- this._mceColorPicker(0, {
1473
- color: t.bgColor,
1474
- func : function(co) {
1475
- t.bgColor = co;
1476
- t.editor.execCommand('HiliteColor', false, co);
1477
- }
1478
- });
1479
- },
1480
-
1481
- _ufirst : function(s) {
1482
- return s.substring(0, 1).toUpperCase() + s.substring(1);
1483
- }
1484
- });
1485
-
1486
- tinymce.ThemeManager.add('advanced', tinymce.themes.AdvancedTheme);
1487
- }(tinymce));
1
+ /**
2
+ * editor_template_src.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(tinymce) {
12
+ var DOM = tinymce.DOM, Event = tinymce.dom.Event, extend = tinymce.extend, each = tinymce.each, Cookie = tinymce.util.Cookie, lastExtID, explode = tinymce.explode;
13
+
14
+ // Generates a preview for a format
15
+ function getPreviewCss(ed, fmt) {
16
+ var previewElm, dom = ed.dom, previewCss = '', parentFontSize, previewStylesName;
17
+
18
+ previewStyles = ed.settings.preview_styles;
19
+
20
+ // No preview forced
21
+ if (previewStyles === false)
22
+ return '';
23
+
24
+ // Default preview
25
+ if (!previewStyles)
26
+ previewStyles = 'font-family font-size font-weight text-decoration text-transform color background-color';
27
+
28
+ // Removes any variables since these can't be previewed
29
+ function removeVars(val) {
30
+ return val.replace(/%(\w+)/g, '');
31
+ };
32
+
33
+ // Create block/inline element to use for preview
34
+ name = fmt.block || fmt.inline || 'span';
35
+ previewElm = dom.create(name);
36
+
37
+ // Add format styles to preview element
38
+ each(fmt.styles, function(value, name) {
39
+ value = removeVars(value);
40
+
41
+ if (value)
42
+ dom.setStyle(previewElm, name, value);
43
+ });
44
+
45
+ // Add attributes to preview element
46
+ each(fmt.attributes, function(value, name) {
47
+ value = removeVars(value);
48
+
49
+ if (value)
50
+ dom.setAttrib(previewElm, name, value);
51
+ });
52
+
53
+ // Add classes to preview element
54
+ each(fmt.classes, function(value) {
55
+ value = removeVars(value);
56
+
57
+ if (!dom.hasClass(previewElm, value))
58
+ dom.addClass(previewElm, value);
59
+ });
60
+
61
+ // Add the previewElm outside the visual area
62
+ dom.setStyles(previewElm, {position: 'absolute', left: -0xFFFF});
63
+ ed.getBody().appendChild(previewElm);
64
+
65
+ // Get parent container font size so we can compute px values out of em/% for older IE:s
66
+ parentFontSize = dom.getStyle(ed.getBody(), 'fontSize', true);
67
+ parentFontSize = /px$/.test(parentFontSize) ? parseInt(parentFontSize, 10) : 0;
68
+
69
+ each(previewStyles.split(' '), function(name) {
70
+ var value = dom.getStyle(previewElm, name, true);
71
+
72
+ // If background is transparent then check if the body has a background color we can use
73
+ if (name == 'background-color' && /transparent|rgba\s*\([^)]+,\s*0\)/.test(value)) {
74
+ value = dom.getStyle(ed.getBody(), name, true);
75
+
76
+ // Ignore white since it's the default color, not the nicest fix
77
+ if (dom.toHex(value).toLowerCase() == '#ffffff') {
78
+ return;
79
+ }
80
+ }
81
+
82
+ // Old IE won't calculate the font size so we need to do that manually
83
+ if (name == 'font-size') {
84
+ if (/em|%$/.test(value)) {
85
+ if (parentFontSize === 0) {
86
+ return;
87
+ }
88
+
89
+ // Convert font size from em/% to px
90
+ value = parseFloat(value, 10) / (/%$/.test(value) ? 100 : 1);
91
+ value = (value * parentFontSize) + 'px';
92
+ }
93
+ }
94
+
95
+ previewCss += name + ':' + value + ';';
96
+ });
97
+
98
+ dom.remove(previewElm);
99
+
100
+ return previewCss;
101
+ };
102
+
103
+ // Tell it to load theme specific language pack(s)
104
+ tinymce.ThemeManager.requireLangPack('advanced');
105
+
106
+ tinymce.create('tinymce.themes.AdvancedTheme', {
107
+ sizes : [8, 10, 12, 14, 18, 24, 36],
108
+
109
+ // Control name lookup, format: title, command
110
+ controls : {
111
+ bold : ['bold_desc', 'Bold'],
112
+ italic : ['italic_desc', 'Italic'],
113
+ underline : ['underline_desc', 'Underline'],
114
+ strikethrough : ['striketrough_desc', 'Strikethrough'],
115
+ justifyleft : ['justifyleft_desc', 'JustifyLeft'],
116
+ justifycenter : ['justifycenter_desc', 'JustifyCenter'],
117
+ justifyright : ['justifyright_desc', 'JustifyRight'],
118
+ justifyfull : ['justifyfull_desc', 'JustifyFull'],
119
+ bullist : ['bullist_desc', 'InsertUnorderedList'],
120
+ numlist : ['numlist_desc', 'InsertOrderedList'],
121
+ outdent : ['outdent_desc', 'Outdent'],
122
+ indent : ['indent_desc', 'Indent'],
123
+ cut : ['cut_desc', 'Cut'],
124
+ copy : ['copy_desc', 'Copy'],
125
+ paste : ['paste_desc', 'Paste'],
126
+ undo : ['undo_desc', 'Undo'],
127
+ redo : ['redo_desc', 'Redo'],
128
+ link : ['link_desc', 'mceLink'],
129
+ unlink : ['unlink_desc', 'unlink'],
130
+ image : ['image_desc', 'mceImage'],
131
+ cleanup : ['cleanup_desc', 'mceCleanup'],
132
+ help : ['help_desc', 'mceHelp'],
133
+ code : ['code_desc', 'mceCodeEditor'],
134
+ hr : ['hr_desc', 'InsertHorizontalRule'],
135
+ removeformat : ['removeformat_desc', 'RemoveFormat'],
136
+ sub : ['sub_desc', 'subscript'],
137
+ sup : ['sup_desc', 'superscript'],
138
+ forecolor : ['forecolor_desc', 'ForeColor'],
139
+ forecolorpicker : ['forecolor_desc', 'mceForeColor'],
140
+ backcolor : ['backcolor_desc', 'HiliteColor'],
141
+ backcolorpicker : ['backcolor_desc', 'mceBackColor'],
142
+ charmap : ['charmap_desc', 'mceCharMap'],
143
+ visualaid : ['visualaid_desc', 'mceToggleVisualAid'],
144
+ anchor : ['anchor_desc', 'mceInsertAnchor'],
145
+ newdocument : ['newdocument_desc', 'mceNewDocument'],
146
+ blockquote : ['blockquote_desc', 'mceBlockQuote']
147
+ },
148
+
149
+ stateControls : ['bold', 'italic', 'underline', 'strikethrough', 'bullist', 'numlist', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'sub', 'sup', 'blockquote'],
150
+
151
+ init : function(ed, url) {
152
+ var t = this, s, v, o;
153
+
154
+ t.editor = ed;
155
+ t.url = url;
156
+ t.onResolveName = new tinymce.util.Dispatcher(this);
157
+ s = ed.settings;
158
+
159
+ ed.forcedHighContrastMode = ed.settings.detect_highcontrast && t._isHighContrast();
160
+ ed.settings.skin = ed.forcedHighContrastMode ? 'highcontrast' : ed.settings.skin;
161
+
162
+ // Setup default buttons
163
+ if (!s.theme_advanced_buttons1) {
164
+ s = extend({
165
+ theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",
166
+ theme_advanced_buttons2 : "bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",
167
+ theme_advanced_buttons3 : "hr,removeformat,visualaid,|,sub,sup,|,charmap"
168
+ }, s);
169
+ }
170
+
171
+ // Default settings
172
+ t.settings = s = extend({
173
+ theme_advanced_path : true,
174
+ theme_advanced_toolbar_location : 'top',
175
+ theme_advanced_blockformats : "p,address,pre,h1,h2,h3,h4,h5,h6",
176
+ theme_advanced_toolbar_align : "left",
177
+ theme_advanced_statusbar_location : "bottom",
178
+ theme_advanced_fonts : "Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",
179
+ theme_advanced_more_colors : 1,
180
+ theme_advanced_row_height : 23,
181
+ theme_advanced_resize_horizontal : 1,
182
+ theme_advanced_resizing_use_cookie : 1,
183
+ theme_advanced_font_sizes : "1,2,3,4,5,6,7",
184
+ theme_advanced_font_selector : "span",
185
+ theme_advanced_show_current_color: 0,
186
+ readonly : ed.settings.readonly
187
+ }, s);
188
+
189
+ // Setup default font_size_style_values
190
+ if (!s.font_size_style_values)
191
+ s.font_size_style_values = "8pt,10pt,12pt,14pt,18pt,24pt,36pt";
192
+
193
+ if (tinymce.is(s.theme_advanced_font_sizes, 'string')) {
194
+ s.font_size_style_values = tinymce.explode(s.font_size_style_values);
195
+ s.font_size_classes = tinymce.explode(s.font_size_classes || '');
196
+
197
+ // Parse string value
198
+ o = {};
199
+ ed.settings.theme_advanced_font_sizes = s.theme_advanced_font_sizes;
200
+ each(ed.getParam('theme_advanced_font_sizes', '', 'hash'), function(v, k) {
201
+ var cl;
202
+
203
+ if (k == v && v >= 1 && v <= 7) {
204
+ k = v + ' (' + t.sizes[v - 1] + 'pt)';
205
+ cl = s.font_size_classes[v - 1];
206
+ v = s.font_size_style_values[v - 1] || (t.sizes[v - 1] + 'pt');
207
+ }
208
+
209
+ if (/^\s*\./.test(v))
210
+ cl = v.replace(/\./g, '');
211
+
212
+ o[k] = cl ? {'class' : cl} : {fontSize : v};
213
+ });
214
+
215
+ s.theme_advanced_font_sizes = o;
216
+ }
217
+
218
+ if ((v = s.theme_advanced_path_location) && v != 'none')
219
+ s.theme_advanced_statusbar_location = s.theme_advanced_path_location;
220
+
221
+ if (s.theme_advanced_statusbar_location == 'none')
222
+ s.theme_advanced_statusbar_location = 0;
223
+
224
+ if (ed.settings.content_css !== false)
225
+ ed.contentCSS.push(ed.baseURI.toAbsolute(url + "/skins/" + ed.settings.skin + "/content.css"));
226
+
227
+ // Init editor
228
+ ed.onInit.add(function() {
229
+ if (!ed.settings.readonly) {
230
+ ed.onNodeChange.add(t._nodeChanged, t);
231
+ ed.onKeyUp.add(t._updateUndoStatus, t);
232
+ ed.onMouseUp.add(t._updateUndoStatus, t);
233
+ ed.dom.bind(ed.dom.getRoot(), 'dragend', function() {
234
+ t._updateUndoStatus(ed);
235
+ });
236
+ }
237
+ });
238
+
239
+ ed.onSetProgressState.add(function(ed, b, ti) {
240
+ var co, id = ed.id, tb;
241
+
242
+ if (b) {
243
+ t.progressTimer = setTimeout(function() {
244
+ co = ed.getContainer();
245
+ co = co.insertBefore(DOM.create('DIV', {style : 'position:relative'}), co.firstChild);
246
+ tb = DOM.get(ed.id + '_tbl');
247
+
248
+ DOM.add(co, 'div', {id : id + '_blocker', 'class' : 'mceBlocker', style : {width : tb.clientWidth + 2, height : tb.clientHeight + 2}});
249
+ DOM.add(co, 'div', {id : id + '_progress', 'class' : 'mceProgress', style : {left : tb.clientWidth / 2, top : tb.clientHeight / 2}});
250
+ }, ti || 0);
251
+ } else {
252
+ DOM.remove(id + '_blocker');
253
+ DOM.remove(id + '_progress');
254
+ clearTimeout(t.progressTimer);
255
+ }
256
+ });
257
+
258
+ DOM.loadCSS(s.editor_css ? ed.documentBaseURI.toAbsolute(s.editor_css) : url + "/skins/" + ed.settings.skin + "/ui.css");
259
+
260
+ if (s.skin_variant)
261
+ DOM.loadCSS(url + "/skins/" + ed.settings.skin + "/ui_" + s.skin_variant + ".css");
262
+ },
263
+
264
+ _isHighContrast : function() {
265
+ var actualColor, div = DOM.add(DOM.getRoot(), 'div', {'style': 'background-color: rgb(171,239,86);'});
266
+
267
+ actualColor = (DOM.getStyle(div, 'background-color', true) + '').toLowerCase().replace(/ /g, '');
268
+ DOM.remove(div);
269
+
270
+ return actualColor != 'rgb(171,239,86)' && actualColor != '#abef56';
271
+ },
272
+
273
+ createControl : function(n, cf) {
274
+ var cd, c;
275
+
276
+ if (c = cf.createControl(n))
277
+ return c;
278
+
279
+ switch (n) {
280
+ case "styleselect":
281
+ return this._createStyleSelect();
282
+
283
+ case "formatselect":
284
+ return this._createBlockFormats();
285
+
286
+ case "fontselect":
287
+ return this._createFontSelect();
288
+
289
+ case "fontsizeselect":
290
+ return this._createFontSizeSelect();
291
+
292
+ case "forecolor":
293
+ return this._createForeColorMenu();
294
+
295
+ case "backcolor":
296
+ return this._createBackColorMenu();
297
+ }
298
+
299
+ if ((cd = this.controls[n]))
300
+ return cf.createButton(n, {title : "advanced." + cd[0], cmd : cd[1], ui : cd[2], value : cd[3]});
301
+ },
302
+
303
+ execCommand : function(cmd, ui, val) {
304
+ var f = this['_' + cmd];
305
+
306
+ if (f) {
307
+ f.call(this, ui, val);
308
+ return true;
309
+ }
310
+
311
+ return false;
312
+ },
313
+
314
+ _importClasses : function(e) {
315
+ var ed = this.editor, ctrl = ed.controlManager.get('styleselect');
316
+
317
+ if (ctrl.getLength() == 0) {
318
+ each(ed.dom.getClasses(), function(o, idx) {
319
+ var name = 'style_' + idx, fmt;
320
+
321
+ fmt = {
322
+ inline : 'span',
323
+ attributes : {'class' : o['class']},
324
+ selector : '*'
325
+ };
326
+
327
+ ed.formatter.register(name, fmt);
328
+
329
+ ctrl.add(o['class'], name, {
330
+ style: function() {
331
+ return getPreviewCss(ed, fmt);
332
+ }
333
+ });
334
+ });
335
+ }
336
+ },
337
+
338
+ _createStyleSelect : function(n) {
339
+ var t = this, ed = t.editor, ctrlMan = ed.controlManager, ctrl;
340
+
341
+ // Setup style select box
342
+ ctrl = ctrlMan.createListBox('styleselect', {
343
+ title : 'advanced.style_select',
344
+ onselect : function(name) {
345
+ var matches, formatNames = [], removedFormat;
346
+
347
+ each(ctrl.items, function(item) {
348
+ formatNames.push(item.value);
349
+ });
350
+
351
+ ed.focus();
352
+ ed.undoManager.add();
353
+
354
+ // Toggle off the current format(s)
355
+ matches = ed.formatter.matchAll(formatNames);
356
+ tinymce.each(matches, function(match) {
357
+ if (!name || match == name) {
358
+ if (match)
359
+ ed.formatter.remove(match);
360
+
361
+ removedFormat = true;
362
+ }
363
+ });
364
+
365
+ if (!removedFormat)
366
+ ed.formatter.apply(name);
367
+
368
+ ed.undoManager.add();
369
+ ed.nodeChanged();
370
+
371
+ return false; // No auto select
372
+ }
373
+ });
374
+
375
+ // Handle specified format
376
+ ed.onPreInit.add(function() {
377
+ var counter = 0, formats = ed.getParam('style_formats');
378
+
379
+ if (formats) {
380
+ each(formats, function(fmt) {
381
+ var name, keys = 0;
382
+
383
+ each(fmt, function() {keys++;});
384
+
385
+ if (keys > 1) {
386
+ name = fmt.name = fmt.name || 'style_' + (counter++);
387
+ ed.formatter.register(name, fmt);
388
+ ctrl.add(fmt.title, name, {
389
+ style: function() {
390
+ return getPreviewCss(ed, fmt);
391
+ }
392
+ });
393
+ } else
394
+ ctrl.add(fmt.title);
395
+ });
396
+ } else {
397
+ each(ed.getParam('theme_advanced_styles', '', 'hash'), function(val, key) {
398
+ var name, fmt;
399
+
400
+ if (val) {
401
+ name = 'style_' + (counter++);
402
+ fmt = {
403
+ inline : 'span',
404
+ classes : val,
405
+ selector : '*'
406
+ };
407
+
408
+ ed.formatter.register(name, fmt);
409
+ ctrl.add(t.editor.translate(key), name, {
410
+ style: function() {
411
+ return getPreviewCss(ed, fmt);
412
+ }
413
+ });
414
+ }
415
+ });
416
+ }
417
+ });
418
+
419
+ // Auto import classes if the ctrl box is empty
420
+ if (ctrl.getLength() == 0) {
421
+ ctrl.onPostRender.add(function(ed, n) {
422
+ if (!ctrl.NativeListBox) {
423
+ Event.add(n.id + '_text', 'focus', t._importClasses, t);
424
+ Event.add(n.id + '_text', 'mousedown', t._importClasses, t);
425
+ Event.add(n.id + '_open', 'focus', t._importClasses, t);
426
+ Event.add(n.id + '_open', 'mousedown', t._importClasses, t);
427
+ } else
428
+ Event.add(n.id, 'focus', t._importClasses, t);
429
+ });
430
+ }
431
+
432
+ return ctrl;
433
+ },
434
+
435
+ _createFontSelect : function() {
436
+ var c, t = this, ed = t.editor;
437
+
438
+ c = ed.controlManager.createListBox('fontselect', {
439
+ title : 'advanced.fontdefault',
440
+ onselect : function(v) {
441
+ var cur = c.items[c.selectedIndex];
442
+
443
+ if (!v && cur) {
444
+ ed.execCommand('FontName', false, cur.value);
445
+ return;
446
+ }
447
+
448
+ ed.execCommand('FontName', false, v);
449
+
450
+ // Fake selection, execCommand will fire a nodeChange and update the selection
451
+ c.select(function(sv) {
452
+ return v == sv;
453
+ });
454
+
455
+ if (cur && cur.value == v) {
456
+ c.select(null);
457
+ }
458
+
459
+ return false; // No auto select
460
+ }
461
+ });
462
+
463
+ if (c) {
464
+ each(ed.getParam('theme_advanced_fonts', t.settings.theme_advanced_fonts, 'hash'), function(v, k) {
465
+ c.add(ed.translate(k), v, {style : v.indexOf('dings') == -1 ? 'font-family:' + v : ''});
466
+ });
467
+ }
468
+
469
+ return c;
470
+ },
471
+
472
+ _createFontSizeSelect : function() {
473
+ var t = this, ed = t.editor, c, i = 0, cl = [];
474
+
475
+ c = ed.controlManager.createListBox('fontsizeselect', {title : 'advanced.font_size', onselect : function(v) {
476
+ var cur = c.items[c.selectedIndex];
477
+
478
+ if (!v && cur) {
479
+ cur = cur.value;
480
+
481
+ if (cur['class']) {
482
+ ed.formatter.toggle('fontsize_class', {value : cur['class']});
483
+ ed.undoManager.add();
484
+ ed.nodeChanged();
485
+ } else {
486
+ ed.execCommand('FontSize', false, cur.fontSize);
487
+ }
488
+
489
+ return;
490
+ }
491
+
492
+ if (v['class']) {
493
+ ed.focus();
494
+ ed.undoManager.add();
495
+ ed.formatter.toggle('fontsize_class', {value : v['class']});
496
+ ed.undoManager.add();
497
+ ed.nodeChanged();
498
+ } else
499
+ ed.execCommand('FontSize', false, v.fontSize);
500
+
501
+ // Fake selection, execCommand will fire a nodeChange and update the selection
502
+ c.select(function(sv) {
503
+ return v == sv;
504
+ });
505
+
506
+ if (cur && (cur.value.fontSize == v.fontSize || cur.value['class'] && cur.value['class'] == v['class'])) {
507
+ c.select(null);
508
+ }
509
+
510
+ return false; // No auto select
511
+ }});
512
+
513
+ if (c) {
514
+ each(t.settings.theme_advanced_font_sizes, function(v, k) {
515
+ var fz = v.fontSize;
516
+
517
+ if (fz >= 1 && fz <= 7)
518
+ fz = t.sizes[parseInt(fz) - 1] + 'pt';
519
+
520
+ c.add(k, v, {'style' : 'font-size:' + fz, 'class' : 'mceFontSize' + (i++) + (' ' + (v['class'] || ''))});
521
+ });
522
+ }
523
+
524
+ return c;
525
+ },
526
+
527
+ _createBlockFormats : function() {
528
+ var c, fmts = {
529
+ p : 'advanced.paragraph',
530
+ address : 'advanced.address',
531
+ pre : 'advanced.pre',
532
+ h1 : 'advanced.h1',
533
+ h2 : 'advanced.h2',
534
+ h3 : 'advanced.h3',
535
+ h4 : 'advanced.h4',
536
+ h5 : 'advanced.h5',
537
+ h6 : 'advanced.h6',
538
+ div : 'advanced.div',
539
+ blockquote : 'advanced.blockquote',
540
+ code : 'advanced.code',
541
+ dt : 'advanced.dt',
542
+ dd : 'advanced.dd',
543
+ samp : 'advanced.samp'
544
+ }, t = this;
545
+
546
+ c = t.editor.controlManager.createListBox('formatselect', {title : 'advanced.block', onselect : function(v) {
547
+ t.editor.execCommand('FormatBlock', false, v);
548
+ return false;
549
+ }});
550
+
551
+ if (c) {
552
+ each(t.editor.getParam('theme_advanced_blockformats', t.settings.theme_advanced_blockformats, 'hash'), function(v, k) {
553
+ c.add(t.editor.translate(k != v ? k : fmts[v]), v, {'class' : 'mce_formatPreview mce_' + v, style: function() {
554
+ return getPreviewCss(t.editor, {block: v});
555
+ }});
556
+ });
557
+ }
558
+
559
+ return c;
560
+ },
561
+
562
+ _createForeColorMenu : function() {
563
+ var c, t = this, s = t.settings, o = {}, v;
564
+
565
+ if (s.theme_advanced_more_colors) {
566
+ o.more_colors_func = function() {
567
+ t._mceColorPicker(0, {
568
+ color : c.value,
569
+ func : function(co) {
570
+ c.setColor(co);
571
+ }
572
+ });
573
+ };
574
+ }
575
+
576
+ if (v = s.theme_advanced_text_colors)
577
+ o.colors = v;
578
+
579
+ if (s.theme_advanced_default_foreground_color)
580
+ o.default_color = s.theme_advanced_default_foreground_color;
581
+
582
+ o.title = 'advanced.forecolor_desc';
583
+ o.cmd = 'ForeColor';
584
+ o.scope = this;
585
+
586
+ c = t.editor.controlManager.createColorSplitButton('forecolor', o);
587
+
588
+ return c;
589
+ },
590
+
591
+ _createBackColorMenu : function() {
592
+ var c, t = this, s = t.settings, o = {}, v;
593
+
594
+ if (s.theme_advanced_more_colors) {
595
+ o.more_colors_func = function() {
596
+ t._mceColorPicker(0, {
597
+ color : c.value,
598
+ func : function(co) {
599
+ c.setColor(co);
600
+ }
601
+ });
602
+ };
603
+ }
604
+
605
+ if (v = s.theme_advanced_background_colors)
606
+ o.colors = v;
607
+
608
+ if (s.theme_advanced_default_background_color)
609
+ o.default_color = s.theme_advanced_default_background_color;
610
+
611
+ o.title = 'advanced.backcolor_desc';
612
+ o.cmd = 'HiliteColor';
613
+ o.scope = this;
614
+
615
+ c = t.editor.controlManager.createColorSplitButton('backcolor', o);
616
+
617
+ return c;
618
+ },
619
+
620
+ renderUI : function(o) {
621
+ var n, ic, tb, t = this, ed = t.editor, s = t.settings, sc, p, nl;
622
+
623
+ if (ed.settings) {
624
+ ed.settings.aria_label = s.aria_label + ed.getLang('advanced.help_shortcut');
625
+ }
626
+
627
+ // TODO: ACC Should have an aria-describedby attribute which is user-configurable to describe what this field is actually for.
628
+ // Maybe actually inherit it from the original textara?
629
+ n = p = DOM.create('span', {role : 'application', 'aria-labelledby' : ed.id + '_voice', id : ed.id + '_parent', 'class' : 'mceEditor ' + ed.settings.skin + 'Skin' + (s.skin_variant ? ' ' + ed.settings.skin + 'Skin' + t._ufirst(s.skin_variant) : '') + (ed.settings.directionality == "rtl" ? ' mceRtl' : '')});
630
+ DOM.add(n, 'span', {'class': 'mceVoiceLabel', 'style': 'display:none;', id: ed.id + '_voice'}, s.aria_label);
631
+
632
+ if (!DOM.boxModel)
633
+ n = DOM.add(n, 'div', {'class' : 'mceOldBoxModel'});
634
+
635
+ n = sc = DOM.add(n, 'table', {role : "presentation", id : ed.id + '_tbl', 'class' : 'mceLayout', cellSpacing : 0, cellPadding : 0});
636
+ n = tb = DOM.add(n, 'tbody');
637
+
638
+ switch ((s.theme_advanced_layout_manager || '').toLowerCase()) {
639
+ case "rowlayout":
640
+ ic = t._rowLayout(s, tb, o);
641
+ break;
642
+
643
+ case "customlayout":
644
+ ic = ed.execCallback("theme_advanced_custom_layout", s, tb, o, p);
645
+ break;
646
+
647
+ default:
648
+ ic = t._simpleLayout(s, tb, o, p);
649
+ }
650
+
651
+ n = o.targetNode;
652
+
653
+ // Add classes to first and last TRs
654
+ nl = sc.rows;
655
+ DOM.addClass(nl[0], 'mceFirst');
656
+ DOM.addClass(nl[nl.length - 1], 'mceLast');
657
+
658
+ // Add classes to first and last TDs
659
+ each(DOM.select('tr', tb), function(n) {
660
+ DOM.addClass(n.firstChild, 'mceFirst');
661
+ DOM.addClass(n.childNodes[n.childNodes.length - 1], 'mceLast');
662
+ });
663
+
664
+ if (DOM.get(s.theme_advanced_toolbar_container))
665
+ DOM.get(s.theme_advanced_toolbar_container).appendChild(p);
666
+ else
667
+ DOM.insertAfter(p, n);
668
+
669
+ Event.add(ed.id + '_path_row', 'click', function(e) {
670
+ e = e.target;
671
+
672
+ if (e.nodeName == 'A') {
673
+ t._sel(e.className.replace(/^.*mcePath_([0-9]+).*$/, '$1'));
674
+ return false;
675
+ }
676
+ });
677
+ /*
678
+ if (DOM.get(ed.id + '_path_row')) {
679
+ Event.add(ed.id + '_tbl', 'mouseover', function(e) {
680
+ var re;
681
+
682
+ e = e.target;
683
+
684
+ if (e.nodeName == 'SPAN' && DOM.hasClass(e.parentNode, 'mceButton')) {
685
+ re = DOM.get(ed.id + '_path_row');
686
+ t.lastPath = re.innerHTML;
687
+ DOM.setHTML(re, e.parentNode.title);
688
+ }
689
+ });
690
+
691
+ Event.add(ed.id + '_tbl', 'mouseout', function(e) {
692
+ if (t.lastPath) {
693
+ DOM.setHTML(ed.id + '_path_row', t.lastPath);
694
+ t.lastPath = 0;
695
+ }
696
+ });
697
+ }
698
+ */
699
+
700
+ if (!ed.getParam('accessibility_focus'))
701
+ Event.add(DOM.add(p, 'a', {href : '#'}, '<!-- IE -->'), 'focus', function() {tinyMCE.get(ed.id).focus();});
702
+
703
+ if (s.theme_advanced_toolbar_location == 'external')
704
+ o.deltaHeight = 0;
705
+
706
+ t.deltaHeight = o.deltaHeight;
707
+ o.targetNode = null;
708
+
709
+ ed.onKeyDown.add(function(ed, evt) {
710
+ var DOM_VK_F10 = 121, DOM_VK_F11 = 122;
711
+
712
+ if (evt.altKey) {
713
+ if (evt.keyCode === DOM_VK_F10) {
714
+ // Make sure focus is given to toolbar in Safari.
715
+ // We can't do this in IE as it prevents giving focus to toolbar when editor is in a frame
716
+ if (tinymce.isWebKit) {
717
+ window.focus();
718
+ }
719
+ t.toolbarGroup.focus();
720
+ return Event.cancel(evt);
721
+ } else if (evt.keyCode === DOM_VK_F11) {
722
+ DOM.get(ed.id + '_path_row').focus();
723
+ return Event.cancel(evt);
724
+ }
725
+ }
726
+ });
727
+
728
+ // alt+0 is the UK recommended shortcut for accessing the list of access controls.
729
+ ed.addShortcut('alt+0', '', 'mceShortcuts', t);
730
+
731
+ return {
732
+ iframeContainer : ic,
733
+ editorContainer : ed.id + '_parent',
734
+ sizeContainer : sc,
735
+ deltaHeight : o.deltaHeight
736
+ };
737
+ },
738
+
739
+ getInfo : function() {
740
+ return {
741
+ longname : 'Advanced theme',
742
+ author : 'Moxiecode Systems AB',
743
+ authorurl : 'http://tinymce.moxiecode.com',
744
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
745
+ }
746
+ },
747
+
748
+ resizeBy : function(dw, dh) {
749
+ var e = DOM.get(this.editor.id + '_ifr');
750
+
751
+ this.resizeTo(e.clientWidth + dw, e.clientHeight + dh);
752
+ },
753
+
754
+ resizeTo : function(w, h, store) {
755
+ var ed = this.editor, s = this.settings, e = DOM.get(ed.id + '_tbl'), ifr = DOM.get(ed.id + '_ifr');
756
+
757
+ // Boundery fix box
758
+ w = Math.max(s.theme_advanced_resizing_min_width || 100, w);
759
+ h = Math.max(s.theme_advanced_resizing_min_height || 100, h);
760
+ w = Math.min(s.theme_advanced_resizing_max_width || 0xFFFF, w);
761
+ h = Math.min(s.theme_advanced_resizing_max_height || 0xFFFF, h);
762
+
763
+ // Resize iframe and container
764
+ DOM.setStyle(e, 'height', '');
765
+ DOM.setStyle(ifr, 'height', h);
766
+
767
+ if (s.theme_advanced_resize_horizontal) {
768
+ DOM.setStyle(e, 'width', '');
769
+ DOM.setStyle(ifr, 'width', w);
770
+
771
+ // Make sure that the size is never smaller than the over all ui
772
+ if (w < e.clientWidth) {
773
+ w = e.clientWidth;
774
+ DOM.setStyle(ifr, 'width', e.clientWidth);
775
+ }
776
+ }
777
+
778
+ // Store away the size
779
+ if (store && s.theme_advanced_resizing_use_cookie) {
780
+ Cookie.setHash("TinyMCE_" + ed.id + "_size", {
781
+ cw : w,
782
+ ch : h
783
+ });
784
+ }
785
+ },
786
+
787
+ destroy : function() {
788
+ var id = this.editor.id;
789
+
790
+ Event.clear(id + '_resize');
791
+ Event.clear(id + '_path_row');
792
+ Event.clear(id + '_external_close');
793
+ },
794
+
795
+ // Internal functions
796
+
797
+ _simpleLayout : function(s, tb, o, p) {
798
+ var t = this, ed = t.editor, lo = s.theme_advanced_toolbar_location, sl = s.theme_advanced_statusbar_location, n, ic, etb, c;
799
+
800
+ if (s.readonly) {
801
+ n = DOM.add(tb, 'tr');
802
+ n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});
803
+ return ic;
804
+ }
805
+
806
+ // Create toolbar container at top
807
+ if (lo == 'top')
808
+ t._addToolbars(tb, o);
809
+
810
+ // Create external toolbar
811
+ if (lo == 'external') {
812
+ n = c = DOM.create('div', {style : 'position:relative'});
813
+ n = DOM.add(n, 'div', {id : ed.id + '_external', 'class' : 'mceExternalToolbar'});
814
+ DOM.add(n, 'a', {id : ed.id + '_external_close', href : 'javascript:;', 'class' : 'mceExternalClose'});
815
+ n = DOM.add(n, 'table', {id : ed.id + '_tblext', cellSpacing : 0, cellPadding : 0});
816
+ etb = DOM.add(n, 'tbody');
817
+
818
+ if (p.firstChild.className == 'mceOldBoxModel')
819
+ p.firstChild.appendChild(c);
820
+ else
821
+ p.insertBefore(c, p.firstChild);
822
+
823
+ t._addToolbars(etb, o);
824
+
825
+ ed.onMouseUp.add(function() {
826
+ var e = DOM.get(ed.id + '_external');
827
+ DOM.show(e);
828
+
829
+ DOM.hide(lastExtID);
830
+
831
+ var f = Event.add(ed.id + '_external_close', 'click', function() {
832
+ DOM.hide(ed.id + '_external');
833
+ Event.remove(ed.id + '_external_close', 'click', f);
834
+ });
835
+
836
+ DOM.show(e);
837
+ DOM.setStyle(e, 'top', 0 - DOM.getRect(ed.id + '_tblext').h - 1);
838
+
839
+ // Fixes IE rendering bug
840
+ DOM.hide(e);
841
+ DOM.show(e);
842
+ e.style.filter = '';
843
+
844
+ lastExtID = ed.id + '_external';
845
+
846
+ e = null;
847
+ });
848
+ }
849
+
850
+ if (sl == 'top')
851
+ t._addStatusBar(tb, o);
852
+
853
+ // Create iframe container
854
+ if (!s.theme_advanced_toolbar_container) {
855
+ n = DOM.add(tb, 'tr');
856
+ n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});
857
+ }
858
+
859
+ // Create toolbar container at bottom
860
+ if (lo == 'bottom')
861
+ t._addToolbars(tb, o);
862
+
863
+ if (sl == 'bottom')
864
+ t._addStatusBar(tb, o);
865
+
866
+ return ic;
867
+ },
868
+
869
+ _rowLayout : function(s, tb, o) {
870
+ var t = this, ed = t.editor, dc, da, cf = ed.controlManager, n, ic, to, a;
871
+
872
+ dc = s.theme_advanced_containers_default_class || '';
873
+ da = s.theme_advanced_containers_default_align || 'center';
874
+
875
+ each(explode(s.theme_advanced_containers || ''), function(c, i) {
876
+ var v = s['theme_advanced_container_' + c] || '';
877
+
878
+ switch (c.toLowerCase()) {
879
+ case 'mceeditor':
880
+ n = DOM.add(tb, 'tr');
881
+ n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});
882
+ break;
883
+
884
+ case 'mceelementpath':
885
+ t._addStatusBar(tb, o);
886
+ break;
887
+
888
+ default:
889
+ a = (s['theme_advanced_container_' + c + '_align'] || da).toLowerCase();
890
+ a = 'mce' + t._ufirst(a);
891
+
892
+ n = DOM.add(DOM.add(tb, 'tr'), 'td', {
893
+ 'class' : 'mceToolbar ' + (s['theme_advanced_container_' + c + '_class'] || dc) + ' ' + a || da
894
+ });
895
+
896
+ to = cf.createToolbar("toolbar" + i);
897
+ t._addControls(v, to);
898
+ DOM.setHTML(n, to.renderHTML());
899
+ o.deltaHeight -= s.theme_advanced_row_height;
900
+ }
901
+ });
902
+
903
+ return ic;
904
+ },
905
+
906
+ _addControls : function(v, tb) {
907
+ var t = this, s = t.settings, di, cf = t.editor.controlManager;
908
+
909
+ if (s.theme_advanced_disable && !t._disabled) {
910
+ di = {};
911
+
912
+ each(explode(s.theme_advanced_disable), function(v) {
913
+ di[v] = 1;
914
+ });
915
+
916
+ t._disabled = di;
917
+ } else
918
+ di = t._disabled;
919
+
920
+ each(explode(v), function(n) {
921
+ var c;
922
+
923
+ if (di && di[n])
924
+ return;
925
+
926
+ // Compatiblity with 2.x
927
+ if (n == 'tablecontrols') {
928
+ each(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"], function(n) {
929
+ n = t.createControl(n, cf);
930
+
931
+ if (n)
932
+ tb.add(n);
933
+ });
934
+
935
+ return;
936
+ }
937
+
938
+ c = t.createControl(n, cf);
939
+
940
+ if (c)
941
+ tb.add(c);
942
+ });
943
+ },
944
+
945
+ _addToolbars : function(c, o) {
946
+ var t = this, i, tb, ed = t.editor, s = t.settings, v, cf = ed.controlManager, di, n, h = [], a, toolbarGroup, toolbarsExist = false;
947
+
948
+ toolbarGroup = cf.createToolbarGroup('toolbargroup', {
949
+ 'name': ed.getLang('advanced.toolbar'),
950
+ 'tab_focus_toolbar':ed.getParam('theme_advanced_tab_focus_toolbar')
951
+ });
952
+
953
+ t.toolbarGroup = toolbarGroup;
954
+
955
+ a = s.theme_advanced_toolbar_align.toLowerCase();
956
+ a = 'mce' + t._ufirst(a);
957
+
958
+ n = DOM.add(DOM.add(c, 'tr', {role: 'presentation'}), 'td', {'class' : 'mceToolbar ' + a, "role":"presentation"});
959
+
960
+ // Create toolbar and add the controls
961
+ for (i=1; (v = s['theme_advanced_buttons' + i]); i++) {
962
+ toolbarsExist = true;
963
+ tb = cf.createToolbar("toolbar" + i, {'class' : 'mceToolbarRow' + i});
964
+
965
+ if (s['theme_advanced_buttons' + i + '_add'])
966
+ v += ',' + s['theme_advanced_buttons' + i + '_add'];
967
+
968
+ if (s['theme_advanced_buttons' + i + '_add_before'])
969
+ v = s['theme_advanced_buttons' + i + '_add_before'] + ',' + v;
970
+
971
+ t._addControls(v, tb);
972
+ toolbarGroup.add(tb);
973
+
974
+ o.deltaHeight -= s.theme_advanced_row_height;
975
+ }
976
+ // Handle case when there are no toolbar buttons and ensure editor height is adjusted accordingly
977
+ if (!toolbarsExist)
978
+ o.deltaHeight -= s.theme_advanced_row_height;
979
+ h.push(toolbarGroup.renderHTML());
980
+ h.push(DOM.createHTML('a', {href : '#', accesskey : 'z', title : ed.getLang("advanced.toolbar_focus"), onfocus : 'tinyMCE.getInstanceById(\'' + ed.id + '\').focus();'}, '<!-- IE -->'));
981
+ DOM.setHTML(n, h.join(''));
982
+ },
983
+
984
+ _addStatusBar : function(tb, o) {
985
+ var n, t = this, ed = t.editor, s = t.settings, r, mf, me, td;
986
+
987
+ n = DOM.add(tb, 'tr');
988
+ n = td = DOM.add(n, 'td', {'class' : 'mceStatusbar'});
989
+ n = DOM.add(n, 'div', {id : ed.id + '_path_row', 'role': 'group', 'aria-labelledby': ed.id + '_path_voice'});
990
+ if (s.theme_advanced_path) {
991
+ DOM.add(n, 'span', {id: ed.id + '_path_voice'}, ed.translate('advanced.path'));
992
+ DOM.add(n, 'span', {}, ': ');
993
+ } else {
994
+ DOM.add(n, 'span', {}, '&#160;');
995
+ }
996
+
997
+
998
+ if (s.theme_advanced_resizing) {
999
+ DOM.add(td, 'a', {id : ed.id + '_resize', href : 'javascript:;', onclick : "return false;", 'class' : 'mceResize', tabIndex:"-1"});
1000
+
1001
+ if (s.theme_advanced_resizing_use_cookie) {
1002
+ ed.onPostRender.add(function() {
1003
+ var o = Cookie.getHash("TinyMCE_" + ed.id + "_size"), c = DOM.get(ed.id + '_tbl');
1004
+
1005
+ if (!o)
1006
+ return;
1007
+
1008
+ t.resizeTo(o.cw, o.ch);
1009
+ });
1010
+ }
1011
+
1012
+ ed.onPostRender.add(function() {
1013
+ Event.add(ed.id + '_resize', 'click', function(e) {
1014
+ e.preventDefault();
1015
+ });
1016
+
1017
+ Event.add(ed.id + '_resize', 'mousedown', function(e) {
1018
+ var mouseMoveHandler1, mouseMoveHandler2,
1019
+ mouseUpHandler1, mouseUpHandler2,
1020
+ startX, startY, startWidth, startHeight, width, height, ifrElm;
1021
+
1022
+ function resizeOnMove(e) {
1023
+ e.preventDefault();
1024
+
1025
+ width = startWidth + (e.screenX - startX);
1026
+ height = startHeight + (e.screenY - startY);
1027
+
1028
+ t.resizeTo(width, height);
1029
+ };
1030
+
1031
+ function endResize(e) {
1032
+ // Stop listening
1033
+ Event.remove(DOM.doc, 'mousemove', mouseMoveHandler1);
1034
+ Event.remove(ed.getDoc(), 'mousemove', mouseMoveHandler2);
1035
+ Event.remove(DOM.doc, 'mouseup', mouseUpHandler1);
1036
+ Event.remove(ed.getDoc(), 'mouseup', mouseUpHandler2);
1037
+
1038
+ width = startWidth + (e.screenX - startX);
1039
+ height = startHeight + (e.screenY - startY);
1040
+ t.resizeTo(width, height, true);
1041
+ };
1042
+
1043
+ e.preventDefault();
1044
+
1045
+ // Get the current rect size
1046
+ startX = e.screenX;
1047
+ startY = e.screenY;
1048
+ ifrElm = DOM.get(t.editor.id + '_ifr');
1049
+ startWidth = width = ifrElm.clientWidth;
1050
+ startHeight = height = ifrElm.clientHeight;
1051
+
1052
+ // Register envent handlers
1053
+ mouseMoveHandler1 = Event.add(DOM.doc, 'mousemove', resizeOnMove);
1054
+ mouseMoveHandler2 = Event.add(ed.getDoc(), 'mousemove', resizeOnMove);
1055
+ mouseUpHandler1 = Event.add(DOM.doc, 'mouseup', endResize);
1056
+ mouseUpHandler2 = Event.add(ed.getDoc(), 'mouseup', endResize);
1057
+ });
1058
+ });
1059
+ }
1060
+
1061
+ o.deltaHeight -= 21;
1062
+ n = tb = null;
1063
+ },
1064
+
1065
+ _updateUndoStatus : function(ed) {
1066
+ var cm = ed.controlManager, um = ed.undoManager;
1067
+
1068
+ cm.setDisabled('undo', !um.hasUndo() && !um.typing);
1069
+ cm.setDisabled('redo', !um.hasRedo());
1070
+ },
1071
+
1072
+ _nodeChanged : function(ed, cm, n, co, ob) {
1073
+ var t = this, p, de = 0, v, c, s = t.settings, cl, fz, fn, fc, bc, formatNames, matches;
1074
+
1075
+ tinymce.each(t.stateControls, function(c) {
1076
+ cm.setActive(c, ed.queryCommandState(t.controls[c][1]));
1077
+ });
1078
+
1079
+ function getParent(name) {
1080
+ var i, parents = ob.parents, func = name;
1081
+
1082
+ if (typeof(name) == 'string') {
1083
+ func = function(node) {
1084
+ return node.nodeName == name;
1085
+ };
1086
+ }
1087
+
1088
+ for (i = 0; i < parents.length; i++) {
1089
+ if (func(parents[i]))
1090
+ return parents[i];
1091
+ }
1092
+ };
1093
+
1094
+ cm.setActive('visualaid', ed.hasVisual);
1095
+ t._updateUndoStatus(ed);
1096
+ cm.setDisabled('outdent', !ed.queryCommandState('Outdent'));
1097
+
1098
+ p = getParent('A');
1099
+ if (c = cm.get('link')) {
1100
+ c.setDisabled((!p && co) || (p && !p.href));
1101
+ c.setActive(!!p && (!p.name && !p.id));
1102
+ }
1103
+
1104
+ if (c = cm.get('unlink')) {
1105
+ c.setDisabled(!p && co);
1106
+ c.setActive(!!p && !p.name && !p.id);
1107
+ }
1108
+
1109
+ if (c = cm.get('anchor')) {
1110
+ c.setActive(!co && !!p && (p.name || (p.id && !p.href)));
1111
+ }
1112
+
1113
+ p = getParent('IMG');
1114
+ if (c = cm.get('image'))
1115
+ c.setActive(!co && !!p && n.className.indexOf('mceItem') == -1);
1116
+
1117
+ if (c = cm.get('styleselect')) {
1118
+ t._importClasses();
1119
+
1120
+ formatNames = [];
1121
+ each(c.items, function(item) {
1122
+ formatNames.push(item.value);
1123
+ });
1124
+
1125
+ matches = ed.formatter.matchAll(formatNames);
1126
+ c.select(matches[0]);
1127
+ tinymce.each(matches, function(match, index) {
1128
+ if (index > 0) {
1129
+ c.mark(match);
1130
+ }
1131
+ });
1132
+ }
1133
+
1134
+ if (c = cm.get('formatselect')) {
1135
+ p = getParent(ed.dom.isBlock);
1136
+
1137
+ if (p)
1138
+ c.select(p.nodeName.toLowerCase());
1139
+ }
1140
+
1141
+ // Find out current fontSize, fontFamily and fontClass
1142
+ getParent(function(n) {
1143
+ if (n.nodeName === 'SPAN') {
1144
+ if (!cl && n.className)
1145
+ cl = n.className;
1146
+ }
1147
+
1148
+ if (ed.dom.is(n, s.theme_advanced_font_selector)) {
1149
+ if (!fz && n.style.fontSize)
1150
+ fz = n.style.fontSize;
1151
+
1152
+ if (!fn && n.style.fontFamily)
1153
+ fn = n.style.fontFamily.replace(/[\"\']+/g, '').replace(/^([^,]+).*/, '$1').toLowerCase();
1154
+
1155
+ if (!fc && n.style.color)
1156
+ fc = n.style.color;
1157
+
1158
+ if (!bc && n.style.backgroundColor)
1159
+ bc = n.style.backgroundColor;
1160
+ }
1161
+
1162
+ return false;
1163
+ });
1164
+
1165
+ if (c = cm.get('fontselect')) {
1166
+ c.select(function(v) {
1167
+ return v.replace(/^([^,]+).*/, '$1').toLowerCase() == fn;
1168
+ });
1169
+ }
1170
+
1171
+ // Select font size
1172
+ if (c = cm.get('fontsizeselect')) {
1173
+ // Use computed style
1174
+ if (s.theme_advanced_runtime_fontsize && !fz && !cl)
1175
+ fz = ed.dom.getStyle(n, 'fontSize', true);
1176
+
1177
+ c.select(function(v) {
1178
+ if (v.fontSize && v.fontSize === fz)
1179
+ return true;
1180
+
1181
+ if (v['class'] && v['class'] === cl)
1182
+ return true;
1183
+ });
1184
+ }
1185
+
1186
+ if (s.theme_advanced_show_current_color) {
1187
+ function updateColor(controlId, color) {
1188
+ if (c = cm.get(controlId)) {
1189
+ if (!color)
1190
+ color = c.settings.default_color;
1191
+ if (color !== c.value) {
1192
+ c.displayColor(color);
1193
+ }
1194
+ }
1195
+ }
1196
+ updateColor('forecolor', fc);
1197
+ updateColor('backcolor', bc);
1198
+ }
1199
+
1200
+ if (s.theme_advanced_show_current_color) {
1201
+ function updateColor(controlId, color) {
1202
+ if (c = cm.get(controlId)) {
1203
+ if (!color)
1204
+ color = c.settings.default_color;
1205
+ if (color !== c.value) {
1206
+ c.displayColor(color);
1207
+ }
1208
+ }
1209
+ };
1210
+
1211
+ updateColor('forecolor', fc);
1212
+ updateColor('backcolor', bc);
1213
+ }
1214
+
1215
+ if (s.theme_advanced_path && s.theme_advanced_statusbar_location) {
1216
+ p = DOM.get(ed.id + '_path') || DOM.add(ed.id + '_path_row', 'span', {id : ed.id + '_path'});
1217
+
1218
+ if (t.statusKeyboardNavigation) {
1219
+ t.statusKeyboardNavigation.destroy();
1220
+ t.statusKeyboardNavigation = null;
1221
+ }
1222
+
1223
+ DOM.setHTML(p, '');
1224
+
1225
+ getParent(function(n) {
1226
+ var na = n.nodeName.toLowerCase(), u, pi, ti = '';
1227
+
1228
+ // Ignore non element and bogus/hidden elements
1229
+ if (n.nodeType != 1 || na === 'br' || n.getAttribute('data-mce-bogus') || DOM.hasClass(n, 'mceItemHidden') || DOM.hasClass(n, 'mceItemRemoved'))
1230
+ return;
1231
+
1232
+ // Handle prefix
1233
+ if (tinymce.isIE && n.scopeName !== 'HTML' && n.scopeName)
1234
+ na = n.scopeName + ':' + na;
1235
+
1236
+ // Remove internal prefix
1237
+ na = na.replace(/mce\:/g, '');
1238
+
1239
+ // Handle node name
1240
+ switch (na) {
1241
+ case 'b':
1242
+ na = 'strong';
1243
+ break;
1244
+
1245
+ case 'i':
1246
+ na = 'em';
1247
+ break;
1248
+
1249
+ case 'img':
1250
+ if (v = DOM.getAttrib(n, 'src'))
1251
+ ti += 'src: ' + v + ' ';
1252
+
1253
+ break;
1254
+
1255
+ case 'a':
1256
+ if (v = DOM.getAttrib(n, 'name')) {
1257
+ ti += 'name: ' + v + ' ';
1258
+ na += '#' + v;
1259
+ }
1260
+
1261
+ if (v = DOM.getAttrib(n, 'href'))
1262
+ ti += 'href: ' + v + ' ';
1263
+
1264
+ break;
1265
+
1266
+ case 'font':
1267
+ if (v = DOM.getAttrib(n, 'face'))
1268
+ ti += 'font: ' + v + ' ';
1269
+
1270
+ if (v = DOM.getAttrib(n, 'size'))
1271
+ ti += 'size: ' + v + ' ';
1272
+
1273
+ if (v = DOM.getAttrib(n, 'color'))
1274
+ ti += 'color: ' + v + ' ';
1275
+
1276
+ break;
1277
+
1278
+ case 'span':
1279
+ if (v = DOM.getAttrib(n, 'style'))
1280
+ ti += 'style: ' + v + ' ';
1281
+
1282
+ break;
1283
+ }
1284
+
1285
+ if (v = DOM.getAttrib(n, 'id'))
1286
+ ti += 'id: ' + v + ' ';
1287
+
1288
+ if (v = n.className) {
1289
+ v = v.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g, '')
1290
+
1291
+ if (v) {
1292
+ ti += 'class: ' + v + ' ';
1293
+
1294
+ if (ed.dom.isBlock(n) || na == 'img' || na == 'span')
1295
+ na += '.' + v;
1296
+ }
1297
+ }
1298
+
1299
+ na = na.replace(/(html:)/g, '');
1300
+ na = {name : na, node : n, title : ti};
1301
+ t.onResolveName.dispatch(t, na);
1302
+ ti = na.title;
1303
+ na = na.name;
1304
+
1305
+ //u = "javascript:tinymce.EditorManager.get('" + ed.id + "').theme._sel('" + (de++) + "');";
1306
+ pi = DOM.create('a', {'href' : "javascript:;", role: 'button', onmousedown : "return false;", title : ti, 'class' : 'mcePath_' + (de++)}, na);
1307
+
1308
+ if (p.hasChildNodes()) {
1309
+ p.insertBefore(DOM.create('span', {'aria-hidden': 'true'}, '\u00a0\u00bb '), p.firstChild);
1310
+ p.insertBefore(pi, p.firstChild);
1311
+ } else
1312
+ p.appendChild(pi);
1313
+ }, ed.getBody());
1314
+
1315
+ if (DOM.select('a', p).length > 0) {
1316
+ t.statusKeyboardNavigation = new tinymce.ui.KeyboardNavigation({
1317
+ root: ed.id + "_path_row",
1318
+ items: DOM.select('a', p),
1319
+ excludeFromTabOrder: true,
1320
+ onCancel: function() {
1321
+ ed.focus();
1322
+ }
1323
+ }, DOM);
1324
+ }
1325
+ }
1326
+ },
1327
+
1328
+ // Commands gets called by execCommand
1329
+
1330
+ _sel : function(v) {
1331
+ this.editor.execCommand('mceSelectNodeDepth', false, v);
1332
+ },
1333
+
1334
+ _mceInsertAnchor : function(ui, v) {
1335
+ var ed = this.editor;
1336
+
1337
+ ed.windowManager.open({
1338
+ url : this.url + '/anchor.htm',
1339
+ width : 320 + parseInt(ed.getLang('advanced.anchor_delta_width', 0)),
1340
+ height : 90 + parseInt(ed.getLang('advanced.anchor_delta_height', 0)),
1341
+ inline : true
1342
+ }, {
1343
+ theme_url : this.url
1344
+ });
1345
+ },
1346
+
1347
+ _mceCharMap : function() {
1348
+ var ed = this.editor;
1349
+
1350
+ ed.windowManager.open({
1351
+ url : this.url + '/charmap.htm',
1352
+ width : 550 + parseInt(ed.getLang('advanced.charmap_delta_width', 0)),
1353
+ height : 265 + parseInt(ed.getLang('advanced.charmap_delta_height', 0)),
1354
+ inline : true
1355
+ }, {
1356
+ theme_url : this.url
1357
+ });
1358
+ },
1359
+
1360
+ _mceHelp : function() {
1361
+ var ed = this.editor;
1362
+
1363
+ ed.windowManager.open({
1364
+ url : this.url + '/about.htm',
1365
+ width : 480,
1366
+ height : 380,
1367
+ inline : true
1368
+ }, {
1369
+ theme_url : this.url
1370
+ });
1371
+ },
1372
+
1373
+ _mceShortcuts : function() {
1374
+ var ed = this.editor;
1375
+ ed.windowManager.open({
1376
+ url: this.url + '/shortcuts.htm',
1377
+ width: 480,
1378
+ height: 380,
1379
+ inline: true
1380
+ }, {
1381
+ theme_url: this.url
1382
+ });
1383
+ },
1384
+
1385
+ _mceColorPicker : function(u, v) {
1386
+ var ed = this.editor;
1387
+
1388
+ v = v || {};
1389
+
1390
+ ed.windowManager.open({
1391
+ url : this.url + '/color_picker.htm',
1392
+ width : 375 + parseInt(ed.getLang('advanced.colorpicker_delta_width', 0)),
1393
+ height : 250 + parseInt(ed.getLang('advanced.colorpicker_delta_height', 0)),
1394
+ close_previous : false,
1395
+ inline : true
1396
+ }, {
1397
+ input_color : v.color,
1398
+ func : v.func,
1399
+ theme_url : this.url
1400
+ });
1401
+ },
1402
+
1403
+ _mceCodeEditor : function(ui, val) {
1404
+ var ed = this.editor;
1405
+
1406
+ ed.windowManager.open({
1407
+ url : this.url + '/source_editor.htm',
1408
+ width : parseInt(ed.getParam("theme_advanced_source_editor_width", 720)),
1409
+ height : parseInt(ed.getParam("theme_advanced_source_editor_height", 580)),
1410
+ inline : true,
1411
+ resizable : true,
1412
+ maximizable : true
1413
+ }, {
1414
+ theme_url : this.url
1415
+ });
1416
+ },
1417
+
1418
+ _mceImage : function(ui, val) {
1419
+ var ed = this.editor;
1420
+
1421
+ // Internal image object like a flash placeholder
1422
+ if (ed.dom.getAttrib(ed.selection.getNode(), 'class', '').indexOf('mceItem') != -1)
1423
+ return;
1424
+
1425
+ ed.windowManager.open({
1426
+ url : this.url + '/image.htm',
1427
+ width : 355 + parseInt(ed.getLang('advanced.image_delta_width', 0)),
1428
+ height : 275 + parseInt(ed.getLang('advanced.image_delta_height', 0)),
1429
+ inline : true
1430
+ }, {
1431
+ theme_url : this.url
1432
+ });
1433
+ },
1434
+
1435
+ _mceLink : function(ui, val) {
1436
+ var ed = this.editor;
1437
+
1438
+ ed.windowManager.open({
1439
+ url : this.url + '/link.htm',
1440
+ width : 310 + parseInt(ed.getLang('advanced.link_delta_width', 0)),
1441
+ height : 200 + parseInt(ed.getLang('advanced.link_delta_height', 0)),
1442
+ inline : true
1443
+ }, {
1444
+ theme_url : this.url
1445
+ });
1446
+ },
1447
+
1448
+ _mceNewDocument : function() {
1449
+ var ed = this.editor;
1450
+
1451
+ ed.windowManager.confirm('advanced.newdocument', function(s) {
1452
+ if (s)
1453
+ ed.execCommand('mceSetContent', false, '');
1454
+ });
1455
+ },
1456
+
1457
+ _mceForeColor : function() {
1458
+ var t = this;
1459
+
1460
+ this._mceColorPicker(0, {
1461
+ color: t.fgColor,
1462
+ func : function(co) {
1463
+ t.fgColor = co;
1464
+ t.editor.execCommand('ForeColor', false, co);
1465
+ }
1466
+ });
1467
+ },
1468
+
1469
+ _mceBackColor : function() {
1470
+ var t = this;
1471
+
1472
+ this._mceColorPicker(0, {
1473
+ color: t.bgColor,
1474
+ func : function(co) {
1475
+ t.bgColor = co;
1476
+ t.editor.execCommand('HiliteColor', false, co);
1477
+ }
1478
+ });
1479
+ },
1480
+
1481
+ _ufirst : function(s) {
1482
+ return s.substring(0, 1).toUpperCase() + s.substring(1);
1483
+ }
1484
+ });
1485
+
1486
+ tinymce.ThemeManager.add('advanced', tinymce.themes.AdvancedTheme);
1487
+ }(tinymce));
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/image.htm CHANGED
@@ -1,80 +1,80 @@
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>{#advanced_dlg.image_title}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js"></script>
7
- <script type="text/javascript" src="../../utils/form_utils.js"></script>
8
- <script type="text/javascript" src="js/image.js"></script>
9
- </head>
10
- <body id="image" style="display: none">
11
- <form onsubmit="ImageDialog.update();return false;" action="#">
12
- <div class="tabs">
13
- <ul>
14
- <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advanced_dlg.image_title}</a></span></li>
15
- </ul>
16
- </div>
17
-
18
- <div class="panel_wrapper">
19
- <div id="general_panel" class="panel current">
20
- <table border="0" cellpadding="4" cellspacing="0">
21
- <tr>
22
- <td class="nowrap"><label for="src">{#advanced_dlg.image_src}</label></td>
23
- <td><table border="0" cellspacing="0" cellpadding="0">
24
- <tr>
25
- <td><input id="src" name="src" type="text" class="mceFocus" value="" style="width: 200px" onchange="ImageDialog.getImageData();" /></td>
26
- <td id="srcbrowsercontainer">&nbsp;</td>
27
- </tr>
28
- </table></td>
29
- </tr>
30
- <tr>
31
- <td><label for="image_list">{#advanced_dlg.image_list}</label></td>
32
- <td><select id="image_list" name="image_list" onchange="document.getElementById('src').value=this.options[this.selectedIndex].value;document.getElementById('alt').value=this.options[this.selectedIndex].text;"></select></td>
33
- </tr>
34
- <tr>
35
- <td class="nowrap"><label for="alt">{#advanced_dlg.image_alt}</label></td>
36
- <td><input id="alt" name="alt" type="text" value="" style="width: 200px" /></td>
37
- </tr>
38
- <tr>
39
- <td class="nowrap"><label for="align">{#advanced_dlg.image_align}</label></td>
40
- <td><select id="align" name="align" onchange="ImageDialog.updateStyle();">
41
- <option value="">{#not_set}</option>
42
- <option value="baseline">{#advanced_dlg.image_align_baseline}</option>
43
- <option value="top">{#advanced_dlg.image_align_top}</option>
44
- <option value="middle">{#advanced_dlg.image_align_middle}</option>
45
- <option value="bottom">{#advanced_dlg.image_align_bottom}</option>
46
- <option value="text-top">{#advanced_dlg.image_align_texttop}</option>
47
- <option value="text-bottom">{#advanced_dlg.image_align_textbottom}</option>
48
- <option value="left">{#advanced_dlg.image_align_left}</option>
49
- <option value="right">{#advanced_dlg.image_align_right}</option>
50
- </select></td>
51
- </tr>
52
- <tr>
53
- <td class="nowrap"><label for="width">{#advanced_dlg.image_dimensions}</label></td>
54
- <td><input id="width" name="width" type="text" value="" size="3" maxlength="5" />
55
- x
56
- <input id="height" name="height" type="text" value="" size="3" maxlength="5" /></td>
57
- </tr>
58
- <tr>
59
- <td class="nowrap"><label for="border">{#advanced_dlg.image_border}</label></td>
60
- <td><input id="border" name="border" type="text" value="" size="3" maxlength="3" onchange="ImageDialog.updateStyle();" /></td>
61
- </tr>
62
- <tr>
63
- <td class="nowrap"><label for="vspace">{#advanced_dlg.image_vspace}</label></td>
64
- <td><input id="vspace" name="vspace" type="text" value="" size="3" maxlength="3" onchange="ImageDialog.updateStyle();" /></td>
65
- </tr>
66
- <tr>
67
- <td class="nowrap"><label for="hspace">{#advanced_dlg.image_hspace}</label></td>
68
- <td><input id="hspace" name="hspace" type="text" value="" size="3" maxlength="3" onchange="ImageDialog.updateStyle();" /></td>
69
- </tr>
70
- </table>
71
- </div>
72
- </div>
73
-
74
- <div class="mceActionPanel">
75
- <input type="submit" id="insert" name="insert" value="{#insert}" />
76
- <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
77
- </div>
78
- </form>
79
- </body>
80
- </html>
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>{#advanced_dlg.image_title}</title>
5
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
7
+ <script type="text/javascript" src="../../utils/form_utils.js"></script>
8
+ <script type="text/javascript" src="js/image.js"></script>
9
+ </head>
10
+ <body id="image" style="display: none">
11
+ <form onsubmit="ImageDialog.update();return false;" action="#">
12
+ <div class="tabs">
13
+ <ul>
14
+ <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advanced_dlg.image_title}</a></span></li>
15
+ </ul>
16
+ </div>
17
+
18
+ <div class="panel_wrapper">
19
+ <div id="general_panel" class="panel current">
20
+ <table border="0" cellpadding="4" cellspacing="0">
21
+ <tr>
22
+ <td class="nowrap"><label for="src">{#advanced_dlg.image_src}</label></td>
23
+ <td><table border="0" cellspacing="0" cellpadding="0">
24
+ <tr>
25
+ <td><input id="src" name="src" type="text" class="mceFocus" value="" style="width: 200px" onchange="ImageDialog.getImageData();" /></td>
26
+ <td id="srcbrowsercontainer">&nbsp;</td>
27
+ </tr>
28
+ </table></td>
29
+ </tr>
30
+ <tr>
31
+ <td><label for="image_list">{#advanced_dlg.image_list}</label></td>
32
+ <td><select id="image_list" name="image_list" onchange="document.getElementById('src').value=this.options[this.selectedIndex].value;document.getElementById('alt').value=this.options[this.selectedIndex].text;"></select></td>
33
+ </tr>
34
+ <tr>
35
+ <td class="nowrap"><label for="alt">{#advanced_dlg.image_alt}</label></td>
36
+ <td><input id="alt" name="alt" type="text" value="" style="width: 200px" /></td>
37
+ </tr>
38
+ <tr>
39
+ <td class="nowrap"><label for="align">{#advanced_dlg.image_align}</label></td>
40
+ <td><select id="align" name="align" onchange="ImageDialog.updateStyle();">
41
+ <option value="">{#not_set}</option>
42
+ <option value="baseline">{#advanced_dlg.image_align_baseline}</option>
43
+ <option value="top">{#advanced_dlg.image_align_top}</option>
44
+ <option value="middle">{#advanced_dlg.image_align_middle}</option>
45
+ <option value="bottom">{#advanced_dlg.image_align_bottom}</option>
46
+ <option value="text-top">{#advanced_dlg.image_align_texttop}</option>
47
+ <option value="text-bottom">{#advanced_dlg.image_align_textbottom}</option>
48
+ <option value="left">{#advanced_dlg.image_align_left}</option>
49
+ <option value="right">{#advanced_dlg.image_align_right}</option>
50
+ </select></td>
51
+ </tr>
52
+ <tr>
53
+ <td class="nowrap"><label for="width">{#advanced_dlg.image_dimensions}</label></td>
54
+ <td><input id="width" name="width" type="text" value="" size="3" maxlength="5" />
55
+ x
56
+ <input id="height" name="height" type="text" value="" size="3" maxlength="5" /></td>
57
+ </tr>
58
+ <tr>
59
+ <td class="nowrap"><label for="border">{#advanced_dlg.image_border}</label></td>
60
+ <td><input id="border" name="border" type="text" value="" size="3" maxlength="3" onchange="ImageDialog.updateStyle();" /></td>
61
+ </tr>
62
+ <tr>
63
+ <td class="nowrap"><label for="vspace">{#advanced_dlg.image_vspace}</label></td>
64
+ <td><input id="vspace" name="vspace" type="text" value="" size="3" maxlength="3" onchange="ImageDialog.updateStyle();" /></td>
65
+ </tr>
66
+ <tr>
67
+ <td class="nowrap"><label for="hspace">{#advanced_dlg.image_hspace}</label></td>
68
+ <td><input id="hspace" name="hspace" type="text" value="" size="3" maxlength="3" onchange="ImageDialog.updateStyle();" /></td>
69
+ </tr>
70
+ </table>
71
+ </div>
72
+ </div>
73
+
74
+ <div class="mceActionPanel">
75
+ <input type="submit" id="insert" name="insert" value="{#insert}" />
76
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
77
+ </div>
78
+ </form>
79
+ </body>
80
+ </html>
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/js/about.js CHANGED
@@ -1,73 +1,73 @@
1
- tinyMCEPopup.requireLangPack();
2
-
3
- function init() {
4
- var ed, tcont;
5
-
6
- tinyMCEPopup.resizeToInnerSize();
7
- ed = tinyMCEPopup.editor;
8
-
9
- // Give FF some time
10
- window.setTimeout(insertHelpIFrame, 10);
11
-
12
- tcont = document.getElementById('plugintablecontainer');
13
- document.getElementById('plugins_tab').style.display = 'none';
14
-
15
- var html = "";
16
- html += '<table id="plugintable">';
17
- html += '<thead>';
18
- html += '<tr>';
19
- html += '<td>' + ed.getLang('advanced_dlg.about_plugin') + '</td>';
20
- html += '<td>' + ed.getLang('advanced_dlg.about_author') + '</td>';
21
- html += '<td>' + ed.getLang('advanced_dlg.about_version') + '</td>';
22
- html += '</tr>';
23
- html += '</thead>';
24
- html += '<tbody>';
25
-
26
- tinymce.each(ed.plugins, function(p, n) {
27
- var info;
28
-
29
- if (!p.getInfo)
30
- return;
31
-
32
- html += '<tr>';
33
-
34
- info = p.getInfo();
35
-
36
- if (info.infourl != null && info.infourl != '')
37
- html += '<td width="50%" title="' + n + '"><a href="' + info.infourl + '" target="_blank">' + info.longname + '</a></td>';
38
- else
39
- html += '<td width="50%" title="' + n + '">' + info.longname + '</td>';
40
-
41
- if (info.authorurl != null && info.authorurl != '')
42
- html += '<td width="35%"><a href="' + info.authorurl + '" target="_blank">' + info.author + '</a></td>';
43
- else
44
- html += '<td width="35%">' + info.author + '</td>';
45
-
46
- html += '<td width="15%">' + info.version + '</td>';
47
- html += '</tr>';
48
-
49
- document.getElementById('plugins_tab').style.display = '';
50
-
51
- });
52
-
53
- html += '</tbody>';
54
- html += '</table>';
55
-
56
- tcont.innerHTML = html;
57
-
58
- tinyMCEPopup.dom.get('version').innerHTML = tinymce.majorVersion + "." + tinymce.minorVersion;
59
- tinyMCEPopup.dom.get('date').innerHTML = tinymce.releaseDate;
60
- }
61
-
62
- function insertHelpIFrame() {
63
- var html;
64
-
65
- if (tinyMCEPopup.getParam('docs_url')) {
66
- html = '<iframe width="100%" height="300" src="' + tinyMCEPopup.editor.baseURI.toAbsolute(tinyMCEPopup.getParam('docs_url')) + '"></iframe>';
67
- document.getElementById('iframecontainer').innerHTML = html;
68
- document.getElementById('help_tab').style.display = 'block';
69
- document.getElementById('help_tab').setAttribute("aria-hidden", "false");
70
- }
71
- }
72
-
73
- tinyMCEPopup.onInit.add(init);
1
+ tinyMCEPopup.requireLangPack();
2
+
3
+ function init() {
4
+ var ed, tcont;
5
+
6
+ tinyMCEPopup.resizeToInnerSize();
7
+ ed = tinyMCEPopup.editor;
8
+
9
+ // Give FF some time
10
+ window.setTimeout(insertHelpIFrame, 10);
11
+
12
+ tcont = document.getElementById('plugintablecontainer');
13
+ document.getElementById('plugins_tab').style.display = 'none';
14
+
15
+ var html = "";
16
+ html += '<table id="plugintable">';
17
+ html += '<thead>';
18
+ html += '<tr>';
19
+ html += '<td>' + ed.getLang('advanced_dlg.about_plugin') + '</td>';
20
+ html += '<td>' + ed.getLang('advanced_dlg.about_author') + '</td>';
21
+ html += '<td>' + ed.getLang('advanced_dlg.about_version') + '</td>';
22
+ html += '</tr>';
23
+ html += '</thead>';
24
+ html += '<tbody>';
25
+
26
+ tinymce.each(ed.plugins, function(p, n) {
27
+ var info;
28
+
29
+ if (!p.getInfo)
30
+ return;
31
+
32
+ html += '<tr>';
33
+
34
+ info = p.getInfo();
35
+
36
+ if (info.infourl != null && info.infourl != '')
37
+ html += '<td width="50%" title="' + n + '"><a href="' + info.infourl + '" target="_blank">' + info.longname + '</a></td>';
38
+ else
39
+ html += '<td width="50%" title="' + n + '">' + info.longname + '</td>';
40
+
41
+ if (info.authorurl != null && info.authorurl != '')
42
+ html += '<td width="35%"><a href="' + info.authorurl + '" target="_blank">' + info.author + '</a></td>';
43
+ else
44
+ html += '<td width="35%">' + info.author + '</td>';
45
+
46
+ html += '<td width="15%">' + info.version + '</td>';
47
+ html += '</tr>';
48
+
49
+ document.getElementById('plugins_tab').style.display = '';
50
+
51
+ });
52
+
53
+ html += '</tbody>';
54
+ html += '</table>';
55
+
56
+ tcont.innerHTML = html;
57
+
58
+ tinyMCEPopup.dom.get('version').innerHTML = tinymce.majorVersion + "." + tinymce.minorVersion;
59
+ tinyMCEPopup.dom.get('date').innerHTML = tinymce.releaseDate;
60
+ }
61
+
62
+ function insertHelpIFrame() {
63
+ var html;
64
+
65
+ if (tinyMCEPopup.getParam('docs_url')) {
66
+ html = '<iframe width="100%" height="300" src="' + tinyMCEPopup.editor.baseURI.toAbsolute(tinyMCEPopup.getParam('docs_url')) + '"></iframe>';
67
+ document.getElementById('iframecontainer').innerHTML = html;
68
+ document.getElementById('help_tab').style.display = 'block';
69
+ document.getElementById('help_tab').setAttribute("aria-hidden", "false");
70
+ }
71
+ }
72
+
73
+ tinyMCEPopup.onInit.add(init);
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/js/anchor.js CHANGED
@@ -1,56 +1,56 @@
1
- tinyMCEPopup.requireLangPack();
2
-
3
- var AnchorDialog = {
4
- init : function(ed) {
5
- var action, elm, f = document.forms[0];
6
-
7
- this.editor = ed;
8
- elm = ed.dom.getParent(ed.selection.getNode(), 'A');
9
- v = ed.dom.getAttrib(elm, 'name') || ed.dom.getAttrib(elm, 'id');
10
-
11
- if (v) {
12
- this.action = 'update';
13
- f.anchorName.value = v;
14
- }
15
-
16
- f.insert.value = ed.getLang(elm ? 'update' : 'insert');
17
- },
18
-
19
- update : function() {
20
- var ed = this.editor, elm, name = document.forms[0].anchorName.value, attribName;
21
-
22
- if (!name || !/^[a-z][a-z0-9\-\_:\.]*$/i.test(name)) {
23
- tinyMCEPopup.alert('advanced_dlg.anchor_invalid');
24
- return;
25
- }
26
-
27
- tinyMCEPopup.restoreSelection();
28
-
29
- if (this.action != 'update')
30
- ed.selection.collapse(1);
31
-
32
- var aRule = ed.schema.getElementRule('a');
33
- if (!aRule || aRule.attributes.name) {
34
- attribName = 'name';
35
- } else {
36
- attribName = 'id';
37
- }
38
-
39
- elm = ed.dom.getParent(ed.selection.getNode(), 'A');
40
- if (elm) {
41
- elm.setAttribute(attribName, name);
42
- elm[attribName] = name;
43
- ed.undoManager.add();
44
- } else {
45
- // create with zero-sized nbsp so that in Webkit where anchor is on last line by itself caret cannot be placed after it
46
- var attrs = {'class' : 'mceItemAnchor'};
47
- attrs[attribName] = name;
48
- ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', attrs, '\uFEFF'));
49
- ed.nodeChanged();
50
- }
51
-
52
- tinyMCEPopup.close();
53
- }
54
- };
55
-
56
- tinyMCEPopup.onInit.add(AnchorDialog.init, AnchorDialog);
1
+ tinyMCEPopup.requireLangPack();
2
+
3
+ var AnchorDialog = {
4
+ init : function(ed) {
5
+ var action, elm, f = document.forms[0];
6
+
7
+ this.editor = ed;
8
+ elm = ed.dom.getParent(ed.selection.getNode(), 'A');
9
+ v = ed.dom.getAttrib(elm, 'name') || ed.dom.getAttrib(elm, 'id');
10
+
11
+ if (v) {
12
+ this.action = 'update';
13
+ f.anchorName.value = v;
14
+ }
15
+
16
+ f.insert.value = ed.getLang(elm ? 'update' : 'insert');
17
+ },
18
+
19
+ update : function() {
20
+ var ed = this.editor, elm, name = document.forms[0].anchorName.value, attribName;
21
+
22
+ if (!name || !/^[a-z][a-z0-9\-\_:\.]*$/i.test(name)) {
23
+ tinyMCEPopup.alert('advanced_dlg.anchor_invalid');
24
+ return;
25
+ }
26
+
27
+ tinyMCEPopup.restoreSelection();
28
+
29
+ if (this.action != 'update')
30
+ ed.selection.collapse(1);
31
+
32
+ var aRule = ed.schema.getElementRule('a');
33
+ if (!aRule || aRule.attributes.name) {
34
+ attribName = 'name';
35
+ } else {
36
+ attribName = 'id';
37
+ }
38
+
39
+ elm = ed.dom.getParent(ed.selection.getNode(), 'A');
40
+ if (elm) {
41
+ elm.setAttribute(attribName, name);
42
+ elm[attribName] = name;
43
+ ed.undoManager.add();
44
+ } else {
45
+ // create with zero-sized nbsp so that in Webkit where anchor is on last line by itself caret cannot be placed after it
46
+ var attrs = {'class' : 'mceItemAnchor'};
47
+ attrs[attribName] = name;
48
+ ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', attrs, '\uFEFF'));
49
+ ed.nodeChanged();
50
+ }
51
+
52
+ tinyMCEPopup.close();
53
+ }
54
+ };
55
+
56
+ tinyMCEPopup.onInit.add(AnchorDialog.init, AnchorDialog);
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/js/charmap.js CHANGED
@@ -1,363 +1,363 @@
1
- /**
2
- * charmap.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
- var charmap = [
14
- ['&nbsp;', '&#160;', true, 'no-break space'],
15
- ['&amp;', '&#38;', true, 'ampersand'],
16
- ['&quot;', '&#34;', true, 'quotation mark'],
17
- // finance
18
- ['&cent;', '&#162;', true, 'cent sign'],
19
- ['&euro;', '&#8364;', true, 'euro sign'],
20
- ['&pound;', '&#163;', true, 'pound sign'],
21
- ['&yen;', '&#165;', true, 'yen sign'],
22
- // signs
23
- ['&copy;', '&#169;', true, 'copyright sign'],
24
- ['&reg;', '&#174;', true, 'registered sign'],
25
- ['&trade;', '&#8482;', true, 'trade mark sign'],
26
- ['&permil;', '&#8240;', true, 'per mille sign'],
27
- ['&micro;', '&#181;', true, 'micro sign'],
28
- ['&middot;', '&#183;', true, 'middle dot'],
29
- ['&bull;', '&#8226;', true, 'bullet'],
30
- ['&hellip;', '&#8230;', true, 'three dot leader'],
31
- ['&prime;', '&#8242;', true, 'minutes / feet'],
32
- ['&Prime;', '&#8243;', true, 'seconds / inches'],
33
- ['&sect;', '&#167;', true, 'section sign'],
34
- ['&para;', '&#182;', true, 'paragraph sign'],
35
- ['&szlig;', '&#223;', true, 'sharp s / ess-zed'],
36
- // quotations
37
- ['&lsaquo;', '&#8249;', true, 'single left-pointing angle quotation mark'],
38
- ['&rsaquo;', '&#8250;', true, 'single right-pointing angle quotation mark'],
39
- ['&laquo;', '&#171;', true, 'left pointing guillemet'],
40
- ['&raquo;', '&#187;', true, 'right pointing guillemet'],
41
- ['&lsquo;', '&#8216;', true, 'left single quotation mark'],
42
- ['&rsquo;', '&#8217;', true, 'right single quotation mark'],
43
- ['&ldquo;', '&#8220;', true, 'left double quotation mark'],
44
- ['&rdquo;', '&#8221;', true, 'right double quotation mark'],
45
- ['&sbquo;', '&#8218;', true, 'single low-9 quotation mark'],
46
- ['&bdquo;', '&#8222;', true, 'double low-9 quotation mark'],
47
- ['&lt;', '&#60;', true, 'less-than sign'],
48
- ['&gt;', '&#62;', true, 'greater-than sign'],
49
- ['&le;', '&#8804;', true, 'less-than or equal to'],
50
- ['&ge;', '&#8805;', true, 'greater-than or equal to'],
51
- ['&ndash;', '&#8211;', true, 'en dash'],
52
- ['&mdash;', '&#8212;', true, 'em dash'],
53
- ['&macr;', '&#175;', true, 'macron'],
54
- ['&oline;', '&#8254;', true, 'overline'],
55
- ['&curren;', '&#164;', true, 'currency sign'],
56
- ['&brvbar;', '&#166;', true, 'broken bar'],
57
- ['&uml;', '&#168;', true, 'diaeresis'],
58
- ['&iexcl;', '&#161;', true, 'inverted exclamation mark'],
59
- ['&iquest;', '&#191;', true, 'turned question mark'],
60
- ['&circ;', '&#710;', true, 'circumflex accent'],
61
- ['&tilde;', '&#732;', true, 'small tilde'],
62
- ['&deg;', '&#176;', true, 'degree sign'],
63
- ['&minus;', '&#8722;', true, 'minus sign'],
64
- ['&plusmn;', '&#177;', true, 'plus-minus sign'],
65
- ['&divide;', '&#247;', true, 'division sign'],
66
- ['&frasl;', '&#8260;', true, 'fraction slash'],
67
- ['&times;', '&#215;', true, 'multiplication sign'],
68
- ['&sup1;', '&#185;', true, 'superscript one'],
69
- ['&sup2;', '&#178;', true, 'superscript two'],
70
- ['&sup3;', '&#179;', true, 'superscript three'],
71
- ['&frac14;', '&#188;', true, 'fraction one quarter'],
72
- ['&frac12;', '&#189;', true, 'fraction one half'],
73
- ['&frac34;', '&#190;', true, 'fraction three quarters'],
74
- // math / logical
75
- ['&fnof;', '&#402;', true, 'function / florin'],
76
- ['&int;', '&#8747;', true, 'integral'],
77
- ['&sum;', '&#8721;', true, 'n-ary sumation'],
78
- ['&infin;', '&#8734;', true, 'infinity'],
79
- ['&radic;', '&#8730;', true, 'square root'],
80
- ['&sim;', '&#8764;', false,'similar to'],
81
- ['&cong;', '&#8773;', false,'approximately equal to'],
82
- ['&asymp;', '&#8776;', true, 'almost equal to'],
83
- ['&ne;', '&#8800;', true, 'not equal to'],
84
- ['&equiv;', '&#8801;', true, 'identical to'],
85
- ['&isin;', '&#8712;', false,'element of'],
86
- ['&notin;', '&#8713;', false,'not an element of'],
87
- ['&ni;', '&#8715;', false,'contains as member'],
88
- ['&prod;', '&#8719;', true, 'n-ary product'],
89
- ['&and;', '&#8743;', false,'logical and'],
90
- ['&or;', '&#8744;', false,'logical or'],
91
- ['&not;', '&#172;', true, 'not sign'],
92
- ['&cap;', '&#8745;', true, 'intersection'],
93
- ['&cup;', '&#8746;', false,'union'],
94
- ['&part;', '&#8706;', true, 'partial differential'],
95
- ['&forall;', '&#8704;', false,'for all'],
96
- ['&exist;', '&#8707;', false,'there exists'],
97
- ['&empty;', '&#8709;', false,'diameter'],
98
- ['&nabla;', '&#8711;', false,'backward difference'],
99
- ['&lowast;', '&#8727;', false,'asterisk operator'],
100
- ['&prop;', '&#8733;', false,'proportional to'],
101
- ['&ang;', '&#8736;', false,'angle'],
102
- // undefined
103
- ['&acute;', '&#180;', true, 'acute accent'],
104
- ['&cedil;', '&#184;', true, 'cedilla'],
105
- ['&ordf;', '&#170;', true, 'feminine ordinal indicator'],
106
- ['&ordm;', '&#186;', true, 'masculine ordinal indicator'],
107
- ['&dagger;', '&#8224;', true, 'dagger'],
108
- ['&Dagger;', '&#8225;', true, 'double dagger'],
109
- // alphabetical special chars
110
- ['&Agrave;', '&#192;', true, 'A - grave'],
111
- ['&Aacute;', '&#193;', true, 'A - acute'],
112
- ['&Acirc;', '&#194;', true, 'A - circumflex'],
113
- ['&Atilde;', '&#195;', true, 'A - tilde'],
114
- ['&Auml;', '&#196;', true, 'A - diaeresis'],
115
- ['&Aring;', '&#197;', true, 'A - ring above'],
116
- ['&AElig;', '&#198;', true, 'ligature AE'],
117
- ['&Ccedil;', '&#199;', true, 'C - cedilla'],
118
- ['&Egrave;', '&#200;', true, 'E - grave'],
119
- ['&Eacute;', '&#201;', true, 'E - acute'],
120
- ['&Ecirc;', '&#202;', true, 'E - circumflex'],
121
- ['&Euml;', '&#203;', true, 'E - diaeresis'],
122
- ['&Igrave;', '&#204;', true, 'I - grave'],
123
- ['&Iacute;', '&#205;', true, 'I - acute'],
124
- ['&Icirc;', '&#206;', true, 'I - circumflex'],
125
- ['&Iuml;', '&#207;', true, 'I - diaeresis'],
126
- ['&ETH;', '&#208;', true, 'ETH'],
127
- ['&Ntilde;', '&#209;', true, 'N - tilde'],
128
- ['&Ograve;', '&#210;', true, 'O - grave'],
129
- ['&Oacute;', '&#211;', true, 'O - acute'],
130
- ['&Ocirc;', '&#212;', true, 'O - circumflex'],
131
- ['&Otilde;', '&#213;', true, 'O - tilde'],
132
- ['&Ouml;', '&#214;', true, 'O - diaeresis'],
133
- ['&Oslash;', '&#216;', true, 'O - slash'],
134
- ['&OElig;', '&#338;', true, 'ligature OE'],
135
- ['&Scaron;', '&#352;', true, 'S - caron'],
136
- ['&Ugrave;', '&#217;', true, 'U - grave'],
137
- ['&Uacute;', '&#218;', true, 'U - acute'],
138
- ['&Ucirc;', '&#219;', true, 'U - circumflex'],
139
- ['&Uuml;', '&#220;', true, 'U - diaeresis'],
140
- ['&Yacute;', '&#221;', true, 'Y - acute'],
141
- ['&Yuml;', '&#376;', true, 'Y - diaeresis'],
142
- ['&THORN;', '&#222;', true, 'THORN'],
143
- ['&agrave;', '&#224;', true, 'a - grave'],
144
- ['&aacute;', '&#225;', true, 'a - acute'],
145
- ['&acirc;', '&#226;', true, 'a - circumflex'],
146
- ['&atilde;', '&#227;', true, 'a - tilde'],
147
- ['&auml;', '&#228;', true, 'a - diaeresis'],
148
- ['&aring;', '&#229;', true, 'a - ring above'],
149
- ['&aelig;', '&#230;', true, 'ligature ae'],
150
- ['&ccedil;', '&#231;', true, 'c - cedilla'],
151
- ['&egrave;', '&#232;', true, 'e - grave'],
152
- ['&eacute;', '&#233;', true, 'e - acute'],
153
- ['&ecirc;', '&#234;', true, 'e - circumflex'],
154
- ['&euml;', '&#235;', true, 'e - diaeresis'],
155
- ['&igrave;', '&#236;', true, 'i - grave'],
156
- ['&iacute;', '&#237;', true, 'i - acute'],
157
- ['&icirc;', '&#238;', true, 'i - circumflex'],
158
- ['&iuml;', '&#239;', true, 'i - diaeresis'],
159
- ['&eth;', '&#240;', true, 'eth'],
160
- ['&ntilde;', '&#241;', true, 'n - tilde'],
161
- ['&ograve;', '&#242;', true, 'o - grave'],
162
- ['&oacute;', '&#243;', true, 'o - acute'],
163
- ['&ocirc;', '&#244;', true, 'o - circumflex'],
164
- ['&otilde;', '&#245;', true, 'o - tilde'],
165
- ['&ouml;', '&#246;', true, 'o - diaeresis'],
166
- ['&oslash;', '&#248;', true, 'o slash'],
167
- ['&oelig;', '&#339;', true, 'ligature oe'],
168
- ['&scaron;', '&#353;', true, 's - caron'],
169
- ['&ugrave;', '&#249;', true, 'u - grave'],
170
- ['&uacute;', '&#250;', true, 'u - acute'],
171
- ['&ucirc;', '&#251;', true, 'u - circumflex'],
172
- ['&uuml;', '&#252;', true, 'u - diaeresis'],
173
- ['&yacute;', '&#253;', true, 'y - acute'],
174
- ['&thorn;', '&#254;', true, 'thorn'],
175
- ['&yuml;', '&#255;', true, 'y - diaeresis'],
176
- ['&Alpha;', '&#913;', true, 'Alpha'],
177
- ['&Beta;', '&#914;', true, 'Beta'],
178
- ['&Gamma;', '&#915;', true, 'Gamma'],
179
- ['&Delta;', '&#916;', true, 'Delta'],
180
- ['&Epsilon;', '&#917;', true, 'Epsilon'],
181
- ['&Zeta;', '&#918;', true, 'Zeta'],
182
- ['&Eta;', '&#919;', true, 'Eta'],
183
- ['&Theta;', '&#920;', true, 'Theta'],
184
- ['&Iota;', '&#921;', true, 'Iota'],
185
- ['&Kappa;', '&#922;', true, 'Kappa'],
186
- ['&Lambda;', '&#923;', true, 'Lambda'],
187
- ['&Mu;', '&#924;', true, 'Mu'],
188
- ['&Nu;', '&#925;', true, 'Nu'],
189
- ['&Xi;', '&#926;', true, 'Xi'],
190
- ['&Omicron;', '&#927;', true, 'Omicron'],
191
- ['&Pi;', '&#928;', true, 'Pi'],
192
- ['&Rho;', '&#929;', true, 'Rho'],
193
- ['&Sigma;', '&#931;', true, 'Sigma'],
194
- ['&Tau;', '&#932;', true, 'Tau'],
195
- ['&Upsilon;', '&#933;', true, 'Upsilon'],
196
- ['&Phi;', '&#934;', true, 'Phi'],
197
- ['&Chi;', '&#935;', true, 'Chi'],
198
- ['&Psi;', '&#936;', true, 'Psi'],
199
- ['&Omega;', '&#937;', true, 'Omega'],
200
- ['&alpha;', '&#945;', true, 'alpha'],
201
- ['&beta;', '&#946;', true, 'beta'],
202
- ['&gamma;', '&#947;', true, 'gamma'],
203
- ['&delta;', '&#948;', true, 'delta'],
204
- ['&epsilon;', '&#949;', true, 'epsilon'],
205
- ['&zeta;', '&#950;', true, 'zeta'],
206
- ['&eta;', '&#951;', true, 'eta'],
207
- ['&theta;', '&#952;', true, 'theta'],
208
- ['&iota;', '&#953;', true, 'iota'],
209
- ['&kappa;', '&#954;', true, 'kappa'],
210
- ['&lambda;', '&#955;', true, 'lambda'],
211
- ['&mu;', '&#956;', true, 'mu'],
212
- ['&nu;', '&#957;', true, 'nu'],
213
- ['&xi;', '&#958;', true, 'xi'],
214
- ['&omicron;', '&#959;', true, 'omicron'],
215
- ['&pi;', '&#960;', true, 'pi'],
216
- ['&rho;', '&#961;', true, 'rho'],
217
- ['&sigmaf;', '&#962;', true, 'final sigma'],
218
- ['&sigma;', '&#963;', true, 'sigma'],
219
- ['&tau;', '&#964;', true, 'tau'],
220
- ['&upsilon;', '&#965;', true, 'upsilon'],
221
- ['&phi;', '&#966;', true, 'phi'],
222
- ['&chi;', '&#967;', true, 'chi'],
223
- ['&psi;', '&#968;', true, 'psi'],
224
- ['&omega;', '&#969;', true, 'omega'],
225
- // symbols
226
- ['&alefsym;', '&#8501;', false,'alef symbol'],
227
- ['&piv;', '&#982;', false,'pi symbol'],
228
- ['&real;', '&#8476;', false,'real part symbol'],
229
- ['&thetasym;','&#977;', false,'theta symbol'],
230
- ['&upsih;', '&#978;', false,'upsilon - hook symbol'],
231
- ['&weierp;', '&#8472;', false,'Weierstrass p'],
232
- ['&image;', '&#8465;', false,'imaginary part'],
233
- // arrows
234
- ['&larr;', '&#8592;', true, 'leftwards arrow'],
235
- ['&uarr;', '&#8593;', true, 'upwards arrow'],
236
- ['&rarr;', '&#8594;', true, 'rightwards arrow'],
237
- ['&darr;', '&#8595;', true, 'downwards arrow'],
238
- ['&harr;', '&#8596;', true, 'left right arrow'],
239
- ['&crarr;', '&#8629;', false,'carriage return'],
240
- ['&lArr;', '&#8656;', false,'leftwards double arrow'],
241
- ['&uArr;', '&#8657;', false,'upwards double arrow'],
242
- ['&rArr;', '&#8658;', false,'rightwards double arrow'],
243
- ['&dArr;', '&#8659;', false,'downwards double arrow'],
244
- ['&hArr;', '&#8660;', false,'left right double arrow'],
245
- ['&there4;', '&#8756;', false,'therefore'],
246
- ['&sub;', '&#8834;', false,'subset of'],
247
- ['&sup;', '&#8835;', false,'superset of'],
248
- ['&nsub;', '&#8836;', false,'not a subset of'],
249
- ['&sube;', '&#8838;', false,'subset of or equal to'],
250
- ['&supe;', '&#8839;', false,'superset of or equal to'],
251
- ['&oplus;', '&#8853;', false,'circled plus'],
252
- ['&otimes;', '&#8855;', false,'circled times'],
253
- ['&perp;', '&#8869;', false,'perpendicular'],
254
- ['&sdot;', '&#8901;', false,'dot operator'],
255
- ['&lceil;', '&#8968;', false,'left ceiling'],
256
- ['&rceil;', '&#8969;', false,'right ceiling'],
257
- ['&lfloor;', '&#8970;', false,'left floor'],
258
- ['&rfloor;', '&#8971;', false,'right floor'],
259
- ['&lang;', '&#9001;', false,'left-pointing angle bracket'],
260
- ['&rang;', '&#9002;', false,'right-pointing angle bracket'],
261
- ['&loz;', '&#9674;', true, 'lozenge'],
262
- ['&spades;', '&#9824;', true, 'black spade suit'],
263
- ['&clubs;', '&#9827;', true, 'black club suit'],
264
- ['&hearts;', '&#9829;', true, 'black heart suit'],
265
- ['&diams;', '&#9830;', true, 'black diamond suit'],
266
- ['&ensp;', '&#8194;', false,'en space'],
267
- ['&emsp;', '&#8195;', false,'em space'],
268
- ['&thinsp;', '&#8201;', false,'thin space'],
269
- ['&zwnj;', '&#8204;', false,'zero width non-joiner'],
270
- ['&zwj;', '&#8205;', false,'zero width joiner'],
271
- ['&lrm;', '&#8206;', false,'left-to-right mark'],
272
- ['&rlm;', '&#8207;', false,'right-to-left mark'],
273
- ['&shy;', '&#173;', false,'soft hyphen']
274
- ];
275
-
276
- tinyMCEPopup.onInit.add(function() {
277
- tinyMCEPopup.dom.setHTML('charmapView', renderCharMapHTML());
278
- addKeyboardNavigation();
279
- });
280
-
281
- function addKeyboardNavigation(){
282
- var tableElm, cells, settings;
283
-
284
- cells = tinyMCEPopup.dom.select("a.charmaplink", "charmapgroup");
285
-
286
- settings ={
287
- root: "charmapgroup",
288
- items: cells
289
- };
290
- cells[0].tabindex=0;
291
- tinyMCEPopup.dom.addClass(cells[0], "mceFocus");
292
- if (tinymce.isGecko) {
293
- cells[0].focus();
294
- } else {
295
- setTimeout(function(){
296
- cells[0].focus();
297
- }, 100);
298
- }
299
- tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', settings, tinyMCEPopup.dom);
300
- }
301
-
302
- function renderCharMapHTML() {
303
- var charsPerRow = 20, tdWidth=20, tdHeight=20, i;
304
- var html = '<div id="charmapgroup" aria-labelledby="charmap_label" tabindex="0" role="listbox">'+
305
- '<table role="presentation" border="0" cellspacing="1" cellpadding="0" width="' + (tdWidth*charsPerRow) +
306
- '"><tr height="' + tdHeight + '">';
307
- var cols=-1;
308
-
309
- for (i=0; i<charmap.length; i++) {
310
- var previewCharFn;
311
-
312
- if (charmap[i][2]==true) {
313
- cols++;
314
- previewCharFn = 'previewChar(\'' + charmap[i][1].substring(1,charmap[i][1].length) + '\',\'' + charmap[i][0].substring(1,charmap[i][0].length) + '\',\'' + charmap[i][3] + '\');';
315
- html += ''
316
- + '<td class="charmap">'
317
- + '<a class="charmaplink" role="button" onmouseover="'+previewCharFn+'" onfocus="'+previewCharFn+'" href="javascript:void(0)" onclick="insertChar(\'' + charmap[i][1].substring(2,charmap[i][1].length-1) + '\');" onclick="return false;" onmousedown="return false;" title="' + charmap[i][3] + ' '+ tinyMCEPopup.editor.translate("advanced_dlg.charmap_usage")+'">'
318
- + charmap[i][1]
319
- + '</a></td>';
320
- if ((cols+1) % charsPerRow == 0)
321
- html += '</tr><tr height="' + tdHeight + '">';
322
- }
323
- }
324
-
325
- if (cols % charsPerRow > 0) {
326
- var padd = charsPerRow - (cols % charsPerRow);
327
- for (var i=0; i<padd-1; i++)
328
- html += '<td width="' + tdWidth + '" height="' + tdHeight + '" class="charmap">&nbsp;</td>';
329
- }
330
-
331
- html += '</tr></table></div>';
332
- html = html.replace(/<tr height="20"><\/tr>/g, '');
333
-
334
- return html;
335
- }
336
-
337
- function insertChar(chr) {
338
- tinyMCEPopup.execCommand('mceInsertContent', false, '&#' + chr + ';');
339
-
340
- // Refocus in window
341
- if (tinyMCEPopup.isWindow)
342
- window.focus();
343
-
344
- tinyMCEPopup.editor.focus();
345
- tinyMCEPopup.close();
346
- }
347
-
348
- function previewChar(codeA, codeB, codeN) {
349
- var elmA = document.getElementById('codeA');
350
- var elmB = document.getElementById('codeB');
351
- var elmV = document.getElementById('codeV');
352
- var elmN = document.getElementById('codeN');
353
-
354
- if (codeA=='#160;') {
355
- elmV.innerHTML = '__';
356
- } else {
357
- elmV.innerHTML = '&' + codeA;
358
- }
359
-
360
- elmB.innerHTML = '&amp;' + codeA;
361
- elmA.innerHTML = '&amp;' + codeB;
362
- elmN.innerHTML = codeN;
363
- }
1
+ /**
2
+ * charmap.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
+ var charmap = [
14
+ ['&nbsp;', '&#160;', true, 'no-break space'],
15
+ ['&amp;', '&#38;', true, 'ampersand'],
16
+ ['&quot;', '&#34;', true, 'quotation mark'],
17
+ // finance
18
+ ['&cent;', '&#162;', true, 'cent sign'],
19
+ ['&euro;', '&#8364;', true, 'euro sign'],
20
+ ['&pound;', '&#163;', true, 'pound sign'],
21
+ ['&yen;', '&#165;', true, 'yen sign'],
22
+ // signs
23
+ ['&copy;', '&#169;', true, 'copyright sign'],
24
+ ['&reg;', '&#174;', true, 'registered sign'],
25
+ ['&trade;', '&#8482;', true, 'trade mark sign'],
26
+ ['&permil;', '&#8240;', true, 'per mille sign'],
27
+ ['&micro;', '&#181;', true, 'micro sign'],
28
+ ['&middot;', '&#183;', true, 'middle dot'],
29
+ ['&bull;', '&#8226;', true, 'bullet'],
30
+ ['&hellip;', '&#8230;', true, 'three dot leader'],
31
+ ['&prime;', '&#8242;', true, 'minutes / feet'],
32
+ ['&Prime;', '&#8243;', true, 'seconds / inches'],
33
+ ['&sect;', '&#167;', true, 'section sign'],
34
+ ['&para;', '&#182;', true, 'paragraph sign'],
35
+ ['&szlig;', '&#223;', true, 'sharp s / ess-zed'],
36
+ // quotations
37
+ ['&lsaquo;', '&#8249;', true, 'single left-pointing angle quotation mark'],
38
+ ['&rsaquo;', '&#8250;', true, 'single right-pointing angle quotation mark'],
39
+ ['&laquo;', '&#171;', true, 'left pointing guillemet'],
40
+ ['&raquo;', '&#187;', true, 'right pointing guillemet'],
41
+ ['&lsquo;', '&#8216;', true, 'left single quotation mark'],
42
+ ['&rsquo;', '&#8217;', true, 'right single quotation mark'],
43
+ ['&ldquo;', '&#8220;', true, 'left double quotation mark'],
44
+ ['&rdquo;', '&#8221;', true, 'right double quotation mark'],
45
+ ['&sbquo;', '&#8218;', true, 'single low-9 quotation mark'],
46
+ ['&bdquo;', '&#8222;', true, 'double low-9 quotation mark'],
47
+ ['&lt;', '&#60;', true, 'less-than sign'],
48
+ ['&gt;', '&#62;', true, 'greater-than sign'],
49
+ ['&le;', '&#8804;', true, 'less-than or equal to'],
50
+ ['&ge;', '&#8805;', true, 'greater-than or equal to'],
51
+ ['&ndash;', '&#8211;', true, 'en dash'],
52
+ ['&mdash;', '&#8212;', true, 'em dash'],
53
+ ['&macr;', '&#175;', true, 'macron'],
54
+ ['&oline;', '&#8254;', true, 'overline'],
55
+ ['&curren;', '&#164;', true, 'currency sign'],
56
+ ['&brvbar;', '&#166;', true, 'broken bar'],
57
+ ['&uml;', '&#168;', true, 'diaeresis'],
58
+ ['&iexcl;', '&#161;', true, 'inverted exclamation mark'],
59
+ ['&iquest;', '&#191;', true, 'turned question mark'],
60
+ ['&circ;', '&#710;', true, 'circumflex accent'],
61
+ ['&tilde;', '&#732;', true, 'small tilde'],
62
+ ['&deg;', '&#176;', true, 'degree sign'],
63
+ ['&minus;', '&#8722;', true, 'minus sign'],
64
+ ['&plusmn;', '&#177;', true, 'plus-minus sign'],
65
+ ['&divide;', '&#247;', true, 'division sign'],
66
+ ['&frasl;', '&#8260;', true, 'fraction slash'],
67
+ ['&times;', '&#215;', true, 'multiplication sign'],
68
+ ['&sup1;', '&#185;', true, 'superscript one'],
69
+ ['&sup2;', '&#178;', true, 'superscript two'],
70
+ ['&sup3;', '&#179;', true, 'superscript three'],
71
+ ['&frac14;', '&#188;', true, 'fraction one quarter'],
72
+ ['&frac12;', '&#189;', true, 'fraction one half'],
73
+ ['&frac34;', '&#190;', true, 'fraction three quarters'],
74
+ // math / logical
75
+ ['&fnof;', '&#402;', true, 'function / florin'],
76
+ ['&int;', '&#8747;', true, 'integral'],
77
+ ['&sum;', '&#8721;', true, 'n-ary sumation'],
78
+ ['&infin;', '&#8734;', true, 'infinity'],
79
+ ['&radic;', '&#8730;', true, 'square root'],
80
+ ['&sim;', '&#8764;', false,'similar to'],
81
+ ['&cong;', '&#8773;', false,'approximately equal to'],
82
+ ['&asymp;', '&#8776;', true, 'almost equal to'],
83
+ ['&ne;', '&#8800;', true, 'not equal to'],
84
+ ['&equiv;', '&#8801;', true, 'identical to'],
85
+ ['&isin;', '&#8712;', false,'element of'],
86
+ ['&notin;', '&#8713;', false,'not an element of'],
87
+ ['&ni;', '&#8715;', false,'contains as member'],
88
+ ['&prod;', '&#8719;', true, 'n-ary product'],
89
+ ['&and;', '&#8743;', false,'logical and'],
90
+ ['&or;', '&#8744;', false,'logical or'],
91
+ ['&not;', '&#172;', true, 'not sign'],
92
+ ['&cap;', '&#8745;', true, 'intersection'],
93
+ ['&cup;', '&#8746;', false,'union'],
94
+ ['&part;', '&#8706;', true, 'partial differential'],
95
+ ['&forall;', '&#8704;', false,'for all'],
96
+ ['&exist;', '&#8707;', false,'there exists'],
97
+ ['&empty;', '&#8709;', false,'diameter'],
98
+ ['&nabla;', '&#8711;', false,'backward difference'],
99
+ ['&lowast;', '&#8727;', false,'asterisk operator'],
100
+ ['&prop;', '&#8733;', false,'proportional to'],
101
+ ['&ang;', '&#8736;', false,'angle'],
102
+ // undefined
103
+ ['&acute;', '&#180;', true, 'acute accent'],
104
+ ['&cedil;', '&#184;', true, 'cedilla'],
105
+ ['&ordf;', '&#170;', true, 'feminine ordinal indicator'],
106
+ ['&ordm;', '&#186;', true, 'masculine ordinal indicator'],
107
+ ['&dagger;', '&#8224;', true, 'dagger'],
108
+ ['&Dagger;', '&#8225;', true, 'double dagger'],
109
+ // alphabetical special chars
110
+ ['&Agrave;', '&#192;', true, 'A - grave'],
111
+ ['&Aacute;', '&#193;', true, 'A - acute'],
112
+ ['&Acirc;', '&#194;', true, 'A - circumflex'],
113
+ ['&Atilde;', '&#195;', true, 'A - tilde'],
114
+ ['&Auml;', '&#196;', true, 'A - diaeresis'],
115
+ ['&Aring;', '&#197;', true, 'A - ring above'],
116
+ ['&AElig;', '&#198;', true, 'ligature AE'],
117
+ ['&Ccedil;', '&#199;', true, 'C - cedilla'],
118
+ ['&Egrave;', '&#200;', true, 'E - grave'],
119
+ ['&Eacute;', '&#201;', true, 'E - acute'],
120
+ ['&Ecirc;', '&#202;', true, 'E - circumflex'],
121
+ ['&Euml;', '&#203;', true, 'E - diaeresis'],
122
+ ['&Igrave;', '&#204;', true, 'I - grave'],
123
+ ['&Iacute;', '&#205;', true, 'I - acute'],
124
+ ['&Icirc;', '&#206;', true, 'I - circumflex'],
125
+ ['&Iuml;', '&#207;', true, 'I - diaeresis'],
126
+ ['&ETH;', '&#208;', true, 'ETH'],
127
+ ['&Ntilde;', '&#209;', true, 'N - tilde'],
128
+ ['&Ograve;', '&#210;', true, 'O - grave'],
129
+ ['&Oacute;', '&#211;', true, 'O - acute'],
130
+ ['&Ocirc;', '&#212;', true, 'O - circumflex'],
131
+ ['&Otilde;', '&#213;', true, 'O - tilde'],
132
+ ['&Ouml;', '&#214;', true, 'O - diaeresis'],
133
+ ['&Oslash;', '&#216;', true, 'O - slash'],
134
+ ['&OElig;', '&#338;', true, 'ligature OE'],
135
+ ['&Scaron;', '&#352;', true, 'S - caron'],
136
+ ['&Ugrave;', '&#217;', true, 'U - grave'],
137
+ ['&Uacute;', '&#218;', true, 'U - acute'],
138
+ ['&Ucirc;', '&#219;', true, 'U - circumflex'],
139
+ ['&Uuml;', '&#220;', true, 'U - diaeresis'],
140
+ ['&Yacute;', '&#221;', true, 'Y - acute'],
141
+ ['&Yuml;', '&#376;', true, 'Y - diaeresis'],
142
+ ['&THORN;', '&#222;', true, 'THORN'],
143
+ ['&agrave;', '&#224;', true, 'a - grave'],
144
+ ['&aacute;', '&#225;', true, 'a - acute'],
145
+ ['&acirc;', '&#226;', true, 'a - circumflex'],
146
+ ['&atilde;', '&#227;', true, 'a - tilde'],
147
+ ['&auml;', '&#228;', true, 'a - diaeresis'],
148
+ ['&aring;', '&#229;', true, 'a - ring above'],
149
+ ['&aelig;', '&#230;', true, 'ligature ae'],
150
+ ['&ccedil;', '&#231;', true, 'c - cedilla'],
151
+ ['&egrave;', '&#232;', true, 'e - grave'],
152
+ ['&eacute;', '&#233;', true, 'e - acute'],
153
+ ['&ecirc;', '&#234;', true, 'e - circumflex'],
154
+ ['&euml;', '&#235;', true, 'e - diaeresis'],
155
+ ['&igrave;', '&#236;', true, 'i - grave'],
156
+ ['&iacute;', '&#237;', true, 'i - acute'],
157
+ ['&icirc;', '&#238;', true, 'i - circumflex'],
158
+ ['&iuml;', '&#239;', true, 'i - diaeresis'],
159
+ ['&eth;', '&#240;', true, 'eth'],
160
+ ['&ntilde;', '&#241;', true, 'n - tilde'],
161
+ ['&ograve;', '&#242;', true, 'o - grave'],
162
+ ['&oacute;', '&#243;', true, 'o - acute'],
163
+ ['&ocirc;', '&#244;', true, 'o - circumflex'],
164
+ ['&otilde;', '&#245;', true, 'o - tilde'],
165
+ ['&ouml;', '&#246;', true, 'o - diaeresis'],
166
+ ['&oslash;', '&#248;', true, 'o slash'],
167
+ ['&oelig;', '&#339;', true, 'ligature oe'],
168
+ ['&scaron;', '&#353;', true, 's - caron'],
169
+ ['&ugrave;', '&#249;', true, 'u - grave'],
170
+ ['&uacute;', '&#250;', true, 'u - acute'],
171
+ ['&ucirc;', '&#251;', true, 'u - circumflex'],
172
+ ['&uuml;', '&#252;', true, 'u - diaeresis'],
173
+ ['&yacute;', '&#253;', true, 'y - acute'],
174
+ ['&thorn;', '&#254;', true, 'thorn'],
175
+ ['&yuml;', '&#255;', true, 'y - diaeresis'],
176
+ ['&Alpha;', '&#913;', true, 'Alpha'],
177
+ ['&Beta;', '&#914;', true, 'Beta'],
178
+ ['&Gamma;', '&#915;', true, 'Gamma'],
179
+ ['&Delta;', '&#916;', true, 'Delta'],
180
+ ['&Epsilon;', '&#917;', true, 'Epsilon'],
181
+ ['&Zeta;', '&#918;', true, 'Zeta'],
182
+ ['&Eta;', '&#919;', true, 'Eta'],
183
+ ['&Theta;', '&#920;', true, 'Theta'],
184
+ ['&Iota;', '&#921;', true, 'Iota'],
185
+ ['&Kappa;', '&#922;', true, 'Kappa'],
186
+ ['&Lambda;', '&#923;', true, 'Lambda'],
187
+ ['&Mu;', '&#924;', true, 'Mu'],
188
+ ['&Nu;', '&#925;', true, 'Nu'],
189
+ ['&Xi;', '&#926;', true, 'Xi'],
190
+ ['&Omicron;', '&#927;', true, 'Omicron'],
191
+ ['&Pi;', '&#928;', true, 'Pi'],
192
+ ['&Rho;', '&#929;', true, 'Rho'],
193
+ ['&Sigma;', '&#931;', true, 'Sigma'],
194
+ ['&Tau;', '&#932;', true, 'Tau'],
195
+ ['&Upsilon;', '&#933;', true, 'Upsilon'],
196
+ ['&Phi;', '&#934;', true, 'Phi'],
197
+ ['&Chi;', '&#935;', true, 'Chi'],
198
+ ['&Psi;', '&#936;', true, 'Psi'],
199
+ ['&Omega;', '&#937;', true, 'Omega'],
200
+ ['&alpha;', '&#945;', true, 'alpha'],
201
+ ['&beta;', '&#946;', true, 'beta'],
202
+ ['&gamma;', '&#947;', true, 'gamma'],
203
+ ['&delta;', '&#948;', true, 'delta'],
204
+ ['&epsilon;', '&#949;', true, 'epsilon'],
205
+ ['&zeta;', '&#950;', true, 'zeta'],
206
+ ['&eta;', '&#951;', true, 'eta'],
207
+ ['&theta;', '&#952;', true, 'theta'],
208
+ ['&iota;', '&#953;', true, 'iota'],
209
+ ['&kappa;', '&#954;', true, 'kappa'],
210
+ ['&lambda;', '&#955;', true, 'lambda'],
211
+ ['&mu;', '&#956;', true, 'mu'],
212
+ ['&nu;', '&#957;', true, 'nu'],
213
+ ['&xi;', '&#958;', true, 'xi'],
214
+ ['&omicron;', '&#959;', true, 'omicron'],
215
+ ['&pi;', '&#960;', true, 'pi'],
216
+ ['&rho;', '&#961;', true, 'rho'],
217
+ ['&sigmaf;', '&#962;', true, 'final sigma'],
218
+ ['&sigma;', '&#963;', true, 'sigma'],
219
+ ['&tau;', '&#964;', true, 'tau'],
220
+ ['&upsilon;', '&#965;', true, 'upsilon'],
221
+ ['&phi;', '&#966;', true, 'phi'],
222
+ ['&chi;', '&#967;', true, 'chi'],
223
+ ['&psi;', '&#968;', true, 'psi'],
224
+ ['&omega;', '&#969;', true, 'omega'],
225
+ // symbols
226
+ ['&alefsym;', '&#8501;', false,'alef symbol'],
227
+ ['&piv;', '&#982;', false,'pi symbol'],
228
+ ['&real;', '&#8476;', false,'real part symbol'],
229
+ ['&thetasym;','&#977;', false,'theta symbol'],
230
+ ['&upsih;', '&#978;', false,'upsilon - hook symbol'],
231
+ ['&weierp;', '&#8472;', false,'Weierstrass p'],
232
+ ['&image;', '&#8465;', false,'imaginary part'],
233
+ // arrows
234
+ ['&larr;', '&#8592;', true, 'leftwards arrow'],
235
+ ['&uarr;', '&#8593;', true, 'upwards arrow'],
236
+ ['&rarr;', '&#8594;', true, 'rightwards arrow'],
237
+ ['&darr;', '&#8595;', true, 'downwards arrow'],
238
+ ['&harr;', '&#8596;', true, 'left right arrow'],
239
+ ['&crarr;', '&#8629;', false,'carriage return'],
240
+ ['&lArr;', '&#8656;', false,'leftwards double arrow'],
241
+ ['&uArr;', '&#8657;', false,'upwards double arrow'],
242
+ ['&rArr;', '&#8658;', false,'rightwards double arrow'],
243
+ ['&dArr;', '&#8659;', false,'downwards double arrow'],
244
+ ['&hArr;', '&#8660;', false,'left right double arrow'],
245
+ ['&there4;', '&#8756;', false,'therefore'],
246
+ ['&sub;', '&#8834;', false,'subset of'],
247
+ ['&sup;', '&#8835;', false,'superset of'],
248
+ ['&nsub;', '&#8836;', false,'not a subset of'],
249
+ ['&sube;', '&#8838;', false,'subset of or equal to'],
250
+ ['&supe;', '&#8839;', false,'superset of or equal to'],
251
+ ['&oplus;', '&#8853;', false,'circled plus'],
252
+ ['&otimes;', '&#8855;', false,'circled times'],
253
+ ['&perp;', '&#8869;', false,'perpendicular'],
254
+ ['&sdot;', '&#8901;', false,'dot operator'],
255
+ ['&lceil;', '&#8968;', false,'left ceiling'],
256
+ ['&rceil;', '&#8969;', false,'right ceiling'],
257
+ ['&lfloor;', '&#8970;', false,'left floor'],
258
+ ['&rfloor;', '&#8971;', false,'right floor'],
259
+ ['&lang;', '&#9001;', false,'left-pointing angle bracket'],
260
+ ['&rang;', '&#9002;', false,'right-pointing angle bracket'],
261
+ ['&loz;', '&#9674;', true, 'lozenge'],
262
+ ['&spades;', '&#9824;', true, 'black spade suit'],
263
+ ['&clubs;', '&#9827;', true, 'black club suit'],
264
+ ['&hearts;', '&#9829;', true, 'black heart suit'],
265
+ ['&diams;', '&#9830;', true, 'black diamond suit'],
266
+ ['&ensp;', '&#8194;', false,'en space'],
267
+ ['&emsp;', '&#8195;', false,'em space'],
268
+ ['&thinsp;', '&#8201;', false,'thin space'],
269
+ ['&zwnj;', '&#8204;', false,'zero width non-joiner'],
270
+ ['&zwj;', '&#8205;', false,'zero width joiner'],
271
+ ['&lrm;', '&#8206;', false,'left-to-right mark'],
272
+ ['&rlm;', '&#8207;', false,'right-to-left mark'],
273
+ ['&shy;', '&#173;', false,'soft hyphen']
274
+ ];
275
+
276
+ tinyMCEPopup.onInit.add(function() {
277
+ tinyMCEPopup.dom.setHTML('charmapView', renderCharMapHTML());
278
+ addKeyboardNavigation();
279
+ });
280
+
281
+ function addKeyboardNavigation(){
282
+ var tableElm, cells, settings;
283
+
284
+ cells = tinyMCEPopup.dom.select("a.charmaplink", "charmapgroup");
285
+
286
+ settings ={
287
+ root: "charmapgroup",
288
+ items: cells
289
+ };
290
+ cells[0].tabindex=0;
291
+ tinyMCEPopup.dom.addClass(cells[0], "mceFocus");
292
+ if (tinymce.isGecko) {
293
+ cells[0].focus();
294
+ } else {
295
+ setTimeout(function(){
296
+ cells[0].focus();
297
+ }, 100);
298
+ }
299
+ tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', settings, tinyMCEPopup.dom);
300
+ }
301
+
302
+ function renderCharMapHTML() {
303
+ var charsPerRow = 20, tdWidth=20, tdHeight=20, i;
304
+ var html = '<div id="charmapgroup" aria-labelledby="charmap_label" tabindex="0" role="listbox">'+
305
+ '<table role="presentation" border="0" cellspacing="1" cellpadding="0" width="' + (tdWidth*charsPerRow) +
306
+ '"><tr height="' + tdHeight + '">';
307
+ var cols=-1;
308
+
309
+ for (i=0; i<charmap.length; i++) {
310
+ var previewCharFn;
311
+
312
+ if (charmap[i][2]==true) {
313
+ cols++;
314
+ previewCharFn = 'previewChar(\'' + charmap[i][1].substring(1,charmap[i][1].length) + '\',\'' + charmap[i][0].substring(1,charmap[i][0].length) + '\',\'' + charmap[i][3] + '\');';
315
+ html += ''
316
+ + '<td class="charmap">'
317
+ + '<a class="charmaplink" role="button" onmouseover="'+previewCharFn+'" onfocus="'+previewCharFn+'" href="javascript:void(0)" onclick="insertChar(\'' + charmap[i][1].substring(2,charmap[i][1].length-1) + '\');" onclick="return false;" onmousedown="return false;" title="' + charmap[i][3] + ' '+ tinyMCEPopup.editor.translate("advanced_dlg.charmap_usage")+'">'
318
+ + charmap[i][1]
319
+ + '</a></td>';
320
+ if ((cols+1) % charsPerRow == 0)
321
+ html += '</tr><tr height="' + tdHeight + '">';
322
+ }
323
+ }
324
+
325
+ if (cols % charsPerRow > 0) {
326
+ var padd = charsPerRow - (cols % charsPerRow);
327
+ for (var i=0; i<padd-1; i++)
328
+ html += '<td width="' + tdWidth + '" height="' + tdHeight + '" class="charmap">&nbsp;</td>';
329
+ }
330
+
331
+ html += '</tr></table></div>';
332
+ html = html.replace(/<tr height="20"><\/tr>/g, '');
333
+
334
+ return html;
335
+ }
336
+
337
+ function insertChar(chr) {
338
+ tinyMCEPopup.execCommand('mceInsertContent', false, '&#' + chr + ';');
339
+
340
+ // Refocus in window
341
+ if (tinyMCEPopup.isWindow)
342
+ window.focus();
343
+
344
+ tinyMCEPopup.editor.focus();
345
+ tinyMCEPopup.close();
346
+ }
347
+
348
+ function previewChar(codeA, codeB, codeN) {
349
+ var elmA = document.getElementById('codeA');
350
+ var elmB = document.getElementById('codeB');
351
+ var elmV = document.getElementById('codeV');
352
+ var elmN = document.getElementById('codeN');
353
+
354
+ if (codeA=='#160;') {
355
+ elmV.innerHTML = '__';
356
+ } else {
357
+ elmV.innerHTML = '&' + codeA;
358
+ }
359
+
360
+ elmB.innerHTML = '&amp;' + codeA;
361
+ elmA.innerHTML = '&amp;' + codeB;
362
+ elmN.innerHTML = codeN;
363
+ }
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/js/color_picker.js CHANGED
@@ -1,345 +1,345 @@
1
- tinyMCEPopup.requireLangPack();
2
-
3
- var detail = 50, strhex = "0123456789abcdef", i, isMouseDown = false, isMouseOver = false;
4
-
5
- var colors = [
6
- "#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033",
7
- "#330066","#330099","#3300cc","#3300ff","#660000","#660033","#660066","#660099",
8
- "#6600cc","#6600ff","#990000","#990033","#990066","#990099","#9900cc","#9900ff",
9
- "#cc0000","#cc0033","#cc0066","#cc0099","#cc00cc","#cc00ff","#ff0000","#ff0033",
10
- "#ff0066","#ff0099","#ff00cc","#ff00ff","#003300","#003333","#003366","#003399",
11
- "#0033cc","#0033ff","#333300","#333333","#333366","#333399","#3333cc","#3333ff",
12
- "#663300","#663333","#663366","#663399","#6633cc","#6633ff","#993300","#993333",
13
- "#993366","#993399","#9933cc","#9933ff","#cc3300","#cc3333","#cc3366","#cc3399",
14
- "#cc33cc","#cc33ff","#ff3300","#ff3333","#ff3366","#ff3399","#ff33cc","#ff33ff",
15
- "#006600","#006633","#006666","#006699","#0066cc","#0066ff","#336600","#336633",
16
- "#336666","#336699","#3366cc","#3366ff","#666600","#666633","#666666","#666699",
17
- "#6666cc","#6666ff","#996600","#996633","#996666","#996699","#9966cc","#9966ff",
18
- "#cc6600","#cc6633","#cc6666","#cc6699","#cc66cc","#cc66ff","#ff6600","#ff6633",
19
- "#ff6666","#ff6699","#ff66cc","#ff66ff","#009900","#009933","#009966","#009999",
20
- "#0099cc","#0099ff","#339900","#339933","#339966","#339999","#3399cc","#3399ff",
21
- "#669900","#669933","#669966","#669999","#6699cc","#6699ff","#999900","#999933",
22
- "#999966","#999999","#9999cc","#9999ff","#cc9900","#cc9933","#cc9966","#cc9999",
23
- "#cc99cc","#cc99ff","#ff9900","#ff9933","#ff9966","#ff9999","#ff99cc","#ff99ff",
24
- "#00cc00","#00cc33","#00cc66","#00cc99","#00cccc","#00ccff","#33cc00","#33cc33",
25
- "#33cc66","#33cc99","#33cccc","#33ccff","#66cc00","#66cc33","#66cc66","#66cc99",
26
- "#66cccc","#66ccff","#99cc00","#99cc33","#99cc66","#99cc99","#99cccc","#99ccff",
27
- "#cccc00","#cccc33","#cccc66","#cccc99","#cccccc","#ccccff","#ffcc00","#ffcc33",
28
- "#ffcc66","#ffcc99","#ffcccc","#ffccff","#00ff00","#00ff33","#00ff66","#00ff99",
29
- "#00ffcc","#00ffff","#33ff00","#33ff33","#33ff66","#33ff99","#33ffcc","#33ffff",
30
- "#66ff00","#66ff33","#66ff66","#66ff99","#66ffcc","#66ffff","#99ff00","#99ff33",
31
- "#99ff66","#99ff99","#99ffcc","#99ffff","#ccff00","#ccff33","#ccff66","#ccff99",
32
- "#ccffcc","#ccffff","#ffff00","#ffff33","#ffff66","#ffff99","#ffffcc","#ffffff"
33
- ];
34
-
35
- var named = {
36
- '#F0F8FF':'Alice Blue','#FAEBD7':'Antique White','#00FFFF':'Aqua','#7FFFD4':'Aquamarine','#F0FFFF':'Azure','#F5F5DC':'Beige',
37
- '#FFE4C4':'Bisque','#000000':'Black','#FFEBCD':'Blanched Almond','#0000FF':'Blue','#8A2BE2':'Blue Violet','#A52A2A':'Brown',
38
- '#DEB887':'Burly Wood','#5F9EA0':'Cadet Blue','#7FFF00':'Chartreuse','#D2691E':'Chocolate','#FF7F50':'Coral','#6495ED':'Cornflower Blue',
39
- '#FFF8DC':'Cornsilk','#DC143C':'Crimson','#00FFFF':'Cyan','#00008B':'Dark Blue','#008B8B':'Dark Cyan','#B8860B':'Dark Golden Rod',
40
- '#A9A9A9':'Dark Gray','#A9A9A9':'Dark Grey','#006400':'Dark Green','#BDB76B':'Dark Khaki','#8B008B':'Dark Magenta','#556B2F':'Dark Olive Green',
41
- '#FF8C00':'Darkorange','#9932CC':'Dark Orchid','#8B0000':'Dark Red','#E9967A':'Dark Salmon','#8FBC8F':'Dark Sea Green','#483D8B':'Dark Slate Blue',
42
- '#2F4F4F':'Dark Slate Gray','#2F4F4F':'Dark Slate Grey','#00CED1':'Dark Turquoise','#9400D3':'Dark Violet','#FF1493':'Deep Pink','#00BFFF':'Deep Sky Blue',
43
- '#696969':'Dim Gray','#696969':'Dim Grey','#1E90FF':'Dodger Blue','#B22222':'Fire Brick','#FFFAF0':'Floral White','#228B22':'Forest Green',
44
- '#FF00FF':'Fuchsia','#DCDCDC':'Gainsboro','#F8F8FF':'Ghost White','#FFD700':'Gold','#DAA520':'Golden Rod','#808080':'Gray','#808080':'Grey',
45
- '#008000':'Green','#ADFF2F':'Green Yellow','#F0FFF0':'Honey Dew','#FF69B4':'Hot Pink','#CD5C5C':'Indian Red','#4B0082':'Indigo','#FFFFF0':'Ivory',
46
- '#F0E68C':'Khaki','#E6E6FA':'Lavender','#FFF0F5':'Lavender Blush','#7CFC00':'Lawn Green','#FFFACD':'Lemon Chiffon','#ADD8E6':'Light Blue',
47
- '#F08080':'Light Coral','#E0FFFF':'Light Cyan','#FAFAD2':'Light Golden Rod Yellow','#D3D3D3':'Light Gray','#D3D3D3':'Light Grey','#90EE90':'Light Green',
48
- '#FFB6C1':'Light Pink','#FFA07A':'Light Salmon','#20B2AA':'Light Sea Green','#87CEFA':'Light Sky Blue','#778899':'Light Slate Gray','#778899':'Light Slate Grey',
49
- '#B0C4DE':'Light Steel Blue','#FFFFE0':'Light Yellow','#00FF00':'Lime','#32CD32':'Lime Green','#FAF0E6':'Linen','#FF00FF':'Magenta','#800000':'Maroon',
50
- '#66CDAA':'Medium Aqua Marine','#0000CD':'Medium Blue','#BA55D3':'Medium Orchid','#9370D8':'Medium Purple','#3CB371':'Medium Sea Green','#7B68EE':'Medium Slate Blue',
51
- '#00FA9A':'Medium Spring Green','#48D1CC':'Medium Turquoise','#C71585':'Medium Violet Red','#191970':'Midnight Blue','#F5FFFA':'Mint Cream','#FFE4E1':'Misty Rose','#FFE4B5':'Moccasin',
52
- '#FFDEAD':'Navajo White','#000080':'Navy','#FDF5E6':'Old Lace','#808000':'Olive','#6B8E23':'Olive Drab','#FFA500':'Orange','#FF4500':'Orange Red','#DA70D6':'Orchid',
53
- '#EEE8AA':'Pale Golden Rod','#98FB98':'Pale Green','#AFEEEE':'Pale Turquoise','#D87093':'Pale Violet Red','#FFEFD5':'Papaya Whip','#FFDAB9':'Peach Puff',
54
- '#CD853F':'Peru','#FFC0CB':'Pink','#DDA0DD':'Plum','#B0E0E6':'Powder Blue','#800080':'Purple','#FF0000':'Red','#BC8F8F':'Rosy Brown','#4169E1':'Royal Blue',
55
- '#8B4513':'Saddle Brown','#FA8072':'Salmon','#F4A460':'Sandy Brown','#2E8B57':'Sea Green','#FFF5EE':'Sea Shell','#A0522D':'Sienna','#C0C0C0':'Silver',
56
- '#87CEEB':'Sky Blue','#6A5ACD':'Slate Blue','#708090':'Slate Gray','#708090':'Slate Grey','#FFFAFA':'Snow','#00FF7F':'Spring Green',
57
- '#4682B4':'Steel Blue','#D2B48C':'Tan','#008080':'Teal','#D8BFD8':'Thistle','#FF6347':'Tomato','#40E0D0':'Turquoise','#EE82EE':'Violet',
58
- '#F5DEB3':'Wheat','#FFFFFF':'White','#F5F5F5':'White Smoke','#FFFF00':'Yellow','#9ACD32':'Yellow Green'
59
- };
60
-
61
- var namedLookup = {};
62
-
63
- function init() {
64
- var inputColor = convertRGBToHex(tinyMCEPopup.getWindowArg('input_color')), key, value;
65
-
66
- tinyMCEPopup.resizeToInnerSize();
67
-
68
- generatePicker();
69
- generateWebColors();
70
- generateNamedColors();
71
-
72
- if (inputColor) {
73
- changeFinalColor(inputColor);
74
-
75
- col = convertHexToRGB(inputColor);
76
-
77
- if (col)
78
- updateLight(col.r, col.g, col.b);
79
- }
80
-
81
- for (key in named) {
82
- value = named[key];
83
- namedLookup[value.replace(/\s+/, '').toLowerCase()] = key.replace(/#/, '').toLowerCase();
84
- }
85
- }
86
-
87
- function toHexColor(color) {
88
- var matches, red, green, blue, toInt = parseInt;
89
-
90
- function hex(value) {
91
- value = parseInt(value).toString(16);
92
-
93
- return value.length > 1 ? value : '0' + value; // Padd with leading zero
94
- };
95
-
96
- color = tinymce.trim(color);
97
- color = color.replace(/^[#]/, '').toLowerCase(); // remove leading '#'
98
- color = namedLookup[color] || color;
99
-
100
- matches = /^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/.exec(color);
101
-
102
- if (matches) {
103
- red = toInt(matches[1]);
104
- green = toInt(matches[2]);
105
- blue = toInt(matches[3]);
106
- } else {
107
- matches = /^([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/.exec(color);
108
-
109
- if (matches) {
110
- red = toInt(matches[1], 16);
111
- green = toInt(matches[2], 16);
112
- blue = toInt(matches[3], 16);
113
- } else {
114
- matches = /^([0-9a-f])([0-9a-f])([0-9a-f])$/.exec(color);
115
-
116
- if (matches) {
117
- red = toInt(matches[1] + matches[1], 16);
118
- green = toInt(matches[2] + matches[2], 16);
119
- blue = toInt(matches[3] + matches[3], 16);
120
- } else {
121
- return '';
122
- }
123
- }
124
- }
125
-
126
- return '#' + hex(red) + hex(green) + hex(blue);
127
- }
128
-
129
- function insertAction() {
130
- var color = document.getElementById("color").value, f = tinyMCEPopup.getWindowArg('func');
131
-
132
- var hexColor = toHexColor(color);
133
-
134
- if (hexColor === '') {
135
- var text = tinyMCEPopup.editor.getLang('advanced_dlg.invalid_color_value');
136
- tinyMCEPopup.alert(text + ': ' + color);
137
- }
138
- else {
139
- tinyMCEPopup.restoreSelection();
140
-
141
- if (f)
142
- f(hexColor);
143
-
144
- tinyMCEPopup.close();
145
- }
146
- }
147
-
148
- function showColor(color, name) {
149
- if (name)
150
- document.getElementById("colorname").innerHTML = name;
151
-
152
- document.getElementById("preview").style.backgroundColor = color;
153
- document.getElementById("color").value = color.toUpperCase();
154
- }
155
-
156
- function convertRGBToHex(col) {
157
- var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi");
158
-
159
- if (!col)
160
- return col;
161
-
162
- var rgb = col.replace(re, "$1,$2,$3").split(',');
163
- if (rgb.length == 3) {
164
- r = parseInt(rgb[0]).toString(16);
165
- g = parseInt(rgb[1]).toString(16);
166
- b = parseInt(rgb[2]).toString(16);
167
-
168
- r = r.length == 1 ? '0' + r : r;
169
- g = g.length == 1 ? '0' + g : g;
170
- b = b.length == 1 ? '0' + b : b;
171
-
172
- return "#" + r + g + b;
173
- }
174
-
175
- return col;
176
- }
177
-
178
- function convertHexToRGB(col) {
179
- if (col.indexOf('#') != -1) {
180
- col = col.replace(new RegExp('[^0-9A-F]', 'gi'), '');
181
-
182
- r = parseInt(col.substring(0, 2), 16);
183
- g = parseInt(col.substring(2, 4), 16);
184
- b = parseInt(col.substring(4, 6), 16);
185
-
186
- return {r : r, g : g, b : b};
187
- }
188
-
189
- return null;
190
- }
191
-
192
- function generatePicker() {
193
- var el = document.getElementById('light'), h = '', i;
194
-
195
- for (i = 0; i < detail; i++){
196
- h += '<div id="gs'+i+'" style="background-color:#000000; width:15px; height:3px; border-style:none; border-width:0px;"'
197
- + ' onclick="changeFinalColor(this.style.backgroundColor)"'
198
- + ' onmousedown="isMouseDown = true; return false;"'
199
- + ' onmouseup="isMouseDown = false;"'
200
- + ' onmousemove="if (isMouseDown && isMouseOver) changeFinalColor(this.style.backgroundColor); return false;"'
201
- + ' onmouseover="isMouseOver = true;"'
202
- + ' onmouseout="isMouseOver = false;"'
203
- + '></div>';
204
- }
205
-
206
- el.innerHTML = h;
207
- }
208
-
209
- function generateWebColors() {
210
- var el = document.getElementById('webcolors'), h = '', i;
211
-
212
- if (el.className == 'generated')
213
- return;
214
-
215
- // TODO: VoiceOver doesn't seem to support legend as a label referenced by labelledby.
216
- h += '<div role="listbox" aria-labelledby="webcolors_title" tabindex="0"><table role="presentation" border="0" cellspacing="1" cellpadding="0">'
217
- + '<tr>';
218
-
219
- for (i=0; i<colors.length; i++) {
220
- h += '<td bgcolor="' + colors[i] + '" width="10" height="10">'
221
- + '<a href="javascript:insertAction();" role="option" tabindex="-1" aria-labelledby="web_colors_' + i + '" onfocus="showColor(\'' + colors[i] + '\');" onmouseover="showColor(\'' + colors[i] + '\');" style="display:block;width:10px;height:10px;overflow:hidden;">';
222
- if (tinyMCEPopup.editor.forcedHighContrastMode) {
223
- h += '<canvas class="mceColorSwatch" height="10" width="10" data-color="' + colors[i] + '"></canvas>';
224
- }
225
- h += '<span class="mceVoiceLabel" style="display:none;" id="web_colors_' + i + '">' + colors[i].toUpperCase() + '</span>';
226
- h += '</a></td>';
227
- if ((i+1) % 18 == 0)
228
- h += '</tr><tr>';
229
- }
230
-
231
- h += '</table></div>';
232
-
233
- el.innerHTML = h;
234
- el.className = 'generated';
235
-
236
- paintCanvas(el);
237
- enableKeyboardNavigation(el.firstChild);
238
- }
239
-
240
- function paintCanvas(el) {
241
- tinyMCEPopup.getWin().tinymce.each(tinyMCEPopup.dom.select('canvas.mceColorSwatch', el), function(canvas) {
242
- var context;
243
- if (canvas.getContext && (context = canvas.getContext("2d"))) {
244
- context.fillStyle = canvas.getAttribute('data-color');
245
- context.fillRect(0, 0, 10, 10);
246
- }
247
- });
248
- }
249
- function generateNamedColors() {
250
- var el = document.getElementById('namedcolors'), h = '', n, v, i = 0;
251
-
252
- if (el.className == 'generated')
253
- return;
254
-
255
- for (n in named) {
256
- v = named[n];
257
- h += '<a href="javascript:insertAction();" role="option" tabindex="-1" aria-labelledby="named_colors_' + i + '" onfocus="showColor(\'' + n + '\',\'' + v + '\');" onmouseover="showColor(\'' + n + '\',\'' + v + '\');" style="background-color: ' + n + '">';
258
- if (tinyMCEPopup.editor.forcedHighContrastMode) {
259
- h += '<canvas class="mceColorSwatch" height="10" width="10" data-color="' + colors[i] + '"></canvas>';
260
- }
261
- h += '<span class="mceVoiceLabel" style="display:none;" id="named_colors_' + i + '">' + v + '</span>';
262
- h += '</a>';
263
- i++;
264
- }
265
-
266
- el.innerHTML = h;
267
- el.className = 'generated';
268
-
269
- paintCanvas(el);
270
- enableKeyboardNavigation(el);
271
- }
272
-
273
- function enableKeyboardNavigation(el) {
274
- tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', {
275
- root: el,
276
- items: tinyMCEPopup.dom.select('a', el)
277
- }, tinyMCEPopup.dom);
278
- }
279
-
280
- function dechex(n) {
281
- return strhex.charAt(Math.floor(n / 16)) + strhex.charAt(n % 16);
282
- }
283
-
284
- function computeColor(e) {
285
- var x, y, partWidth, partDetail, imHeight, r, g, b, coef, i, finalCoef, finalR, finalG, finalB, pos = tinyMCEPopup.dom.getPos(e.target);
286
-
287
- x = e.offsetX ? e.offsetX : (e.target ? e.clientX - pos.x : 0);
288
- y = e.offsetY ? e.offsetY : (e.target ? e.clientY - pos.y : 0);
289
-
290
- partWidth = document.getElementById('colors').width / 6;
291
- partDetail = detail / 2;
292
- imHeight = document.getElementById('colors').height;
293
-
294
- r = (x >= 0)*(x < partWidth)*255 + (x >= partWidth)*(x < 2*partWidth)*(2*255 - x * 255 / partWidth) + (x >= 4*partWidth)*(x < 5*partWidth)*(-4*255 + x * 255 / partWidth) + (x >= 5*partWidth)*(x < 6*partWidth)*255;
295
- g = (x >= 0)*(x < partWidth)*(x * 255 / partWidth) + (x >= partWidth)*(x < 3*partWidth)*255 + (x >= 3*partWidth)*(x < 4*partWidth)*(4*255 - x * 255 / partWidth);
296
- b = (x >= 2*partWidth)*(x < 3*partWidth)*(-2*255 + x * 255 / partWidth) + (x >= 3*partWidth)*(x < 5*partWidth)*255 + (x >= 5*partWidth)*(x < 6*partWidth)*(6*255 - x * 255 / partWidth);
297
-
298
- coef = (imHeight - y) / imHeight;
299
- r = 128 + (r - 128) * coef;
300
- g = 128 + (g - 128) * coef;
301
- b = 128 + (b - 128) * coef;
302
-
303
- changeFinalColor('#' + dechex(r) + dechex(g) + dechex(b));
304
- updateLight(r, g, b);
305
- }
306
-
307
- function updateLight(r, g, b) {
308
- var i, partDetail = detail / 2, finalCoef, finalR, finalG, finalB, color;
309
-
310
- for (i=0; i<detail; i++) {
311
- if ((i>=0) && (i<partDetail)) {
312
- finalCoef = i / partDetail;
313
- finalR = dechex(255 - (255 - r) * finalCoef);
314
- finalG = dechex(255 - (255 - g) * finalCoef);
315
- finalB = dechex(255 - (255 - b) * finalCoef);
316
- } else {
317
- finalCoef = 2 - i / partDetail;
318
- finalR = dechex(r * finalCoef);
319
- finalG = dechex(g * finalCoef);
320
- finalB = dechex(b * finalCoef);
321
- }
322
-
323
- color = finalR + finalG + finalB;
324
-
325
- setCol('gs' + i, '#'+color);
326
- }
327
- }
328
-
329
- function changeFinalColor(color) {
330
- if (color.indexOf('#') == -1)
331
- color = convertRGBToHex(color);
332
-
333
- setCol('preview', color);
334
- document.getElementById('color').value = color;
335
- }
336
-
337
- function setCol(e, c) {
338
- try {
339
- document.getElementById(e).style.backgroundColor = c;
340
- } catch (ex) {
341
- // Ignore IE warning
342
- }
343
- }
344
-
345
- tinyMCEPopup.onInit.add(init);
1
+ tinyMCEPopup.requireLangPack();
2
+
3
+ var detail = 50, strhex = "0123456789abcdef", i, isMouseDown = false, isMouseOver = false;
4
+
5
+ var colors = [
6
+ "#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033",
7
+ "#330066","#330099","#3300cc","#3300ff","#660000","#660033","#660066","#660099",
8
+ "#6600cc","#6600ff","#990000","#990033","#990066","#990099","#9900cc","#9900ff",
9
+ "#cc0000","#cc0033","#cc0066","#cc0099","#cc00cc","#cc00ff","#ff0000","#ff0033",
10
+ "#ff0066","#ff0099","#ff00cc","#ff00ff","#003300","#003333","#003366","#003399",
11
+ "#0033cc","#0033ff","#333300","#333333","#333366","#333399","#3333cc","#3333ff",
12
+ "#663300","#663333","#663366","#663399","#6633cc","#6633ff","#993300","#993333",
13
+ "#993366","#993399","#9933cc","#9933ff","#cc3300","#cc3333","#cc3366","#cc3399",
14
+ "#cc33cc","#cc33ff","#ff3300","#ff3333","#ff3366","#ff3399","#ff33cc","#ff33ff",
15
+ "#006600","#006633","#006666","#006699","#0066cc","#0066ff","#336600","#336633",
16
+ "#336666","#336699","#3366cc","#3366ff","#666600","#666633","#666666","#666699",
17
+ "#6666cc","#6666ff","#996600","#996633","#996666","#996699","#9966cc","#9966ff",
18
+ "#cc6600","#cc6633","#cc6666","#cc6699","#cc66cc","#cc66ff","#ff6600","#ff6633",
19
+ "#ff6666","#ff6699","#ff66cc","#ff66ff","#009900","#009933","#009966","#009999",
20
+ "#0099cc","#0099ff","#339900","#339933","#339966","#339999","#3399cc","#3399ff",
21
+ "#669900","#669933","#669966","#669999","#6699cc","#6699ff","#999900","#999933",
22
+ "#999966","#999999","#9999cc","#9999ff","#cc9900","#cc9933","#cc9966","#cc9999",
23
+ "#cc99cc","#cc99ff","#ff9900","#ff9933","#ff9966","#ff9999","#ff99cc","#ff99ff",
24
+ "#00cc00","#00cc33","#00cc66","#00cc99","#00cccc","#00ccff","#33cc00","#33cc33",
25
+ "#33cc66","#33cc99","#33cccc","#33ccff","#66cc00","#66cc33","#66cc66","#66cc99",
26
+ "#66cccc","#66ccff","#99cc00","#99cc33","#99cc66","#99cc99","#99cccc","#99ccff",
27
+ "#cccc00","#cccc33","#cccc66","#cccc99","#cccccc","#ccccff","#ffcc00","#ffcc33",
28
+ "#ffcc66","#ffcc99","#ffcccc","#ffccff","#00ff00","#00ff33","#00ff66","#00ff99",
29
+ "#00ffcc","#00ffff","#33ff00","#33ff33","#33ff66","#33ff99","#33ffcc","#33ffff",
30
+ "#66ff00","#66ff33","#66ff66","#66ff99","#66ffcc","#66ffff","#99ff00","#99ff33",
31
+ "#99ff66","#99ff99","#99ffcc","#99ffff","#ccff00","#ccff33","#ccff66","#ccff99",
32
+ "#ccffcc","#ccffff","#ffff00","#ffff33","#ffff66","#ffff99","#ffffcc","#ffffff"
33
+ ];
34
+
35
+ var named = {
36
+ '#F0F8FF':'Alice Blue','#FAEBD7':'Antique White','#00FFFF':'Aqua','#7FFFD4':'Aquamarine','#F0FFFF':'Azure','#F5F5DC':'Beige',
37
+ '#FFE4C4':'Bisque','#000000':'Black','#FFEBCD':'Blanched Almond','#0000FF':'Blue','#8A2BE2':'Blue Violet','#A52A2A':'Brown',
38
+ '#DEB887':'Burly Wood','#5F9EA0':'Cadet Blue','#7FFF00':'Chartreuse','#D2691E':'Chocolate','#FF7F50':'Coral','#6495ED':'Cornflower Blue',
39
+ '#FFF8DC':'Cornsilk','#DC143C':'Crimson','#00FFFF':'Cyan','#00008B':'Dark Blue','#008B8B':'Dark Cyan','#B8860B':'Dark Golden Rod',
40
+ '#A9A9A9':'Dark Gray','#A9A9A9':'Dark Grey','#006400':'Dark Green','#BDB76B':'Dark Khaki','#8B008B':'Dark Magenta','#556B2F':'Dark Olive Green',
41
+ '#FF8C00':'Darkorange','#9932CC':'Dark Orchid','#8B0000':'Dark Red','#E9967A':'Dark Salmon','#8FBC8F':'Dark Sea Green','#483D8B':'Dark Slate Blue',
42
+ '#2F4F4F':'Dark Slate Gray','#2F4F4F':'Dark Slate Grey','#00CED1':'Dark Turquoise','#9400D3':'Dark Violet','#FF1493':'Deep Pink','#00BFFF':'Deep Sky Blue',
43
+ '#696969':'Dim Gray','#696969':'Dim Grey','#1E90FF':'Dodger Blue','#B22222':'Fire Brick','#FFFAF0':'Floral White','#228B22':'Forest Green',
44
+ '#FF00FF':'Fuchsia','#DCDCDC':'Gainsboro','#F8F8FF':'Ghost White','#FFD700':'Gold','#DAA520':'Golden Rod','#808080':'Gray','#808080':'Grey',
45
+ '#008000':'Green','#ADFF2F':'Green Yellow','#F0FFF0':'Honey Dew','#FF69B4':'Hot Pink','#CD5C5C':'Indian Red','#4B0082':'Indigo','#FFFFF0':'Ivory',
46
+ '#F0E68C':'Khaki','#E6E6FA':'Lavender','#FFF0F5':'Lavender Blush','#7CFC00':'Lawn Green','#FFFACD':'Lemon Chiffon','#ADD8E6':'Light Blue',
47
+ '#F08080':'Light Coral','#E0FFFF':'Light Cyan','#FAFAD2':'Light Golden Rod Yellow','#D3D3D3':'Light Gray','#D3D3D3':'Light Grey','#90EE90':'Light Green',
48
+ '#FFB6C1':'Light Pink','#FFA07A':'Light Salmon','#20B2AA':'Light Sea Green','#87CEFA':'Light Sky Blue','#778899':'Light Slate Gray','#778899':'Light Slate Grey',
49
+ '#B0C4DE':'Light Steel Blue','#FFFFE0':'Light Yellow','#00FF00':'Lime','#32CD32':'Lime Green','#FAF0E6':'Linen','#FF00FF':'Magenta','#800000':'Maroon',
50
+ '#66CDAA':'Medium Aqua Marine','#0000CD':'Medium Blue','#BA55D3':'Medium Orchid','#9370D8':'Medium Purple','#3CB371':'Medium Sea Green','#7B68EE':'Medium Slate Blue',
51
+ '#00FA9A':'Medium Spring Green','#48D1CC':'Medium Turquoise','#C71585':'Medium Violet Red','#191970':'Midnight Blue','#F5FFFA':'Mint Cream','#FFE4E1':'Misty Rose','#FFE4B5':'Moccasin',
52
+ '#FFDEAD':'Navajo White','#000080':'Navy','#FDF5E6':'Old Lace','#808000':'Olive','#6B8E23':'Olive Drab','#FFA500':'Orange','#FF4500':'Orange Red','#DA70D6':'Orchid',
53
+ '#EEE8AA':'Pale Golden Rod','#98FB98':'Pale Green','#AFEEEE':'Pale Turquoise','#D87093':'Pale Violet Red','#FFEFD5':'Papaya Whip','#FFDAB9':'Peach Puff',
54
+ '#CD853F':'Peru','#FFC0CB':'Pink','#DDA0DD':'Plum','#B0E0E6':'Powder Blue','#800080':'Purple','#FF0000':'Red','#BC8F8F':'Rosy Brown','#4169E1':'Royal Blue',
55
+ '#8B4513':'Saddle Brown','#FA8072':'Salmon','#F4A460':'Sandy Brown','#2E8B57':'Sea Green','#FFF5EE':'Sea Shell','#A0522D':'Sienna','#C0C0C0':'Silver',
56
+ '#87CEEB':'Sky Blue','#6A5ACD':'Slate Blue','#708090':'Slate Gray','#708090':'Slate Grey','#FFFAFA':'Snow','#00FF7F':'Spring Green',
57
+ '#4682B4':'Steel Blue','#D2B48C':'Tan','#008080':'Teal','#D8BFD8':'Thistle','#FF6347':'Tomato','#40E0D0':'Turquoise','#EE82EE':'Violet',
58
+ '#F5DEB3':'Wheat','#FFFFFF':'White','#F5F5F5':'White Smoke','#FFFF00':'Yellow','#9ACD32':'Yellow Green'
59
+ };
60
+
61
+ var namedLookup = {};
62
+
63
+ function init() {
64
+ var inputColor = convertRGBToHex(tinyMCEPopup.getWindowArg('input_color')), key, value;
65
+
66
+ tinyMCEPopup.resizeToInnerSize();
67
+
68
+ generatePicker();
69
+ generateWebColors();
70
+ generateNamedColors();
71
+
72
+ if (inputColor) {
73
+ changeFinalColor(inputColor);
74
+
75
+ col = convertHexToRGB(inputColor);
76
+
77
+ if (col)
78
+ updateLight(col.r, col.g, col.b);
79
+ }
80
+
81
+ for (key in named) {
82
+ value = named[key];
83
+ namedLookup[value.replace(/\s+/, '').toLowerCase()] = key.replace(/#/, '').toLowerCase();
84
+ }
85
+ }
86
+
87
+ function toHexColor(color) {
88
+ var matches, red, green, blue, toInt = parseInt;
89
+
90
+ function hex(value) {
91
+ value = parseInt(value).toString(16);
92
+
93
+ return value.length > 1 ? value : '0' + value; // Padd with leading zero
94
+ };
95
+
96
+ color = tinymce.trim(color);
97
+ color = color.replace(/^[#]/, '').toLowerCase(); // remove leading '#'
98
+ color = namedLookup[color] || color;
99
+
100
+ matches = /^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/.exec(color);
101
+
102
+ if (matches) {
103
+ red = toInt(matches[1]);
104
+ green = toInt(matches[2]);
105
+ blue = toInt(matches[3]);
106
+ } else {
107
+ matches = /^([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/.exec(color);
108
+
109
+ if (matches) {
110
+ red = toInt(matches[1], 16);
111
+ green = toInt(matches[2], 16);
112
+ blue = toInt(matches[3], 16);
113
+ } else {
114
+ matches = /^([0-9a-f])([0-9a-f])([0-9a-f])$/.exec(color);
115
+
116
+ if (matches) {
117
+ red = toInt(matches[1] + matches[1], 16);
118
+ green = toInt(matches[2] + matches[2], 16);
119
+ blue = toInt(matches[3] + matches[3], 16);
120
+ } else {
121
+ return '';
122
+ }
123
+ }
124
+ }
125
+
126
+ return '#' + hex(red) + hex(green) + hex(blue);
127
+ }
128
+
129
+ function insertAction() {
130
+ var color = document.getElementById("color").value, f = tinyMCEPopup.getWindowArg('func');
131
+
132
+ var hexColor = toHexColor(color);
133
+
134
+ if (hexColor === '') {
135
+ var text = tinyMCEPopup.editor.getLang('advanced_dlg.invalid_color_value');
136
+ tinyMCEPopup.alert(text + ': ' + color);
137
+ }
138
+ else {
139
+ tinyMCEPopup.restoreSelection();
140
+
141
+ if (f)
142
+ f(hexColor);
143
+
144
+ tinyMCEPopup.close();
145
+ }
146
+ }
147
+
148
+ function showColor(color, name) {
149
+ if (name)
150
+ document.getElementById("colorname").innerHTML = name;
151
+
152
+ document.getElementById("preview").style.backgroundColor = color;
153
+ document.getElementById("color").value = color.toUpperCase();
154
+ }
155
+
156
+ function convertRGBToHex(col) {
157
+ var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi");
158
+
159
+ if (!col)
160
+ return col;
161
+
162
+ var rgb = col.replace(re, "$1,$2,$3").split(',');
163
+ if (rgb.length == 3) {
164
+ r = parseInt(rgb[0]).toString(16);
165
+ g = parseInt(rgb[1]).toString(16);
166
+ b = parseInt(rgb[2]).toString(16);
167
+
168
+ r = r.length == 1 ? '0' + r : r;
169
+ g = g.length == 1 ? '0' + g : g;
170
+ b = b.length == 1 ? '0' + b : b;
171
+
172
+ return "#" + r + g + b;
173
+ }
174
+
175
+ return col;
176
+ }
177
+
178
+ function convertHexToRGB(col) {
179
+ if (col.indexOf('#') != -1) {
180
+ col = col.replace(new RegExp('[^0-9A-F]', 'gi'), '');
181
+
182
+ r = parseInt(col.substring(0, 2), 16);
183
+ g = parseInt(col.substring(2, 4), 16);
184
+ b = parseInt(col.substring(4, 6), 16);
185
+
186
+ return {r : r, g : g, b : b};
187
+ }
188
+
189
+ return null;
190
+ }
191
+
192
+ function generatePicker() {
193
+ var el = document.getElementById('light'), h = '', i;
194
+
195
+ for (i = 0; i < detail; i++){
196
+ h += '<div id="gs'+i+'" style="background-color:#000000; width:15px; height:3px; border-style:none; border-width:0px;"'
197
+ + ' onclick="changeFinalColor(this.style.backgroundColor)"'
198
+ + ' onmousedown="isMouseDown = true; return false;"'
199
+ + ' onmouseup="isMouseDown = false;"'
200
+ + ' onmousemove="if (isMouseDown && isMouseOver) changeFinalColor(this.style.backgroundColor); return false;"'
201
+ + ' onmouseover="isMouseOver = true;"'
202
+ + ' onmouseout="isMouseOver = false;"'
203
+ + '></div>';
204
+ }
205
+
206
+ el.innerHTML = h;
207
+ }
208
+
209
+ function generateWebColors() {
210
+ var el = document.getElementById('webcolors'), h = '', i;
211
+
212
+ if (el.className == 'generated')
213
+ return;
214
+
215
+ // TODO: VoiceOver doesn't seem to support legend as a label referenced by labelledby.
216
+ h += '<div role="listbox" aria-labelledby="webcolors_title" tabindex="0"><table role="presentation" border="0" cellspacing="1" cellpadding="0">'
217
+ + '<tr>';
218
+
219
+ for (i=0; i<colors.length; i++) {
220
+ h += '<td bgcolor="' + colors[i] + '" width="10" height="10">'
221
+ + '<a href="javascript:insertAction();" role="option" tabindex="-1" aria-labelledby="web_colors_' + i + '" onfocus="showColor(\'' + colors[i] + '\');" onmouseover="showColor(\'' + colors[i] + '\');" style="display:block;width:10px;height:10px;overflow:hidden;">';
222
+ if (tinyMCEPopup.editor.forcedHighContrastMode) {
223
+ h += '<canvas class="mceColorSwatch" height="10" width="10" data-color="' + colors[i] + '"></canvas>';
224
+ }
225
+ h += '<span class="mceVoiceLabel" style="display:none;" id="web_colors_' + i + '">' + colors[i].toUpperCase() + '</span>';
226
+ h += '</a></td>';
227
+ if ((i+1) % 18 == 0)
228
+ h += '</tr><tr>';
229
+ }
230
+
231
+ h += '</table></div>';
232
+
233
+ el.innerHTML = h;
234
+ el.className = 'generated';
235
+
236
+ paintCanvas(el);
237
+ enableKeyboardNavigation(el.firstChild);
238
+ }
239
+
240
+ function paintCanvas(el) {
241
+ tinyMCEPopup.getWin().tinymce.each(tinyMCEPopup.dom.select('canvas.mceColorSwatch', el), function(canvas) {
242
+ var context;
243
+ if (canvas.getContext && (context = canvas.getContext("2d"))) {
244
+ context.fillStyle = canvas.getAttribute('data-color');
245
+ context.fillRect(0, 0, 10, 10);
246
+ }
247
+ });
248
+ }
249
+ function generateNamedColors() {
250
+ var el = document.getElementById('namedcolors'), h = '', n, v, i = 0;
251
+
252
+ if (el.className == 'generated')
253
+ return;
254
+
255
+ for (n in named) {
256
+ v = named[n];
257
+ h += '<a href="javascript:insertAction();" role="option" tabindex="-1" aria-labelledby="named_colors_' + i + '" onfocus="showColor(\'' + n + '\',\'' + v + '\');" onmouseover="showColor(\'' + n + '\',\'' + v + '\');" style="background-color: ' + n + '">';
258
+ if (tinyMCEPopup.editor.forcedHighContrastMode) {
259
+ h += '<canvas class="mceColorSwatch" height="10" width="10" data-color="' + colors[i] + '"></canvas>';
260
+ }
261
+ h += '<span class="mceVoiceLabel" style="display:none;" id="named_colors_' + i + '">' + v + '</span>';
262
+ h += '</a>';
263
+ i++;
264
+ }
265
+
266
+ el.innerHTML = h;
267
+ el.className = 'generated';
268
+
269
+ paintCanvas(el);
270
+ enableKeyboardNavigation(el);
271
+ }
272
+
273
+ function enableKeyboardNavigation(el) {
274
+ tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', {
275
+ root: el,
276
+ items: tinyMCEPopup.dom.select('a', el)
277
+ }, tinyMCEPopup.dom);
278
+ }
279
+
280
+ function dechex(n) {
281
+ return strhex.charAt(Math.floor(n / 16)) + strhex.charAt(n % 16);
282
+ }
283
+
284
+ function computeColor(e) {
285
+ var x, y, partWidth, partDetail, imHeight, r, g, b, coef, i, finalCoef, finalR, finalG, finalB, pos = tinyMCEPopup.dom.getPos(e.target);
286
+
287
+ x = e.offsetX ? e.offsetX : (e.target ? e.clientX - pos.x : 0);
288
+ y = e.offsetY ? e.offsetY : (e.target ? e.clientY - pos.y : 0);
289
+
290
+ partWidth = document.getElementById('colors').width / 6;
291
+ partDetail = detail / 2;
292
+ imHeight = document.getElementById('colors').height;
293
+
294
+ r = (x >= 0)*(x < partWidth)*255 + (x >= partWidth)*(x < 2*partWidth)*(2*255 - x * 255 / partWidth) + (x >= 4*partWidth)*(x < 5*partWidth)*(-4*255 + x * 255 / partWidth) + (x >= 5*partWidth)*(x < 6*partWidth)*255;
295
+ g = (x >= 0)*(x < partWidth)*(x * 255 / partWidth) + (x >= partWidth)*(x < 3*partWidth)*255 + (x >= 3*partWidth)*(x < 4*partWidth)*(4*255 - x * 255 / partWidth);
296
+ b = (x >= 2*partWidth)*(x < 3*partWidth)*(-2*255 + x * 255 / partWidth) + (x >= 3*partWidth)*(x < 5*partWidth)*255 + (x >= 5*partWidth)*(x < 6*partWidth)*(6*255 - x * 255 / partWidth);
297
+
298
+ coef = (imHeight - y) / imHeight;
299
+ r = 128 + (r - 128) * coef;
300
+ g = 128 + (g - 128) * coef;
301
+ b = 128 + (b - 128) * coef;
302
+
303
+ changeFinalColor('#' + dechex(r) + dechex(g) + dechex(b));
304
+ updateLight(r, g, b);
305
+ }
306
+
307
+ function updateLight(r, g, b) {
308
+ var i, partDetail = detail / 2, finalCoef, finalR, finalG, finalB, color;
309
+
310
+ for (i=0; i<detail; i++) {
311
+ if ((i>=0) && (i<partDetail)) {
312
+ finalCoef = i / partDetail;
313
+ finalR = dechex(255 - (255 - r) * finalCoef);
314
+ finalG = dechex(255 - (255 - g) * finalCoef);
315
+ finalB = dechex(255 - (255 - b) * finalCoef);
316
+ } else {
317
+ finalCoef = 2 - i / partDetail;
318
+ finalR = dechex(r * finalCoef);
319
+ finalG = dechex(g * finalCoef);
320
+ finalB = dechex(b * finalCoef);
321
+ }
322
+
323
+ color = finalR + finalG + finalB;
324
+
325
+ setCol('gs' + i, '#'+color);
326
+ }
327
+ }
328
+
329
+ function changeFinalColor(color) {
330
+ if (color.indexOf('#') == -1)
331
+ color = convertRGBToHex(color);
332
+
333
+ setCol('preview', color);
334
+ document.getElementById('color').value = color;
335
+ }
336
+
337
+ function setCol(e, c) {
338
+ try {
339
+ document.getElementById(e).style.backgroundColor = c;
340
+ } catch (ex) {
341
+ // Ignore IE warning
342
+ }
343
+ }
344
+
345
+ tinyMCEPopup.onInit.add(init);
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/js/image.js CHANGED
@@ -1,253 +1,253 @@
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() {
12
- var f = document.forms[0], ed = tinyMCEPopup.editor;
13
-
14
- // Setup browse button
15
- document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image');
16
- if (isVisible('srcbrowser'))
17
- document.getElementById('src').style.width = '180px';
18
-
19
- e = ed.selection.getNode();
20
-
21
- this.fillFileList('image_list', tinyMCEPopup.getParam('external_image_list', 'tinyMCEImageList'));
22
-
23
- if (e.nodeName == 'IMG') {
24
- f.src.value = ed.dom.getAttrib(e, 'src');
25
- f.alt.value = ed.dom.getAttrib(e, 'alt');
26
- f.border.value = this.getAttrib(e, 'border');
27
- f.vspace.value = this.getAttrib(e, 'vspace');
28
- f.hspace.value = this.getAttrib(e, 'hspace');
29
- f.width.value = ed.dom.getAttrib(e, 'width');
30
- f.height.value = ed.dom.getAttrib(e, 'height');
31
- f.insert.value = ed.getLang('update');
32
- this.styleVal = ed.dom.getAttrib(e, 'style');
33
- selectByValue(f, 'image_list', f.src.value);
34
- selectByValue(f, 'align', this.getAttrib(e, 'align'));
35
- this.updateStyle();
36
- }
37
- },
38
-
39
- fillFileList : function(id, l) {
40
- var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
41
-
42
- l = typeof(l) === 'function' ? l() : window[l];
43
-
44
- if (l && l.length > 0) {
45
- lst.options[lst.options.length] = new Option('', '');
46
-
47
- tinymce.each(l, function(o) {
48
- lst.options[lst.options.length] = new Option(o[0], o[1]);
49
- });
50
- } else
51
- dom.remove(dom.getParent(id, 'tr'));
52
- },
53
-
54
- update : function() {
55
- var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, args = {}, el;
56
-
57
- tinyMCEPopup.restoreSelection();
58
-
59
- if (f.src.value === '') {
60
- if (ed.selection.getNode().nodeName == 'IMG') {
61
- ed.dom.remove(ed.selection.getNode());
62
- ed.execCommand('mceRepaint');
63
- }
64
-
65
- tinyMCEPopup.close();
66
- return;
67
- }
68
-
69
- if (!ed.settings.inline_styles) {
70
- args = tinymce.extend(args, {
71
- vspace : nl.vspace.value,
72
- hspace : nl.hspace.value,
73
- border : nl.border.value,
74
- align : getSelectValue(f, 'align')
75
- });
76
- } else
77
- args.style = this.styleVal;
78
-
79
- tinymce.extend(args, {
80
- src : f.src.value.replace(/ /g, '%20'),
81
- alt : f.alt.value,
82
- width : f.width.value,
83
- height : f.height.value
84
- });
85
-
86
- el = ed.selection.getNode();
87
-
88
- if (el && el.nodeName == 'IMG') {
89
- ed.dom.setAttribs(el, args);
90
- tinyMCEPopup.editor.execCommand('mceRepaint');
91
- tinyMCEPopup.editor.focus();
92
- } else {
93
- tinymce.each(args, function(value, name) {
94
- if (value === "") {
95
- delete args[name];
96
- }
97
- });
98
-
99
- ed.execCommand('mceInsertContent', false, tinyMCEPopup.editor.dom.createHTML('img', args), {skip_undo : 1});
100
- ed.undoManager.add();
101
- }
102
-
103
- tinyMCEPopup.close();
104
- },
105
-
106
- updateStyle : function() {
107
- var dom = tinyMCEPopup.dom, st = {}, v, f = document.forms[0];
108
-
109
- if (tinyMCEPopup.editor.settings.inline_styles) {
110
- tinymce.each(tinyMCEPopup.dom.parseStyle(this.styleVal), function(value, key) {
111
- st[key] = value;
112
- });
113
-
114
- // Handle align
115
- v = getSelectValue(f, 'align');
116
- if (v) {
117
- if (v == 'left' || v == 'right') {
118
- st['float'] = v;
119
- delete st['vertical-align'];
120
- } else {
121
- st['vertical-align'] = v;
122
- delete st['float'];
123
- }
124
- } else {
125
- delete st['float'];
126
- delete st['vertical-align'];
127
- }
128
-
129
- // Handle border
130
- v = f.border.value;
131
- if (v || v == '0') {
132
- if (v == '0')
133
- st['border'] = '0';
134
- else
135
- st['border'] = v + 'px solid black';
136
- } else
137
- delete st['border'];
138
-
139
- // Handle hspace
140
- v = f.hspace.value;
141
- if (v) {
142
- delete st['margin'];
143
- st['margin-left'] = v + 'px';
144
- st['margin-right'] = v + 'px';
145
- } else {
146
- delete st['margin-left'];
147
- delete st['margin-right'];
148
- }
149
-
150
- // Handle vspace
151
- v = f.vspace.value;
152
- if (v) {
153
- delete st['margin'];
154
- st['margin-top'] = v + 'px';
155
- st['margin-bottom'] = v + 'px';
156
- } else {
157
- delete st['margin-top'];
158
- delete st['margin-bottom'];
159
- }
160
-
161
- // Merge
162
- st = tinyMCEPopup.dom.parseStyle(dom.serializeStyle(st), 'img');
163
- this.styleVal = dom.serializeStyle(st, 'img');
164
- }
165
- },
166
-
167
- getAttrib : function(e, at) {
168
- var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2;
169
-
170
- if (ed.settings.inline_styles) {
171
- switch (at) {
172
- case 'align':
173
- if (v = dom.getStyle(e, 'float'))
174
- return v;
175
-
176
- if (v = dom.getStyle(e, 'vertical-align'))
177
- return v;
178
-
179
- break;
180
-
181
- case 'hspace':
182
- v = dom.getStyle(e, 'margin-left')
183
- v2 = dom.getStyle(e, 'margin-right');
184
- if (v && v == v2)
185
- return parseInt(v.replace(/[^0-9]/g, ''));
186
-
187
- break;
188
-
189
- case 'vspace':
190
- v = dom.getStyle(e, 'margin-top')
191
- v2 = dom.getStyle(e, 'margin-bottom');
192
- if (v && v == v2)
193
- return parseInt(v.replace(/[^0-9]/g, ''));
194
-
195
- break;
196
-
197
- case 'border':
198
- v = 0;
199
-
200
- tinymce.each(['top', 'right', 'bottom', 'left'], function(sv) {
201
- sv = dom.getStyle(e, 'border-' + sv + '-width');
202
-
203
- // False or not the same as prev
204
- if (!sv || (sv != v && v !== 0)) {
205
- v = 0;
206
- return false;
207
- }
208
-
209
- if (sv)
210
- v = sv;
211
- });
212
-
213
- if (v)
214
- return parseInt(v.replace(/[^0-9]/g, ''));
215
-
216
- break;
217
- }
218
- }
219
-
220
- if (v = dom.getAttrib(e, at))
221
- return v;
222
-
223
- return '';
224
- },
225
-
226
- resetImageData : function() {
227
- var f = document.forms[0];
228
-
229
- f.width.value = f.height.value = "";
230
- },
231
-
232
- updateImageData : function() {
233
- var f = document.forms[0], t = ImageDialog;
234
-
235
- if (f.width.value == "")
236
- f.width.value = t.preloadImg.width;
237
-
238
- if (f.height.value == "")
239
- f.height.value = t.preloadImg.height;
240
- },
241
-
242
- getImageData : function() {
243
- var f = document.forms[0];
244
-
245
- this.preloadImg = new Image();
246
- this.preloadImg.onload = this.updateImageData;
247
- this.preloadImg.onerror = this.resetImageData;
248
- this.preloadImg.src = tinyMCEPopup.editor.documentBaseURI.toAbsolute(f.src.value);
249
- }
250
- };
251
-
252
- ImageDialog.preInit();
253
- tinyMCEPopup.onInit.add(ImageDialog.init, ImageDialog);
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() {
12
+ var f = document.forms[0], ed = tinyMCEPopup.editor;
13
+
14
+ // Setup browse button
15
+ document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image');
16
+ if (isVisible('srcbrowser'))
17
+ document.getElementById('src').style.width = '180px';
18
+
19
+ e = ed.selection.getNode();
20
+
21
+ this.fillFileList('image_list', tinyMCEPopup.getParam('external_image_list', 'tinyMCEImageList'));
22
+
23
+ if (e.nodeName == 'IMG') {
24
+ f.src.value = ed.dom.getAttrib(e, 'src');
25
+ f.alt.value = ed.dom.getAttrib(e, 'alt');
26
+ f.border.value = this.getAttrib(e, 'border');
27
+ f.vspace.value = this.getAttrib(e, 'vspace');
28
+ f.hspace.value = this.getAttrib(e, 'hspace');
29
+ f.width.value = ed.dom.getAttrib(e, 'width');
30
+ f.height.value = ed.dom.getAttrib(e, 'height');
31
+ f.insert.value = ed.getLang('update');
32
+ this.styleVal = ed.dom.getAttrib(e, 'style');
33
+ selectByValue(f, 'image_list', f.src.value);
34
+ selectByValue(f, 'align', this.getAttrib(e, 'align'));
35
+ this.updateStyle();
36
+ }
37
+ },
38
+
39
+ fillFileList : function(id, l) {
40
+ var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
41
+
42
+ l = typeof(l) === 'function' ? l() : window[l];
43
+
44
+ if (l && l.length > 0) {
45
+ lst.options[lst.options.length] = new Option('', '');
46
+
47
+ tinymce.each(l, function(o) {
48
+ lst.options[lst.options.length] = new Option(o[0], o[1]);
49
+ });
50
+ } else
51
+ dom.remove(dom.getParent(id, 'tr'));
52
+ },
53
+
54
+ update : function() {
55
+ var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, args = {}, el;
56
+
57
+ tinyMCEPopup.restoreSelection();
58
+
59
+ if (f.src.value === '') {
60
+ if (ed.selection.getNode().nodeName == 'IMG') {
61
+ ed.dom.remove(ed.selection.getNode());
62
+ ed.execCommand('mceRepaint');
63
+ }
64
+
65
+ tinyMCEPopup.close();
66
+ return;
67
+ }
68
+
69
+ if (!ed.settings.inline_styles) {
70
+ args = tinymce.extend(args, {
71
+ vspace : nl.vspace.value,
72
+ hspace : nl.hspace.value,
73
+ border : nl.border.value,
74
+ align : getSelectValue(f, 'align')
75
+ });
76
+ } else
77
+ args.style = this.styleVal;
78
+
79
+ tinymce.extend(args, {
80
+ src : f.src.value.replace(/ /g, '%20'),
81
+ alt : f.alt.value,
82
+ width : f.width.value,
83
+ height : f.height.value
84
+ });
85
+
86
+ el = ed.selection.getNode();
87
+
88
+ if (el && el.nodeName == 'IMG') {
89
+ ed.dom.setAttribs(el, args);
90
+ tinyMCEPopup.editor.execCommand('mceRepaint');
91
+ tinyMCEPopup.editor.focus();
92
+ } else {
93
+ tinymce.each(args, function(value, name) {
94
+ if (value === "") {
95
+ delete args[name];
96
+ }
97
+ });
98
+
99
+ ed.execCommand('mceInsertContent', false, tinyMCEPopup.editor.dom.createHTML('img', args), {skip_undo : 1});
100
+ ed.undoManager.add();
101
+ }
102
+
103
+ tinyMCEPopup.close();
104
+ },
105
+
106
+ updateStyle : function() {
107
+ var dom = tinyMCEPopup.dom, st = {}, v, f = document.forms[0];
108
+
109
+ if (tinyMCEPopup.editor.settings.inline_styles) {
110
+ tinymce.each(tinyMCEPopup.dom.parseStyle(this.styleVal), function(value, key) {
111
+ st[key] = value;
112
+ });
113
+
114
+ // Handle align
115
+ v = getSelectValue(f, 'align');
116
+ if (v) {
117
+ if (v == 'left' || v == 'right') {
118
+ st['float'] = v;
119
+ delete st['vertical-align'];
120
+ } else {
121
+ st['vertical-align'] = v;
122
+ delete st['float'];
123
+ }
124
+ } else {
125
+ delete st['float'];
126
+ delete st['vertical-align'];
127
+ }
128
+
129
+ // Handle border
130
+ v = f.border.value;
131
+ if (v || v == '0') {
132
+ if (v == '0')
133
+ st['border'] = '0';
134
+ else
135
+ st['border'] = v + 'px solid black';
136
+ } else
137
+ delete st['border'];
138
+
139
+ // Handle hspace
140
+ v = f.hspace.value;
141
+ if (v) {
142
+ delete st['margin'];
143
+ st['margin-left'] = v + 'px';
144
+ st['margin-right'] = v + 'px';
145
+ } else {
146
+ delete st['margin-left'];
147
+ delete st['margin-right'];
148
+ }
149
+
150
+ // Handle vspace
151
+ v = f.vspace.value;
152
+ if (v) {
153
+ delete st['margin'];
154
+ st['margin-top'] = v + 'px';
155
+ st['margin-bottom'] = v + 'px';
156
+ } else {
157
+ delete st['margin-top'];
158
+ delete st['margin-bottom'];
159
+ }
160
+
161
+ // Merge
162
+ st = tinyMCEPopup.dom.parseStyle(dom.serializeStyle(st), 'img');
163
+ this.styleVal = dom.serializeStyle(st, 'img');
164
+ }
165
+ },
166
+
167
+ getAttrib : function(e, at) {
168
+ var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2;
169
+
170
+ if (ed.settings.inline_styles) {
171
+ switch (at) {
172
+ case 'align':
173
+ if (v = dom.getStyle(e, 'float'))
174
+ return v;
175
+
176
+ if (v = dom.getStyle(e, 'vertical-align'))
177
+ return v;
178
+
179
+ break;
180
+
181
+ case 'hspace':
182
+ v = dom.getStyle(e, 'margin-left')
183
+ v2 = dom.getStyle(e, 'margin-right');
184
+ if (v && v == v2)
185
+ return parseInt(v.replace(/[^0-9]/g, ''));
186
+
187
+ break;
188
+
189
+ case 'vspace':
190
+ v = dom.getStyle(e, 'margin-top')
191
+ v2 = dom.getStyle(e, 'margin-bottom');
192
+ if (v && v == v2)
193
+ return parseInt(v.replace(/[^0-9]/g, ''));
194
+
195
+ break;
196
+
197
+ case 'border':
198
+ v = 0;
199
+
200
+ tinymce.each(['top', 'right', 'bottom', 'left'], function(sv) {
201
+ sv = dom.getStyle(e, 'border-' + sv + '-width');
202
+
203
+ // False or not the same as prev
204
+ if (!sv || (sv != v && v !== 0)) {
205
+ v = 0;
206
+ return false;
207
+ }
208
+
209
+ if (sv)
210
+ v = sv;
211
+ });
212
+
213
+ if (v)
214
+ return parseInt(v.replace(/[^0-9]/g, ''));
215
+
216
+ break;
217
+ }
218
+ }
219
+
220
+ if (v = dom.getAttrib(e, at))
221
+ return v;
222
+
223
+ return '';
224
+ },
225
+
226
+ resetImageData : function() {
227
+ var f = document.forms[0];
228
+
229
+ f.width.value = f.height.value = "";
230
+ },
231
+
232
+ updateImageData : function() {
233
+ var f = document.forms[0], t = ImageDialog;
234
+
235
+ if (f.width.value == "")
236
+ f.width.value = t.preloadImg.width;
237
+
238
+ if (f.height.value == "")
239
+ f.height.value = t.preloadImg.height;
240
+ },
241
+
242
+ getImageData : function() {
243
+ var f = document.forms[0];
244
+
245
+ this.preloadImg = new Image();
246
+ this.preloadImg.onload = this.updateImageData;
247
+ this.preloadImg.onerror = this.resetImageData;
248
+ this.preloadImg.src = tinyMCEPopup.editor.documentBaseURI.toAbsolute(f.src.value);
249
+ }
250
+ };
251
+
252
+ ImageDialog.preInit();
253
+ tinyMCEPopup.onInit.add(ImageDialog.init, ImageDialog);
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/js/link.js CHANGED
@@ -1,159 +1,159 @@
1
- tinyMCEPopup.requireLangPack();
2
-
3
- var LinkDialog = {
4
- preInit : function() {
5
- var url;
6
-
7
- if (url = tinyMCEPopup.getParam("external_link_list_url"))
8
- document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
9
- },
10
-
11
- init : function() {
12
- var f = document.forms[0], ed = tinyMCEPopup.editor;
13
-
14
- // Setup browse button
15
- document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser', 'href', 'file', 'theme_advanced_link');
16
- if (isVisible('hrefbrowser'))
17
- document.getElementById('href').style.width = '180px';
18
-
19
- this.fillClassList('class_list');
20
- this.fillFileList('link_list', 'tinyMCELinkList');
21
- this.fillTargetList('target_list');
22
-
23
- if (e = ed.dom.getParent(ed.selection.getNode(), 'A')) {
24
- f.href.value = ed.dom.getAttrib(e, 'href');
25
- f.linktitle.value = ed.dom.getAttrib(e, 'title');
26
- f.insert.value = ed.getLang('update');
27
- selectByValue(f, 'link_list', f.href.value);
28
- selectByValue(f, 'target_list', ed.dom.getAttrib(e, 'target'));
29
- selectByValue(f, 'class_list', ed.dom.getAttrib(e, 'class'));
30
- }
31
- },
32
-
33
- update : function() {
34
- var f = document.forms[0], ed = tinyMCEPopup.editor, e, b, href = f.href.value.replace(/ /g, '%20');
35
-
36
- tinyMCEPopup.restoreSelection();
37
- e = ed.dom.getParent(ed.selection.getNode(), 'A');
38
-
39
- // Remove element if there is no href
40
- if (!f.href.value) {
41
- if (e) {
42
- b = ed.selection.getBookmark();
43
- ed.dom.remove(e, 1);
44
- ed.selection.moveToBookmark(b);
45
- tinyMCEPopup.execCommand("mceEndUndoLevel");
46
- tinyMCEPopup.close();
47
- return;
48
- }
49
- }
50
-
51
- // Create new anchor elements
52
- if (e == null) {
53
- ed.getDoc().execCommand("unlink", false, null);
54
- tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1});
55
-
56
- tinymce.each(ed.dom.select("a"), function(n) {
57
- if (ed.dom.getAttrib(n, 'href') == '#mce_temp_url#') {
58
- e = n;
59
-
60
- ed.dom.setAttribs(e, {
61
- href : href,
62
- title : f.linktitle.value,
63
- target : f.target_list ? getSelectValue(f, "target_list") : null,
64
- 'class' : f.class_list ? getSelectValue(f, "class_list") : null
65
- });
66
- }
67
- });
68
- } else {
69
- ed.dom.setAttribs(e, {
70
- href : href,
71
- title : f.linktitle.value
72
- });
73
-
74
- if (f.target_list) {
75
- ed.dom.setAttrib(e, 'target', getSelectValue(f, "target_list"));
76
- }
77
-
78
- if (f.class_list) {
79
- ed.dom.setAttrib(e, 'class', getSelectValue(f, "class_list"));
80
- }
81
- }
82
-
83
- // Don't move caret if selection was image
84
- if (e.childNodes.length != 1 || e.firstChild.nodeName != 'IMG') {
85
- ed.focus();
86
- ed.selection.select(e);
87
- ed.selection.collapse(0);
88
- tinyMCEPopup.storeSelection();
89
- }
90
-
91
- tinyMCEPopup.execCommand("mceEndUndoLevel");
92
- tinyMCEPopup.close();
93
- },
94
-
95
- checkPrefix : function(n) {
96
- if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_email')))
97
- n.value = 'mailto:' + n.value;
98
-
99
- if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_external')))
100
- n.value = 'http://' + n.value;
101
- },
102
-
103
- fillFileList : function(id, l) {
104
- var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
105
-
106
- l = window[l];
107
-
108
- if (l && l.length > 0) {
109
- lst.options[lst.options.length] = new Option('', '');
110
-
111
- tinymce.each(l, function(o) {
112
- lst.options[lst.options.length] = new Option(o[0], o[1]);
113
- });
114
- } else
115
- dom.remove(dom.getParent(id, 'tr'));
116
- },
117
-
118
- fillClassList : function(id) {
119
- var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
120
-
121
- if (v = tinyMCEPopup.getParam('theme_advanced_styles')) {
122
- cl = [];
123
-
124
- tinymce.each(v.split(';'), function(v) {
125
- var p = v.split('=');
126
-
127
- cl.push({'title' : p[0], 'class' : p[1]});
128
- });
129
- } else
130
- cl = tinyMCEPopup.editor.dom.getClasses();
131
-
132
- if (cl.length > 0) {
133
- lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), '');
134
-
135
- tinymce.each(cl, function(o) {
136
- lst.options[lst.options.length] = new Option(o.title || o['class'], o['class']);
137
- });
138
- } else
139
- dom.remove(dom.getParent(id, 'tr'));
140
- },
141
-
142
- fillTargetList : function(id) {
143
- var dom = tinyMCEPopup.dom, lst = dom.get(id), v;
144
-
145
- lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), '');
146
- lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_same'), '_self');
147
- lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_blank'), '_blank');
148
-
149
- if (v = tinyMCEPopup.getParam('theme_advanced_link_targets')) {
150
- tinymce.each(v.split(','), function(v) {
151
- v = v.split('=');
152
- lst.options[lst.options.length] = new Option(v[0], v[1]);
153
- });
154
- }
155
- }
156
- };
157
-
158
- LinkDialog.preInit();
159
- tinyMCEPopup.onInit.add(LinkDialog.init, LinkDialog);
1
+ tinyMCEPopup.requireLangPack();
2
+
3
+ var LinkDialog = {
4
+ preInit : function() {
5
+ var url;
6
+
7
+ if (url = tinyMCEPopup.getParam("external_link_list_url"))
8
+ document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
9
+ },
10
+
11
+ init : function() {
12
+ var f = document.forms[0], ed = tinyMCEPopup.editor;
13
+
14
+ // Setup browse button
15
+ document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser', 'href', 'file', 'theme_advanced_link');
16
+ if (isVisible('hrefbrowser'))
17
+ document.getElementById('href').style.width = '180px';
18
+
19
+ this.fillClassList('class_list');
20
+ this.fillFileList('link_list', 'tinyMCELinkList');
21
+ this.fillTargetList('target_list');
22
+
23
+ if (e = ed.dom.getParent(ed.selection.getNode(), 'A')) {
24
+ f.href.value = ed.dom.getAttrib(e, 'href');
25
+ f.linktitle.value = ed.dom.getAttrib(e, 'title');
26
+ f.insert.value = ed.getLang('update');
27
+ selectByValue(f, 'link_list', f.href.value);
28
+ selectByValue(f, 'target_list', ed.dom.getAttrib(e, 'target'));
29
+ selectByValue(f, 'class_list', ed.dom.getAttrib(e, 'class'));
30
+ }
31
+ },
32
+
33
+ update : function() {
34
+ var f = document.forms[0], ed = tinyMCEPopup.editor, e, b, href = f.href.value.replace(/ /g, '%20');
35
+
36
+ tinyMCEPopup.restoreSelection();
37
+ e = ed.dom.getParent(ed.selection.getNode(), 'A');
38
+
39
+ // Remove element if there is no href
40
+ if (!f.href.value) {
41
+ if (e) {
42
+ b = ed.selection.getBookmark();
43
+ ed.dom.remove(e, 1);
44
+ ed.selection.moveToBookmark(b);
45
+ tinyMCEPopup.execCommand("mceEndUndoLevel");
46
+ tinyMCEPopup.close();
47
+ return;
48
+ }
49
+ }
50
+
51
+ // Create new anchor elements
52
+ if (e == null) {
53
+ ed.getDoc().execCommand("unlink", false, null);
54
+ tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1});
55
+
56
+ tinymce.each(ed.dom.select("a"), function(n) {
57
+ if (ed.dom.getAttrib(n, 'href') == '#mce_temp_url#') {
58
+ e = n;
59
+
60
+ ed.dom.setAttribs(e, {
61
+ href : href,
62
+ title : f.linktitle.value,
63
+ target : f.target_list ? getSelectValue(f, "target_list") : null,
64
+ 'class' : f.class_list ? getSelectValue(f, "class_list") : null
65
+ });
66
+ }
67
+ });
68
+ } else {
69
+ ed.dom.setAttribs(e, {
70
+ href : href,
71
+ title : f.linktitle.value
72
+ });
73
+
74
+ if (f.target_list) {
75
+ ed.dom.setAttrib(e, 'target', getSelectValue(f, "target_list"));
76
+ }
77
+
78
+ if (f.class_list) {
79
+ ed.dom.setAttrib(e, 'class', getSelectValue(f, "class_list"));
80
+ }
81
+ }
82
+
83
+ // Don't move caret if selection was image
84
+ if (e.childNodes.length != 1 || e.firstChild.nodeName != 'IMG') {
85
+ ed.focus();
86
+ ed.selection.select(e);
87
+ ed.selection.collapse(0);
88
+ tinyMCEPopup.storeSelection();
89
+ }
90
+
91
+ tinyMCEPopup.execCommand("mceEndUndoLevel");
92
+ tinyMCEPopup.close();
93
+ },
94
+
95
+ checkPrefix : function(n) {
96
+ if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_email')))
97
+ n.value = 'mailto:' + n.value;
98
+
99
+ if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_external')))
100
+ n.value = 'http://' + n.value;
101
+ },
102
+
103
+ fillFileList : function(id, l) {
104
+ var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
105
+
106
+ l = window[l];
107
+
108
+ if (l && l.length > 0) {
109
+ lst.options[lst.options.length] = new Option('', '');
110
+
111
+ tinymce.each(l, function(o) {
112
+ lst.options[lst.options.length] = new Option(o[0], o[1]);
113
+ });
114
+ } else
115
+ dom.remove(dom.getParent(id, 'tr'));
116
+ },
117
+
118
+ fillClassList : function(id) {
119
+ var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
120
+
121
+ if (v = tinyMCEPopup.getParam('theme_advanced_styles')) {
122
+ cl = [];
123
+
124
+ tinymce.each(v.split(';'), function(v) {
125
+ var p = v.split('=');
126
+
127
+ cl.push({'title' : p[0], 'class' : p[1]});
128
+ });
129
+ } else
130
+ cl = tinyMCEPopup.editor.dom.getClasses();
131
+
132
+ if (cl.length > 0) {
133
+ lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), '');
134
+
135
+ tinymce.each(cl, function(o) {
136
+ lst.options[lst.options.length] = new Option(o.title || o['class'], o['class']);
137
+ });
138
+ } else
139
+ dom.remove(dom.getParent(id, 'tr'));
140
+ },
141
+
142
+ fillTargetList : function(id) {
143
+ var dom = tinyMCEPopup.dom, lst = dom.get(id), v;
144
+
145
+ lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), '');
146
+ lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_same'), '_self');
147
+ lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_blank'), '_blank');
148
+
149
+ if (v = tinyMCEPopup.getParam('theme_advanced_link_targets')) {
150
+ tinymce.each(v.split(','), function(v) {
151
+ v = v.split('=');
152
+ lst.options[lst.options.length] = new Option(v[0], v[1]);
153
+ });
154
+ }
155
+ }
156
+ };
157
+
158
+ LinkDialog.preInit();
159
+ tinyMCEPopup.onInit.add(LinkDialog.init, LinkDialog);
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/js/source_editor.js CHANGED
@@ -1,78 +1,78 @@
1
- tinyMCEPopup.requireLangPack();
2
- tinyMCEPopup.onInit.add(onLoadInit);
3
-
4
- function saveContent() {
5
- tinyMCEPopup.editor.setContent(document.getElementById('htmlSource').value, {source_view : true});
6
- tinyMCEPopup.close();
7
- }
8
-
9
- function onLoadInit() {
10
- tinyMCEPopup.resizeToInnerSize();
11
-
12
- // Remove Gecko spellchecking
13
- if (tinymce.isGecko)
14
- document.body.spellcheck = tinyMCEPopup.editor.getParam("gecko_spellcheck");
15
-
16
- document.getElementById('htmlSource').value = tinyMCEPopup.editor.getContent({source_view : true});
17
-
18
- if (tinyMCEPopup.editor.getParam("theme_advanced_source_editor_wrap", true)) {
19
- turnWrapOn();
20
- document.getElementById('wraped').checked = true;
21
- }
22
-
23
- resizeInputs();
24
- }
25
-
26
- function setWrap(val) {
27
- var v, n, s = document.getElementById('htmlSource');
28
-
29
- s.wrap = val;
30
-
31
- if (!tinymce.isIE) {
32
- v = s.value;
33
- n = s.cloneNode(false);
34
- n.setAttribute("wrap", val);
35
- s.parentNode.replaceChild(n, s);
36
- n.value = v;
37
- }
38
- }
39
-
40
- function setWhiteSpaceCss(value) {
41
- var el = document.getElementById('htmlSource');
42
- tinymce.DOM.setStyle(el, 'white-space', value);
43
- }
44
-
45
- function turnWrapOff() {
46
- if (tinymce.isWebKit) {
47
- setWhiteSpaceCss('pre');
48
- } else {
49
- setWrap('off');
50
- }
51
- }
52
-
53
- function turnWrapOn() {
54
- if (tinymce.isWebKit) {
55
- setWhiteSpaceCss('pre-wrap');
56
- } else {
57
- setWrap('soft');
58
- }
59
- }
60
-
61
- function toggleWordWrap(elm) {
62
- if (elm.checked) {
63
- turnWrapOn();
64
- } else {
65
- turnWrapOff();
66
- }
67
- }
68
-
69
- function resizeInputs() {
70
- var vp = tinyMCEPopup.dom.getViewPort(window), el;
71
-
72
- el = document.getElementById('htmlSource');
73
-
74
- if (el) {
75
- el.style.width = (vp.w - 20) + 'px';
76
- el.style.height = (vp.h - 65) + 'px';
77
- }
78
- }
1
+ tinyMCEPopup.requireLangPack();
2
+ tinyMCEPopup.onInit.add(onLoadInit);
3
+
4
+ function saveContent() {
5
+ tinyMCEPopup.editor.setContent(document.getElementById('htmlSource').value, {source_view : true});
6
+ tinyMCEPopup.close();
7
+ }
8
+
9
+ function onLoadInit() {
10
+ tinyMCEPopup.resizeToInnerSize();
11
+
12
+ // Remove Gecko spellchecking
13
+ if (tinymce.isGecko)
14
+ document.body.spellcheck = tinyMCEPopup.editor.getParam("gecko_spellcheck");
15
+
16
+ document.getElementById('htmlSource').value = tinyMCEPopup.editor.getContent({source_view : true});
17
+
18
+ if (tinyMCEPopup.editor.getParam("theme_advanced_source_editor_wrap", true)) {
19
+ turnWrapOn();
20
+ document.getElementById('wraped').checked = true;
21
+ }
22
+
23
+ resizeInputs();
24
+ }
25
+
26
+ function setWrap(val) {
27
+ var v, n, s = document.getElementById('htmlSource');
28
+
29
+ s.wrap = val;
30
+
31
+ if (!tinymce.isIE) {
32
+ v = s.value;
33
+ n = s.cloneNode(false);
34
+ n.setAttribute("wrap", val);
35
+ s.parentNode.replaceChild(n, s);
36
+ n.value = v;
37
+ }
38
+ }
39
+
40
+ function setWhiteSpaceCss(value) {
41
+ var el = document.getElementById('htmlSource');
42
+ tinymce.DOM.setStyle(el, 'white-space', value);
43
+ }
44
+
45
+ function turnWrapOff() {
46
+ if (tinymce.isWebKit) {
47
+ setWhiteSpaceCss('pre');
48
+ } else {
49
+ setWrap('off');
50
+ }
51
+ }
52
+
53
+ function turnWrapOn() {
54
+ if (tinymce.isWebKit) {
55
+ setWhiteSpaceCss('pre-wrap');
56
+ } else {
57
+ setWrap('soft');
58
+ }
59
+ }
60
+
61
+ function toggleWordWrap(elm) {
62
+ if (elm.checked) {
63
+ turnWrapOn();
64
+ } else {
65
+ turnWrapOff();
66
+ }
67
+ }
68
+
69
+ function resizeInputs() {
70
+ var vp = tinyMCEPopup.dom.getViewPort(window), el;
71
+
72
+ el = document.getElementById('htmlSource');
73
+
74
+ if (el) {
75
+ el.style.width = (vp.w - 20) + 'px';
76
+ el.style.height = (vp.h - 65) + 'px';
77
+ }
78
+ }
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/langs/en_dlg.js CHANGED
@@ -1 +1 @@
1
- tinyMCE.addI18n('en.advanced_dlg', {"link_list":"Link List","link_is_external":"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?","link_is_email":"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?","link_titlefield":"Title","link_target_blank":"Open Link in a New Window","link_target_same":"Open Link in the Same Window","link_target":"Target","link_url":"Link URL","link_title":"Insert/Edit Link","image_align_right":"Right","image_align_left":"Left","image_align_textbottom":"Text Bottom","image_align_texttop":"Text Top","image_align_bottom":"Bottom","image_align_middle":"Middle","image_align_top":"Top","image_align_baseline":"Baseline","image_align":"Alignment","image_hspace":"Horizontal Space","image_vspace":"Vertical Space","image_dimensions":"Dimensions","image_alt":"Image Description","image_list":"Image List","image_border":"Border","image_src":"Image URL","image_title":"Insert/Edit Image","charmap_title":"Select Special Character", "charmap_usage":"Use left and right arrows to navigate.","colorpicker_name":"Name:","colorpicker_color":"Color:","colorpicker_named_title":"Named Colors","colorpicker_named_tab":"Named","colorpicker_palette_title":"Palette Colors","colorpicker_palette_tab":"Palette","colorpicker_picker_title":"Color Picker","colorpicker_picker_tab":"Picker","colorpicker_title":"Select a Color","code_wordwrap":"Word Wrap","code_title":"HTML Source Editor","anchor_name":"Anchor Name","anchor_title":"Insert/Edit Anchor","about_loaded":"Loaded Plugins","about_version":"Version","about_author":"Author","about_plugin":"Plugin","about_plugins":"Plugins","about_license":"License","about_help":"Help","about_general":"About","about_title":"About TinyMCE","anchor_invalid":"Please specify a valid anchor name.","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage","invalid_color_value":"Invalid color value","":""});
1
+ tinyMCE.addI18n('en.advanced_dlg', {"link_list":"Link List","link_is_external":"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?","link_is_email":"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?","link_titlefield":"Title","link_target_blank":"Open Link in a New Window","link_target_same":"Open Link in the Same Window","link_target":"Target","link_url":"Link URL","link_title":"Insert/Edit Link","image_align_right":"Right","image_align_left":"Left","image_align_textbottom":"Text Bottom","image_align_texttop":"Text Top","image_align_bottom":"Bottom","image_align_middle":"Middle","image_align_top":"Top","image_align_baseline":"Baseline","image_align":"Alignment","image_hspace":"Horizontal Space","image_vspace":"Vertical Space","image_dimensions":"Dimensions","image_alt":"Image Description","image_list":"Image List","image_border":"Border","image_src":"Image URL","image_title":"Insert/Edit Image","charmap_title":"Select Special Character", "charmap_usage":"Use left and right arrows to navigate.","colorpicker_name":"Name:","colorpicker_color":"Color:","colorpicker_named_title":"Named Colors","colorpicker_named_tab":"Named","colorpicker_palette_title":"Palette Colors","colorpicker_palette_tab":"Palette","colorpicker_picker_title":"Color Picker","colorpicker_picker_tab":"Picker","colorpicker_title":"Select a Color","code_wordwrap":"Word Wrap","code_title":"HTML Source Editor","anchor_name":"Anchor Name","anchor_title":"Insert/Edit Anchor","about_loaded":"Loaded Plugins","about_version":"Version","about_author":"Author","about_plugin":"Plugin","about_plugins":"Plugins","about_license":"License","about_help":"Help","about_general":"About","about_title":"About TinyMCE","anchor_invalid":"Please specify a valid anchor name.","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage","invalid_color_value":"Invalid color value","":""});
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/link.htm CHANGED
@@ -1,57 +1,57 @@
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>{#advanced_dlg.link_title}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js"></script>
7
- <script type="text/javascript" src="../../utils/form_utils.js"></script>
8
- <script type="text/javascript" src="../../utils/validate.js"></script>
9
- <script type="text/javascript" src="js/link.js"></script>
10
- </head>
11
- <body id="link" style="display: none">
12
- <form onsubmit="LinkDialog.update();return false;" action="#">
13
- <div class="tabs">
14
- <ul>
15
- <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advanced_dlg.link_title}</a></span></li>
16
- </ul>
17
- </div>
18
-
19
- <div class="panel_wrapper">
20
- <div id="general_panel" class="panel current">
21
- <table border="0" cellpadding="4" cellspacing="0">
22
- <tr>
23
- <td class="nowrap"><label for="href">{#advanced_dlg.link_url}</label></td>
24
- <td><table border="0" cellspacing="0" cellpadding="0">
25
- <tr>
26
- <td><input id="href" name="href" type="text" class="mceFocus" value="" style="width: 200px" onchange="LinkDialog.checkPrefix(this);" /></td>
27
- <td id="hrefbrowsercontainer">&nbsp;</td>
28
- </tr>
29
- </table></td>
30
- </tr>
31
- <tr>
32
- <td><label for="link_list">{#advanced_dlg.link_list}</label></td>
33
- <td><select id="link_list" name="link_list" onchange="document.getElementById('href').value=this.options[this.selectedIndex].value;"></select></td>
34
- </tr>
35
- <tr>
36
- <td><label id="targetlistlabel" for="targetlist">{#advanced_dlg.link_target}</label></td>
37
- <td><select id="target_list" name="target_list"></select></td>
38
- </tr>
39
- <tr>
40
- <td class="nowrap"><label for="linktitle">{#advanced_dlg.link_titlefield}</label></td>
41
- <td><input id="linktitle" name="linktitle" type="text" value="" style="width: 200px" /></td>
42
- </tr>
43
- <tr>
44
- <td><label for="class_list">{#class_name}</label></td>
45
- <td><select id="class_list" name="class_list"></select></td>
46
- </tr>
47
- </table>
48
- </div>
49
- </div>
50
-
51
- <div class="mceActionPanel">
52
- <input type="submit" id="insert" name="insert" value="{#insert}" />
53
- <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
54
- </div>
55
- </form>
56
- </body>
57
- </html>
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>{#advanced_dlg.link_title}</title>
5
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
7
+ <script type="text/javascript" src="../../utils/form_utils.js"></script>
8
+ <script type="text/javascript" src="../../utils/validate.js"></script>
9
+ <script type="text/javascript" src="js/link.js"></script>
10
+ </head>
11
+ <body id="link" style="display: none">
12
+ <form onsubmit="LinkDialog.update();return false;" action="#">
13
+ <div class="tabs">
14
+ <ul>
15
+ <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advanced_dlg.link_title}</a></span></li>
16
+ </ul>
17
+ </div>
18
+
19
+ <div class="panel_wrapper">
20
+ <div id="general_panel" class="panel current">
21
+ <table border="0" cellpadding="4" cellspacing="0">
22
+ <tr>
23
+ <td class="nowrap"><label for="href">{#advanced_dlg.link_url}</label></td>
24
+ <td><table border="0" cellspacing="0" cellpadding="0">
25
+ <tr>
26
+ <td><input id="href" name="href" type="text" class="mceFocus" value="" style="width: 200px" onchange="LinkDialog.checkPrefix(this);" /></td>
27
+ <td id="hrefbrowsercontainer">&nbsp;</td>
28
+ </tr>
29
+ </table></td>
30
+ </tr>
31
+ <tr>
32
+ <td><label for="link_list">{#advanced_dlg.link_list}</label></td>
33
+ <td><select id="link_list" name="link_list" onchange="document.getElementById('href').value=this.options[this.selectedIndex].value;"></select></td>
34
+ </tr>
35
+ <tr>
36
+ <td><label id="targetlistlabel" for="targetlist">{#advanced_dlg.link_target}</label></td>
37
+ <td><select id="target_list" name="target_list"></select></td>
38
+ </tr>
39
+ <tr>
40
+ <td class="nowrap"><label for="linktitle">{#advanced_dlg.link_titlefield}</label></td>
41
+ <td><input id="linktitle" name="linktitle" type="text" value="" style="width: 200px" /></td>
42
+ </tr>
43
+ <tr>
44
+ <td><label for="class_list">{#class_name}</label></td>
45
+ <td><select id="class_list" name="class_list"></select></td>
46
+ </tr>
47
+ </table>
48
+ </div>
49
+ </div>
50
+
51
+ <div class="mceActionPanel">
52
+ <input type="submit" id="insert" name="insert" value="{#insert}" />
53
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
54
+ </div>
55
+ </form>
56
+ </body>
57
+ </html>
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/shortcuts.htm CHANGED
@@ -1,47 +1,47 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <title>{#advanced_dlg.accessibility_help}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
6
- <script type="text/javascript">tinyMCEPopup.requireLangPack();</script>
7
- </head>
8
- <body id="content">
9
- <h1>{#advanced_dlg.accessibility_usage_title}</h1>
10
- <h2>Toolbars</h2>
11
- <p>Press ALT-F10 to move focus to the toolbars. Navigate through the buttons using the arrow keys.
12
- Press enter to activate a button and return focus to the editor.
13
- Press escape to return focus to the editor without performing any actions.</p>
14
-
15
- <h2>Status Bar</h2>
16
- <p>To access the editor status bar, press ALT-F11. Use the left and right arrow keys to navigate between elements in the path.
17
- Press enter or space to select an element. Press escape to return focus to the editor without changing the selection.</p>
18
-
19
- <h2>Context Menu</h2>
20
- <p>Press shift-F10 to activate the context menu. Use the up and down arrow keys to move between menu items. To open sub-menus press the right arrow key.
21
- To close submenus press the left arrow key. Press escape to close the context menu.</p>
22
-
23
- <h1>Keyboard Shortcuts</h1>
24
- <table>
25
- <thead>
26
- <tr>
27
- <th>Keystroke</th>
28
- <th>Function</th>
29
- </tr>
30
- </thead>
31
- <tbody>
32
- <tr>
33
- <td>Control-B</td><td>Bold</td>
34
- </tr>
35
- <tr>
36
- <td>Control-I</td><td>Italic</td>
37
- </tr>
38
- <tr>
39
- <td>Control-Z</td><td>Undo</td>
40
- </tr>
41
- <tr>
42
- <td>Control-Y</td><td>Redo</td>
43
- </tr>
44
- </tbody>
45
- </table>
46
- </body>
47
- </html>
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml">
3
+ <head>
4
+ <title>{#advanced_dlg.accessibility_help}</title>
5
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
6
+ <script type="text/javascript">tinyMCEPopup.requireLangPack();</script>
7
+ </head>
8
+ <body id="content">
9
+ <h1>{#advanced_dlg.accessibility_usage_title}</h1>
10
+ <h2>Toolbars</h2>
11
+ <p>Press ALT-F10 to move focus to the toolbars. Navigate through the buttons using the arrow keys.
12
+ Press enter to activate a button and return focus to the editor.
13
+ Press escape to return focus to the editor without performing any actions.</p>
14
+
15
+ <h2>Status Bar</h2>
16
+ <p>To access the editor status bar, press ALT-F11. Use the left and right arrow keys to navigate between elements in the path.
17
+ Press enter or space to select an element. Press escape to return focus to the editor without changing the selection.</p>
18
+
19
+ <h2>Context Menu</h2>
20
+ <p>Press shift-F10 to activate the context menu. Use the up and down arrow keys to move between menu items. To open sub-menus press the right arrow key.
21
+ To close submenus press the left arrow key. Press escape to close the context menu.</p>
22
+
23
+ <h1>Keyboard Shortcuts</h1>
24
+ <table>
25
+ <thead>
26
+ <tr>
27
+ <th>Keystroke</th>
28
+ <th>Function</th>
29
+ </tr>
30
+ </thead>
31
+ <tbody>
32
+ <tr>
33
+ <td>Control-B</td><td>Bold</td>
34
+ </tr>
35
+ <tr>
36
+ <td>Control-I</td><td>Italic</td>
37
+ </tr>
38
+ <tr>
39
+ <td>Control-Z</td><td>Undo</td>
40
+ </tr>
41
+ <tr>
42
+ <td>Control-Y</td><td>Redo</td>
43
+ </tr>
44
+ </tbody>
45
+ </table>
46
+ </body>
47
+ </html>
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/default/content.css CHANGED
@@ -1,50 +1,50 @@
1
- body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;}
2
- body {background:#FFF;}
3
- body.mceForceColors {background:#FFF; color:#000;}
4
- body.mceBrowserDefaults {background:transparent; color:inherit; font-size:inherit; font-family:inherit;}
5
- h1 {font-size: 2em}
6
- h2 {font-size: 1.5em}
7
- h3 {font-size: 1.17em}
8
- h4 {font-size: 1em}
9
- h5 {font-size: .83em}
10
- h6 {font-size: .75em}
11
- .mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;}
12
- a.mceItemAnchor {display:inline-block; -webkit-user-select:all; -webkit-user-modify:read-only; -moz-user-select:all; -moz-user-modify:read-only; width:11px !important; height:11px !important; background:url(img/items.gif) no-repeat center center}
13
- span.mceItemNbsp {background: #DDD}
14
- td.mceSelected, th.mceSelected {background-color:#3399ff !important}
15
- img {border:0;}
16
- table, img, hr, .mceItemAnchor {cursor:default}
17
- table td, table th {cursor:text}
18
- ins {border-bottom:1px solid green; text-decoration: none; color:green}
19
- del {color:red; text-decoration:line-through}
20
- cite {border-bottom:1px dashed blue}
21
- acronym {border-bottom:1px dotted #CCC; cursor:help}
22
- abbr {border-bottom:1px dashed #CCC; cursor:help}
23
-
24
- /* IE */
25
- * html body {
26
- scrollbar-3dlight-color:#F0F0EE;
27
- scrollbar-arrow-color:#676662;
28
- scrollbar-base-color:#F0F0EE;
29
- scrollbar-darkshadow-color:#DDD;
30
- scrollbar-face-color:#E0E0DD;
31
- scrollbar-highlight-color:#F0F0EE;
32
- scrollbar-shadow-color:#F0F0EE;
33
- scrollbar-track-color:#F5F5F5;
34
- }
35
-
36
- img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px}
37
- font[face=mceinline] {font-family:inherit !important}
38
- *[contentEditable]:focus {outline:0}
39
-
40
- .mceItemMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc}
41
- .mceItemShockWave {background-image:url(../../img/shockwave.gif)}
42
- .mceItemFlash {background-image:url(../../img/flash.gif)}
43
- .mceItemQuickTime {background-image:url(../../img/quicktime.gif)}
44
- .mceItemWindowsMedia {background-image:url(../../img/windowsmedia.gif)}
45
- .mceItemRealMedia {background-image:url(../../img/realmedia.gif)}
46
- .mceItemVideo {background-image:url(../../img/video.gif)}
47
- .mceItemAudio {background-image:url(../../img/video.gif)}
48
- .mceItemEmbeddedAudio {background-image:url(../../img/video.gif)}
49
- .mceItemIframe {background-image:url(../../img/iframe.gif)}
50
- .mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../../img/pagebreak.gif) no-repeat center top;}
1
+ body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;}
2
+ body {background:#FFF;}
3
+ body.mceForceColors {background:#FFF; color:#000;}
4
+ body.mceBrowserDefaults {background:transparent; color:inherit; font-size:inherit; font-family:inherit;}
5
+ h1 {font-size: 2em}
6
+ h2 {font-size: 1.5em}
7
+ h3 {font-size: 1.17em}
8
+ h4 {font-size: 1em}
9
+ h5 {font-size: .83em}
10
+ h6 {font-size: .75em}
11
+ .mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;}
12
+ a.mceItemAnchor {display:inline-block; -webkit-user-select:all; -webkit-user-modify:read-only; -moz-user-select:all; -moz-user-modify:read-only; width:11px !important; height:11px !important; background:url(img/items.gif) no-repeat center center}
13
+ span.mceItemNbsp {background: #DDD}
14
+ td.mceSelected, th.mceSelected {background-color:#3399ff !important}
15
+ img {border:0;}
16
+ table, img, hr, .mceItemAnchor {cursor:default}
17
+ table td, table th {cursor:text}
18
+ ins {border-bottom:1px solid green; text-decoration: none; color:green}
19
+ del {color:red; text-decoration:line-through}
20
+ cite {border-bottom:1px dashed blue}
21
+ acronym {border-bottom:1px dotted #CCC; cursor:help}
22
+ abbr {border-bottom:1px dashed #CCC; cursor:help}
23
+
24
+ /* IE */
25
+ * html body {
26
+ scrollbar-3dlight-color:#F0F0EE;
27
+ scrollbar-arrow-color:#676662;
28
+ scrollbar-base-color:#F0F0EE;
29
+ scrollbar-darkshadow-color:#DDD;
30
+ scrollbar-face-color:#E0E0DD;
31
+ scrollbar-highlight-color:#F0F0EE;
32
+ scrollbar-shadow-color:#F0F0EE;
33
+ scrollbar-track-color:#F5F5F5;
34
+ }
35
+
36
+ img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px}
37
+ font[face=mceinline] {font-family:inherit !important}
38
+ *[contentEditable]:focus {outline:0}
39
+
40
+ .mceItemMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc}
41
+ .mceItemShockWave {background-image:url(../../img/shockwave.gif)}
42
+ .mceItemFlash {background-image:url(../../img/flash.gif)}
43
+ .mceItemQuickTime {background-image:url(../../img/quicktime.gif)}
44
+ .mceItemWindowsMedia {background-image:url(../../img/windowsmedia.gif)}
45
+ .mceItemRealMedia {background-image:url(../../img/realmedia.gif)}
46
+ .mceItemVideo {background-image:url(../../img/video.gif)}
47
+ .mceItemAudio {background-image:url(../../img/video.gif)}
48
+ .mceItemEmbeddedAudio {background-image:url(../../img/video.gif)}
49
+ .mceItemIframe {background-image:url(../../img/iframe.gif)}
50
+ .mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../../img/pagebreak.gif) no-repeat center top;}
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/default/dialog.css CHANGED
@@ -1,118 +1,118 @@
1
- /* Generic */
2
- body {
3
- font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;
4
- scrollbar-3dlight-color:#F0F0EE;
5
- scrollbar-arrow-color:#676662;
6
- scrollbar-base-color:#F0F0EE;
7
- scrollbar-darkshadow-color:#DDDDDD;
8
- scrollbar-face-color:#E0E0DD;
9
- scrollbar-highlight-color:#F0F0EE;
10
- scrollbar-shadow-color:#F0F0EE;
11
- scrollbar-track-color:#F5F5F5;
12
- background:#F0F0EE;
13
- padding:0;
14
- margin:8px 8px 0 8px;
15
- }
16
-
17
- html {background:#F0F0EE;}
18
- td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
19
- textarea {resize:none;outline:none;}
20
- a:link, a:visited {color:black;}
21
- a:hover {color:#2B6FB6;}
22
- .nowrap {white-space: nowrap}
23
-
24
- /* Forms */
25
- fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;}
26
- legend {color:#2B6FB6; font-weight:bold;}
27
- label.msg {display:none;}
28
- label.invalid {color:#EE0000; display:inline;}
29
- input.invalid {border:1px solid #EE0000;}
30
- input {background:#FFF; border:1px solid #CCC;}
31
- input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
32
- input, select, textarea {border:1px solid #808080;}
33
- input.radio {border:1px none #000000; background:transparent; vertical-align:middle;}
34
- input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;}
35
- .input_noborder {border:0;}
36
-
37
- /* Buttons */
38
- #insert, #cancel, input.button, .updateButton {
39
- border:0; margin:0; padding:0;
40
- font-weight:bold;
41
- width:94px; height:26px;
42
- background:url(img/buttons.png) 0 -26px;
43
- cursor:pointer;
44
- padding-bottom:2px;
45
- float:left;
46
- }
47
-
48
- #insert {background:url(img/buttons.png) 0 -52px}
49
- #cancel {background:url(img/buttons.png) 0 0; float:right}
50
-
51
- /* Browse */
52
- a.pickcolor, a.browse {text-decoration:none}
53
- a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;}
54
- .mceOldBoxModel a.browse span {width:22px; height:20px;}
55
- a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;}
56
- a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
57
- a.browse:hover span.disabled {border:1px solid white; background-color:transparent;}
58
- a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;}
59
- .mceOldBoxModel a.pickcolor span {width:21px; height:17px;}
60
- a.pickcolor:hover span {background-color:#B2BBD0;}
61
- a.pickcolor:hover span.disabled {}
62
-
63
- /* Charmap */
64
- table.charmap {border:1px solid #AAA; text-align:center}
65
- td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;}
66
- #charmap a {display:block; color:#000; text-decoration:none; border:0}
67
- #charmap a:hover {background:#CCC;color:#2B6FB6}
68
- #charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center}
69
- #charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center}
70
-
71
- /* Source */
72
- .wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
73
- .mceActionPanel {margin-top:5px;}
74
-
75
- /* Tabs classes */
76
- .tabs {width:100%; height:18px; line-height:normal; background:url(img/tabs.gif) repeat-x 0 -72px;}
77
- .tabs ul {margin:0; padding:0; list-style:none;}
78
- .tabs li {float:left; background:url(img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;}
79
- .tabs li.current {background:url(img/tabs.gif) no-repeat 0 -18px; margin-right:2px;}
80
- .tabs span {float:left; display:block; background:url(img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;}
81
- .tabs .current span {background:url(img/tabs.gif) no-repeat right -54px;}
82
- .tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;}
83
- .tabs a:link, .tabs a:visited, .tabs a:hover {color:black;}
84
-
85
- /* Panels */
86
- .panel_wrapper div.panel {display:none;}
87
- .panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;}
88
- .panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;}
89
-
90
- /* Columns */
91
- .column {float:left;}
92
- .properties {width:100%;}
93
- .properties .column1 {}
94
- .properties .column2 {text-align:left;}
95
-
96
- /* Titles */
97
- h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;}
98
- h3 {font-size:14px;}
99
- .title {font-size:12px; font-weight:bold; color:#2B6FB6;}
100
-
101
- /* Dialog specific */
102
- #link .panel_wrapper, #link div.current {height:125px;}
103
- #image .panel_wrapper, #image div.current {height:200px;}
104
- #plugintable thead {font-weight:bold; background:#DDD;}
105
- #plugintable, #about #plugintable td {border:1px solid #919B9C;}
106
- #plugintable {width:96%; margin-top:10px;}
107
- #pluginscontainer {height:290px; overflow:auto;}
108
- #colorpicker #preview {display:inline-block; padding-left:40px; height:14px; border:1px solid black; margin-left:5px; margin-right: 5px}
109
- #colorpicker #previewblock {position: relative; top: -3px; padding-left:5px; padding-top: 0px; display:inline}
110
- #colorpicker #preview_wrapper { text-align:center; padding-top:4px; white-space: nowrap}
111
- #colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;}
112
- #colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;}
113
- #colorpicker #light div {overflow:hidden;}
114
- #colorpicker .panel_wrapper div.current {height:175px;}
115
- #colorpicker #namedcolors {width:150px;}
116
- #colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;}
117
- #colorpicker #colornamecontainer {margin-top:5px;}
118
- #colorpicker #picker_panel fieldset {margin:auto;width:325px;}
1
+ /* Generic */
2
+ body {
3
+ font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;
4
+ scrollbar-3dlight-color:#F0F0EE;
5
+ scrollbar-arrow-color:#676662;
6
+ scrollbar-base-color:#F0F0EE;
7
+ scrollbar-darkshadow-color:#DDDDDD;
8
+ scrollbar-face-color:#E0E0DD;
9
+ scrollbar-highlight-color:#F0F0EE;
10
+ scrollbar-shadow-color:#F0F0EE;
11
+ scrollbar-track-color:#F5F5F5;
12
+ background:#F0F0EE;
13
+ padding:0;
14
+ margin:8px 8px 0 8px;
15
+ }
16
+
17
+ html {background:#F0F0EE;}
18
+ td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
19
+ textarea {resize:none;outline:none;}
20
+ a:link, a:visited {color:black;}
21
+ a:hover {color:#2B6FB6;}
22
+ .nowrap {white-space: nowrap}
23
+
24
+ /* Forms */
25
+ fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;}
26
+ legend {color:#2B6FB6; font-weight:bold;}
27
+ label.msg {display:none;}
28
+ label.invalid {color:#EE0000; display:inline;}
29
+ input.invalid {border:1px solid #EE0000;}
30
+ input {background:#FFF; border:1px solid #CCC;}
31
+ input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
32
+ input, select, textarea {border:1px solid #808080;}
33
+ input.radio {border:1px none #000000; background:transparent; vertical-align:middle;}
34
+ input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;}
35
+ .input_noborder {border:0;}
36
+
37
+ /* Buttons */
38
+ #insert, #cancel, input.button, .updateButton {
39
+ border:0; margin:0; padding:0;
40
+ font-weight:bold;
41
+ width:94px; height:26px;
42
+ background:url(img/buttons.png) 0 -26px;
43
+ cursor:pointer;
44
+ padding-bottom:2px;
45
+ float:left;
46
+ }
47
+
48
+ #insert {background:url(img/buttons.png) 0 -52px}
49
+ #cancel {background:url(img/buttons.png) 0 0; float:right}
50
+
51
+ /* Browse */
52
+ a.pickcolor, a.browse {text-decoration:none}
53
+ a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;}
54
+ .mceOldBoxModel a.browse span {width:22px; height:20px;}
55
+ a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;}
56
+ a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
57
+ a.browse:hover span.disabled {border:1px solid white; background-color:transparent;}
58
+ a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;}
59
+ .mceOldBoxModel a.pickcolor span {width:21px; height:17px;}
60
+ a.pickcolor:hover span {background-color:#B2BBD0;}
61
+ a.pickcolor:hover span.disabled {}
62
+
63
+ /* Charmap */
64
+ table.charmap {border:1px solid #AAA; text-align:center}
65
+ td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;}
66
+ #charmap a {display:block; color:#000; text-decoration:none; border:0}
67
+ #charmap a:hover {background:#CCC;color:#2B6FB6}
68
+ #charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center}
69
+ #charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center}
70
+
71
+ /* Source */
72
+ .wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
73
+ .mceActionPanel {margin-top:5px;}
74
+
75
+ /* Tabs classes */
76
+ .tabs {width:100%; height:18px; line-height:normal; background:url(img/tabs.gif) repeat-x 0 -72px;}
77
+ .tabs ul {margin:0; padding:0; list-style:none;}
78
+ .tabs li {float:left; background:url(img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;}
79
+ .tabs li.current {background:url(img/tabs.gif) no-repeat 0 -18px; margin-right:2px;}
80
+ .tabs span {float:left; display:block; background:url(img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;}
81
+ .tabs .current span {background:url(img/tabs.gif) no-repeat right -54px;}
82
+ .tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;}
83
+ .tabs a:link, .tabs a:visited, .tabs a:hover {color:black;}
84
+
85
+ /* Panels */
86
+ .panel_wrapper div.panel {display:none;}
87
+ .panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;}
88
+ .panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;}
89
+
90
+ /* Columns */
91
+ .column {float:left;}
92
+ .properties {width:100%;}
93
+ .properties .column1 {}
94
+ .properties .column2 {text-align:left;}
95
+
96
+ /* Titles */
97
+ h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;}
98
+ h3 {font-size:14px;}
99
+ .title {font-size:12px; font-weight:bold; color:#2B6FB6;}
100
+
101
+ /* Dialog specific */
102
+ #link .panel_wrapper, #link div.current {height:125px;}
103
+ #image .panel_wrapper, #image div.current {height:200px;}
104
+ #plugintable thead {font-weight:bold; background:#DDD;}
105
+ #plugintable, #about #plugintable td {border:1px solid #919B9C;}
106
+ #plugintable {width:96%; margin-top:10px;}
107
+ #pluginscontainer {height:290px; overflow:auto;}
108
+ #colorpicker #preview {display:inline-block; padding-left:40px; height:14px; border:1px solid black; margin-left:5px; margin-right: 5px}
109
+ #colorpicker #previewblock {position: relative; top: -3px; padding-left:5px; padding-top: 0px; display:inline}
110
+ #colorpicker #preview_wrapper { text-align:center; padding-top:4px; white-space: nowrap}
111
+ #colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;}
112
+ #colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;}
113
+ #colorpicker #light div {overflow:hidden;}
114
+ #colorpicker .panel_wrapper div.current {height:175px;}
115
+ #colorpicker #namedcolors {width:150px;}
116
+ #colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;}
117
+ #colorpicker #colornamecontainer {margin-top:5px;}
118
+ #colorpicker #picker_panel fieldset {margin:auto;width:325px;}
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/default/ui.css CHANGED
@@ -1,219 +1,219 @@
1
- /* Reset */
2
- .defaultSkin table, .defaultSkin tbody, .defaultSkin a, .defaultSkin img, .defaultSkin tr, .defaultSkin div, .defaultSkin td, .defaultSkin iframe, .defaultSkin span, .defaultSkin *, .defaultSkin .mceText {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate; text-align:left}
3
- .defaultSkin a:hover, .defaultSkin a:link, .defaultSkin a:visited, .defaultSkin a:active {text-decoration:none; font-weight:normal; cursor:default; color:#000}
4
- .defaultSkin table td {vertical-align:middle}
5
-
6
- /* Containers */
7
- .defaultSkin table {direction:ltr;background:transparent}
8
- .defaultSkin iframe {display:block;}
9
- .defaultSkin .mceToolbar {height:26px}
10
- .defaultSkin .mceLeft {text-align:left}
11
- .defaultSkin .mceRight {text-align:right}
12
-
13
- /* External */
14
- .defaultSkin .mceExternalToolbar {position:absolute; border:1px solid #CCC; border-bottom:0; display:none;}
15
- .defaultSkin .mceExternalToolbar td.mceToolbar {padding-right:13px;}
16
- .defaultSkin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0}
17
-
18
- /* Layout */
19
- .defaultSkin table.mceLayout {border:0; border-left:1px solid #CCC; border-right:1px solid #CCC}
20
- .defaultSkin table.mceLayout tr.mceFirst td {border-top:1px solid #CCC}
21
- .defaultSkin table.mceLayout tr.mceLast td {border-bottom:1px solid #CCC}
22
- .defaultSkin table.mceToolbar, .defaultSkin tr.mceFirst .mceToolbar tr td, .defaultSkin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0;}
23
- .defaultSkin td.mceToolbar {background:#F0F0EE; padding-top:1px; vertical-align:top}
24
- .defaultSkin .mceIframeContainer {border-top:1px solid #CCC; border-bottom:1px solid #CCC}
25
- .defaultSkin .mceStatusbar {background:#F0F0EE; font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; display:block; height:20px}
26
- .defaultSkin .mceStatusbar div {float:left; margin:2px}
27
- .defaultSkin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize; outline:0}
28
- .defaultSkin .mceStatusbar a:hover {text-decoration:underline}
29
- .defaultSkin table.mceToolbar {margin-left:3px}
30
- .defaultSkin span.mceIcon, .defaultSkin img.mceIcon {display:block; width:20px; height:20px}
31
- .defaultSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px}
32
- .defaultSkin td.mceCenter {text-align:center;}
33
- .defaultSkin td.mceCenter table {margin:0 auto; text-align:left;}
34
- .defaultSkin td.mceRight table {margin:0 0 0 auto;}
35
-
36
- /* Button */
37
- .defaultSkin .mceButton {display:block; border:1px solid #F0F0EE; width:20px; height:20px; margin-right:1px}
38
- .defaultSkin a.mceButtonEnabled:hover {border:1px solid #0A246A; background-color:#B2BBD0}
39
- .defaultSkin a.mceButtonActive, .defaultSkin a.mceButtonSelected {border:1px solid #0A246A; background-color:#C2CBE0}
40
- .defaultSkin .mceButtonDisabled .mceIcon {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
41
- .defaultSkin .mceButtonLabeled {width:auto}
42
- .defaultSkin .mceButtonLabeled span.mceIcon {float:left}
43
- .defaultSkin span.mceButtonLabel {display:block; font-size:10px; padding:4px 6px 0 22px; font-family:Tahoma,Verdana,Arial,Helvetica}
44
- .defaultSkin .mceButtonDisabled .mceButtonLabel {color:#888}
45
-
46
- /* Separator */
47
- .defaultSkin .mceSeparator {display:block; background:url(../../img/icons.gif) -180px 0; width:2px; height:20px; margin:2px 2px 0 4px}
48
-
49
- /* ListBox */
50
- .defaultSkin .mceListBox, .defaultSkin .mceListBox a {display:block}
51
- .defaultSkin .mceListBox .mceText {padding-left:4px; width:70px; text-align:left; border:1px solid #CCC; border-right:0; background:#FFF; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden}
52
- .defaultSkin .mceListBox .mceOpen {width:9px; height:20px; background:url(../../img/icons.gif) -741px 0; margin-right:2px; border:1px solid #CCC;}
53
- .defaultSkin table.mceListBoxEnabled:hover .mceText, .defaultSkin .mceListBoxHover .mceText, .defaultSkin .mceListBoxSelected .mceText {border:1px solid #A2ABC0; border-right:0; background:#FFF}
54
- .defaultSkin table.mceListBoxEnabled:hover .mceOpen, .defaultSkin .mceListBoxHover .mceOpen, .defaultSkin .mceListBoxSelected .mceOpen {background-color:#FFF; border:1px solid #A2ABC0}
55
- .defaultSkin .mceListBoxDisabled a.mceText {color:gray; background-color:transparent;}
56
- .defaultSkin .mceListBoxMenu {overflow:auto; overflow-x:hidden}
57
- .defaultSkin .mceOldBoxModel .mceListBox .mceText {height:22px}
58
- .defaultSkin .mceOldBoxModel .mceListBox .mceOpen {width:11px; height:22px;}
59
- .defaultSkin select.mceNativeListBox {font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:7pt; background:#F0F0EE; border:1px solid gray; margin-right:2px;}
60
-
61
- /* SplitButton */
62
- .defaultSkin .mceSplitButton {width:32px; height:20px; direction:ltr}
63
- .defaultSkin .mceSplitButton a, .defaultSkin .mceSplitButton span {height:20px; display:block}
64
- .defaultSkin .mceSplitButton a.mceAction {width:20px; border:1px solid #F0F0EE; border-right:0;}
65
- .defaultSkin .mceSplitButton span.mceAction {width:20px; background-image:url(../../img/icons.gif);}
66
- .defaultSkin .mceSplitButton a.mceOpen {width:9px; background:url(../../img/icons.gif) -741px 0; border:1px solid #F0F0EE;}
67
- .defaultSkin .mceSplitButton span.mceOpen {display:none}
68
- .defaultSkin table.mceSplitButtonEnabled:hover a.mceAction, .defaultSkin .mceSplitButtonHover a.mceAction, .defaultSkin .mceSplitButtonSelected a.mceAction {border:1px solid #0A246A; border-right:0; background-color:#B2BBD0}
69
- .defaultSkin table.mceSplitButtonEnabled:hover a.mceOpen, .defaultSkin .mceSplitButtonHover a.mceOpen, .defaultSkin .mceSplitButtonSelected a.mceOpen {background-color:#B2BBD0; border:1px solid #0A246A;}
70
- .defaultSkin .mceSplitButtonDisabled .mceAction, .defaultSkin .mceSplitButtonDisabled a.mceOpen {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
71
- .defaultSkin .mceSplitButtonActive a.mceAction {border:1px solid #0A246A; background-color:#C2CBE0}
72
- .defaultSkin .mceSplitButtonActive a.mceOpen {border-left:0;}
73
-
74
- /* ColorSplitButton */
75
- .defaultSkin div.mceColorSplitMenu table {background:#FFF; border:1px solid gray}
76
- .defaultSkin .mceColorSplitMenu td {padding:2px}
77
- .defaultSkin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden; border:1px solid #808080}
78
- .defaultSkin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px}
79
- .defaultSkin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF}
80
- .defaultSkin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2}
81
- .defaultSkin a.mceMoreColors:hover {border:1px solid #0A246A}
82
- .defaultSkin .mceColorPreview {margin-left:2px; width:16px; height:4px; overflow:hidden; background:#9a9b9a}
83
- .defaultSkin .mce_forecolor span.mceAction, .defaultSkin .mce_backcolor span.mceAction {overflow:hidden; height:16px}
84
-
85
- /* Menu */
86
- .defaultSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #D4D0C8; direction:ltr}
87
- .defaultSkin .mceNoIcons span.mceIcon {width:0;}
88
- .defaultSkin .mceNoIcons a .mceText {padding-left:10px}
89
- .defaultSkin .mceMenu table {background:#FFF}
90
- .defaultSkin .mceMenu a, .defaultSkin .mceMenu span, .defaultSkin .mceMenu {display:block}
91
- .defaultSkin .mceMenu td {height:20px}
92
- .defaultSkin .mceMenu a {position:relative;padding:3px 0 4px 0}
93
- .defaultSkin .mceMenu .mceText {position:relative; display:block; font-family:Tahoma,Verdana,Arial,Helvetica; color:#000; cursor:default; margin:0; padding:0 25px 0 25px; display:block}
94
- .defaultSkin .mceMenu span.mceText, .defaultSkin .mceMenu .mcePreview {font-size:11px}
95
- .defaultSkin .mceMenu pre.mceText {font-family:Monospace}
96
- .defaultSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;}
97
- .defaultSkin .mceMenu .mceMenuItemEnabled a:hover, .defaultSkin .mceMenu .mceMenuItemActive {background-color:#dbecf3}
98
- .defaultSkin td.mceMenuItemSeparator {background:#DDD; height:1px}
99
- .defaultSkin .mceMenuItemTitle a {border:0; background:#EEE; border-bottom:1px solid #DDD}
100
- .defaultSkin .mceMenuItemTitle span.mceText {color:#000; font-weight:bold; padding-left:4px}
101
- .defaultSkin .mceMenuItemDisabled .mceText {color:#888}
102
- .defaultSkin .mceMenuItemSelected .mceIcon {background:url(img/menu_check.gif)}
103
- .defaultSkin .mceNoIcons .mceMenuItemSelected a {background:url(img/menu_arrow.gif) no-repeat -6px center}
104
- .defaultSkin .mceMenu span.mceMenuLine {display:none}
105
- .defaultSkin .mceMenuItemSub a {background:url(img/menu_arrow.gif) no-repeat top right;}
106
- .defaultSkin .mceMenuItem td, .defaultSkin .mceMenuItem th {line-height: normal}
107
-
108
- /* Progress,Resize */
109
- .defaultSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50); background:#FFF}
110
- .defaultSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px}
111
-
112
- /* Rtl */
113
- .mceRtl .mceListBox .mceText {text-align: right; padding: 0 4px 0 0}
114
- .mceRtl .mceMenuItem .mceText {text-align: right}
115
-
116
- /* Formats */
117
- .defaultSkin .mce_formatPreview a {font-size:10px}
118
- .defaultSkin .mce_p span.mceText {}
119
- .defaultSkin .mce_address span.mceText {font-style:italic}
120
- .defaultSkin .mce_pre span.mceText {font-family:monospace}
121
- .defaultSkin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em}
122
- .defaultSkin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em}
123
- .defaultSkin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em}
124
- .defaultSkin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em}
125
- .defaultSkin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em}
126
- .defaultSkin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em}
127
-
128
- /* Theme */
129
- .defaultSkin span.mce_bold {background-position:0 0}
130
- .defaultSkin span.mce_italic {background-position:-60px 0}
131
- .defaultSkin span.mce_underline {background-position:-140px 0}
132
- .defaultSkin span.mce_strikethrough {background-position:-120px 0}
133
- .defaultSkin span.mce_undo {background-position:-160px 0}
134
- .defaultSkin span.mce_redo {background-position:-100px 0}
135
- .defaultSkin span.mce_cleanup {background-position:-40px 0}
136
- .defaultSkin span.mce_bullist {background-position:-20px 0}
137
- .defaultSkin span.mce_numlist {background-position:-80px 0}
138
- .defaultSkin span.mce_justifyleft {background-position:-460px 0}
139
- .defaultSkin span.mce_justifyright {background-position:-480px 0}
140
- .defaultSkin span.mce_justifycenter {background-position:-420px 0}
141
- .defaultSkin span.mce_justifyfull {background-position:-440px 0}
142
- .defaultSkin span.mce_anchor {background-position:-200px 0}
143
- .defaultSkin span.mce_indent {background-position:-400px 0}
144
- .defaultSkin span.mce_outdent {background-position:-540px 0}
145
- .defaultSkin span.mce_link {background-position:-500px 0}
146
- .defaultSkin span.mce_unlink {background-position:-640px 0}
147
- .defaultSkin span.mce_sub {background-position:-600px 0}
148
- .defaultSkin span.mce_sup {background-position:-620px 0}
149
- .defaultSkin span.mce_removeformat {background-position:-580px 0}
150
- .defaultSkin span.mce_newdocument {background-position:-520px 0}
151
- .defaultSkin span.mce_image {background-position:-380px 0}
152
- .defaultSkin span.mce_help {background-position:-340px 0}
153
- .defaultSkin span.mce_code {background-position:-260px 0}
154
- .defaultSkin span.mce_hr {background-position:-360px 0}
155
- .defaultSkin span.mce_visualaid {background-position:-660px 0}
156
- .defaultSkin span.mce_charmap {background-position:-240px 0}
157
- .defaultSkin span.mce_paste {background-position:-560px 0}
158
- .defaultSkin span.mce_copy {background-position:-700px 0}
159
- .defaultSkin span.mce_cut {background-position:-680px 0}
160
- .defaultSkin span.mce_blockquote {background-position:-220px 0}
161
- .defaultSkin .mce_forecolor span.mceAction {background-position:-720px 0}
162
- .defaultSkin .mce_backcolor span.mceAction {background-position:-760px 0}
163
- .defaultSkin span.mce_forecolorpicker {background-position:-720px 0}
164
- .defaultSkin span.mce_backcolorpicker {background-position:-760px 0}
165
-
166
- /* Plugins */
167
- .defaultSkin span.mce_advhr {background-position:-0px -20px}
168
- .defaultSkin span.mce_ltr {background-position:-20px -20px}
169
- .defaultSkin span.mce_rtl {background-position:-40px -20px}
170
- .defaultSkin span.mce_emotions {background-position:-60px -20px}
171
- .defaultSkin span.mce_fullpage {background-position:-80px -20px}
172
- .defaultSkin span.mce_fullscreen {background-position:-100px -20px}
173
- .defaultSkin span.mce_iespell {background-position:-120px -20px}
174
- .defaultSkin span.mce_insertdate {background-position:-140px -20px}
175
- .defaultSkin span.mce_inserttime {background-position:-160px -20px}
176
- .defaultSkin span.mce_absolute {background-position:-180px -20px}
177
- .defaultSkin span.mce_backward {background-position:-200px -20px}
178
- .defaultSkin span.mce_forward {background-position:-220px -20px}
179
- .defaultSkin span.mce_insert_layer {background-position:-240px -20px}
180
- .defaultSkin span.mce_insertlayer {background-position:-260px -20px}
181
- .defaultSkin span.mce_movebackward {background-position:-280px -20px}
182
- .defaultSkin span.mce_moveforward {background-position:-300px -20px}
183
- .defaultSkin span.mce_media {background-position:-320px -20px}
184
- .defaultSkin span.mce_nonbreaking {background-position:-340px -20px}
185
- .defaultSkin span.mce_pastetext {background-position:-360px -20px}
186
- .defaultSkin span.mce_pasteword {background-position:-380px -20px}
187
- .defaultSkin span.mce_selectall {background-position:-400px -20px}
188
- .defaultSkin span.mce_preview {background-position:-420px -20px}
189
- .defaultSkin span.mce_print {background-position:-440px -20px}
190
- .defaultSkin span.mce_cancel {background-position:-460px -20px}
191
- .defaultSkin span.mce_save {background-position:-480px -20px}
192
- .defaultSkin span.mce_replace {background-position:-500px -20px}
193
- .defaultSkin span.mce_search {background-position:-520px -20px}
194
- .defaultSkin span.mce_styleprops {background-position:-560px -20px}
195
- .defaultSkin span.mce_table {background-position:-580px -20px}
196
- .defaultSkin span.mce_cell_props {background-position:-600px -20px}
197
- .defaultSkin span.mce_delete_table {background-position:-620px -20px}
198
- .defaultSkin span.mce_delete_col {background-position:-640px -20px}
199
- .defaultSkin span.mce_delete_row {background-position:-660px -20px}
200
- .defaultSkin span.mce_col_after {background-position:-680px -20px}
201
- .defaultSkin span.mce_col_before {background-position:-700px -20px}
202
- .defaultSkin span.mce_row_after {background-position:-720px -20px}
203
- .defaultSkin span.mce_row_before {background-position:-740px -20px}
204
- .defaultSkin span.mce_merge_cells {background-position:-760px -20px}
205
- .defaultSkin span.mce_table_props {background-position:-980px -20px}
206
- .defaultSkin span.mce_row_props {background-position:-780px -20px}
207
- .defaultSkin span.mce_split_cells {background-position:-800px -20px}
208
- .defaultSkin span.mce_template {background-position:-820px -20px}
209
- .defaultSkin span.mce_visualchars {background-position:-840px -20px}
210
- .defaultSkin span.mce_abbr {background-position:-860px -20px}
211
- .defaultSkin span.mce_acronym {background-position:-880px -20px}
212
- .defaultSkin span.mce_attribs {background-position:-900px -20px}
213
- .defaultSkin span.mce_cite {background-position:-920px -20px}
214
- .defaultSkin span.mce_del {background-position:-940px -20px}
215
- .defaultSkin span.mce_ins {background-position:-960px -20px}
216
- .defaultSkin span.mce_pagebreak {background-position:0 -40px}
217
- .defaultSkin span.mce_restoredraft {background-position:-20px -40px}
218
- .defaultSkin span.mce_spellchecker {background-position:-540px -20px}
219
- .defaultSkin span.mce_visualblocks {background-position: -40px -40px}
1
+ /* Reset */
2
+ .defaultSkin table, .defaultSkin tbody, .defaultSkin a, .defaultSkin img, .defaultSkin tr, .defaultSkin div, .defaultSkin td, .defaultSkin iframe, .defaultSkin span, .defaultSkin *, .defaultSkin .mceText {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate; text-align:left}
3
+ .defaultSkin a:hover, .defaultSkin a:link, .defaultSkin a:visited, .defaultSkin a:active {text-decoration:none; font-weight:normal; cursor:default; color:#000}
4
+ .defaultSkin table td {vertical-align:middle}
5
+
6
+ /* Containers */
7
+ .defaultSkin table {direction:ltr;background:transparent}
8
+ .defaultSkin iframe {display:block;}
9
+ .defaultSkin .mceToolbar {height:26px}
10
+ .defaultSkin .mceLeft {text-align:left}
11
+ .defaultSkin .mceRight {text-align:right}
12
+
13
+ /* External */
14
+ .defaultSkin .mceExternalToolbar {position:absolute; border:1px solid #CCC; border-bottom:0; display:none;}
15
+ .defaultSkin .mceExternalToolbar td.mceToolbar {padding-right:13px;}
16
+ .defaultSkin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0}
17
+
18
+ /* Layout */
19
+ .defaultSkin table.mceLayout {border:0; border-left:1px solid #CCC; border-right:1px solid #CCC}
20
+ .defaultSkin table.mceLayout tr.mceFirst td {border-top:1px solid #CCC}
21
+ .defaultSkin table.mceLayout tr.mceLast td {border-bottom:1px solid #CCC}
22
+ .defaultSkin table.mceToolbar, .defaultSkin tr.mceFirst .mceToolbar tr td, .defaultSkin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0;}
23
+ .defaultSkin td.mceToolbar {background:#F0F0EE; padding-top:1px; vertical-align:top}
24
+ .defaultSkin .mceIframeContainer {border-top:1px solid #CCC; border-bottom:1px solid #CCC}
25
+ .defaultSkin .mceStatusbar {background:#F0F0EE; font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; display:block; height:20px}
26
+ .defaultSkin .mceStatusbar div {float:left; margin:2px}
27
+ .defaultSkin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize; outline:0}
28
+ .defaultSkin .mceStatusbar a:hover {text-decoration:underline}
29
+ .defaultSkin table.mceToolbar {margin-left:3px}
30
+ .defaultSkin span.mceIcon, .defaultSkin img.mceIcon {display:block; width:20px; height:20px}
31
+ .defaultSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px}
32
+ .defaultSkin td.mceCenter {text-align:center;}
33
+ .defaultSkin td.mceCenter table {margin:0 auto; text-align:left;}
34
+ .defaultSkin td.mceRight table {margin:0 0 0 auto;}
35
+
36
+ /* Button */
37
+ .defaultSkin .mceButton {display:block; border:1px solid #F0F0EE; width:20px; height:20px; margin-right:1px}
38
+ .defaultSkin a.mceButtonEnabled:hover {border:1px solid #0A246A; background-color:#B2BBD0}
39
+ .defaultSkin a.mceButtonActive, .defaultSkin a.mceButtonSelected {border:1px solid #0A246A; background-color:#C2CBE0}
40
+ .defaultSkin .mceButtonDisabled .mceIcon {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
41
+ .defaultSkin .mceButtonLabeled {width:auto}
42
+ .defaultSkin .mceButtonLabeled span.mceIcon {float:left}
43
+ .defaultSkin span.mceButtonLabel {display:block; font-size:10px; padding:4px 6px 0 22px; font-family:Tahoma,Verdana,Arial,Helvetica}
44
+ .defaultSkin .mceButtonDisabled .mceButtonLabel {color:#888}
45
+
46
+ /* Separator */
47
+ .defaultSkin .mceSeparator {display:block; background:url(../../img/icons.gif) -180px 0; width:2px; height:20px; margin:2px 2px 0 4px}
48
+
49
+ /* ListBox */
50
+ .defaultSkin .mceListBox, .defaultSkin .mceListBox a {display:block}
51
+ .defaultSkin .mceListBox .mceText {padding-left:4px; width:70px; text-align:left; border:1px solid #CCC; border-right:0; background:#FFF; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden}
52
+ .defaultSkin .mceListBox .mceOpen {width:9px; height:20px; background:url(../../img/icons.gif) -741px 0; margin-right:2px; border:1px solid #CCC;}
53
+ .defaultSkin table.mceListBoxEnabled:hover .mceText, .defaultSkin .mceListBoxHover .mceText, .defaultSkin .mceListBoxSelected .mceText {border:1px solid #A2ABC0; border-right:0; background:#FFF}
54
+ .defaultSkin table.mceListBoxEnabled:hover .mceOpen, .defaultSkin .mceListBoxHover .mceOpen, .defaultSkin .mceListBoxSelected .mceOpen {background-color:#FFF; border:1px solid #A2ABC0}
55
+ .defaultSkin .mceListBoxDisabled a.mceText {color:gray; background-color:transparent;}
56
+ .defaultSkin .mceListBoxMenu {overflow:auto; overflow-x:hidden}
57
+ .defaultSkin .mceOldBoxModel .mceListBox .mceText {height:22px}
58
+ .defaultSkin .mceOldBoxModel .mceListBox .mceOpen {width:11px; height:22px;}
59
+ .defaultSkin select.mceNativeListBox {font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:7pt; background:#F0F0EE; border:1px solid gray; margin-right:2px;}
60
+
61
+ /* SplitButton */
62
+ .defaultSkin .mceSplitButton {width:32px; height:20px; direction:ltr}
63
+ .defaultSkin .mceSplitButton a, .defaultSkin .mceSplitButton span {height:20px; display:block}
64
+ .defaultSkin .mceSplitButton a.mceAction {width:20px; border:1px solid #F0F0EE; border-right:0;}
65
+ .defaultSkin .mceSplitButton span.mceAction {width:20px; background-image:url(../../img/icons.gif);}
66
+ .defaultSkin .mceSplitButton a.mceOpen {width:9px; background:url(../../img/icons.gif) -741px 0; border:1px solid #F0F0EE;}
67
+ .defaultSkin .mceSplitButton span.mceOpen {display:none}
68
+ .defaultSkin table.mceSplitButtonEnabled:hover a.mceAction, .defaultSkin .mceSplitButtonHover a.mceAction, .defaultSkin .mceSplitButtonSelected a.mceAction {border:1px solid #0A246A; border-right:0; background-color:#B2BBD0}
69
+ .defaultSkin table.mceSplitButtonEnabled:hover a.mceOpen, .defaultSkin .mceSplitButtonHover a.mceOpen, .defaultSkin .mceSplitButtonSelected a.mceOpen {background-color:#B2BBD0; border:1px solid #0A246A;}
70
+ .defaultSkin .mceSplitButtonDisabled .mceAction, .defaultSkin .mceSplitButtonDisabled a.mceOpen {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
71
+ .defaultSkin .mceSplitButtonActive a.mceAction {border:1px solid #0A246A; background-color:#C2CBE0}
72
+ .defaultSkin .mceSplitButtonActive a.mceOpen {border-left:0;}
73
+
74
+ /* ColorSplitButton */
75
+ .defaultSkin div.mceColorSplitMenu table {background:#FFF; border:1px solid gray}
76
+ .defaultSkin .mceColorSplitMenu td {padding:2px}
77
+ .defaultSkin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden; border:1px solid #808080}
78
+ .defaultSkin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px}
79
+ .defaultSkin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF}
80
+ .defaultSkin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2}
81
+ .defaultSkin a.mceMoreColors:hover {border:1px solid #0A246A}
82
+ .defaultSkin .mceColorPreview {margin-left:2px; width:16px; height:4px; overflow:hidden; background:#9a9b9a}
83
+ .defaultSkin .mce_forecolor span.mceAction, .defaultSkin .mce_backcolor span.mceAction {overflow:hidden; height:16px}
84
+
85
+ /* Menu */
86
+ .defaultSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #D4D0C8; direction:ltr}
87
+ .defaultSkin .mceNoIcons span.mceIcon {width:0;}
88
+ .defaultSkin .mceNoIcons a .mceText {padding-left:10px}
89
+ .defaultSkin .mceMenu table {background:#FFF}
90
+ .defaultSkin .mceMenu a, .defaultSkin .mceMenu span, .defaultSkin .mceMenu {display:block}
91
+ .defaultSkin .mceMenu td {height:20px}
92
+ .defaultSkin .mceMenu a {position:relative;padding:3px 0 4px 0}
93
+ .defaultSkin .mceMenu .mceText {position:relative; display:block; font-family:Tahoma,Verdana,Arial,Helvetica; color:#000; cursor:default; margin:0; padding:0 25px 0 25px; display:block}
94
+ .defaultSkin .mceMenu span.mceText, .defaultSkin .mceMenu .mcePreview {font-size:11px}
95
+ .defaultSkin .mceMenu pre.mceText {font-family:Monospace}
96
+ .defaultSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;}
97
+ .defaultSkin .mceMenu .mceMenuItemEnabled a:hover, .defaultSkin .mceMenu .mceMenuItemActive {background-color:#dbecf3}
98
+ .defaultSkin td.mceMenuItemSeparator {background:#DDD; height:1px}
99
+ .defaultSkin .mceMenuItemTitle a {border:0; background:#EEE; border-bottom:1px solid #DDD}
100
+ .defaultSkin .mceMenuItemTitle span.mceText {color:#000; font-weight:bold; padding-left:4px}
101
+ .defaultSkin .mceMenuItemDisabled .mceText {color:#888}
102
+ .defaultSkin .mceMenuItemSelected .mceIcon {background:url(img/menu_check.gif)}
103
+ .defaultSkin .mceNoIcons .mceMenuItemSelected a {background:url(img/menu_arrow.gif) no-repeat -6px center}
104
+ .defaultSkin .mceMenu span.mceMenuLine {display:none}
105
+ .defaultSkin .mceMenuItemSub a {background:url(img/menu_arrow.gif) no-repeat top right;}
106
+ .defaultSkin .mceMenuItem td, .defaultSkin .mceMenuItem th {line-height: normal}
107
+
108
+ /* Progress,Resize */
109
+ .defaultSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50); background:#FFF}
110
+ .defaultSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px}
111
+
112
+ /* Rtl */
113
+ .mceRtl .mceListBox .mceText {text-align: right; padding: 0 4px 0 0}
114
+ .mceRtl .mceMenuItem .mceText {text-align: right}
115
+
116
+ /* Formats */
117
+ .defaultSkin .mce_formatPreview a {font-size:10px}
118
+ .defaultSkin .mce_p span.mceText {}
119
+ .defaultSkin .mce_address span.mceText {font-style:italic}
120
+ .defaultSkin .mce_pre span.mceText {font-family:monospace}
121
+ .defaultSkin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em}
122
+ .defaultSkin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em}
123
+ .defaultSkin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em}
124
+ .defaultSkin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em}
125
+ .defaultSkin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em}
126
+ .defaultSkin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em}
127
+
128
+ /* Theme */
129
+ .defaultSkin span.mce_bold {background-position:0 0}
130
+ .defaultSkin span.mce_italic {background-position:-60px 0}
131
+ .defaultSkin span.mce_underline {background-position:-140px 0}
132
+ .defaultSkin span.mce_strikethrough {background-position:-120px 0}
133
+ .defaultSkin span.mce_undo {background-position:-160px 0}
134
+ .defaultSkin span.mce_redo {background-position:-100px 0}
135
+ .defaultSkin span.mce_cleanup {background-position:-40px 0}
136
+ .defaultSkin span.mce_bullist {background-position:-20px 0}
137
+ .defaultSkin span.mce_numlist {background-position:-80px 0}
138
+ .defaultSkin span.mce_justifyleft {background-position:-460px 0}
139
+ .defaultSkin span.mce_justifyright {background-position:-480px 0}
140
+ .defaultSkin span.mce_justifycenter {background-position:-420px 0}
141
+ .defaultSkin span.mce_justifyfull {background-position:-440px 0}
142
+ .defaultSkin span.mce_anchor {background-position:-200px 0}
143
+ .defaultSkin span.mce_indent {background-position:-400px 0}
144
+ .defaultSkin span.mce_outdent {background-position:-540px 0}
145
+ .defaultSkin span.mce_link {background-position:-500px 0}
146
+ .defaultSkin span.mce_unlink {background-position:-640px 0}
147
+ .defaultSkin span.mce_sub {background-position:-600px 0}
148
+ .defaultSkin span.mce_sup {background-position:-620px 0}
149
+ .defaultSkin span.mce_removeformat {background-position:-580px 0}
150
+ .defaultSkin span.mce_newdocument {background-position:-520px 0}
151
+ .defaultSkin span.mce_image {background-position:-380px 0}
152
+ .defaultSkin span.mce_help {background-position:-340px 0}
153
+ .defaultSkin span.mce_code {background-position:-260px 0}
154
+ .defaultSkin span.mce_hr {background-position:-360px 0}
155
+ .defaultSkin span.mce_visualaid {background-position:-660px 0}
156
+ .defaultSkin span.mce_charmap {background-position:-240px 0}
157
+ .defaultSkin span.mce_paste {background-position:-560px 0}
158
+ .defaultSkin span.mce_copy {background-position:-700px 0}
159
+ .defaultSkin span.mce_cut {background-position:-680px 0}
160
+ .defaultSkin span.mce_blockquote {background-position:-220px 0}
161
+ .defaultSkin .mce_forecolor span.mceAction {background-position:-720px 0}
162
+ .defaultSkin .mce_backcolor span.mceAction {background-position:-760px 0}
163
+ .defaultSkin span.mce_forecolorpicker {background-position:-720px 0}
164
+ .defaultSkin span.mce_backcolorpicker {background-position:-760px 0}
165
+
166
+ /* Plugins */
167
+ .defaultSkin span.mce_advhr {background-position:-0px -20px}
168
+ .defaultSkin span.mce_ltr {background-position:-20px -20px}
169
+ .defaultSkin span.mce_rtl {background-position:-40px -20px}
170
+ .defaultSkin span.mce_emotions {background-position:-60px -20px}
171
+ .defaultSkin span.mce_fullpage {background-position:-80px -20px}
172
+ .defaultSkin span.mce_fullscreen {background-position:-100px -20px}
173
+ .defaultSkin span.mce_iespell {background-position:-120px -20px}
174
+ .defaultSkin span.mce_insertdate {background-position:-140px -20px}
175
+ .defaultSkin span.mce_inserttime {background-position:-160px -20px}
176
+ .defaultSkin span.mce_absolute {background-position:-180px -20px}
177
+ .defaultSkin span.mce_backward {background-position:-200px -20px}
178
+ .defaultSkin span.mce_forward {background-position:-220px -20px}
179
+ .defaultSkin span.mce_insert_layer {background-position:-240px -20px}
180
+ .defaultSkin span.mce_insertlayer {background-position:-260px -20px}
181
+ .defaultSkin span.mce_movebackward {background-position:-280px -20px}
182
+ .defaultSkin span.mce_moveforward {background-position:-300px -20px}
183
+ .defaultSkin span.mce_media {background-position:-320px -20px}
184
+ .defaultSkin span.mce_nonbreaking {background-position:-340px -20px}
185
+ .defaultSkin span.mce_pastetext {background-position:-360px -20px}
186
+ .defaultSkin span.mce_pasteword {background-position:-380px -20px}
187
+ .defaultSkin span.mce_selectall {background-position:-400px -20px}
188
+ .defaultSkin span.mce_preview {background-position:-420px -20px}
189
+ .defaultSkin span.mce_print {background-position:-440px -20px}
190
+ .defaultSkin span.mce_cancel {background-position:-460px -20px}
191
+ .defaultSkin span.mce_save {background-position:-480px -20px}
192
+ .defaultSkin span.mce_replace {background-position:-500px -20px}
193
+ .defaultSkin span.mce_search {background-position:-520px -20px}
194
+ .defaultSkin span.mce_styleprops {background-position:-560px -20px}
195
+ .defaultSkin span.mce_table {background-position:-580px -20px}
196
+ .defaultSkin span.mce_cell_props {background-position:-600px -20px}
197
+ .defaultSkin span.mce_delete_table {background-position:-620px -20px}
198
+ .defaultSkin span.mce_delete_col {background-position:-640px -20px}
199
+ .defaultSkin span.mce_delete_row {background-position:-660px -20px}
200
+ .defaultSkin span.mce_col_after {background-position:-680px -20px}
201
+ .defaultSkin span.mce_col_before {background-position:-700px -20px}
202
+ .defaultSkin span.mce_row_after {background-position:-720px -20px}
203
+ .defaultSkin span.mce_row_before {background-position:-740px -20px}
204
+ .defaultSkin span.mce_merge_cells {background-position:-760px -20px}
205
+ .defaultSkin span.mce_table_props {background-position:-980px -20px}
206
+ .defaultSkin span.mce_row_props {background-position:-780px -20px}
207
+ .defaultSkin span.mce_split_cells {background-position:-800px -20px}
208
+ .defaultSkin span.mce_template {background-position:-820px -20px}
209
+ .defaultSkin span.mce_visualchars {background-position:-840px -20px}
210
+ .defaultSkin span.mce_abbr {background-position:-860px -20px}
211
+ .defaultSkin span.mce_acronym {background-position:-880px -20px}
212
+ .defaultSkin span.mce_attribs {background-position:-900px -20px}
213
+ .defaultSkin span.mce_cite {background-position:-920px -20px}
214
+ .defaultSkin span.mce_del {background-position:-940px -20px}
215
+ .defaultSkin span.mce_ins {background-position:-960px -20px}
216
+ .defaultSkin span.mce_pagebreak {background-position:0 -40px}
217
+ .defaultSkin span.mce_restoredraft {background-position:-20px -40px}
218
+ .defaultSkin span.mce_spellchecker {background-position:-540px -20px}
219
+ .defaultSkin span.mce_visualblocks {background-position: -40px -40px}
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/wp_theme/content.css CHANGED
@@ -1,144 +1,144 @@
1
-
2
- body.mceForceColors {background:#FFF; color:#000;}
3
- body.mceBrowserDefaults {background:transparent; color:inherit; font-size:inherit; font-family:inherit;}
4
- td {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;}
5
- h1 {font-size: 2em}
6
- h2 {font-size: 1.5em}
7
- h3 {font-size: 1.17em}
8
- h4 {font-size: 1em}
9
- h5 {font-size: .83em}
10
- h6 {font-size: .75em}
11
- .mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;}
12
- a.mceItemAnchor {display:inline-block; -webkit-user-select:all; -webkit-user-modify:read-only; -moz-user-select:all; -moz-user-modify:read-only; width:11px !important; height:11px !important; background:url(../default/img/items.gif) no-repeat center center}
13
- span.mceItemNbsp {background: #DDD}
14
- td.mceSelected, th.mceSelected {background-color:#3399ff !important}
15
- img {border:0;}
16
- table, img, hr, .mceItemAnchor {cursor:default}
17
- table td, table th {cursor:text}
18
- ins {border-bottom:1px solid green; text-decoration: none; color:green}
19
- del {color:red; text-decoration:line-through}
20
- cite {border-bottom:1px dashed blue}
21
- acronym {border-bottom:1px dotted #CCC; cursor:help}
22
- abbr {border-bottom:1px dashed #CCC; cursor:help}
23
-
24
- img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px}
25
- font[face=mceinline] {font-family:inherit !important}
26
- *[contentEditable]:focus {outline:0}
27
-
28
- .mceItemMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc}
29
- .mceItemShockWave {background-image:url(../../img/shockwave.gif)}
30
- .mceItemFlash {background-image:url(../../img/flash.gif)}
31
- .mceItemQuickTime {background-image:url(../../img/quicktime.gif)}
32
- .mceItemWindowsMedia {background-image:url(../../img/windowsmedia.gif)}
33
- .mceItemRealMedia {background-image:url(../../img/realmedia.gif)}
34
- .mceItemVideo {background-image:url(../../img/video.gif)}
35
- .mceItemAudio {background-image:url(../../img/video.gif)}
36
- .mceItemIframe {background-image:url(../../img/iframe.gif)}
37
- .mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../../img/pagebreak.gif) no-repeat center top;}
38
-
39
- /* WordPress styles */
40
- body {
41
- font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
42
- font-size: 13px;
43
- line-height: 19px;
44
- color: #333;
45
- margin: 10px;
46
- min-height: 100%;
47
- }
48
-
49
- br[data-mce-bogus] {
50
- line-height: 1em;
51
- margin-top: -1em;
52
- }
53
-
54
- br[data-mce-bogus]:only-child {
55
- line-height: inherit;
56
- margin-top: inherit;
57
- }
58
-
59
- .aligncenter,
60
- dl.aligncenter {
61
- display: block;
62
- margin-left: auto;
63
- margin-right: auto;
64
- }
65
-
66
- .alignleft {
67
- float: left;
68
- }
69
-
70
- .alignright {
71
- float: right;
72
- }
73
-
74
- .wp-caption {
75
- border: 1px solid #ddd;
76
- text-align: center;
77
- background-color: #f3f3f3;
78
- padding-top: 4px;
79
- margin: 10px 0;
80
- -webkit-border-radius: 3px;
81
- border-radius: 3px;
82
- }
83
-
84
- .mceIEcenter {
85
- text-align: center;
86
- }
87
-
88
- .wp-caption img {
89
- margin: 0;
90
- padding: 0;
91
- border: 0 none;
92
- -webkit-user-drag: none;
93
- }
94
-
95
- .wp-caption-dd {
96
- font-size: 11px;
97
- line-height: 17px;
98
- padding: 0 4px 5px;
99
- margin: 0;
100
- }
101
-
102
- pre {
103
- font: 12px/18px Consolas, Monaco, monospace;
104
- }
105
-
106
- td {
107
- color: #000;
108
- font-size: 11px;
109
- margin: 8px;
110
- }
111
-
112
- /* Styles for the WordPress plugins */
113
- img.mceWPnextpage,
114
- img.mceWPmore {
115
- border: 0;
116
- border-top: 1px dotted #cccccc;
117
- display: block;
118
- width: 95%;
119
- height: 12px;
120
- margin: 15px auto 0;
121
- }
122
-
123
- img.mceWPmore {
124
- background: transparent url("img/more_bug.gif") no-repeat right top;
125
- }
126
-
127
- img.mceWPnextpage {
128
- background: transparent url("img/page_bug.gif") no-repeat right top;
129
- }
130
-
131
- img.wpGallery {
132
- border: 1px dashed #888;
133
- background: #f2f8ff url("img/gallery.png") no-repeat scroll center center;
134
- width: 99%;
135
- height: 250px;
136
- }
137
-
138
- img.wp-oembed {
139
- border: 1px dashed #888;
140
- background: #f7f5f2 url("img/embedded.png") no-repeat scroll center center;
141
- width: 300px;
142
- height: 250px;
143
- }
144
-
1
+
2
+ body.mceForceColors {background:#FFF; color:#000;}
3
+ body.mceBrowserDefaults {background:transparent; color:inherit; font-size:inherit; font-family:inherit;}
4
+ td {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;}
5
+ h1 {font-size: 2em}
6
+ h2 {font-size: 1.5em}
7
+ h3 {font-size: 1.17em}
8
+ h4 {font-size: 1em}
9
+ h5 {font-size: .83em}
10
+ h6 {font-size: .75em}
11
+ .mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;}
12
+ a.mceItemAnchor {display:inline-block; -webkit-user-select:all; -webkit-user-modify:read-only; -moz-user-select:all; -moz-user-modify:read-only; width:11px !important; height:11px !important; background:url(../default/img/items.gif) no-repeat center center}
13
+ span.mceItemNbsp {background: #DDD}
14
+ td.mceSelected, th.mceSelected {background-color:#3399ff !important}
15
+ img {border:0;}
16
+ table, img, hr, .mceItemAnchor {cursor:default}
17
+ table td, table th {cursor:text}
18
+ ins {border-bottom:1px solid green; text-decoration: none; color:green}
19
+ del {color:red; text-decoration:line-through}
20
+ cite {border-bottom:1px dashed blue}
21
+ acronym {border-bottom:1px dotted #CCC; cursor:help}
22
+ abbr {border-bottom:1px dashed #CCC; cursor:help}
23
+
24
+ img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px}
25
+ font[face=mceinline] {font-family:inherit !important}
26
+ *[contentEditable]:focus {outline:0}
27
+
28
+ .mceItemMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc}
29
+ .mceItemShockWave {background-image:url(../../img/shockwave.gif)}
30
+ .mceItemFlash {background-image:url(../../img/flash.gif)}
31
+ .mceItemQuickTime {background-image:url(../../img/quicktime.gif)}
32
+ .mceItemWindowsMedia {background-image:url(../../img/windowsmedia.gif)}
33
+ .mceItemRealMedia {background-image:url(../../img/realmedia.gif)}
34
+ .mceItemVideo {background-image:url(../../img/video.gif)}
35
+ .mceItemAudio {background-image:url(../../img/video.gif)}
36
+ .mceItemIframe {background-image:url(../../img/iframe.gif)}
37
+ .mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../../img/pagebreak.gif) no-repeat center top;}
38
+
39
+ /* WordPress styles */
40
+ body {
41
+ font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
42
+ font-size: 13px;
43
+ line-height: 19px;
44
+ color: #333;
45
+ margin: 10px;
46
+ min-height: 100%;
47
+ }
48
+
49
+ br[data-mce-bogus] {
50
+ line-height: 1em;
51
+ margin-top: -1em;
52
+ }
53
+
54
+ br[data-mce-bogus]:only-child {
55
+ line-height: inherit;
56
+ margin-top: inherit;
57
+ }
58
+
59
+ .aligncenter,
60
+ dl.aligncenter {
61
+ display: block;
62
+ margin-left: auto;
63
+ margin-right: auto;
64
+ }
65
+
66
+ .alignleft {
67
+ float: left;
68
+ }
69
+
70
+ .alignright {
71
+ float: right;
72
+ }
73
+
74
+ .wp-caption {
75
+ border: 1px solid #ddd;
76
+ text-align: center;
77
+ background-color: #f3f3f3;
78
+ padding-top: 4px;
79
+ margin: 10px 0;
80
+ -webkit-border-radius: 3px;
81
+ border-radius: 3px;
82
+ }
83
+
84
+ .mceIEcenter {
85
+ text-align: center;
86
+ }
87
+
88
+ .wp-caption img {
89
+ margin: 0;
90
+ padding: 0;
91
+ border: 0 none;
92
+ -webkit-user-drag: none;
93
+ }
94
+
95
+ .wp-caption-dd {
96
+ font-size: 11px;
97
+ line-height: 17px;
98
+ padding: 0 4px 5px;
99
+ margin: 0;
100
+ }
101
+
102
+ pre {
103
+ font: 12px/18px Consolas, Monaco, monospace;
104
+ }
105
+
106
+ td {
107
+ color: #000;
108
+ font-size: 11px;
109
+ margin: 8px;
110
+ }
111
+
112
+ /* Styles for the WordPress plugins */
113
+ img.mceWPnextpage,
114
+ img.mceWPmore {
115
+ border: 0;
116
+ border-top: 1px dotted #cccccc;
117
+ display: block;
118
+ width: 95%;
119
+ height: 12px;
120
+ margin: 15px auto 0;
121
+ }
122
+
123
+ img.mceWPmore {
124
+ background: transparent url("img/more_bug.gif") no-repeat right top;
125
+ }
126
+
127
+ img.mceWPnextpage {
128
+ background: transparent url("img/page_bug.gif") no-repeat right top;
129
+ }
130
+
131
+ img.wpGallery {
132
+ border: 1px dashed #888;
133
+ background: #f2f8ff url("img/gallery.png") no-repeat scroll center center;
134
+ width: 99%;
135
+ height: 250px;
136
+ }
137
+
138
+ img.wp-oembed {
139
+ border: 1px dashed #888;
140
+ background: #f7f5f2 url("img/embedded.png") no-repeat scroll center center;
141
+ width: 300px;
142
+ height: 250px;
143
+ }
144
+
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/wp_theme/dialog.css CHANGED
@@ -1,121 +1,121 @@
1
- /* Generic */
2
- body {
3
- font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;
4
- background:#f1f1f1;
5
- padding:0;
6
- margin:8px 8px 0 8px;
7
- }
8
-
9
- html {background:#f1f1f1;}
10
- td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
11
- textarea {resize:none;outline:none;}
12
- a:link, a:visited {color:black;}
13
- a:hover {color:#2B6FB6;}
14
- .nowrap {white-space: nowrap}
15
-
16
- /* Forms */
17
- fieldset {margin:0; padding:4px; border:1px solid #dfdfdf; font-family:Verdana, Arial; font-size:10px;}
18
- legend {color:#2B6FB6; font-weight:bold;}
19
- label.msg {display:none;}
20
- label.invalid {color:#EE0000; display:inline;}
21
- input.invalid {border:1px solid #EE0000;}
22
- input {background:#FFF; border:1px solid #dfdfdf;}
23
- input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
24
- input, select, textarea {border:1px solid #dfdfdf;}
25
- input.radio {border:1px none #000000; background:transparent; vertical-align:middle;}
26
- input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;}
27
- .input_noborder {border:0;}
28
-
29
- /* Buttons */
30
- #insert, #cancel, #apply, .mceActionPanel .button, input.mceButton, .updateButton {
31
- border: 1px solid #bbb;
32
- margin:0;
33
- padding:0 0 1px;
34
- font-weight:bold;
35
- font-size: 11px;
36
- width:94px;
37
- height:24px;
38
- color:#000;
39
- cursor:pointer;
40
- -webkit-border-radius: 3px;
41
- border-radius: 3px;
42
- background-color: #eee; /* Fallback */
43
- background-image: -ms-linear-gradient(bottom, #ddd, #fff); /* IE10 */
44
- background-image: -moz-linear-gradient(bottom, #ddd, #fff); /* Firefox */
45
- background-image: -o-linear-gradient(bottom, #ddd, #fff); /* Opera */
46
- background-image: -webkit-gradient(linear, left bottom, left top, from(#ddd), to(#fff)); /* old Webkit */
47
- background-image: -webkit-linear-gradient(bottom, #ddd, #fff); /* new Webkit */
48
- background-image: linear-gradient(bottom, #ddd, #fff); /* proposed W3C Markup */
49
- }
50
- #insert:hover, #cancel:hover, input.mceButton:hover, .updateButton:hover,
51
- #insert:focus, #cancel:focus, input.mceButton:focus, .updateButton:focus {
52
- border: 1px solid #555;
53
- }
54
-
55
- /* Browse */
56
- a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;}
57
- .mceOldBoxModel a.browse span {width:22px; height:20px;}
58
- a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;}
59
- a.browse span.disabled {border:1px solid white; -moz-opacity:0.3; opacity:0.3; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);}
60
- a.browse:hover span.disabled {border:1px solid white; background-color:transparent;}
61
- a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;}
62
- .mceOldBoxModel a.pickcolor span {width:21px; height:17px;}
63
- a.pickcolor:hover span {background-color:#B2BBD0;}
64
- a.pickcolor, a.browse {text-decoration:none}
65
-
66
- /* Charmap */
67
- table.charmap {border:1px solid #AAA; text-align:center}
68
- td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;}
69
- #charmap a {display:block; color:#000; text-decoration:none; border:0}
70
- #charmap a:hover {background:#CCC;color:#2B6FB6}
71
- #charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center}
72
- #charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center}
73
- #charmap #charmapView {background-color:#fff;}
74
-
75
- /* Source */
76
- .wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
77
- .mceActionPanel {margin-top:5px;}
78
-
79
- /* Tabs classes */
80
- .tabs {width:100%; height:18px; line-height:normal; background:url(img/tabs.gif) repeat-x 0 -72px;}
81
- .tabs ul {margin:0; padding:0; list-style:none;}
82
- .tabs li {float:left; background:url(img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;}
83
- .tabs li.current {background:url(img/tabs.gif) no-repeat 0 -18px; margin-right:2px;}
84
- .tabs span {float:left; display:block; background:url(img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;}
85
- .tabs .current span {background:url(img/tabs.gif) no-repeat right -54px;}
86
- .tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;}
87
- .tabs a:link, .tabs a:visited, .tabs a:hover {color:black;}
88
-
89
- /* Panels */
90
- .panel_wrapper div.panel {display:none;}
91
- .panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;}
92
- .panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;}
93
-
94
- /* Columns */
95
- .column {float:left;}
96
- .properties {width:100%;}
97
- .properties .column1 {}
98
- .properties .column2 {text-align:left;}
99
-
100
- /* Titles */
101
- h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;}
102
- h3 {font-size:14px;}
103
- .title {font-size:12px; font-weight:bold; color:#2B6FB6;}
104
-
105
- /* Dialog specific */
106
- #link .panel_wrapper, #link div.current {height:125px;}
107
- #image .panel_wrapper, #image div.current {height:200px;}
108
- #plugintable thead {font-weight:bold; background:#DDD;}
109
- #plugintable, #about #plugintable td {border:1px solid #919B9C;}
110
- #plugintable {width:96%; margin-top:10px;}
111
- #pluginscontainer {height:290px; overflow:auto;}
112
- #colorpicker #preview {float:right; width:50px; height:14px;line-height:1px; border:1px solid black; margin-left:5px;}
113
- #colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;}
114
- #colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;}
115
- #colorpicker #light div {overflow:hidden;}
116
- #colorpicker #previewblock {float:right; padding-left:10px; height:20px;}
117
- #colorpicker .panel_wrapper div.current {height:175px;}
118
- #colorpicker #namedcolors {width:150px;}
119
- #colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;}
120
- #colorpicker #colornamecontainer {margin-top:5px;}
121
- #colorpicker #picker_panel fieldset {margin:auto;width:325px;}
1
+ /* Generic */
2
+ body {
3
+ font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;
4
+ background:#f1f1f1;
5
+ padding:0;
6
+ margin:8px 8px 0 8px;
7
+ }
8
+
9
+ html {background:#f1f1f1;}
10
+ td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
11
+ textarea {resize:none;outline:none;}
12
+ a:link, a:visited {color:black;}
13
+ a:hover {color:#2B6FB6;}
14
+ .nowrap {white-space: nowrap}
15
+
16
+ /* Forms */
17
+ fieldset {margin:0; padding:4px; border:1px solid #dfdfdf; font-family:Verdana, Arial; font-size:10px;}
18
+ legend {color:#2B6FB6; font-weight:bold;}
19
+ label.msg {display:none;}
20
+ label.invalid {color:#EE0000; display:inline;}
21
+ input.invalid {border:1px solid #EE0000;}
22
+ input {background:#FFF; border:1px solid #dfdfdf;}
23
+ input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
24
+ input, select, textarea {border:1px solid #dfdfdf;}
25
+ input.radio {border:1px none #000000; background:transparent; vertical-align:middle;}
26
+ input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;}
27
+ .input_noborder {border:0;}
28
+
29
+ /* Buttons */
30
+ #insert, #cancel, #apply, .mceActionPanel .button, input.mceButton, .updateButton {
31
+ border: 1px solid #bbb;
32
+ margin:0;
33
+ padding:0 0 1px;
34
+ font-weight:bold;
35
+ font-size: 11px;
36
+ width:94px;
37
+ height:24px;
38
+ color:#000;
39
+ cursor:pointer;
40
+ -webkit-border-radius: 3px;
41
+ border-radius: 3px;
42
+ background-color: #eee; /* Fallback */
43
+ background-image: -ms-linear-gradient(bottom, #ddd, #fff); /* IE10 */
44
+ background-image: -moz-linear-gradient(bottom, #ddd, #fff); /* Firefox */
45
+ background-image: -o-linear-gradient(bottom, #ddd, #fff); /* Opera */
46
+ background-image: -webkit-gradient(linear, left bottom, left top, from(#ddd), to(#fff)); /* old Webkit */
47
+ background-image: -webkit-linear-gradient(bottom, #ddd, #fff); /* new Webkit */
48
+ background-image: linear-gradient(bottom, #ddd, #fff); /* proposed W3C Markup */
49
+ }
50
+ #insert:hover, #cancel:hover, input.mceButton:hover, .updateButton:hover,
51
+ #insert:focus, #cancel:focus, input.mceButton:focus, .updateButton:focus {
52
+ border: 1px solid #555;
53
+ }
54
+
55
+ /* Browse */
56
+ a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;}
57
+ .mceOldBoxModel a.browse span {width:22px; height:20px;}
58
+ a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;}
59
+ a.browse span.disabled {border:1px solid white; -moz-opacity:0.3; opacity:0.3; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);}
60
+ a.browse:hover span.disabled {border:1px solid white; background-color:transparent;}
61
+ a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;}
62
+ .mceOldBoxModel a.pickcolor span {width:21px; height:17px;}
63
+ a.pickcolor:hover span {background-color:#B2BBD0;}
64
+ a.pickcolor, a.browse {text-decoration:none}
65
+
66
+ /* Charmap */
67
+ table.charmap {border:1px solid #AAA; text-align:center}
68
+ td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;}
69
+ #charmap a {display:block; color:#000; text-decoration:none; border:0}
70
+ #charmap a:hover {background:#CCC;color:#2B6FB6}
71
+ #charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center}
72
+ #charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center}
73
+ #charmap #charmapView {background-color:#fff;}
74
+
75
+ /* Source */
76
+ .wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
77
+ .mceActionPanel {margin-top:5px;}
78
+
79
+ /* Tabs classes */
80
+ .tabs {width:100%; height:18px; line-height:normal; background:url(img/tabs.gif) repeat-x 0 -72px;}
81
+ .tabs ul {margin:0; padding:0; list-style:none;}
82
+ .tabs li {float:left; background:url(img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;}
83
+ .tabs li.current {background:url(img/tabs.gif) no-repeat 0 -18px; margin-right:2px;}
84
+ .tabs span {float:left; display:block; background:url(img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;}
85
+ .tabs .current span {background:url(img/tabs.gif) no-repeat right -54px;}
86
+ .tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;}
87
+ .tabs a:link, .tabs a:visited, .tabs a:hover {color:black;}
88
+
89
+ /* Panels */
90
+ .panel_wrapper div.panel {display:none;}
91
+ .panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;}
92
+ .panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;}
93
+
94
+ /* Columns */
95
+ .column {float:left;}
96
+ .properties {width:100%;}
97
+ .properties .column1 {}
98
+ .properties .column2 {text-align:left;}
99
+
100
+ /* Titles */
101
+ h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;}
102
+ h3 {font-size:14px;}
103
+ .title {font-size:12px; font-weight:bold; color:#2B6FB6;}
104
+
105
+ /* Dialog specific */
106
+ #link .panel_wrapper, #link div.current {height:125px;}
107
+ #image .panel_wrapper, #image div.current {height:200px;}
108
+ #plugintable thead {font-weight:bold; background:#DDD;}
109
+ #plugintable, #about #plugintable td {border:1px solid #919B9C;}
110
+ #plugintable {width:96%; margin-top:10px;}
111
+ #pluginscontainer {height:290px; overflow:auto;}
112
+ #colorpicker #preview {float:right; width:50px; height:14px;line-height:1px; border:1px solid black; margin-left:5px;}
113
+ #colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;}
114
+ #colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;}
115
+ #colorpicker #light div {overflow:hidden;}
116
+ #colorpicker #previewblock {float:right; padding-left:10px; height:20px;}
117
+ #colorpicker .panel_wrapper div.current {height:175px;}
118
+ #colorpicker #namedcolors {width:150px;}
119
+ #colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;}
120
+ #colorpicker #colornamecontainer {margin-top:5px;}
121
+ #colorpicker #picker_panel fieldset {margin:auto;width:325px;}
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/wp_theme/ui.css CHANGED
@@ -1 +1 @@
1
- .wp_themeSkin table,.wp_themeSkin tbody,.wp_themeSkin a,.wp_themeSkin img,.wp_themeSkin tr,.wp_themeSkin div,.wp_themeSkin td,.wp_themeSkin iframe,.wp_themeSkin span,.wp_themeSkin *,.wp_themeSkin .mceText{border:0;margin:0;padding:0;white-space:nowrap;text-decoration:none;font-weight:normal;cursor:default;vertical-align:baseline;width:auto;border-collapse:separate}.wp_themeSkin a:hover,.wp_themeSkin a:link,.wp_themeSkin a:visited,.wp_themeSkin a:active{text-decoration:none;font-weight:normal;cursor:default}.wp_themeSkin table td{vertical-align:middle}.wp_themeSkin *,.wp_themeSkin a:hover,.wp_themeSkin a:link,.wp_themeSkin a:visited,.wp_themeSkin a:active{color:#000}.wp_themeSkin iframe{display:block}.wp_themeSkin #mce_fullscreen_ifr{background-color:#fff}.wp_themeSkin .mceToolbar{padding:1px}.wp_themeSkin .mceExternalToolbar{position:absolute;border-bottom:0;display:none}.wp_themeSkin .mceExternalToolbar td.mceToolbar{padding-right:13px}.wp_themeSkin .mceExternalClose{position:absolute;top:3px;right:3px;width:7px;height:7px;background:url("../../img/icons.gif") -820px 0}.wp_themeSkin table.mceToolbar,.wp_themeSkin tr.mceFirst .mceToolbar tr td,.wp_themeSkin tr.mceLast .mceToolbar tr td{border:0;margin:0;padding:0}.wp_themeSkin table.mceLayout{border-color: #CCCCCC #CCCCCC #DFDFDF;border-style: solid;border-top-left-radius: 3px; border-top-right-radius: 3px; border-width: 1px;}.wp_themeSkin .mceStatusbar{display:block;font-family:Arial,"Bitstream Vera Sans",Helvetica,Verdana,sans-serif;font-size:12px;line-height:16px;padding:0 0 0 8px;overflow:visible;height:20px;border-top:1px solid #dfdfdf;color:#000;background-color:#f5f5f5}.rtl .wp_themeSkin .mceStatusbar{padding:0 8px 0 0}.wp_themeSkin .mceStatusbar *{color:#555}.wp_themeSkin .mceStatusbar div{float:left;padding:2px}.rtl .wp_themeSkin .mceStatusbar div{float:right}.wp_themeSkin .mceStatusbar a.mceResize{display:block;float:right;background:url("../../img/icons.gif") -800px 0;width:20px;height:20px;cursor:se-resize}.rtl .wp_themeSkin .mceStatusbar a.mceResize{float:left}.wp_themeSkin .mceStatusbar a:hover{text-decoration:underline}.wp_themeSkin table.mceToolbar{margin:0 6px 2px}.wp_themeSkin #content_toolbar1{margin-top:2px}.wp_themeSkin .mceToolbar .mceToolbarEndListBox span{display:none}.wp_themeSkin span.mceIcon,.wp_themeSkin img.mceIcon{display:block;width:20px;height:20px}.wp_themeSkin .mceIcon{background:url("../../img/icons.gif") no-repeat 20px 20px}.wp_themeSkin .mceButton{display:block;width:20px;height:20px;cursor:default;padding:1px 2px;margin:1px;-webkit-border-radius:2px;border-radius:2px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.15),inset 0 0 2px 1px #fff;-moz-box-shadow:0 1px 0 rgba(0,0,0,0.15),inset 0 0 2px 1px #fff;box-shadow:0 1px 0 rgba(0,0,0,0.15),inset 0 0 2px 1px #fff}.wp_themeSkin a.mceButtonEnabled:hover{background-image:inherit 0 -10px}.wp_themeSkin .mceOldBoxModel a.mceButton span,.wp_themeSkin .mceOldBoxModel a.mceButton img{margin:0 0 0 1px}.wp_themeSkin a.mceButton:active,.wp_themeSkin a.mceButtonActive,.wp_themeSkin a.mceButtonActive:hover,.wp_themeSkin a.mceButtonSelected{-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.15),inset 0 0 2px 1px #fff;-moz-box-shadow:0 1px 0 rgba(0,0,0,0.15),inset 0 0 2px 1px #fff;box-shadow:0 1px 0 rgba(0,0,0,0.15),inset 0 0 2px 1px #fff}.wp_themeSkin .mceButtonDisabled .mceIcon{opacity:.5;filter:alpha(opacity=50)}.wp_themeSkin .mceSeparator{height:24px;width:1px;display:block;background:transparent;overflow:hidden;margin:0 2px}.wp_themeSkin .mceListBox,.wp_themeSkin .mceListBox a{display:block}.wp_themeSkin .mceListBox .mceText{padding:1px 2px 1px 5px;text-align:left;text-decoration:none;width:70px;-webkit-border-bottom-left-radius:2px;-webkit-border-top-left-radius:2px;border-bottom-left-radius:2px;border-top-left-radius:2px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.15),inset 0 0 2px 1px #fff;-moz-box-shadow:0 1px 0 rgba(0,0,0,0.15),inset 0 0 2px 1px #fff;box-shadow:0 1px 0 rgba(0,0,0,0.15),inset 0 0 2px 1px #fff;font-family:Arial,"Bitstream Vera Sans",Helvetica,Verdana,sans-serif;font-size:12px;height:20px;line-height:20px;overflow:hidden}.wp_themeSkin .mceListBox{margin:1px;direction:ltr}.wp_themeSkin .mceListBox .mceOpen{width:14px;height:20px;border-collapse:separate;padding:1px;-webkit-border-bottom-left-radius:0;-webkit-border-top-left-radius:0;border-bottom-left-radius:0;border-top-left-radius:0;-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.15),inset 0 0 2px 1px #fff;-moz-box-shadow:0 1px 0 rgba(0,0,0,0.15),inset 0 0 2px 1px #fff;box-shadow:0 1px 0 rgba(0,0,0,0.15),inset 0 0 2px 1px #fff}.wp_themeSkin .mceListBox .mceOpen span{display:block;width:14px;height:20px;background-image:url("./img/down_arrow.gif");background-position:2px 1px;background-repeat:no-repeat}.wp_themeSkin table.mceListBoxEnabled:hover .mceText,.wp_themeSkin .mceListBoxHover .mceText,.wp_themeSkin .mceListBoxSelected .mceText,.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen,.wp_themeSkin .mceListBoxHover .mceOpen,.wp_themeSkin .mceListBoxSelected .mceOpen{background-image:none}.wp_themeSkin .mceListBoxDisabled .mceText{color:gray}.wp_themeSkin .mceListBoxMenu{overflow:auto;overflow-x:hidden}.wp_themeSkin .mceOldBoxModel .mceListBox .mceText{height:22px}.wp_themeSkin select.mceListBox{font-family:Arial,"Bitstream Vera Sans",Helvetica,Verdana,sans-serif;font-size:12px;border-color:#b2b2b2;background-color:#fff}.wp_themeSkin .mceSplitButton a,.wp_themeSkin .mceSplitButton span{display:block;height:20px}.wp_themeSkin .mceSplitButton{display:block;margin:1px;direction:ltr}.wp_themeSkin table.mceSplitButton td{padding:2px;-webkit-border-radius:2px;border-radius:2px}.wp_themeSkin table.mceSplitButton td a{-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.15),inset 0 0 2px 1px #fff;-moz-box-shadow:0 1px 0 rgba(0,0,0,0.15),inset 0 0 2px 1px #fff;box-shadow:0 1px 0 rgba(0,0,0,0.15),inset 0 0 2px 1px #fff}.wp_themeSkin table.mceSplitButton:hover td{background-image:inherit 0 -10px}.wp_themeSkin .mceSplitButton a.mceAction{height:20px;width:20px;padding:1px 2px}.wp_themeSkin .mceSplitButton span.mceAction{background-image:url("../../img/icons.gif");background-repeat:no-repeat;background-color:transparent;width:20px}.wp_themeSkin .mceSplitButton a.mceOpen{width:10px;height:20px;background-image:url("./img/down_arrow.gif");background-position:1px 2px;background-repeat:no-repeat;padding:1px;border-left:0 none!important}.wp_themeSkin .mceSplitButton span.mceOpen{display:none}.wp_themeSkin .mceSplitButtonDisabled .mceAction{opacity:.3;filter:alpha(opacity=30)}.wp_themeSkin .mceListBox a.mceText,.wp_themeSkin .mceSplitButton a.mceAction{-webkit-border-bottom-left-radius:2px;-webkit-border-top-left-radius:2px;border-bottom-left-radius:2px;border-top-left-radius:2px}.wp_themeSkin .mceSplitButton a.mceOpen,.wp_themeSkin .mceListBox a.mceOpen{-webkit-border-bottom-right-radius:2px;-webkit-border-top-right-radius:2px;border-bottom-right-radius:2px;border-top-right-radius:2px}.wp_themeSkin span.mce_undo,.wp_themeSkin span.mce_redo,.wp_themeSkin span.mce_bullist,.wp_themeSkin span.mce_numlist,.wp_themeSkin span.mce_blockquote,.wp_themeSkin span.mce_charmap,.wp_themeSkin span.mce_bold,.wp_themeSkin span.mce_italic,.wp_themeSkin span.mce_underline,.wp_themeSkin span.mce_justifyleft,.wp_themeSkin span.mce_justifyright,.wp_themeSkin span.mce_justifycenter,.wp_themeSkin span.mce_justifyfull,.wp_themeSkin span.mce_indent,.wp_themeSkin span.mce_outdent,.wp_themeSkin span.mce_link,.wp_themeSkin span.mce_unlink,.wp_themeSkin span.mce_help,.wp_themeSkin span.mce_removeformat,.wp_themeSkin span.mce_fullscreen,.wp_themeSkin span.mce_wp_fullscreen,.wp_themeSkin span.mce_media,.wp_themeSkin span.mce_pastetext,.wp_themeSkin span.mce_pasteword,.wp_themeSkin span.mce_wp_help,.wp_themeSkin span.mce_wp_adv,.wp_themeSkin span.mce_wp_more,.wp_themeSkin span.mce_strikethrough,.wp_themeSkin span.mce_spellchecker,.wp_themeSkin span.mce_forecolor,.wp_themeSkin .mce_forecolorpicker,.wp_themeSkin .mceSplitButton .mce_spellchecker span.mce_spellchecker,.wp_themeSkin .mceSplitButton .mce_forecolor span.mce_forecolor,.wp_themeSkin .mceSplitButton span.mce_numlist,.wp_themeSkin .mceSplitButton span.mce_bullist{background-image:url(./img/wpicons.png)}.wp_themeSkin div.mceColorSplitMenu table{background-color:#ebebeb;border-color:#b2b2b2}.wp_themeSkin .mceColorSplitMenu td{padding:2px}.wp_themeSkin .mceColorSplitMenu a{display:block;width:9px;height:9px;overflow:hidden;border-color:#b2b2b2}.wp_themeSkin .mceColorSplitMenu td.mceMoreColors{padding:1px 3px 1px 1px}.wp_themeSkin .mceColorSplitMenu a.mceMoreColors{width:100%;height:auto;text-align:center;font-family:Tahoma,Verdana,Arial,Helvetica;font-size:11px;line-height:20px;border-color:#fff}.wp_themeSkin .mceColorPreview{margin:-5px 0 0 2px;width:16px;height:4px;overflow:hidden}.wp_themeSkin .mceMenu{position:absolute;left:0;top:0;z-index:1000;border-color:#ddd}.wp_themeSkin .mceNoIcons span.mceIcon{width:0}.wp_themeSkin .mceNoIcons a .mceText{padding-left:10px}.wp_themeSkin .mceMenu table{background-color:#ebeaeb}.wp_themeSkin .mceMenu a,.wp_themeSkin .mceMenu span,.wp_themeSkin .mceMenu{display:block}.wp_themeSkin .mceMenu td{height:20px;overflow:hidden}.wp_themeSkin .mceMenu a{position:relative;padding:3px 0 4px 0;text-decoration:none!important}.wp_themeSkin .mceMenu .mceText{position:relative;display:block;font-family:Tahoma,Verdana,Arial,Helvetica;cursor:default;margin:0;padding:0 25px;color:#000}.wp_themeSkin .mceMenu span.mceText,.wp_themeSkin .mceMenu .mcePreview{font-size:12px}.wp_themeSkin .mceMenu pre.mceText{font-family:Monospace}.wp_themeSkin .mceMenu .mceIcon{position:absolute;top:0;left:0;width:22px}.wp_themeSkin .mceMenu .mceMenuItemEnabled a:hover,.wp_themeSkin .mceMenu .mceMenuItemActive{background-color:#f5f5f5}.wp_themeSkin td.mceMenuItemSeparator{height:1px;background-color:#aaa}.wp_themeSkin .mceMenuItemTitle a{border-top:0;border-right:0;border-left:0;border-bottom:1px solid #aaa;text-decoration:none!important;background-color:#ccc}.wp_themeSkin .mceMenuItemTitle span.mceText{font-weight:bold;padding-left:4px;color:#000}.wp_themeSkin .mceMenuItemSelected .mceIcon{background:url("../js/tinymce/themes/advanced/skins/default/img/menu_check.gif");color:#888}.wp_themeSkin .mceNoIcons .mceMenuItemSelected a{background:url("../js/tinymce/themes/advanced/skins/default/img/menu_arrow.gif") no-repeat -6px center}.wp_themeSkin .mceMenu span.mceMenuLine{display:none}.wp_themeSkin .mceMenuItemSub a{background:url("../js/tinymce/themes/advanced/skins/default/img/menu_arrow.gif") no-repeat top right}.wp_themeSkin .mceBlocker{position:absolute;left:0;top:0;z-index:1000;opacity:.5;filter:alpha(opacity=50);background:#FFF}.wp_themeSkin .mceProgress{position:absolute;left:0;top:0;z-index:1001;background:url("../js/tinymce/themes/advanced/skins/default/img/progress.gif") no-repeat;width:32px;height:32px;margin:-16px 0 0 -16px}.wp_themeSkin .mcePlaceHolder{border:1px dotted gray}.wp_themeSkin .mce_address span.mceText{font-style:italic}.wp_themeSkin .mce_pre span.mceText{font-family:monospace}.wp_themeSkin .mce_h1 span.mceText{font-weight:bolder;font-size:17px}.wp_themeSkin .mce_h2 span.mceText{font-weight:bolder;font-size:16px}.wp_themeSkin .mce_h3 span.mceText{font-weight:bolder;font-size:15px}.wp_themeSkin .mce_h4 span.mceText{font-weight:bolder;font-size:14px}.wp_themeSkin .mce_h5 span.mceText{font-weight:bolder;font-size:13px}.wp_themeSkin .mce_h6 span.mceText{font-weight:bolder;font-size:12px}.wp_themeSkin span.mce_undo{background-position:-500px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_undo,.wp_themeSkin .mceButtonActive span.mce_undo{background-position:-500px 0}.wp_themeSkin span.mce_redo{background-position:-480px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_redo,.wp_themeSkin .mceButtonActive span.mce_redo{background-position:-480px 0}.wp_themeSkin span.mce_bullist{background-position:-40px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_bullist,.wp_themeSkin .mceButtonActive span.mce_bullist,.wp_themeSkin .mceSplitButton:hover span.mce_bullist{background-position:-40px 0}.wp_themeSkin span.mce_numlist{background-position:-61px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_numlist,.wp_themeSkin .mceButtonActive span.mce_numlist,.wp_themeSkin .mceSplitButton:hover span.mce_numlist{background-position:-61px 0}.wp_themeSkin span.mce_blockquote{background-position:-80px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_blockquote,.wp_themeSkin .mceButtonActive span.mce_blockquote{background-position:-80px 0}.wp_themeSkin span.mce_charmap{background-position:-420px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_charmap,.wp_themeSkin .mceButtonActive span.mce_charmap{background-position:-420px 0}.wp_themeSkin span.mce_bold{background-position:-1px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_bold,.wp_themeSkin .mceButtonActive span.mce_bold{background-position:-1px 0}.wp_themeSkin span.mce_italic{background-position:-21px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_italic,.wp_themeSkin .mceButtonActive span.mce_italic{background-position:-21px 0}.wp_themeSkin span.mce_underline{background-position:-280px -19px}.wp_themeSkin .mceButtonEnabled:hover span.mce_underline,.wp_themeSkin .mceButtonActive span.mce_underline{background-position:-280px 1px}.wp_themeSkin span.mce_justifyleft{background-position:-100px -19px}.wp_themeSkin .mceButtonEnabled:hover span.mce_justifyleft,.wp_themeSkin .mceButtonActive span.mce_justifyleft{background-position:-100px 1px}.wp_themeSkin span.mce_justifyright{background-position:-141px -19px}.wp_themeSkin .mceButtonEnabled:hover span.mce_justifyright,.wp_themeSkin .mceButtonActive span.mce_justifyright{background-position:-141px 1px}.wp_themeSkin span.mce_justifycenter{background-position:-120px -19px}.wp_themeSkin .mceButtonEnabled:hover span.mce_justifycenter,.wp_themeSkin .mceButtonActive span.mce_justifycenter{background-position:-120px 1px}.wp_themeSkin span.mce_justifyfull{background-position:-300px -19px}.wp_themeSkin .mceButtonEnabled:hover span.mce_justifyfull,.wp_themeSkin .mceButtonActive span.mce_justifyfull{background-position:-300px 1px}.wp_themeSkin span.mce_indent{background-position:-461px -19px}.wp_themeSkin .mceButtonEnabled:hover span.mce_indent,.wp_themeSkin .mceButtonActive span.mce_indent{background-position:-461px 1px}.wp_themeSkin span.mce_outdent{background-position:-440px -19px}.wp_themeSkin .mceButtonEnabled:hover span.mce_outdent,.wp_themeSkin .mceButtonActive span.mce_outdent{background-position:-440px 1px}.wp_themeSkin span.mce_link{background-position:-161px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_link,.wp_themeSkin .mceButtonActive span.mce_link{background-position:-161px 0}.wp_themeSkin span.mce_unlink{background-position:-180px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_unlink,.wp_themeSkin .mceButtonActive span.mce_unlink{background-position:-180px 0}.wp_themeSkin span.mce_help{background-position:-521px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_help,.wp_themeSkin .mceButtonActive span.mce_help{background-position:-521px 0}.wp_themeSkin span.mce_removeformat{background-position:-381px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_removeformat,.wp_themeSkin .mceButtonActive span.mce_removeformat{background-position:-381px 0}.wp_themeSkin span.mce_strikethrough{background-position:-540px -18px}.wp_themeSkin .mceButtonEnabled:hover span.mce_strikethrough,.wp_themeSkin .mceButtonActive span.mce_strikethrough{background-position:-540px 0}.wp_themeSkin .mceSplitButton .mce_forecolor span.mce_forecolor{background-position:-321px -22px}.wp_themeSkin .mceSplitButtonEnabled:hover span.mce_forecolor,.wp_themeSkin .mceSplitButtonActive span.mce_forecolor{background-position:-321px -2px}.wp_themeSkin .mce_forecolorpicker{background-position:-320px -20px}.wp_themeSkin span.mce_fullscreen{background-position:-240px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_fullscreen,.wp_themeSkin .mceButtonActive span.mce_fullscreen{background-position:-240px 0}.wp_themeSkin span.mce_wp_fullscreen{background-position:-240px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_wp_fullscreen,.wp_themeSkin .mceButtonActive span.mce_wp_fullscreen{background-position:-240px 0}.wp_themeSkin span.mce_media{background-position:-401px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_media,.wp_themeSkin .mceButtonActive span.mce_media{background-position:-401px 0}.wp_themeSkin span.mce_pastetext{background-position:-340px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_pastetext,.wp_themeSkin .mceButtonActive span.mce_pastetext{background-position:-340px 0}.wp_themeSkin span.mce_pasteword{background-position:-360px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_pasteword,.wp_themeSkin .mceButtonActive span.mce_pasteword{background-position:-360px 0}.wp_themeSkin span.mce_spellchecker{background-position:-220px -19px}.wp_themeSkin .mceButtonEnabled:hover span.mce_spellchecker,.wp_themeSkin .mceSplitButtonEnabled:hover span.mce_spellchecker,.wp_themeSkin .mceButtonActive span.mce_spellchecker,.wp_themeSkin .mceSplitButtonActive span.mce_spellchecker{background-position:-220px 1px}.wp_themeSkin span.mce_wp_help{background-position:-521px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_wp_help,.wp_themeSkin .mceButtonActive span.mce_wp_help{background-position:-521px 0}.wp_themeSkin span.mce_wp_adv{background-position:-260px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_wp_adv,.wp_themeSkin .mceButtonActive span.mce_wp_adv{background-position:-260px 0}.wp_themeSkin span.mce_wp_more{background-position:-201px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_wp_more,.wp_themeSkin .mceButtonActive span.mce_wp_more{background-position:-201px 0}.wp_themeSkin span.mce_cleanup{background-position:-380px -20px}.wp_themeSkin span.mce_anchor{background-position:-200px 0}.wp_themeSkin span.mce_sub{background-position:-600px 0}.wp_themeSkin span.mce_sup{background-position:-620px 0}.wp_themeSkin span.mce_newdocument{background-position:-520px 0}.wp_themeSkin span.mce_image{background-position:-380px 0}.wp_themeSkin span.mce_code{background-position:-260px 0}.wp_themeSkin span.mce_hr{background-position:-360px 0}.wp_themeSkin span.mce_visualaid{background-position:-660px 0}.wp_themeSkin span.mce_paste{background-position:-560px 0}.wp_themeSkin span.mce_copy{background-position:-700px 0}.wp_themeSkin span.mce_cut{background-position:-680px 0}.wp_themeSkin .mce_backcolor span.mceAction{background-position:-760px 0}.wp_themeSkin .mce_backcolorpicker{background-position:-760px 0}.wp_themeSkin span.mce_advhr{background-position:-0px -20px}.wp_themeSkin span.mce_ltr{background-position:-20px -20px}.wp_themeSkin span.mce_rtl{background-position:-40px -20px}.wp_themeSkin span.mce_emotions{background-position:-60px -20px}.wp_themeSkin span.mce_fullpage{background-position:-80px -20px}.wp_themeSkin span.mce_iespell{background-position:-120px -20px}.wp_themeSkin span.mce_insertdate{background-position:-140px -20px}.wp_themeSkin span.mce_inserttime{background-position:-160px -20px}.wp_themeSkin span.mce_absolute{background-position:-180px -20px}.wp_themeSkin span.mce_backward{background-position:-200px -20px}.wp_themeSkin span.mce_forward{background-position:-220px -20px}.wp_themeSkin span.mce_insert_layer{background-position:-240px -20px}.wp_themeSkin span.mce_insertlayer{background-position:-260px -20px}.wp_themeSkin span.mce_movebackward{background-position:-280px -20px}.wp_themeSkin span.mce_moveforward{background-position:-300px -20px}.wp_themeSkin span.mce_nonbreaking{background-position:-340px -20px}.wp_themeSkin span.mce_selectall{background-position:-400px -20px}.wp_themeSkin span.mce_preview{background-position:-420px -20px}.wp_themeSkin span.mce_print{background-position:-440px -20px}.wp_themeSkin span.mce_cancel{background-position:-460px -20px}.wp_themeSkin span.mce_save{background-position:-480px -20px}.wp_themeSkin span.mce_replace{background-position:-500px -20px}.wp_themeSkin span.mce_search{background-position:-520px -20px}.wp_themeSkin span.mce_styleprops{background-position:-560px -20px}.wp_themeSkin span.mce_table{background-position:-580px -20px}.wp_themeSkin span.mce_cell_props{background-position:-600px -20px}.wp_themeSkin span.mce_delete_table{background-position:-620px -20px}.wp_themeSkin span.mce_delete_col{background-position:-640px -20px}.wp_themeSkin span.mce_delete_row{background-position:-660px -20px}.wp_themeSkin span.mce_col_after{background-position:-680px -20px}.wp_themeSkin span.mce_col_before{background-position:-700px -20px}.wp_themeSkin span.mce_row_after{background-position:-720px -20px}.wp_themeSkin span.mce_row_before{background-position:-740px -20px}.wp_themeSkin span.mce_merge_cells{background-position:-760px -20px}.wp_themeSkin span.mce_table_props{background-position:-980px -20px}.wp_themeSkin span.mce_row_props{background-position:-780px -20px}.wp_themeSkin span.mce_split_cells{background-position:-800px -20px}.wp_themeSkin span.mce_template{background-position:-820px -20px}.wp_themeSkin span.mce_visualchars{background-position:-840px -20px}.wp_themeSkin span.mce_abbr{background-position:-860px -20px}.wp_themeSkin span.mce_acronym{background-position:-880px -20px}.wp_themeSkin span.mce_attribs{background-position:-900px -20px}.wp_themeSkin span.mce_cite{background-position:-920px -20px}.wp_themeSkin span.mce_del{background-position:-940px -20px}.wp_themeSkin span.mce_ins{background-position:-960px -20px}.wp_themeSkin span.mce_pagebreak{background-position:0 -40px}.wp_themeSkin .mceExternalToolbar,.wp_themeSkin .mceButton,.wp_themeSkin a.mceButtonEnabled:hover,.wp_themeSkin a.mceButtonActive,.wp_themeSkin a.mceButtonSelected,.wp_themeSkin .mceListBox .mceText,.wp_themeSkin .mceListBox .mceOpen,.wp_themeSkin table.mceListBoxEnabled:hover .mceText,.wp_themeSkin .mceListBoxHover .mceText,.wp_themeSkin .mceListBoxSelected .mceText,.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen,.wp_themeSkin .mceListBoxHover .mceOpen,.wp_themeSkin .mceListBoxSelected .mceOpen,.wp_themeSkin select.mceListBox,.wp_themeSkin .mceSplitButton a.mceAction,.wp_themeSkin .mceSplitButton a.mceOpen,.wp_themeSkin .mceSplitButton a.mceOpen:hover,.wp_themeSkin .mceSplitButtonSelected a.mceOpen,.wp_themeSkin table.mceSplitButtonEnabled:hover a.mceAction,.wp_themeSkin .mceSplitButton a.mceAction:hover,.wp_themeSkin div.mceColorSplitMenu table,.wp_themeSkin .mceColorSplitMenu a,.wp_themeSkin .mceColorSplitMenu a.mceMoreColors,.wp_themeSkin .mceColorSplitMenu a.mceMoreColors:hover,.wp_themeSkin a.mceMoreColors:hover,.wp_themeSkin .mceMenu{border-style:solid;border-width:1px}.wp_themeSkin iframe{background:transparent}.wp_themeSkin .mceButton,.wp_themeSkin .mceListBox .mceText,.wp_themeSkin .mceListBox .mceOpen{border-color:#ccc;background-color:#eee;background-image:-ms-linear-gradient(bottom,#ddd,#fff);background-image:-moz-linear-gradient(bottom,#ddd,#fff);background-image:-o-linear-gradient(bottom,#ddd,#fff);background-image:-webkit-gradient(linear,left bottom,left top,from(#ddd),to(#fff));background-image:-webkit-linear-gradient(bottom,#ddd,#fff);background-image:linear-gradient(bottom,#ddd,#fff)}.wp_themeSkin a.mceButtonEnabled:hover{border-color:#a0a0a0;background:#ddd;background-image:-ms-linear-gradient(bottom,#ccc,#fff);background-image:-moz-linear-gradient(bottom,#ccc,#fff);background-image:-o-linear-gradient(bottom,#ccc,#fff);background-image:-webkit-gradient(linear,left bottom,left top,from(#ccc),to(#fff));background-image:-webkit-linear-gradient(bottom,#ccc,#fff);background-image:linear-gradient(bottom,#ccc,#fff)}.wp_themeSkin a.mceButton:active,.wp_themeSkin a.mceButtonEnabled:active,.wp_themeSkin a.mceButtonSelected:active,.wp_themeSkin a.mceButtonActive,.wp_themeSkin a.mceButtonActive:active,.wp_themeSkin a.mceButtonActive:hover{background-color:#ddd;background-image:-ms-linear-gradient(bottom,#eee,#bbb);background-image:-moz-linear-gradient(bottom,#eee,#bbb);background-image:-o-linear-gradient(bottom,#eee,#bbb);background-image:-webkit-gradient(linear,left bottom,left top,from(#eee),to(#bbb));background-image:-webkit-linear-gradient(bottom,#eee,#bbb);background-image:linear-gradient(bottom,#eee,#bbb);border-color:#909090}.wp_themeSkin .mceButtonDisabled{border-color:#ccc!important}.wp_themeSkin .mceListBox .mceOpen{border-left:0!important}.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen,.wp_themeSkin .mceListBoxHover .mceOpen,.wp_themeSkin .mceListBoxHover:active .mceOpen,.wp_themeSkin .mceListBoxSelected .mceOpen,.wp_themeSkin .mceListBoxSelected .mceText,.wp_themeSkin table.mceListBoxEnabled:active .mceText{background:#ccc;border-color:#999}.wp_themeSkin table.mceListBoxEnabled:hover .mceText,.wp_themeSkin .mceListBoxHover .mceText,.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen,.wp_themeSkin .mceListBoxHover .mceOpen{border-color:#909090;background-color:#eee;background-image:-ms-linear-gradient(bottom,#ccc,#fff);background-image:-moz-linear-gradient(bottom,#ccc,#fff);background-image:-o-linear-gradient(bottom,#ccc,#fff);background-image:-webkit-gradient(linear,left bottom,left top,from(#ccc),to(#fff));background-image:-webkit-linear-gradient(bottom,#ccc,#fff);background-image:linear-gradient(bottom,#ccc,#fff)}.wp_themeSkin .mceSplitButton a.mceAction,.wp_themeSkin .mceSplitButton a.mceOpen{border-color:#ccc}.wp_themeSkin .mceSplitButton a.mceOpen:hover,.wp_themeSkin .mceSplitButtonSelected a.mceOpen,.wp_themeSkin table.mceSplitButtonEnabled:hover a.mceAction,.wp_themeSkin .mceSplitButton a.mceAction:hover{border-color:#909090}.wp_themeSkin table.mceSplitButton td{background-color:#eee;background-image:-ms-linear-gradient(bottom,#ddd,#fff);background-image:-moz-linear-gradient(bottom,#ddd,#fff);background-image:-o-linear-gradient(bottom,#ddd,#fff);background-image:-webkit-gradient(linear,left bottom,left top,from(#ddd),to(#fff));background-image:-webkit-linear-gradient(bottom,#ddd,#fff);background-image:linear-gradient(bottom,#ddd,#fff)}.wp_themeSkin table.mceSplitButton:hover td{background-image:-ms-linear-gradient(bottom,#ccc,#fff);background-image:-moz-linear-gradient(bottom,#ccc,#fff);background-image:-o-linear-gradient(bottom,#ccc,#fff);background-image:-webkit-gradient(linear,left bottom,left top,from(#ccc),to(#fff));background-image:-webkit-linear-gradient(bottom,#ccc,#fff);background-image:linear-gradient(bottom,#ccc,#fff)}.wp_themeSkin .mceSplitButtonActive{background-color:#b2b2b2}.wp_themeSkin .mceColorSplitMenu a.mceMoreColors:hover{border-color:#0a246a;background-color:#b6bdd2}.wp_themeSkin a.mceMoreColors:hover{border-color:#0a246a}.wp_themeSkin .mceMenuItemDisabled .mceText{color:#888}#mceModalBlocker{background:#000}.wp-editor-area{font-family:Consolas,Monaco,monospace;padding:10px;line-height:150%;border:0 none;outline:0;resize:vertical;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.wp-editor-tools{height:30px;padding:0 10px}.wp-editor-container{border-width:1px;border-style:solid;-webkit-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;border-top-right-radius:3px;border-top-left-radius:3px;border-color:#ccc #ccc #dfdfdf}.wp-editor-container textarea.wp-editor-area{width:99.9%}.quicktags-toolbar,.wp_themeSkin tr.mceFirst td.mceToolbar{border-bottom:1px solid #ccc;background-color:#e9e9e9;background-image:-ms-linear-gradient(bottom,#ddd,#e9e9e9);background-image:-moz-linear-gradient(bottom,#ddd,#e9e9e9);background-image:-o-linear-gradient(bottom,#ddd,#e9e9e9);background-image:-webkit-linear-gradient(bottom,#ddd,#e9e9e9);background-image:linear-gradient(bottom,#ddd,#e9e9e9)}.wp-switch-editor{height:18px;font:13px/18px Arial,Helvetica,sans-serif normal;margin:5px 5px 0 0;padding:4px 5px 2px;float:right;cursor:pointer;border-width:1px;border-style:solid;-webkit-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;border-top-right-radius:3px;border-top-left-radius:3px;background-color:#f1f1f1;border-color:#dfdfdf #dfdfdf #ccc;color:#999}html[dir="rtl"] .wp-switch-editor{float:left}.wp-switch-editor:hover{text-decoration:none!important}.js .tmce-active .wp-editor-area{color:white}.tmce-active .quicktags-toolbar{display:none}.tmce-active .switch-tmce,.html-active .switch-html{border-color:#ccc #ccc #e9e9e9;background-color:#e9e9e9;color:#333}.wp-media-buttons{line-height:1;padding:9px 0 0}.wp-media-buttons a{text-decoration:none;color:#333;font-size:12px;vertical-align:bottom}.wp-media-buttons img{padding:0 4px;vertical-align:middle}.quicktags-toolbar{border-bottom-style:solid;border-bottom-width:1px;-webkit-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;border-top-right-radius:3px;border-top-left-radius:3px;padding:2px 8px 0;min-height:29px}.quicktags-toolbar>div{padding:2px 4px 0}.quicktags-toolbar input{margin:2px 1px 4px;line-height:18px;display:inline-block;min-width:26px;padding:2px 4px;font:12px/18px Arial,Helvetica,sans-serif normal;color:#464646;border:1px solid #c3c3c3;-webkit-border-radius:3px;border-radius:3px;background-color:#eee;background-image:-ms-linear-gradient(bottom,#e3e3e3,#fff);background-image:-moz-linear-gradient(bottom,#e3e3e3,#fff);background-image:-o-linear-gradient(bottom,#e3e3e3,#fff);background-image:-webkit-linear-gradient(bottom,#e3e3e3,#fff);background-image:linear-gradient(bottom,#e3e3e3,#fff)}.quicktags-toolbar input:hover{border-color:#aaa;background:#ddd}.quicktags-toolbar input[value="link"]{text-decoration:underline}.quicktags-toolbar input[value="del"]{text-decoration:line-through}.quicktags-toolbar input[value="i"]{font-style:italic}.quicktags-toolbar input[value="b"]{font-weight:bold}#wp_editbtns,#wp_gallerybtns{padding:2px;position:absolute;display:none;z-index:999998}#wp_editimgbtn,#wp_delimgbtn,#wp_editgallery,#wp_delgallery{border-color:#999;background-color:#eee;margin:2px;padding:2px;border-width:1px;border-style:solid;-webkit-border-radius:3px;border-radius:3px}#wp_editimgbtn:hover,#wp_delimgbtn:hover,#wp_editgallery:hover,#wp_delgallery:hover{border-color:#555;background-color:#ccc}#wp-link{background-color:#f5f5f5;line-height:1.4em;font-size:12px}#wp-link ol,#wp-link ul{list-style:none;margin:0;padding:0}#wp-link input[type="text"]{-webkit-box-sizing:border-box}#wp-link input[type="text"],#wp-link textarea{border-width:1px;border-style:solid;-webkit-border-radius:4px;border-radius:4px;font-size:12px;margin:1px;padding:3px}#wp-link #link-options{padding:10px 0 14px;border-bottom:1px solid #dfdfdf;margin:0 6px 14px}#wp-link p.howto{margin:3px}#wp-link #internal-toggle{display:inline-block;cursor:pointer;padding-left:18px}#wp-link .toggle-arrow{background:transparent url('../images/toggle-arrow.png') top left no-repeat;height:23px;line-height:23px}#wp-link .toggle-arrow-active{background-position:center left}#wp-link label input[type="text"]{width:360px;margin-top:5px}#wp-link label span{display:inline-block;width:80px;text-align:right;padding-right:5px}#wp-link .link-search-wrapper{margin:5px 6px 9px;display:block;overflow:hidden}#wp-link .link-search-wrapper span{float:left;margin-top:6px}#wp-link .link-search-wrapper input[type="text"]{float:left;width:220px}#wp-link .link-search-wrapper img.waiting{margin:8px 1px 0 4px;float:left;display:none}#wp-link .link-target{width:auto;padding:3px 0 0;margin:0 0 0 87px;font-size:11px}#wp-link .query-results{border:1px #dfdfdf solid;margin:0 5px 5px;background:#fff;height:185px;overflow:auto;position:relative}#wp-link li,#wp-link .query-notice{clear:both;margin-bottom:0;border-bottom:1px solid #f1f1f1;color:#333;padding:4px 6px;cursor:pointer;position:relative}#wp-link li:hover{background:#eaf2fa;color:#151515}#wp-link li.unselectable{border-bottom:1px solid #dfdfdf}#wp-link li.unselectable:hover{background:#fff;cursor:auto;color:#333}#wp-link li.selected{background:#ddd;color:#333}#wp-link li.selected .item-title{font-weight:bold}#wp-link .item-title{display:inline-block;width:80%}#wp-link .item-info{text-transform:uppercase;color:#666;font-size:11px;position:absolute;right:5px;top:4px;bottom:0}#wp-link #search-results{display:none}#wp-link #search-panel{float:left;width:100%}#wp-link .river-waiting{display:none;padding:10px 0}#wp-link .river-waiting img.waiting{margin:0 auto;display:block}#wp-link .submitbox{padding:5px 10px;font-size:11px;overflow:auto;height:29px}#wp-link-cancel{line-height:25px;float:left}#wp-link-update{line-height:23px;float:right}.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{position:absolute;left:-99999999px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden}.ui-helper-clearfix{display:inline-block}/*\*/* html .ui-helper-clearfix{height:1%}.ui-helper-clearfix{display:block}/**/.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;z-index:99999;display:block}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.wp-dialog{position:absolute;width:300px;overflow:hidden}.wp-dialog .ui-dialog-titlebar{position:relative}.wp-dialog .ui-dialog-titlebar-close span{display:block;margin:1px}.wp-dialog .ui-dialog-content{position:relative;border:0;padding:0;background:0;overflow:auto;zoom:1}.wp-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin:.5em 0 0 0;padding:.3em 1em .5em .4em}.wp-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.wp-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.wp-dialog .ui-resizable-se{width:14px;height:14px;right:3px;bottom:3px}.ui-draggable .ui-dialog-titlebar{cursor:move}.wp-dialog{border:1px solid #999;-moz-box-shadow:0 0 16px rgba(0,0,0,0.3);-webkit-box-shadow:0 0 16px rgba(0,0,0,0.3);box-shadow:0 0 16px rgba(0,0,0,0.3)}.wp-dialog .ui-dialog-title{display:block;text-align:center;padding:1px 0 2px}.wp-dialog .ui-dialog-titlebar{padding:0 1em;background-color:#444;font-weight:bold;font-size:11px;line-height:18px;color:#e5e5e5}.wp-dialog{background-color:#fff;-webkit-border-top-left-radius:4px;-webkit-border-top-right-radius:4px;border-top-left-radius:4px;border-top-right-radius:4px}.wp-dialog .ui-dialog-titlebar{-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;border-top-left-radius:3px;border-top-right-radius:3px}.wp-dialog .ui-dialog-titlebar-close{position:absolute;width:29px;height:16px;top:2px;right:6px;background:url('../js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif') no-repeat -87px -16px;padding:0}.wp-dialog .ui-dialog-titlebar-close:hover,.wp-dialog .ui-dialog-titlebar-close:focus{background-position:-87px -32px}.ui-widget-overlay{background-color:#000;opacity:.6;filter:alpha(opacity=60)}.rtl #wp-link #internal-toggle{padding-right:18px;padding-left:0}.rtl #wp-link label span{text-align:left;padding-left:5px;padding-right:0}.rtl #wp-link .link-search-wrapper span{float:right}.rtl #wp-link .link-search-wrapper input[type="text"]{float:right}.rtl #wp-link .link-search-wrapper img.waiting{margin:8px 4px 0 1px;float:right}.rtl #wp-link .link-target{margin:0 87px 0 0}.rtl #wp-link .item-info{left:5px;right:auto;top:4px;bottom:0}.rtl #wp-link #search-panel{float:right}.rtl #wp-link-cancel{float:right}.rtl #wp-link-update{float:left}.rtl #wp-link .toggle-arrow{background-position:top right}.rtl #wp-link .toggle-arrow-active{background-position:center right}.rtl .wp_themeSkin .mceListBox .mceText{text-align:right}.rtl .wp_themeSkin .mceNoIcons a .mceText{padding-right:10px;padding-left:25px}.rtl .mceListBoxMenu.mceNoIcons{margin-left:-14px}.clearlooks2 .mceFocus .mceTop .mceLeft{background:#444;border-left:1px solid #999;border-top:1px solid #999;-webkit-border-top-left-radius:3px;border-top-left-radius:3px}.clearlooks2 .mceFocus .mceTop .mceRight{background:#444;border-right:1px solid #999;border-top:1px solid #999;-webkit-border-top-right-radius:3px;border-top-right-radius:3px}.clearlooks2 .mceMiddle .mceLeft{background:#f1f1f1;border-left:1px solid #999}.clearlooks2 .mceMiddle .mceRight{background:#f1f1f1;border-right:1px solid #999}.clearlooks2 .mceBottom{background:#f1f1f1;border-bottom:1px solid #999}.clearlooks2 .mceBottom .mceLeft{background:#f1f1f1;border-bottom:1px solid #999;border-left:1px solid #999}.clearlooks2 .mceBottom .mceCenter{background:#f1f1f1;border-bottom:1px solid #999}.clearlooks2 .mceBottom .mceRight{background:#f1f1f1;border-bottom:1px solid #999;border-right:1px solid #999}.clearlooks2 .mceFocus .mceTop span{color:#e5e5e5}.fullscreen-overlay{z-index:149999;display:none;position:fixed;top:0;bottom:0;left:0;right:0;filter:inherit}.fullscreen-active .fullscreen-overlay,.fullscreen-active #wp-fullscreen-body{display:block}.fullscreen-fader{z-index:200000}.fullscreen-active .fullscreen-fader{display:none}#wp-fullscreen-body{width:100%;z-index:150005;display:none;position:absolute;top:0;left:0;font-size:12px}#wp-fullscreen-wrap{margin:0 auto 50px;position:relative;padding-top:60px}#wp-fullscreen-title{font-size:1.7em;line-height:100%;outline:medium none;padding:6px 7px;width:100%;margin-bottom:30px}#wp-fullscreen-container{padding:4px 10px 50px}#wp-fullscreen-title,#wp-fullscreen-container{-webkit-border-radius:0;border-radius:0;border:1px dashed transparent;background:transparent;-moz-transition-property:border-color;-moz-transition-duration:.6s;-webkit-transition-property:border-color;-webkit-transition-duration:.6s;-o-transition-property:border-color;-o-transition-duration:.6s;transition-property:border-color;transition-duration:.6s}#wp_mce_fullscreen{width:100%;min-height:300px;border:0;background:transparent;font-family:Consolas,Monaco,monospace;line-height:1.6em;padding:0;overflow-y:hidden;outline:0;resize:none}#wp-fullscreen-tagline{color:#bbb;font-size:18px;float:right;padding-top:5px}#fullscreen-topbar{position:fixed;top:0;left:0;z-index:150050;border-bottom-style:solid;border-bottom-width:1px;min-width:800px;width:100%;height:40px}#wp-fullscreen-toolbar{padding:6px 10px 0;clear:both;max-width:1100px;min-width:820px;margin:0 auto}#wp-fullscreen-mode-bar,#wp-fullscreen-button-bar,#wp-fullscreen-close,#wp-fullscreen-count{float:left}#wp-fullscreen-save{float:right;padding:2px 2px 0 5px}#wp-fullscreen-count,#wp-fullscreen-close{padding-top:5px}#wp-fullscreen-central-toolbar{margin:auto;padding:0}#wp-fullscreen-buttons>div{float:left}#wp-fullscreen-mode-bar{padding:1px 14px 0 0}#wp-fullscreen-modes a{display:block;font-size:11px;text-decoration:none;float:left;margin:1px 0 0 0;padding:2px 6px 2px;border-width:1px 1px 1px 0;border-style:solid;border-color:#bbb;color:#777;text-shadow:0 1px 0 #fff;background-color:#f4f4f4;background-image:-moz-linear-gradient(bottom,#e4e4e4,#f9f9f9);background-image:-webkit-gradient(linear,left bottom,left top,from(#e4e4e4),to(#f9f9f9))}#wp-fullscreen-modes a:hover,.wp-html-mode #wp-fullscreen-modes a:last-child,.wp-tmce-mode #wp-fullscreen-modes a:first-child{color:#333;border-color:#999;background-color:#eee;background-image:-moz-linear-gradient(bottom,#f9f9f9,#e0e0e0);background-image:-webkit-gradient(linear,left bottom,left top,from(#f9f9f9),to(#e0e0e0))}#wp-fullscreen-modes a:first-child{border-width:1px;-webkit-border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;border-top-left-radius:3px;border-bottom-left-radius:3px}#wp-fullscreen-modes a:last-child{-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px}#wp-fullscreen-buttons .active a{background:inherit}#wp-fullscreen-buttons .hidden{display:none}#wp-fullscreen-buttons .disabled{opacity:.5}.wp-html-mode #wp-fullscreen-buttons div{display:none}.wp-html-mode #wp-fullscreen-buttons div.wp-fullscreen-both{display:block}#fullscreen-topbar.fullscreen-make-sticky{display:block!important}#wp-fullscreen-save img{vertical-align:middle}#wp-fullscreen-save img,#wp-fullscreen-save span{padding-right:4px;display:none}#wp-fullscreen-buttons .mce_image .mce_image{background-image:url('../../wp-admin/images/media-button.png?ver=20120201');background-position:3px 3px}.fullscreen-active #TB_overlay{z-index:150100}.fullscreen-active #TB_window{z-index:150102}#wp_mce_fullscreen_ifr{background:transparent}#wp_mce_fullscreen_parent #wp_mce_fullscreen_tbl tr.mceFirst{display:none}#wp-fullscreen-container .wp_themeSkin table td{vertical-align:top}.fullscreen-overlay{background:#fff}.wp-fullscreen-focus #wp-fullscreen-title,.wp-fullscreen-focus #wp-fullscreen-container{border-color:#ccc}#fullscreen-topbar{border-bottom-color:#dfdfdf;background-color:#f1f1f1;background-image:-ms-linear-gradient(top,#f9f9f9,#ececec);background-image:-moz-linear-gradient(top,#f9f9f9,#ececec);background-image:-o-linear-gradient(top,#f9f9f9,#ececec);background-image:-webkit-gradient(linear,left top,left bottom,from(#f9f9f9),to(#ececec));background-image:-webkit-linear-gradient(top,#f9f9f9,#ececec);background-image:linear-gradient(top,#f9f9f9,#ececec)}.fade-1000,.fade-600,.fade-400,.fade-300{opacity:0;-moz-transition-property:opacity;-webkit-transition-property:opacity;-o-transition-property:opacity;transition-property:opacity}.fade-1000{-moz-transition-duration:1s;-webkit-transition-duration:1s;-o-transition-duration:1s;transition-duration:1s}.fade-600{-moz-transition-duration:.6s;-webkit-transition-duration:.6s;-o-transition-duration:.6s;transition-duration:.6s}.fade-400{-moz-transition-duration:.4s;-webkit-transition-duration:.4s;-o-transition-duration:.4s;transition-duration:.4s}.fade-300{-moz-transition-duration:.3s;-webkit-transition-duration:.3s;-o-transition-duration:.3s;transition-duration:.3s}.fade-trigger{opacity:1}.rtl #wp-fullscreen-tagline{float:left}.rtl #fullscreen-topbar{left:auto;right:0}.rtl #wp-fullscreen-mode-bar,.rtl #wp-fullscreen-button-bar,.rtl #wp-fullscreen-close,.rtl #wp-fullscreen-count{float:right}.rtl #wp-fullscreen-save{float:left}.rtl #wp-fullscreen-save{padding:2px 5px 0 2px}.rtl #wp-fullscreen-buttons>div{float:right}.rtl #wp-fullscreen-mode-bar{padding:1px 0 0 14px}.rtl #wp-fullscreen-modes a{float:right;border-width:1px 0 1px 1px}.rtl #wp-fullscreen-modes a:first-child{-webkit-border-top-left-radius:0;-webkit-border-top-right-radius:3px;-webkit-border-bottom-left-radius:0;-webkit-border-bottom-right-radius:3px;border-width:1px;border-top-left-radius:0;border-top-right-radius:3px;border-bottom-right-left:0;border-bottom-right-radius:3px}.rtl #wp-fullscreen-modes a:last-child{-webkit-border-top-right-radius:0;-webkit-border-top-left-radius:3px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:3px;border-top-right-radius:0;border-top-left-radius:3px;border-bottom-right-radius:0;border-bottom-left-radius:3px}.rtl #wp-fullscreen-save img,.rtl #wp-fullscreen-save span{padding-right:0;padding-left:4px}
1
+ .wp_themeSkin table,.wp_themeSkin tbody,.wp_themeSkin a,.wp_themeSkin img,.wp_themeSkin tr,.wp_themeSkin div,.wp_themeSkin td,.wp_themeSkin iframe,.wp_themeSkin span,.wp_themeSkin *,.wp_themeSkin .mceText{border:0;margin:0;padding:0;white-space:nowrap;text-decoration:none;font-weight:normal;cursor:default;vertical-align:baseline;width:auto;border-collapse:separate}.wp_themeSkin a:hover,.wp_themeSkin a:link,.wp_themeSkin a:visited,.wp_themeSkin a:active{text-decoration:none;font-weight:normal;cursor:default}.wp_themeSkin table td{vertical-align:middle}.wp_themeSkin *,.wp_themeSkin a:hover,.wp_themeSkin a:link,.wp_themeSkin a:visited,.wp_themeSkin a:active{color:#000}.wp_themeSkin iframe{display:block}.wp_themeSkin #mce_fullscreen_ifr{background-color:#fff}.wp_themeSkin .mceToolbar{padding:1px}.wp_themeSkin .mceExternalToolbar{position:absolute;border-bottom:0;display:none}.wp_themeSkin .mceExternalToolbar td.mceToolbar{padding-right:13px}.wp_themeSkin .mceExternalClose{position:absolute;top:3px;right:3px;width:7px;height:7px;background:url("../../img/icons.gif") -820px 0}.wp_themeSkin table.mceToolbar,.wp_themeSkin tr.mceFirst .mceToolbar tr td,.wp_themeSkin tr.mceLast .mceToolbar tr td{border:0;margin:0;padding:0}.wp_themeSkin table.mceLayout{border-color: #CCCCCC #CCCCCC #DFDFDF;border-style: solid;border-top-left-radius: 3px; border-top-right-radius: 3px; border-width: 1px;}.wp_themeSkin .mceStatusbar{display:block;font-family:Arial,"Bitstream Vera Sans",Helvetica,Verdana,sans-serif;font-size:12px;line-height:16px;padding:0 0 0 8px;overflow:visible;height:20px;border-top:1px solid #dfdfdf;color:#000;background-color:#f5f5f5}.rtl .wp_themeSkin .mceStatusbar{padding:0 8px 0 0}.wp_themeSkin .mceStatusbar *{color:#555}.wp_themeSkin .mceStatusbar div{float:left;padding:2px}.rtl .wp_themeSkin .mceStatusbar div{float:right}.wp_themeSkin .mceStatusbar a.mceResize{display:block;float:right;background:url("../../img/icons.gif") -800px 0;width:20px;height:20px;cursor:se-resize}.rtl .wp_themeSkin .mceStatusbar a.mceResize{float:left}.wp_themeSkin .mceStatusbar a:hover{text-decoration:underline}.wp_themeSkin table.mceToolbar{margin:0 6px 2px}.wp_themeSkin #content_toolbar1{margin-top:2px}.wp_themeSkin .mceToolbar .mceToolbarEndListBox span{display:none}.wp_themeSkin span.mceIcon,.wp_themeSkin img.mceIcon{display:block;width:20px;height:20px}.wp_themeSkin .mceIcon{background:url("../../img/icons.gif") no-repeat 20px 20px}.wp_themeSkin .mceButton{display:block;width:20px;height:20px;cursor:default;padding:1px 2px;margin:1px;-webkit-border-radius:2px;border-radius:2px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.15),inset 0 0 2px 1px #fff;-moz-box-shadow:0 1px 0 rgba(0,0,0,0.15),inset 0 0 2px 1px #fff;box-shadow:0 1px 0 rgba(0,0,0,0.15),inset 0 0 2px 1px #fff}.wp_themeSkin a.mceButtonEnabled:hover{background-image:inherit 0 -10px}.wp_themeSkin .mceOldBoxModel a.mceButton span,.wp_themeSkin .mceOldBoxModel a.mceButton img{margin:0 0 0 1px}.wp_themeSkin a.mceButton:active,.wp_themeSkin a.mceButtonActive,.wp_themeSkin a.mceButtonActive:hover,.wp_themeSkin a.mceButtonSelected{-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.15),inset 0 0 2px 1px #fff;-moz-box-shadow:0 1px 0 rgba(0,0,0,0.15),inset 0 0 2px 1px #fff;box-shadow:0 1px 0 rgba(0,0,0,0.15),inset 0 0 2px 1px #fff}.wp_themeSkin .mceButtonDisabled .mceIcon{opacity:.5;filter:alpha(opacity=50)}.wp_themeSkin .mceSeparator{height:24px;width:1px;display:block;background:transparent;overflow:hidden;margin:0 2px}.wp_themeSkin .mceListBox,.wp_themeSkin .mceListBox a{display:block}.wp_themeSkin .mceListBox .mceText{padding:1px 2px 1px 5px;text-align:left;text-decoration:none;width:70px;-webkit-border-bottom-left-radius:2px;-webkit-border-top-left-radius:2px;border-bottom-left-radius:2px;border-top-left-radius:2px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.15),inset 0 0 2px 1px #fff;-moz-box-shadow:0 1px 0 rgba(0,0,0,0.15),inset 0 0 2px 1px #fff;box-shadow:0 1px 0 rgba(0,0,0,0.15),inset 0 0 2px 1px #fff;font-family:Arial,"Bitstream Vera Sans",Helvetica,Verdana,sans-serif;font-size:12px;height:20px;line-height:20px;overflow:hidden}.wp_themeSkin .mceListBox{margin:1px;direction:ltr}.wp_themeSkin .mceListBox .mceOpen{width:14px;height:20px;border-collapse:separate;padding:1px;-webkit-border-bottom-left-radius:0;-webkit-border-top-left-radius:0;border-bottom-left-radius:0;border-top-left-radius:0;-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.15),inset 0 0 2px 1px #fff;-moz-box-shadow:0 1px 0 rgba(0,0,0,0.15),inset 0 0 2px 1px #fff;box-shadow:0 1px 0 rgba(0,0,0,0.15),inset 0 0 2px 1px #fff}.wp_themeSkin .mceListBox .mceOpen span{display:block;width:14px;height:20px;background-image:url("./img/down_arrow.gif");background-position:2px 1px;background-repeat:no-repeat}.wp_themeSkin table.mceListBoxEnabled:hover .mceText,.wp_themeSkin .mceListBoxHover .mceText,.wp_themeSkin .mceListBoxSelected .mceText,.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen,.wp_themeSkin .mceListBoxHover .mceOpen,.wp_themeSkin .mceListBoxSelected .mceOpen{background-image:none}.wp_themeSkin .mceListBoxDisabled .mceText{color:gray}.wp_themeSkin .mceListBoxMenu{overflow:auto;overflow-x:hidden}.wp_themeSkin .mceOldBoxModel .mceListBox .mceText{height:22px}.wp_themeSkin select.mceListBox{font-family:Arial,"Bitstream Vera Sans",Helvetica,Verdana,sans-serif;font-size:12px;border-color:#b2b2b2;background-color:#fff}.wp_themeSkin .mceSplitButton a,.wp_themeSkin .mceSplitButton span{display:block;height:20px}.wp_themeSkin .mceSplitButton{display:block;margin:1px;direction:ltr}.wp_themeSkin table.mceSplitButton td{padding:2px;-webkit-border-radius:2px;border-radius:2px}.wp_themeSkin table.mceSplitButton td a{-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.15),inset 0 0 2px 1px #fff;-moz-box-shadow:0 1px 0 rgba(0,0,0,0.15),inset 0 0 2px 1px #fff;box-shadow:0 1px 0 rgba(0,0,0,0.15),inset 0 0 2px 1px #fff}.wp_themeSkin table.mceSplitButton:hover td{background-image:inherit 0 -10px}.wp_themeSkin .mceSplitButton a.mceAction{height:20px;width:20px;padding:1px 2px}.wp_themeSkin .mceSplitButton span.mceAction{background-image:url("../../img/icons.gif");background-repeat:no-repeat;background-color:transparent;width:20px}.wp_themeSkin .mceSplitButton a.mceOpen{width:10px;height:20px;background-image:url("./img/down_arrow.gif");background-position:1px 2px;background-repeat:no-repeat;padding:1px;border-left:0 none!important}.wp_themeSkin .mceSplitButton span.mceOpen{display:none}.wp_themeSkin .mceSplitButtonDisabled .mceAction{opacity:.3;filter:alpha(opacity=30)}.wp_themeSkin .mceListBox a.mceText,.wp_themeSkin .mceSplitButton a.mceAction{-webkit-border-bottom-left-radius:2px;-webkit-border-top-left-radius:2px;border-bottom-left-radius:2px;border-top-left-radius:2px}.wp_themeSkin .mceSplitButton a.mceOpen,.wp_themeSkin .mceListBox a.mceOpen{-webkit-border-bottom-right-radius:2px;-webkit-border-top-right-radius:2px;border-bottom-right-radius:2px;border-top-right-radius:2px}.wp_themeSkin span.mce_undo,.wp_themeSkin span.mce_redo,.wp_themeSkin span.mce_bullist,.wp_themeSkin span.mce_numlist,.wp_themeSkin span.mce_blockquote,.wp_themeSkin span.mce_charmap,.wp_themeSkin span.mce_bold,.wp_themeSkin span.mce_italic,.wp_themeSkin span.mce_underline,.wp_themeSkin span.mce_justifyleft,.wp_themeSkin span.mce_justifyright,.wp_themeSkin span.mce_justifycenter,.wp_themeSkin span.mce_justifyfull,.wp_themeSkin span.mce_indent,.wp_themeSkin span.mce_outdent,.wp_themeSkin span.mce_link,.wp_themeSkin span.mce_unlink,.wp_themeSkin span.mce_help,.wp_themeSkin span.mce_removeformat,.wp_themeSkin span.mce_fullscreen,.wp_themeSkin span.mce_wp_fullscreen,.wp_themeSkin span.mce_media,.wp_themeSkin span.mce_pastetext,.wp_themeSkin span.mce_pasteword,.wp_themeSkin span.mce_wp_help,.wp_themeSkin span.mce_wp_adv,.wp_themeSkin span.mce_wp_more,.wp_themeSkin span.mce_strikethrough,.wp_themeSkin span.mce_spellchecker,.wp_themeSkin span.mce_forecolor,.wp_themeSkin .mce_forecolorpicker,.wp_themeSkin .mceSplitButton .mce_spellchecker span.mce_spellchecker,.wp_themeSkin .mceSplitButton .mce_forecolor span.mce_forecolor,.wp_themeSkin .mceSplitButton span.mce_numlist,.wp_themeSkin .mceSplitButton span.mce_bullist{background-image:url(./img/wpicons.png)}.wp_themeSkin div.mceColorSplitMenu table{background-color:#ebebeb;border-color:#b2b2b2}.wp_themeSkin .mceColorSplitMenu td{padding:2px}.wp_themeSkin .mceColorSplitMenu a{display:block;width:9px;height:9px;overflow:hidden;border-color:#b2b2b2}.wp_themeSkin .mceColorSplitMenu td.mceMoreColors{padding:1px 3px 1px 1px}.wp_themeSkin .mceColorSplitMenu a.mceMoreColors{width:100%;height:auto;text-align:center;font-family:Tahoma,Verdana,Arial,Helvetica;font-size:11px;line-height:20px;border-color:#fff}.wp_themeSkin .mceColorPreview{margin:-5px 0 0 2px;width:16px;height:4px;overflow:hidden}.wp_themeSkin .mceMenu{position:absolute;left:0;top:0;z-index:1000;border-color:#ddd}.wp_themeSkin .mceNoIcons span.mceIcon{width:0}.wp_themeSkin .mceNoIcons a .mceText{padding-left:10px}.wp_themeSkin .mceMenu table{background-color:#ebeaeb}.wp_themeSkin .mceMenu a,.wp_themeSkin .mceMenu span,.wp_themeSkin .mceMenu{display:block}.wp_themeSkin .mceMenu td{height:20px;overflow:hidden}.wp_themeSkin .mceMenu a{position:relative;padding:3px 0 4px 0;text-decoration:none!important}.wp_themeSkin .mceMenu .mceText{position:relative;display:block;font-family:Tahoma,Verdana,Arial,Helvetica;cursor:default;margin:0;padding:0 25px;color:#000}.wp_themeSkin .mceMenu span.mceText,.wp_themeSkin .mceMenu .mcePreview{font-size:12px}.wp_themeSkin .mceMenu pre.mceText{font-family:Monospace}.wp_themeSkin .mceMenu .mceIcon{position:absolute;top:0;left:0;width:22px}.wp_themeSkin .mceMenu .mceMenuItemEnabled a:hover,.wp_themeSkin .mceMenu .mceMenuItemActive{background-color:#f5f5f5}.wp_themeSkin td.mceMenuItemSeparator{height:1px;background-color:#aaa}.wp_themeSkin .mceMenuItemTitle a{border-top:0;border-right:0;border-left:0;border-bottom:1px solid #aaa;text-decoration:none!important;background-color:#ccc}.wp_themeSkin .mceMenuItemTitle span.mceText{font-weight:bold;padding-left:4px;color:#000}.wp_themeSkin .mceMenuItemSelected .mceIcon{background:url("../js/tinymce/themes/advanced/skins/default/img/menu_check.gif");color:#888}.wp_themeSkin .mceNoIcons .mceMenuItemSelected a{background:url("../js/tinymce/themes/advanced/skins/default/img/menu_arrow.gif") no-repeat -6px center}.wp_themeSkin .mceMenu span.mceMenuLine{display:none}.wp_themeSkin .mceMenuItemSub a{background:url("../js/tinymce/themes/advanced/skins/default/img/menu_arrow.gif") no-repeat top right}.wp_themeSkin .mceBlocker{position:absolute;left:0;top:0;z-index:1000;opacity:.5;filter:alpha(opacity=50);background:#FFF}.wp_themeSkin .mceProgress{position:absolute;left:0;top:0;z-index:1001;background:url("../js/tinymce/themes/advanced/skins/default/img/progress.gif") no-repeat;width:32px;height:32px;margin:-16px 0 0 -16px}.wp_themeSkin .mcePlaceHolder{border:1px dotted gray}.wp_themeSkin .mce_address span.mceText{font-style:italic}.wp_themeSkin .mce_pre span.mceText{font-family:monospace}.wp_themeSkin .mce_h1 span.mceText{font-weight:bolder;font-size:17px}.wp_themeSkin .mce_h2 span.mceText{font-weight:bolder;font-size:16px}.wp_themeSkin .mce_h3 span.mceText{font-weight:bolder;font-size:15px}.wp_themeSkin .mce_h4 span.mceText{font-weight:bolder;font-size:14px}.wp_themeSkin .mce_h5 span.mceText{font-weight:bolder;font-size:13px}.wp_themeSkin .mce_h6 span.mceText{font-weight:bolder;font-size:12px}.wp_themeSkin span.mce_undo{background-position:-500px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_undo,.wp_themeSkin .mceButtonActive span.mce_undo{background-position:-500px 0}.wp_themeSkin span.mce_redo{background-position:-480px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_redo,.wp_themeSkin .mceButtonActive span.mce_redo{background-position:-480px 0}.wp_themeSkin span.mce_bullist{background-position:-40px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_bullist,.wp_themeSkin .mceButtonActive span.mce_bullist,.wp_themeSkin .mceSplitButton:hover span.mce_bullist{background-position:-40px 0}.wp_themeSkin span.mce_numlist{background-position:-61px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_numlist,.wp_themeSkin .mceButtonActive span.mce_numlist,.wp_themeSkin .mceSplitButton:hover span.mce_numlist{background-position:-61px 0}.wp_themeSkin span.mce_blockquote{background-position:-80px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_blockquote,.wp_themeSkin .mceButtonActive span.mce_blockquote{background-position:-80px 0}.wp_themeSkin span.mce_charmap{background-position:-420px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_charmap,.wp_themeSkin .mceButtonActive span.mce_charmap{background-position:-420px 0}.wp_themeSkin span.mce_bold{background-position:-1px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_bold,.wp_themeSkin .mceButtonActive span.mce_bold{background-position:-1px 0}.wp_themeSkin span.mce_italic{background-position:-21px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_italic,.wp_themeSkin .mceButtonActive span.mce_italic{background-position:-21px 0}.wp_themeSkin span.mce_underline{background-position:-280px -19px}.wp_themeSkin .mceButtonEnabled:hover span.mce_underline,.wp_themeSkin .mceButtonActive span.mce_underline{background-position:-280px 1px}.wp_themeSkin span.mce_justifyleft{background-position:-100px -19px}.wp_themeSkin .mceButtonEnabled:hover span.mce_justifyleft,.wp_themeSkin .mceButtonActive span.mce_justifyleft{background-position:-100px 1px}.wp_themeSkin span.mce_justifyright{background-position:-141px -19px}.wp_themeSkin .mceButtonEnabled:hover span.mce_justifyright,.wp_themeSkin .mceButtonActive span.mce_justifyright{background-position:-141px 1px}.wp_themeSkin span.mce_justifycenter{background-position:-120px -19px}.wp_themeSkin .mceButtonEnabled:hover span.mce_justifycenter,.wp_themeSkin .mceButtonActive span.mce_justifycenter{background-position:-120px 1px}.wp_themeSkin span.mce_justifyfull{background-position:-300px -19px}.wp_themeSkin .mceButtonEnabled:hover span.mce_justifyfull,.wp_themeSkin .mceButtonActive span.mce_justifyfull{background-position:-300px 1px}.wp_themeSkin span.mce_indent{background-position:-461px -19px}.wp_themeSkin .mceButtonEnabled:hover span.mce_indent,.wp_themeSkin .mceButtonActive span.mce_indent{background-position:-461px 1px}.wp_themeSkin span.mce_outdent{background-position:-440px -19px}.wp_themeSkin .mceButtonEnabled:hover span.mce_outdent,.wp_themeSkin .mceButtonActive span.mce_outdent{background-position:-440px 1px}.wp_themeSkin span.mce_link{background-position:-161px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_link,.wp_themeSkin .mceButtonActive span.mce_link{background-position:-161px 0}.wp_themeSkin span.mce_unlink{background-position:-180px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_unlink,.wp_themeSkin .mceButtonActive span.mce_unlink{background-position:-180px 0}.wp_themeSkin span.mce_help{background-position:-521px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_help,.wp_themeSkin .mceButtonActive span.mce_help{background-position:-521px 0}.wp_themeSkin span.mce_removeformat{background-position:-381px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_removeformat,.wp_themeSkin .mceButtonActive span.mce_removeformat{background-position:-381px 0}.wp_themeSkin span.mce_strikethrough{background-position:-540px -18px}.wp_themeSkin .mceButtonEnabled:hover span.mce_strikethrough,.wp_themeSkin .mceButtonActive span.mce_strikethrough{background-position:-540px 0}.wp_themeSkin .mceSplitButton .mce_forecolor span.mce_forecolor{background-position:-321px -22px}.wp_themeSkin .mceSplitButtonEnabled:hover span.mce_forecolor,.wp_themeSkin .mceSplitButtonActive span.mce_forecolor{background-position:-321px -2px}.wp_themeSkin .mce_forecolorpicker{background-position:-320px -20px}.wp_themeSkin span.mce_fullscreen{background-position:-240px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_fullscreen,.wp_themeSkin .mceButtonActive span.mce_fullscreen{background-position:-240px 0}.wp_themeSkin span.mce_wp_fullscreen{background-position:-240px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_wp_fullscreen,.wp_themeSkin .mceButtonActive span.mce_wp_fullscreen{background-position:-240px 0}.wp_themeSkin span.mce_media{background-position:-401px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_media,.wp_themeSkin .mceButtonActive span.mce_media{background-position:-401px 0}.wp_themeSkin span.mce_pastetext{background-position:-340px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_pastetext,.wp_themeSkin .mceButtonActive span.mce_pastetext{background-position:-340px 0}.wp_themeSkin span.mce_pasteword{background-position:-360px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_pasteword,.wp_themeSkin .mceButtonActive span.mce_pasteword{background-position:-360px 0}.wp_themeSkin span.mce_spellchecker{background-position:-220px -19px}.wp_themeSkin .mceButtonEnabled:hover span.mce_spellchecker,.wp_themeSkin .mceSplitButtonEnabled:hover span.mce_spellchecker,.wp_themeSkin .mceButtonActive span.mce_spellchecker,.wp_themeSkin .mceSplitButtonActive span.mce_spellchecker{background-position:-220px 1px}.wp_themeSkin span.mce_wp_help{background-position:-521px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_wp_help,.wp_themeSkin .mceButtonActive span.mce_wp_help{background-position:-521px 0}.wp_themeSkin span.mce_wp_adv{background-position:-260px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_wp_adv,.wp_themeSkin .mceButtonActive span.mce_wp_adv{background-position:-260px 0}.wp_themeSkin span.mce_wp_more{background-position:-201px -20px}.wp_themeSkin .mceButtonEnabled:hover span.mce_wp_more,.wp_themeSkin .mceButtonActive span.mce_wp_more{background-position:-201px 0}.wp_themeSkin span.mce_cleanup{background-position:-380px -20px}.wp_themeSkin span.mce_anchor{background-position:-200px 0}.wp_themeSkin span.mce_sub{background-position:-600px 0}.wp_themeSkin span.mce_sup{background-position:-620px 0}.wp_themeSkin span.mce_newdocument{background-position:-520px 0}.wp_themeSkin span.mce_image{background-position:-380px 0}.wp_themeSkin span.mce_code{background-position:-260px 0}.wp_themeSkin span.mce_hr{background-position:-360px 0}.wp_themeSkin span.mce_visualaid{background-position:-660px 0}.wp_themeSkin span.mce_paste{background-position:-560px 0}.wp_themeSkin span.mce_copy{background-position:-700px 0}.wp_themeSkin span.mce_cut{background-position:-680px 0}.wp_themeSkin .mce_backcolor span.mceAction{background-position:-760px 0}.wp_themeSkin .mce_backcolorpicker{background-position:-760px 0}.wp_themeSkin span.mce_advhr{background-position:-0px -20px}.wp_themeSkin span.mce_ltr{background-position:-20px -20px}.wp_themeSkin span.mce_rtl{background-position:-40px -20px}.wp_themeSkin span.mce_emotions{background-position:-60px -20px}.wp_themeSkin span.mce_fullpage{background-position:-80px -20px}.wp_themeSkin span.mce_iespell{background-position:-120px -20px}.wp_themeSkin span.mce_insertdate{background-position:-140px -20px}.wp_themeSkin span.mce_inserttime{background-position:-160px -20px}.wp_themeSkin span.mce_absolute{background-position:-180px -20px}.wp_themeSkin span.mce_backward{background-position:-200px -20px}.wp_themeSkin span.mce_forward{background-position:-220px -20px}.wp_themeSkin span.mce_insert_layer{background-position:-240px -20px}.wp_themeSkin span.mce_insertlayer{background-position:-260px -20px}.wp_themeSkin span.mce_movebackward{background-position:-280px -20px}.wp_themeSkin span.mce_moveforward{background-position:-300px -20px}.wp_themeSkin span.mce_nonbreaking{background-position:-340px -20px}.wp_themeSkin span.mce_selectall{background-position:-400px -20px}.wp_themeSkin span.mce_preview{background-position:-420px -20px}.wp_themeSkin span.mce_print{background-position:-440px -20px}.wp_themeSkin span.mce_cancel{background-position:-460px -20px}.wp_themeSkin span.mce_save{background-position:-480px -20px}.wp_themeSkin span.mce_replace{background-position:-500px -20px}.wp_themeSkin span.mce_search{background-position:-520px -20px}.wp_themeSkin span.mce_styleprops{background-position:-560px -20px}.wp_themeSkin span.mce_table{background-position:-580px -20px}.wp_themeSkin span.mce_cell_props{background-position:-600px -20px}.wp_themeSkin span.mce_delete_table{background-position:-620px -20px}.wp_themeSkin span.mce_delete_col{background-position:-640px -20px}.wp_themeSkin span.mce_delete_row{background-position:-660px -20px}.wp_themeSkin span.mce_col_after{background-position:-680px -20px}.wp_themeSkin span.mce_col_before{background-position:-700px -20px}.wp_themeSkin span.mce_row_after{background-position:-720px -20px}.wp_themeSkin span.mce_row_before{background-position:-740px -20px}.wp_themeSkin span.mce_merge_cells{background-position:-760px -20px}.wp_themeSkin span.mce_table_props{background-position:-980px -20px}.wp_themeSkin span.mce_row_props{background-position:-780px -20px}.wp_themeSkin span.mce_split_cells{background-position:-800px -20px}.wp_themeSkin span.mce_template{background-position:-820px -20px}.wp_themeSkin span.mce_visualchars{background-position:-840px -20px}.wp_themeSkin span.mce_abbr{background-position:-860px -20px}.wp_themeSkin span.mce_acronym{background-position:-880px -20px}.wp_themeSkin span.mce_attribs{background-position:-900px -20px}.wp_themeSkin span.mce_cite{background-position:-920px -20px}.wp_themeSkin span.mce_del{background-position:-940px -20px}.wp_themeSkin span.mce_ins{background-position:-960px -20px}.wp_themeSkin span.mce_pagebreak{background-position:0 -40px}.wp_themeSkin .mceExternalToolbar,.wp_themeSkin .mceButton,.wp_themeSkin a.mceButtonEnabled:hover,.wp_themeSkin a.mceButtonActive,.wp_themeSkin a.mceButtonSelected,.wp_themeSkin .mceListBox .mceText,.wp_themeSkin .mceListBox .mceOpen,.wp_themeSkin table.mceListBoxEnabled:hover .mceText,.wp_themeSkin .mceListBoxHover .mceText,.wp_themeSkin .mceListBoxSelected .mceText,.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen,.wp_themeSkin .mceListBoxHover .mceOpen,.wp_themeSkin .mceListBoxSelected .mceOpen,.wp_themeSkin select.mceListBox,.wp_themeSkin .mceSplitButton a.mceAction,.wp_themeSkin .mceSplitButton a.mceOpen,.wp_themeSkin .mceSplitButton a.mceOpen:hover,.wp_themeSkin .mceSplitButtonSelected a.mceOpen,.wp_themeSkin table.mceSplitButtonEnabled:hover a.mceAction,.wp_themeSkin .mceSplitButton a.mceAction:hover,.wp_themeSkin div.mceColorSplitMenu table,.wp_themeSkin .mceColorSplitMenu a,.wp_themeSkin .mceColorSplitMenu a.mceMoreColors,.wp_themeSkin .mceColorSplitMenu a.mceMoreColors:hover,.wp_themeSkin a.mceMoreColors:hover,.wp_themeSkin .mceMenu{border-style:solid;border-width:1px}.wp_themeSkin iframe{background:transparent}.wp_themeSkin .mceButton,.wp_themeSkin .mceListBox .mceText,.wp_themeSkin .mceListBox .mceOpen{border-color:#ccc;background-color:#eee;background-image:-ms-linear-gradient(bottom,#ddd,#fff);background-image:-moz-linear-gradient(bottom,#ddd,#fff);background-image:-o-linear-gradient(bottom,#ddd,#fff);background-image:-webkit-gradient(linear,left bottom,left top,from(#ddd),to(#fff));background-image:-webkit-linear-gradient(bottom,#ddd,#fff);background-image:linear-gradient(bottom,#ddd,#fff)}.wp_themeSkin a.mceButtonEnabled:hover{border-color:#a0a0a0;background:#ddd;background-image:-ms-linear-gradient(bottom,#ccc,#fff);background-image:-moz-linear-gradient(bottom,#ccc,#fff);background-image:-o-linear-gradient(bottom,#ccc,#fff);background-image:-webkit-gradient(linear,left bottom,left top,from(#ccc),to(#fff));background-image:-webkit-linear-gradient(bottom,#ccc,#fff);background-image:linear-gradient(bottom,#ccc,#fff)}.wp_themeSkin a.mceButton:active,.wp_themeSkin a.mceButtonEnabled:active,.wp_themeSkin a.mceButtonSelected:active,.wp_themeSkin a.mceButtonActive,.wp_themeSkin a.mceButtonActive:active,.wp_themeSkin a.mceButtonActive:hover{background-color:#ddd;background-image:-ms-linear-gradient(bottom,#eee,#bbb);background-image:-moz-linear-gradient(bottom,#eee,#bbb);background-image:-o-linear-gradient(bottom,#eee,#bbb);background-image:-webkit-gradient(linear,left bottom,left top,from(#eee),to(#bbb));background-image:-webkit-linear-gradient(bottom,#eee,#bbb);background-image:linear-gradient(bottom,#eee,#bbb);border-color:#909090}.wp_themeSkin .mceButtonDisabled{border-color:#ccc!important}.wp_themeSkin .mceListBox .mceOpen{border-left:0!important}.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen,.wp_themeSkin .mceListBoxHover .mceOpen,.wp_themeSkin .mceListBoxHover:active .mceOpen,.wp_themeSkin .mceListBoxSelected .mceOpen,.wp_themeSkin .mceListBoxSelected .mceText,.wp_themeSkin table.mceListBoxEnabled:active .mceText{background:#ccc;border-color:#999}.wp_themeSkin table.mceListBoxEnabled:hover .mceText,.wp_themeSkin .mceListBoxHover .mceText,.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen,.wp_themeSkin .mceListBoxHover .mceOpen{border-color:#909090;background-color:#eee;background-image:-ms-linear-gradient(bottom,#ccc,#fff);background-image:-moz-linear-gradient(bottom,#ccc,#fff);background-image:-o-linear-gradient(bottom,#ccc,#fff);background-image:-webkit-gradient(linear,left bottom,left top,from(#ccc),to(#fff));background-image:-webkit-linear-gradient(bottom,#ccc,#fff);background-image:linear-gradient(bottom,#ccc,#fff)}.wp_themeSkin .mceSplitButton a.mceAction,.wp_themeSkin .mceSplitButton a.mceOpen{border-color:#ccc}.wp_themeSkin .mceSplitButton a.mceOpen:hover,.wp_themeSkin .mceSplitButtonSelected a.mceOpen,.wp_themeSkin table.mceSplitButtonEnabled:hover a.mceAction,.wp_themeSkin .mceSplitButton a.mceAction:hover{border-color:#909090}.wp_themeSkin table.mceSplitButton td{background-color:#eee;background-image:-ms-linear-gradient(bottom,#ddd,#fff);background-image:-moz-linear-gradient(bottom,#ddd,#fff);background-image:-o-linear-gradient(bottom,#ddd,#fff);background-image:-webkit-gradient(linear,left bottom,left top,from(#ddd),to(#fff));background-image:-webkit-linear-gradient(bottom,#ddd,#fff);background-image:linear-gradient(bottom,#ddd,#fff)}.wp_themeSkin table.mceSplitButton:hover td{background-image:-ms-linear-gradient(bottom,#ccc,#fff);background-image:-moz-linear-gradient(bottom,#ccc,#fff);background-image:-o-linear-gradient(bottom,#ccc,#fff);background-image:-webkit-gradient(linear,left bottom,left top,from(#ccc),to(#fff));background-image:-webkit-linear-gradient(bottom,#ccc,#fff);background-image:linear-gradient(bottom,#ccc,#fff)}.wp_themeSkin .mceSplitButtonActive{background-color:#b2b2b2}.wp_themeSkin .mceColorSplitMenu a.mceMoreColors:hover{border-color:#0a246a;background-color:#b6bdd2}.wp_themeSkin a.mceMoreColors:hover{border-color:#0a246a}.wp_themeSkin .mceMenuItemDisabled .mceText{color:#888}#mceModalBlocker{background:#000}.wp-editor-area{font-family:Consolas,Monaco,monospace;padding:10px;line-height:150%;border:0 none;outline:0;resize:vertical;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.wp-editor-tools{height:30px;padding:0 10px}.wp-editor-container{border-width:1px;border-style:solid;-webkit-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;border-top-right-radius:3px;border-top-left-radius:3px;border-color:#ccc #ccc #dfdfdf}.wp-editor-container textarea.wp-editor-area{width:99.9%}.quicktags-toolbar,.wp_themeSkin tr.mceFirst td.mceToolbar{border-bottom:1px solid #ccc;background-color:#e9e9e9;background-image:-ms-linear-gradient(bottom,#ddd,#e9e9e9);background-image:-moz-linear-gradient(bottom,#ddd,#e9e9e9);background-image:-o-linear-gradient(bottom,#ddd,#e9e9e9);background-image:-webkit-linear-gradient(bottom,#ddd,#e9e9e9);background-image:linear-gradient(bottom,#ddd,#e9e9e9)}.wp-switch-editor{height:18px;font:13px/18px Arial,Helvetica,sans-serif normal;margin:5px 5px 0 0;padding:4px 5px 2px;float:right;cursor:pointer;border-width:1px;border-style:solid;-webkit-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;border-top-right-radius:3px;border-top-left-radius:3px;background-color:#f1f1f1;border-color:#dfdfdf #dfdfdf #ccc;color:#999}html[dir="rtl"] .wp-switch-editor{float:left}.wp-switch-editor:hover{text-decoration:none!important}.js .tmce-active .wp-editor-area{color:white}.tmce-active .quicktags-toolbar{display:none}.tmce-active .switch-tmce,.html-active .switch-html{border-color:#ccc #ccc #e9e9e9;background-color:#e9e9e9;color:#333}.wp-media-buttons{line-height:1;padding:9px 0 0}.wp-media-buttons a{text-decoration:none;color:#333;font-size:12px;vertical-align:bottom}.wp-media-buttons img{padding:0 4px;vertical-align:middle}.quicktags-toolbar{border-bottom-style:solid;border-bottom-width:1px;-webkit-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;border-top-right-radius:3px;border-top-left-radius:3px;padding:2px 8px 0;min-height:29px}.quicktags-toolbar>div{padding:2px 4px 0}.quicktags-toolbar input{margin:2px 1px 4px;line-height:18px;display:inline-block;min-width:26px;padding:2px 4px;font:12px/18px Arial,Helvetica,sans-serif normal;color:#464646;border:1px solid #c3c3c3;-webkit-border-radius:3px;border-radius:3px;background-color:#eee;background-image:-ms-linear-gradient(bottom,#e3e3e3,#fff);background-image:-moz-linear-gradient(bottom,#e3e3e3,#fff);background-image:-o-linear-gradient(bottom,#e3e3e3,#fff);background-image:-webkit-linear-gradient(bottom,#e3e3e3,#fff);background-image:linear-gradient(bottom,#e3e3e3,#fff)}.quicktags-toolbar input:hover{border-color:#aaa;background:#ddd}.quicktags-toolbar input[value="link"]{text-decoration:underline}.quicktags-toolbar input[value="del"]{text-decoration:line-through}.quicktags-toolbar input[value="i"]{font-style:italic}.quicktags-toolbar input[value="b"]{font-weight:bold}#wp_editbtns,#wp_gallerybtns{padding:2px;position:absolute;display:none;z-index:999998}#wp_editimgbtn,#wp_delimgbtn,#wp_editgallery,#wp_delgallery{border-color:#999;background-color:#eee;margin:2px;padding:2px;border-width:1px;border-style:solid;-webkit-border-radius:3px;border-radius:3px}#wp_editimgbtn:hover,#wp_delimgbtn:hover,#wp_editgallery:hover,#wp_delgallery:hover{border-color:#555;background-color:#ccc}#wp-link{background-color:#f5f5f5;line-height:1.4em;font-size:12px}#wp-link ol,#wp-link ul{list-style:none;margin:0;padding:0}#wp-link input[type="text"]{-webkit-box-sizing:border-box}#wp-link input[type="text"],#wp-link textarea{border-width:1px;border-style:solid;-webkit-border-radius:4px;border-radius:4px;font-size:12px;margin:1px;padding:3px}#wp-link #link-options{padding:10px 0 14px;border-bottom:1px solid #dfdfdf;margin:0 6px 14px}#wp-link p.howto{margin:3px}#wp-link #internal-toggle{display:inline-block;cursor:pointer;padding-left:18px}#wp-link .toggle-arrow{background:transparent url('../images/toggle-arrow.png') top left no-repeat;height:23px;line-height:23px}#wp-link .toggle-arrow-active{background-position:center left}#wp-link label input[type="text"]{width:360px;margin-top:5px}#wp-link label span{display:inline-block;width:80px;text-align:right;padding-right:5px}#wp-link .link-search-wrapper{margin:5px 6px 9px;display:block;overflow:hidden}#wp-link .link-search-wrapper span{float:left;margin-top:6px}#wp-link .link-search-wrapper input[type="text"]{float:left;width:220px}#wp-link .link-search-wrapper img.waiting{margin:8px 1px 0 4px;float:left;display:none}#wp-link .link-target{width:auto;padding:3px 0 0;margin:0 0 0 87px;font-size:11px}#wp-link .query-results{border:1px #dfdfdf solid;margin:0 5px 5px;background:#fff;height:185px;overflow:auto;position:relative}#wp-link li,#wp-link .query-notice{clear:both;margin-bottom:0;border-bottom:1px solid #f1f1f1;color:#333;padding:4px 6px;cursor:pointer;position:relative}#wp-link li:hover{background:#eaf2fa;color:#151515}#wp-link li.unselectable{border-bottom:1px solid #dfdfdf}#wp-link li.unselectable:hover{background:#fff;cursor:auto;color:#333}#wp-link li.selected{background:#ddd;color:#333}#wp-link li.selected .item-title{font-weight:bold}#wp-link .item-title{display:inline-block;width:80%}#wp-link .item-info{text-transform:uppercase;color:#666;font-size:11px;position:absolute;right:5px;top:4px;bottom:0}#wp-link #search-results{display:none}#wp-link #search-panel{float:left;width:100%}#wp-link .river-waiting{display:none;padding:10px 0}#wp-link .river-waiting img.waiting{margin:0 auto;display:block}#wp-link .submitbox{padding:5px 10px;font-size:11px;overflow:auto;height:29px}#wp-link-cancel{line-height:25px;float:left}#wp-link-update{line-height:23px;float:right}.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{position:absolute;left:-99999999px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden}.ui-helper-clearfix{display:inline-block}/*\*/* html .ui-helper-clearfix{height:1%}.ui-helper-clearfix{display:block}/**/.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;z-index:99999;display:block}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.wp-dialog{position:absolute;width:300px;overflow:hidden}.wp-dialog .ui-dialog-titlebar{position:relative}.wp-dialog .ui-dialog-titlebar-close span{display:block;margin:1px}.wp-dialog .ui-dialog-content{position:relative;border:0;padding:0;background:0;overflow:auto;zoom:1}.wp-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin:.5em 0 0 0;padding:.3em 1em .5em .4em}.wp-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.wp-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.wp-dialog .ui-resizable-se{width:14px;height:14px;right:3px;bottom:3px}.ui-draggable .ui-dialog-titlebar{cursor:move}.wp-dialog{border:1px solid #999;-moz-box-shadow:0 0 16px rgba(0,0,0,0.3);-webkit-box-shadow:0 0 16px rgba(0,0,0,0.3);box-shadow:0 0 16px rgba(0,0,0,0.3)}.wp-dialog .ui-dialog-title{display:block;text-align:center;padding:1px 0 2px}.wp-dialog .ui-dialog-titlebar{padding:0 1em;background-color:#444;font-weight:bold;font-size:11px;line-height:18px;color:#e5e5e5}.wp-dialog{background-color:#fff;-webkit-border-top-left-radius:4px;-webkit-border-top-right-radius:4px;border-top-left-radius:4px;border-top-right-radius:4px}.wp-dialog .ui-dialog-titlebar{-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;border-top-left-radius:3px;border-top-right-radius:3px}.wp-dialog .ui-dialog-titlebar-close{position:absolute;width:29px;height:16px;top:2px;right:6px;background:url('../js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif') no-repeat -87px -16px;padding:0}.wp-dialog .ui-dialog-titlebar-close:hover,.wp-dialog .ui-dialog-titlebar-close:focus{background-position:-87px -32px}.ui-widget-overlay{background-color:#000;opacity:.6;filter:alpha(opacity=60)}.rtl #wp-link #internal-toggle{padding-right:18px;padding-left:0}.rtl #wp-link label span{text-align:left;padding-left:5px;padding-right:0}.rtl #wp-link .link-search-wrapper span{float:right}.rtl #wp-link .link-search-wrapper input[type="text"]{float:right}.rtl #wp-link .link-search-wrapper img.waiting{margin:8px 4px 0 1px;float:right}.rtl #wp-link .link-target{margin:0 87px 0 0}.rtl #wp-link .item-info{left:5px;right:auto;top:4px;bottom:0}.rtl #wp-link #search-panel{float:right}.rtl #wp-link-cancel{float:right}.rtl #wp-link-update{float:left}.rtl #wp-link .toggle-arrow{background-position:top right}.rtl #wp-link .toggle-arrow-active{background-position:center right}.rtl .wp_themeSkin .mceListBox .mceText{text-align:right}.rtl .wp_themeSkin .mceNoIcons a .mceText{padding-right:10px;padding-left:25px}.rtl .mceListBoxMenu.mceNoIcons{margin-left:-14px}.clearlooks2 .mceFocus .mceTop .mceLeft{background:#444;border-left:1px solid #999;border-top:1px solid #999;-webkit-border-top-left-radius:3px;border-top-left-radius:3px}.clearlooks2 .mceFocus .mceTop .mceRight{background:#444;border-right:1px solid #999;border-top:1px solid #999;-webkit-border-top-right-radius:3px;border-top-right-radius:3px}.clearlooks2 .mceMiddle .mceLeft{background:#f1f1f1;border-left:1px solid #999}.clearlooks2 .mceMiddle .mceRight{background:#f1f1f1;border-right:1px solid #999}.clearlooks2 .mceBottom{background:#f1f1f1;border-bottom:1px solid #999}.clearlooks2 .mceBottom .mceLeft{background:#f1f1f1;border-bottom:1px solid #999;border-left:1px solid #999}.clearlooks2 .mceBottom .mceCenter{background:#f1f1f1;border-bottom:1px solid #999}.clearlooks2 .mceBottom .mceRight{background:#f1f1f1;border-bottom:1px solid #999;border-right:1px solid #999}.clearlooks2 .mceFocus .mceTop span{color:#e5e5e5}.fullscreen-overlay{z-index:149999;display:none;position:fixed;top:0;bottom:0;left:0;right:0;filter:inherit}.fullscreen-active .fullscreen-overlay,.fullscreen-active #wp-fullscreen-body{display:block}.fullscreen-fader{z-index:200000}.fullscreen-active .fullscreen-fader{display:none}#wp-fullscreen-body{width:100%;z-index:150005;display:none;position:absolute;top:0;left:0;font-size:12px}#wp-fullscreen-wrap{margin:0 auto 50px;position:relative;padding-top:60px}#wp-fullscreen-title{font-size:1.7em;line-height:100%;outline:medium none;padding:6px 7px;width:100%;margin-bottom:30px}#wp-fullscreen-container{padding:4px 10px 50px}#wp-fullscreen-title,#wp-fullscreen-container{-webkit-border-radius:0;border-radius:0;border:1px dashed transparent;background:transparent;-moz-transition-property:border-color;-moz-transition-duration:.6s;-webkit-transition-property:border-color;-webkit-transition-duration:.6s;-o-transition-property:border-color;-o-transition-duration:.6s;transition-property:border-color;transition-duration:.6s}#wp_mce_fullscreen{width:100%;min-height:300px;border:0;background:transparent;font-family:Consolas,Monaco,monospace;line-height:1.6em;padding:0;overflow-y:hidden;outline:0;resize:none}#wp-fullscreen-tagline{color:#bbb;font-size:18px;float:right;padding-top:5px}#fullscreen-topbar{position:fixed;top:0;left:0;z-index:150050;border-bottom-style:solid;border-bottom-width:1px;min-width:800px;width:100%;height:40px}#wp-fullscreen-toolbar{padding:6px 10px 0;clear:both;max-width:1100px;min-width:820px;margin:0 auto}#wp-fullscreen-mode-bar,#wp-fullscreen-button-bar,#wp-fullscreen-close,#wp-fullscreen-count{float:left}#wp-fullscreen-save{float:right;padding:2px 2px 0 5px}#wp-fullscreen-count,#wp-fullscreen-close{padding-top:5px}#wp-fullscreen-central-toolbar{margin:auto;padding:0}#wp-fullscreen-buttons>div{float:left}#wp-fullscreen-mode-bar{padding:1px 14px 0 0}#wp-fullscreen-modes a{display:block;font-size:11px;text-decoration:none;float:left;margin:1px 0 0 0;padding:2px 6px 2px;border-width:1px 1px 1px 0;border-style:solid;border-color:#bbb;color:#777;text-shadow:0 1px 0 #fff;background-color:#f4f4f4;background-image:-moz-linear-gradient(bottom,#e4e4e4,#f9f9f9);background-image:-webkit-gradient(linear,left bottom,left top,from(#e4e4e4),to(#f9f9f9))}#wp-fullscreen-modes a:hover,.wp-html-mode #wp-fullscreen-modes a:last-child,.wp-tmce-mode #wp-fullscreen-modes a:first-child{color:#333;border-color:#999;background-color:#eee;background-image:-moz-linear-gradient(bottom,#f9f9f9,#e0e0e0);background-image:-webkit-gradient(linear,left bottom,left top,from(#f9f9f9),to(#e0e0e0))}#wp-fullscreen-modes a:first-child{border-width:1px;-webkit-border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;border-top-left-radius:3px;border-bottom-left-radius:3px}#wp-fullscreen-modes a:last-child{-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px}#wp-fullscreen-buttons .active a{background:inherit}#wp-fullscreen-buttons .hidden{display:none}#wp-fullscreen-buttons .disabled{opacity:.5}.wp-html-mode #wp-fullscreen-buttons div{display:none}.wp-html-mode #wp-fullscreen-buttons div.wp-fullscreen-both{display:block}#fullscreen-topbar.fullscreen-make-sticky{display:block!important}#wp-fullscreen-save img{vertical-align:middle}#wp-fullscreen-save img,#wp-fullscreen-save span{padding-right:4px;display:none}#wp-fullscreen-buttons .mce_image .mce_image{background-image:url('../../wp-admin/images/media-button.png?ver=20120201');background-position:3px 3px}.fullscreen-active #TB_overlay{z-index:150100}.fullscreen-active #TB_window{z-index:150102}#wp_mce_fullscreen_ifr{background:transparent}#wp_mce_fullscreen_parent #wp_mce_fullscreen_tbl tr.mceFirst{display:none}#wp-fullscreen-container .wp_themeSkin table td{vertical-align:top}.fullscreen-overlay{background:#fff}.wp-fullscreen-focus #wp-fullscreen-title,.wp-fullscreen-focus #wp-fullscreen-container{border-color:#ccc}#fullscreen-topbar{border-bottom-color:#dfdfdf;background-color:#f1f1f1;background-image:-ms-linear-gradient(top,#f9f9f9,#ececec);background-image:-moz-linear-gradient(top,#f9f9f9,#ececec);background-image:-o-linear-gradient(top,#f9f9f9,#ececec);background-image:-webkit-gradient(linear,left top,left bottom,from(#f9f9f9),to(#ececec));background-image:-webkit-linear-gradient(top,#f9f9f9,#ececec);background-image:linear-gradient(top,#f9f9f9,#ececec)}.fade-1000,.fade-600,.fade-400,.fade-300{opacity:0;-moz-transition-property:opacity;-webkit-transition-property:opacity;-o-transition-property:opacity;transition-property:opacity}.fade-1000{-moz-transition-duration:1s;-webkit-transition-duration:1s;-o-transition-duration:1s;transition-duration:1s}.fade-600{-moz-transition-duration:.6s;-webkit-transition-duration:.6s;-o-transition-duration:.6s;transition-duration:.6s}.fade-400{-moz-transition-duration:.4s;-webkit-transition-duration:.4s;-o-transition-duration:.4s;transition-duration:.4s}.fade-300{-moz-transition-duration:.3s;-webkit-transition-duration:.3s;-o-transition-duration:.3s;transition-duration:.3s}.fade-trigger{opacity:1}.rtl #wp-fullscreen-tagline{float:left}.rtl #fullscreen-topbar{left:auto;right:0}.rtl #wp-fullscreen-mode-bar,.rtl #wp-fullscreen-button-bar,.rtl #wp-fullscreen-close,.rtl #wp-fullscreen-count{float:right}.rtl #wp-fullscreen-save{float:left}.rtl #wp-fullscreen-save{padding:2px 5px 0 2px}.rtl #wp-fullscreen-buttons>div{float:right}.rtl #wp-fullscreen-mode-bar{padding:1px 0 0 14px}.rtl #wp-fullscreen-modes a{float:right;border-width:1px 0 1px 1px}.rtl #wp-fullscreen-modes a:first-child{-webkit-border-top-left-radius:0;-webkit-border-top-right-radius:3px;-webkit-border-bottom-left-radius:0;-webkit-border-bottom-right-radius:3px;border-width:1px;border-top-left-radius:0;border-top-right-radius:3px;border-bottom-right-left:0;border-bottom-right-radius:3px}.rtl #wp-fullscreen-modes a:last-child{-webkit-border-top-right-radius:0;-webkit-border-top-left-radius:3px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:3px;border-top-right-radius:0;border-top-left-radius:3px;border-bottom-right-radius:0;border-bottom-left-radius:3px}.rtl #wp-fullscreen-save img,.rtl #wp-fullscreen-save span{padding-right:0;padding-left:4px}
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/source_editor.htm CHANGED
@@ -1,25 +1,25 @@
1
- <html xmlns="http://www.w3.org/1999/xhtml">
2
- <head>
3
- <title>{#advanced_dlg.code_title}</title>
4
- <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
5
- <script type="text/javascript" src="js/source_editor.js"></script>
6
- </head>
7
- <body onresize="resizeInputs();" style="display:none; overflow:hidden;" spellcheck="false">
8
- <form name="source" onsubmit="saveContent();return false;" action="#">
9
- <div style="float: left" class="title"><label for="htmlSource">{#advanced_dlg.code_title}</label></div>
10
-
11
- <div id="wrapline" style="float: right">
12
- <input type="checkbox" name="wraped" id="wraped" onclick="toggleWordWrap(this);" class="wordWrapCode" /><label for="wraped">{#advanced_dlg.code_wordwrap}</label>
13
- </div>
14
-
15
- <br style="clear: both" />
16
-
17
- <textarea name="htmlSource" id="htmlSource" rows="15" cols="100" style="width: 100%; height: 100%; font-family: 'Courier New',Courier,monospace; font-size: 12px;" dir="ltr" wrap="off" class="mceFocus"></textarea>
18
-
19
- <div class="mceActionPanel">
20
- <input type="submit" role="button" name="insert" value="{#update}" id="insert" />
21
- <input type="button" role="button" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" id="cancel" />
22
- </div>
23
- </form>
24
- </body>
25
- </html>
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <title>{#advanced_dlg.code_title}</title>
4
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
5
+ <script type="text/javascript" src="js/source_editor.js"></script>
6
+ </head>
7
+ <body onresize="resizeInputs();" style="display:none; overflow:hidden;" spellcheck="false">
8
+ <form name="source" onsubmit="saveContent();return false;" action="#">
9
+ <div style="float: left" class="title"><label for="htmlSource">{#advanced_dlg.code_title}</label></div>
10
+
11
+ <div id="wrapline" style="float: right">
12
+ <input type="checkbox" name="wraped" id="wraped" onclick="toggleWordWrap(this);" class="wordWrapCode" /><label for="wraped">{#advanced_dlg.code_wordwrap}</label>
13
+ </div>
14
+
15
+ <br style="clear: both" />
16
+
17
+ <textarea name="htmlSource" id="htmlSource" rows="15" cols="100" style="width: 100%; height: 100%; font-family: 'Courier New',Courier,monospace; font-size: 12px;" dir="ltr" wrap="off" class="mceFocus"></textarea>
18
+
19
+ <div class="mceActionPanel">
20
+ <input type="submit" role="button" name="insert" value="{#update}" id="insert" />
21
+ <input type="button" role="button" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" id="cancel" />
22
+ </div>
23
+ </form>
24
+ </body>
25
+ </html>
wordpress-creation-kit-api/assets/js/tiny_mce/tiny_mce_popup.js CHANGED
@@ -1,5 +1,5 @@
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(){var a=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){document.attachEvent("onmouseup",tinyMCEPopup._restoreSelection);b.dom.add(b.dom.select("head")[0],"base",{target:"_self"})}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();
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(){var a=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){document.attachEvent("onmouseup",tinyMCEPopup._restoreSelection);b.dom.add(b.dom.select("head")[0],"base",{target:"_self"})}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();
wordpress-creation-kit-api/assets/js/tiny_mce/utils/editable_selects.js CHANGED
@@ -1,70 +1,70 @@
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
- };
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
+ };
wordpress-creation-kit-api/assets/js/tiny_mce/utils/form_utils.js CHANGED
@@ -1,210 +1,210 @@
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
- }
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
+ }
wordpress-creation-kit-api/assets/js/tiny_mce/utils/mctabs.js CHANGED
@@ -1,162 +1,162 @@
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
  });
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
  });
wordpress-creation-kit-api/assets/js/tiny_mce/utils/validate.js CHANGED
@@ -1,252 +1,252 @@
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
- };
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
+ };
wordpress-creation-kit-api/assets/js/tiny_mce/wck_tiny_mce_init.js CHANGED
@@ -6,6 +6,7 @@ function wckInitTinyMCE( element ){
6
  editor_selector : element,
7
  add_form_submit_trigger : false,
8
  width: "100%",
 
9
 
10
  // Theme options
11
  theme_advanced_buttons1:"bold,italic,strikethrough,|,bullist,numlist,blockquote,|,justifyleft,justifycenter,justifyright,|,link,unlink",
6
  editor_selector : element,
7
  add_form_submit_trigger : false,
8
  width: "100%",
9
+ convert_urls: false,
10
 
11
  // Theme options
12
  theme_advanced_buttons1:"bold,italic,strikethrough,|,bullist,numlist,blockquote,|,justifyleft,justifycenter,justifyright,|,link,unlink",
wordpress-creation-kit-api/fields/checkbox.php CHANGED
@@ -5,7 +5,7 @@
5
  * @param string $context Context where the function is used. Depending on it some actions are preformed.;
6
  * @return string $element input element html string. */
7
 
8
- if( !empty( $details['options'] ) ){
9
  $element .= '<div class="wck-checkboxes">';
10
  foreach( $details['options'] as $option ){
11
  $found = false;
5
  * @param string $context Context where the function is used. Depending on it some actions are preformed.;
6
  * @return string $element input element html string. */
7
 
8
+ if( !empty( $details['options'] ) ){
9
  $element .= '<div class="wck-checkboxes">';
10
  foreach( $details['options'] as $option ){
11
  $found = false;
wordpress-creation-kit-api/fields/upload.js ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function(){
2
+
3
+ if( typeof wp != "undefined" ){
4
+
5
+ // Uploading files
6
+ var wp_media_post_id = wp.media.model.settings.post.id; // Store the old id
7
+ var set_to_post_id = wckUpload.postID; // Set this
8
+
9
+ jQuery('.wck_upload_button').live('click', function( event ){
10
+ event.preventDefault();
11
+
12
+ var file_frame;
13
+ var uploadInputId = jQuery( this ).data( 'upload_input' );
14
+ var uploadInFront = jQuery( this ).data( 'upload_in_backend' );
15
+ var uploadButton = jQuery( this );
16
+
17
+ /* set default tab to upload file */
18
+ wp.media.controller.Library.prototype.defaults.contentUserSetting = false;
19
+ if( uploadInFront != true )
20
+ wp.media.controller.Library.prototype.defaults.router = false;
21
+ wp.media.controller.Library.prototype.defaults.searchable = false;
22
+ wp.media.controller.Library.prototype.defaults.sortable = false;
23
+
24
+ // If the media frame already exists, reopen it.
25
+ if ( file_frame ) {
26
+ // Set the post ID to what we want
27
+ file_frame.uploader.uploader.param( 'post_id', set_to_post_id );
28
+ // Open frame
29
+ file_frame.open();
30
+ return;
31
+ } else {
32
+ // Set the wp.media post id so the uploader grabs the ID we want when initialised
33
+ wp.media.model.settings.post.id = set_to_post_id;
34
+ }
35
+
36
+ // Create the media frame.
37
+ file_frame = wp.media.frames.file_frame = wp.media({
38
+ title: jQuery( this ).data( 'uploader_title' ),
39
+ button: {
40
+ text: jQuery( this ).data( 'uploader_button_text' ),
41
+ },
42
+ multiple: jQuery( this ).data( 'multiple_upload' ) // Set to true to allow multiple files to be selected
43
+ });
44
+
45
+ /* restrict allowed file types if we have to */
46
+ allowedTypes = jQuery( this ).data( 'allowed_types' );
47
+ if( allowedTypes != undefined )
48
+ file_frame.uploader.options.uploader['params']['allowed_type'] = allowedTypes;
49
+
50
+ // When an image is selected, run a callback.
51
+ file_frame.on( 'select', function() {
52
+ // We set multiple to false so only get one image from the uploader
53
+ attachments = file_frame.state().get('selection').toJSON();
54
+ var attids = [];
55
+
56
+ for( var i=0;i < attachments.length; i++ ){
57
+ // Do something with attachment.id and/or attachment.url here
58
+ attids.push( attachments[i].id );
59
+ result = '<div class="upload-field-details" id="'+ uploadInputId +'_info_container" data-attachment_id="'+ attachments[i].id +'">';
60
+ console.log(attachments);
61
+ if( attachments[i].sizes != undefined ){
62
+ if( attachments[i].sizes.thumbnail != undefined )
63
+ thumb = attachments[i].sizes.thumbnail;
64
+ else
65
+ thumb = attachments[i].sizes.full;
66
+ thumbnailUrl = thumb.url;
67
+ }
68
+ else{
69
+ thumbnailUrl = attachments[i].icon;
70
+ }
71
+ result += '<div class="file-thumb"><img width="80" height="80" src="'+ thumbnailUrl +'"/></div>';
72
+ result += '<p><span class="file-name">'+attachments[i].filename+'</span><span class="file-type">'+attachments[i].mime +'</span><span class="wck-remove-upload">Remove</span></p></div>';
73
+
74
+ /* if multiple upload false remove previous upload details */
75
+ if( uploadButton.data( 'multiple_upload' ) == false ){
76
+ jQuery( '.upload-field-details', uploadButton.parent() ).remove();
77
+ }
78
+
79
+ uploadButton.before( result );
80
+
81
+ }
82
+ /* turn into comma separated string */
83
+ attids = attids.join(',');
84
+ jQuery( 'input[id="'+uploadInputId+'"]', uploadButton.parent() ).val( attids );
85
+
86
+ // Restore the main post ID
87
+ wp.media.model.settings.post.id = wp_media_post_id;
88
+ });
89
+
90
+ // Finally, open the modal
91
+ file_frame.open();
92
+ // remove tabs from the top ( this is done higher in the code when setting router to false )
93
+ //jQuery('.media-frame-router').remove();
94
+
95
+ if( jQuery( this ).data( 'uploader_logged_in' ) == undefined ){
96
+ jQuery('.media-frame-title').append('<style type="text/css">label.setting{display:none !important;}</style>');
97
+ }
98
+ });
99
+
100
+ // Restore the main ID when the add media button is pressed
101
+ jQuery('a.add_media').on('click', function() {
102
+ wp.media.model.settings.post.id = wp_media_post_id;
103
+ });
104
+
105
+ jQuery('.wck-remove-upload').live('click', function(e){
106
+ /* update hidden input */
107
+ removedAttachement = jQuery(this).parent().parent('.upload-field-details').data('attachment_id');
108
+ upload_input = jQuery(this).parent().parent().parent().children('input[type="hidden"]');
109
+ uploadAttachemnts = upload_input.val();
110
+ uploadAttachemntsArray = uploadAttachemnts.split( ',' );
111
+ newuploadAttachments = [];
112
+ for( var i=0;i < uploadAttachemntsArray.length; i++ ){
113
+ if( uploadAttachemntsArray[i] != removedAttachement )
114
+ newuploadAttachments.push(uploadAttachemntsArray[i]);
115
+ }
116
+ newuploadAttachments = newuploadAttachments.join(',');
117
+ upload_input.val(newuploadAttachments);
118
+
119
+ /* remove the attachment details */
120
+ jQuery(this).parent().parent('.upload-field-details').remove();
121
+ });
122
+ }
123
+ });
wordpress-creation-kit-api/fields/upload.php CHANGED
@@ -4,52 +4,57 @@
4
  * @param string $value Contains input value;
5
  * @param string $context Context where the function is used. Depending on it some actions are preformed.;
6
  * @return string $element input element html string. */
 
7
 
8
  /* define id's for input and info div */
9
  $upload_input_id = str_replace( '-', '_', Wordpress_Creation_Kit::wck_generate_slug( $meta . $details['title'] ) );
10
- $upload_info_div_id = str_replace( '-', '_', Wordpress_Creation_Kit::wck_generate_slug( $meta .'_info_container_'. $details['title'] ) );
11
-
12
  /* hidden input that will hold the attachment id */
13
- $element .= '<input id="'. esc_attr( $upload_input_id ) .'" type="hidden" size="36" name="'. esc_attr( Wordpress_Creation_Kit::wck_generate_slug( $details['title'] ) ) .'" value="'. $value .'" class="mb-text-input mb-field"/>';
14
 
15
- $thumbnail = '';
16
- $file_name = '';
17
- $file_type = '';
18
  /* container for the image preview (or file ico) and name and file type */
19
  if( !empty ( $value ) ){
20
- $file_src = wp_get_attachment_url($value);
21
- $thumbnail = wp_get_attachment_image( $value, array( 80, 60 ), true );
22
- $file_name = get_the_title( $value );
23
-
24
- if ( preg_match( '/^.*?\.(\w+)$/', get_attached_file( $value ), $matches ) )
25
- $file_type = esc_html( strtoupper( $matches[1] ) );
26
- else
27
- $file_type = strtoupper( str_replace( 'image/', '', get_post_mime_type( $value ) ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  }
29
- $element .= '<div id="'. esc_attr( $upload_info_div_id ) .'" class="upload-field-details">'. $thumbnail .'<p><span class="file-name">'. $file_name .'</span><span class="file-type">'. $file_type . '</span>';
30
- if( !empty ( $value ) )
31
- $element .= '<span class="wck-remove-upload">'.__( 'Remove', 'wck' ).'</span>';
32
- $element .= '</p></div>';
33
- /* the upload link. we send through get the hidden input id, details div id and meta name */
34
- if( !empty( $details['attach_to_post'] ) ){
35
- $attach_to_post = 'post_id='. $post_id .'&amp;';
36
- }else {
37
- $attach_to_post = '';
38
- }
39
- if( empty( $var_prefix ) )
40
- $var_prefix = '';
41
- if( empty( $edit_class ) )
42
- $edit_class = '';
43
-
44
- $media_upload_url = 'media-upload.php?'.$attach_to_post.'type=file&amp;mb_type='. $var_prefix . esc_js(strtolower( $upload_input_id ) ).'&amp;mb_info_div='.$var_prefix . esc_js(strtolower( $upload_info_div_id ) ).'&amp;meta_name='.$meta.'&amp;TB_iframe=1';
45
 
46
- $media_upload_url = admin_url( $media_upload_url );
 
 
 
 
 
 
 
47
 
48
- $element .= '<a id="upload_'. esc_attr(Wordpress_Creation_Kit::wck_generate_slug( $details['title'] ) ) .'_button" class="button" onclick="tb_show(\'\', \''.$media_upload_url.'\');">'. __( 'Upload ', 'wck' ) . $details['title'] .' </a>';
 
 
 
49
 
50
- /* add js global var for the hidden input, and info container div */
51
- $element .= '<script type="text/javascript">';
52
- $element .= 'window.'. $var_prefix . strtolower( $upload_input_id ) .' = jQuery(\''.$edit_class.'#'. $upload_input_id.'\');';
53
- $element .= 'window.'. $var_prefix . strtolower( $upload_info_div_id ) .' = jQuery(\''.$edit_class.'#'. $upload_info_div_id.'\');';
54
- $element .= '</script>';
55
  ?>
4
  * @param string $value Contains input value;
5
  * @param string $context Context where the function is used. Depending on it some actions are preformed.;
6
  * @return string $element input element html string. */
7
+
8
 
9
  /* define id's for input and info div */
10
  $upload_input_id = str_replace( '-', '_', Wordpress_Creation_Kit::wck_generate_slug( $meta . $details['title'] ) );
11
+ $upload_info_div_id = str_replace( '-', '_', Wordpress_Creation_Kit::wck_generate_slug( $meta .'_info_container_'. $details['title'] ) );
12
+
13
  /* hidden input that will hold the attachment id */
14
+ $element.= '<input id="'. esc_attr( $upload_input_id ) .'" type="hidden" size="36" name="'. esc_attr( Wordpress_Creation_Kit::wck_generate_slug( $details['title'] ) ) .'" value="'. $value .'" class="mb-text-input mb-field"/>';
15
 
 
 
 
16
  /* container for the image preview (or file ico) and name and file type */
17
  if( !empty ( $value ) ){
18
+ /* it can hold multiple attachments separated by comma */
19
+ $values = explode( ',', $value );
20
+ foreach( $values as $value ){
21
+ $file_src = wp_get_attachment_url($value);
22
+ $thumbnail = wp_get_attachment_image( $value, array( 80, 80 ), true );
23
+ $file_name = get_the_title( $value );
24
+ $file_type = get_post_mime_type( $value );
25
+
26
+ $element.= '<div id="'.esc_attr( $upload_info_div_id ).'_info_container" class="upload-field-details" data-attachment_id="'. $value .'">';
27
+ $element.= '<div class="file-thumb">';
28
+ $element.= $thumbnail;
29
+ $element.= '</div>';
30
+
31
+ $element.= '<p><span class="file-name">';
32
+ $element.= $file_name;
33
+ $element.= '</span><span class="file-type">';
34
+ $element.= $file_type;
35
+ $element.= '</span>';
36
+ if( !empty ( $value ) )
37
+ $element.= '<span class="wck-remove-upload">'.__( 'Remove', 'core' ).'</span>';
38
+ $element.= '</p></div>';
39
+ }
40
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
 
42
+ $element.= '<a href="#" class="button wck_upload_button" id="upload_'. esc_attr(Wordpress_Creation_Kit::wck_generate_slug( $details['title'] ) ) .'_button" data-uploader_title="'. $details['title'] .'" data-uploader_button_text="Select Files" data-upload_input="'.esc_attr( $upload_input_id ).'" ';
43
+ if( is_user_logged_in() )
44
+ $element.= 'data-uploader_logged_in="true"';
45
+
46
+ if( $details['multiple_upload'] == 'true' )
47
+ $element.= ' data-multiple_upload="true"';
48
+ else
49
+ $element.= ' data-multiple_upload="false"';
50
 
51
+ if( $context != 'fep' )
52
+ $element.= ' data-upload_in_backend="true"';
53
+ else
54
+ $element.= ' data-upload_in_backend="false"';
55
 
56
+ if( !empty( $details['allowed_types'] ) )
57
+ $element.= ' data-allowed_types="'. $details['allowed_types'] .'"';
58
+
59
+ $element.= '>'. __( 'Upload ', 'wck' ) . $details['title'] .'</a>';
 
60
  ?>
wordpress-creation-kit-api/fields/wysiwyg editor.php CHANGED
@@ -5,6 +5,6 @@
5
  * @param string $context Context where the function is used. Depending on it some actions are preformed.;
6
  * @return string $element input element html string. */
7
 
8
- $element .= '<textarea name="'. esc_attr( Wordpress_Creation_Kit::wck_generate_slug( $details['title'] ) ) .'" style="vertical-align:top;width:400px;height:200px" class="mb-textarea mb-field '. esc_attr( Wordpress_Creation_Kit::wck_generate_slug( $details['title'] ) ) .'">'. esc_html( $value ) .'</textarea>';
9
  $element .= '<script type="text/javascript">jQuery( function(){ if ( typeof wckInitTinyMCE == "function" ) wckInitTinyMCE("'. Wordpress_Creation_Kit::wck_generate_slug( $details['title'] ) .'")});</script>';
10
  ?>
5
  * @param string $context Context where the function is used. Depending on it some actions are preformed.;
6
  * @return string $element input element html string. */
7
 
8
+ $element .= '<textarea name="'. esc_attr( Wordpress_Creation_Kit::wck_generate_slug( $details['title'] ) ) .'" class="mb-textarea mb-field '. esc_attr( Wordpress_Creation_Kit::wck_generate_slug( $details['title'] ) ) .'">'. esc_html( $value ) .'</textarea>';
9
  $element .= '<script type="text/javascript">jQuery( function(){ if ( typeof wckInitTinyMCE == "function" ) wckInitTinyMCE("'. Wordpress_Creation_Kit::wck_generate_slug( $details['title'] ) .'")});</script>';
10
  ?>
wordpress-creation-kit-api/wordpress-creation-kit.php CHANGED
@@ -74,6 +74,7 @@ class Wordpress_Creation_Kit{
74
 
75
  /* Global that will hold all the arguments for all the custom boxes */
76
  global $wck_objects;
 
77
 
78
  /* Merge the input arguments and the defaults. */
79
  $this->args = wp_parse_args( $args, $this->defaults );
@@ -84,7 +85,9 @@ class Wordpress_Creation_Kit{
84
  /*print scripts*/
85
  add_action('admin_enqueue_scripts', array( &$this, 'wck_print_scripts' ));
86
  /* add our own ajaxurl because we are going to use the wck script also in frontend and we want to avoid any conflicts */
87
- add_action( 'admin_head', array( &$this, 'wck_print_ajax_url' ) );
 
 
88
 
89
  // Set up the AJAX hooks
90
  add_action("wp_ajax_wck_add_meta".$this->args['meta_name'], array( &$this, 'wck_add_meta') );
@@ -94,22 +97,18 @@ class Wordpress_Creation_Kit{
94
  add_action("wp_ajax_wck_refresh_entry".$this->args['meta_name'], array( &$this, 'wck_refresh_entry') );
95
  add_action("wp_ajax_wck_add_form".$this->args['meta_name'], array( &$this, 'wck_add_form') );
96
  add_action("wp_ajax_wck_remove_meta".$this->args['meta_name'], array( &$this, 'wck_remove_meta') );
97
- add_action("wp_ajax_wck_reorder_meta".$this->args['meta_name'], array( &$this, 'wck_reorder_meta') );
98
-
99
- /* modify Insert into post button */
100
- add_action('admin_head-media-upload-popup', array( &$this, 'wck_media_upload_popup_head') );
101
-
102
- /* custom functionality for upload video */
103
- add_filter('media_send_to_editor', array( &$this, 'wck_media_send_to_editor' ), 15, 2 );
104
-
105
  add_action('add_meta_boxes', array( &$this, 'wck_add_metabox') );
106
 
107
  /* hook to add a side metabox with the Syncronize translation button */
108
  add_action('add_meta_boxes', array( &$this, 'wck_add_sync_translation_metabox' ) );
109
 
110
  /* ajax hook the syncronization function */
111
- add_action("wp_ajax_wck_sync_translation", array( &$this, 'wck_sync_translation_ajax' ) );
112
 
 
 
113
  }
114
 
115
 
@@ -218,7 +217,7 @@ class Wordpress_Creation_Kit{
218
 
219
  function wck_output_form_field( $meta, $details, $value = '', $context = '', $post_id = '' ){
220
  $element = '';
221
-
222
  if( $context == 'edit_form' ){
223
  $edit_class = '.mb-table-container ';
224
  $var_prefix = 'edit';
@@ -228,10 +227,9 @@ class Wordpress_Creation_Kit{
228
  $frontend_prefix = 'fep-';
229
  }
230
  else{
231
- if( !empty( $details['default'] ) )
232
  $value = apply_filters( "wck_default_value_{$meta}_". Wordpress_Creation_Kit::wck_generate_slug( $details['title'] ) , $details['default'] );
233
- }
234
-
235
 
236
  $element .= '<label for="'. esc_attr( Wordpress_Creation_Kit::wck_generate_slug( $details['title'] ) ) .'" class="field-label">'. apply_filters( "wck_label_{$meta}_". Wordpress_Creation_Kit::wck_generate_slug( $details['title'] ), ucfirst($details['title']) ) .':';
237
  if( !empty( $details['required'] ) && $details['required'] )
@@ -282,7 +280,7 @@ class Wordpress_Creation_Kit{
282
  * the meta to apear in custom fields box.
283
  * @param object $post Post object
284
  */
285
- function create_add_form($fields, $meta, $post){
286
  $nonce = wp_create_nonce( 'wck-add-meta' );
287
  if( !empty( $post->ID ) )
288
  $post_id = $post->ID;
@@ -301,7 +299,7 @@ class Wordpress_Creation_Kit{
301
 
302
  ?>
303
  <li class="row-<?php echo esc_attr( Wordpress_Creation_Kit::wck_generate_slug( $details['title'] ) ) ?>">
304
- <?php echo self::wck_output_form_field( $meta, $details, '', '', $post_id ); ?>
305
  </li>
306
  <?php
307
 
@@ -352,7 +350,7 @@ class Wordpress_Creation_Kit{
352
  if( !empty( $fields ) ){
353
  foreach( $fields as $field ){
354
  $details = $field;
355
- if( !empty( $results[$element_id][Wordpress_Creation_Kit::wck_generate_slug( $details['title'] )] ) )
356
  $value = $results[$element_id][Wordpress_Creation_Kit::wck_generate_slug( $details['title'] )];
357
  else
358
  $value = '';
@@ -447,10 +445,10 @@ class Wordpress_Creation_Kit{
447
  foreach( $fields as $field ){
448
  $details = $field;
449
 
450
- if( !empty( $results[$element_id][Wordpress_Creation_Kit::wck_generate_slug( $details['title'] )] ) )
451
  $value = $results[$element_id][Wordpress_Creation_Kit::wck_generate_slug( $details['title'] )];
452
  else
453
- $value ='';
454
 
455
  /* filter display value */
456
  $value = apply_filters( "wck_displayed_value_{$meta}_element_{$j}", $value );
@@ -542,13 +540,14 @@ class Wordpress_Creation_Kit{
542
  /* function to generate output for cpt select */
543
  function wck_get_entry_field_cpt_select($id){
544
  if( !empty ( $id ) && is_numeric( $id ) ){
545
- $post = get_post( $id );
546
-
547
- if ( $post->post_title == '' )
548
- $post->post_title = 'No title. ID: ' . $id;
549
 
550
- if ( $post )
 
 
 
551
  return '<pre>'.htmlspecialchars( $post->post_title );
 
552
  else
553
  return 'Error - Post ID not found in database';
554
 
@@ -574,21 +573,19 @@ class Wordpress_Creation_Kit{
574
  }
575
 
576
  /* our own ajaxurl */
577
- function wck_print_ajax_url(){
578
  echo '<script type="text/javascript">var wckAjaxurl = "'. admin_url('admin-ajax.php') .'";</script>';
 
579
  }
580
 
581
 
582
  /* Helper function for enqueueing scripts and styles */
583
  private static function wck_enqueue( $context = '' ){
 
 
584
  wp_enqueue_script( 'jquery-ui-draggable' );
585
  wp_enqueue_script( 'jquery-ui-droppable' );
586
- wp_enqueue_script( 'jquery-ui-sortable' );
587
-
588
- if( $context == 'options' ){
589
- wp_enqueue_script( 'thickbox' );
590
- wp_enqueue_style( 'thickbox' );
591
- }
592
 
593
  wp_enqueue_script('wordpress-creation-kit', plugins_url('/wordpress-creation-kit.js', __FILE__), array('jquery', 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-sortable' ) );
594
  wp_register_style('wordpress-creation-kit-css', plugins_url('/wordpress-creation-kit.css', __FILE__));
@@ -599,11 +596,18 @@ class Wordpress_Creation_Kit{
599
  wp_enqueue_script( 'wck-tinymce' );
600
  wp_register_script( 'wck-tinymce-init', plugins_url( '/assets/js/tiny_mce/wck_tiny_mce_init.js', __FILE__ ), array(), '1.0', true );
601
  wp_enqueue_script( 'wck-tinymce-init' );
602
-
603
- //datepicker
604
- wp_enqueue_script('jquery-ui-datepicker');
605
- wp_enqueue_style( 'jquery-style', plugins_url( '/assets/datepicker/datepicker.css', __FILE__ ) );
606
-
 
 
 
 
 
 
 
607
  }
608
 
609
  /* Helper function for required fields */
@@ -949,101 +953,6 @@ class Wordpress_Creation_Kit{
949
 
950
  exit;
951
  }
952
-
953
- /* modify Insert into post button */
954
- function wck_media_upload_popup_head()
955
- {
956
- if( isset( $_GET["meta_name"] ) ){
957
- if( $this->args['meta_name'] == $_GET["meta_name"] ){
958
- if( ( isset( $_GET["mb_type"] ) ) ){
959
- ?>
960
- <style type="text/css">
961
- #media-upload-header #sidemenu li#tab-type_url,
962
- #media-upload-header #sidemenu li#tab-gallery {
963
- display: none;
964
- }
965
-
966
- #media-items tr.url,
967
- #media-items tr.align,
968
- #media-items tr.image_alt,
969
- #media-items tr.image-size,
970
- #media-items tr.post_excerpt,
971
- #media-items tr.post_content,
972
- #media-items tr.image_alt p,
973
- #media-items table thead input.button,
974
- #media-items table thead img.imgedit-wait-spin,
975
- #media-items tr.submit a.wp-post-thumbnail {
976
- display: none;
977
- }
978
-
979
- .media-item table thead img {
980
- border: #DFDFDF solid 1px;
981
- margin-right: 10px;
982
- }
983
-
984
- </style>
985
- <script type="text/javascript">
986
- (function($){
987
-
988
- $(document).ready(function(){
989
-
990
- $('#media-items').bind('DOMNodeInserted',function(){
991
- $('input[value="Insert into Post"]').each(function(){
992
- $(this).attr('value','<?php _e("Select File")?>');
993
- });
994
- }).trigger('DOMNodeInserted');
995
-
996
- $('form#filter').each(function(){
997
-
998
- $(this).append('<input type="hidden" name="mb_type" value="<?php echo $_GET['mb_type']; ?>" />');
999
- $(this).append('<input type="hidden" name="mb_info_div" value="<?php echo $_GET['mb_info_div']; ?>" />');
1000
-
1001
- });
1002
- });
1003
-
1004
- })(jQuery);
1005
- </script>
1006
- <?php
1007
- }
1008
- }
1009
- }
1010
- }
1011
-
1012
- /* custom functionality for upload button */
1013
-
1014
- function wck_media_send_to_editor($html, $id)
1015
- {
1016
- parse_str($_POST["_wp_http_referer"], $arr_postinfo);
1017
-
1018
- if(isset($arr_postinfo["mb_type"]))
1019
- {
1020
- $file_src = wp_get_attachment_url($id);
1021
- $thumbnail = wp_get_attachment_image( $id, array( 80, 60 ), true );
1022
- $file_name = get_the_title( $id );
1023
-
1024
- if ( preg_match( '/^.*?\.(\w+)$/', get_attached_file( $id ), $matches ) )
1025
- $file_type = esc_html( strtoupper( $matches[1] ) );
1026
- else
1027
- $file_type = strtoupper( str_replace( 'image/', '', get_post_mime_type( $id ) ) );
1028
-
1029
- ?>
1030
- <script type="text/javascript">
1031
-
1032
- self.parent.window. <?php echo $arr_postinfo["mb_type"];?> .val('<?php echo $id; ?>');
1033
- self.parent.window. <?php echo $arr_postinfo["mb_info_div"];?> .html('<?php echo $thumbnail ?><p><span class="file-name"><?php echo $file_name; ?></span><span class="file-type"><?php echo $file_type; ?></span><span class="wck-remove-upload"><?php _e( 'Remove', 'wck' )?></span></p>');
1034
-
1035
- self.parent.tb_remove();
1036
-
1037
- </script>
1038
- <?php
1039
- exit;
1040
- }
1041
- else
1042
- {
1043
- return $html;
1044
- }
1045
-
1046
- }
1047
 
1048
  /* WPML Compatibility */
1049
 
74
 
75
  /* Global that will hold all the arguments for all the custom boxes */
76
  global $wck_objects;
77
+ global $wck_did_actions;
78
 
79
  /* Merge the input arguments and the defaults. */
80
  $this->args = wp_parse_args( $args, $this->defaults );
85
  /*print scripts*/
86
  add_action('admin_enqueue_scripts', array( &$this, 'wck_print_scripts' ));
87
  /* add our own ajaxurl because we are going to use the wck script also in frontend and we want to avoid any conflicts */
88
+ if( !$wck_did_actions ){
89
+ add_action( 'admin_head', array( &$this, 'wck_print_ajax_url' ), 10 );
90
+ }
91
 
92
  // Set up the AJAX hooks
93
  add_action("wp_ajax_wck_add_meta".$this->args['meta_name'], array( &$this, 'wck_add_meta') );
97
  add_action("wp_ajax_wck_refresh_entry".$this->args['meta_name'], array( &$this, 'wck_refresh_entry') );
98
  add_action("wp_ajax_wck_add_form".$this->args['meta_name'], array( &$this, 'wck_add_form') );
99
  add_action("wp_ajax_wck_remove_meta".$this->args['meta_name'], array( &$this, 'wck_remove_meta') );
100
+ add_action("wp_ajax_wck_reorder_meta".$this->args['meta_name'], array( &$this, 'wck_reorder_meta') );
101
+
 
 
 
 
 
 
102
  add_action('add_meta_boxes', array( &$this, 'wck_add_metabox') );
103
 
104
  /* hook to add a side metabox with the Syncronize translation button */
105
  add_action('add_meta_boxes', array( &$this, 'wck_add_sync_translation_metabox' ) );
106
 
107
  /* ajax hook the syncronization function */
108
+ add_action("wp_ajax_wck_sync_translation", array( &$this, 'wck_sync_translation_ajax' ) );
109
 
110
+ /* eache metabox executes the actions so this marks when they were executed at least once */
111
+ $wck_did_actions = true;
112
  }
113
 
114
 
217
 
218
  function wck_output_form_field( $meta, $details, $value = '', $context = '', $post_id = '' ){
219
  $element = '';
220
+
221
  if( $context == 'edit_form' ){
222
  $edit_class = '.mb-table-container ';
223
  $var_prefix = 'edit';
227
  $frontend_prefix = 'fep-';
228
  }
229
  else{
230
+ if( isset( $details['default'] ) )
231
  $value = apply_filters( "wck_default_value_{$meta}_". Wordpress_Creation_Kit::wck_generate_slug( $details['title'] ) , $details['default'] );
232
+ }
 
233
 
234
  $element .= '<label for="'. esc_attr( Wordpress_Creation_Kit::wck_generate_slug( $details['title'] ) ) .'" class="field-label">'. apply_filters( "wck_label_{$meta}_". Wordpress_Creation_Kit::wck_generate_slug( $details['title'] ), ucfirst($details['title']) ) .':';
235
  if( !empty( $details['required'] ) && $details['required'] )
280
  * the meta to apear in custom fields box.
281
  * @param object $post Post object
282
  */
283
+ function create_add_form($fields, $meta, $post, $context = ''){
284
  $nonce = wp_create_nonce( 'wck-add-meta' );
285
  if( !empty( $post->ID ) )
286
  $post_id = $post->ID;
299
 
300
  ?>
301
  <li class="row-<?php echo esc_attr( Wordpress_Creation_Kit::wck_generate_slug( $details['title'] ) ) ?>">
302
+ <?php echo self::wck_output_form_field( $meta, $details, '', $context, $post_id ); ?>
303
  </li>
304
  <?php
305
 
350
  if( !empty( $fields ) ){
351
  foreach( $fields as $field ){
352
  $details = $field;
353
+ if( isset( $results[$element_id][Wordpress_Creation_Kit::wck_generate_slug( $details['title'] )] ) )
354
  $value = $results[$element_id][Wordpress_Creation_Kit::wck_generate_slug( $details['title'] )];
355
  else
356
  $value = '';
445
  foreach( $fields as $field ){
446
  $details = $field;
447
 
448
+ if( isset( $results[$element_id][Wordpress_Creation_Kit::wck_generate_slug( $details['title'] )] ) )
449
  $value = $results[$element_id][Wordpress_Creation_Kit::wck_generate_slug( $details['title'] )];
450
  else
451
+ $value = '';
452
 
453
  /* filter display value */
454
  $value = apply_filters( "wck_displayed_value_{$meta}_element_{$j}", $value );
540
  /* function to generate output for cpt select */
541
  function wck_get_entry_field_cpt_select($id){
542
  if( !empty ( $id ) && is_numeric( $id ) ){
543
+ $post = get_post( $id );
 
 
 
544
 
545
+ if ( $post != null ){
546
+ if ( $post->post_title == '' )
547
+ $post->post_title = 'No title. ID: ' . $id;
548
+
549
  return '<pre>'.htmlspecialchars( $post->post_title );
550
+ }
551
  else
552
  return 'Error - Post ID not found in database';
553
 
573
  }
574
 
575
  /* our own ajaxurl */
576
+ function wck_print_ajax_url(){
577
  echo '<script type="text/javascript">var wckAjaxurl = "'. admin_url('admin-ajax.php') .'";</script>';
578
+ echo '<script type="text/javascript">var metaname = "'. $this->args['meta_name'] .'";</script>';
579
  }
580
 
581
 
582
  /* Helper function for enqueueing scripts and styles */
583
  private static function wck_enqueue( $context = '' ){
584
+ global $wck_printed_scripts;
585
+
586
  wp_enqueue_script( 'jquery-ui-draggable' );
587
  wp_enqueue_script( 'jquery-ui-droppable' );
588
+ wp_enqueue_script( 'jquery-ui-sortable' );
 
 
 
 
 
589
 
590
  wp_enqueue_script('wordpress-creation-kit', plugins_url('/wordpress-creation-kit.js', __FILE__), array('jquery', 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-sortable' ) );
591
  wp_register_style('wordpress-creation-kit-css', plugins_url('/wordpress-creation-kit.css', __FILE__));
596
  wp_enqueue_script( 'wck-tinymce' );
597
  wp_register_script( 'wck-tinymce-init', plugins_url( '/assets/js/tiny_mce/wck_tiny_mce_init.js', __FILE__ ), array(), '1.0', true );
598
  wp_enqueue_script( 'wck-tinymce-init' );
599
+
600
+ /* media upload */
601
+ wp_enqueue_media();
602
+ wp_enqueue_script('wck-upload-field', plugins_url('/fields/upload.js', __FILE__), array('jquery') );
603
+ if( !$wck_printed_scripts ){
604
+ /* send parameters to the upload script */
605
+ $post_id = !empty( $_GET['post'] ) ? $_GET['post'] : '';
606
+ $parameters_array = array( 'postID' => $post_id );
607
+ wp_localize_script( 'wck-upload-field', 'wckUpload', $parameters_array );
608
+ }
609
+ /* eache metabox prints the scripts which is fine for wp_enque but not for wp_localize_script so this marks when they were executed at least once */
610
+ $wck_printed_scripts = true;
611
  }
612
 
613
  /* Helper function for required fields */
953
 
954
  exit;
955
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
956
 
957
  /* WPML Compatibility */
958