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

Version Description

  • Fixed Menu Position argument for Custom Post Type Creator.
  • Added filter for default_value.
  • Fixed Template Select dropdown for Custom Fields Creator.
  • Fixed a bug in Custom Fields Creator that prevented Options field in the process of creating custom fields from appearing.
Download this release

Release Info

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

Version 1.0.1

Files changed (134) hide show
  1. css/wck-cfc.css +44 -0
  2. css/wck-cptc.css +12 -0
  3. css/wck-sas.css +28 -0
  4. images/banner_pro.png +0 -0
  5. images/wck-32x32.png +0 -0
  6. images/wck-icon.png +0 -0
  7. js/wck-cfc.js +36 -0
  8. languages/wck.pot +1123 -0
  9. readme.txt +145 -0
  10. screenshot-1.jpg +0 -0
  11. screenshot-10.jpg +0 -0
  12. screenshot-2.jpg +0 -0
  13. screenshot-3.jpg +0 -0
  14. screenshot-4.jpg +0 -0
  15. screenshot-5.jpg +0 -0
  16. screenshot-6.jpg +0 -0
  17. screenshot-7.jpg +0 -0
  18. screenshot-8.jpg +0 -0
  19. screenshot-9.jpg +0 -0
  20. wck-cfc.php +591 -0
  21. wck-cptc.php +298 -0
  22. wck-ctc.php +255 -0
  23. wck-sas.php +182 -0
  24. wck.php +94 -0
  25. wordpress-creation-kit-api/assets/js/tiny_mce/langs/en.js +1 -0
  26. wordpress-creation-kit-api/assets/js/tiny_mce/license.txt +504 -0
  27. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/directionality/editor_plugin.js +1 -0
  28. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/directionality/editor_plugin_src.js +82 -0
  29. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/fullscreen/editor_plugin.js +1 -0
  30. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/fullscreen/editor_plugin_src.js +159 -0
  31. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/fullscreen/fullscreen.htm +110 -0
  32. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/inlinepopups/editor_plugin.js +1 -0
  33. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +699 -0
  34. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +0 -0
  35. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
  36. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif +0 -0
  37. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +0 -0
  38. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
  39. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif +0 -0
  40. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
  41. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css +90 -0
  42. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/inlinepopups/template.htm +387 -0
  43. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/media/css/media.css +17 -0
  44. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/media/editor_plugin.js +1 -0
  45. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/media/editor_plugin_src.js +898 -0
  46. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/media/js/embed.js +73 -0
  47. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/media/js/media.js +470 -0
  48. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/media/langs/en_dlg.js +1 -0
  49. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/media/media.htm +922 -0
  50. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/media/moxieplayer.swf +0 -0
  51. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/paste/editor_plugin.js +1 -0
  52. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/paste/editor_plugin_src.js +871 -0
  53. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/paste/js/pastetext.js +36 -0
  54. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/paste/js/pasteword.js +51 -0
  55. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/paste/langs/en_dlg.js +1 -0
  56. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/paste/pastetext.htm +27 -0
  57. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/paste/pasteword.htm +21 -0
  58. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/spellchecker/css/content.css +1 -0
  59. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/spellchecker/editor_plugin.js +1 -0
  60. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/spellchecker/editor_plugin_src.js +436 -0
  61. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/spellchecker/img/wline.gif +0 -0
  62. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/tabfocus/editor_plugin.js +1 -0
  63. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/tabfocus/editor_plugin_src.js +122 -0
  64. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/wordcount/editor_plugin.js +1 -0
  65. wordpress-creation-kit-api/assets/js/tiny_mce/plugins/wordcount/editor_plugin_src.js +122 -0
  66. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/about.htm +52 -0
  67. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/anchor.htm +26 -0
  68. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/charmap.htm +55 -0
  69. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/color_picker.htm +70 -0
  70. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/editor_template.js +1 -0
  71. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/editor_template_src.js +1487 -0
  72. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/image.htm +80 -0
  73. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/img/colorpicker.jpg +0 -0
  74. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/img/flash.gif +0 -0
  75. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/img/icons.gif +0 -0
  76. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/img/iframe.gif +0 -0
  77. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/img/pagebreak.gif +0 -0
  78. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/img/quicktime.gif +0 -0
  79. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/img/realmedia.gif +0 -0
  80. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/img/shockwave.gif +0 -0
  81. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/img/trans.gif +0 -0
  82. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/img/video.gif +0 -0
  83. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/img/windowsmedia.gif +0 -0
  84. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/js/about.js +73 -0
  85. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/js/anchor.js +56 -0
  86. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/js/charmap.js +363 -0
  87. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/js/color_picker.js +345 -0
  88. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/js/image.js +253 -0
  89. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/js/link.js +159 -0
  90. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/js/source_editor.js +78 -0
  91. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/langs/en.js +1 -0
  92. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/langs/en_dlg.js +1 -0
  93. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/link.htm +57 -0
  94. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/shortcuts.htm +47 -0
  95. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/default/content.css +50 -0
  96. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/default/dialog.css +118 -0
  97. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/default/img/buttons.png +0 -0
  98. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/default/img/items.gif +0 -0
  99. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif +0 -0
  100. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/default/img/menu_check.gif +0 -0
  101. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/default/img/progress.gif +0 -0
  102. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/default/img/tabs.gif +0 -0
  103. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/default/ui.css +219 -0
  104. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/wp_theme/content.css +144 -0
  105. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/wp_theme/dialog.css +121 -0
  106. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/wp_theme/editor.css +1 -0
  107. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/wp_theme/img/down_arrow.gif +0 -0
  108. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/wp_theme/img/embedded.png +0 -0
  109. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/wp_theme/img/gallery.png +0 -0
  110. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/wp_theme/img/more_bug.gif +0 -0
  111. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/wp_theme/img/page_bug.gif +0 -0
  112. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/wp_theme/img/tabs.gif +0 -0
  113. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/wp_theme/img/wpicons.png +0 -0
  114. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/wp_theme/ui.css +1 -0
  115. wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/source_editor.htm +25 -0
  116. wordpress-creation-kit-api/assets/js/tiny_mce/tiny_mce.js +1 -0
  117. wordpress-creation-kit-api/assets/js/tiny_mce/tiny_mce_popup.js +5 -0
  118. wordpress-creation-kit-api/assets/js/tiny_mce/utils/editable_selects.js +70 -0
  119. wordpress-creation-kit-api/assets/js/tiny_mce/utils/form_utils.js +210 -0
  120. wordpress-creation-kit-api/assets/js/tiny_mce/utils/mctabs.js +162 -0
  121. wordpress-creation-kit-api/assets/js/tiny_mce/utils/validate.js +252 -0
  122. wordpress-creation-kit-api/assets/js/tiny_mce/wck_tiny_mce_init.js +26 -0
  123. wordpress-creation-kit-api/fields/checkbox.php +41 -0
  124. wordpress-creation-kit-api/fields/radio.php +36 -0
  125. wordpress-creation-kit-api/fields/select.php +46 -0
  126. wordpress-creation-kit-api/fields/text.php +10 -0
  127. wordpress-creation-kit-api/fields/textarea.php +9 -0
  128. wordpress-creation-kit-api/fields/upload.php +47 -0
  129. wordpress-creation-kit-api/fields/wysiwyg editor.php +10 -0
  130. wordpress-creation-kit-api/images/ajax-loader.gif +0 -0
  131. wordpress-creation-kit-api/readme.txt +135 -0
  132. wordpress-creation-kit-api/wordpress-creation-kit.css +207 -0
  133. wordpress-creation-kit-api/wordpress-creation-kit.js +373 -0
  134. wordpress-creation-kit-api/wordpress-creation-kit.php +1195 -0
css/wck-cfc.css ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #wck_cfc_fields .row-options, #wck_cfc_fields .row-attach-upload-to-post{
2
+ display:none;
3
+ }
4
+
5
+ #edit-slug-box{
6
+ display:none;
7
+ }
8
+
9
+ #minor-publishing-actions{
10
+ display:none;
11
+ }
12
+
13
+ #visibility.misc-pub-section {
14
+ display:none;
15
+ }
16
+
17
+ li.slug-title{
18
+ margin-top:-6px;
19
+ font-size:10px;
20
+ }
21
+
22
+ li.slug-title span{
23
+ padding:0 3px;
24
+ background-color:#FFFBCC;
25
+ }
26
+
27
+ .cfc-message{
28
+ margin: 0 0 15px;
29
+ background-color: #FFFFE0;
30
+ border-color: #E6DB55;
31
+ padding: 0 0.6em;
32
+ border-radius: 3px 3px 3px 3px;
33
+ border-style: solid;
34
+ border-width: 1px;
35
+ }
36
+
37
+ .cfc-message p{
38
+ margin: 0.5em 0;
39
+ padding: 2px;
40
+ }
41
+
42
+ #icon-wck-page{
43
+ background:url( ../images/wck-32x32.png ) 0 0 no-repeat;;
44
+ }
css/wck-cptc.css ADDED
@@ -0,0 +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
+ }
css/wck-sas.css ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .wck-badge{
2
+ background: url(../images/wck-32x32.png) 20px center no-repeat #f1f1f1;
3
+ border:1px solid #ccc;
4
+ border-radius:3px;
5
+ -webkit-box-shadow: inset 1px 1px 0px 0px rgba(255, 255, 255, 1);
6
+ box-shadow: inset 1px 1px 0px 0px rgba(255, 255, 255, 1);
7
+ padding:20px 20px 20px 70px;
8
+ float:left;
9
+ margin-bottom:40px;
10
+ font-weight:bold;
11
+ }
12
+ .serial-notification{
13
+ padding:10px 20px;
14
+ border:1px solid #ccc;
15
+ border-radius:3px;
16
+ }
17
+ .serial-notification.yellow{
18
+ background:#FFFFE0;
19
+ border-color:#E6DB55;
20
+ }
21
+ .serial-notification.red{
22
+ background:#ffd6d6;
23
+ border-color:#cc0000;
24
+ }
25
+ .serial-notification.green{
26
+ background:#eeffe0;
27
+ border-color:#4dcc00;
28
+ }
images/banner_pro.png ADDED
Binary file
images/wck-32x32.png ADDED
Binary file
images/wck-icon.png ADDED
Binary file
js/wck-cfc.js ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(function(){
2
+ jQuery( '#wck_cfc_fields #field-type' ).live( 'change', function () {
3
+ value = jQuery(this).val();
4
+
5
+ if( value == 'select' || value == 'checkbox' || value == 'radio' ){
6
+ jQuery( '#wck_cfc_fields .row-options' ).show();
7
+ }
8
+ else{
9
+ jQuery( '#wck_cfc_fields .row-options' ).hide();
10
+ }
11
+
12
+ if( value == 'upload' ){
13
+ jQuery( '#wck_cfc_fields .row-attach-upload-to-post' ).show();
14
+ }
15
+ else{
16
+ jQuery( '#wck_cfc_fields .row-attach-upload-to-post' ).hide();
17
+ }
18
+ });
19
+
20
+ jQuery( '#container_wck_cfc_fields #field-type' ).live( 'change', function () {
21
+ value = jQuery(this).val();
22
+ if( value == 'select' || value == 'checkbox' || value == 'radio' ){
23
+ jQuery( '.hide-options', jQuery(this).parent().parent().parent() ).show();
24
+ }
25
+ else{
26
+ jQuery( '.hide-options', jQuery(this).parent().parent().parent() ).hide();
27
+ }
28
+
29
+ if( value == 'upload' ){
30
+ jQuery( '.hide-attach', jQuery(this).parent().parent().parent() ).show();
31
+ }
32
+ else{
33
+ jQuery( '.hide-attach', jQuery(this).parent().parent().parent() ).hide();
34
+ }
35
+ });
36
+ });
languages/wck.pot ADDED
@@ -0,0 +1,1123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: 2013-06-13 16:28+0200\n"
7
+ "Last-Translator: \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-Poedit-SearchPath-0: d:\\!!!!!!!!!\\Free Version\\wck\n"
15
+
16
+ #: d:\!!!!!!!!!\Free
17
+ #: Version\wck/wck-cfc.php:26
18
+ msgid "Add New Meta Box"
19
+ msgstr ""
20
+
21
+ #: d:\!!!!!!!!!\Free
22
+ #: Version\wck/wck-cfc.php:27
23
+ msgid "Edit Meta Box"
24
+ msgstr ""
25
+
26
+ #: d:\!!!!!!!!!\Free
27
+ #: Version\wck/wck-cfc.php:28
28
+ msgid "New Meta Box"
29
+ msgstr ""
30
+
31
+ #: d:\!!!!!!!!!\Free
32
+ #: Version\wck/wck-cfc.php:29
33
+ #: Version\wck/wck-sas.php:87
34
+ msgid "Custom Fields Creator"
35
+ msgstr ""
36
+
37
+ #: d:\!!!!!!!!!\Free
38
+ #: Version\wck/wck-cfc.php:30
39
+ msgid "View Meta Box"
40
+ msgstr ""
41
+
42
+ #: d:\!!!!!!!!!\Free
43
+ #: Version\wck/wck-cfc.php:31
44
+ msgid "Search Meta Boxes"
45
+ msgstr ""
46
+
47
+ #: d:\!!!!!!!!!\Free
48
+ #: Version\wck/wck-cfc.php:32
49
+ msgid "No Meta Boxes found"
50
+ msgstr ""
51
+
52
+ #: d:\!!!!!!!!!\Free
53
+ #: Version\wck/wck-cfc.php:33
54
+ msgid "No Meta Boxes found in Trash"
55
+ msgstr ""
56
+
57
+ #: d:\!!!!!!!!!\Free
58
+ #: Version\wck/wck-cfc.php:35
59
+ msgid "Custom Meta Boxes"
60
+ msgstr ""
61
+
62
+ #: d:\!!!!!!!!!\Free
63
+ #: Version\wck/wck-cfc.php:84
64
+ msgid "Meta name"
65
+ msgstr ""
66
+
67
+ #: d:\!!!!!!!!!\Free
68
+ #: Version\wck/wck-cfc.php:84
69
+ msgid "The name of the meta field. It is the name by which you will query the data in the frontend. Must be unique, only lowercase letters, no spaces and no special characters."
70
+ msgstr ""
71
+
72
+ #: d:\!!!!!!!!!\Free
73
+ #: Version\wck/wck-cfc.php:85
74
+ #: Version\wck/wck-cfc.php:442
75
+ msgid "Post Type"
76
+ msgstr ""
77
+
78
+ #: d:\!!!!!!!!!\Free
79
+ #: Version\wck/wck-cfc.php:85
80
+ msgid "What post type the meta box should be attached to"
81
+ msgstr ""
82
+
83
+ #: d:\!!!!!!!!!\Free
84
+ #: Version\wck/wck-cfc.php:86
85
+ msgid "Repeater"
86
+ msgstr ""
87
+
88
+ #: d:\!!!!!!!!!\Free
89
+ #: Version\wck/wck-cfc.php:86
90
+ msgid "Whether the box supports just one entry or if it is a repeater field. By default it is a single field."
91
+ msgstr ""
92
+
93
+ #: d:\!!!!!!!!!\Free
94
+ #: Version\wck/wck-cfc.php:87
95
+ msgid "Sortable"
96
+ msgstr ""
97
+
98
+ #: d:\!!!!!!!!!\Free
99
+ #: Version\wck/wck-cfc.php:87
100
+ msgid "Whether the entries are sortable or not. Thsi is valid for repeater fields."
101
+ msgstr ""
102
+
103
+ #: d:\!!!!!!!!!\Free
104
+ #: Version\wck/wck-cfc.php:88
105
+ msgid "Post ID"
106
+ msgstr ""
107
+
108
+ #: d:\!!!!!!!!!\Free
109
+ #: Version\wck/wck-cfc.php:88
110
+ msgid "ID of a post on which the meta box should appear."
111
+ msgstr ""
112
+
113
+ #: d:\!!!!!!!!!\Free
114
+ #: Version\wck/wck-cfc.php:92
115
+ #: Version\wck/wck-cfc.php:443
116
+ msgid "Page Template"
117
+ msgstr ""
118
+
119
+ #: d:\!!!!!!!!!\Free
120
+ #: Version\wck/wck-cfc.php:92
121
+ msgid "If post type is \"page\" you can further select a page templete. The meta box will only appear on the page that has that selected page template."
122
+ msgstr ""
123
+
124
+ #: d:\!!!!!!!!!\Free
125
+ #: Version\wck/wck-cfc.php:97
126
+ #: Version\wck/wck-cfc.php:536
127
+ msgid "Meta Box Arguments"
128
+ msgstr ""
129
+
130
+ #: d:\!!!!!!!!!\Free
131
+ #: Version\wck/wck-cfc.php:114
132
+ msgid "Field Title"
133
+ msgstr ""
134
+
135
+ #: d:\!!!!!!!!!\Free
136
+ #: Version\wck/wck-cfc.php:114
137
+ msgid "Title of the field. A slug will automatically be generated."
138
+ msgstr ""
139
+
140
+ #: d:\!!!!!!!!!\Free
141
+ #: Version\wck/wck-cfc.php:115
142
+ msgid "Field Type"
143
+ msgstr ""
144
+
145
+ #: d:\!!!!!!!!!\Free
146
+ #: Version\wck/wck-cfc.php:115
147
+ msgid "The field type"
148
+ msgstr ""
149
+
150
+ #: d:\!!!!!!!!!\Free
151
+ #: Version\wck/wck-cfc.php:116
152
+ #: Version\wck/wck-cptc.php:48
153
+ msgid "Description"
154
+ msgstr ""
155
+
156
+ #: d:\!!!!!!!!!\Free
157
+ #: Version\wck/wck-cfc.php:117
158
+ msgid "Required"
159
+ msgstr ""
160
+
161
+ #: d:\!!!!!!!!!\Free
162
+ #: Version\wck/wck-cfc.php:117
163
+ msgid "Whether the field is required or not"
164
+ msgstr ""
165
+
166
+ #: d:\!!!!!!!!!\Free
167
+ #: Version\wck/wck-cfc.php:118
168
+ msgid "Default Value"
169
+ msgstr ""
170
+
171
+ #: d:\!!!!!!!!!\Free
172
+ #: Version\wck/wck-cfc.php:118
173
+ msgid "Default value of the field. For Checkboxes if there are multiple values separete them with a \",\""
174
+ msgstr ""
175
+
176
+ #: d:\!!!!!!!!!\Free
177
+ #: Version\wck/wck-cfc.php:119
178
+ msgid "Options"
179
+ msgstr ""
180
+
181
+ #: d:\!!!!!!!!!\Free
182
+ #: Version\wck/wck-cfc.php:119
183
+ msgid "Options for field types \"select\", \"checkbox\" and \"radio\". For multiple options separete 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"
184
+ msgstr ""
185
+
186
+ #: d:\!!!!!!!!!\Free
187
+ #: Version\wck/wck-cfc.php:120
188
+ msgid "Attach upload to post"
189
+ msgstr ""
190
+
191
+ #: d:\!!!!!!!!!\Free
192
+ #: Version\wck/wck-cfc.php:120
193
+ msgid "Whether or not the uploads should be attached to the post"
194
+ msgstr ""
195
+
196
+ #: d:\!!!!!!!!!\Free
197
+ #: Version\wck/wck-cfc.php:127
198
+ #: Version\wck/wck-cfc.php:542
199
+ msgid "Meta Box Fields"
200
+ msgstr ""
201
+
202
+ #: d:\!!!!!!!!!\Free
203
+ #: Version\wck/wck-cfc.php:140
204
+ msgid "Enter below the arguments for the meta box."
205
+ msgstr ""
206
+
207
+ #: d:\!!!!!!!!!\Free
208
+ #: Version\wck/wck-cfc.php:220
209
+ msgid "Slug:"
210
+ msgstr ""
211
+
212
+ #: d:\!!!!!!!!!\Free
213
+ #: Version\wck/wck-cfc.php:220
214
+ msgid "(Note:changing the slug when you already have a lot of existing entries may result in unexpected behavior.)"
215
+ msgstr ""
216
+
217
+ #: d:\!!!!!!!!!\Free
218
+ #: Version\wck/wck-cfc.php:355
219
+ msgid "Choose a different Meta Name as this one contains spaces\n"
220
+ msgstr ""
221
+
222
+ #: d:\!!!!!!!!!\Free
223
+ #: Version\wck/wck-cfc.php:357
224
+ msgid "Choose a different Meta Name as this one already exists\n"
225
+ msgstr ""
226
+
227
+ #: d:\!!!!!!!!!\Free
228
+ #: Version\wck/wck-cfc.php:441
229
+ msgid "Id"
230
+ msgstr ""
231
+
232
+ #: d:\!!!!!!!!!\Free
233
+ #: Version\wck/wck-cfc.php:506
234
+ #: Version\wck/wck-cptc.php:257
235
+ #: Version\wck/wck-ctc.php:215
236
+ #: Version\wck/wck.php:38
237
+ msgid "Wordpress Creation Kit"
238
+ msgstr ""
239
+
240
+ #: d:\!!!!!!!!!\Free
241
+ #: Version\wck/wck-cfc.php:530
242
+ #: Version\wck/wck-cptc.php:282
243
+ #: Version\wck/wck-ctc.php:239
244
+ msgid "Overview"
245
+ msgstr ""
246
+
247
+ #: d:\!!!!!!!!!\Free
248
+ #: Version\wck/wck-cfc.php:531
249
+ msgid "WCK Custom Fields Creator allows you to easily create custom meta boxes for Wordpress without any programming knowledge."
250
+ msgstr ""
251
+
252
+ #: d:\!!!!!!!!!\Free
253
+ #: Version\wck/wck-cfc.php:537
254
+ msgid "Define here the rules for the meta box. This rules are used to set up where the meta box will appear, it's type and also the meta key name stored in the database. The name of the entry (Enter title here) will be used as the meta box title."
255
+ msgstr ""
256
+
257
+ #: d:\!!!!!!!!!\Free
258
+ #: Version\wck/wck-cfc.php:543
259
+ msgid "Define here the fields contained in the meta box. From \"Field Title\" a slug will be automatically generated and you will use this slug to display the data in the frontend."
260
+ msgstr ""
261
+
262
+ #: d:\!!!!!!!!!\Free
263
+ #: Version\wck/wck-cfc.php:548
264
+ msgid "CFC Frontend Example"
265
+ msgstr ""
266
+
267
+ #: d:\!!!!!!!!!\Free
268
+ #: Version\wck/wck-cfc.php:549
269
+ msgid "Let's consider we have a meta box with the following arguments:<br /> - Meta name: books <br /> - Post Type: post <br />And we also have two fields deffined:<br /> - A text field with the Field Title: Book name <br /> - And another text field with the Field Title: Author name "
270
+ msgstr ""
271
+
272
+ #: d:\!!!!!!!!!\Free
273
+ #: Version\wck/wck-cfc.php:549
274
+ msgid "You will notice that slugs will automatically be created for the two text fields. For \"Book name\" the slug will be \"book-name\" and for \"Author name\" the slug will be \"author-name\""
275
+ msgstr ""
276
+
277
+ #: d:\!!!!!!!!!\Free
278
+ #: Version\wck/wck-cfc.php:549
279
+ msgid "Let's see what the code for displaying the meta box values in single.php of your theme would be:"
280
+ msgstr ""
281
+
282
+ #: d:\!!!!!!!!!\Free
283
+ #: Version\wck/wck-cfc.php:549
284
+ msgid "So as you can see the Meta Name \"books\" is used as the $key parameter of the funtion <a href=\"http://codex.wordpress.org/Function_Reference/get_post_meta\" target=\"_blank\">get_post_meta()</a> and the slugs of the text fields are used as keys for the resulting array. Basically CFC stores the entries as post meta in a multidimensioanl array. In our case the array would be: <br /><pre>array( array( \"book-name\" => \"The Hitchhiker's Guide To The Galaxy\", \"author-name\" => \"Douglas Adams\" ), array( \"book-name\" => \"Ender's Game\", \"author-name\" => \"Orson Scott Card\" ) );</pre> This is true even for single entries."
285
+ msgstr ""
286
+
287
+ #: d:\!!!!!!!!!\Free
288
+ #: Version\wck/wck-cfc.php:577
289
+ msgid "Metabox updated."
290
+ msgstr ""
291
+
292
+ #: d:\!!!!!!!!!\Free
293
+ #: Version\wck/wck-cptc.php:6
294
+ msgid "WCK Post Type Creator"
295
+ msgstr ""
296
+
297
+ #: d:\!!!!!!!!!\Free
298
+ #: Version\wck/wck-cptc.php:7
299
+ #: Version\wck/wck-sas.php:91
300
+ msgid "Post Type Creator"
301
+ msgstr ""
302
+
303
+ #: d:\!!!!!!!!!\Free
304
+ #: Version\wck/wck-cptc.php:47
305
+ msgid "Post type"
306
+ msgstr ""
307
+
308
+ #: d:\!!!!!!!!!\Free
309
+ #: Version\wck/wck-cptc.php:47
310
+ msgid "(max. 20 characters, can not contain capital letters, hyphens, or spaces)"
311
+ msgstr ""
312
+
313
+ #: d:\!!!!!!!!!\Free
314
+ #: Version\wck/wck-cptc.php:48
315
+ msgid "A short descriptive summary of what the post type is."
316
+ msgstr ""
317
+
318
+ #: d:\!!!!!!!!!\Free
319
+ #: Version\wck/wck-cptc.php:49
320
+ #: Version\wck/wck-ctc.php:36
321
+ msgid "Singular Label"
322
+ msgstr ""
323
+
324
+ #: d:\!!!!!!!!!\Free
325
+ #: Version\wck/wck-cptc.php:49
326
+ msgid "ex. Book"
327
+ msgstr ""
328
+
329
+ #: d:\!!!!!!!!!\Free
330
+ #: Version\wck/wck-cptc.php:50
331
+ #: Version\wck/wck-ctc.php:37
332
+ msgid "Plural Label"
333
+ msgstr ""
334
+
335
+ #: d:\!!!!!!!!!\Free
336
+ #: Version\wck/wck-cptc.php:50
337
+ msgid "ex. Books"
338
+ msgstr ""
339
+
340
+ #: d:\!!!!!!!!!\Free
341
+ #: Version\wck/wck-cptc.php:51
342
+ #: Version\wck/wck-ctc.php:39
343
+ msgid "Hierarchical"
344
+ msgstr ""
345
+
346
+ #: d:\!!!!!!!!!\Free
347
+ #: Version\wck/wck-cptc.php:51
348
+ msgid "Whether the post type is hierarchical. Allows Parent to be specified."
349
+ msgstr ""
350
+
351
+ #: d:\!!!!!!!!!\Free
352
+ #: Version\wck/wck-cptc.php:52
353
+ msgid "Has Archive"
354
+ msgstr ""
355
+
356
+ #: d:\!!!!!!!!!\Free
357
+ #: Version\wck/wck-cptc.php:52
358
+ msgid "Enables post type archives. Will use string as archive slug. Will generate the proper rewrite rules if rewrite is enabled."
359
+ msgstr ""
360
+
361
+ #: d:\!!!!!!!!!\Free
362
+ #: Version\wck/wck-cptc.php:53
363
+ msgid "Supports"
364
+ msgstr ""
365
+
366
+ #: d:\!!!!!!!!!\Free
367
+ #: Version\wck/wck-cptc.php:56
368
+ msgid "Add New"
369
+ msgstr ""
370
+
371
+ #: d:\!!!!!!!!!\Free
372
+ #: Version\wck/wck-cptc.php:56
373
+ msgid "ex. Add New"
374
+ msgstr ""
375
+
376
+ #: d:\!!!!!!!!!\Free
377
+ #: Version\wck/wck-cptc.php:57
378
+ #: Version\wck/wck-ctc.php:48
379
+ msgid "Add New Item"
380
+ msgstr ""
381
+
382
+ #: d:\!!!!!!!!!\Free
383
+ #: Version\wck/wck-cptc.php:57
384
+ msgid "ex. Add New Book"
385
+ msgstr ""
386
+
387
+ #: d:\!!!!!!!!!\Free
388
+ #: Version\wck/wck-cptc.php:58
389
+ #: Version\wck/wck-ctc.php:46
390
+ msgid "Edit Item"
391
+ msgstr ""
392
+
393
+ #: d:\!!!!!!!!!\Free
394
+ #: Version\wck/wck-cptc.php:58
395
+ msgid "ex. Edit Book"
396
+ msgstr ""
397
+
398
+ #: d:\!!!!!!!!!\Free
399
+ #: Version\wck/wck-cptc.php:59
400
+ msgid "New Item"
401
+ msgstr ""
402
+
403
+ #: d:\!!!!!!!!!\Free
404
+ #: Version\wck/wck-cptc.php:59
405
+ msgid "ex. New Book"
406
+ msgstr ""
407
+
408
+ #: d:\!!!!!!!!!\Free
409
+ #: Version\wck/wck-cptc.php:60
410
+ #: Version\wck/wck-ctc.php:43
411
+ msgid "All Items"
412
+ msgstr ""
413
+
414
+ #: d:\!!!!!!!!!\Free
415
+ #: Version\wck/wck-cptc.php:60
416
+ msgid "ex. All Books"
417
+ msgstr ""
418
+
419
+ #: d:\!!!!!!!!!\Free
420
+ #: Version\wck/wck-cptc.php:61
421
+ msgid "View Items"
422
+ msgstr ""
423
+
424
+ #: d:\!!!!!!!!!\Free
425
+ #: Version\wck/wck-cptc.php:61
426
+ msgid "ex. View Books"
427
+ msgstr ""
428
+
429
+ #: d:\!!!!!!!!!\Free
430
+ #: Version\wck/wck-cptc.php:62
431
+ #: Version\wck/wck-ctc.php:41
432
+ msgid "Search Items"
433
+ msgstr ""
434
+
435
+ #: d:\!!!!!!!!!\Free
436
+ #: Version\wck/wck-cptc.php:62
437
+ msgid "ex. Search Books"
438
+ msgstr ""
439
+
440
+ #: d:\!!!!!!!!!\Free
441
+ #: Version\wck/wck-cptc.php:63
442
+ msgid "Not Found"
443
+ msgstr ""
444
+
445
+ #: d:\!!!!!!!!!\Free
446
+ #: Version\wck/wck-cptc.php:63
447
+ msgid "ex. No Books Found"
448
+ msgstr ""
449
+
450
+ #: d:\!!!!!!!!!\Free
451
+ #: Version\wck/wck-cptc.php:64
452
+ msgid "Not Found In Trash"
453
+ msgstr ""
454
+
455
+ #: d:\!!!!!!!!!\Free
456
+ #: Version\wck/wck-cptc.php:64
457
+ msgid "ex. No Books found in Trash"
458
+ msgstr ""
459
+
460
+ #: d:\!!!!!!!!!\Free
461
+ #: Version\wck/wck-cptc.php:65
462
+ #: Version\wck/wck-ctc.php:45
463
+ msgid "Parent Item Colon"
464
+ msgstr ""
465
+
466
+ #: d:\!!!!!!!!!\Free
467
+ #: Version\wck/wck-cptc.php:65
468
+ msgid "the parent text. This string isn't used on non-hierarchical types. In hierarchical ones the default is Parent Page "
469
+ msgstr ""
470
+
471
+ #: d:\!!!!!!!!!\Free
472
+ #: Version\wck/wck-cptc.php:66
473
+ #: Version\wck/wck-ctc.php:53
474
+ msgid "Menu Name"
475
+ msgstr ""
476
+
477
+ #: d:\!!!!!!!!!\Free
478
+ #: Version\wck/wck-cptc.php:68
479
+ #: Version\wck/wck-ctc.php:55
480
+ msgid "Public"
481
+ msgstr ""
482
+
483
+ #: d:\!!!!!!!!!\Free
484
+ #: Version\wck/wck-cptc.php:68
485
+ #: Version\wck/wck-ctc.php:55
486
+ msgid "Meta argument used to define default values for publicly_queriable, show_ui, show_in_nav_menus and exclude_from_search"
487
+ msgstr ""
488
+
489
+ #: d:\!!!!!!!!!\Free
490
+ #: Version\wck/wck-cptc.php:69
491
+ #: Version\wck/wck-ctc.php:56
492
+ msgid "Show UI"
493
+ msgstr ""
494
+
495
+ #: d:\!!!!!!!!!\Free
496
+ #: Version\wck/wck-cptc.php:69
497
+ #: Version\wck/wck-ctc.php:56
498
+ msgid "Whether to generate a default UI for managing this post type."
499
+ msgstr ""
500
+
501
+ #: d:\!!!!!!!!!\Free
502
+ #: Version\wck/wck-cptc.php:70
503
+ msgid "Show In Nav Menus"
504
+ msgstr ""
505
+
506
+ #: d:\!!!!!!!!!\Free
507
+ #: Version\wck/wck-cptc.php:70
508
+ msgid "Whether post_type is available for selection in navigation menus."
509
+ msgstr ""
510
+
511
+ #: d:\!!!!!!!!!\Free
512
+ #: Version\wck/wck-cptc.php:71
513
+ msgid "Show In Menu"
514
+ msgstr ""
515
+
516
+ #: d:\!!!!!!!!!\Free
517
+ #: Version\wck/wck-cptc.php:71
518
+ msgid "Whether to show the post type in the admin menu. show_ui must be true. \"false\" - do not display in the admin menu, \"true\" - display as a top level menu, \"some string\" - If an existing top level page such as \"tools.php\" or \"edit.php?post_type=page\", the post type will be placed as a sub menu of that."
519
+ msgstr ""
520
+
521
+ #: d:\!!!!!!!!!\Free
522
+ #: Version\wck/wck-cptc.php:72
523
+ msgid "Menu Position"
524
+ msgstr ""
525
+
526
+ #: d:\!!!!!!!!!\Free
527
+ #: Version\wck/wck-cptc.php:72
528
+ msgid "The position in the menu order the post type should appear."
529
+ msgstr ""
530
+
531
+ #: d:\!!!!!!!!!\Free
532
+ #: Version\wck/wck-cptc.php:73
533
+ msgid "Menu Icon"
534
+ msgstr ""
535
+
536
+ #: d:\!!!!!!!!!\Free
537
+ #: Version\wck/wck-cptc.php:73
538
+ msgid "The url to the icon to be used for this menu."
539
+ msgstr ""
540
+
541
+ #: d:\!!!!!!!!!\Free
542
+ #: Version\wck/wck-cptc.php:74
543
+ msgid "Capability Type"
544
+ msgstr ""
545
+
546
+ #: d:\!!!!!!!!!\Free
547
+ #: Version\wck/wck-cptc.php:74
548
+ msgid "The string to use to build the read, edit, and delete capabilities."
549
+ msgstr ""
550
+
551
+ #: d:\!!!!!!!!!\Free
552
+ #: Version\wck/wck-cptc.php:75
553
+ msgid "Taxonomies"
554
+ msgstr ""
555
+
556
+ #: d:\!!!!!!!!!\Free
557
+ #: Version\wck/wck-cptc.php:76
558
+ msgid "Rewrite"
559
+ msgstr ""
560
+
561
+ #: d:\!!!!!!!!!\Free
562
+ #: Version\wck/wck-cptc.php:76
563
+ msgid "Rewrite permalinks."
564
+ msgstr ""
565
+
566
+ #: d:\!!!!!!!!!\Free
567
+ #: Version\wck/wck-cptc.php:77
568
+ msgid "Rewrite Slug"
569
+ msgstr ""
570
+
571
+ #: d:\!!!!!!!!!\Free
572
+ #: Version\wck/wck-cptc.php:77
573
+ msgid "Defaults to post type name."
574
+ msgstr ""
575
+
576
+ #: d:\!!!!!!!!!\Free
577
+ #: Version\wck/wck-cptc.php:83
578
+ msgid "Custom Post Type Creation"
579
+ msgstr ""
580
+
581
+ #: d:\!!!!!!!!!\Free
582
+ #: Version\wck/wck-cptc.php:108
583
+ #: Version\wck/wck-ctc.php:91
584
+ msgid "Add New "
585
+ msgstr ""
586
+
587
+ #: d:\!!!!!!!!!\Free
588
+ #: Version\wck/wck-cptc.php:109
589
+ #: Version\wck/wck-ctc.php:89
590
+ msgid "Edit "
591
+ msgstr ""
592
+
593
+ #: d:\!!!!!!!!!\Free
594
+ #: Version\wck/wck-cptc.php:110
595
+ #: Version\wck/wck-ctc.php:92
596
+ msgid "New "
597
+ msgstr ""
598
+
599
+ #: d:\!!!!!!!!!\Free
600
+ #: Version\wck/wck-cptc.php:111
601
+ #: Version\wck/wck-ctc.php:86
602
+ msgid "All "
603
+ msgstr ""
604
+
605
+ #: d:\!!!!!!!!!\Free
606
+ #: Version\wck/wck-cptc.php:112
607
+ msgid "View "
608
+ msgstr ""
609
+
610
+ #: d:\!!!!!!!!!\Free
611
+ #: Version\wck/wck-cptc.php:113
612
+ #: Version\wck/wck-ctc.php:84
613
+ msgid "Search "
614
+ msgstr ""
615
+
616
+ #: d:\!!!!!!!!!\Free
617
+ #: Version\wck/wck-cptc.php:114
618
+ #: Version\wck/wck-cptc.php:115
619
+ msgid "No "
620
+ msgstr ""
621
+
622
+ #: d:\!!!!!!!!!\Free
623
+ #: Version\wck/wck-cptc.php:116
624
+ msgid "Parent Page"
625
+ msgstr ""
626
+
627
+ #: d:\!!!!!!!!!\Free
628
+ #: Version\wck/wck-cptc.php:169
629
+ #: Version\wck/wck-cptc.php:193
630
+ #: Version\wck/wck-ctc.php:134
631
+ #: Version\wck/wck-ctc.php:158
632
+ msgid "Show Advanced Label Options"
633
+ msgstr ""
634
+
635
+ #: d:\!!!!!!!!!\Free
636
+ #: Version\wck/wck-cptc.php:169
637
+ #: Version\wck/wck-cptc.php:193
638
+ #: Version\wck/wck-ctc.php:134
639
+ #: Version\wck/wck-ctc.php:158
640
+ msgid "Hide Advanced Label Options"
641
+ msgstr ""
642
+
643
+ #: d:\!!!!!!!!!\Free
644
+ #: Version\wck/wck-cptc.php:181
645
+ #: Version\wck/wck-cptc.php:207
646
+ #: Version\wck/wck-cptc.php:236
647
+ #: Version\wck/wck-ctc.php:146
648
+ #: Version\wck/wck-ctc.php:172
649
+ #: Version\wck/wck-ctc.php:201
650
+ msgid "Show Advanced Options"
651
+ msgstr ""
652
+
653
+ #: d:\!!!!!!!!!\Free
654
+ #: Version\wck/wck-cptc.php:181
655
+ #: Version\wck/wck-cptc.php:207
656
+ #: Version\wck/wck-cptc.php:236
657
+ #: Version\wck/wck-ctc.php:146
658
+ #: Version\wck/wck-ctc.php:172
659
+ #: Version\wck/wck-ctc.php:201
660
+ msgid "Hide Advanced Options"
661
+ msgstr ""
662
+
663
+ #: d:\!!!!!!!!!\Free
664
+ #: Version\wck/wck-cptc.php:222
665
+ #: Version\wck/wck-ctc.php:187
666
+ msgid "Show Advanced Labels"
667
+ msgstr ""
668
+
669
+ #: d:\!!!!!!!!!\Free
670
+ #: Version\wck/wck-cptc.php:222
671
+ #: Version\wck/wck-ctc.php:187
672
+ msgid "Hide Advanced Labels"
673
+ msgstr ""
674
+
675
+ #: d:\!!!!!!!!!\Free
676
+ #: Version\wck/wck-cptc.php:283
677
+ msgid "WCK Custom Post Type Creator allows you to easily create custom post types for Wordpress without any programming knowledge.<br />Most of the common options for creating a post type are displayed by default while the advanced options and label are just one click away."
678
+ msgstr ""
679
+
680
+ #: d:\!!!!!!!!!\Free
681
+ #: Version\wck/wck-cptc.php:288
682
+ #: Version\wck/wck-ctc.php:245
683
+ msgid "Labels"
684
+ msgstr ""
685
+
686
+ #: d:\!!!!!!!!!\Free
687
+ #: Version\wck/wck-cptc.php:289
688
+ msgid "For simplicity you are required to introduce only the Singular Label and Plural Label from wchich the rest of the labels will be formed.<br />For a more detailed control of the labels you just have to click the \"Show Advanced Label Options\" link and all the availabel labels will be displayed."
689
+ msgstr ""
690
+
691
+ #: d:\!!!!!!!!!\Free
692
+ #: Version\wck/wck-cptc.php:294
693
+ #: Version\wck/wck-ctc.php:251
694
+ msgid "Advanced Options"
695
+ msgstr ""
696
+
697
+ #: d:\!!!!!!!!!\Free
698
+ #: Version\wck/wck-cptc.php:295
699
+ msgid "The Advanced Options are set to the most common defaults for custom post types. To display them click the \"Show Advanced Options\" link."
700
+ msgstr ""
701
+
702
+ #: d:\!!!!!!!!!\Free
703
+ #: Version\wck/wck-ctc.php:6
704
+ msgid "WCK Taxonomy Creator"
705
+ msgstr ""
706
+
707
+ #: d:\!!!!!!!!!\Free
708
+ #: Version\wck/wck-ctc.php:7
709
+ #: Version\wck/wck-sas.php:95
710
+ msgid "Taxonomy Creator"
711
+ msgstr ""
712
+
713
+ #: d:\!!!!!!!!!\Free
714
+ #: Version\wck/wck-ctc.php:35
715
+ msgid "Taxonomy"
716
+ msgstr ""
717
+
718
+ #: d:\!!!!!!!!!\Free
719
+ #: Version\wck/wck-ctc.php:35
720
+ msgid "(The name of the taxonomy. Name must not contain capital letters or spaces.)"
721
+ msgstr ""
722
+
723
+ #: d:\!!!!!!!!!\Free
724
+ #: Version\wck/wck-ctc.php:36
725
+ msgid "ex. Writer"
726
+ msgstr ""
727
+
728
+ #: d:\!!!!!!!!!\Free
729
+ #: Version\wck/wck-ctc.php:37
730
+ msgid "ex. Writers"
731
+ msgstr ""
732
+
733
+ #: d:\!!!!!!!!!\Free
734
+ #: Version\wck/wck-ctc.php:38
735
+ msgid "Attach to"
736
+ msgstr ""
737
+
738
+ #: d:\!!!!!!!!!\Free
739
+ #: Version\wck/wck-ctc.php:39
740
+ msgid "Is this taxonomy hierarchical (have descendants) like categories or not hierarchical like tags."
741
+ msgstr ""
742
+
743
+ #: d:\!!!!!!!!!\Free
744
+ #: Version\wck/wck-ctc.php:41
745
+ msgid "ex. Search Writers"
746
+ msgstr ""
747
+
748
+ #: d:\!!!!!!!!!\Free
749
+ #: Version\wck/wck-ctc.php:42
750
+ msgid "Popular Items"
751
+ msgstr ""
752
+
753
+ #: d:\!!!!!!!!!\Free
754
+ #: Version\wck/wck-ctc.php:42
755
+ msgid "ex. Popular Writers"
756
+ msgstr ""
757
+
758
+ #: d:\!!!!!!!!!\Free
759
+ #: Version\wck/wck-ctc.php:43
760
+ msgid "ex. All Writers"
761
+ msgstr ""
762
+
763
+ #: d:\!!!!!!!!!\Free
764
+ #: Version\wck/wck-ctc.php:44
765
+ msgid "Parent Item"
766
+ msgstr ""
767
+
768
+ #: d:\!!!!!!!!!\Free
769
+ #: Version\wck/wck-ctc.php:44
770
+ msgid "ex. Parent Genre"
771
+ msgstr ""
772
+
773
+ #: d:\!!!!!!!!!\Free
774
+ #: Version\wck/wck-ctc.php:45
775
+ msgid "ex. Parent Genre:"
776
+ msgstr ""
777
+
778
+ #: d:\!!!!!!!!!\Free
779
+ #: Version\wck/wck-ctc.php:46
780
+ msgid "ex. Edit Writer"
781
+ msgstr ""
782
+
783
+ #: d:\!!!!!!!!!\Free
784
+ #: Version\wck/wck-ctc.php:47
785
+ msgid "Update Item"
786
+ msgstr ""
787
+
788
+ #: d:\!!!!!!!!!\Free
789
+ #: Version\wck/wck-ctc.php:47
790
+ msgid "ex. Update Writer"
791
+ msgstr ""
792
+
793
+ #: d:\!!!!!!!!!\Free
794
+ #: Version\wck/wck-ctc.php:48
795
+ msgid "ex. Add New Writer"
796
+ msgstr ""
797
+
798
+ #: d:\!!!!!!!!!\Free
799
+ #: Version\wck/wck-ctc.php:49
800
+ msgid "New Item Name"
801
+ msgstr ""
802
+
803
+ #: d:\!!!!!!!!!\Free
804
+ #: Version\wck/wck-ctc.php:49
805
+ msgid "ex. New Writer Name"
806
+ msgstr ""
807
+
808
+ #: d:\!!!!!!!!!\Free
809
+ #: Version\wck/wck-ctc.php:50
810
+ msgid "Separate Items With Commas"
811
+ msgstr ""
812
+
813
+ #: d:\!!!!!!!!!\Free
814
+ #: Version\wck/wck-ctc.php:50
815
+ msgid "ex. Separate writers with commas"
816
+ msgstr ""
817
+
818
+ #: d:\!!!!!!!!!\Free
819
+ #: Version\wck/wck-ctc.php:51
820
+ msgid "Add Or Remove Items"
821
+ msgstr ""
822
+
823
+ #: d:\!!!!!!!!!\Free
824
+ #: Version\wck/wck-ctc.php:51
825
+ msgid "ex. Add or remove writers"
826
+ msgstr ""
827
+
828
+ #: d:\!!!!!!!!!\Free
829
+ #: Version\wck/wck-ctc.php:52
830
+ msgid "Choose From Most Used"
831
+ msgstr ""
832
+
833
+ #: d:\!!!!!!!!!\Free
834
+ #: Version\wck/wck-ctc.php:52
835
+ msgid "ex. Choose from the most used writers"
836
+ msgstr ""
837
+
838
+ #: d:\!!!!!!!!!\Free
839
+ #: Version\wck/wck-ctc.php:57
840
+ msgid "Show Tagcloud"
841
+ msgstr ""
842
+
843
+ #: d:\!!!!!!!!!\Free
844
+ #: Version\wck/wck-ctc.php:57
845
+ msgid "Whether to allow the Tag Cloud widget to use this taxonomy."
846
+ msgstr ""
847
+
848
+ #: d:\!!!!!!!!!\Free
849
+ #: Version\wck/wck-ctc.php:62
850
+ msgid "Custom Taxonomy Creation"
851
+ msgstr ""
852
+
853
+ #: d:\!!!!!!!!!\Free
854
+ #: Version\wck/wck-ctc.php:85
855
+ msgid "Popular "
856
+ msgstr ""
857
+
858
+ #: d:\!!!!!!!!!\Free
859
+ #: Version\wck/wck-ctc.php:87
860
+ #: Version\wck/wck-ctc.php:88
861
+ msgid "Parent "
862
+ msgstr ""
863
+
864
+ #: d:\!!!!!!!!!\Free
865
+ #: Version\wck/wck-ctc.php:90
866
+ msgid "Update "
867
+ msgstr ""
868
+
869
+ #: d:\!!!!!!!!!\Free
870
+ #: Version\wck/wck-ctc.php:93
871
+ msgid "Separate "
872
+ msgstr ""
873
+
874
+ #: d:\!!!!!!!!!\Free
875
+ #: Version\wck/wck-ctc.php:94
876
+ msgid "Add or remove "
877
+ msgstr ""
878
+
879
+ #: d:\!!!!!!!!!\Free
880
+ #: Version\wck/wck-ctc.php:95
881
+ msgid "Choose from the most used "
882
+ msgstr ""
883
+
884
+ #: d:\!!!!!!!!!\Free
885
+ #: Version\wck/wck-ctc.php:240
886
+ msgid "WCK Custom Taxonomy Creator allows you to easily create custom taxonomy for Wordpress without any programming knowledge.<br />Most of the common options for creating a taxonomy are displayed by default while the advanced and label options are just one click away."
887
+ msgstr ""
888
+
889
+ #: d:\!!!!!!!!!\Free
890
+ #: Version\wck/wck-ctc.php:246
891
+ msgid "For simplicity you are required to introduce only the Singular Label and Plural Label from wchich the rest of the labels will be formed.<br />For a more detailed control of the labels you just have to click the \"Show Advanced Label Options\" link and all the availabel labels will be displayed"
892
+ msgstr ""
893
+
894
+ #: d:\!!!!!!!!!\Free
895
+ #: Version\wck/wck-ctc.php:252
896
+ msgid "The Advanced Options are set to the most common defaults for taxonomies. To display them click the \"Show Advanced Options\" link."
897
+ msgstr ""
898
+
899
+ #: d:\!!!!!!!!!\Free
900
+ #: Version\wck/wck-sas.php:15
901
+ msgid "Start Here & General Settings"
902
+ msgstr ""
903
+
904
+ #: d:\!!!!!!!!!\Free
905
+ #: Version\wck/wck-sas.php:16
906
+ msgid "Start and Settings"
907
+ msgstr ""
908
+
909
+ #: d:\!!!!!!!!!\Free
910
+ #: Version\wck/wck-sas.php:34
911
+ msgid "Serial Number"
912
+ msgstr ""
913
+
914
+ #: d:\!!!!!!!!!\Free
915
+ #: Version\wck/wck-sas.php:34
916
+ msgid "Please enter your serial number. For example: (e.g. WCKPRO-11-SN-251r55baa4fbe7bf595b2aabb8d72985)"
917
+ msgstr ""
918
+
919
+ #: d:\!!!!!!!!!\Free
920
+ #: Version\wck/wck-sas.php:40
921
+ msgid "Register Your Version"
922
+ msgstr ""
923
+
924
+ #: d:\!!!!!!!!!\Free
925
+ #: Version\wck/wck-sas.php:67
926
+ #, php-format
927
+ msgid "Welcome to %s"
928
+ msgstr ""
929
+
930
+ #: d:\!!!!!!!!!\Free
931
+ #: Version\wck/wck-sas.php:68
932
+ msgid "WCK helps you to improve the usability of the sites you build, making them manageable by your clients. Your very own repeater custom fields and groups, custom post type and taxonomy creator with front-end posting."
933
+ msgstr ""
934
+
935
+ #: d:\!!!!!!!!!\Free
936
+ #: Version\wck/wck-sas.php:69
937
+ #, php-format
938
+ msgid "Version %s"
939
+ msgstr ""
940
+
941
+ #: d:\!!!!!!!!!\Free
942
+ #: Version\wck/wck-sas.php:83
943
+ msgid "Quick Start-Up Guide"
944
+ msgstr ""
945
+
946
+ #: d:\!!!!!!!!!\Free
947
+ #: Version\wck/wck-sas.php:88
948
+ msgid "WordPress Creation Kit Pro has support for a wide list of custom fields: WYSIWYG Editor, Upload Field, Date, User, Country, Text Input, Textarea, Drop-Down, Select, Checkboxes, Radio Buttons"
949
+ msgstr ""
950
+
951
+ #: d:\!!!!!!!!!\Free
952
+ #: Version\wck/wck-sas.php:89
953
+ msgid "Access documentation <a href=\"http://www.cozmoslabs.com/wordpress-creation-kit/custom-fields-creator/\" target=\"_blank\">here</a> about how to display them in your templates."
954
+ msgstr ""
955
+
956
+ #: d:\!!!!!!!!!\Free
957
+ #: Version\wck/wck-sas.php:92
958
+ msgid "Create & manage all your custom content types"
959
+ msgstr ""
960
+
961
+ #: d:\!!!!!!!!!\Free
962
+ #: Version\wck/wck-sas.php:93
963
+ msgid "Access documentation <a href=\"http://www.cozmoslabs.com/wordpress-creation-kit/custom-post-type-creator/\" target=\"_blank\">here</a> about how to display them in your templates."
964
+ msgstr ""
965
+
966
+ #: d:\!!!!!!!!!\Free
967
+ #: Version\wck/wck-sas.php:96
968
+ msgid "Create new taxonomies for filtering your content"
969
+ msgstr ""
970
+
971
+ #: d:\!!!!!!!!!\Free
972
+ #: Version\wck/wck-sas.php:97
973
+ msgid "Access documentation <a href=\"http://www.cozmoslabs.com/wordpress-creation-kit/custom-taxonomy-creator/\" target=\"_blank\">here</a> about how to display them in your templates."
974
+ msgstr ""
975
+
976
+ #: d:\!!!!!!!!!\Free
977
+ #: Version\wck/wck-sas.php:99
978
+ msgid "Front-End Posting (available in the Pro version)"
979
+ msgstr ""
980
+
981
+ #: d:\!!!!!!!!!\Free
982
+ #: Version\wck/wck-sas.php:100
983
+ msgid "Create and edit posts/pages or custom posts directly from the front-end."
984
+ msgstr ""
985
+
986
+ #: d:\!!!!!!!!!\Free
987
+ #: Version\wck/wck-sas.php:101
988
+ msgid "Available shortcodes:"
989
+ msgstr ""
990
+
991
+ #: d:\!!!!!!!!!\Free
992
+ #: Version\wck/wck-sas.php:103
993
+ msgid "[fep form_name=\"front-end-post-name\"] - displayes your form in the front-end"
994
+ msgstr ""
995
+
996
+ #: d:\!!!!!!!!!\Free
997
+ #: Version\wck/wck-sas.php:104
998
+ msgid "[fep-dashboard] - the quick-dashboard allows: simple profile updates, editing/deletion of posts, pages and custom post types."
999
+ msgstr ""
1000
+
1001
+ #: d:\!!!!!!!!!\Free
1002
+ #: Version\wck/wck-sas.php:105
1003
+ msgid "[fep-lilo] - login/logout/register widget with the simple usage of a shortcode. Can be added in a page or text widget."
1004
+ msgstr ""
1005
+
1006
+ #: d:\!!!!!!!!!\Free
1007
+ #: Version\wck/wck-sas.php:107
1008
+ msgid "Access documentation <a href=\"http://www.cozmoslabs.com/wordpress-creation-kit/frontend-posting/\" target=\"_blank\">here</a> about how to display them in your templates."
1009
+ msgstr ""
1010
+
1011
+ #: d:\!!!!!!!!!\Free
1012
+ #: Version\wck/wck-sas.php:109
1013
+ msgid "Option Pages (available in the Pro version)"
1014
+ msgstr ""
1015
+
1016
+ #: d:\!!!!!!!!!\Free
1017
+ #: Version\wck/wck-sas.php:110
1018
+ msgid "The Options Page Creator Allows you to create a new menu item called \"Options\"(for example) which can hold advanced custom field groups. Perfect for theme options or a simple UI for your custom plugin (like a simple testimonials section in the front-end)."
1019
+ msgstr ""
1020
+
1021
+ #: d:\!!!!!!!!!\Free
1022
+ #: Version\wck/wck-sas.php:137
1023
+ msgid "Please enter your serial number to get access to automatic updates. If you do not have one, you can <a href=\"http://www.cozmoslabs.com/wordpress-creation-kit/\" target=\"_blank\">Get One Here</a>."
1024
+ msgstr ""
1025
+
1026
+ #: d:\!!!!!!!!!\Free
1027
+ #: Version\wck/wck-sas.php:139
1028
+ msgid "Oups! Our serial verification server is down. Please try again later."
1029
+ msgstr ""
1030
+
1031
+ #: d:\!!!!!!!!!\Free
1032
+ #: Version\wck/wck-sas.php:141
1033
+ msgid "Oups! It seems the serial number you entered was not found in our database. To find out what's your serial number log-in to <a href=\"http://www.cozmoslabs.com/account/\" target=\"_blank\">your account page</a> over at Cozmoslabs.com"
1034
+ msgstr ""
1035
+
1036
+ #: d:\!!!!!!!!!\Free
1037
+ #: Version\wck/wck-sas.php:143
1038
+ msgid "Wohoo! Your serial number is valid and you have access to automatic updates."
1039
+ msgstr ""
1040
+
1041
+ #: d:\!!!!!!!!!\Free
1042
+ #: Version\wck/wck-sas.php:145
1043
+ msgid "It seems your serial number has <strong>expired</strong>. You'll continue to get automatic updates if update your serial number for another year from <a href=\"http://www.cozmoslabs.com/account/\" target=\"_blank\"><strong>your account page</strong></a>."
1044
+ msgstr ""
1045
+
1046
+ #: d:\!!!!!!!!!\Free
1047
+ #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:282
1048
+ msgid "Add Entry"
1049
+ msgstr ""
1050
+
1051
+ #: d:\!!!!!!!!!\Free
1052
+ #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:332
1053
+ msgid "Save Changes"
1054
+ msgstr ""
1055
+
1056
+ #: d:\!!!!!!!!!\Free
1057
+ #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:333
1058
+ msgid "Cancel"
1059
+ msgstr ""
1060
+
1061
+ #: d:\!!!!!!!!!\Free
1062
+ #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:370
1063
+ msgid "Content"
1064
+ msgstr ""
1065
+
1066
+ #: d:\!!!!!!!!!\Free
1067
+ #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:370
1068
+ #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:433
1069
+ msgid "Edit"
1070
+ msgstr ""
1071
+
1072
+ #: d:\!!!!!!!!!\Free
1073
+ #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:370
1074
+ #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:434
1075
+ msgid "Delete"
1076
+ msgstr ""
1077
+
1078
+ #: d:\!!!!!!!!!\Free
1079
+ #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:433
1080
+ msgid "Edit this item"
1081
+ msgstr ""
1082
+
1083
+ #: d:\!!!!!!!!!\Free
1084
+ #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:434
1085
+ msgid "Delete this item"
1086
+ msgstr ""
1087
+
1088
+ #: d:\!!!!!!!!!\Free
1089
+ #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:506
1090
+ msgid "Please enter a value for the required field "
1091
+ msgstr ""
1092
+
1093
+ #: d:\!!!!!!!!!\Free
1094
+ #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:788
1095
+ msgid "Select File"
1096
+ msgstr ""
1097
+
1098
+ #: d:\!!!!!!!!!\Free
1099
+ #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:828
1100
+ #: Version\wck/wordpress-creation-kit-api/fields/upload.php:28
1101
+ msgid "Remove"
1102
+ msgstr ""
1103
+
1104
+ #: d:\!!!!!!!!!\Free
1105
+ #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:866
1106
+ msgid "Syncronize WCK"
1107
+ msgstr ""
1108
+
1109
+ #: d:\!!!!!!!!!\Free
1110
+ #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:878
1111
+ msgid "Syncronize WCK Translation"
1112
+ msgstr ""
1113
+
1114
+ #: d:\!!!!!!!!!\Free
1115
+ #: Version\wck/wordpress-creation-kit-api/fields/select.php:11
1116
+ msgid "...Chose"
1117
+ msgstr ""
1118
+
1119
+ #: d:\!!!!!!!!!\Free
1120
+ #: Version\wck/wordpress-creation-kit-api/fields/upload.php:40
1121
+ msgid "Upload "
1122
+ msgstr ""
1123
+
readme.txt ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === WCK - Custom Fields and Custom Post Types Creator ===
2
+
3
+ Contributors: reflectionmedia, madalin.ungureanu
4
+ Donate link: http://www.cozmoslabs.com/wordpress-creation-kit-sale-page/
5
+ Tags: custom fields, custom field, wordpress custom fields, advanced custom fields, custom post type, custom post types, post types, repeater fields, repeater, repeatable, meta box, meta boxes, 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.5.1
9
+ Stable tag: 1.0.1
10
+
11
+ A must have tool for creating custom fields, custom post types and taxonomies, fast and without any programming knowledge.
12
+
13
+
14
+ == Description ==
15
+
16
+ **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.
17
+
18
+ **WCK Custom Fields Creator** offers an UI for setting up custom meta boxes for your posts, pages or custom post types. Uses standard custom fields to store data.
19
+
20
+ **WCK Custom Post Type Creator** facilitates creating custom post types by providing an UI for most of the arguments of register_post_type() function.
21
+
22
+ **WCK Taxonomy Creator** allows you to easily create and edit custom taxonomies for WordPress without any programming knowledge. It provides an UI for most of the arguments of register_taxonomy() function.
23
+
24
+ = Custom Fields =
25
+ * Custom fields types: wysiwyg editor, upload, text, textarea, select, checkbox, radio
26
+ * Easy to create custom fields for any post type.
27
+ * Support for **Repeater Fields** and **Repeater Groups**.
28
+ * Drag and Drop to sort the Repeater Fields.
29
+ * Support for all input fields: text, textarea, select, checkbox, radio.
30
+ * Image / File upload supported via the WordPress Media Uploader.
31
+ * Possibility to target only certain page-templates, target certain custom post types and even unique ID's.
32
+ * All data handling is done with ajax
33
+ * Data is saved as postmeta
34
+
35
+ = Custom Post Types and Taxonomy =
36
+ * Create and edit Custom Post Types from the Admin UI
37
+ * Advanced Labeling Options
38
+ * Attach built in or custom taxonomies to post types
39
+ * Create and edit Custom Taxonomies from the Admin UI
40
+ * Attach the taxonomies to built in or custom post types
41
+
42
+ = WCK PRO =
43
+ The [PRO version](http://www.cozmoslabs.com/wordpress-creation-kit/) offers:
44
+
45
+ * Front-end Posting - form builder for content creation and editing
46
+ * Options Page Creator - create option pages for your theme or your plugin
47
+ * More field types: Datepicker, Country Select, User Select
48
+ * Premium Email Support for your project
49
+
50
+ [See complete list of features](http://www.cozmoslabs.com/wordpress-creation-kit-sale-page/)
51
+
52
+ = Website =
53
+ http://www.cozmoslabs.com/wordpress-creation-kit/
54
+
55
+ = Announcement Post and Video =
56
+ http://www.cozmoslabs.com/3747-wordpress-creation-kit-a-sparkling-new-custom-field-taxonomy-and-post-type-creator/
57
+
58
+ = Documentation =
59
+ http://www.cozmoslabs.com/wordpress-creation-kit/custom-fields-creator/
60
+
61
+ = Bug Submission and Forum Support =
62
+ http://www.cozmoslabs.com/forums/forum/wordpresscreationkit/
63
+
64
+ == Installation ==
65
+
66
+ 1. Upload the wordpress-creation-kit folder to the '/wp-content/plugins/' directory
67
+ 1. Activate the plugin through the 'Plugins' menu in WordPress
68
+ 1. Then navigate to WCK => Custom Fields Creator tab and start creating your custom fields, or navigate to WCK => Post Type Creator tab and start creating your custom post types or navigate to WCK => Taxonomy Creator tab and start creating your taxonomies.
69
+
70
+ == Frequently Asked Questions ==
71
+
72
+ = How do I display my custom fields in the front end? =
73
+
74
+ Let's consider we have a meta box with the following arguments:
75
+ - Meta name: books
76
+ - Post Type: post
77
+ And we also have two fields defined:
78
+ - A text custom field with the Field Title: Book name
79
+ - And another text custom field with the Field Title: Author name
80
+
81
+ You will notice that slugs will automatically be created for the two text fields. For 'Book name' the slug will be 'book-name' and for 'Author name' the slug will be 'author-name'
82
+
83
+ Let's see what the code for displaying the meta box values in single.php of your theme would be:
84
+
85
+ `<?php $books = get_post_meta( $post->ID, 'books', true );
86
+ foreach( $books as $book){
87
+ echo $book['book-name'] . '<br/>';
88
+ echo $book['author-name'] . '<br/>';
89
+ }?>`
90
+
91
+ So as you can see the Meta Name 'books' is used as the $key parameter of the function get_post_meta() and the slugs of the text fields are used as keys for the resulting array. Basically CFC stores the entries as custom fields in a multidimensional array. In our case the array would be:
92
+
93
+ `<?php array( array( "book-name" => "The Hitchhiker's Guide To The Galaxy", "author-name" => "Douglas Adams" ), array( "book-name" => "Ender's Game", "author-name" => "Orson Scott Card" ) );?>`
94
+
95
+ This is true even for single entries.
96
+
97
+ = How to query by post type in the front end? =
98
+
99
+ You can create new queries to display posts from a specific post type. This is done via the 'post_type' parameter to a WP_Query.
100
+
101
+ Example:
102
+
103
+ `<?php $args = array( 'post_type' => 'product', 'posts_per_page' => 10 );
104
+ $loop = new WP_Query( $args );
105
+ while ( $loop->have_posts() ) : $loop->the_post();
106
+ the_title();
107
+ echo '<div class="entry-content">';
108
+ the_content();
109
+ echo '</div>';
110
+ endwhile;?>`
111
+
112
+ This simply loops through the latest 10 product posts and displays the title and content of them.
113
+
114
+ = How do I list the taxonomies in the front end? =
115
+
116
+ If you want to have a custom list in your theme, then you can pass the taxonomy name into the the_terms() function in the Loop, like so:
117
+
118
+ `<?php the_terms( $post->ID, 'people', 'People: ', ', ', ' ' ); ?>`
119
+
120
+ That displays the list of People attached to each post.
121
+
122
+ = How do I query by taxonomy in the frontend? =
123
+
124
+ Creating a taxonomy generally automatically creates a special query variable using WP_Query class, which we can use to retrieve posts based on. For example, to pull a list of posts that have 'Bob' as a 'person' taxomony in them, we will use:
125
+
126
+ `<?php $query = new WP_Query( array( 'person' => 'bob' ) ); ?>`
127
+
128
+ ==Screenshots==
129
+ 1. Creating custom post types and taxonomies
130
+ 2. Creating custom fields and meta boxes
131
+ 3. List of Meta boxes
132
+ 4. Meta box with custom fields
133
+ 5. Defined custom fields
134
+ 6. Meta box arguments
135
+ 7. Post Type Creator UI
136
+ 8. Post Type Creator UI and listing
137
+ 9. Taxonomy Creator UI
138
+ 10. Taxonomy listing
139
+
140
+ == Changelog ==
141
+ = 1.0.1 =
142
+ * Fixed Menu Position argument for Custom Post Type Creator.
143
+ * Added filter for default_value.
144
+ * Fixed Template Select dropdown for Custom Fields Creator.
145
+ * Fixed a bug in Custom Fields Creator that prevented Options field in the process of creating custom fields from appearing.
screenshot-1.jpg ADDED
Binary file
screenshot-10.jpg ADDED
Binary file
screenshot-2.jpg ADDED
Binary file
screenshot-3.jpg ADDED
Binary file
screenshot-4.jpg ADDED
Binary file
screenshot-5.jpg ADDED
Binary file
screenshot-6.jpg ADDED
Binary file
screenshot-7.jpg ADDED
Binary file
screenshot-8.jpg ADDED
Binary file
screenshot-9.jpg ADDED
Binary file
wck-cfc.php ADDED
@@ -0,0 +1,591 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* Creates Custom Meta Box Fields for WordPress. It supports repeater fields and uses AJAX to handle data. */
3
+
4
+ /* Add Scripts */
5
+ add_action('admin_enqueue_scripts', 'wck_cfc_print_scripts' );
6
+ function wck_cfc_print_scripts($hook){
7
+ $post_type = $_GET['post_type'] ? $_GET['post_type'] : get_post_type( $_GET['post'] );
8
+ if( 'wck-meta-box' == $post_type ){
9
+ wp_register_style('wck-cfc-css', plugins_url('/css/wck-cfc.css', __FILE__));
10
+ wp_enqueue_style('wck-cfc-css');
11
+
12
+ wp_register_script('wck-cfc-js', plugins_url('/js/wck-cfc.js', __FILE__), array( 'jquery' ), '1.0' );
13
+ wp_enqueue_script('wck-cfc-js');
14
+ }
15
+ }
16
+
17
+ /* hook to create custom post types */
18
+ add_action( 'init', 'wck_cfc_create_custom_fields_cpt' );
19
+
20
+ function wck_cfc_create_custom_fields_cpt(){
21
+
22
+ $labels = array(
23
+ 'name' => _x( 'WCK Custom Meta Boxes', 'post type general name'),
24
+ 'singular_name' => _x( 'Custom Meta Box', 'post type singular name'),
25
+ 'add_new' => _x( 'Add New', 'Custom Meta Box' ),
26
+ 'add_new_item' => __( "Add New Meta Box", "wck" ),
27
+ 'edit_item' => __( "Edit Meta Box", "wck" ) ,
28
+ 'new_item' => __( "New Meta Box", "wck" ),
29
+ 'all_items' => __( "Custom Fields Creator", "wck" ),
30
+ 'view_item' => __( "View Meta Box", "wck" ),
31
+ 'search_items' => __( "Search Meta Boxes", "wck" ),
32
+ 'not_found' => __( "No Meta Boxes found", "wck" ),
33
+ 'not_found_in_trash' => __( "No Meta Boxes found in Trash", "wck" ),
34
+ 'parent_item_colon' => '',
35
+ 'menu_name' => __( "Custom Meta Boxes", "wck" )
36
+ );
37
+ $args = array(
38
+ 'labels' => $labels,
39
+ 'public' => true,
40
+ 'publicly_queryable' => false,
41
+ 'show_ui' => true,
42
+ 'show_in_menu' => 'wck-page',
43
+ 'has_archive' => false,
44
+ 'hierarchical' => false,
45
+ 'capability_type' => 'post',
46
+ 'supports' => array( 'title' )
47
+ );
48
+
49
+ register_post_type( 'wck-meta-box', $args );
50
+ }
51
+ /* Remove view action from post list view */
52
+ add_filter('post_row_actions','wck_cfc_remove_view_action');
53
+ function wck_cfc_remove_view_action($actions){
54
+ global $post;
55
+ if ($post->post_type =="wck-meta-box"){
56
+ unset( $actions['view'] );
57
+ }
58
+ return $actions;
59
+ }
60
+
61
+
62
+ /* create the meta box */
63
+ add_action( 'init', 'wck_cfc_create_box', 500 );
64
+ function wck_cfc_create_box(){
65
+ global $wpdb;
66
+
67
+ /* get post types */
68
+ $args = array(
69
+ 'public' => true
70
+ );
71
+ $output = 'objects'; // or objects
72
+ $post_types = get_post_types($args,$output);
73
+ $post_type_names = array();
74
+ foreach ($post_types as $post_type ) {
75
+ if ( $post_type->name != 'attachment' && $post_type->name != 'wck-meta-box' && $post_type->name != 'wck-frontend-posting' && $post_type->name != 'wck-option-page' && $post_type->name != 'wck-option-field' )
76
+ $post_type_names[] = $post_type->name;
77
+ }
78
+
79
+ /* get page templates */
80
+ $templates = wck_get_page_templates();
81
+
82
+ /* set up the fields array */
83
+ $cfc_box_args_fields = array(
84
+ array( 'type' => 'text', 'title' => __( 'Meta name', 'wck' ), 'description' => __( 'The name of the meta field. It is the name by which you will query the data in the frontend. Must be unique, only lowercase letters, no spaces and no special characters.', 'wck' ), 'required' => true ),
85
+ array( 'type' => 'select', 'title' => __( 'Post Type', 'wck' ), 'options' => $post_type_names, 'default-option' => true, 'description' => __( 'What post type the meta box should be attached to', 'wck' ), 'required' => true ),
86
+ array( 'type' => 'select', 'title' => __( 'Repeater', 'wck' ), 'options' => array( 'false', 'true' ), 'default' => 'false', 'description' => __( 'Whether the box supports just one entry or if it is a repeater field. By default it is a single field.', 'wck' ) ),
87
+ array( 'type' => 'select', 'title' => __( 'Sortable', 'wck' ), 'options' => array( 'true', 'false' ), 'default' => 'false', 'description' => __( 'Whether the entries are sortable or not. Thsi is valid for repeater fields.', 'wck' ) ),
88
+ array( 'type' => 'text', 'title' => __( 'Post ID', 'wck' ), 'description' => __( 'ID of a post on which the meta box should appear.', 'wck' ) )
89
+ );
90
+
91
+ if( !empty( $templates ) )
92
+ $cfc_box_args_fields[] = array( 'type' => 'select', 'title' => __( 'Page Template', 'wck' ), 'options' => $templates, 'default-option' => true, 'description' => __( 'If post type is "page" you can further select a page templete. The meta box will only appear on the page that has that selected page template.', 'wck' ) );
93
+
94
+ /* set up the box arguments */
95
+ $args = array(
96
+ 'metabox_id' => 'wck-cfc-args',
97
+ 'metabox_title' => __( 'Meta Box Arguments', 'wck' ),
98
+ 'post_type' => 'wck-meta-box',
99
+ 'meta_name' => 'wck_cfc_args',
100
+ 'meta_array' => $cfc_box_args_fields,
101
+ 'sortable' => false,
102
+ 'single' => true
103
+ );
104
+
105
+ /* create the box */
106
+ new Wordpress_Creation_Kit( $args );
107
+
108
+ /* set up field types */
109
+ $field_types = array( 'text', 'textarea', 'select', 'checkbox', 'radio', 'upload', 'wysiwyg editor', 'datepicker', 'country select', 'user select' );
110
+ $field_types = apply_filters( 'wck_field_types', $field_types );
111
+
112
+ /* set up the fields array */
113
+ $cfc_box_fields_fields = array(
114
+ array( 'type' => 'text', 'title' => __( 'Field Title', 'wck' ), 'description' => __( 'Title of the field. A slug will automatically be generated.', 'wck' ), 'required' => true ),
115
+ array( 'type' => 'select', 'title' => __( 'Field Type', 'wck' ), 'options' => $field_types, 'default-option' => true, 'description' => __( 'The field type', 'wck' ), 'required' => true ),
116
+ array( 'type' => 'textarea', 'title' => __( 'Description', 'wck' ), 'description' => 'The description of the field.' ),
117
+ array( 'type' => 'select', 'title' => __( 'Required', 'wck' ), 'options' => array( 'false', 'true' ), 'default' => 'false', 'description' => __( 'Whether the field is required or not', 'wck' ) ),
118
+ array( 'type' => 'text', 'title' => __( 'Default Value', 'wck' ), 'description' => __( 'Default value of the field. For Checkboxes if there are multiple values separete them with a ","', 'wck' ) ),
119
+ array( 'type' => 'text', 'title' => __( 'Options', 'wck' ), 'description' => __( 'Options for field types "select", "checkbox" and "radio". For multiple options separete 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' ) ),
120
+ 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' ) )
121
+ );
122
+
123
+
124
+ /* set up the box arguments */
125
+ $args = array(
126
+ 'metabox_id' => 'wck-cfc-fields',
127
+ 'metabox_title' => __( 'Meta Box Fields', 'wck' ),
128
+ 'post_type' => 'wck-meta-box',
129
+ 'meta_name' => 'wck_cfc_fields',
130
+ 'meta_array' => $cfc_box_fields_fields
131
+ );
132
+
133
+ /* create the box */
134
+ new Wordpress_Creation_Kit( $args );
135
+ }
136
+
137
+ /* advanced label options container for update form */
138
+ add_action( "wck_before_add_form_wck_cfc_args_element_0", 'wck_cfc_description_for_args_box' );
139
+ function wck_cfc_description_for_args_box(){
140
+ echo '<div class="cfc-message"><p>'. __( 'Enter below the arguments for the meta box.', 'wck' ) .'</p></div>';
141
+ }
142
+
143
+
144
+ /* advanced label options container for update form */
145
+ add_filter( "wck_before_update_form_wck_cfc_fields_element_1", 'wck_cfc_update_form_get_field_value', 10, 3 );
146
+ function wck_cfc_update_form_get_field_value( $form, $i, $value ){
147
+ $GLOBALS['wck_cfc_update_field_type'] = $value;
148
+ return $form;
149
+ }
150
+
151
+ add_filter( "wck_before_update_form_wck_cfc_fields_element_5", 'wck_cfc_update_form_option_wrapper_start', 10, 3 );
152
+ function wck_cfc_update_form_option_wrapper_start( $form, $i, $value ){
153
+ if( !in_array( $GLOBALS['wck_cfc_update_field_type'], array( 'select', 'checkbox', 'radio' ) ) )
154
+ $form .= '<div class="hide-options" style="display:none;">';
155
+ return $form;
156
+ }
157
+
158
+ add_filter( "wck_after_update_form_wck_cfc_fields_element_5", 'wck_cfc_update_form_option_wrapper_end', 10, 3 );
159
+ function wck_cfc_update_form_option_wrapper_end( $form, $i, $value ){
160
+ if( !in_array( $GLOBALS['wck_cfc_update_field_type'], array( 'select', 'checkbox', 'radio' ) ) )
161
+ $form .= '</div>';
162
+ return $form;
163
+ }
164
+
165
+ /* attach to post show or hide based on field typr */
166
+ add_filter( "wck_before_update_form_wck_cfc_fields_element_6", 'wck_cfc_update_form_attach_wrapper_start', 10, 3 );
167
+ function wck_cfc_update_form_attach_wrapper_start( $form, $i, $value ){
168
+ if( $GLOBALS['wck_cfc_update_field_type'] != 'upload' )
169
+ $form .= '<div class="hide-attach" style="display:none;">';
170
+ return $form;
171
+ }
172
+
173
+ add_filter( "wck_after_update_form_wck_cfc_fields_element_6", 'wck_cfc_update_form_attach_wrapper_end', 10, 3 );
174
+ function wck_cfc_update_form_attach_wrapper_end( $form, $i, $value ){
175
+ if( $GLOBALS['wck_cfc_update_field_type'] != 'upload' )
176
+ $form .= '</div>';
177
+ return $form;
178
+ }
179
+
180
+
181
+ /* display or show options based on the field type */
182
+ add_filter( "wck_before_listed_wck_cfc_fields_element_1", 'wck_cfc_display_label_wrapper_start', 10, 3 );
183
+ function wck_cfc_display_label_wrapper_start( $form, $i, $value ){
184
+ $GLOBALS['wck_cfc_field_type'] = $value;
185
+ return $form;
186
+ }
187
+
188
+ add_filter( "wck_before_listed_wck_cfc_fields_element_5", 'wck_cfc_display_label_wrapper_options_start', 10, 3 );
189
+ function wck_cfc_display_label_wrapper_options_start( $form, $i, $value ){
190
+ if( !in_array( $GLOBALS['wck_cfc_field_type'], array( 'select', 'checkbox', 'radio' ) ) )
191
+ $form .= '<div style="display:none;">';
192
+ return $form;
193
+ }
194
+
195
+ add_filter( "wck_after_listed_wck_cfc_fields_element_5", 'wck_cfc_display_label_wrapper_options_end', 10, 3 );
196
+ function wck_cfc_display_label_wrapper_options_end( $form, $i, $value ){
197
+ if( !in_array( $GLOBALS['wck_cfc_field_type'], array( 'select', 'checkbox', 'radio' ) ) )
198
+ $form .= '</div>';
199
+ return $form;
200
+ }
201
+
202
+ /* Show or hide attach field in list view */
203
+ add_filter( "wck_before_listed_wck_cfc_fields_element_6", 'wck_cfc_display_label_wrapper_attach_start', 10, 3 );
204
+ function wck_cfc_display_label_wrapper_attach_start( $form, $i, $value ){
205
+ if( $GLOBALS['wck_cfc_field_type'] != 'upload' )
206
+ $form .= '<div style="display:none;">';
207
+ return $form;
208
+ }
209
+
210
+ add_filter( "wck_after_listed_wck_cfc_fields_element_6", 'wck_cfc_display_label_wrapper_attach_end', 10, 3 );
211
+ function wck_cfc_display_label_wrapper_attach_end( $form, $i, $value ){
212
+ if( $GLOBALS['wck_cfc_field_type'] != 'upload' )
213
+ $form .= '</div>';
214
+ return $form;
215
+ }
216
+
217
+ /* Show the slug for field title */
218
+ add_filter( "wck_after_listed_wck_cfc_fields_element_0", 'wck_cfc_display_field_title_slug', 10, 3 );
219
+ function wck_cfc_display_field_title_slug( $form, $i, $value ){
220
+ $form .= '<li class="slug-title"><em>'. __( 'Slug:', 'wck' ) .'</em><span>'. sanitize_title_with_dashes( remove_accents( $value ) ) .'</span> '. __( '(Note:changing the slug when you already have a lot of existing entries may result in unexpected behavior.)', 'wck' ) .' </li>';
221
+ return $form;
222
+ }
223
+
224
+
225
+
226
+ /* add refresh to page */
227
+ add_action("wck_refresh_list_wck_cfc", "wck_cfc_after_refresh_list");
228
+ function wck_cfc_after_refresh_list(){
229
+ echo '<script type="text/javascript">window.location="'. get_admin_url() . 'admin.php?page=cfc-page&updated=true' .'";</script>';
230
+ }
231
+
232
+ /* hook to create custom meta boxes */
233
+ add_action( 'admin_init', 'wck_cfc_create_boxes' );
234
+
235
+ function wck_cfc_create_boxes_args(){
236
+ $args = array(
237
+ 'post_type' => 'wck-meta-box',
238
+ 'numberposts' => -1
239
+ );
240
+
241
+ $all_meta_boxes = get_posts( $args );
242
+
243
+ $all_box_args = array();
244
+
245
+ foreach( $all_meta_boxes as $meta_box ){
246
+ $wck_cfc_args = get_post_meta( $meta_box->ID, 'wck_cfc_args', true );
247
+ $wck_cfc_fields = get_post_meta( $meta_box->ID, 'wck_cfc_fields', true );
248
+
249
+ $box_title = get_the_title( $meta_box->ID );
250
+ /* treat case where the post has no title */
251
+ if( empty( $box_title ) )
252
+ $box_title = '(no title)';
253
+
254
+ $fields_array = array();
255
+ if( !empty( $wck_cfc_fields ) ){
256
+ foreach( $wck_cfc_fields as $wck_cfc_field ){
257
+ $fields_inner_array = array( 'type' => $wck_cfc_field['field-type'], 'title' => $wck_cfc_field['field-title'] );
258
+ if( !empty( $wck_cfc_field['description'] ) )
259
+ $fields_inner_array['description'] = $wck_cfc_field['description'];
260
+ if( !empty( $wck_cfc_field['required'] ) )
261
+ $fields_inner_array['required'] = $wck_cfc_field['required'] == 'false' ? false : true;
262
+ if( !empty( $wck_cfc_field['default-value'] ) )
263
+ $fields_inner_array['default'] = $wck_cfc_field['default-value'];
264
+ if( !empty( $wck_cfc_field['options'] ) ){
265
+ $fields_inner_array['options'] = explode( ',', $wck_cfc_field['options'] );
266
+
267
+ foreach( $fields_inner_array['options'] as $key => $value ){
268
+ $fields_inner_array['options'][$key] = trim( $value );
269
+ }
270
+
271
+ }
272
+ if( !empty( $wck_cfc_field['attach-upload-to-post'] ) )
273
+ $fields_inner_array['attach_to_post'] = $wck_cfc_field['attach-upload-to-post'] == 'yes' ? true : false;
274
+
275
+ $fields_array[] = $fields_inner_array;
276
+ }
277
+ }
278
+
279
+ if( !empty( $wck_cfc_args ) ){
280
+ foreach( $wck_cfc_args as $wck_cfc_arg ){
281
+
282
+ /* metabox_id must be different from meta_name */
283
+ $metabox_id = sanitize_title_with_dashes( remove_accents ( $box_title ) );
284
+ if( $wck_cfc_arg['meta-name'] == $metabox_id )
285
+ $metabox_id = 'wck-'. $metabox_id;
286
+
287
+ $box_args = array(
288
+ 'metabox_id' => $metabox_id,
289
+ 'metabox_title' => $box_title,
290
+ 'post_type' => $wck_cfc_arg['post-type'],
291
+ 'meta_name' => $wck_cfc_arg['meta-name'],
292
+ 'meta_array' => $fields_array
293
+ );
294
+ if( !empty( $wck_cfc_arg['sortable'] ) )
295
+ $box_args['sortable'] = $wck_cfc_arg['sortable'] == 'false' ? false : true;
296
+
297
+ if( !empty( $wck_cfc_arg['repeater'] ) )
298
+ $box_args['single'] = $wck_cfc_arg['repeater'] == 'false' ? true : false;
299
+
300
+ if( !empty( $wck_cfc_arg['post-id'] ) )
301
+ $box_args['post_id'] = $wck_cfc_arg['post-id'];
302
+
303
+ if( !empty( $wck_cfc_arg['page-template'] ) )
304
+ $box_args['page_template'] = $wck_cfc_arg['page-template'];
305
+
306
+ $all_box_args[] = apply_filters( "wck_cfc_box_args_".$wck_cfc_arg['meta-name'], $box_args );
307
+ }
308
+ }
309
+ }
310
+ return $all_box_args;
311
+ }
312
+
313
+ function wck_cfc_create_boxes(){
314
+ $all_box_args = wck_cfc_create_boxes_args();
315
+ if( !empty( $all_box_args ) ){
316
+ foreach( $all_box_args as $box_args ){
317
+ new Wordpress_Creation_Kit( $box_args );
318
+ }
319
+ }
320
+ }
321
+
322
+ /* Meta Name Verification */
323
+ add_filter( 'wck_required_test_wck_cfc_args_meta-name', 'wck_cfc_ceck_meta_name', 10, 3 );
324
+ function wck_cfc_ceck_meta_name( $bool, $value, $post_id ){
325
+ global $wpdb;
326
+
327
+ $wck_cfc_args = get_post_meta( $post_id, 'wck_cfc_args', true );
328
+
329
+ if( empty( $wck_cfc_args ) ){
330
+ //this is the add case
331
+ $check_meta_existance = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(meta_key) FROM $wpdb->postmeta WHERE meta_key = '$value'" ) );
332
+ }
333
+ else{
334
+ //this is the update case
335
+ if( $wck_cfc_args[0]['meta-name'] != $value ){
336
+ $check_meta_existance = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(meta_key) FROM $wpdb->postmeta WHERE meta_key = '$value'" ) );
337
+ }
338
+ else
339
+ $check_meta_existance = false;
340
+ }
341
+
342
+ if( strpos( $value, ' ' ) === false )
343
+ $contains_spaces = false;
344
+ else
345
+ $contains_spaces = true;
346
+
347
+ return ( $check_meta_existance || empty($value) || $contains_spaces );
348
+ }
349
+
350
+ add_filter( 'wck_required_message_wck_cfc_args_meta-name', 'wck_cfc_change_meta_message', 10, 2 );
351
+ function wck_cfc_change_meta_message( $message, $value ){
352
+ if( empty( $value ) )
353
+ return $message;
354
+ else if( strpos( $value, ' ' ) !== false )
355
+ return __( "Choose a different Meta Name as this one contains spaces\n", "wck" );
356
+ else
357
+ return __( "Choose a different Meta Name as this one already exists\n", "wck" );
358
+ }
359
+
360
+ /* Add the separete meta for post type, post id and page template */
361
+ add_action( 'wck_before_add_meta', 'wck_cfc_add_separate_meta', 10, 3 );
362
+ function wck_cfc_add_separate_meta( $meta, $id, $values ){
363
+ if( $meta == 'wck_cfc_args' ){
364
+ // Post Type
365
+ if( !empty( $values['post-type'] ) ){
366
+ update_post_meta( $id, 'wck_cfc_post_type_arg', $values['post-type'] );
367
+ }
368
+
369
+ // Post Id
370
+ if( !empty( $values['post-id'] ) ){
371
+ update_post_meta( $id, 'wck_cfc_post_id_arg', $values['post-id'] );
372
+ }
373
+
374
+ // Page Template
375
+ if( !empty( $values['page-template'] ) ){
376
+ update_post_meta( $id, 'wck_cfc_page_template_arg', $values['page-template'] );
377
+ }
378
+ }
379
+ }
380
+
381
+ /* Change meta_key in db if field changed and also update the separete meta for post type, post id and page template */
382
+ add_action( 'wck_before_update_meta', 'wck_cfc_change_meta_key', 10, 4 );
383
+ function wck_cfc_change_meta_key( $meta, $id, $values, $element_id ){
384
+ global $wpdb;
385
+ if( $meta == 'wck_cfc_args' ){
386
+ $wck_cfc_args = get_post_meta( $id, 'wck_cfc_args', true );
387
+
388
+ if( $wck_cfc_args[0]['meta-name'] != $values['meta-name'] ){
389
+ $wpdb->update(
390
+ $wpdb->postmeta,
391
+ array( 'meta_key' => $values['meta-name'] ),
392
+ array( 'meta_key' => $wck_cfc_args[0]['meta-name'] )
393
+ );
394
+ }
395
+
396
+ // Post Type
397
+ if( $wck_cfc_args[0]['post-type'] != $values['post-type'] ){
398
+ update_post_meta( $id, 'wck_cfc_post_type_arg', $values['post-type'] );
399
+ }
400
+
401
+ // Post Id
402
+ if( $wck_cfc_args[0]['post-id'] != $values['post-id'] ){
403
+ update_post_meta( $id, 'wck_cfc_post_id_arg', $values['post-id'] );
404
+ }
405
+
406
+ // Page Template
407
+ if( $wck_cfc_args[0]['page-template'] != $values['page-template'] ){
408
+ update_post_meta( $id, 'wck_cfc_page_template_arg', $values['page-template'] );
409
+ }
410
+ }
411
+ }
412
+
413
+ /* Change Field Title in db if field changed */
414
+ add_action( 'wck_before_update_meta', 'wck_cfc_change_field_title', 10, 4 );
415
+ function wck_cfc_change_field_title( $meta, $id, $values, $element_id ){
416
+ global $wpdb;
417
+ if( $meta == 'wck_cfc_fields' ){
418
+ $wck_cfc_fields = get_post_meta( $id, 'wck_cfc_fields', true );
419
+
420
+ if( $wck_cfc_fields[$element_id]['field-title'] != $values['field-title'] ){
421
+
422
+ $wck_cfc_args = get_post_meta( $id, 'wck_cfc_args', true );
423
+ $meta_name = $wck_cfc_args[0]['meta-name'];
424
+ $post_id_with_this_meta = $wpdb->get_results( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '$meta_name'" ) );
425
+
426
+ foreach( $post_id_with_this_meta as $post ){
427
+ $results = get_post_meta( $post->post_id, $meta_name, true );
428
+ foreach( $results as $key => $result ){
429
+ $results[$key][ sanitize_title_with_dashes( remove_accents( $values['field-title'] ) ) ] = $results[$key][ sanitize_title_with_dashes( remove_accents( $wck_cfc_fields[$element_id]['field-title'] ) ) ];
430
+ unset( $results[$key][ sanitize_title_with_dashes( remove_accents( $wck_cfc_fields[$element_id]['field-title'] ) ) ] );
431
+ }
432
+ update_post_meta( $post->post_id, $meta_name, $results );
433
+ }
434
+ }
435
+ }
436
+ }
437
+
438
+ /* Add Custom columns to listing */
439
+ add_filter("manage_wck-meta-box_posts_columns", "wck_cfc_edit_columns" );
440
+ function wck_cfc_edit_columns($columns){
441
+ $columns['cfc-id'] = __( "Id", "wck" );
442
+ $columns['cfc-post-type'] = __( "Post Type", "wck" );
443
+ $columns['cfc-page-template'] = __( "Page Template", "wck" );
444
+ return $columns;
445
+ }
446
+
447
+ /* Register the column as sortable */
448
+ add_filter( 'manage_edit-wck-meta-box_sortable_columns', 'wck_cfc_register_sortable_columns' );
449
+ function wck_cfc_register_sortable_columns( $columns ) {
450
+ $columns['cfc-id'] = 'cfc-id';
451
+ $columns['cfc-post-type'] = 'cfc-post-type';
452
+ $columns['cfc-page-template'] = 'cfc-page-template';
453
+
454
+ return $columns;
455
+ }
456
+
457
+ /* Tell WordPress how to handle the sorting */
458
+ add_filter( 'request', 'wck_cfc_column_orderby' );
459
+ function wck_cfc_column_orderby( $vars ) {
460
+ if ( isset( $vars['orderby'] ) && 'cfc-id' == $vars['orderby'] ) {
461
+ $vars = array_merge( $vars, array(
462
+ 'meta_key' => 'wck_cfc_post_id_arg',
463
+ 'orderby' => 'meta_value_num'
464
+ ) );
465
+ }
466
+
467
+ if ( isset( $vars['orderby'] ) && 'cfc-post-type' == $vars['orderby'] ) {
468
+ $vars = array_merge( $vars, array(
469
+ 'meta_key' => 'wck_cfc_post_type_arg',
470
+ 'orderby' => 'meta_value'
471
+ ) );
472
+ }
473
+
474
+ if ( isset( $vars['orderby'] ) && 'cfc-page-template' == $vars['orderby'] ) {
475
+ $vars = array_merge( $vars, array(
476
+ 'meta_key' => 'wck_cfc_page_template_arg',
477
+ 'orderby' => 'meta_value'
478
+ ) );
479
+ }
480
+
481
+ return $vars;
482
+ }
483
+
484
+ /* Let's set up what to display in the columns */
485
+ add_action("manage_wck-meta-box_posts_custom_column", "wck_cfc_custom_columns", 10, 2);
486
+ function wck_cfc_custom_columns( $column_name, $post_id ){
487
+ if( $column_name == 'cfc-id' ){
488
+ $post_id_arg = get_post_meta( $post_id, 'wck_cfc_post_id_arg', true );
489
+ echo $post_id_arg;
490
+ }
491
+
492
+ if( $column_name == 'cfc-post-type' ){
493
+ $post_type_arg = get_post_meta( $post_id, 'wck_cfc_post_type_arg', true );
494
+ echo $post_type_arg;
495
+ }
496
+
497
+ if( $column_name == 'cfc-page-template' ){
498
+ $page_template_arg = get_post_meta( $post_id, 'wck_cfc_page_template_arg', true );
499
+ echo $page_template_arg;
500
+ }
501
+ }
502
+
503
+ /* Add side metaboxes */
504
+ add_action('add_meta_boxes', 'wck_cfc_add_side_boxes' );
505
+ function wck_cfc_add_side_boxes(){
506
+ add_meta_box( 'wck-cfc-side', __( 'Wordpress Creation Kit', 'wck' ), 'wck_cfc_side_box_one', 'wck-meta-box', 'side', 'low' );
507
+ }
508
+ function wck_cfc_side_box_one(){
509
+ ?>
510
+ <a href="http://www.cozmoslabs.com/wordpress-creation-kit/"><img src="<?php echo plugins_url('/images/banner_pro.png', __FILE__) ?>" width="260" height="385" alt="WCK-PRO"/></a>
511
+ <?php
512
+ }
513
+
514
+
515
+ /* Contextual Help */
516
+ add_action('current_screen', 'wck_cfc_help');
517
+
518
+ function wck_cfc_help () {
519
+ $screen = get_current_screen();
520
+ /*
521
+ * Check if current screen is wck_page_cptc-page
522
+ * Don't add help tab if it's not
523
+ */
524
+ if ( $screen->id != 'wck-meta-box' )
525
+ return;
526
+
527
+ // Add help tabs
528
+ $screen->add_help_tab( array(
529
+ 'id' => 'wck_cfc_overview',
530
+ 'title' => __( 'Overview', 'wck' ),
531
+ 'content' => '<p>' . __( 'WCK Custom Fields Creator allows you to easily create custom meta boxes for Wordpress without any programming knowledge.', 'wck' ) . '</p>',
532
+ ) );
533
+
534
+ $screen->add_help_tab( array(
535
+ 'id' => 'wck_cfc_arguments',
536
+ 'title' => __( 'Meta Box Arguments', 'wck' ),
537
+ 'content' => '<p>' . __( 'Define here the rules for the meta box. This rules are used to set up where the meta box will appear, it\'s type and also the meta key name stored in the database. The name of the entry (Enter title here) will be used as the meta box title.', 'wck' ) . '</p>',
538
+ ) );
539
+
540
+ $screen->add_help_tab( array(
541
+ 'id' => 'wck_cfc_fields',
542
+ 'title' => __( 'Meta Box Fields', 'wck' ),
543
+ 'content' => '<p>' . __( 'Define here the fields contained in the meta box. From "Field Title" a slug will be automatically generated and you will use this slug to display the data in the frontend.', 'wck' ) . '</p>',
544
+ ) );
545
+
546
+ $screen->add_help_tab( array(
547
+ 'id' => 'wck_cfc_example',
548
+ 'title' => __( 'CFC Frontend Example', 'wck' ),
549
+ 'content' => '<p>' . __( 'Let\'s consider we have a meta box with the following arguments:<br /> - Meta name: books <br /> - Post Type: post <br />And we also have two fields deffined:<br /> - A text field with the Field Title: Book name <br /> - And another text field with the Field Title: Author name ', 'wck' ) . '</p>' . '<p>' . __( 'You will notice that slugs will automatically be created for the two text fields. For "Book name" the slug will be "book-name" and for "Author name" the slug will be "author-name"', 'wck' ) . '</p>' . '<p>' . __( 'Let\'s see what the code for displaying the meta box values in single.php of your theme would be:', 'wck' ) . '</p>' . '<pre>' . '$books = get_post_meta( $post->ID, \'books\', true ); <br />foreach( $books as $book){<br /> echo $book[\'book-name\'];<br / > echo $book[\'author-name\'];<br />}' . '</pre>' . '<p>' . __( 'So as you can see the Meta Name "books" is used as the $key parameter of the funtion <a href="http://codex.wordpress.org/Function_Reference/get_post_meta" target="_blank">get_post_meta()</a> and the slugs of the text fields are used as keys for the resulting array. Basically CFC stores the entries as post meta in a multidimensioanl array. In our case the array would be: <br /><pre>array( array( "book-name" => "The Hitchhiker\'s Guide To The Galaxy", "author-name" => "Douglas Adams" ), array( "book-name" => "Ender\'s Game", "author-name" => "Orson Scott Card" ) );</pre> This is true even for single entries.', 'wck' ) . '</p>'
550
+ ) );
551
+ }
552
+
553
+ /**
554
+ * Get the Page Templates available in the current theme
555
+ *
556
+ * Based on wordpress get_page_templates()
557
+ *
558
+ * @return array Key is the template name, value is the %Template Name%filename string format of the template
559
+ */
560
+ function wck_get_page_templates() {
561
+
562
+ $page_templates = array();
563
+ $theme_templates = array_flip(wp_get_theme()->get_page_templates());
564
+ if( !empty( $theme_templates ) ){
565
+ foreach( $theme_templates as $key => $value){
566
+ $page_templates[$key] = "%$key%$value";
567
+ }
568
+ }
569
+ return $page_templates;
570
+ }
571
+
572
+ /* Filter post update message */
573
+ add_filter( 'post_updated_messages', 'wck_cfc_filter_post_update_message' );
574
+ function wck_cfc_filter_post_update_message($messages){
575
+ $messages['wck-meta-box'] = array(
576
+ 0 => '', // Unused. Messages start at index 1.
577
+ 1 => __('Metabox updated.', 'wck')
578
+ );
579
+ return $messages;
580
+ }
581
+
582
+ /* Filter Field Types for free version */
583
+ add_filter( 'wck_field_types', 'wck_cfc_filter_field_types' );
584
+ function wck_cfc_filter_field_types( $field_types ){
585
+ $wck_premium_update = WCK_PLUGIN_DIR.'/update/';
586
+ if ( !file_exists ($wck_premium_update . 'update-checker.php'))
587
+ $field_types = array( 'text', 'textarea', 'select', 'checkbox', 'radio', 'upload', 'wysiwyg editor' );
588
+
589
+ return $field_types;
590
+ }
591
+ ?>
wck-cptc.php ADDED
@@ -0,0 +1,298 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* Creates Custom Post Types for WordPress */
3
+
4
+
5
+ $args = array(
6
+ 'page_title' => __( 'WCK Post Type Creator', 'wck' ),
7
+ 'menu_title' => __( 'Post Type Creator', 'wck' ),
8
+ 'capability' => 'edit_theme_options',
9
+ 'menu_slug' => 'cptc-page',
10
+ 'page_type' => 'submenu_page',
11
+ 'parent_slug' => 'wck-page',
12
+ 'priority' => 8,
13
+ 'page_icon' => plugins_url('/images/wck-32x32.png', __FILE__)
14
+ );
15
+ $cptc_page = new WCK_Page_Creator( $args );
16
+
17
+
18
+ /* Add Scripts */
19
+ add_action('admin_enqueue_scripts', 'wck_cptc_print_scripts' );
20
+ function wck_cptc_print_scripts($hook){
21
+ if( 'wck_page_cptc-page' == $hook ){
22
+ wp_register_style('wck-cptc-css', plugins_url('/css/wck-cptc.css', __FILE__));
23
+ wp_enqueue_style('wck-cptc-css');
24
+ }
25
+ }
26
+
27
+ /* create the meta box only for admins ( 'capability' => 'edit_theme_options' ) */
28
+ add_action( 'init', 'wck_cptc_create_box', 11 );
29
+ function wck_cptc_create_box(){
30
+
31
+ if( is_admin() && current_user_can( 'edit_theme_options' ) ){
32
+ /* get registered taxonomies */
33
+ $args = array(
34
+ 'public' => true
35
+ );
36
+ $output = 'objects';
37
+ $taxonomies = get_taxonomies($args,$output);
38
+ $taxonomie_names = array();
39
+
40
+ foreach ($taxonomies as $taxonomie ) {
41
+ if ( $taxonomie->name != 'nav_menu' && $taxonomie->name != 'post_format')
42
+ $taxonomie_names[] = $taxonomie->name;
43
+ }
44
+
45
+ /* set up the fields array */
46
+ $cpt_creation_fields = array(
47
+ array( 'type' => 'text', 'title' => __( 'Post type', 'wck' ), 'description' => __( '(max. 20 characters, can not contain capital letters, hyphens, or spaces)', 'wck' ), 'required' => true ),
48
+ array( 'type' => 'textarea', 'title' => __( 'Description', 'wck' ), 'description' => __( 'A short descriptive summary of what the post type is.', 'wck' ) ),
49
+ array( 'type' => 'text', 'title' => __( 'Singular Label', 'wck' ), 'required' => true, 'description' => __( 'ex. Book', 'wck' ) ),
50
+ array( 'type' => 'text', 'title' => __( 'Plural Label', 'wck' ), 'required' => true, 'description' => __( 'ex. Books', 'wck' ) ),
51
+ array( 'type' => 'select', 'title' => __( 'Hierarchical', 'wck' ), 'options' => array( 'false', 'true' ), 'default' => 'false', 'description' => __( 'Whether the post type is hierarchical. Allows Parent to be specified.', 'wck' ) ),
52
+ array( 'type' => 'select', 'title' => __( 'Has Archive', 'wck' ), 'options' => array( 'false', 'true' ), 'default' => 'false', 'description' => __( 'Enables post type archives. Will use string as archive slug. Will generate the proper rewrite rules if rewrite is enabled.', 'wck' ) ),
53
+ array( 'type' => 'checkbox', 'title' => __( 'Supports', 'wck' ), 'options' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'page-attributes', 'post-formats' ), 'default' =>'title, editor' ),
54
+
55
+
56
+ array( 'type' => 'text', 'title' => __( 'Add New', 'wck' ), 'description' => __( 'ex. Add New', 'wck' ) ),
57
+ array( 'type' => 'text', 'title' => __( 'Add New Item', 'wck' ), 'description' => __( 'ex. Add New Book', 'wck' ) ),
58
+ array( 'type' => 'text', 'title' => __( 'Edit Item', 'wck' ), 'description' => __( 'ex. Edit Book', 'wck' ) ),
59
+ array( 'type' => 'text', 'title' => __( 'New Item', 'wck' ), 'description' => __( 'ex. New Book', 'wck' ) ),
60
+ array( 'type' => 'text', 'title' => __( 'All Items', 'wck' ), 'description' => __( 'ex. All Books', 'wck' ) ),
61
+ array( 'type' => 'text', 'title' => __( 'View Items', 'wck' ), 'description' => __( 'ex. View Books', 'wck' ) ),
62
+ array( 'type' => 'text', 'title' => __( 'Search Items', 'wck' ), 'description' => __( 'ex. Search Books', 'wck' ) ),
63
+ array( 'type' => 'text', 'title' => __( 'Not Found', 'wck' ), 'description' => __( 'ex. No Books Found', 'wck' ) ),
64
+ array( 'type' => 'text', 'title' => __( 'Not Found In Trash', 'wck' ), 'description' => __( 'ex. No Books found in Trash', 'wck' ) ),
65
+ array( 'type' => 'text', 'title' => __( 'Parent Item Colon', 'wck' ), 'description' => __( 'the parent text. This string isn\'t used on non-hierarchical types. In hierarchical ones the default is Parent Page ', 'wck' ) ),
66
+ array( 'type' => 'text', 'title' => __( 'Menu Name', 'wck' ) ),
67
+
68
+ array( 'type' => 'select', 'title' => __( 'Public', 'wck' ), 'options' => array( 'false', 'true' ), 'default' => 'true', 'description' => __( 'Meta argument used to define default values for publicly_queriable, show_ui, show_in_nav_menus and exclude_from_search', 'wck' ) ),
69
+ array( 'type' => 'select', 'title' => __( 'Show UI', 'wck' ), 'options' => array( 'false', 'true' ), 'default' => 'true', 'description' => __( 'Whether to generate a default UI for managing this post type.', 'wck' ) ),
70
+ array( 'type' => 'select', 'title' => __( 'Show In Nav Menus', 'wck' ), 'options' => array( 'false', 'true' ), 'default' => 'true', 'description' => __( 'Whether post_type is available for selection in navigation menus.', 'wck' ) ),
71
+ array( 'type' => 'text', 'title' => __( 'Show In Menu', 'wck' ), 'default' => 'true', 'description' => __( 'Whether to show the post type in the admin menu. show_ui must be true. "false" - do not display in the admin menu, "true" - display as a top level menu, "some string" - If an existing top level page such as "tools.php" or "edit.php?post_type=page", the post type will be placed as a sub menu of that.', 'wck' ) ),
72
+ array( 'type' => 'text', 'title' => __( 'Menu Position', 'wck' ), 'description' => __( 'The position in the menu order the post type should appear.', 'wck' ) ),
73
+ array( 'type' => 'text', 'title' => __( 'Menu Icon', 'wck' ), 'description' => __( 'The url to the icon to be used for this menu.', 'wck' ) ),
74
+ array( 'type' => 'text', 'title' => __( 'Capability Type', 'wck' ), 'description' => __( 'The string to use to build the read, edit, and delete capabilities.', 'wck' ), 'default' => 'post' ),
75
+ array( 'type' => 'checkbox', 'title' => __( 'Taxonomies', 'wck' ), 'options' => $taxonomie_names ),
76
+ array( 'type' => 'select', 'title' => __( 'Rewrite', 'wck' ), 'options' => array( 'false', 'true' ), 'default' => 'true', 'description' => __( 'Rewrite permalinks.', 'wck' ) ),
77
+ array( 'type' => 'text', 'title' => __( 'Rewrite Slug', 'wck' ), 'description' => __( 'Defaults to post type name.', 'wck' ) )
78
+ );
79
+
80
+ /* set up the box arguments */
81
+ $args = array(
82
+ 'metabox_id' => 'option_page',
83
+ 'metabox_title' => __( 'Custom Post Type Creation', 'wck' ),
84
+ 'post_type' => 'cptc-page',
85
+ 'meta_name' => 'wck_cptc',
86
+ 'meta_array' => $cpt_creation_fields,
87
+ 'context' => 'option',
88
+ 'sortable' => false
89
+ );
90
+
91
+ /* create the box */
92
+ new Wordpress_Creation_Kit( $args );
93
+ }
94
+ }
95
+
96
+ /* hook to create custom post types */
97
+ add_action( 'init', 'wck_cptc_create_cpts' );
98
+
99
+ function wck_cptc_create_cpts(){
100
+ $cpts = get_option('wck_cptc');
101
+ if( !empty( $cpts ) ){
102
+ foreach( $cpts as $cpt ){
103
+
104
+ $labels = array(
105
+ 'name' => _x( $cpt['plural-label'], 'post type general name'),
106
+ 'singular_name' => _x( $cpt['singular-label'], 'post type singular name'),
107
+ 'add_new' => _x( $cpt['add-new'] ? $cpt['add-new'] : 'Add New', strtolower( $cpt['singular-label'] ) ),
108
+ 'add_new_item' => __( $cpt['add-new-item'] ? $cpt['add-new-item'] : "Add New ".$cpt['singular-label']),
109
+ 'edit_item' => __( $cpt['edit-item'] ? $cpt['edit-item'] : "Edit ".$cpt['singular-label'], 'wck' ) ,
110
+ 'new_item' => __( $cpt['new-item'] ? $cpt['new-item'] : "New ".$cpt['singular-label'], 'wck' ),
111
+ 'all_items' => __( $cpt['all-items'] ? $cpt['all-items'] : "All ".$cpt['plural-label'] , 'wck'),
112
+ 'view_item' => __( $cpt['view-item'] ? $cpt['view-item'] : "View ".$cpt['singular-label'] , 'wck'),
113
+ 'search_items' => __( $cpt['search-items'] ? $cpt['search-items'] : "Search ".$cpt['plural-label'], 'wck' ),
114
+ 'not_found' => __( $cpt['not-found'] ? $cpt['not-found'] : "No ". strtolower( $cpt['plural-label'] ) ." found", 'wck' ),
115
+ 'not_found_in_trash' => __( $cpt['not-found-in-trash'] ? $cpt['not-found-in-trash'] : "No ". strtolower( $cpt['plural-label'] ) ." found in Trash", 'wck' ),
116
+ 'parent_item_colon' => __( $cpt['parent-item-colon'] ? $cpt['parent-item-colon'] : "Parent Page", 'wck' ),
117
+ 'menu_name' => $cpt['menu-name'] ? $cpt['menu-name'] : $cpt['plural-label']
118
+ );
119
+ $args = array(
120
+ 'labels' => $labels,
121
+ 'public' => $cpt['public'] == 'false' ? false : true,
122
+ 'description' => $cpt['description'],
123
+ 'publicly_queryable' => true,
124
+ 'show_ui' => $cpt['show-ui'] == 'false' ? false : true,
125
+ 'show_in_nav_menus' => $cpt['show-in-nav-menus'] == 'false' ? false : true,
126
+ 'show_in_menu' => $cpt['show-in-menu'] == 'true' ? true : $cpt['show-in-menu'],
127
+ 'has_archive' => $cpt['has-archive'] == 'false' ? false : true,
128
+ 'hierarchical' => $cpt['hierarchical'] == 'false' ? false : true,
129
+ 'supports' => explode( ', ', $cpt['supports'] )
130
+ );
131
+
132
+ if( !empty( $cpt['menu-position'] ) )
133
+ $args['menu_position'] = intval( $cpt['menu-position'] );
134
+
135
+ if( has_filter( "wck_cptc_capabilities_{$cpt['post-type']}" ) )
136
+ $args['capabilities'] = apply_filters( "wck_cptc_capabilities_{$cpt['post-type']}", $cpt['capability-type'] );
137
+ else
138
+ $args['capability_type'] = $cpt['capability-type'];
139
+
140
+ if( !empty( $cpt['taxonomies'] ) )
141
+ $args['taxonomies'] = explode( ', ', $cpt['taxonomies'] );
142
+
143
+ if( !empty( $cpt['menu-icon'] ) )
144
+ $args['menu_icon'] = $cpt['menu-icon'];
145
+
146
+ if( $cpt['rewrite'] == 'false' )
147
+ $args['rewrite'] = $cpt['rewrite'] == 'false' ? false : true;
148
+ else{
149
+ if( !empty( $cpt['rewrite-slug'] ) )
150
+ $args['rewrite'] = array('slug' => $cpt['rewrite-slug']);
151
+ }
152
+
153
+
154
+ register_post_type( $cpt['post-type'], $args );
155
+ }
156
+ }
157
+ }
158
+
159
+ /* Flush rewrite rules */
160
+ add_action('init', 'cptc_flush_rules', 20);
161
+ function cptc_flush_rules(){
162
+ if( isset( $_GET['page'] ) && $_GET['page'] == 'cptc-page' && isset( $_GET['updated'] ) && $_GET['updated'] == 'true' )
163
+ flush_rewrite_rules( false );
164
+ }
165
+
166
+ /* advanced labels container for add form */
167
+ add_action( "wck_before_add_form_wck_cptc_element_7", 'wck_cptc_form_label_wrapper_start' );
168
+ function wck_cptc_form_label_wrapper_start(){
169
+ echo '<li><a href="javascript:void(0)" onclick="jQuery(\'#cptc-advanced-label-options-container\').toggle(); if( jQuery(this).text() == \''. __( 'Show Advanced Label Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Hide Advanced Label Options', 'wck' ) .'\'); else if( jQuery(this).text() == \''. __( 'Hide Advanced Label Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Show Advanced Label Options', 'wck' ) .'\');">'. __('Show Advanced Label Options', 'wck' ) .'</a></li>';
170
+ echo '<li id="cptc-advanced-label-options-container" style="display:none;"><ul>';
171
+ }
172
+
173
+ add_action( "wck_after_add_form_wck_cptc_element_17", 'wck_cptc_form_label_wrapper_end' );
174
+ function wck_cptc_form_label_wrapper_end(){
175
+ echo '</ul></li>';
176
+ }
177
+
178
+ /* advanced options container for add form */
179
+ add_action( "wck_before_add_form_wck_cptc_element_18", 'wck_cptc_form_wrapper_start' );
180
+ function wck_cptc_form_wrapper_start(){
181
+ echo '<li><a href="javascript:void(0)" onclick="jQuery(\'#cptc-advanced-options-container\').toggle(); if( jQuery(this).text() == \''. __('Show Advanced Options', 'wck' ) .'\' ) jQuery(this).text(\'Hide Advanced Options\'); else if( jQuery(this).text() == \''. __('Hide Advanced Options', 'wck' ) .'\' ) jQuery(this).text(\''. __('Show Advanced Options', 'wck' ) .'\');">'. __('Show Advanced Options', 'wck' ) .'</a></li>';
182
+ echo '<li id="cptc-advanced-options-container" style="display:none;"><ul>';
183
+ }
184
+
185
+ add_action( "wck_after_add_form_wck_cptc_element_27", 'wck_cptc_form_wrapper_end' );
186
+ function wck_cptc_form_wrapper_end(){
187
+ echo '</ul></li>';
188
+ }
189
+
190
+ /* advanced label options container for update form */
191
+ add_filter( "wck_before_update_form_wck_cptc_element_7", 'wck_cptc_update_form_label_wrapper_start', 10, 2 );
192
+ function wck_cptc_update_form_label_wrapper_start( $form, $i ){
193
+ $form .= '<li><a href="javascript:void(0)" onclick="jQuery(\'#cptc-advanced-label-options-update-container-'.$i.'\').toggle(); if( jQuery(this).text() == \''. __( 'Show Advanced Label Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Hide Advanced Label Options', 'wck' ) .'\'); else if( jQuery(this).text() == \''. __( 'Hide Advanced Label Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Show Advanced Label Options', 'wck' ) .'\');">'. __( 'Show Advanced Label Options', 'wck' ) .'</a></li>';
194
+ $form .= '<li id="cptc-advanced-label-options-update-container-'.$i.'" style="display:none;"><ul>';
195
+ return $form;
196
+ }
197
+
198
+ add_filter( "wck_after_update_form_wck_cptc_element_17", 'wck_cptc_update_form_label_wrapper_end', 10, 2 );
199
+ function wck_cptc_update_form_label_wrapper_end( $form, $i ){
200
+ $form .= '</ul></li>';
201
+ return $form;
202
+ }
203
+
204
+ /* advanced options container for update form */
205
+ add_filter( "wck_before_update_form_wck_cptc_element_18", 'wck_cptc_update_form_wrapper_start', 10, 2 );
206
+ function wck_cptc_update_form_wrapper_start( $form, $i ){
207
+ $form .= '<li><a href="javascript:void(0)" onclick="jQuery(\'#cptc-advanced-options-update-container-'.$i.'\').toggle(); if( jQuery(this).text() == \''. __( 'Show Advanced Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Hide Advanced Options', 'wck' ) .'\'); else if( jQuery(this).text() == \''. __( 'Hide Advanced Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Show Advanced Options', 'wck' ) .'\');">'. __( 'Show Advanced Options', 'wck' ) .'</a></li>';
208
+ $form .= '<li id="cptc-advanced-options-update-container-'.$i.'" style="display:none;"><ul>';
209
+ return $form;
210
+ }
211
+
212
+ add_filter( "wck_after_update_form_wck_cptc_element_27", 'wck_cptc_update_form_wrapper_end', 10, 2 );
213
+ function wck_cptc_update_form_wrapper_end( $form, $i ){
214
+ $form .= '</ul></li>';
215
+ return $form;
216
+ }
217
+
218
+
219
+ /* advanced label options container for display */
220
+ add_filter( "wck_before_listed_wck_cptc_element_7", 'wck_cptc_display_label_wrapper_start', 10, 2 );
221
+ function wck_cptc_display_label_wrapper_start( $form, $i ){
222
+ $form .= '<li><a href="javascript:void(0)" onclick="jQuery(\'#cptc-advanced-label-options-display-container-'.$i.'\').toggle(); if( jQuery(this).text() == \''. __( 'Show Advanced Labels', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Hide Advanced Labels', 'wck' ) .'\'); else if( jQuery(this).text() == \''. __( 'Hide Advanced Labels', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Show Advanced Labels', 'wck' ) .'\');">'. __( 'Show Advanced Labels', 'wck' ) .'</a></li>';
223
+ $form .= '<li id="cptc-advanced-label-options-display-container-'.$i.'" style="display:none;"><ul>';
224
+ return $form;
225
+ }
226
+
227
+ add_filter( "wck_after_listed_wck_cptc_element_17", 'wck_cptc_display_label_wrapper_end', 10, 2 );
228
+ function wck_cptc_display_label_wrapper_end( $form, $i ){
229
+ $form .= '</ul></li>';
230
+ return $form;
231
+ }
232
+
233
+ /* advanced options container for display */
234
+ add_filter( "wck_before_listed_wck_cptc_element_18", 'wck_cptc_display_adv_wrapper_start', 10, 2 );
235
+ function wck_cptc_display_adv_wrapper_start( $form, $i ){
236
+ $form .= '<li><a href="javascript:void(0)" onclick="jQuery(\'#cptc-advanced-options-display-container-'.$i.'\').toggle(); if( jQuery(this).text() == \''. __( 'Show Advanced Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Hide Advanced Options', 'wck' ) .'\'); else if( jQuery(this).text() == \''. __( 'Hide Advanced Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Show Advanced Options', 'wck' ) .'\');">'. __( 'Show Advanced Options', 'wck' ) .'</a></li>';
237
+ $form .= '<li id="cptc-advanced-options-display-container-'.$i.'" style="display:none;"><ul>';
238
+ return $form;
239
+ }
240
+
241
+ add_filter( "wck_after_listed_wck_cptc_element_27", 'wck_cptc_display_adv_wrapper_end', 10, 2 );
242
+ function wck_cptc_display_adv_wrapper_end( $form, $i ){
243
+ $form .= '</ul></li>';
244
+ return $form;
245
+ }
246
+
247
+ /* add refresh to page */
248
+ add_action("wck_refresh_list_wck_cptc", "wck_cptc_after_refresh_list");
249
+ add_action("wck_refresh_entry_wck_cptc", "wck_cptc_after_refresh_list");
250
+ function wck_cptc_after_refresh_list(){
251
+ echo '<script type="text/javascript">window.location="'. get_admin_url() . 'admin.php?page=cptc-page&updated=true' .'";</script>';
252
+ }
253
+
254
+ /* Add side metaboxes */
255
+ add_action('add_meta_boxes', 'wck_cptc_add_side_boxes' );
256
+ function wck_cptc_add_side_boxes(){
257
+ add_meta_box( 'wck-cptc-side', __( 'Wordpress Creation Kit', 'wck' ), 'wck_cptc_side_box_one', 'wck_page_cptc-page', 'side', 'high' );
258
+ }
259
+ function wck_cptc_side_box_one(){
260
+ ?>
261
+ <a href="http://www.cozmoslabs.com/wordpress-creation-kit/"><img src="<?php echo plugins_url('/images/banner_pro.png', __FILE__) ?>" width="260" height="385" alt="WCK-PRO"/></a>
262
+ <?php
263
+ }
264
+
265
+
266
+ /* Contextual Help */
267
+ add_action('load-wck_page_cptc-page', 'wck_cptc_help');
268
+
269
+ function wck_cptc_help () {
270
+ $screen = get_current_screen();
271
+
272
+ /*
273
+ * Check if current screen is wck_page_cptc-page
274
+ * Don't add help tab if it's not
275
+ */
276
+ if ( $screen->id != 'wck_page_cptc-page' )
277
+ return;
278
+
279
+ // Add help tabs
280
+ $screen->add_help_tab( array(
281
+ 'id' => 'wck_cptc_overview',
282
+ 'title' => __('Overview', 'wck' ),
283
+ 'content' => '<p>' . __( 'WCK Custom Post Type Creator allows you to easily create custom post types for Wordpress without any programming knowledge.<br />Most of the common options for creating a post type are displayed by default while the advanced options and label are just one click away.', 'wck' ) . '</p>',
284
+ ) );
285
+
286
+ $screen->add_help_tab( array(
287
+ 'id' => 'wck_cptc_labels',
288
+ 'title' => __( 'Labels', 'wck' ),
289
+ 'content' => '<p>' . __( 'For simplicity you are required to introduce only the Singular Label and Plural Label from wchich the rest of the labels will be formed.<br />For a more detailed control of the labels you just have to click the "Show Advanced Label Options" link and all the availabel labels will be displayed.', 'wck' ) . '</p>',
290
+ ) );
291
+
292
+ $screen->add_help_tab( array(
293
+ 'id' => 'wck_cptc_advanced',
294
+ 'title' => __('Advanced Options', 'wck' ),
295
+ 'content' => '<p>' . __( 'The Advanced Options are set to the most common defaults for custom post types. To display them click the "Show Advanced Options" link.', 'wck' ) . '</p>',
296
+ ) );
297
+ }
298
+ ?>
wck-ctc.php ADDED
@@ -0,0 +1,255 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* Creates Custom Taxonomies for WordPress */
3
+
4
+ /* Create the CTC Page only for admins ( 'capability' => 'edit_theme_options' ) */
5
+ $args = array(
6
+ 'page_title' => __( 'WCK Taxonomy Creator', 'wck' ),
7
+ 'menu_title' => __( 'Taxonomy Creator', 'wck' ),
8
+ 'capability' => 'edit_theme_options',
9
+ 'menu_slug' => 'ctc-page',
10
+ 'page_type' => 'submenu_page',
11
+ 'parent_slug' => 'wck-page',
12
+ 'priority' => 9,
13
+ 'page_icon' => plugins_url('/images/wck-32x32.png', __FILE__)
14
+ );
15
+ new WCK_Page_Creator( $args );
16
+
17
+ /* create the meta box only for admins ( 'capability' => 'edit_theme_options' ) */
18
+ add_action( 'init', 'wck_ctc_create_box', 11 );
19
+ function wck_ctc_create_box(){
20
+
21
+ if( is_admin() && current_user_can( 'edit_theme_options' ) ){
22
+ $args = array(
23
+ 'public' => true
24
+ );
25
+ $output = 'objects'; // or objects
26
+ $post_types = get_post_types($args,$output);
27
+ $post_type_names = array();
28
+ foreach ($post_types as $post_type ) {
29
+ if ( $post_type->name != 'attachment' && $post_type->name != 'wck-meta-box' && $post_type->name != 'wck-frontend-posting' && $post_type->name != 'wck-option-page' && $post_type->name != 'wck-option-field' )
30
+ $post_type_names[] = $post_type->name;
31
+ }
32
+
33
+
34
+ $ct_creation_fields = array(
35
+ array( 'type' => 'text', 'title' => __( 'Taxonomy', 'wck' ), 'description' => __( '(The name of the taxonomy. Name must not contain capital letters or spaces.)', 'wck' ), 'required' => true ),
36
+ array( 'type' => 'text', 'title' => __( 'Singular Label', 'wck' ), 'required' => true, 'description' => __( 'ex. Writer', 'wck' ) ),
37
+ array( 'type' => 'text', 'title' => __( 'Plural Label', 'wck' ), 'required' => true, 'description' => __( 'ex. Writers', 'wck' ) ),
38
+ array( 'type' => 'checkbox', 'title' => __( 'Attach to', 'wck' ), 'options' => $post_type_names ),
39
+ array( 'type' => 'select', 'title' => __( 'Hierarchical', 'wck' ), 'options' => array( 'false', 'true' ), 'default' => 'false', 'description' => __( 'Is this taxonomy hierarchical (have descendants) like categories or not hierarchical like tags.', 'wck' ) ),
40
+
41
+ array( 'type' => 'text', 'title' => __( 'Search Items', 'wck' ), 'description' => __( 'ex. Search Writers', 'wck' ) ),
42
+ array( 'type' => 'text', 'title' => __( 'Popular Items', 'wck' ), 'description' => __( 'ex. Popular Writers', 'wck' ) ),
43
+ array( 'type' => 'text', 'title' => __( 'All Items', 'wck' ), 'description' => __( 'ex. All Writers', 'wck' ) ),
44
+ array( 'type' => 'text', 'title' => __( 'Parent Item', 'wck' ), 'description' => __( 'ex. Parent Genre', 'wck' ) ),
45
+ array( 'type' => 'text', 'title' => __( 'Parent Item Colon', 'wck' ), 'description' => __( 'ex. Parent Genre:', 'wck' ) ),
46
+ array( 'type' => 'text', 'title' => __( 'Edit Item', 'wck' ), 'description' => __( 'ex. Edit Writer', 'wck' ) ),
47
+ array( 'type' => 'text', 'title' => __( 'Update Item', 'wck' ), 'description' => __( 'ex. Update Writer', 'wck' ) ),
48
+ array( 'type' => 'text', 'title' => __( 'Add New Item', 'wck' ), 'description' => __( 'ex. Add New Writer', 'wck' ) ),
49
+ array( 'type' => 'text', 'title' => __( 'New Item Name', 'wck' ), 'description' => __( 'ex. New Writer Name', 'wck' ) ),
50
+ array( 'type' => 'text', 'title' => __( 'Separate Items With Commas', 'wck' ), 'description' => __( 'ex. Separate writers with commas', 'wck' ) ),
51
+ array( 'type' => 'text', 'title' => __( 'Add Or Remove Items', 'wck' ), 'description' => __( 'ex. Add or remove writers', 'wck' ) ),
52
+ array( 'type' => 'text', 'title' => __( 'Choose From Most Used', 'wck' ), 'description' => __( 'ex. Choose from the most used writers', 'wck' ) ),
53
+ array( 'type' => 'text', 'title' => __( 'Menu Name', 'wck' ) ),
54
+
55
+ array( 'type' => 'select', 'title' => __( 'Public', 'wck' ), 'options' => array( 'false', 'true' ), 'default' => 'true', 'description' => __( 'Meta argument used to define default values for publicly_queriable, show_ui, show_in_nav_menus and exclude_from_search', 'wck' ) ),
56
+ array( 'type' => 'select', 'title' => __( 'Show UI', 'wck' ), 'options' => array( 'false', 'true' ), 'default' => 'true', 'description' => __( 'Whether to generate a default UI for managing this post type.', 'wck' ) ),
57
+ array( 'type' => 'select', 'title' => __( 'Show Tagcloud', 'wck' ), 'options' => array( 'false', 'true' ), 'default' => 'true', 'description' => __( 'Whether to allow the Tag Cloud widget to use this taxonomy.', 'wck' ) )
58
+ );
59
+
60
+ $args = array(
61
+ 'metabox_id' => 'ctc_creation_box',
62
+ 'metabox_title' => __( 'Custom Taxonomy Creation', 'wck' ),
63
+ 'post_type' => 'ctc-page',
64
+ 'meta_name' => 'wck_ctc',
65
+ 'meta_array' => $ct_creation_fields,
66
+ 'context' => 'option'
67
+ );
68
+
69
+
70
+ new Wordpress_Creation_Kit( $args );
71
+ }
72
+ }
73
+
74
+ add_action( 'init', 'wck_ctc_create_taxonomy' );
75
+
76
+ function wck_ctc_create_taxonomy(){
77
+ $cts = get_option('wck_ctc');
78
+ if( !empty( $cts ) ){
79
+ foreach( $cts as $ct ){
80
+
81
+ $labels = array(
82
+ 'name' => _x( $ct['plural-label'], 'taxonomy general name' ),
83
+ 'singular_name' => _x( $ct['singular-label'], 'taxonomy singular name'),
84
+ 'search_items' => __( $ct['search-items'] ? $ct['search-items'] : 'Search '.$ct['plural-label'], 'wck' ),
85
+ 'popular_items' => __( $ct['popular-items'] ? $ct['popular-items'] : "Popular ".$ct['plural-label'], 'wck' ),
86
+ 'all_items' => __( $ct['all-items'] ? $ct['all-items'] : "All ".$ct['plural-label'], 'wck' ) ,
87
+ 'parent_item' => __( $ct['parent-item'] ? $ct['parent-item'] : "Parent ".$ct['singular-label'], 'wck' ),
88
+ 'parent_item_colon' => __( $ct['parent-item-colon'] ? $ct['parent-item-colon'] : "Parent ".$ct['singular-label'].':', 'wck' ),
89
+ 'edit_item' => __( $ct['edit-item'] ? $ct['edit-item'] : "Edit ".$ct['singular-label'], 'wck' ),
90
+ 'update_item' => __( $ct['update-item'] ? $ct['update-item'] : "Update ".$ct['singular-label'], 'wck' ),
91
+ 'add_new_item' => __( $ct['add-new-item'] ? $ct['add-new-item'] : "Add New ". $ct['singular-label'], 'wck' ),
92
+ 'new_item_name' => __( $ct['new-item-name'] ? $ct['new-item-name'] : "New ". $ct['singular-label']. ' Name', 'wck' ),
93
+ 'separate_items_with_commas' => __( $ct['separate-items-with-commas'] ? $ct['separate-items-with-commas'] : "Separate ". strtolower( $ct['plural-label'] ). ' with commas', 'wck' ),
94
+ 'add_or_remove_items' => __( $ct['add-or-remove-items'] ? $ct['add-or-remove-items'] : "Add or remove " .strtolower( $ct['plural-label'] ), 'wck' ),
95
+ 'choose_from_most_used' => __( $ct['choose-from-most-used'] ? $ct['choose-from-most-used'] : "Choose from the most used " .strtolower( $ct['plural-label'] ), 'wck' ),
96
+ 'menu_name' => $ct['menu-name'] ? $ct['menu-name'] : $ct['plural-label']
97
+ );
98
+
99
+ $args = array(
100
+ 'labels' => $labels,
101
+ 'public' => $ct['public'] == 'false' ? false : true,
102
+ 'show_ui' => $ct['show-ui'] == 'false' ? false : true,
103
+ 'hierarchical' => $ct['hierarchical'] == 'false' ? false : true,
104
+ 'show_tagcloud' => $ct['show-tagcloud'] == 'false' ? false : true
105
+ );
106
+
107
+ if( !empty( $ct['attach-to'] ) )
108
+ $object_type = explode( ', ', $ct['attach-to'] );
109
+ else
110
+ $object_type = '';
111
+
112
+ register_taxonomy( $ct['taxonomy'], $object_type, $args );
113
+ }
114
+ }
115
+ }
116
+
117
+ /* Flush rewrite rules */
118
+ add_action('init', 'ctc_flush_rules', 20);
119
+ function ctc_flush_rules(){
120
+ if( isset( $_GET['page'] ) && $_GET['page'] == 'ctc-page' && isset( $_GET['updated'] ) && $_GET['updated'] == 'true' )
121
+ flush_rewrite_rules( false );
122
+ }
123
+
124
+ /* add refresh to page */
125
+ add_action("wck_refresh_list_wck_ctc", "wck_ctc_after_refresh_list");
126
+ add_action("wck_refresh_entry_wck_ctc", "wck_ctc_after_refresh_list");
127
+ function wck_ctc_after_refresh_list(){
128
+ echo '<script type="text/javascript">window.location="'. get_admin_url() . 'admin.php?page=ctc-page&updated=true' .'";</script>';
129
+ }
130
+
131
+ /* advanced labels container for add form */
132
+ add_action( "wck_before_add_form_wck_ctc_element_5", 'wck_ctc_form_label_wrapper_start' );
133
+ function wck_ctc_form_label_wrapper_start(){
134
+ echo '<li><a href="javascript:void(0)" onclick="jQuery(\'#ctc-advanced-label-options-container\').toggle(); if( jQuery(this).text() == \''. __( 'Show Advanced Label Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Hide Advanced Label Options', 'wck' ) .'\'); else if( jQuery(this).text() == \''. __( 'Hide Advanced Label Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Show Advanced Label Options', 'wck' ) .'\');">'. __( 'Show Advanced Label Options', 'wck' ) .'</a></li>';
135
+ echo '<li id="ctc-advanced-label-options-container" style="display:none;"><ul>';
136
+ }
137
+
138
+ add_action( "wck_after_add_form_wck_ctc_element_17", 'wck_ctc_form_label_wrapper_end' );
139
+ function wck_ctc_form_label_wrapper_end(){
140
+ echo '</ul></li>';
141
+ }
142
+
143
+ /* advanced options container for add form */
144
+ add_action( "wck_before_add_form_wck_ctc_element_18", 'wck_ctc_form_wrapper_start' );
145
+ function wck_ctc_form_wrapper_start(){
146
+ echo '<li><a href="javascript:void(0)" onclick="jQuery(\'#ctc-advanced-options-container\').toggle(); if( jQuery(this).text() == \''. __( 'Show Advanced Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Hide Advanced Options', 'wck' ) .'\'); else if( jQuery(this).text() == \''. __( 'Hide Advanced Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Show Advanced Options', 'wck' ) .'\');">'. __( 'Show Advanced Options', 'wck' ) .'</a></li>';
147
+ echo '<li id="ctc-advanced-options-container" style="display:none;"><ul>';
148
+ }
149
+
150
+ add_action( "wck_after_add_form_wck_ctc_element_20", 'wck_ctc_form_wrapper_end' );
151
+ function wck_ctc_form_wrapper_end(){
152
+ echo '</ul></li>';
153
+ }
154
+
155
+ /* advanced label options container for update form */
156
+ add_filter( "wck_before_update_form_wck_ctc_element_5", 'wck_ctc_update_form_label_wrapper_start', 10, 2 );
157
+ function wck_ctc_update_form_label_wrapper_start( $form, $i ){
158
+ $form .= '<li><a href="javascript:void(0)" onclick="jQuery(\'#ctc-advanced-label-options-update-container-'.$i.'\').toggle(); if( jQuery(this).text() == \''. __( 'Show Advanced Label Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Hide Advanced Label Options', 'wck' ) .'\'); else if( jQuery(this).text() == \''. __( 'Hide Advanced Label Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Show Advanced Label Options', 'wck' ) .'\');">'. __( 'Show Advanced Label Options', 'wck' ) .'</a></li>';
159
+ $form .= '<li id="ctc-advanced-label-options-update-container-'.$i.'" style="display:none;"><ul>';
160
+ return $form;
161
+ }
162
+
163
+ add_filter( "wck_after_update_form_wck_ctc_element_17", 'wck_ctc_update_form_label_wrapper_end', 10, 2 );
164
+ function wck_ctc_update_form_label_wrapper_end( $form, $i ){
165
+ $form .= '</ul></li>';
166
+ return $form;
167
+ }
168
+
169
+ /* advanced options container for update form */
170
+ add_filter( "wck_before_update_form_wck_ctc_element_18", 'wck_ctc_update_form_wrapper_start', 10, 2 );
171
+ function wck_ctc_update_form_wrapper_start( $form, $i ){
172
+ $form .= '<li><a href="javascript:void(0)" onclick="jQuery(\'#ctc-advanced-options-update-container-'.$i.'\').toggle(); if( jQuery(this).text() == \''. __( 'Show Advanced Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Hide Advanced Options', 'wck' ) .'\'); else if( jQuery(this).text() == \''. __( 'Hide Advanced Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Show Advanced Options', 'wck' ) .'\');">'. __( 'Show Advanced Options', 'wck' ) .'</a></li>';
173
+ $form .= '<li id="ctc-advanced-options-update-container-'.$i.'" style="display:none;"><ul>';
174
+ return $form;
175
+ }
176
+
177
+ add_filter( "wck_after_update_form_wck_ctc_element_20", 'wck_ctc_update_form_wrapper_end', 10, 2 );
178
+ function wck_ctc_update_form_wrapper_end( $form, $i ){
179
+ $form .= '</ul></li>';
180
+ return $form;
181
+ }
182
+
183
+
184
+ /* advanced label options container for display */
185
+ add_filter( "wck_before_listed_wck_ctc_element_5", 'wck_ctc_display_label_wrapper_start', 10, 2 );
186
+ function wck_ctc_display_label_wrapper_start( $form, $i ){
187
+ $form .= '<li><a href="javascript:void(0)" onclick="jQuery(\'#ctc-advanced-label-options-display-container-'.$i.'\').toggle(); if( jQuery(this).text() == \''. __( 'Show Advanced Labels', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Hide Advanced Labels', 'wck' ) .'\'); else if( jQuery(this).text() == \''. __( 'Hide Advanced Labels', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Show Advanced Labels', 'wck' ) .'\');">'. __( 'Show Advanced Labels', 'wck' ) .'</a></li>';
188
+ $form .= '<li id="ctc-advanced-label-options-display-container-'.$i.'" style="display:none;"><ul>';
189
+ return $form;
190
+ }
191
+
192
+ add_filter( "wck_after_listed_wck_ctc_element_17", 'wck_ctc_display_label_wrapper_end', 10, 2 );
193
+ function wck_ctc_display_label_wrapper_end( $form, $i ){
194
+ $form .= '</ul></li>';
195
+ return $form;
196
+ }
197
+
198
+ /* advanced options container for display */
199
+ add_filter( "wck_before_listed_wck_ctc_element_18", 'wck_ctc_display_adv_wrapper_start', 10, 2 );
200
+ function wck_ctc_display_adv_wrapper_start( $form, $i ){
201
+ $form .= '<li><a href="javascript:void(0)" onclick="jQuery(\'#ctc-advanced-options-display-container-'.$i.'\').toggle(); if( jQuery(this).text() == \''. __( 'Show Advanced Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Hide Advanced Options', 'wck' ) .'\'); else if( jQuery(this).text() == \''. __( 'Hide Advanced Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Show Advanced Options', 'wck' ) .'\');">'. __( 'Show Advanced Options', 'wck' ) .'</a></li>';
202
+ $form .= '<li id="ctc-advanced-options-display-container-'.$i.'" style="display:none;"><ul>';
203
+ return $form;
204
+ }
205
+
206
+ add_filter( "wck_after_listed_wck_ctc_element_20", 'wck_ctc_display_adv_wrapper_end', 10, 2 );
207
+ function wck_ctc_display_adv_wrapper_end( $form, $i ){
208
+ $form .= '</ul></li>';
209
+ return $form;
210
+ }
211
+
212
+ /* Add side metaboxes */
213
+ add_action('add_meta_boxes', 'wck_ctc_add_side_boxes' );
214
+ function wck_ctc_add_side_boxes(){
215
+ add_meta_box( 'wck-ctc-side', __( 'Wordpress Creation Kit', 'wck' ), 'wck_ctc_side_box_one', 'wck_page_ctc-page', 'side', 'high' );
216
+ }
217
+ function wck_ctc_side_box_one(){
218
+ ?>
219
+ <a href="http://www.cozmoslabs.com/wordpress-creation-kit/"><img src="<?php echo plugins_url('/images/banner_pro.png', __FILE__) ?>" width="260" height="385" alt="WCK-PRO"/></a>
220
+ <?php
221
+ }
222
+
223
+ /* Contextual Help */
224
+ add_action('load-wck_page_ctc-page', 'wck_ctc_help');
225
+
226
+ function wck_ctc_help () {
227
+ $screen = get_current_screen();
228
+
229
+ /*
230
+ * Check if current screen is wck_page_cptc-page
231
+ * Don't add help tab if it's not
232
+ */
233
+ if ( $screen->id != 'wck_page_ctc-page' )
234
+ return;
235
+
236
+ // Add help tabs
237
+ $screen->add_help_tab( array(
238
+ 'id' => 'wck_ctc_overview',
239
+ 'title' => __( 'Overview', 'wck' ),
240
+ 'content' => '<p>' . __( 'WCK Custom Taxonomy Creator allows you to easily create custom taxonomy for Wordpress without any programming knowledge.<br />Most of the common options for creating a taxonomy are displayed by default while the advanced and label options are just one click away.', 'wck' ) . '</p>',
241
+ ) );
242
+
243
+ $screen->add_help_tab( array(
244
+ 'id' => 'wck_ctc_labels',
245
+ 'title' => __( 'Labels', 'wck' ),
246
+ 'content' => '<p>' . __( 'For simplicity you are required to introduce only the Singular Label and Plural Label from wchich the rest of the labels will be formed.<br />For a more detailed control of the labels you just have to click the "Show Advanced Label Options" link and all the availabel labels will be displayed', 'wck' ) . '</p>',
247
+ ) );
248
+
249
+ $screen->add_help_tab( array(
250
+ 'id' => 'wck_ctc_advanced',
251
+ 'title' => __( 'Advanced Options', 'wck' ),
252
+ 'content' => '<p>' . __( 'The Advanced Options are set to the most common defaults for taxonomies. To display them click the "Show Advanced Options" link.', 'wck' ) . '</p>',
253
+ ) );
254
+ }
255
+ ?>
wck-sas.php ADDED
@@ -0,0 +1,182 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* Start and settings page */
3
+
4
+ /* Add Scripts */
5
+ add_action('admin_enqueue_scripts', 'wck_sas_print_scripts' );
6
+ function wck_sas_print_scripts($hook){
7
+ if( 'wck_page_sas-page' == $hook ){
8
+ wp_register_style('wck-sas-css', plugins_url('/css/wck-sas.css', __FILE__));
9
+ wp_enqueue_style('wck-sas-css');
10
+ }
11
+ }
12
+
13
+ /* Create the WCK "Start & Settings" Page only for admins ( 'capability' => 'edit_theme_options' ) */
14
+ $args = array(
15
+ 'page_title' => __( 'Start Here & General Settings', 'wck' ),
16
+ 'menu_title' => __( 'Start and Settings', 'wck' ),
17
+ 'capability' => 'edit_theme_options',
18
+ 'menu_slug' => 'sas-page',
19
+ 'page_type' => 'submenu_page',
20
+ 'parent_slug' => 'wck-page',
21
+ 'priority' => 7,
22
+ 'page_icon' => plugins_url('/images/wck-32x32.png', __FILE__)
23
+ );
24
+ $sas_page = new WCK_Page_Creator( $args );
25
+
26
+ /* create the meta box only for admins ( 'capability' => 'edit_theme_options' ) */
27
+ add_action( 'init', 'wck_sas_create_box', 11 );
28
+ function wck_sas_create_box(){
29
+
30
+ if( is_admin() && current_user_can( 'edit_theme_options' ) ){
31
+
32
+ /* set up the fields array */
33
+ $sas_serial_fields = array(
34
+ array( 'type' => 'text', 'title' => __( 'Serial Number', 'wck' ), 'description' => __( 'Please enter your serial number. For example: (e.g. WCKPRO-11-SN-251r55baa4fbe7bf595b2aabb8d72985)', 'wck' ), 'required' => true )
35
+ );
36
+
37
+ /* set up the box arguments */
38
+ $args = array(
39
+ 'metabox_id' => 'option_page',
40
+ 'metabox_title' => __( 'Register Your Version', 'wck' ),
41
+ 'post_type' => 'sas-page',
42
+ 'meta_name' => 'wck_serial',
43
+ 'meta_array' => $sas_serial_fields,
44
+ 'context' => 'option',
45
+ 'single' => true,
46
+ 'sortable' => false
47
+ );
48
+
49
+ /* create the box */
50
+ $wck_premium_update = WCK_PLUGIN_DIR.'/update/';
51
+ if (file_exists ($wck_premium_update . 'update-checker.php'))
52
+ new Wordpress_Creation_Kit( $args );
53
+ }
54
+
55
+ }
56
+
57
+ /* Add the welcoming text on WCK Start and Settings Page */
58
+ add_action( 'wck_before_meta_boxes', 'wck_sas_welcome');
59
+ function wck_sas_welcome($hook){
60
+ if('wck_page_sas-page' == $hook ){
61
+ $plugin_path = dirname( __FILE__ ) . '/wck.php';
62
+ $default_plugin_headers = get_plugin_data($plugin_path);
63
+ $plugin_name = $default_plugin_headers['Name'];
64
+ $plugin_version = $default_plugin_headers['Version'];
65
+ ?>
66
+ <div class="wrap about-wrap">
67
+ <h1><?php printf( __( 'Welcome to %s', 'wck' ), $plugin_name ); ?></h1>
68
+ <div class="about-text"><?php _e( 'WCK helps you to improve the usability of the sites you build, making them manageable by your clients. Your very own repeater custom fields and groups, custom post type and taxonomy creator with front-end posting.', 'wck' ); ?></div>
69
+ <div class="wck-badge"><?php printf( __( 'Version %s', 'wck' ), $plugin_version ); ?></div>
70
+ </div>
71
+
72
+ <?php
73
+ }
74
+ }
75
+
76
+ /* Add the Quick Start-Up Guide text on WCK Start and Settings Page */
77
+ add_action( 'wck_after_meta_boxes', 'wck_sas_quickintro', 12);
78
+ function wck_sas_quickintro($hook){
79
+ if('wck_page_sas-page' == $hook ){
80
+ ?>
81
+ <div class="wrap about-wrap" style="clear:both;">
82
+ <div class="changelog">
83
+ <h2><?php _e( 'Quick Start-Up Guide', 'wck' ); ?></h2>
84
+
85
+ <div class="feature-section">
86
+
87
+ <h4><?php _e( 'Custom Fields Creator', 'wck' ); ?></h4>
88
+ <p><?php _e( 'WordPress Creation Kit Pro has support for a wide list of custom fields: WYSIWYG Editor, Upload Field, Date, User, Country, Text Input, Textarea, Drop-Down, Select, Checkboxes, Radio Buttons', 'wck' ); ?></p>
89
+ <p><?php _e( 'Access documentation <a href="http://www.cozmoslabs.com/wordpress-creation-kit/custom-fields-creator/" target="_blank">here</a> about how to display them in your templates.', 'wck' ); ?></p>
90
+
91
+ <h4><?php _e( 'Post Type Creator', 'wck' ); ?></h4>
92
+ <p><?php _e( 'Create & manage all your custom content types', 'wck' ); ?></p>
93
+ <p><?php _e( 'Access documentation <a href="http://www.cozmoslabs.com/wordpress-creation-kit/custom-post-type-creator/" target="_blank">here</a> about how to display them in your templates.', 'wck' ); ?></p>
94
+
95
+ <h4><?php _e( 'Taxonomy Creator', 'wck' ); ?></h4>
96
+ <p><?php _e( 'Create new taxonomies for filtering your content', 'wck' ); ?></p>
97
+ <p><?php _e( 'Access documentation <a href="http://www.cozmoslabs.com/wordpress-creation-kit/custom-taxonomy-creator/" target="_blank">here</a> about how to display them in your templates.', 'wck' ); ?></p>
98
+
99
+ <h4><?php _e( 'Front-End Posting (available in the Pro version)', 'wck' ); ?></h4>
100
+ <p><?php _e( 'Create and edit posts/pages or custom posts directly from the front-end.', 'wck' ); ?></p>
101
+ <p><?php _e( 'Available shortcodes:', 'wck' ); ?></p>
102
+ <ul>
103
+ <li><?php _e( '[fep form_name="front-end-post-name"] - displayes your form in the front-end', 'wck' ); ?></li>
104
+ <li><?php _e( '[fep-dashboard] - the quick-dashboard allows: simple profile updates, editing/deletion of posts, pages and custom post types.', 'wck' ); ?></li>
105
+ <li><?php _e( '[fep-lilo] - login/logout/register widget with the simple usage of a shortcode. Can be added in a page or text widget.', 'wck' ); ?></li>
106
+ </ul>
107
+ <p><?php _e( 'Access documentation <a href="http://www.cozmoslabs.com/wordpress-creation-kit/frontend-posting/" target="_blank">here</a> about how to display them in your templates.', 'wck' ); ?></p>
108
+
109
+ <h4><?php _e( 'Option Pages (available in the Pro version)', 'wck' ); ?></h4>
110
+ <p><?php _e( 'The Options Page Creator Allows you to create a new menu item called "Options"(for example) which can hold advanced custom field groups. Perfect for theme options or a simple UI for your custom plugin (like a simple testimonials section in the front-end).', 'wck' ); ?></p>
111
+
112
+ </div>
113
+ </div>
114
+ </div>
115
+
116
+ <?php
117
+ }
118
+ }
119
+
120
+ /* add refresh to page. Needed to display the serial notification. Need to refactor in the future so it works via ajax. */
121
+ add_action("wck_refresh_list_wck_serial", "wck_serial_after_refresh_list");
122
+ add_action("wck_refresh_entry_wck_serial", "wck_serial_after_refresh_list");
123
+ function wck_serial_after_refresh_list(){
124
+ echo '<script type="text/javascript">window.location="'. get_admin_url() . 'admin.php?page=sas-page&updated=true' .'";</script>';
125
+ }
126
+
127
+ /* Notify user of when he enters his serial number.
128
+ * Also Check if serial is valid on meta_name creation and update
129
+ */
130
+ add_filter('wck_metabox_content_wck_serial', 'wck_sas_serial_notification', 10, 2);
131
+ add_filter('wck_after_update_metabox_content_wck_serial', 'wck_sas_serial_notification', 10, 2);
132
+ function wck_sas_serial_notification($list){
133
+
134
+ wck_sas_check_serial_number();
135
+ $status = get_option('wck_serial_status');
136
+
137
+ if ( $status == 'noserial') $notif = '<p class="serial-notification red">' . __( 'Please enter your serial number to get access to automatic updates. If you do not have one, you can <a href="http://www.cozmoslabs.com/wordpress-creation-kit/" target="_blank">Get One Here</a>.', 'wck' ) . ' </p>';
138
+
139
+ if ( $status == 'serverDown') $notif = '<p class="serial-notification yellow">' . __( 'Oups! Our serial verification server is down. Please try again later.', 'wck' ) . ' </p>';
140
+
141
+ if ( $status == 'notFound') $notif = '<p class="serial-notification red">' . __( 'Oups! It seems the serial number you entered was not found in our database. To find out what\'s your serial number log-in to <a href="http://www.cozmoslabs.com/account/" target="_blank">your account page</a> over at Cozmoslabs.com', 'wck' ) . ' </p>';
142
+
143
+ if ( $status == 'found') $notif = '<p class="serial-notification green">' . __( 'Wohoo! Your serial number is valid and you have access to automatic updates.', 'wck' ) . ' </p>';
144
+
145
+ if ( $status == 'expired') $notif = '<p class="serial-notification yellow">' . __( 'It seems your serial number has <strong>expired</strong>. You\'ll continue to get automatic updates if update your serial number for another year from <a href="http://www.cozmoslabs.com/account/" target="_blank"><strong>your account page</strong></a>.', 'wck' ) . ' </p>';
146
+
147
+ return $list . $notif;
148
+ }
149
+
150
+ /* Check if serial is valid on Start and Settings page load.
151
+ * We're tieing to the admin_enque_scripts because it returns the current page $hook
152
+ */
153
+ add_action( 'admin_enqueue_scripts', 'wck_retest_serial_on_load');
154
+ function wck_retest_serial_on_load($hook){
155
+ if('wck_page_sas-page' == $hook )
156
+ wck_sas_check_serial_number();
157
+ }
158
+
159
+ /* Checks local serial number against our serial-number database. */
160
+ function wck_sas_check_serial_number(){
161
+ // take into account the Free version doesn't need an update check and serial.
162
+ $wck_premium_update = WCK_PLUGIN_DIR.'/update/';
163
+ if (!file_exists($wck_premium_update . 'update-checker.php'))
164
+ return;
165
+
166
+ $serial = get_option('wck_serial');
167
+ $serial = $serial[0]['serial-number'];
168
+ if(empty($serial) || $serial == '') {
169
+ update_option( 'wck_serial_status', 'noserial' ); //server down
170
+ } else {
171
+ $response = wp_remote_get( 'http://updatemetadata.cozmoslabs.com/checkserial/?serialNumberSent='.$serial );
172
+
173
+ if (is_wp_error($response)){
174
+ update_option( 'wck_serial_status', 'serverDown' ); //server down
175
+
176
+ }elseif((trim($response['body']) != 'notFound') && (trim($response['body']) != 'found') && (trim($response['body']) != 'expired')){
177
+ update_option( 'wck_serial_status', 'serverDown' ); //unknown response parameter
178
+ }else{
179
+ update_option( 'wck_serial_status', trim($response['body']) ); //either found, notFound or expired
180
+ }
181
+ }
182
+ }
wck.php ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
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
6
+ Version: 1.0.1
7
+ Author URI: http://www.reflectionmedia.ro
8
+
9
+ License: GPL2
10
+
11
+ == Copyright ==
12
+ Copyright 2013 Reflection Media (wwww.reflectionmedia.ro)
13
+
14
+ This program is free software; you can redistribute it and/or modify
15
+ it under the terms of the GNU General Public License as published by
16
+ the Free Software Foundation; either version 2 of the License, or
17
+ (at your option) any later version.
18
+ This program is distributed in the hope that it will be useful,
19
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
20
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
+ GNU General Public License for more details.
22
+ You should have received a copy of the GNU General Public License
23
+ along with this program; if not, write to the Free Software
24
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25
+ */
26
+
27
+ define( 'WCK_PLUGIN_DIR', WP_PLUGIN_DIR . '/' . dirname( plugin_basename( __FILE__ ) ) );
28
+
29
+ /* ready for localization */
30
+ load_plugin_textdomain( 'wck', false, basename( dirname( __FILE__ ) ) . '/languages' );
31
+
32
+
33
+ /* include Custom Fields Creator API */
34
+ require_once('wordpress-creation-kit-api/wordpress-creation-kit.php');
35
+
36
+ /* Create the WCK Page only for admins ( 'capability' => 'edit_theme_options' ) */
37
+ $args = array(
38
+ 'page_title' => __( 'Wordpress Creation Kit', 'wck' ),
39
+ 'menu_title' => 'WCK',
40
+ 'capability' => 'edit_theme_options',
41
+ 'menu_slug' => 'wck-page',
42
+ 'page_type' => 'menu_page',
43
+ 'position' => '30,27',
44
+ 'priority' => 7,
45
+ 'icon_url' => plugins_url('/images/wck-icon.png', __FILE__)
46
+ );
47
+ new WCK_Page_Creator( $args );
48
+
49
+ /* Remove the automatically created submenu page */
50
+ add_action('admin_menu', 'wck_remove_wck_submenu_page', 11);
51
+ function wck_remove_wck_submenu_page(){
52
+ remove_submenu_page( 'wck-page', 'wck-page' );
53
+ }
54
+
55
+ /* include Start and Settings Page */
56
+ require_once('wck-sas.php');
57
+ /* include Custom Post Type Creator */
58
+ require_once('wck-cptc.php');
59
+ /* include Custom Taxonomy Creator */
60
+ require_once('wck-ctc.php');
61
+ /* include Custom Fields Creator */
62
+ require_once('wck-cfc.php');
63
+ /* include FrontEnd Posting */
64
+ if( file_exists( dirname(__FILE__).'/wck-fep.php' ) )
65
+ require_once('wck-fep.php');
66
+ /* include Option Page Creator */
67
+ if( file_exists( dirname(__FILE__).'/wck-opc.php' ) )
68
+ require_once('wck-opc.php');
69
+
70
+ /* deactivation hook */
71
+ register_deactivation_hook( __FILE__, 'wck_deactivate_function' );
72
+ function wck_deactivate_function() {
73
+
74
+ /* remove capabilities from subscriber that were added by FEP */
75
+ $role = get_role( 'subscriber' );
76
+ $role->remove_cap( 'upload_files' );
77
+ $role->remove_cap( 'edit_posts' );
78
+ }
79
+
80
+ /* check for updates */
81
+ $wck_premium_update = WCK_PLUGIN_DIR.'/update/';
82
+ if (file_exists ($wck_premium_update . 'update-checker.php')){
83
+ require_once ($wck_premium_update . 'update-checker.php');
84
+ (array)$wck_serial = get_option('wck_serial');
85
+ $wck_serial = $wck_serial[0]['serial-number'];
86
+ if(empty($wck_serial) || $wck_serial == '') $wck_serial = '';
87
+
88
+ if (file_exists ( WCK_PLUGIN_DIR . '/wordpress-creation-kit-api/wck-fep/wck-fep.php' )){
89
+ $wck_update = new wck_PluginUpdateChecker('http://updatemetadata.cozmoslabs.com/?localSerialNumber='.$wck_serial.'&uniqueproduct=WCKP', __FILE__, 'wck-pro');
90
+ } else {
91
+ $wck_update = new wck_PluginUpdateChecker('http://updatemetadata.cozmoslabs.com/?localSerialNumber='.$wck_serial.'&uniqueproduct=WCKH', __FILE__, 'wck-hobby');
92
+ }
93
+ }
94
+ ?>
wordpress-creation-kit-api/assets/js/tiny_mce/langs/en.js ADDED
@@ -0,0 +1 @@
 
1
+ tinyMCE.addI18n({en:{common:{"more_colors":"More Colors...","invalid_data":"Error: Invalid values entered, these are marked in red.","popup_blocked":"Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.","clipboard_no_support":"Currently not supported by your browser, use keyboard shortcuts instead.","clipboard_msg":"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?","not_set":"-- Not Set --","class_name":"Class",browse:"Browse",close:"Close",cancel:"Cancel",update:"Update",insert:"Insert",apply:"Apply","edit_confirm":"Do you want to use the WYSIWYG mode for this textarea?","invalid_data_number":"{#field} must be a number","invalid_data_min":"{#field} must be a number greater than {#min}","invalid_data_size":"{#field} must be a number or percentage",value:"(value)"},contextmenu:{full:"Full",right:"Right",center:"Center",left:"Left",align:"Alignment"},insertdatetime:{"day_short":"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun","day_long":"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday","months_short":"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec","months_long":"January,February,March,April,May,June,July,August,September,October,November,December","inserttime_desc":"Insert Time","insertdate_desc":"Insert Date","time_fmt":"%H:%M:%S","date_fmt":"%Y-%m-%d"},print:{"print_desc":"Print"},preview:{"preview_desc":"Preview"},directionality:{"rtl_desc":"Direction Right to Left","ltr_desc":"Direction Left to Right"},layer:{content:"New layer...","absolute_desc":"Toggle Absolute Positioning","backward_desc":"Move Backward","forward_desc":"Move Forward","insertlayer_desc":"Insert New Layer"},save:{"save_desc":"Save","cancel_desc":"Cancel All Changes"},nonbreaking:{"nonbreaking_desc":"Insert Non-Breaking Space Character"},iespell:{download:"ieSpell not detected. Do you want to install it now?","iespell_desc":"Check Spelling"},advhr:{"delta_height":"","delta_width":"","advhr_desc":"Insert Horizontal Line"},emotions:{"delta_height":"","delta_width":"","emotions_desc":"Emotions"},searchreplace:{"replace_desc":"Find/Replace","delta_width":"","delta_height":"","search_desc":"Find"},advimage:{"delta_width":"","image_desc":"Insert/Edit Image","delta_height":""},advlink:{"delta_height":"","delta_width":"","link_desc":"Insert/Edit Link"},xhtmlxtras:{"attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":"","attribs_desc":"Insert/Edit Attributes","ins_desc":"Insertion","del_desc":"Deletion","acronym_desc":"Acronym","abbr_desc":"Abbreviation","cite_desc":"Citation"},style:{"delta_height":"","delta_width":"",desc:"Edit CSS Style"},paste:{"plaintext_mode_stick":"Paste is now in plain text mode. Click again to toggle back to regular paste mode.","plaintext_mode":"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.","selectall_desc":"Select All","paste_word_desc":"Paste from Word","paste_text_desc":"Paste as Plain Text"},"paste_dlg":{"word_title":"Use Ctrl+V on your keyboard to paste the text into the window.","text_linebreaks":"Keep Linebreaks","text_title":"Use Ctrl+V on your keyboard to paste the text into the window."},table:{"merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":"",cell:"Cell",col:"Column",row:"Row",del:"Delete Table","copy_row_desc":"Copy Table Row","cut_row_desc":"Cut Table Row","paste_row_after_desc":"Paste Table Row After","paste_row_before_desc":"Paste Table Row Before","props_desc":"Table Properties","cell_desc":"Table Cell Properties","row_desc":"Table Row Properties","merge_cells_desc":"Merge Table Cells","split_cells_desc":"Split Merged Table Cells","delete_col_desc":"Delete Column","col_after_desc":"Insert Column After","col_before_desc":"Insert Column Before","delete_row_desc":"Delete Row","row_after_desc":"Insert Row After","row_before_desc":"Insert Row Before",desc:"Insert/Edit Table"},autosave:{"warning_message":"If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?","restore_content":"Restore auto-saved content.","unload_msg":"The changes you made will be lost if you navigate away from this page."},fullscreen:{desc:"Toggle Full Screen Mode"},media:{"delta_height":"","delta_width":"",edit:"Edit Embedded Media",desc:"Insert/Edit Embedded Media"},fullpage:{desc:"Document Properties","delta_width":"","delta_height":""},template:{desc:"Insert Predefined Template Content"},visualchars:{desc:"Show/Hide Visual Control Characters"},spellchecker:{desc:"Toggle Spell Checker",menu:"Spell Checker Settings","ignore_word":"Ignore Word","ignore_words":"Ignore All",langs:"Languages",wait:"Please wait...",sug:"Suggestions","no_sug":"No Suggestions","no_mpell":"No misspellings found.","learn_word":"Learn word"},pagebreak:{desc:"Insert Page Break for Printing"},advlist:{types:"Types",def:"Default","lower_alpha":"Lower Alpha","lower_greek":"Lower Greek","lower_roman":"Lower Roman","upper_alpha":"Upper Alpha","upper_roman":"Upper Roman",circle:"Circle",disc:"Disc",square:"Square"},colors:{"333300":"Dark olive","993300":"Burnt orange","000000":"Black","003300":"Dark green","003366":"Dark azure","000080":"Navy Blue","333399":"Indigo","333333":"Very dark gray","800000":"Maroon",FF6600:"Orange","808000":"Olive","008000":"Green","008080":"Teal","0000FF":"Blue","666699":"Grayish blue","808080":"Gray",FF0000:"Red",FF9900:"Amber","99CC00":"Yellow green","339966":"Sea green","33CCCC":"Turquoise","3366FF":"Royal blue","800080":"Purple","999999":"Medium gray",FF00FF:"Magenta",FFCC00:"Gold",FFFF00:"Yellow","00FF00":"Lime","00FFFF":"Aqua","00CCFF":"Sky blue","993366":"Brown",C0C0C0:"Silver",FF99CC:"Pink",FFCC99:"Peach",FFFF99:"Light yellow",CCFFCC:"Pale green",CCFFFF:"Pale cyan","99CCFF":"Light sky blue",CC99FF:"Plum",FFFFFF:"White"},aria:{"rich_text_area":"Rich Text Area"},wordcount:{words:"Words:"},visualblocks:{desc:'Show/hide block elements'}}});
wordpress-creation-kit-api/assets/js/tiny_mce/license.txt ADDED
@@ -0,0 +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
+
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/directionality/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ (function(){tinymce.create("tinymce.plugins.Directionality",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceDirectionLTR",function(){var d=a.dom.getParent(a.selection.getNode(),a.dom.isBlock);if(d){if(a.dom.getAttrib(d,"dir")!="ltr"){a.dom.setAttrib(d,"dir","ltr")}else{a.dom.setAttrib(d,"dir","")}}a.nodeChanged()});a.addCommand("mceDirectionRTL",function(){var d=a.dom.getParent(a.selection.getNode(),a.dom.isBlock);if(d){if(a.dom.getAttrib(d,"dir")!="rtl"){a.dom.setAttrib(d,"dir","rtl")}else{a.dom.setAttrib(d,"dir","")}}a.nodeChanged()});a.addButton("ltr",{title:"directionality.ltr_desc",cmd:"mceDirectionLTR"});a.addButton("rtl",{title:"directionality.rtl_desc",cmd:"mceDirectionRTL"});a.onNodeChange.add(c._nodeChange,c)},getInfo:function(){return{longname:"Directionality",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(b,a,e){var d=b.dom,c;e=d.getParent(e,d.isBlock);if(!e){a.setDisabled("ltr",1);a.setDisabled("rtl",1);return}c=d.getAttrib(e,"dir");a.setActive("ltr",c=="ltr");a.setDisabled("ltr",0);a.setActive("rtl",c=="rtl");a.setDisabled("rtl",0)}});tinymce.PluginManager.add("directionality",tinymce.plugins.Directionality)})();
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/directionality/editor_plugin_src.js ADDED
@@ -0,0 +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
+ })();
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/fullscreen/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ (function(){var a=tinymce.DOM;tinymce.create("tinymce.plugins.FullScreenPlugin",{init:function(d,e){var f=this,g={},c,b;f.editor=d;d.addCommand("mceFullScreen",function(){var i,j=a.doc.documentElement;if(d.getParam("fullscreen_is_enabled")){if(d.getParam("fullscreen_new_window")){closeFullscreen()}else{a.win.setTimeout(function(){tinymce.dom.Event.remove(a.win,"resize",f.resizeFunc);tinyMCE.get(d.getParam("fullscreen_editor_id")).setContent(d.getContent());tinyMCE.remove(d);a.remove("mce_fullscreen_container");j.style.overflow=d.getParam("fullscreen_html_overflow");a.setStyle(a.doc.body,"overflow",d.getParam("fullscreen_overflow"));a.win.scrollTo(d.getParam("fullscreen_scrollx"),d.getParam("fullscreen_scrolly"));tinyMCE.settings=tinyMCE.oldSettings},10)}return}if(d.getParam("fullscreen_new_window")){i=a.win.open(e+"/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);try{i.resizeTo(screen.availWidth,screen.availHeight)}catch(h){}}else{tinyMCE.oldSettings=tinyMCE.settings;g.fullscreen_overflow=a.getStyle(a.doc.body,"overflow",1)||"auto";g.fullscreen_html_overflow=a.getStyle(j,"overflow",1);c=a.getViewPort();g.fullscreen_scrollx=c.x;g.fullscreen_scrolly=c.y;if(tinymce.isOpera&&g.fullscreen_overflow=="visible"){g.fullscreen_overflow="auto"}if(tinymce.isIE&&g.fullscreen_overflow=="scroll"){g.fullscreen_overflow="auto"}if(tinymce.isIE&&(g.fullscreen_html_overflow=="visible"||g.fullscreen_html_overflow=="scroll")){g.fullscreen_html_overflow="auto"}if(g.fullscreen_overflow=="0px"){g.fullscreen_overflow=""}a.setStyle(a.doc.body,"overflow","hidden");j.style.overflow="hidden";c=a.getViewPort();a.win.scrollTo(0,0);if(tinymce.isIE){c.h-=1}if(tinymce.isIE6||document.compatMode=="BackCompat"){b="absolute;top:"+c.y}else{b="fixed;top:0"}n=a.add(a.doc.body,"div",{id:"mce_fullscreen_container",style:"position:"+b+";left:0;width:"+c.w+"px;height:"+c.h+"px;z-index:200000;"});a.add(n,"div",{id:"mce_fullscreen"});tinymce.each(d.settings,function(k,l){g[l]=k});g.id="mce_fullscreen";g.width=n.clientWidth;g.height=n.clientHeight-15;g.fullscreen_is_enabled=true;g.fullscreen_editor_id=d.id;g.theme_advanced_resizing=false;g.save_onsavecallback=function(){d.setContent(tinyMCE.get(g.id).getContent());d.execCommand("mceSave")};tinymce.each(d.getParam("fullscreen_settings"),function(m,l){g[l]=m});if(g.theme_advanced_toolbar_location==="external"){g.theme_advanced_toolbar_location="top"}f.fullscreenEditor=new tinymce.Editor("mce_fullscreen",g);f.fullscreenEditor.onInit.add(function(){f.fullscreenEditor.setContent(d.getContent());f.fullscreenEditor.focus()});f.fullscreenEditor.render();f.fullscreenElement=new tinymce.dom.Element("mce_fullscreen_container");f.fullscreenElement.update();f.resizeFunc=tinymce.dom.Event.add(a.win,"resize",function(){var o=tinymce.DOM.getViewPort(),l=f.fullscreenEditor,k,m;k=l.dom.getSize(l.getContainer().firstChild);m=l.dom.getSize(l.getContainer().getElementsByTagName("iframe")[0]);l.theme.resizeTo(o.w-k.w+m.w,o.h-k.h+m.h)})}});d.addButton("fullscreen",{title:"fullscreen.desc",cmd:"mceFullScreen"});d.onNodeChange.add(function(i,h){h.setActive("fullscreen",i.getParam("fullscreen_is_enabled"))})},getInfo:function(){return{longname:"Fullscreen",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("fullscreen",tinymce.plugins.FullScreenPlugin)})();
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/fullscreen/editor_plugin_src.js ADDED
@@ -0,0 +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
+ })();
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/fullscreen/fullscreen.htm ADDED
@@ -0,0 +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>
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/inlinepopups/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ (function(){var d=tinymce.DOM,b=tinymce.dom.Element,a=tinymce.dom.Event,e=tinymce.each,c=tinymce.is;tinymce.create("tinymce.plugins.InlinePopups",{init:function(f,g){f.onBeforeRenderUI.add(function(){f.windowManager=new tinymce.InlineWindowManager(f);d.loadCSS(g+"/skins/"+(f.settings.inlinepopups_skin||"clearlooks2")+"/window.css")})},getInfo:function(){return{longname:"InlinePopups",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.create("tinymce.InlineWindowManager:tinymce.WindowManager",{InlineWindowManager:function(f){var g=this;g.parent(f);g.zIndex=300000;g.count=0;g.windows={}},open:function(s,j){var z=this,i,k="",r=z.editor,g=0,v=0,h,m,o,q,l,x,y,n;s=s||{};j=j||{};if(!s.inline){return z.parent(s,j)}n=z._frontWindow();if(n&&d.get(n.id+"_ifr")){n.focussedElement=d.get(n.id+"_ifr").contentWindow.document.activeElement}if(!s.type){z.bookmark=r.selection.getBookmark(1)}i=d.uniqueId();h=d.getViewPort();s.width=parseInt(s.width||320);s.height=parseInt(s.height||240)+(tinymce.isIE?8:0);s.min_width=parseInt(s.min_width||150);s.min_height=parseInt(s.min_height||100);s.max_width=parseInt(s.max_width||2000);s.max_height=parseInt(s.max_height||2000);s.left=s.left||Math.round(Math.max(h.x,h.x+(h.w/2)-(s.width/2)));s.top=s.top||Math.round(Math.max(h.y,h.y+(h.h/2)-(s.height/2)));s.movable=s.resizable=true;j.mce_width=s.width;j.mce_height=s.height;j.mce_inline=true;j.mce_window_id=i;j.mce_auto_focus=s.auto_focus;z.features=s;z.params=j;z.onOpen.dispatch(z,s,j);if(s.type){k+=" mceModal";if(s.type){k+=" mce"+s.type.substring(0,1).toUpperCase()+s.type.substring(1)}s.resizable=false}if(s.statusbar){k+=" mceStatusbar"}if(s.resizable){k+=" mceResizable"}if(s.minimizable){k+=" mceMinimizable"}if(s.maximizable){k+=" mceMaximizable"}if(s.movable){k+=" mceMovable"}z._addAll(d.doc.body,["div",{id:i,role:"dialog","aria-labelledby":s.type?i+"_content":i+"_title","class":(r.settings.inlinepopups_skin||"clearlooks2")+(tinymce.isIE&&window.getSelection?" ie9":""),style:"width:100px;height:100px"},["div",{id:i+"_wrapper","class":"mceWrapper"+k},["div",{id:i+"_top","class":"mceTop"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_title"},s.title||""]],["div",{id:i+"_middle","class":"mceMiddle"},["div",{id:i+"_left","class":"mceLeft",tabindex:"0"}],["span",{id:i+"_content"}],["div",{id:i+"_right","class":"mceRight",tabindex:"0"}]],["div",{id:i+"_bottom","class":"mceBottom"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_status"},"Content"]],["a",{"class":"mceMove",tabindex:"-1",href:"javascript:;"}],["a",{"class":"mceMin",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMax",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMed",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceClose",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{id:i+"_resize_n","class":"mceResize mceResizeN",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_s","class":"mceResize mceResizeS",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_w","class":"mceResize mceResizeW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_e","class":"mceResize mceResizeE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_nw","class":"mceResize mceResizeNW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_ne","class":"mceResize mceResizeNE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_sw","class":"mceResize mceResizeSW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_se","class":"mceResize mceResizeSE",tabindex:"-1",href:"javascript:;"}]]]);d.setStyles(i,{top:-10000,left:-10000});if(tinymce.isGecko){d.setStyle(i,"overflow","auto")}if(!s.type){g+=d.get(i+"_left").clientWidth;g+=d.get(i+"_right").clientWidth;v+=d.get(i+"_top").clientHeight;v+=d.get(i+"_bottom").clientHeight}d.setStyles(i,{top:s.top,left:s.left,width:s.width+g,height:s.height+v});y=s.url||s.file;if(y){if(tinymce.relaxedDomain){y+=(y.indexOf("?")==-1?"?":"&")+"mce_rdomain="+tinymce.relaxedDomain}y=tinymce._addVer(y)}if(!s.type){d.add(i+"_content","iframe",{id:i+"_ifr",src:'javascript:""',frameBorder:0,style:"border:0;width:10px;height:10px"});d.setStyles(i+"_ifr",{width:s.width,height:s.height});d.setAttrib(i+"_ifr","src",y)}else{d.add(i+"_wrapper","a",{id:i+"_ok","class":"mceButton mceOk",href:"javascript:;",onmousedown:"return false;"},"Ok");if(s.type=="confirm"){d.add(i+"_wrapper","a",{"class":"mceButton mceCancel",href:"javascript:;",onmousedown:"return false;"},"Cancel")}d.add(i+"_middle","div",{"class":"mceIcon"});d.setHTML(i+"_content",s.content.replace("\n","<br />"));a.add(i,"keyup",function(f){var p=27;if(f.keyCode===p){s.button_func(false);return a.cancel(f)}});a.add(i,"keydown",function(f){var t,p=9;if(f.keyCode===p){t=d.select("a.mceCancel",i+"_wrapper")[0];if(t&&t!==f.target){t.focus()}else{d.get(i+"_ok").focus()}return a.cancel(f)}})}o=a.add(i,"mousedown",function(t){var u=t.target,f,p;f=z.windows[i];z.focus(i);if(u.nodeName=="A"||u.nodeName=="a"){if(u.className=="mceClose"){z.close(null,i);return a.cancel(t)}else{if(u.className=="mceMax"){f.oldPos=f.element.getXY();f.oldSize=f.element.getSize();p=d.getViewPort();p.w-=2;p.h-=2;f.element.moveTo(p.x,p.y);f.element.resizeTo(p.w,p.h);d.setStyles(i+"_ifr",{width:p.w-f.deltaWidth,height:p.h-f.deltaHeight});d.addClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMed"){f.element.moveTo(f.oldPos.x,f.oldPos.y);f.element.resizeTo(f.oldSize.w,f.oldSize.h);f.iframeElement.resizeTo(f.oldSize.w-f.deltaWidth,f.oldSize.h-f.deltaHeight);d.removeClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMove"){return z._startDrag(i,t,u.className)}else{if(d.hasClass(u,"mceResize")){return z._startDrag(i,t,u.className.substring(13))}}}}}}});q=a.add(i,"click",function(f){var p=f.target;z.focus(i);if(p.nodeName=="A"||p.nodeName=="a"){switch(p.className){case"mceClose":z.close(null,i);return a.cancel(f);case"mceButton mceOk":case"mceButton mceCancel":s.button_func(p.className=="mceButton mceOk");return a.cancel(f)}}});a.add([i+"_left",i+"_right"],"focus",function(p){var t=d.get(i+"_ifr");if(t){var f=t.contentWindow.document.body;var u=d.select(":input:enabled,*[tabindex=0]",f);if(p.target.id===(i+"_left")){u[u.length-1].focus()}else{u[0].focus()}}else{d.get(i+"_ok").focus()}});x=z.windows[i]={id:i,mousedown_func:o,click_func:q,element:new b(i,{blocker:1,container:r.getContainer()}),iframeElement:new b(i+"_ifr"),features:s,deltaWidth:g,deltaHeight:v};x.iframeElement.on("focus",function(){z.focus(i)});if(z.count==0&&z.editor.getParam("dialog_type","modal")=="modal"){d.add(d.doc.body,"div",{id:"mceModalBlocker","class":(z.editor.settings.inlinepopups_skin||"clearlooks2")+"_modalBlocker",style:{zIndex:z.zIndex-1}});d.show("mceModalBlocker");d.setAttrib(d.doc.body,"aria-hidden","true")}else{d.setStyle("mceModalBlocker","z-index",z.zIndex-1)}if(tinymce.isIE6||/Firefox\/2\./.test(navigator.userAgent)||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceModalBlocker",{position:"absolute",left:h.x,top:h.y,width:h.w-2,height:h.h-2})}d.setAttrib(i,"aria-hidden","false");z.focus(i);z._fixIELayout(i,1);if(d.get(i+"_ok")){d.get(i+"_ok").focus()}z.count++;return x},focus:function(h){var g=this,f;if(f=g.windows[h]){f.zIndex=this.zIndex++;f.element.setStyle("zIndex",f.zIndex);f.element.update();h=h+"_wrapper";d.removeClass(g.lastId,"mceFocus");d.addClass(h,"mceFocus");g.lastId=h;if(f.focussedElement){f.focussedElement.focus()}else{if(d.get(h+"_ok")){d.get(f.id+"_ok").focus()}else{if(d.get(f.id+"_ifr")){d.get(f.id+"_ifr").focus()}}}}},_addAll:function(k,h){var g,l,f=this,j=tinymce.DOM;if(c(h,"string")){k.appendChild(j.doc.createTextNode(h))}else{if(h.length){k=k.appendChild(j.create(h[0],h[1]));for(g=2;g<h.length;g++){f._addAll(k,h[g])}}}},_startDrag:function(v,G,E){var o=this,u,z,C=d.doc,f,l=o.windows[v],h=l.element,y=h.getXY(),x,q,F,g,A,s,r,j,i,m,k,n,B;g={x:0,y:0};A=d.getViewPort();A.w-=2;A.h-=2;j=G.screenX;i=G.screenY;m=k=n=B=0;u=a.add(C,"mouseup",function(p){a.remove(C,"mouseup",u);a.remove(C,"mousemove",z);if(f){f.remove()}h.moveBy(m,k);h.resizeBy(n,B);q=h.getSize();d.setStyles(v+"_ifr",{width:q.w-l.deltaWidth,height:q.h-l.deltaHeight});o._fixIELayout(v,1);return a.cancel(p)});if(E!="Move"){D()}function D(){if(f){return}o._fixIELayout(v,0);d.add(C.body,"div",{id:"mceEventBlocker","class":"mceEventBlocker "+(o.editor.settings.inlinepopups_skin||"clearlooks2"),style:{zIndex:o.zIndex+1}});if(tinymce.isIE6||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceEventBlocker",{position:"absolute",left:A.x,top:A.y,width:A.w-2,height:A.h-2})}f=new b("mceEventBlocker");f.update();x=h.getXY();q=h.getSize();s=g.x+x.x-A.x;r=g.y+x.y-A.y;d.add(f.get(),"div",{id:"mcePlaceHolder","class":"mcePlaceHolder",style:{left:s,top:r,width:q.w,height:q.h}});F=new b("mcePlaceHolder")}z=a.add(C,"mousemove",function(w){var p,H,t;D();p=w.screenX-j;H=w.screenY-i;switch(E){case"ResizeW":m=p;n=0-p;break;case"ResizeE":n=p;break;case"ResizeN":case"ResizeNW":case"ResizeNE":if(E=="ResizeNW"){m=p;n=0-p}else{if(E=="ResizeNE"){n=p}}k=H;B=0-H;break;case"ResizeS":case"ResizeSW":case"ResizeSE":if(E=="ResizeSW"){m=p;n=0-p}else{if(E=="ResizeSE"){n=p}}B=H;break;case"mceMove":m=p;k=H;break}if(n<(t=l.features.min_width-q.w)){if(m!==0){m+=n-t}n=t}if(B<(t=l.features.min_height-q.h)){if(k!==0){k+=B-t}B=t}n=Math.min(n,l.features.max_width-q.w);B=Math.min(B,l.features.max_height-q.h);m=Math.max(m,A.x-(s+A.x));k=Math.max(k,A.y-(r+A.y));m=Math.min(m,(A.w+A.x)-(s+q.w+A.x));k=Math.min(k,(A.h+A.y)-(r+q.h+A.y));if(m+k!==0){if(s+m<0){m=0}if(r+k<0){k=0}F.moveTo(s+m,r+k)}if(n+B!==0){F.resizeTo(q.w+n,q.h+B)}return a.cancel(w)});return a.cancel(G)},resizeBy:function(g,h,i){var f=this.windows[i];if(f){f.element.resizeBy(g,h);f.iframeElement.resizeBy(g,h)}},close:function(i,k){var g=this,f,j=d.doc,h,k;k=g._findId(k||i);if(!g.windows[k]){g.parent(i);return}g.count--;if(g.count==0){d.remove("mceModalBlocker");d.setAttrib(d.doc.body,"aria-hidden","false");g.editor.focus()}if(f=g.windows[k]){g.onClose.dispatch(g);a.remove(j,"mousedown",f.mousedownFunc);a.remove(j,"click",f.clickFunc);a.clear(k);a.clear(k+"_ifr");d.setAttrib(k+"_ifr","src",'javascript:""');f.element.remove();delete g.windows[k];h=g._frontWindow();if(h){g.focus(h.id)}}},_frontWindow:function(){var g,f=0;e(this.windows,function(h){if(h.zIndex>f){g=h;f=h.zIndex}});return g},setTitle:function(f,g){var h;f=this._findId(f);if(h=d.get(f+"_title")){h.innerHTML=d.encode(g)}},alert:function(g,f,j){var i=this,h;h=i.open({title:i,type:"alert",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},confirm:function(g,f,j){var i=this,h;h=i.open({title:i,type:"confirm",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},_findId:function(f){var g=this;if(typeof(f)=="string"){return f}e(g.windows,function(h){var i=d.get(h.id+"_ifr");if(i&&f==i.contentWindow){f=h.id;return false}});return f},_fixIELayout:function(i,h){var f,g;if(!tinymce.isIE6){return}e(["n","s","w","e","nw","ne","sw","se"],function(j){var k=d.get(i+"_resize_"+j);d.setStyles(k,{width:h?k.clientWidth:"",height:h?k.clientHeight:"",cursor:d.getStyle(k,"cursor",1)});d.setStyle(i+"_bottom","bottom","-1px");k=0});if(f=this.windows[i]){f.element.hide();f.element.show();e(d.select("div,a",i),function(k,j){if(k.currentStyle.backgroundImage!="none"){g=new Image();g.src=k.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/,"$1")}});d.get(i).style.filter=""}}});tinymce.PluginManager.add("inlinepopups",tinymce.plugins.InlinePopups)})();
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/inlinepopups/editor_plugin_src.js ADDED
@@ -0,0 +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
+
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif ADDED
Binary file
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif ADDED
Binary file
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif ADDED
Binary file
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif ADDED
Binary file
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif ADDED
Binary file
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif ADDED
Binary file
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif ADDED
Binary file
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css ADDED
@@ -0,0 +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)}
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/inlinepopups/template.htm ADDED
@@ -0,0 +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>
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/media/css/media.css ADDED
@@ -0,0 +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}
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/media/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ (function(){var b=tinymce.explode("id,name,width,height,style,align,class,hspace,vspace,bgcolor,type"),a=tinymce.makeMap(b.join(",")),f=tinymce.html.Node,d,i,h=tinymce.util.JSON,g;d=[["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"],["ShockWave","166b1bca-3f9c-11cf-8075-444553540000","application/x-director","http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0"],["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"],["QuickTime","02bf25d5-8c17-4b23-bc80-d3488abddc6b","video/quicktime","http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"],["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"],["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"],["Silverlight","dfeaf541-f3e1-4c24-acac-99c30715084a","application/x-silverlight-2"],["Iframe"],["Video"],["EmbeddedAudio"],["Audio"]];function e(j){return typeof(j)=="string"?j.replace(/[^0-9%]/g,""):j}function c(m){var l,j,k;if(m&&!m.splice){j=[];for(k=0;true;k++){if(m[k]){j[k]=m[k]}else{break}}return j}return m}tinymce.create("tinymce.plugins.MediaPlugin",{init:function(n,j){var r=this,l={},m,p,q,k;function o(s){return s&&s.nodeName==="IMG"&&n.dom.hasClass(s,"mceItemMedia")}r.editor=n;r.url=j;i="";for(m=0;m<d.length;m++){k=d[m][0];q={name:k,clsids:tinymce.explode(d[m][1]||""),mimes:tinymce.explode(d[m][2]||""),codebase:d[m][3]};for(p=0;p<q.clsids.length;p++){l["clsid:"+q.clsids[p]]=q}for(p=0;p<q.mimes.length;p++){l[q.mimes[p]]=q}l["mceItem"+k]=q;l[k.toLowerCase()]=q;i+=(i?"|":"")+k}tinymce.each(n.getParam("media_types","video=mp4,m4v,ogv,webm;silverlight=xap;flash=swf,flv;shockwave=dcr;quicktime=mov,qt,mpg,mpeg;shockwave=dcr;windowsmedia=avi,wmv,wm,asf,asx,wmx,wvx;realmedia=rm,ra,ram;java=jar;audio=mp3,ogg").split(";"),function(v){var s,u,t;v=v.split(/=/);u=tinymce.explode(v[1].toLowerCase());for(s=0;s<u.length;s++){t=l[v[0].toLowerCase()];if(t){l[u[s]]=t}}});i=new RegExp("write("+i+")\\(([^)]+)\\)");r.lookup=l;n.onPreInit.add(function(){n.schema.addValidElements("object[id|style|width|height|classid|codebase|*],param[name|value],embed[id|style|width|height|type|src|*],video[*],audio[*],source[*]");n.parser.addNodeFilter("object,embed,video,audio,script,iframe",function(s){var t=s.length;while(t--){r.objectToImg(s[t])}});n.serializer.addNodeFilter("img",function(s,u,t){var v=s.length,w;while(v--){w=s[v];if((w.attr("class")||"").indexOf("mceItemMedia")!==-1){r.imgToObject(w,t)}}})});n.onInit.add(function(){if(n.theme&&n.theme.onResolveName){n.theme.onResolveName.add(function(s,t){if(t.name==="img"&&n.dom.hasClass(t.node,"mceItemMedia")){t.name="media"}})}if(n&&n.plugins.contextmenu){n.plugins.contextmenu.onContextMenu.add(function(t,u,s){if(s.nodeName==="IMG"&&s.className.indexOf("mceItemMedia")!==-1){u.add({title:"media.edit",icon:"media",cmd:"mceMedia"})}})}});n.addCommand("mceMedia",function(){var t,s;s=n.selection.getNode();if(o(s)){t=n.dom.getAttrib(s,"data-mce-json");if(t){t=h.parse(t);tinymce.each(b,function(u){var v=n.dom.getAttrib(s,u);if(v){t[u]=v}});t.type=r.getType(s.className).name.toLowerCase()}}if(!t){t={type:"flash",video:{sources:[]},params:{}}}n.windowManager.open({file:j+"/media.htm",width:430+parseInt(n.getLang("media.delta_width",0)),height:500+parseInt(n.getLang("media.delta_height",0)),inline:1},{plugin_url:j,data:t})});n.addButton("media",{title:"media.desc",cmd:"mceMedia"});n.onNodeChange.add(function(t,s,u){s.setActive("media",o(u))})},convertUrl:function(l,o){var k=this,n=k.editor,m=n.settings,p=m.url_converter,j=m.url_converter_scope||k;if(!l){return l}if(o){return n.documentBaseURI.toAbsolute(l)}return p.call(j,l,"src","object")},getInfo:function(){return{longname:"Media",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media",version:tinymce.majorVersion+"."+tinymce.minorVersion}},dataToImg:function(m,k){var r=this,o=r.editor,p=o.documentBaseURI,j,q,n,l;m.params.src=r.convertUrl(m.params.src,k);q=m.video.attrs;if(q){q.src=r.convertUrl(q.src,k)}if(q){q.poster=r.convertUrl(q.poster,k)}j=c(m.video.sources);if(j){for(l=0;l<j.length;l++){j[l].src=r.convertUrl(j[l].src,k)}}n=r.editor.dom.create("img",{id:m.id,style:m.style,align:m.align,hspace:m.hspace,vspace:m.vspace,src:r.editor.theme.url+"/img/trans.gif","class":"mceItemMedia mceItem"+r.getType(m.type).name,"data-mce-json":h.serialize(m,"'")});n.width=m.width=e(m.width||(m.type=="audio"?"300":"320"));n.height=m.height=e(m.height||(m.type=="audio"?"32":"240"));return n},dataToHtml:function(j,k){return this.editor.serializer.serialize(this.dataToImg(j,k),{forced_root_block:"",force_absolute:k})},htmlToData:function(l){var k,j,m;m={type:"flash",video:{sources:[]},params:{}};k=this.editor.parser.parse(l);j=k.getAll("img")[0];if(j){m=h.parse(j.attr("data-mce-json"));m.type=this.getType(j.attr("class")).name.toLowerCase();tinymce.each(b,function(n){var o=j.attr(n);if(o){m[n]=o}})}return m},getType:function(m){var k,j,l;j=tinymce.explode(m," ");for(k=0;k<j.length;k++){l=this.lookup[j[k]];if(l){return l}}},imgToObject:function(z,o){var u=this,p=u.editor,C,H,j,t,I,y,G,w,k,E,s,q,A,D,m,x,l,B,F;function r(n,J){var N,M,O,L,K;K=p.getParam("flash_video_player_url",u.convertUrl(u.url+"/moxieplayer.swf"));if(K){N=p.documentBaseURI;G.params.src=K;if(p.getParam("flash_video_player_absvideourl",true)){n=N.toAbsolute(n||"",true);J=N.toAbsolute(J||"",true)}O="";M=p.getParam("flash_video_player_flashvars",{url:"$url",poster:"$poster"});tinymce.each(M,function(Q,P){Q=Q.replace(/\$url/,n||"");Q=Q.replace(/\$poster/,J||"");if(Q.length>0){O+=(O?"&":"")+P+"="+escape(Q)}});if(O.length){G.params.flashvars=O}L=p.getParam("flash_video_player_params",{allowfullscreen:true,allowscriptaccess:true});tinymce.each(L,function(Q,P){G.params[P]=""+Q})}}G=z.attr("data-mce-json");if(!G){return}G=h.parse(G);q=this.getType(z.attr("class"));B=z.attr("data-mce-style");if(!B){B=z.attr("style");if(B){B=p.dom.serializeStyle(p.dom.parseStyle(B,"img"))}}G.width=z.attr("width")||G.width;G.height=z.attr("height")||G.height;if(q.name==="Iframe"){x=new f("iframe",1);tinymce.each(b,function(n){var J=z.attr(n);if(n=="class"&&J){J=J.replace(/mceItem.+ ?/g,"")}if(J&&J.length>0){x.attr(n,J)}});for(I in G.params){x.attr(I,G.params[I])}x.attr({style:B,src:G.params.src});z.replace(x);return}if(this.editor.settings.media_use_script){x=new f("script",1).attr("type","text/javascript");y=new f("#text",3);y.value="write"+q.name+"("+h.serialize(tinymce.extend(G.params,{width:z.attr("width"),height:z.attr("height")}))+");";x.append(y);z.replace(x);return}if(q.name==="Video"&&G.video.sources[0]){C=new f("video",1).attr(tinymce.extend({id:z.attr("id"),width:e(z.attr("width")),height:e(z.attr("height")),style:B},G.video.attrs));if(G.video.attrs){l=G.video.attrs.poster}k=G.video.sources=c(G.video.sources);for(A=0;A<k.length;A++){if(/\.mp4$/.test(k[A].src)){m=k[A].src}}if(!k[0].type){C.attr("src",k[0].src);k.splice(0,1)}for(A=0;A<k.length;A++){w=new f("source",1).attr(k[A]);w.shortEnded=true;C.append(w)}if(m){r(m,l);q=u.getType("flash")}else{G.params.src=""}}if(q.name==="Audio"&&G.video.sources[0]){F=new f("audio",1).attr(tinymce.extend({id:z.attr("id"),width:e(z.attr("width")),height:e(z.attr("height")),style:B},G.video.attrs));if(G.video.attrs){l=G.video.attrs.poster}k=G.video.sources=c(G.video.sources);if(!k[0].type){F.attr("src",k[0].src);k.splice(0,1)}for(A=0;A<k.length;A++){w=new f("source",1).attr(k[A]);w.shortEnded=true;F.append(w)}G.params.src=""}if(q.name==="EmbeddedAudio"){j=new f("embed",1);j.shortEnded=true;j.attr({id:z.attr("id"),width:e(z.attr("width")),height:e(z.attr("height")),style:B,type:z.attr("type")});for(I in G.params){j.attr(I,G.params[I])}tinymce.each(b,function(n){if(G[n]&&n!="type"){j.attr(n,G[n])}});G.params.src=""}if(G.params.src){if(/\.flv$/i.test(G.params.src)){r(G.params.src,"")}if(o&&o.force_absolute){G.params.src=p.documentBaseURI.toAbsolute(G.params.src)}H=new f("object",1).attr({id:z.attr("id"),width:e(z.attr("width")),height:e(z.attr("height")),style:B});tinymce.each(b,function(n){var J=G[n];if(n=="class"&&J){J=J.replace(/mceItem.+ ?/g,"")}if(J&&n!="type"){H.attr(n,J)}});for(I in G.params){s=new f("param",1);s.shortEnded=true;y=G.params[I];if(I==="src"&&q.name==="WindowsMedia"){I="url"}s.attr({name:I,value:y});H.append(s)}if(this.editor.getParam("media_strict",true)){H.attr({data:G.params.src,type:q.mimes[0]})}else{H.attr({classid:"clsid:"+q.clsids[0],codebase:q.codebase});j=new f("embed",1);j.shortEnded=true;j.attr({id:z.attr("id"),width:e(z.attr("width")),height:e(z.attr("height")),style:B,type:q.mimes[0]});for(I in G.params){j.attr(I,G.params[I])}tinymce.each(b,function(n){if(G[n]&&n!="type"){j.attr(n,G[n])}});H.append(j)}if(G.object_html){y=new f("#text",3);y.raw=true;y.value=G.object_html;H.append(y)}if(C){C.append(H)}}if(C){if(G.video_html){y=new f("#text",3);y.raw=true;y.value=G.video_html;C.append(y)}}if(F){if(G.video_html){y=new f("#text",3);y.raw=true;y.value=G.video_html;F.append(y)}}var v=C||F||H||j;if(v){z.replace(v)}else{z.remove()}},objectToImg:function(C){var L,k,F,s,M,N,y,A,x,G,E,t,q,I,B,l,K,o,H=this.lookup,m,z,v=this.editor.settings.url_converter,n=this.editor.settings.url_converter_scope,w,r,D,j;function u(O){return new tinymce.html.Serializer({inner:true,validate:false}).serialize(O)}function J(P,O){return H[(P.attr(O)||"").toLowerCase()]}function p(P){var O=P.replace(/^.*\.([^.]+)$/,"$1");return H[O.toLowerCase()||""]}if(!C.parent){return}if(C.name==="script"){if(C.firstChild){m=i.exec(C.firstChild.value)}if(!m){return}o=m[1];K={video:{},params:h.parse(m[2])};A=K.params.width;x=K.params.height}K=K||{video:{},params:{}};M=new f("img",1);M.attr({src:this.editor.theme.url+"/img/trans.gif"});N=C.name;if(N==="video"||N=="audio"){F=C;L=C.getAll("object")[0];k=C.getAll("embed")[0];A=F.attr("width");x=F.attr("height");y=F.attr("id");K.video={attrs:{},sources:[]};z=K.video.attrs;for(N in F.attributes.map){z[N]=F.attributes.map[N]}B=C.attr("src");if(B){K.video.sources.push({src:v.call(n,B,"src",C.name)})}l=F.getAll("source");for(E=0;E<l.length;E++){B=l[E].remove();K.video.sources.push({src:v.call(n,B.attr("src"),"src","source"),type:B.attr("type"),media:B.attr("media")})}if(z.poster){z.poster=v.call(n,z.poster,"poster",C.name)}}if(C.name==="object"){L=C;k=C.getAll("embed")[0]}if(C.name==="embed"){k=C}if(C.name==="iframe"){s=C;o="Iframe"}if(L){A=A||L.attr("width");x=x||L.attr("height");G=G||L.attr("style");y=y||L.attr("id");w=w||L.attr("hspace");r=r||L.attr("vspace");D=D||L.attr("align");j=j||L.attr("bgcolor");K.name=L.attr("name");I=L.getAll("param");for(E=0;E<I.length;E++){q=I[E];N=q.remove().attr("name");if(!a[N]){K.params[N]=q.attr("value")}}K.params.src=K.params.src||L.attr("data")}if(k){A=A||k.attr("width");x=x||k.attr("height");G=G||k.attr("style");y=y||k.attr("id");w=w||k.attr("hspace");r=r||k.attr("vspace");D=D||k.attr("align");j=j||k.attr("bgcolor");for(N in k.attributes.map){if(!a[N]&&!K.params[N]){K.params[N]=k.attributes.map[N]}}}if(s){A=e(s.attr("width"));x=e(s.attr("height"));G=G||s.attr("style");y=s.attr("id");w=s.attr("hspace");r=s.attr("vspace");D=s.attr("align");j=s.attr("bgcolor");tinymce.each(b,function(O){M.attr(O,s.attr(O))});for(N in s.attributes.map){if(!a[N]&&!K.params[N]){K.params[N]=s.attributes.map[N]}}}if(K.params.movie){K.params.src=K.params.src||K.params.movie;delete K.params.movie}if(K.params.src){K.params.src=v.call(n,K.params.src,"src","object")}if(F){if(C.name==="video"){o=H.video.name}else{if(C.name==="audio"){o=H.audio.name}}}if(L&&!o){o=(J(L,"clsid")||J(L,"classid")||J(L,"type")||{}).name}if(k&&!o){o=(J(k,"type")||p(K.params.src)||{}).name}if(k&&o=="EmbeddedAudio"){K.params.type=k.attr("type")}C.replace(M);if(k){k.remove()}if(L){t=u(L.remove());if(t){K.object_html=t}}if(F){t=u(F.remove());if(t){K.video_html=t}}K.hspace=w;K.vspace=r;K.align=D;K.bgcolor=j;M.attr({id:y,"class":"mceItemMedia mceItem"+(o||"Flash"),style:G,width:A||(C.name=="audio"?"300":"320"),height:x||(C.name=="audio"?"32":"240"),hspace:w,vspace:r,align:D,bgcolor:j,"data-mce-json":h.serialize(K,"'")})}});tinymce.PluginManager.add("media",tinymce.plugins.MediaPlugin)})();
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/media/editor_plugin_src.js ADDED
@@ -0,0 +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
+ })();
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/media/js/embed.js ADDED
@@ -0,0 +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
+ }
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/media/js/media.js ADDED
@@ -0,0 +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
+ })();
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/media/langs/en_dlg.js ADDED
@@ -0,0 +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" });
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/media/media.htm ADDED
@@ -0,0 +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>
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/media/moxieplayer.swf ADDED
Binary file
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/paste/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ (function(){var c=tinymce.each,a={paste_auto_cleanup_on_paste:true,paste_enable_default_filters:true,paste_block_drop:false,paste_retain_style_properties:"none",paste_strip_class_attributes:"mso",paste_remove_spans:false,paste_remove_styles:false,paste_remove_styles_if_webkit:true,paste_convert_middot_lists:true,paste_convert_headers_to_strong:false,paste_dialog_width:"450",paste_dialog_height:"400",paste_text_use_dialog:false,paste_text_sticky:false,paste_text_sticky_default:false,paste_text_notifyalways:false,paste_text_linebreaktype:"combined",paste_text_replacements:[[/\u2026/g,"..."],[/[\x93\x94\u201c\u201d]/g,'"'],[/[\x60\x91\x92\u2018\u2019]/g,"'"]]};function b(d,e){return d.getParam(e,a[e])}tinymce.create("tinymce.plugins.PastePlugin",{init:function(d,e){var f=this;f.editor=d;f.url=e;f.onPreProcess=new tinymce.util.Dispatcher(f);f.onPostProcess=new tinymce.util.Dispatcher(f);f.onPreProcess.add(f._preProcess);f.onPostProcess.add(f._postProcess);f.onPreProcess.add(function(i,j){d.execCallback("paste_preprocess",i,j)});f.onPostProcess.add(function(i,j){d.execCallback("paste_postprocess",i,j)});d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){return false}});d.pasteAsPlainText=b(d,"paste_text_sticky_default");function h(l,j){var k=d.dom,i;f.onPreProcess.dispatch(f,l);l.node=k.create("div",0,l.content);if(tinymce.isGecko){i=d.selection.getRng(true);if(i.startContainer==i.endContainer&&i.startContainer.nodeType==3){if(l.node.childNodes.length===1&&/^(p|h[1-6]|pre)$/i.test(l.node.firstChild.nodeName)&&l.content.indexOf("__MCE_ITEM__")===-1){k.remove(l.node.firstChild,true)}}}f.onPostProcess.dispatch(f,l);l.content=d.serializer.serialize(l.node,{getInner:1,forced_root_block:""});if((!j)&&(d.pasteAsPlainText)){f._insertPlainText(l.content);if(!b(d,"paste_text_sticky")){d.pasteAsPlainText=false;d.controlManager.setActive("pastetext",false)}}else{f._insert(l.content)}}d.addCommand("mceInsertClipboardContent",function(i,j){h(j,true)});if(!b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(j,i){var k=tinymce.util.Cookie;d.pasteAsPlainText=!d.pasteAsPlainText;d.controlManager.setActive("pastetext",d.pasteAsPlainText);if((d.pasteAsPlainText)&&(!k.get("tinymcePasteText"))){if(b(d,"paste_text_sticky")){d.windowManager.alert(d.translate("paste.plaintext_mode_sticky"))}else{d.windowManager.alert(d.translate("paste.plaintext_mode"))}if(!b(d,"paste_text_notifyalways")){k.set("tinymcePasteText","1",new Date(new Date().getFullYear()+1,12,31))}}})}d.addButton("pastetext",{title:"paste.paste_text_desc",cmd:"mcePasteText"});d.addButton("selectall",{title:"paste.selectall_desc",cmd:"selectall"});function g(s){var l,p,j,t,k=d.selection,o=d.dom,q=d.getBody(),i,r;if(s.clipboardData||o.doc.dataTransfer){r=(s.clipboardData||o.doc.dataTransfer).getData("Text");if(d.pasteAsPlainText){s.preventDefault();h({content:o.encode(r).replace(/\r?\n/g,"<br />")});return}}if(o.get("_mcePaste")){return}l=o.add(q,"div",{id:"_mcePaste","class":"mcePaste","data-mce-bogus":"1"},"\uFEFF\uFEFF");if(q!=d.getDoc().body){i=o.getPos(d.selection.getStart(),q).y}else{i=q.scrollTop+o.getViewPort(d.getWin()).y}o.setStyles(l,{position:"absolute",left:tinymce.isGecko?-40:0,top:i-25,width:1,height:1,overflow:"hidden"});if(tinymce.isIE){t=k.getRng();j=o.doc.body.createTextRange();j.moveToElementText(l);j.execCommand("Paste");o.remove(l);if(l.innerHTML==="\uFEFF\uFEFF"){d.execCommand("mcePasteWord");s.preventDefault();return}k.setRng(t);k.setContent("");setTimeout(function(){h({content:l.innerHTML})},0);return tinymce.dom.Event.cancel(s)}else{function m(n){n.preventDefault()}o.bind(d.getDoc(),"mousedown",m);o.bind(d.getDoc(),"keydown",m);p=d.selection.getRng();l=l.firstChild;j=d.getDoc().createRange();j.setStart(l,0);j.setEnd(l,2);k.setRng(j);window.setTimeout(function(){var u="",n;if(!o.select("div.mcePaste > div.mcePaste").length){n=o.select("div.mcePaste");c(n,function(w){var v=w.firstChild;if(v&&v.nodeName=="DIV"&&v.style.marginTop&&v.style.backgroundColor){o.remove(v,1)}c(o.select("span.Apple-style-span",w),function(x){o.remove(x,1)});c(o.select("br[data-mce-bogus]",w),function(x){o.remove(x)});if(w.parentNode.className!="mcePaste"){u+=w.innerHTML}})}else{u="<p>"+o.encode(r).replace(/\r?\n\r?\n/g,"</p><p>").replace(/\r?\n/g,"<br />")+"</p>"}c(o.select("div.mcePaste"),function(v){o.remove(v)});if(p){k.setRng(p)}h({content:u});o.unbind(d.getDoc(),"mousedown",m);o.unbind(d.getDoc(),"keydown",m)},0)}}if(b(d,"paste_auto_cleanup_on_paste")){if(tinymce.isOpera||/Firefox\/2/.test(navigator.userAgent)){d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){g(j)}})}else{d.onPaste.addToTop(function(i,j){return g(j)})}}d.onInit.add(function(){d.controlManager.setActive("pastetext",d.pasteAsPlainText);if(b(d,"paste_block_drop")){d.dom.bind(d.getBody(),["dragend","dragover","draggesture","dragdrop","drop","drag"],function(i){i.preventDefault();i.stopPropagation();return false})}});f._legacySupport()},getInfo:function(){return{longname:"Paste text/word",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_preProcess:function(g,e){var k=this.editor,j=e.content,p=tinymce.grep,n=tinymce.explode,f=tinymce.trim,l,i;function d(h){c(h,function(o){if(o.constructor==RegExp){j=j.replace(o,"")}else{j=j.replace(o[0],o[1])}})}if(k.settings.paste_enable_default_filters==false){return}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(e.content)){d([[/(?:<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"]]);d([[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])}if(/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(j)||e.wordContent){e.wordContent=true;d([/^\s*(&nbsp;)+/gi,/(&nbsp;|<br[^>]*>)+\s*$/gi]);if(b(k,"paste_convert_headers_to_strong")){j=j.replace(/<p [^>]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi,"<p><strong>$1</strong></p>")}if(b(k,"paste_convert_middot_lists")){d([[/<!--\[if !supportLists\]-->/gi,"$&__MCE_ITEM__"],[/(<span[^>]+(?:mso-list:|:\s*symbol)[^>]+>)/gi,"$1__MCE_ITEM__"],[/(<p[^>]+(?:MsoListParagraph)[^>]+>)/gi,"$1__MCE_ITEM__"]])}d([/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/&nbsp;/gi,"\u00a0"]]);do{l=j.length;j=j.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi,"$1")}while(l!=j.length);if(b(k,"paste_retain_style_properties").replace(/^none$/i,"").length==0){j=j.replace(/<\/?span[^>]*>/gi,"")}else{d([[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(o,h){return(h.length>0)?h.replace(/./," ").slice(Math.floor(h.length/2)).split("").join("\u00a0"):""}],[/(<[a-z][^>]*)\sstyle="([^"]*)"/gi,function(t,h,r){var u=[],o=0,q=n(f(r).replace(/&quot;/gi,"'"),";");c(q,function(s){var w,y,z=n(s,":");function x(A){return A+((A!=="0")&&(/\d$/.test(A)))?"px":""}if(z.length==2){w=z[0].toLowerCase();y=z[1].toLowerCase();switch(w){case"mso-padding-alt":case"mso-padding-top-alt":case"mso-padding-right-alt":case"mso-padding-bottom-alt":case"mso-padding-left-alt":case"mso-margin-alt":case"mso-margin-top-alt":case"mso-margin-right-alt":case"mso-margin-bottom-alt":case"mso-margin-left-alt":case"mso-table-layout-alt":case"mso-height":case"mso-width":case"mso-vertical-align-alt":u[o++]=w.replace(/^mso-|-alt$/g,"")+":"+x(y);return;case"horiz-align":u[o++]="text-align:"+y;return;case"vert-align":u[o++]="vertical-align:"+y;return;case"font-color":case"mso-foreground":u[o++]="color:"+y;return;case"mso-background":case"mso-highlight":u[o++]="background:"+y;return;case"mso-default-height":u[o++]="min-height:"+x(y);return;case"mso-default-width":u[o++]="min-width:"+x(y);return;case"mso-padding-between-alt":u[o++]="border-collapse:separate;border-spacing:"+x(y);return;case"text-line-through":if((y=="single")||(y=="double")){u[o++]="text-decoration:line-through"}return;case"mso-zero-height":if(y=="yes"){u[o++]="display:none"}return}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(w)){return}u[o++]=w+":"+z[1]}});if(o>0){return h+' style="'+u.join(";")+'"'}else{return h}}]])}}if(b(k,"paste_convert_headers_to_strong")){d([[/<h[1-6][^>]*>/gi,"<p><strong>"],[/<\/h[1-6][^>]*>/gi,"</strong></p>"]])}d([[/Version:[\d.]+\nStartHTML:\d+\nEndHTML:\d+\nStartFragment:\d+\nEndFragment:\d+/gi,""]]);i=b(k,"paste_strip_class_attributes");if(i!=="none"){function m(q,o){if(i==="all"){return""}var h=p(n(o.replace(/^(["'])(.*)\1$/,"$2")," "),function(r){return(/^(?!mso)/i.test(r))});return h.length?' class="'+h.join(" ")+'"':""}j=j.replace(/ class="([^"]+)"/gi,m);j=j.replace(/ class=([\-\w]+)/gi,m)}if(b(k,"paste_remove_spans")){j=j.replace(/<\/?span[^>]*>/gi,"")}e.content=j},_postProcess:function(g,i){var f=this,e=f.editor,h=e.dom,d;if(e.settings.paste_enable_default_filters==false){return}if(i.wordContent){c(h.select("a",i.node),function(j){if(!j.href||j.href.indexOf("#_Toc")!=-1){h.remove(j,1)}});if(b(e,"paste_convert_middot_lists")){f._convertLists(g,i)}d=b(e,"paste_retain_style_properties");if((tinymce.is(d,"string"))&&(d!=="all")&&(d!=="*")){d=tinymce.explode(d.replace(/^none$/i,""));c(h.select("*",i.node),function(m){var n={},k=0,l,o,j;if(d){for(l=0;l<d.length;l++){o=d[l];j=h.getStyle(m,o);if(j){n[o]=j;k++}}}h.setAttrib(m,"style","");if(d&&k>0){h.setStyles(m,n)}else{if(m.nodeName=="SPAN"&&!m.className){h.remove(m,true)}}})}}if(b(e,"paste_remove_styles")||(b(e,"paste_remove_styles_if_webkit")&&tinymce.isWebKit)){c(h.select("*[style]",i.node),function(j){j.removeAttribute("style");j.removeAttribute("data-mce-style")})}else{if(tinymce.isWebKit){c(h.select("*",i.node),function(j){j.removeAttribute("data-mce-style")})}}},_convertLists:function(g,e){var i=g.editor.dom,h,l,d=-1,f,m=[],k,j;c(i.select("p",e.node),function(t){var q,u="",s,r,n,o;for(q=t.firstChild;q&&q.nodeType==3;q=q.nextSibling){u+=q.nodeValue}u=t.innerHTML.replace(/<\/?\w+[^>]*>/gi,"").replace(/&nbsp;/g,"\u00a0");if(/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*\u00a0*/.test(u)){s="ul"}if(/^__MCE_ITEM__\s*\w+\.\s*\u00a0+/.test(u)){s="ol"}if(s){f=parseFloat(t.style.marginLeft||0);if(f>d){m.push(f)}if(!h||s!=k){h=i.create(s);i.insertAfter(h,t)}else{if(f>d){h=l.appendChild(i.create(s))}else{if(f<d){n=tinymce.inArray(m,f);o=i.getParents(h.parentNode,s);h=o[o.length-1-n]||h}}}c(i.select("span",t),function(v){var p=v.innerHTML.replace(/<\/?\w+[^>]*>/gi,"");if(s=="ul"&&/^__MCE_ITEM__[\u2022\u00b7\u00a7\u00d8o\u25CF]/.test(p)){i.remove(v)}else{if(/^__MCE_ITEM__[\s\S]*\w+\.(&nbsp;|\u00a0)*\s*/.test(p)){i.remove(v)}}});r=t.innerHTML;if(s=="ul"){r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*(&nbsp;|\u00a0)+\s*/,"")}else{r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^\s*\w+\.(&nbsp;|\u00a0)+\s*/,"")}l=h.appendChild(i.create("li",0,r));i.remove(t);d=f;k=s}else{h=d=0}});j=e.node.innerHTML;if(j.indexOf("__MCE_ITEM__")!=-1){e.node.innerHTML=j.replace(/__MCE_ITEM__/g,"")}},_insert:function(f,d){var e=this.editor,g=e.selection.getRng();if(!e.selection.isCollapsed()&&g.startContainer!=g.endContainer){e.getDoc().execCommand("Delete",false,null)}e.execCommand("mceInsertContent",false,f,{skip_undo:d})},_insertPlainText:function(g){var d=this.editor,e=b(d,"paste_text_linebreaktype"),i=b(d,"paste_text_replacements"),f=tinymce.is;function h(j){c(j,function(k){if(k.constructor==RegExp){g=g.replace(k,"")}else{g=g.replace(k[0],k[1])}})}if((typeof(g)==="string")&&(g.length>0)){if(/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(g)){h([/[\n\r]+/g])}else{h([/\r+/g])}h([[/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi,"\n\n"],[/<br[^>]*>|<\/tr>/gi,"\n"],[/<\/t[dh]>\s*<t[dh][^>]*>/gi,"\t"],/<[a-z!\/?][^>]*>/gi,[/&nbsp;/gi," "],[/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi,"$1"],[/\n{3,}/g,"\n\n"]]);g=d.dom.decode(tinymce.html.Entities.encodeRaw(g));if(f(i,"array")){h(i)}else{if(f(i,"string")){h(new RegExp(i,"gi"))}}if(e=="none"){h([[/\n+/g," "]])}else{if(e=="br"){h([[/\n/g,"<br />"]])}else{if(e=="p"){h([[/\n+/g,"</p><p>"],[/^(.*<\/p>)(<p>)$/,"<p>$1"]])}else{h([[/\n\n/g,"</p><p>"],[/^(.*<\/p>)(<p>)$/,"<p>$1"],[/\n/g,"<br />"]])}}}d.execCommand("mceInsertContent",false,g)}},_legacySupport:function(){var e=this,d=e.editor;d.addCommand("mcePasteWord",function(){d.windowManager.open({file:e.url+"/pasteword.htm",width:parseInt(b(d,"paste_dialog_width")),height:parseInt(b(d,"paste_dialog_height")),inline:1})});if(b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(){d.windowManager.open({file:e.url+"/pastetext.htm",width:parseInt(b(d,"paste_dialog_width")),height:parseInt(b(d,"paste_dialog_height")),inline:1})})}d.addButton("pasteword",{title:"paste.paste_word_desc",cmd:"mcePasteWord"})}});tinymce.PluginManager.add("paste",tinymce.plugins.PastePlugin)})();
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/paste/editor_plugin_src.js ADDED
@@ -0,0 +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
+ })();
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/paste/js/pastetext.js ADDED
@@ -0,0 +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);
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/paste/js/pasteword.js ADDED
@@ -0,0 +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);
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/paste/langs/en_dlg.js ADDED
@@ -0,0 +1 @@
 
1
+ tinyMCE.addI18n('en.paste_dlg',{"word_title":"Use Ctrl+V on your keyboard to paste the text into the window.","text_linebreaks":"Keep Linebreaks","text_title":"Use Ctrl+V on your keyboard to paste the text into the window."});
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/paste/pastetext.htm ADDED
@@ -0,0 +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>
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/paste/pasteword.htm ADDED
@@ -0,0 +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>
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/spellchecker/css/content.css ADDED
@@ -0,0 +1 @@
 
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.js ADDED
@@ -0,0 +1 @@
 
1
+ (function(){var a=tinymce.util.JSONRequest,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.SpellcheckerPlugin",{getInfo:function(){return{longname:"Spellchecker",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker",version:tinymce.majorVersion+"."+tinymce.minorVersion}},init:function(e,f){var g=this,d;g.url=f;g.editor=e;g.rpcUrl=e.getParam("spellchecker_rpc_url","{backend}");if(g.rpcUrl=="{backend}"){if(tinymce.isIE){return}g.hasSupport=true;e.onContextMenu.addToTop(function(h,i){if(g.active){return false}})}e.addCommand("mceSpellCheck",function(){if(g.rpcUrl=="{backend}"){g.editor.getBody().spellcheck=g.active=!g.active;return}if(!g.active){e.setProgressState(1);g._sendRPC("checkWords",[g.selectedLang,g._getWords()],function(h){if(h.length>0){g.active=1;g._markWords(h);e.setProgressState(0);e.nodeChanged()}else{e.setProgressState(0);if(e.getParam("spellchecker_report_no_misspellings",true)){e.windowManager.alert("spellchecker.no_mpell")}}})}else{g._done()}});if(e.settings.content_css!==false){e.contentCSS.push(f+"/css/content.css")}e.onClick.add(g._showMenu,g);e.onContextMenu.add(g._showMenu,g);e.onBeforeGetContent.add(function(){if(g.active){g._removeWords()}});e.onNodeChange.add(function(i,h){h.setActive("spellchecker",g.active)});e.onSetContent.add(function(){g._done()});e.onBeforeGetContent.add(function(){g._done()});e.onBeforeExecCommand.add(function(h,i){if(i=="mceFullScreen"){g._done()}});g.languages={};c(e.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(i,h){if(h.indexOf("+")===0){h=h.substring(1);g.selectedLang=i}g.languages[h]=i})},createControl:function(h,d){var f=this,g,e=f.editor;if(h=="spellchecker"){if(f.rpcUrl=="{backend}"){if(f.hasSupport){g=d.createButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f})}return g}g=d.createSplitButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f});g.onRenderMenu.add(function(j,i){i.add({title:"spellchecker.langs","class":"mceMenuItemTitle"}).setDisabled(1);c(f.languages,function(n,m){var p={icon:1},l;p.onclick=function(){if(n==f.selectedLang){return}l.setSelected(1);f.selectedItem.setSelected(0);f.selectedItem=l;f.selectedLang=n};p.title=m;l=i.add(p);l.setSelected(n==f.selectedLang);if(n==f.selectedLang){f.selectedItem=l}})});return g}},_walk:function(i,g){var h=this.editor.getDoc(),e;if(h.createTreeWalker){e=h.createTreeWalker(i,NodeFilter.SHOW_TEXT,null,false);while((i=e.nextNode())!=null){g.call(this,i)}}else{tinymce.walk(i,g,"childNodes")}},_getSeparators:function(){var e="",d,f=this.editor.getParam("spellchecker_word_separator_chars",'\\s!"#$%&()*+,-./:;<=>?@[]^_{|}����������������\u201d\u201c');for(d=0;d<f.length;d++){e+="\\"+f.charAt(d)}return e},_getWords:function(){var e=this.editor,g=[],d="",f={},h=[];this._walk(e.getBody(),function(i){if(i.nodeType==3){d+=i.nodeValue+" "}});if(e.getParam("spellchecker_word_pattern")){h=d.match("("+e.getParam("spellchecker_word_pattern")+")","gi")}else{d=d.replace(new RegExp("([0-9]|["+this._getSeparators()+"])","g")," ");d=tinymce.trim(d.replace(/(\s+)/g," "));h=d.split(" ")}c(h,function(i){if(!f[i]){g.push(i);f[i]=1}});return g},_removeWords:function(d){var e=this.editor,h=e.dom,g=e.selection,f=g.getRng(true);c(h.select("span").reverse(),function(i){if(i&&(h.hasClass(i,"mceItemHiddenSpellWord")||h.hasClass(i,"mceItemHidden"))){if(!d||h.decode(i.innerHTML)==d){h.remove(i,1)}}});g.setRng(f)},_markWords:function(l){var h=this.editor,g=h.dom,j=h.getDoc(),i=h.selection,d=i.getRng(true),e=[],k=l.join("|"),m=this._getSeparators(),f=new RegExp("(^|["+m+"])("+k+")(?=["+m+"]|$)","g");this._walk(h.getBody(),function(o){if(o.nodeType==3){e.push(o)}});c(e,function(t){var r,q,o,s,p=t.nodeValue;if(f.test(p)){p=g.encode(p);q=g.create("span",{"class":"mceItemHidden"});if(tinymce.isIE){p=p.replace(f,"$1<mcespell>$2</mcespell>");while((s=p.indexOf("<mcespell>"))!=-1){o=p.substring(0,s);if(o.length){r=j.createTextNode(g.decode(o));q.appendChild(r)}p=p.substring(s+10);s=p.indexOf("</mcespell>");o=p.substring(0,s);p=p.substring(s+11);q.appendChild(g.create("span",{"class":"mceItemHiddenSpellWord"},o))}if(p.length){r=j.createTextNode(g.decode(p));q.appendChild(r)}}else{q.innerHTML=p.replace(f,'$1<span class="mceItemHiddenSpellWord">$2</span>')}g.replace(q,t)}});i.setRng(d)},_showMenu:function(h,j){var i=this,h=i.editor,d=i._menu,l,k=h.dom,g=k.getViewPort(h.getWin()),f=j.target;j=0;if(!d){d=h.controlManager.createDropMenu("spellcheckermenu",{"class":"mceNoIcons"});i._menu=d}if(k.hasClass(f,"mceItemHiddenSpellWord")){d.removeAll();d.add({title:"spellchecker.wait","class":"mceMenuItemTitle"}).setDisabled(1);i._sendRPC("getSuggestions",[i.selectedLang,k.decode(f.innerHTML)],function(m){var e;d.removeAll();if(m.length>0){d.add({title:"spellchecker.sug","class":"mceMenuItemTitle"}).setDisabled(1);c(m,function(n){d.add({title:n,onclick:function(){k.replace(h.getDoc().createTextNode(n),f);i._checkDone()}})});d.addSeparator()}else{d.add({title:"spellchecker.no_sug","class":"mceMenuItemTitle"}).setDisabled(1)}if(h.getParam("show_ignore_words",true)){e=i.editor.getParam("spellchecker_enable_ignore_rpc","");d.add({title:"spellchecker.ignore_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}}});d.add({title:"spellchecker.ignore_words",onclick:function(){var n=f.innerHTML;i._removeWords(k.decode(n));i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWords",[i.selectedLang,n],function(o){h.setProgressState(0)})}}})}if(i.editor.getParam("spellchecker_enable_learn_rpc")){d.add({title:"spellchecker.learn_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();h.setProgressState(1);i._sendRPC("learnWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}})}d.update()});l=b.getPos(h.getContentAreaContainer());d.settings.offset_x=l.x;d.settings.offset_y=l.y;h.selection.select(f);l=k.getPos(f);d.showMenu(l.x,l.y+f.offsetHeight-g.y);return tinymce.dom.Event.cancel(j)}else{d.hideMenu()}},_checkDone:function(){var e=this,d=e.editor,g=d.dom,f;c(g.select("span"),function(h){if(h&&g.hasClass(h,"mceItemHiddenSpellWord")){f=true;return false}});if(!f){e._done()}},_done:function(){var d=this,e=d.active;if(d.active){d.active=0;d._removeWords();if(d._menu){d._menu.hideMenu()}if(e){d.editor.nodeChanged()}}},_sendRPC:function(e,g,d){var f=this;a.sendRPC({url:f.rpcUrl,method:e,params:g,success:d,error:function(i,h){f.editor.setProgressState(0);f.editor.windowManager.alert(i.errstr||("Error response: "+h.responseText))}})}});tinymce.PluginManager.add("spellchecker",tinymce.plugins.SpellcheckerPlugin)})();
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/spellchecker/editor_plugin_src.js ADDED
@@ -0,0 +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
+ })();
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/spellchecker/img/wline.gif ADDED
Binary file
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/tabfocus/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ (function(){var c=tinymce.DOM,a=tinymce.dom.Event,d=tinymce.each,b=tinymce.explode;tinymce.create("tinymce.plugins.TabFocusPlugin",{init:function(f,g){function e(i,j){if(j.keyCode===9){return a.cancel(j)}}function h(l,p){var j,m,o,n,k;function q(t){n=c.select(":input:enabled,*[tabindex]:not(iframe)");function s(v){return v.nodeName==="BODY"||(v.type!="hidden"&&!(v.style.display=="none")&&!(v.style.visibility=="hidden")&&s(v.parentNode))}function i(v){return v.attributes.tabIndex.specified||v.nodeName=="INPUT"||v.nodeName=="TEXTAREA"}function u(){return tinymce.isIE6||tinymce.isIE7}function r(v){return((!u()||i(v)))&&v.getAttribute("tabindex")!="-1"&&s(v)}d(n,function(w,v){if(w.id==l.id){j=v;return false}});if(t>0){for(m=j+1;m<n.length;m++){if(r(n[m])){return n[m]}}}else{for(m=j-1;m>=0;m--){if(r(n[m])){return n[m]}}}return null}if(p.keyCode===9){k=b(l.getParam("tab_focus",l.getParam("tabfocus_elements",":prev,:next")));if(k.length==1){k[1]=k[0];k[0]=":prev"}if(p.shiftKey){if(k[0]==":prev"){n=q(-1)}else{n=c.get(k[0])}}else{if(k[1]==":next"){n=q(1)}else{n=c.get(k[1])}}if(n){if(n.id&&(l=tinymce.get(n.id||n.name))){l.focus()}else{window.setTimeout(function(){if(!tinymce.isWebKit){window.focus()}n.focus()},10)}return a.cancel(p)}}}f.onKeyUp.add(e);if(tinymce.isGecko){f.onKeyPress.add(h);f.onKeyDown.add(e)}else{f.onKeyDown.add(h)}},getInfo:function(){return{longname:"Tabfocus",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("tabfocus",tinymce.plugins.TabFocusPlugin)})();
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/tabfocus/editor_plugin_src.js ADDED
@@ -0,0 +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
+ })();
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/wordcount/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ (function(){tinymce.create("tinymce.plugins.WordCount",{block:0,id:null,countre:null,cleanre:null,init:function(c,d){var e=this,f=0,g=tinymce.VK;e.countre=c.getParam("wordcount_countregex",/[\w\u2019\'-]+/g);e.cleanre=c.getParam("wordcount_cleanregex",/[0-9.(),;:!?%#$?\'\"_+=\\\/-]*/g);e.update_rate=c.getParam("wordcount_update_rate",2000);e.update_on_delete=c.getParam("wordcount_update_on_delete",false);e.id=c.id+"-word-count";c.onPostRender.add(function(i,h){var j,k;k=i.getParam("wordcount_target_id");if(!k){j=tinymce.DOM.get(i.id+"_path_row");if(j){tinymce.DOM.add(j.parentNode,"div",{style:"float: right"},i.getLang("wordcount.words","Words: ")+'<span id="'+e.id+'">0</span>')}}else{tinymce.DOM.add(k,"span",{},'<span id="'+e.id+'">0</span>')}});c.onInit.add(function(h){h.selection.onSetContent.add(function(){e._count(h)});e._count(h)});c.onSetContent.add(function(h){e._count(h)});function b(h){return h!==f&&(h===g.ENTER||f===g.SPACEBAR||a(f))}function a(h){return h===g.DELETE||h===g.BACKSPACE}c.onKeyUp.add(function(h,i){if(b(i.keyCode)||e.update_on_delete&&a(i.keyCode)){e._count(h)}f=i.keyCode})},_getCount:function(c){var a=0;var b=c.getContent({format:"raw"});if(b){b=b.replace(/\.\.\./g," ");b=b.replace(/<.[^<>]*?>/g," ").replace(/&nbsp;|&#160;/gi," ");b=b.replace(/(\w+)(&.+?;)+(\w+)/,"$1$3").replace(/&.+?;/g," ");b=b.replace(this.cleanre,"");var d=b.match(this.countre);if(d){a=d.length}}return a},_count:function(a){var b=this;if(b.block){return}b.block=1;setTimeout(function(){if(!a.destroyed){var c=b._getCount(a);tinymce.DOM.setHTML(b.id,c.toString());setTimeout(function(){b.block=0},b.update_rate)}},1)},getInfo:function(){return{longname:"Word Count plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/wordcount",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("wordcount",tinymce.plugins.WordCount)})();
wordpress-creation-kit-api/assets/js/tiny_mce/plugins/wordcount/editor_plugin_src.js ADDED
@@ -0,0 +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
+ })();
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/about.htm ADDED
@@ -0,0 +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>
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/anchor.htm ADDED
@@ -0,0 +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>
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/charmap.htm ADDED
@@ -0,0 +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>
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/color_picker.htm ADDED
@@ -0,0 +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>
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/editor_template.js ADDED
@@ -0,0 +1 @@
 
1
+ (function(h){var i=h.DOM,g=h.dom.Event,c=h.extend,f=h.each,a=h.util.Cookie,e,d=h.explode;function b(m,k){var q,p=m.dom,n="",o,l;previewStyles=m.settings.preview_styles;if(previewStyles===false){return""}if(!previewStyles){previewStyles="font-family font-size font-weight text-decoration text-transform color background-color"}function j(r){return r.replace(/%(\w+)/g,"")}name=k.block||k.inline||"span";q=p.create(name);f(k.styles,function(s,r){s=j(s);if(s){p.setStyle(q,r,s)}});f(k.attributes,function(s,r){s=j(s);if(s){p.setAttrib(q,r,s)}});f(k.classes,function(r){r=j(r);if(!p.hasClass(q,r)){p.addClass(q,r)}});p.setStyles(q,{position:"absolute",left:-65535});m.getBody().appendChild(q);o=p.getStyle(m.getBody(),"fontSize",true);o=/px$/.test(o)?parseInt(o,10):0;f(previewStyles.split(" "),function(r){var s=p.getStyle(q,r,true);if(r=="background-color"&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(s)){s=p.getStyle(m.getBody(),r,true);if(p.toHex(s).toLowerCase()=="#ffffff"){return}}if(r=="font-size"){if(/em|%$/.test(s)){if(o===0){return}s=parseFloat(s,10)/(/%$/.test(s)?100:1);s=(s*o)+"px"}}n+=r+":"+s+";"});p.remove(q);return n}h.ThemeManager.requireLangPack("advanced");h.create("tinymce.themes.AdvancedTheme",{sizes:[8,10,12,14,18,24,36],controls:{bold:["bold_desc","Bold"],italic:["italic_desc","Italic"],underline:["underline_desc","Underline"],strikethrough:["striketrough_desc","Strikethrough"],justifyleft:["justifyleft_desc","JustifyLeft"],justifycenter:["justifycenter_desc","JustifyCenter"],justifyright:["justifyright_desc","JustifyRight"],justifyfull:["justifyfull_desc","JustifyFull"],bullist:["bullist_desc","InsertUnorderedList"],numlist:["numlist_desc","InsertOrderedList"],outdent:["outdent_desc","Outdent"],indent:["indent_desc","Indent"],cut:["cut_desc","Cut"],copy:["copy_desc","Copy"],paste:["paste_desc","Paste"],undo:["undo_desc","Undo"],redo:["redo_desc","Redo"],link:["link_desc","mceLink"],unlink:["unlink_desc","unlink"],image:["image_desc","mceImage"],cleanup:["cleanup_desc","mceCleanup"],help:["help_desc","mceHelp"],code:["code_desc","mceCodeEditor"],hr:["hr_desc","InsertHorizontalRule"],removeformat:["removeformat_desc","RemoveFormat"],sub:["sub_desc","subscript"],sup:["sup_desc","superscript"],forecolor:["forecolor_desc","ForeColor"],forecolorpicker:["forecolor_desc","mceForeColor"],backcolor:["backcolor_desc","HiliteColor"],backcolorpicker:["backcolor_desc","mceBackColor"],charmap:["charmap_desc","mceCharMap"],visualaid:["visualaid_desc","mceToggleVisualAid"],anchor:["anchor_desc","mceInsertAnchor"],newdocument:["newdocument_desc","mceNewDocument"],blockquote:["blockquote_desc","mceBlockQuote"]},stateControls:["bold","italic","underline","strikethrough","bullist","numlist","justifyleft","justifycenter","justifyright","justifyfull","sub","sup","blockquote"],init:function(k,l){var m=this,n,j,p;m.editor=k;m.url=l;m.onResolveName=new h.util.Dispatcher(this);n=k.settings;k.forcedHighContrastMode=k.settings.detect_highcontrast&&m._isHighContrast();k.settings.skin=k.forcedHighContrastMode?"highcontrast":k.settings.skin;if(!n.theme_advanced_buttons1){n=c({theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,|,sub,sup,|,charmap"},n)}m.settings=n=c({theme_advanced_path:true,theme_advanced_toolbar_location:"top",theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6",theme_advanced_toolbar_align:"left",theme_advanced_statusbar_location:"bottom",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",theme_advanced_more_colors:1,theme_advanced_row_height:23,theme_advanced_resize_horizontal:1,theme_advanced_resizing_use_cookie:1,theme_advanced_font_sizes:"1,2,3,4,5,6,7",theme_advanced_font_selector:"span",theme_advanced_show_current_color:0,readonly:k.settings.readonly},n);if(!n.font_size_style_values){n.font_size_style_values="8pt,10pt,12pt,14pt,18pt,24pt,36pt"}if(h.is(n.theme_advanced_font_sizes,"string")){n.font_size_style_values=h.explode(n.font_size_style_values);n.font_size_classes=h.explode(n.font_size_classes||"");p={};k.settings.theme_advanced_font_sizes=n.theme_advanced_font_sizes;f(k.getParam("theme_advanced_font_sizes","","hash"),function(r,q){var o;if(q==r&&r>=1&&r<=7){q=r+" ("+m.sizes[r-1]+"pt)";o=n.font_size_classes[r-1];r=n.font_size_style_values[r-1]||(m.sizes[r-1]+"pt")}if(/^\s*\./.test(r)){o=r.replace(/\./g,"")}p[q]=o?{"class":o}:{fontSize:r}});n.theme_advanced_font_sizes=p}if((j=n.theme_advanced_path_location)&&j!="none"){n.theme_advanced_statusbar_location=n.theme_advanced_path_location}if(n.theme_advanced_statusbar_location=="none"){n.theme_advanced_statusbar_location=0}if(k.settings.content_css!==false){k.contentCSS.push(k.baseURI.toAbsolute(l+"/skins/"+k.settings.skin+"/content.css"))}k.onInit.add(function(){if(!k.settings.readonly){k.onNodeChange.add(m._nodeChanged,m);k.onKeyUp.add(m._updateUndoStatus,m);k.onMouseUp.add(m._updateUndoStatus,m);k.dom.bind(k.dom.getRoot(),"dragend",function(){m._updateUndoStatus(k)})}});k.onSetProgressState.add(function(r,o,s){var t,u=r.id,q;if(o){m.progressTimer=setTimeout(function(){t=r.getContainer();t=t.insertBefore(i.create("DIV",{style:"position:relative"}),t.firstChild);q=i.get(r.id+"_tbl");i.add(t,"div",{id:u+"_blocker","class":"mceBlocker",style:{width:q.clientWidth+2,height:q.clientHeight+2}});i.add(t,"div",{id:u+"_progress","class":"mceProgress",style:{left:q.clientWidth/2,top:q.clientHeight/2}})},s||0)}else{i.remove(u+"_blocker");i.remove(u+"_progress");clearTimeout(m.progressTimer)}});i.loadCSS(n.editor_css?k.documentBaseURI.toAbsolute(n.editor_css):l+"/skins/"+k.settings.skin+"/ui.css");if(n.skin_variant){i.loadCSS(l+"/skins/"+k.settings.skin+"/ui_"+n.skin_variant+".css")}},_isHighContrast:function(){var j,k=i.add(i.getRoot(),"div",{style:"background-color: rgb(171,239,86);"});j=(i.getStyle(k,"background-color",true)+"").toLowerCase().replace(/ /g,"");i.remove(k);return j!="rgb(171,239,86)"&&j!="#abef56"},createControl:function(m,j){var k,l;if(l=j.createControl(m)){return l}switch(m){case"styleselect":return this._createStyleSelect();case"formatselect":return this._createBlockFormats();case"fontselect":return this._createFontSelect();case"fontsizeselect":return this._createFontSizeSelect();case"forecolor":return this._createForeColorMenu();case"backcolor":return this._createBackColorMenu()}if((k=this.controls[m])){return j.createButton(m,{title:"advanced."+k[0],cmd:k[1],ui:k[2],value:k[3]})}},execCommand:function(l,k,m){var j=this["_"+l];if(j){j.call(this,k,m);return true}return false},_importClasses:function(l){var j=this.editor,k=j.controlManager.get("styleselect");if(k.getLength()==0){f(j.dom.getClasses(),function(q,m){var p="style_"+m,n;n={inline:"span",attributes:{"class":q["class"]},selector:"*"};j.formatter.register(p,n);k.add(q["class"],p,{style:function(){return b(j,n)}})})}},_createStyleSelect:function(o){var l=this,j=l.editor,k=j.controlManager,m;m=k.createListBox("styleselect",{title:"advanced.style_select",onselect:function(q){var r,n=[],p;f(m.items,function(s){n.push(s.value)});j.focus();j.undoManager.add();r=j.formatter.matchAll(n);h.each(r,function(s){if(!q||s==q){if(s){j.formatter.remove(s)}p=true}});if(!p){j.formatter.apply(q)}j.undoManager.add();j.nodeChanged();return false}});j.onPreInit.add(function(){var p=0,n=j.getParam("style_formats");if(n){f(n,function(q){var r,s=0;f(q,function(){s++});if(s>1){r=q.name=q.name||"style_"+(p++);j.formatter.register(r,q);m.add(q.title,r,{style:function(){return b(j,q)}})}else{m.add(q.title)}})}else{f(j.getParam("theme_advanced_styles","","hash"),function(t,s){var r,q;if(t){r="style_"+(p++);q={inline:"span",classes:t,selector:"*"};j.formatter.register(r,q);m.add(l.editor.translate(s),r,{style:function(){return b(j,q)}})}})}});if(m.getLength()==0){m.onPostRender.add(function(p,q){if(!m.NativeListBox){g.add(q.id+"_text","focus",l._importClasses,l);g.add(q.id+"_text","mousedown",l._importClasses,l);g.add(q.id+"_open","focus",l._importClasses,l);g.add(q.id+"_open","mousedown",l._importClasses,l)}else{g.add(q.id,"focus",l._importClasses,l)}})}return m},_createFontSelect:function(){var l,k=this,j=k.editor;l=j.controlManager.createListBox("fontselect",{title:"advanced.fontdefault",onselect:function(m){var n=l.items[l.selectedIndex];if(!m&&n){j.execCommand("FontName",false,n.value);return}j.execCommand("FontName",false,m);l.select(function(o){return m==o});if(n&&n.value==m){l.select(null)}return false}});if(l){f(j.getParam("theme_advanced_fonts",k.settings.theme_advanced_fonts,"hash"),function(n,m){l.add(j.translate(m),n,{style:n.indexOf("dings")==-1?"font-family:"+n:""})})}return l},_createFontSizeSelect:function(){var m=this,k=m.editor,n,l=0,j=[];n=k.controlManager.createListBox("fontsizeselect",{title:"advanced.font_size",onselect:function(o){var p=n.items[n.selectedIndex];if(!o&&p){p=p.value;if(p["class"]){k.formatter.toggle("fontsize_class",{value:p["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,p.fontSize)}return}if(o["class"]){k.focus();k.undoManager.add();k.formatter.toggle("fontsize_class",{value:o["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,o.fontSize)}n.select(function(q){return o==q});if(p&&(p.value.fontSize==o.fontSize||p.value["class"]&&p.value["class"]==o["class"])){n.select(null)}return false}});if(n){f(m.settings.theme_advanced_font_sizes,function(p,o){var q=p.fontSize;if(q>=1&&q<=7){q=m.sizes[parseInt(q)-1]+"pt"}n.add(o,p,{style:"font-size:"+q,"class":"mceFontSize"+(l++)+(" "+(p["class"]||""))})})}return n},_createBlockFormats:function(){var l,j={p:"advanced.paragraph",address:"advanced.address",pre:"advanced.pre",h1:"advanced.h1",h2:"advanced.h2",h3:"advanced.h3",h4:"advanced.h4",h5:"advanced.h5",h6:"advanced.h6",div:"advanced.div",blockquote:"advanced.blockquote",code:"advanced.code",dt:"advanced.dt",dd:"advanced.dd",samp:"advanced.samp"},k=this;l=k.editor.controlManager.createListBox("formatselect",{title:"advanced.block",onselect:function(m){k.editor.execCommand("FormatBlock",false,m);return false}});if(l){f(k.editor.getParam("theme_advanced_blockformats",k.settings.theme_advanced_blockformats,"hash"),function(n,m){l.add(k.editor.translate(m!=n?m:j[n]),n,{"class":"mce_formatPreview mce_"+n,style:function(){return b(k.editor,{block:n})}})})}return l},_createForeColorMenu:function(){var n,k=this,l=k.settings,m={},j;if(l.theme_advanced_more_colors){m.more_colors_func=function(){k._mceColorPicker(0,{color:n.value,func:function(o){n.setColor(o)}})}}if(j=l.theme_advanced_text_colors){m.colors=j}if(l.theme_advanced_default_foreground_color){m.default_color=l.theme_advanced_default_foreground_color}m.title="advanced.forecolor_desc";m.cmd="ForeColor";m.scope=this;n=k.editor.controlManager.createColorSplitButton("forecolor",m);return n},_createBackColorMenu:function(){var n,k=this,l=k.settings,m={},j;if(l.theme_advanced_more_colors){m.more_colors_func=function(){k._mceColorPicker(0,{color:n.value,func:function(o){n.setColor(o)}})}}if(j=l.theme_advanced_background_colors){m.colors=j}if(l.theme_advanced_default_background_color){m.default_color=l.theme_advanced_default_background_color}m.title="advanced.backcolor_desc";m.cmd="HiliteColor";m.scope=this;n=k.editor.controlManager.createColorSplitButton("backcolor",m);return n},renderUI:function(l){var q,m,r,w=this,u=w.editor,x=w.settings,v,k,j;if(u.settings){u.settings.aria_label=x.aria_label+u.getLang("advanced.help_shortcut")}q=k=i.create("span",{role:"application","aria-labelledby":u.id+"_voice",id:u.id+"_parent","class":"mceEditor "+u.settings.skin+"Skin"+(x.skin_variant?" "+u.settings.skin+"Skin"+w._ufirst(x.skin_variant):"")+(u.settings.directionality=="rtl"?" mceRtl":"")});i.add(q,"span",{"class":"mceVoiceLabel",style:"display:none;",id:u.id+"_voice"},x.aria_label);if(!i.boxModel){q=i.add(q,"div",{"class":"mceOldBoxModel"})}q=v=i.add(q,"table",{role:"presentation",id:u.id+"_tbl","class":"mceLayout",cellSpacing:0,cellPadding:0});q=r=i.add(q,"tbody");switch((x.theme_advanced_layout_manager||"").toLowerCase()){case"rowlayout":m=w._rowLayout(x,r,l);break;case"customlayout":m=u.execCallback("theme_advanced_custom_layout",x,r,l,k);break;default:m=w._simpleLayout(x,r,l,k)}q=l.targetNode;j=v.rows;i.addClass(j[0],"mceFirst");i.addClass(j[j.length-1],"mceLast");f(i.select("tr",r),function(o){i.addClass(o.firstChild,"mceFirst");i.addClass(o.childNodes[o.childNodes.length-1],"mceLast")});if(i.get(x.theme_advanced_toolbar_container)){i.get(x.theme_advanced_toolbar_container).appendChild(k)}else{i.insertAfter(k,q)}g.add(u.id+"_path_row","click",function(n){n=n.target;if(n.nodeName=="A"){w._sel(n.className.replace(/^.*mcePath_([0-9]+).*$/,"$1"));return false}});if(!u.getParam("accessibility_focus")){g.add(i.add(k,"a",{href:"#"},"<!-- IE -->"),"focus",function(){tinyMCE.get(u.id).focus()})}if(x.theme_advanced_toolbar_location=="external"){l.deltaHeight=0}w.deltaHeight=l.deltaHeight;l.targetNode=null;u.onKeyDown.add(function(p,n){var s=121,o=122;if(n.altKey){if(n.keyCode===s){if(h.isWebKit){window.focus()}w.toolbarGroup.focus();return g.cancel(n)}else{if(n.keyCode===o){i.get(p.id+"_path_row").focus();return g.cancel(n)}}}});u.addShortcut("alt+0","","mceShortcuts",w);return{iframeContainer:m,editorContainer:u.id+"_parent",sizeContainer:v,deltaHeight:l.deltaHeight}},getInfo:function(){return{longname:"Advanced theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:h.majorVersion+"."+h.minorVersion}},resizeBy:function(j,k){var l=i.get(this.editor.id+"_ifr");this.resizeTo(l.clientWidth+j,l.clientHeight+k)},resizeTo:function(j,n,l){var k=this.editor,m=this.settings,o=i.get(k.id+"_tbl"),p=i.get(k.id+"_ifr");j=Math.max(m.theme_advanced_resizing_min_width||100,j);n=Math.max(m.theme_advanced_resizing_min_height||100,n);j=Math.min(m.theme_advanced_resizing_max_width||65535,j);n=Math.min(m.theme_advanced_resizing_max_height||65535,n);i.setStyle(o,"height","");i.setStyle(p,"height",n);if(m.theme_advanced_resize_horizontal){i.setStyle(o,"width","");i.setStyle(p,"width",j);if(j<o.clientWidth){j=o.clientWidth;i.setStyle(p,"width",o.clientWidth)}}if(l&&m.theme_advanced_resizing_use_cookie){a.setHash("TinyMCE_"+k.id+"_size",{cw:j,ch:n})}},destroy:function(){var j=this.editor.id;g.clear(j+"_resize");g.clear(j+"_path_row");g.clear(j+"_external_close")},_simpleLayout:function(z,u,l,j){var y=this,v=y.editor,w=z.theme_advanced_toolbar_location,q=z.theme_advanced_statusbar_location,m,k,r,x;if(z.readonly){m=i.add(u,"tr");m=k=i.add(m,"td",{"class":"mceIframeContainer"});return k}if(w=="top"){y._addToolbars(u,l)}if(w=="external"){m=x=i.create("div",{style:"position:relative"});m=i.add(m,"div",{id:v.id+"_external","class":"mceExternalToolbar"});i.add(m,"a",{id:v.id+"_external_close",href:"javascript:;","class":"mceExternalClose"});m=i.add(m,"table",{id:v.id+"_tblext",cellSpacing:0,cellPadding:0});r=i.add(m,"tbody");if(j.firstChild.className=="mceOldBoxModel"){j.firstChild.appendChild(x)}else{j.insertBefore(x,j.firstChild)}y._addToolbars(r,l);v.onMouseUp.add(function(){var o=i.get(v.id+"_external");i.show(o);i.hide(e);var n=g.add(v.id+"_external_close","click",function(){i.hide(v.id+"_external");g.remove(v.id+"_external_close","click",n)});i.show(o);i.setStyle(o,"top",0-i.getRect(v.id+"_tblext").h-1);i.hide(o);i.show(o);o.style.filter="";e=v.id+"_external";o=null})}if(q=="top"){y._addStatusBar(u,l)}if(!z.theme_advanced_toolbar_container){m=i.add(u,"tr");m=k=i.add(m,"td",{"class":"mceIframeContainer"})}if(w=="bottom"){y._addToolbars(u,l)}if(q=="bottom"){y._addStatusBar(u,l)}return k},_rowLayout:function(x,p,l){var w=this,q=w.editor,v,y,j=q.controlManager,m,k,u,r;v=x.theme_advanced_containers_default_class||"";y=x.theme_advanced_containers_default_align||"center";f(d(x.theme_advanced_containers||""),function(s,o){var n=x["theme_advanced_container_"+s]||"";switch(s.toLowerCase()){case"mceeditor":m=i.add(p,"tr");m=k=i.add(m,"td",{"class":"mceIframeContainer"});break;case"mceelementpath":w._addStatusBar(p,l);break;default:r=(x["theme_advanced_container_"+s+"_align"]||y).toLowerCase();r="mce"+w._ufirst(r);m=i.add(i.add(p,"tr"),"td",{"class":"mceToolbar "+(x["theme_advanced_container_"+s+"_class"]||v)+" "+r||y});u=j.createToolbar("toolbar"+o);w._addControls(n,u);i.setHTML(m,u.renderHTML());l.deltaHeight-=x.theme_advanced_row_height}});return k},_addControls:function(k,j){var l=this,m=l.settings,n,o=l.editor.controlManager;if(m.theme_advanced_disable&&!l._disabled){n={};f(d(m.theme_advanced_disable),function(p){n[p]=1});l._disabled=n}else{n=l._disabled}f(d(k),function(q){var p;if(n&&n[q]){return}if(q=="tablecontrols"){f(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"],function(r){r=l.createControl(r,o);if(r){j.add(r)}});return}p=l.createControl(q,o);if(p){j.add(p)}})},_addToolbars:function(y,k){var B=this,q,p,u=B.editor,C=B.settings,A,j=u.controlManager,w,l,r=[],z,x,m=false;x=j.createToolbarGroup("toolbargroup",{name:u.getLang("advanced.toolbar"),tab_focus_toolbar:u.getParam("theme_advanced_tab_focus_toolbar")});B.toolbarGroup=x;z=C.theme_advanced_toolbar_align.toLowerCase();z="mce"+B._ufirst(z);l=i.add(i.add(y,"tr",{role:"presentation"}),"td",{"class":"mceToolbar "+z,role:"presentation"});for(q=1;(A=C["theme_advanced_buttons"+q]);q++){m=true;p=j.createToolbar("toolbar"+q,{"class":"mceToolbarRow"+q});if(C["theme_advanced_buttons"+q+"_add"]){A+=","+C["theme_advanced_buttons"+q+"_add"]}if(C["theme_advanced_buttons"+q+"_add_before"]){A=C["theme_advanced_buttons"+q+"_add_before"]+","+A}B._addControls(A,p);x.add(p);k.deltaHeight-=C.theme_advanced_row_height}if(!m){k.deltaHeight-=C.theme_advanced_row_height}r.push(x.renderHTML());r.push(i.createHTML("a",{href:"#",accesskey:"z",title:u.getLang("advanced.toolbar_focus"),onfocus:"tinyMCE.getInstanceById('"+u.id+"').focus();"},"<!-- IE -->"));i.setHTML(l,r.join(""))},_addStatusBar:function(p,k){var l,w=this,q=w.editor,x=w.settings,j,u,v,m;l=i.add(p,"tr");l=m=i.add(l,"td",{"class":"mceStatusbar"});l=i.add(l,"div",{id:q.id+"_path_row",role:"group","aria-labelledby":q.id+"_path_voice"});if(x.theme_advanced_path){i.add(l,"span",{id:q.id+"_path_voice"},q.translate("advanced.path"));i.add(l,"span",{},": ")}else{i.add(l,"span",{},"&#160;")}if(x.theme_advanced_resizing){i.add(m,"a",{id:q.id+"_resize",href:"javascript:;",onclick:"return false;","class":"mceResize",tabIndex:"-1"});if(x.theme_advanced_resizing_use_cookie){q.onPostRender.add(function(){var n=a.getHash("TinyMCE_"+q.id+"_size"),r=i.get(q.id+"_tbl");if(!n){return}w.resizeTo(n.cw,n.ch)})}q.onPostRender.add(function(){g.add(q.id+"_resize","click",function(n){n.preventDefault()});g.add(q.id+"_resize","mousedown",function(E){var t,r,s,o,D,A,B,G,n,F,y;function z(H){H.preventDefault();n=B+(H.screenX-D);F=G+(H.screenY-A);w.resizeTo(n,F)}function C(H){g.remove(i.doc,"mousemove",t);g.remove(q.getDoc(),"mousemove",r);g.remove(i.doc,"mouseup",s);g.remove(q.getDoc(),"mouseup",o);n=B+(H.screenX-D);F=G+(H.screenY-A);w.resizeTo(n,F,true)}E.preventDefault();D=E.screenX;A=E.screenY;y=i.get(w.editor.id+"_ifr");B=n=y.clientWidth;G=F=y.clientHeight;t=g.add(i.doc,"mousemove",z);r=g.add(q.getDoc(),"mousemove",z);s=g.add(i.doc,"mouseup",C);o=g.add(q.getDoc(),"mouseup",C)})})}k.deltaHeight-=21;l=p=null},_updateUndoStatus:function(k){var j=k.controlManager,l=k.undoManager;j.setDisabled("undo",!l.hasUndo()&&!l.typing);j.setDisabled("redo",!l.hasRedo())},_nodeChanged:function(o,u,E,r,F){var z=this,D,G=0,y,H,A=z.settings,x,l,w,C,m,k,j;h.each(z.stateControls,function(n){u.setActive(n,o.queryCommandState(z.controls[n][1]))});function q(p){var s,n=F.parents,t=p;if(typeof(p)=="string"){t=function(v){return v.nodeName==p}}for(s=0;s<n.length;s++){if(t(n[s])){return n[s]}}}u.setActive("visualaid",o.hasVisual);z._updateUndoStatus(o);u.setDisabled("outdent",!o.queryCommandState("Outdent"));D=q("A");if(H=u.get("link")){H.setDisabled((!D&&r)||(D&&!D.href));H.setActive(!!D&&(!D.name&&!D.id))}if(H=u.get("unlink")){H.setDisabled(!D&&r);H.setActive(!!D&&!D.name&&!D.id)}if(H=u.get("anchor")){H.setActive(!r&&!!D&&(D.name||(D.id&&!D.href)))}D=q("IMG");if(H=u.get("image")){H.setActive(!r&&!!D&&E.className.indexOf("mceItem")==-1)}if(H=u.get("styleselect")){z._importClasses();k=[];f(H.items,function(n){k.push(n.value)});j=o.formatter.matchAll(k);H.select(j[0]);h.each(j,function(p,n){if(n>0){H.mark(p)}})}if(H=u.get("formatselect")){D=q(o.dom.isBlock);if(D){H.select(D.nodeName.toLowerCase())}}q(function(p){if(p.nodeName==="SPAN"){if(!x&&p.className){x=p.className}}if(o.dom.is(p,A.theme_advanced_font_selector)){if(!l&&p.style.fontSize){l=p.style.fontSize}if(!w&&p.style.fontFamily){w=p.style.fontFamily.replace(/[\"\']+/g,"").replace(/^([^,]+).*/,"$1").toLowerCase()}if(!C&&p.style.color){C=p.style.color}if(!m&&p.style.backgroundColor){m=p.style.backgroundColor}}return false});if(H=u.get("fontselect")){H.select(function(n){return n.replace(/^([^,]+).*/,"$1").toLowerCase()==w})}if(H=u.get("fontsizeselect")){if(A.theme_advanced_runtime_fontsize&&!l&&!x){l=o.dom.getStyle(E,"fontSize",true)}H.select(function(n){if(n.fontSize&&n.fontSize===l){return true}if(n["class"]&&n["class"]===x){return true}})}if(A.theme_advanced_show_current_color){function B(p,n){if(H=u.get(p)){if(!n){n=H.settings.default_color}if(n!==H.value){H.displayColor(n)}}}B("forecolor",C);B("backcolor",m)}if(A.theme_advanced_show_current_color){function B(p,n){if(H=u.get(p)){if(!n){n=H.settings.default_color}if(n!==H.value){H.displayColor(n)}}}B("forecolor",C);B("backcolor",m)}if(A.theme_advanced_path&&A.theme_advanced_statusbar_location){D=i.get(o.id+"_path")||i.add(o.id+"_path_row","span",{id:o.id+"_path"});if(z.statusKeyboardNavigation){z.statusKeyboardNavigation.destroy();z.statusKeyboardNavigation=null}i.setHTML(D,"");q(function(I){var p=I.nodeName.toLowerCase(),s,v,t="";if(I.nodeType!=1||p==="br"||I.getAttribute("data-mce-bogus")||i.hasClass(I,"mceItemHidden")||i.hasClass(I,"mceItemRemoved")){return}if(h.isIE&&I.scopeName!=="HTML"&&I.scopeName){p=I.scopeName+":"+p}p=p.replace(/mce\:/g,"");switch(p){case"b":p="strong";break;case"i":p="em";break;case"img":if(y=i.getAttrib(I,"src")){t+="src: "+y+" "}break;case"a":if(y=i.getAttrib(I,"name")){t+="name: "+y+" ";p+="#"+y}if(y=i.getAttrib(I,"href")){t+="href: "+y+" "}break;case"font":if(y=i.getAttrib(I,"face")){t+="font: "+y+" "}if(y=i.getAttrib(I,"size")){t+="size: "+y+" "}if(y=i.getAttrib(I,"color")){t+="color: "+y+" "}break;case"span":if(y=i.getAttrib(I,"style")){t+="style: "+y+" "}break}if(y=i.getAttrib(I,"id")){t+="id: "+y+" "}if(y=I.className){y=y.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g,"");if(y){t+="class: "+y+" ";if(o.dom.isBlock(I)||p=="img"||p=="span"){p+="."+y}}}p=p.replace(/(html:)/g,"");p={name:p,node:I,title:t};z.onResolveName.dispatch(z,p);t=p.title;p=p.name;v=i.create("a",{href:"javascript:;",role:"button",onmousedown:"return false;",title:t,"class":"mcePath_"+(G++)},p);if(D.hasChildNodes()){D.insertBefore(i.create("span",{"aria-hidden":"true"},"\u00a0\u00bb "),D.firstChild);D.insertBefore(v,D.firstChild)}else{D.appendChild(v)}},o.getBody());if(i.select("a",D).length>0){z.statusKeyboardNavigation=new h.ui.KeyboardNavigation({root:o.id+"_path_row",items:i.select("a",D),excludeFromTabOrder:true,onCancel:function(){o.focus()}},i)}}},_sel:function(j){this.editor.execCommand("mceSelectNodeDepth",false,j)},_mceInsertAnchor:function(l,k){var j=this.editor;j.windowManager.open({url:this.url+"/anchor.htm",width:320+parseInt(j.getLang("advanced.anchor_delta_width",0)),height:90+parseInt(j.getLang("advanced.anchor_delta_height",0)),inline:true},{theme_url:this.url})},_mceCharMap:function(){var j=this.editor;j.windowManager.open({url:this.url+"/charmap.htm",width:550+parseInt(j.getLang("advanced.charmap_delta_width",0)),height:265+parseInt(j.getLang("advanced.charmap_delta_height",0)),inline:true},{theme_url:this.url})},_mceHelp:function(){var j=this.editor;j.windowManager.open({url:this.url+"/about.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceShortcuts:function(){var j=this.editor;j.windowManager.open({url:this.url+"/shortcuts.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceColorPicker:function(l,k){var j=this.editor;k=k||{};j.windowManager.open({url:this.url+"/color_picker.htm",width:375+parseInt(j.getLang("advanced.colorpicker_delta_width",0)),height:250+parseInt(j.getLang("advanced.colorpicker_delta_height",0)),close_previous:false,inline:true},{input_color:k.color,func:k.func,theme_url:this.url})},_mceCodeEditor:function(k,l){var j=this.editor;j.windowManager.open({url:this.url+"/source_editor.htm",width:parseInt(j.getParam("theme_advanced_source_editor_width",720)),height:parseInt(j.getParam("theme_advanced_source_editor_height",580)),inline:true,resizable:true,maximizable:true},{theme_url:this.url})},_mceImage:function(k,l){var j=this.editor;if(j.dom.getAttrib(j.selection.getNode(),"class","").indexOf("mceItem")!=-1){return}j.windowManager.open({url:this.url+"/image.htm",width:355+parseInt(j.getLang("advanced.image_delta_width",0)),height:275+parseInt(j.getLang("advanced.image_delta_height",0)),inline:true},{theme_url:this.url})},_mceLink:function(k,l){var j=this.editor;j.windowManager.open({url:this.url+"/link.htm",width:310+parseInt(j.getLang("advanced.link_delta_width",0)),height:200+parseInt(j.getLang("advanced.link_delta_height",0)),inline:true},{theme_url:this.url})},_mceNewDocument:function(){var j=this.editor;j.windowManager.confirm("advanced.newdocument",function(k){if(k){j.execCommand("mceSetContent",false,"")}})},_mceForeColor:function(){var j=this;this._mceColorPicker(0,{color:j.fgColor,func:function(k){j.fgColor=k;j.editor.execCommand("ForeColor",false,k)}})},_mceBackColor:function(){var j=this;this._mceColorPicker(0,{color:j.bgColor,func:function(k){j.bgColor=k;j.editor.execCommand("HiliteColor",false,k)}})},_ufirst:function(j){return j.substring(0,1).toUpperCase()+j.substring(1)}});h.ThemeManager.add("advanced",h.themes.AdvancedTheme)}(tinymce));
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/editor_template_src.js ADDED
@@ -0,0 +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));
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/image.htm ADDED
@@ -0,0 +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>
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/img/colorpicker.jpg ADDED
Binary file
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/img/flash.gif ADDED
Binary file
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/img/icons.gif ADDED
Binary file
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/img/iframe.gif ADDED
Binary file
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/img/pagebreak.gif ADDED
Binary file
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/img/quicktime.gif ADDED
Binary file
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/img/realmedia.gif ADDED
Binary file
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/img/shockwave.gif ADDED
Binary file
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/img/trans.gif ADDED
Binary file
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/img/video.gif ADDED
Binary file
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/img/windowsmedia.gif ADDED
Binary file
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/js/about.js ADDED
@@ -0,0 +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);
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/js/anchor.js ADDED
@@ -0,0 +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);
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/js/charmap.js ADDED
@@ -0,0 +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
+ }
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/js/color_picker.js ADDED
@@ -0,0 +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);
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/js/image.js ADDED
@@ -0,0 +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);
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/js/link.js ADDED
@@ -0,0 +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);
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/js/source_editor.js ADDED
@@ -0,0 +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
+ }
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/langs/en.js ADDED
@@ -0,0 +1 @@
 
1
+ tinyMCE.addI18n('en.advanced',{"underline_desc":"Underline (Ctrl+U)","italic_desc":"Italic (Ctrl+I)","bold_desc":"Bold (Ctrl+B)",dd:"Definition Description",dt:"Definition Term ",samp:"Code Sample",code:"Code",blockquote:"Block Quote",h6:"Heading 6",h5:"Heading 5",h4:"Heading 4",h3:"Heading 3",h2:"Heading 2",h1:"Heading 1",pre:"Preformatted",address:"Address",div:"DIV",paragraph:"Paragraph",block:"Format",fontdefault:"Font Family","font_size":"Font Size","style_select":"Styles","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":"","more_colors":"More Colors...","toolbar_focus":"Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X",newdocument:"Are you sure you want clear all contents?",path:"Path","clipboard_msg":"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?","blockquote_desc":"Block Quote","help_desc":"Help","newdocument_desc":"New Document","image_props_desc":"Image Properties","paste_desc":"Paste (Ctrl+V)","copy_desc":"Copy (Ctrl+C)","cut_desc":"Cut (Ctrl+X)","anchor_desc":"Insert/Edit Anchor","visualaid_desc":"show/Hide Guidelines/Invisible Elements","charmap_desc":"Insert Special Character","backcolor_desc":"Select Background Color","forecolor_desc":"Select Text Color","custom1_desc":"Your Custom Description Here","removeformat_desc":"Remove Formatting","hr_desc":"Insert Horizontal Line","sup_desc":"Superscript","sub_desc":"Subscript","code_desc":"Edit HTML Source","cleanup_desc":"Cleanup Messy Code","image_desc":"Insert/Edit Image","unlink_desc":"Unlink","link_desc":"Insert/Edit Link","redo_desc":"Redo (Ctrl+Y)","undo_desc":"Undo (Ctrl+Z)","indent_desc":"Increase Indent","outdent_desc":"Decrease Indent","numlist_desc":"Insert/Remove Numbered List","bullist_desc":"Insert/Remove Bulleted List","justifyfull_desc":"Align Full","justifyright_desc":"Align Right","justifycenter_desc":"Align Center","justifyleft_desc":"Align Left","striketrough_desc":"Strikethrough","help_shortcut":"Press ALT-F10 for toolbar. Press ALT-0 for help","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help",toolbar:"Toolbar"});
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/langs/en_dlg.js ADDED
@@ -0,0 +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","":""});
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/link.htm ADDED
@@ -0,0 +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>
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/shortcuts.htm ADDED
@@ -0,0 +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>
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/default/content.css ADDED
@@ -0,0 +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;}
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/default/dialog.css ADDED
@@ -0,0 +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;}
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/default/img/buttons.png ADDED
Binary file
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/default/img/items.gif ADDED
Binary file
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif ADDED
Binary file
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/default/img/menu_check.gif ADDED
Binary file
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/default/img/progress.gif ADDED
Binary file
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/default/img/tabs.gif ADDED
Binary file
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/default/ui.css ADDED
@@ -0,0 +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}
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/wp_theme/content.css ADDED
@@ -0,0 +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
+
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/wp_theme/dialog.css ADDED
@@ -0,0 +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;}
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/wp_theme/editor.css ADDED
@@ -0,0 +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("../js/tinymce/themes/advanced/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:0}.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("../js/tinymce/themes/advanced/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("../js/tinymce/themes/advanced/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("../images/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("../js/tinymce/themes/advanced/img/icons.gif");background-repeat:no-repeat;background-color:transparent;width:20px}.wp_themeSkin .mceSplitButton a.mceOpen{width:10px;height:20px;background-image:url("../images/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(../images/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/skins/wp_theme/img/down_arrow.gif ADDED
Binary file
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/wp_theme/img/embedded.png ADDED
Binary file
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/wp_theme/img/gallery.png ADDED
Binary file
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/wp_theme/img/more_bug.gif ADDED
Binary file
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/wp_theme/img/page_bug.gif ADDED
Binary file
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/wp_theme/img/tabs.gif ADDED
Binary file
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/wp_theme/img/wpicons.png ADDED
Binary file
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/skins/wp_theme/ui.css ADDED
@@ -0,0 +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}
wordpress-creation-kit-api/assets/js/tiny_mce/themes/advanced/source_editor.htm ADDED
@@ -0,0 +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>
wordpress-creation-kit-api/assets/js/tiny_mce/tiny_mce.js ADDED
@@ -0,0 +1 @@
 
1
+ (function(e){var a=/^\s*|\s*$/g,b,d="B".replace(/A(.)|B/,"$1")==="$1";var c={majorVersion:"3",minorVersion:"5.4.1",releaseDate:"2012-06-24",_init:function(){var s=this,q=document,o=navigator,g=o.userAgent,m,f,l,k,j,r;s.isOpera=e.opera&&opera.buildNumber;s.isWebKit=/WebKit/.test(g);s.isIE=!s.isWebKit&&!s.isOpera&&(/MSIE/gi).test(g)&&(/Explorer/gi).test(o.appName);s.isIE6=s.isIE&&/MSIE [56]/.test(g);s.isIE7=s.isIE&&/MSIE [7]/.test(g);s.isIE8=s.isIE&&/MSIE [8]/.test(g);s.isIE9=s.isIE&&/MSIE [9]/.test(g);s.isGecko=!s.isWebKit&&/Gecko/.test(g);s.isMac=g.indexOf("Mac")!=-1;s.isAir=/adobeair/i.test(g);s.isIDevice=/(iPad|iPhone)/.test(g);s.isIOS5=s.isIDevice&&g.match(/AppleWebKit\/(\d*)/)[1]>=534;if(e.tinyMCEPreInit){s.suffix=tinyMCEPreInit.suffix;s.baseURL=tinyMCEPreInit.base;s.query=tinyMCEPreInit.query;return}s.suffix="";f=q.getElementsByTagName("base");for(m=0;m<f.length;m++){r=f[m].href;if(r){if(/^https?:\/\/[^\/]+$/.test(r)){r+="/"}k=r?r.match(/.*\//)[0]:""}}function h(i){if(i.src&&/tiny_mce(|_gzip|_jquery|_prototype|_full)(_dev|_src)?.js/.test(i.src)){if(/_(src|dev)\.js/g.test(i.src)){s.suffix="_src"}if((j=i.src.indexOf("?"))!=-1){s.query=i.src.substring(j+1)}s.baseURL=i.src.substring(0,i.src.lastIndexOf("/"));if(k&&s.baseURL.indexOf("://")==-1&&s.baseURL.indexOf("/")!==0){s.baseURL=k+s.baseURL}return s.baseURL}return null}f=q.getElementsByTagName("script");for(m=0;m<f.length;m++){if(h(f[m])){return}}l=q.getElementsByTagName("head")[0];if(l){f=l.getElementsByTagName("script");for(m=0;m<f.length;m++){if(h(f[m])){return}}}return},is:function(g,f){if(!f){return g!==b}if(f=="array"&&(g.hasOwnProperty&&g instanceof Array)){return true}return typeof(g)==f},makeMap:function(f,j,h){var g;f=f||[];j=j||",";if(typeof(f)=="string"){f=f.split(j)}h=h||{};g=f.length;while(g--){h[f[g]]={}}return h},each:function(i,f,h){var j,g;if(!i){return 0}h=h||i;if(i.length!==b){for(j=0,g=i.length;j<g;j++){if(f.call(h,i[j],j,i)===false){return 0}}}else{for(j in i){if(i.hasOwnProperty(j)){if(f.call(h,i[j],j,i)===false){return 0}}}}return 1},map:function(g,h){var i=[];c.each(g,function(f){i.push(h(f))});return i},grep:function(g,h){var i=[];c.each(g,function(f){if(!h||h(f)){i.push(f)}});return i},inArray:function(g,h){var j,f;if(g){for(j=0,f=g.length;j<f;j++){if(g[j]===h){return j}}}return -1},extend:function(n,k){var j,f,h,g=arguments,m;for(j=1,f=g.length;j<f;j++){k=g[j];for(h in k){if(k.hasOwnProperty(h)){m=k[h];if(m!==b){n[h]=m}}}}return n},trim:function(f){return(f?""+f:"").replace(a,"")},create:function(o,f,j){var n=this,g,i,k,l,h,m=0;o=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(o);k=o[3].match(/(^|\.)(\w+)$/i)[2];i=n.createNS(o[3].replace(/\.\w+$/,""),j);if(i[k]){return}if(o[2]=="static"){i[k]=f;if(this.onCreate){this.onCreate(o[2],o[3],i[k])}return}if(!f[k]){f[k]=function(){};m=1}i[k]=f[k];n.extend(i[k].prototype,f);if(o[5]){g=n.resolve(o[5]).prototype;l=o[5].match(/\.(\w+)$/i)[1];h=i[k];if(m){i[k]=function(){return g[l].apply(this,arguments)}}else{i[k]=function(){this.parent=g[l];return h.apply(this,arguments)}}i[k].prototype[k]=i[k];n.each(g,function(p,q){i[k].prototype[q]=g[q]});n.each(f,function(p,q){if(g[q]){i[k].prototype[q]=function(){this.parent=g[q];return p.apply(this,arguments)}}else{if(q!=k){i[k].prototype[q]=p}}})}n.each(f["static"],function(p,q){i[k][q]=p});if(this.onCreate){this.onCreate(o[2],o[3],i[k].prototype)}},walk:function(i,h,j,g){g=g||this;if(i){if(j){i=i[j]}c.each(i,function(k,f){if(h.call(g,k,f,j)===false){return false}c.walk(k,h,j,g)})}},createNS:function(j,h){var g,f;h=h||e;j=j.split(".");for(g=0;g<j.length;g++){f=j[g];if(!h[f]){h[f]={}}h=h[f]}return h},resolve:function(j,h){var g,f;h=h||e;j=j.split(".");for(g=0,f=j.length;g<f;g++){h=h[j[g]];if(!h){break}}return h},addUnload:function(j,i){var h=this,g;g=function(){var f=h.unloads,l,m;if(f){for(m in f){l=f[m];if(l&&l.func){l.func.call(l.scope,1)}}if(e.detachEvent){e.detachEvent("onbeforeunload",k);e.detachEvent("onunload",g)}else{if(e.removeEventListener){e.removeEventListener("unload",g,false)}}h.unloads=l=f=w=g=0;if(e.CollectGarbage){CollectGarbage()}}};function k(){var l=document;function f(){l.detachEvent("onstop",f);if(g){g()}l=0}if(l.readyState=="interactive"){if(l){l.attachEvent("onstop",f)}e.setTimeout(function(){if(l){l.detachEvent("onstop",f)}},0)}}j={func:j,scope:i||this};if(!h.unloads){if(e.attachEvent){e.attachEvent("onunload",g);e.attachEvent("onbeforeunload",k)}else{if(e.addEventListener){e.addEventListener("unload",g,false)}}h.unloads=[j]}else{h.unloads.push(j)}return j},removeUnload:function(i){var g=this.unloads,h=null;c.each(g,function(j,f){if(j&&j.func==i){g.splice(f,1);h=i;return false}});return h},explode:function(f,g){if(!f||c.is(f,"array")){return f}return c.map(f.split(g||","),c.trim)},_addVer:function(g){var f;if(!this.query){return g}f=(g.indexOf("?")==-1?"?":"&")+this.query;if(g.indexOf("#")==-1){return g+f}return g.replace("#",f+"#")},_replace:function(h,f,g){if(d){return g.replace(h,function(){var l=f,j=arguments,k;for(k=0;k<j.length-2;k++){if(j[k]===b){l=l.replace(new RegExp("\\$"+k,"g"),"")}else{l=l.replace(new RegExp("\\$"+k,"g"),j[k])}}return l})}return g.replace(h,f)}};c._init();e.tinymce=e.tinyMCE=c})(window);tinymce.create("tinymce.util.Dispatcher",{scope:null,listeners:null,inDispatch:false,Dispatcher:function(a){this.scope=a||this;this.listeners=[]},add:function(b,a){this.listeners.push({cb:b,scope:a||this.scope});return b},addToTop:function(d,b){var a=this,c={cb:d,scope:b||a.scope};if(a.inDispatch){a.listeners=[c].concat(a.listeners)}else{a.listeners.unshift(c)}return d},remove:function(c){var b=this.listeners,a=null;tinymce.each(b,function(e,d){if(c==e.cb){a=e;b.splice(d,1);return false}});return a},dispatch:function(){var a=this,e,b=arguments,c,d=a.listeners,f;a.inDispatch=true;for(c=0;c<d.length;c++){f=d[c];e=f.cb.apply(f.scope,b.length>0?b:[f.scope]);if(e===false){break}}a.inDispatch=false;return e}});(function(){var a=tinymce.each;tinymce.create("tinymce.util.URI",{URI:function(e,g){var f=this,i,d,c,h;e=tinymce.trim(e);g=f.settings=g||{};if(/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e)){f.source=e;return}if(e.indexOf("/")===0&&e.indexOf("//")!==0){e=(g.base_uri?g.base_uri.protocol||"http":"http")+"://mce_host"+e}if(!/^[\w\-]*:?\/\//.test(e)){h=g.base_uri?g.base_uri.path:new tinymce.util.URI(location.href).directory;e=((g.base_uri&&g.base_uri.protocol)||"http")+"://mce_host"+f.toAbsPath(h,e)}e=e.replace(/@@/g,"(mce_at)");e=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e);a(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(b,j){var k=e[j];if(k){k=k.replace(/\(mce_at\)/g,"@@")}f[b]=k});c=g.base_uri;if(c){if(!f.protocol){f.protocol=c.protocol}if(!f.userInfo){f.userInfo=c.userInfo}if(!f.port&&f.host==="mce_host"){f.port=c.port}if(!f.host||f.host==="mce_host"){f.host=c.host}f.source=""}},setPath:function(c){var b=this;c=/^(.*?)\/?(\w+)?$/.exec(c);b.path=c[0];b.directory=c[1];b.file=c[2];b.source="";b.getURI()},toRelative:function(b){var d=this,f;if(b==="./"){return b}b=new tinymce.util.URI(b,{base_uri:d});if((b.host!="mce_host"&&d.host!=b.host&&b.host)||d.port!=b.port||d.protocol!=b.protocol){return b.getURI()}var c=d.getURI(),e=b.getURI();if(c==e||(c.charAt(c.length-1)=="/"&&c.substr(0,c.length-1)==e)){return c}f=d.toRelPath(d.path,b.path);if(b.query){f+="?"+b.query}if(b.anchor){f+="#"+b.anchor}return f},toAbsolute:function(b,c){b=new tinymce.util.URI(b,{base_uri:this});return b.getURI(this.host==b.host&&this.protocol==b.protocol?c:0)},toRelPath:function(g,h){var c,f=0,d="",e,b;g=g.substring(0,g.lastIndexOf("/"));g=g.split("/");c=h.split("/");if(g.length>=c.length){for(e=0,b=g.length;e<b;e++){if(e>=c.length||g[e]!=c[e]){f=e+1;break}}}if(g.length<c.length){for(e=0,b=c.length;e<b;e++){if(e>=g.length||g[e]!=c[e]){f=e+1;break}}}if(f===1){return h}for(e=0,b=g.length-(f-1);e<b;e++){d+="../"}for(e=f-1,b=c.length;e<b;e++){if(e!=f-1){d+="/"+c[e]}else{d+=c[e]}}return d},toAbsPath:function(e,f){var c,b=0,h=[],d,g;d=/\/$/.test(f)?"/":"";e=e.split("/");f=f.split("/");a(e,function(i){if(i){h.push(i)}});e=h;for(c=f.length-1,h=[];c>=0;c--){if(f[c].length===0||f[c]==="."){continue}if(f[c]===".."){b++;continue}if(b>0){b--;continue}h.push(f[c])}c=e.length-b;if(c<=0){g=h.reverse().join("/")}else{g=e.slice(0,c).join("/")+"/"+h.reverse().join("/")}if(g.indexOf("/")!==0){g="/"+g}if(d&&g.lastIndexOf("/")!==g.length-1){g+=d}return g},getURI:function(d){var c,b=this;if(!b.source||d){c="";if(!d){if(b.protocol){c+=b.protocol+"://"}if(b.userInfo){c+=b.userInfo+"@"}if(b.host){c+=b.host}if(b.port){c+=":"+b.port}}if(b.path){c+=b.path}if(b.query){c+="?"+b.query}if(b.anchor){c+="#"+b.anchor}b.source=c}return b.source}})})();(function(){var a=tinymce.each;tinymce.create("static tinymce.util.Cookie",{getHash:function(d){var b=this.get(d),c;if(b){a(b.split("&"),function(e){e=e.split("=");c=c||{};c[unescape(e[0])]=unescape(e[1])})}return c},setHash:function(j,b,g,f,i,c){var h="";a(b,function(e,d){h+=(!h?"":"&")+escape(d)+"="+escape(e)});this.set(j,h,g,f,i,c)},get:function(i){var h=document.cookie,g,f=i+"=",d;if(!h){return}d=h.indexOf("; "+f);if(d==-1){d=h.indexOf(f);if(d!==0){return null}}else{d+=2}g=h.indexOf(";",d);if(g==-1){g=h.length}return unescape(h.substring(d+f.length,g))},set:function(i,b,g,f,h,c){document.cookie=i+"="+escape(b)+((g)?"; expires="+g.toGMTString():"")+((f)?"; path="+escape(f):"")+((h)?"; domain="+h:"")+((c)?"; secure":"")},remove:function(c,e,d){var b=new Date();b.setTime(b.getTime()-1000);this.set(c,"",b,e,d)}})})();(function(){function serialize(o,quote){var i,v,t,name;quote=quote||'"';if(o==null){return"null"}t=typeof o;if(t=="string"){v="\bb\tt\nn\ff\rr\"\"''\\\\";return quote+o.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(a,b){if(quote==='"'&&a==="'"){return a}i=v.indexOf(b);if(i+1){return"\\"+v.charAt(i+1)}a=b.charCodeAt().toString(16);return"\\u"+"0000".substring(a.length)+a})+quote}if(t=="object"){if(o.hasOwnProperty&&o instanceof Array){for(i=0,v="[";i<o.length;i++){v+=(i>0?",":"")+serialize(o[i],quote)}return v+"]"}v="{";for(name in o){if(o.hasOwnProperty(name)){v+=typeof o[name]!="function"?(v.length>1?","+quote:quote)+name+quote+":"+serialize(o[name],quote):""}}return v+"}"}return""+o}tinymce.util.JSON={serialize:serialize,parse:function(s){try{return eval("("+s+")")}catch(ex){}}}})();tinymce.create("static tinymce.util.XHR",{send:function(g){var a,e,b=window,h=0;function f(){if(!g.async||a.readyState==4||h++>10000){if(g.success&&h<10000&&a.status==200){g.success.call(g.success_scope,""+a.responseText,a,g)}else{if(g.error){g.error.call(g.error_scope,h>10000?"TIMED_OUT":"GENERAL",a,g)}}a=null}else{b.setTimeout(f,10)}}g.scope=g.scope||this;g.success_scope=g.success_scope||g.scope;g.error_scope=g.error_scope||g.scope;g.async=g.async===false?false:true;g.data=g.data||"";function d(i){a=0;try{a=new ActiveXObject(i)}catch(c){}return a}a=b.XMLHttpRequest?new XMLHttpRequest():d("Microsoft.XMLHTTP")||d("Msxml2.XMLHTTP");if(a){if(a.overrideMimeType){a.overrideMimeType(g.content_type)}a.open(g.type||(g.data?"POST":"GET"),g.url,g.async);if(g.content_type){a.setRequestHeader("Content-Type",g.content_type)}a.setRequestHeader("X-Requested-With","XMLHttpRequest");a.send(g.data);if(!g.async){return f()}e=b.setTimeout(f,10)}}});(function(){var c=tinymce.extend,b=tinymce.util.JSON,a=tinymce.util.XHR;tinymce.create("tinymce.util.JSONRequest",{JSONRequest:function(d){this.settings=c({},d);this.count=0},send:function(f){var e=f.error,d=f.success;f=c(this.settings,f);f.success=function(h,g){h=b.parse(h);if(typeof(h)=="undefined"){h={error:"JSON Parse error."}}if(h.error){e.call(f.error_scope||f.scope,h.error,g)}else{d.call(f.success_scope||f.scope,h.result)}};f.error=function(h,g){if(e){e.call(f.error_scope||f.scope,h,g)}};f.data=b.serialize({id:f.id||"c"+(this.count++),method:f.method,params:f.params});f.content_type="application/json";a.send(f)},"static":{sendRPC:function(d){return new tinymce.util.JSONRequest().send(d)}}})}());(function(a){a.VK={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,modifierPressed:function(b){return b.shiftKey||b.ctrlKey||b.altKey},metaKeyPressed:function(b){return a.isMac?b.metaKey:b.ctrlKey}}})(tinymce);tinymce.util.Quirks=function(d){var m=tinymce.VK,t=m.BACKSPACE,u=m.DELETE,p=d.dom,E=d.selection,s=d.settings;function c(I,H){try{d.getDoc().execCommand(I,false,H)}catch(G){}}function z(){var G=d.getDoc().documentMode;return G?G:6}function j(){function G(J){var H,L,I,K;H=E.getRng();L=p.getParent(H.startContainer,p.isBlock);if(J){L=p.getNext(L,p.isBlock)}if(L){I=L.firstChild;while(I&&I.nodeType==3&&I.nodeValue.length===0){I=I.nextSibling}if(I&&I.nodeName==="SPAN"){K=I.cloneNode(false)}}d.getDoc().execCommand(J?"ForwardDelete":"Delete",false,null);L=p.getParent(H.startContainer,p.isBlock);tinymce.each(p.select("span.Apple-style-span,font.Apple-style-span",L),function(M){var N=E.getBookmark();if(K){p.replace(K.cloneNode(false),M,true)}else{p.remove(M,true)}E.moveToBookmark(N)})}d.onKeyDown.add(function(H,J){var I;I=J.keyCode==u;if(!J.isDefaultPrevented()&&(I||J.keyCode==t)&&!m.modifierPressed(J)){J.preventDefault();G(I)}});d.addCommand("Delete",function(){G()})}function F(){function G(J){var I=p.create("body");var K=J.cloneContents();I.appendChild(K);return E.serializer.serialize(I,{format:"html"})}function H(I){var K=G(I);var L=p.createRng();L.selectNode(d.getBody());var J=G(L);return K===J}d.onKeyDown.add(function(J,L){var K=L.keyCode,I;if(!L.isDefaultPrevented()&&(K==u||K==t)){I=J.selection.isCollapsed();if(I&&!p.isEmpty(J.getBody())){return}if(tinymce.isIE&&!I){return}if(!I&&!H(J.selection.getRng())){return}J.setContent("");J.selection.setCursorLocation(J.getBody(),0);J.nodeChanged()}})}function x(){d.onKeyDown.add(function(G,H){if(H.keyCode==65&&m.metaKeyPressed(H)){H.preventDefault();G.execCommand("SelectAll")}})}function y(){if(!d.settings.content_editable){p.bind(d.getDoc(),"focusin",function(G){E.setRng(E.getRng())});p.bind(d.getDoc(),"mousedown",function(G){if(G.target==d.getDoc().documentElement){d.getWin().focus();E.setRng(E.getRng())}})}}function n(){d.onKeyDown.add(function(G,J){if(!J.isDefaultPrevented()&&J.keyCode===t){if(E.isCollapsed()&&E.getRng(true).startOffset===0){var I=E.getNode();var H=I.previousSibling;if(H&&H.nodeName&&H.nodeName.toLowerCase()==="hr"){p.remove(H);tinymce.dom.Event.cancel(J)}}}})}function b(){if(!Range.prototype.getClientRects){d.onMouseDown.add(function(H,I){if(I.target.nodeName==="HTML"){var G=H.getBody();G.blur();setTimeout(function(){G.focus()},0)}})}}function B(){d.onClick.add(function(G,H){H=H.target;if(/^(IMG|HR)$/.test(H.nodeName)){E.getSel().setBaseAndExtent(H,0,H,1)}if(H.nodeName=="A"&&p.hasClass(H,"mceItemAnchor")){E.select(H)}G.nodeChanged()})}function C(){function H(){var J=p.getAttribs(E.getStart().cloneNode(false));return function(){var K=E.getStart();if(K!==d.getBody()){p.setAttrib(K,"style",null);tinymce.each(J,function(L){K.setAttributeNode(L.cloneNode(true))})}}}function G(){return !E.isCollapsed()&&E.getStart()!=E.getEnd()}function I(J,K){K.preventDefault();return false}d.onKeyPress.add(function(J,L){var K;if((L.keyCode==8||L.keyCode==46)&&G()){K=H();J.getDoc().execCommand("delete",false,null);K();L.preventDefault();return false}});p.bind(d.getDoc(),"cut",function(K){var J;if(G()){J=H();d.onKeyUp.addToTop(I);setTimeout(function(){J();d.onKeyUp.remove(I)},0)}})}function k(){var H,G;p.bind(d.getDoc(),"selectionchange",function(){if(G){clearTimeout(G);G=0}G=window.setTimeout(function(){var I=E.getRng();if(!H||!tinymce.dom.RangeUtils.compareRanges(I,H)){d.nodeChanged();H=I}},50)})}function D(){document.body.setAttribute("role","application")}function A(){d.onKeyDown.add(function(G,I){if(!I.isDefaultPrevented()&&I.keyCode===t){if(E.isCollapsed()&&E.getRng(true).startOffset===0){var H=E.getNode().previousSibling;if(H&&H.nodeName&&H.nodeName.toLowerCase()==="table"){return tinymce.dom.Event.cancel(I)}}}})}function h(){if(z()>7){return}c("RespectVisibilityInDesign",true);d.contentStyles.push(".mceHideBrInPre pre br {display: none}");p.addClass(d.getBody(),"mceHideBrInPre");d.parser.addNodeFilter("pre",function(G,I){var J=G.length,L,H,M,K;while(J--){L=G[J].getAll("br");H=L.length;while(H--){M=L[H];K=M.prev;if(K&&K.type===3&&K.value.charAt(K.value-1)!="\n"){K.value+="\n"}else{M.parent.insert(new tinymce.html.Node("#text",3),M,true).value="\n"}}}});d.serializer.addNodeFilter("pre",function(G,I){var J=G.length,L,H,M,K;while(J--){L=G[J].getAll("br");H=L.length;while(H--){M=L[H];K=M.prev;if(K&&K.type==3){K.value=K.value.replace(/\r?\n$/,"")}}}})}function f(){p.bind(d.getBody(),"mouseup",function(I){var H,G=E.getNode();if(G.nodeName=="IMG"){if(H=p.getStyle(G,"width")){p.setAttrib(G,"width",H.replace(/[^0-9%]+/g,""));p.setStyle(G,"width","")}if(H=p.getStyle(G,"height")){p.setAttrib(G,"height",H.replace(/[^0-9%]+/g,""));p.setStyle(G,"height","")}}})}function r(){d.onKeyDown.add(function(M,N){var L,G,H,J,K,O,I;L=N.keyCode==u;if(!N.isDefaultPrevented()&&(L||N.keyCode==t)&&!m.modifierPressed(N)){G=E.getRng();H=G.startContainer;J=G.startOffset;I=G.collapsed;if(H.nodeType==3&&H.nodeValue.length>0&&((J===0&&!I)||(I&&J===(L?0:1)))){nonEmptyElements=M.schema.getNonEmptyElements();N.preventDefault();K=p.create("br",{id:"__tmp"});H.parentNode.insertBefore(K,H);M.getDoc().execCommand(L?"ForwardDelete":"Delete",false,null);H=E.getRng().startContainer;O=H.previousSibling;if(O&&O.nodeType==1&&!p.isBlock(O)&&p.isEmpty(O)&&!nonEmptyElements[O.nodeName.toLowerCase()]){p.remove(O)}p.remove("__tmp")}}})}function e(){d.onKeyDown.add(function(K,L){var I,H,M,G,J;if(L.isDefaultPrevented()||L.keyCode!=m.BACKSPACE){return}I=E.getRng();H=I.startContainer;M=I.startOffset;G=p.getRoot();J=H;if(!I.collapsed||M!==0){return}while(J&&J.parentNode&&J.parentNode.firstChild==J&&J.parentNode!=G){J=J.parentNode}if(J.tagName==="BLOCKQUOTE"){K.formatter.toggle("blockquote",null,J);I.setStart(H,0);I.setEnd(H,0);E.setRng(I);E.collapse(false)}})}function l(){function G(){d._refreshContentEditable();c("StyleWithCSS",false);c("enableInlineTableEditing",false);if(!s.object_resizing){c("enableObjectResizing",false)}}if(!s.readonly){d.onBeforeExecCommand.add(G);d.onMouseDown.add(G)}}function o(){function G(H,I){tinymce.each(p.select("a"),function(L){var J=L.parentNode,K=p.getRoot();if(J.lastChild===L){while(J&&!p.isBlock(J)){if(J.parentNode.lastChild!==J||J===K){return}J=J.parentNode}p.add(J,"br",{"data-mce-bogus":1})}})}d.onExecCommand.add(function(H,I){if(I==="CreateLink"){G(H)}});d.onSetContent.add(E.onSetContent.add(G))}function v(){if(s.forced_root_block){d.onInit.add(function(){c("DefaultParagraphSeparator",s.forced_root_block)})}}function a(){function G(I,H){if(!I||!H.initial){d.execCommand("mceRepaint")}}d.onUndo.add(G);d.onRedo.add(G);d.onSetContent.add(G)}function q(){d.onKeyDown.add(function(H,I){var G;if(!I.isDefaultPrevented()&&I.keyCode==t){G=H.getDoc().selection.createRange();if(G&&G.item){I.preventDefault();H.undoManager.beforeChange();p.remove(G.item(0));H.undoManager.add()}}})}function i(){var G;if(z()>=10){G="";tinymce.each("p div h1 h2 h3 h4 h5 h6".split(" "),function(H,I){G+=(I>0?",":"")+H+":empty"});d.contentStyles.push(G+"{padding-right: 1px !important}")}}function g(){var K,H,G,I,J;if(!s.object_resizing||s.webkit_fake_resize===false){return}d.contentStyles.push(".mceResizeImages img {cursor: se-resize !important}");function L(R){var O,N,Q,P,M;if(K){O=R.screenX-H;N=R.screenY-G;Q=Math.max((I+O)/I,(J+N)/J);if(Math.abs(O)>1||Math.abs(N)>1){P=Math.round(I*Q);M=Math.round(J*Q);if(K.style.width){p.setStyle(K,"width",P)}else{p.setAttrib(K,"width",P)}if(K.style.height){p.setStyle(K,"height",M)}else{p.setAttrib(K,"height",M)}if(!p.hasClass(d.getBody(),"mceResizeImages")){p.addClass(d.getBody(),"mceResizeImages")}}}}d.onMouseDown.add(function(M,O){var N=O.target;if(N.nodeName=="IMG"){K=N;H=O.screenX;G=O.screenY;I=K.clientWidth;J=K.clientHeight;p.bind(M.getDoc(),"mousemove",L);O.preventDefault()}});d.onNodeChange.add(function(){if(K){K=null;p.unbind(d.getDoc(),"mousemove",L)}if(E.getNode().nodeName=="IMG"){p.addClass(d.getBody(),"mceResizeImages")}else{p.removeClass(d.getBody(),"mceResizeImages")}})}A();e();F();if(tinymce.isWebKit){r();j();y();B();v();if(tinymce.isIDevice){k()}else{g();x()}}if(tinymce.isIE){n();D();h();f();q();i()}if(tinymce.isGecko){n();b();C();l();o();a()}};(function(j){var a,g,d,k=/[&<>\"\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,b=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,f=/[<>&\"\']/g,c=/&(#x|#)?([\w]+);/g,i={128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"};g={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;"};d={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"};function h(l){var m;m=document.createElement("div");m.innerHTML=l;return m.textContent||m.innerText||l}function e(m,p){var n,o,l,q={};if(m){m=m.split(",");p=p||10;for(n=0;n<m.length;n+=2){o=String.fromCharCode(parseInt(m[n],p));if(!g[o]){l="&"+m[n+1]+";";q[o]=l;q[l]=o}}return q}}a=e("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);j.html=j.html||{};j.html.Entities={encodeRaw:function(m,l){return m.replace(l?k:b,function(n){return g[n]||n})},encodeAllRaw:function(l){return(""+l).replace(f,function(m){return g[m]||m})},encodeNumeric:function(m,l){return m.replace(l?k:b,function(n){if(n.length>1){return"&#"+(((n.charCodeAt(0)-55296)*1024)+(n.charCodeAt(1)-56320)+65536)+";"}return g[n]||"&#"+n.charCodeAt(0)+";"})},encodeNamed:function(n,l,m){m=m||a;return n.replace(l?k:b,function(o){return g[o]||m[o]||o})},getEncodeFunc:function(l,o){var p=j.html.Entities;o=e(o)||a;function m(r,q){return r.replace(q?k:b,function(s){return g[s]||o[s]||"&#"+s.charCodeAt(0)+";"||s})}function n(r,q){return p.encodeNamed(r,q,o)}l=j.makeMap(l.replace(/\+/g,","));if(l.named&&l.numeric){return m}if(l.named){if(o){return n}return p.encodeNamed}if(l.numeric){return p.encodeNumeric}return p.encodeRaw},decode:function(l){return l.replace(c,function(n,m,o){if(m){o=parseInt(o,m.length===2?16:10);if(o>65535){o-=65536;return String.fromCharCode(55296+(o>>10),56320+(o&1023))}else{return i[o]||String.fromCharCode(o)}}return d[n]||a[n]||h(n)})}}})(tinymce);tinymce.html.Styles=function(d,f){var k=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,h=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,b=/\s*([^:]+):\s*([^;]+);?/g,l=/\s+$/,m=/rgb/,e,g,a={},j;d=d||{};j="\\\" \\' \\; \\: ; : \uFEFF".split(" ");for(g=0;g<j.length;g++){a[j[g]]="\uFEFF"+g;a["\uFEFF"+g]=j[g]}function c(n,q,p,i){function o(r){r=parseInt(r).toString(16);return r.length>1?r:"0"+r}return"#"+o(q)+o(p)+o(i)}return{toHex:function(i){return i.replace(k,c)},parse:function(s){var z={},q,n,x,r,v=d.url_converter,y=d.url_converter_scope||this;function p(D,G){var F,C,B,E;F=z[D+"-top"+G];if(!F){return}C=z[D+"-right"+G];if(F!=C){return}B=z[D+"-bottom"+G];if(C!=B){return}E=z[D+"-left"+G];if(B!=E){return}z[D+G]=E;delete z[D+"-top"+G];delete z[D+"-right"+G];delete z[D+"-bottom"+G];delete z[D+"-left"+G]}function u(C){var D=z[C],B;if(!D||D.indexOf(" ")<0){return}D=D.split(" ");B=D.length;while(B--){if(D[B]!==D[0]){return false}}z[C]=D[0];return true}function A(D,C,B,E){if(!u(C)){return}if(!u(B)){return}if(!u(E)){return}z[D]=z[C]+" "+z[B]+" "+z[E];delete z[C];delete z[B];delete z[E]}function t(B){r=true;return a[B]}function i(C,B){if(r){C=C.replace(/\uFEFF[0-9]/g,function(D){return a[D]})}if(!B){C=C.replace(/\\([\'\";:])/g,"$1")}return C}function o(C,B,F,E,G,D){G=G||D;if(G){G=i(G);return"'"+G.replace(/\'/g,"\\'")+"'"}B=i(B||F||E);if(v){B=v.call(y,B,"style")}return"url('"+B.replace(/\'/g,"\\'")+"')"}if(s){s=s.replace(/\\[\"\';:\uFEFF]/g,t).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(B){return B.replace(/[;:]/g,t)});while(q=b.exec(s)){n=q[1].replace(l,"").toLowerCase();x=q[2].replace(l,"");if(n&&x.length>0){if(n==="font-weight"&&x==="700"){x="bold"}else{if(n==="color"||n==="background-color"){x=x.toLowerCase()}}x=x.replace(k,c);x=x.replace(h,o);z[n]=r?i(x,true):x}b.lastIndex=q.index+q[0].length}p("border","");p("border","-width");p("border","-color");p("border","-style");p("padding","");p("margin","");A("border","border-width","border-style","border-color");if(z.border==="medium none"){delete z.border}}return z},serialize:function(p,r){var o="",n,q;function i(t){var x,u,s,v;x=f.styles[t];if(x){for(u=0,s=x.length;u<s;u++){t=x[u];v=p[t];if(v!==e&&v.length>0){o+=(o.length>0?" ":"")+t+": "+v+";"}}}}if(r&&f&&f.styles){i("*");i(r)}else{for(n in p){q=p[n];if(q!==e&&q.length>0){o+=(o.length>0?" ":"")+n+": "+q+";"}}}return o}}};(function(f){var a={},e=f.makeMap,g=f.each;function d(j,i){return j.split(i||",")}function h(m,l){var j,k={};function i(n){return n.replace(/[A-Z]+/g,function(o){return i(m[o])})}for(j in m){if(m.hasOwnProperty(j)){m[j]=i(m[j])}}i(l).replace(/#/g,"#text").replace(/(\w+)\[([^\]]+)\]\[([^\]]*)\]/g,function(q,o,n,p){n=d(n,"|");k[o]={attributes:e(n),attributesOrder:n,children:e(p,"|",{"#comment":{}})}});return k}function b(){var i=a.html5;if(!i){i=a.html5=h({A:"id|accesskey|class|dir|draggable|item|hidden|itemprop|role|spellcheck|style|subject|title|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup",B:"#|a|abbr|area|audio|b|bdo|br|button|canvas|cite|code|command|datalist|del|dfn|em|embed|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|meta|meter|noscript|object|output|progress|q|ruby|samp|script|select|small|span|strong|sub|sup|svg|textarea|time|var|video|wbr",C:"#|a|abbr|area|address|article|aside|audio|b|bdo|blockquote|br|button|canvas|cite|code|command|datalist|del|details|dfn|dialog|div|dl|em|embed|fieldset|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|menu|meta|meter|nav|noscript|ol|object|output|p|pre|progress|q|ruby|samp|script|section|select|small|span|strong|style|sub|sup|svg|table|textarea|time|ul|var|video"},"html[A|manifest][body|head]head[A][base|command|link|meta|noscript|script|style|title]title[A][#]base[A|href|target][]link[A|href|rel|media|type|sizes][]meta[A|http-equiv|name|content|charset][]style[A|type|media|scoped][#]script[A|charset|type|src|defer|async][#]noscript[A][C]body[A][C]section[A][C]nav[A][C]article[A][C]aside[A][C]h1[A][B]h2[A][B]h3[A][B]h4[A][B]h5[A][B]h6[A][B]hgroup[A][h1|h2|h3|h4|h5|h6]header[A][C]footer[A][C]address[A][C]p[A][B]br[A][]pre[A][B]dialog[A][dd|dt]blockquote[A|cite][C]ol[A|start|reversed][li]ul[A][li]li[A|value][C]dl[A][dd|dt]dt[A][B]dd[A][C]a[A|href|target|ping|rel|media|type][B]em[A][B]strong[A][B]small[A][B]cite[A][B]q[A|cite][B]dfn[A][B]abbr[A][B]code[A][B]var[A][B]samp[A][B]kbd[A][B]sub[A][B]sup[A][B]i[A][B]b[A][B]mark[A][B]progress[A|value|max][B]meter[A|value|min|max|low|high|optimum][B]time[A|datetime][B]ruby[A][B|rt|rp]rt[A][B]rp[A][B]bdo[A][B]span[A][B]ins[A|cite|datetime][B]del[A|cite|datetime][B]figure[A][C|legend|figcaption]figcaption[A][C]img[A|alt|src|height|width|usemap|ismap][]iframe[A|name|src|height|width|sandbox|seamless][]embed[A|src|height|width|type][]object[A|data|type|height|width|usemap|name|form|classid][param]param[A|name|value][]details[A|open][C|legend]command[A|type|label|icon|disabled|checked|radiogroup][]menu[A|type|label][C|li]legend[A][C|B]div[A][C]source[A|src|type|media][]audio[A|src|autobuffer|autoplay|loop|controls][source]video[A|src|autobuffer|autoplay|loop|controls|width|height|poster][source]hr[A][]form[A|accept-charset|action|autocomplete|enctype|method|name|novalidate|target][C]fieldset[A|disabled|form|name][C|legend]label[A|form|for][B]input[A|type|accept|alt|autocomplete|checked|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|height|list|max|maxlength|min|multiple|pattern|placeholder|readonly|required|size|src|step|width|files|value|name][]button[A|autofocus|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|name|value|type][B]select[A|autofocus|disabled|form|multiple|name|size][option|optgroup]datalist[A][B|option]optgroup[A|disabled|label][option]option[A|disabled|selected|label|value][]textarea[A|autofocus|disabled|form|maxlength|name|placeholder|readonly|required|rows|cols|wrap][]keygen[A|autofocus|challenge|disabled|form|keytype|name][]output[A|for|form|name][B]canvas[A|width|height][]map[A|name][B|C]area[A|shape|coords|href|alt|target|media|rel|ping|type][]mathml[A][]svg[A][]table[A|border][caption|colgroup|thead|tfoot|tbody|tr]caption[A][C]colgroup[A|span][col]col[A|span][]thead[A][tr]tfoot[A][tr]tbody[A][tr]tr[A][th|td]th[A|headers|rowspan|colspan|scope][B]td[A|headers|rowspan|colspan][C]wbr[A][]")}return i}function c(){var i=a.html4;if(!i){i=a.html4=h({Z:"H|K|N|O|P",Y:"X|form|R|Q",ZG:"E|span|width|align|char|charoff|valign",X:"p|T|div|U|W|isindex|fieldset|table",ZF:"E|align|char|charoff|valign",W:"pre|hr|blockquote|address|center|noframes",ZE:"abbr|axis|headers|scope|rowspan|colspan|align|char|charoff|valign|nowrap|bgcolor|width|height",ZD:"[E][S]",U:"ul|ol|dl|menu|dir",ZC:"p|Y|div|U|W|table|br|span|bdo|object|applet|img|map|K|N|Q",T:"h1|h2|h3|h4|h5|h6",ZB:"X|S|Q",S:"R|P",ZA:"a|G|J|M|O|P",R:"a|H|K|N|O",Q:"noscript|P",P:"ins|del|script",O:"input|select|textarea|label|button",N:"M|L",M:"em|strong|dfn|code|q|samp|kbd|var|cite|abbr|acronym",L:"sub|sup",K:"J|I",J:"tt|i|b|u|s|strike",I:"big|small|font|basefont",H:"G|F",G:"br|span|bdo",F:"object|applet|img|map|iframe",E:"A|B|C",D:"accesskey|tabindex|onfocus|onblur",C:"onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup",B:"lang|xml:lang|dir",A:"id|class|style|title"},"script[id|charset|type|language|src|defer|xml:space][]style[B|id|type|media|title|xml:space][]object[E|declare|classid|codebase|data|type|codetype|archive|standby|width|height|usemap|name|tabindex|align|border|hspace|vspace][#|param|Y]param[id|name|value|valuetype|type][]p[E|align][#|S]a[E|D|charset|type|name|href|hreflang|rel|rev|shape|coords|target][#|Z]br[A|clear][]span[E][#|S]bdo[A|C|B][#|S]applet[A|codebase|archive|code|object|alt|name|width|height|align|hspace|vspace][#|param|Y]h1[E|align][#|S]img[E|src|alt|name|longdesc|width|height|usemap|ismap|align|border|hspace|vspace][]map[B|C|A|name][X|form|Q|area]h2[E|align][#|S]iframe[A|longdesc|name|src|frameborder|marginwidth|marginheight|scrolling|align|width|height][#|Y]h3[E|align][#|S]tt[E][#|S]i[E][#|S]b[E][#|S]u[E][#|S]s[E][#|S]strike[E][#|S]big[E][#|S]small[E][#|S]font[A|B|size|color|face][#|S]basefont[id|size|color|face][]em[E][#|S]strong[E][#|S]dfn[E][#|S]code[E][#|S]q[E|cite][#|S]samp[E][#|S]kbd[E][#|S]var[E][#|S]cite[E][#|S]abbr[E][#|S]acronym[E][#|S]sub[E][#|S]sup[E][#|S]input[E|D|type|name|value|checked|disabled|readonly|size|maxlength|src|alt|usemap|onselect|onchange|accept|align][]select[E|name|size|multiple|disabled|tabindex|onfocus|onblur|onchange][optgroup|option]optgroup[E|disabled|label][option]option[E|selected|disabled|label|value][]textarea[E|D|name|rows|cols|disabled|readonly|onselect|onchange][]label[E|for|accesskey|onfocus|onblur][#|S]button[E|D|name|value|type|disabled][#|p|T|div|U|W|table|G|object|applet|img|map|K|N|Q]h4[E|align][#|S]ins[E|cite|datetime][#|Y]h5[E|align][#|S]del[E|cite|datetime][#|Y]h6[E|align][#|S]div[E|align][#|Y]ul[E|type|compact][li]li[E|type|value][#|Y]ol[E|type|compact|start][li]dl[E|compact][dt|dd]dt[E][#|S]dd[E][#|Y]menu[E|compact][li]dir[E|compact][li]pre[E|width|xml:space][#|ZA]hr[E|align|noshade|size|width][]blockquote[E|cite][#|Y]address[E][#|S|p]center[E][#|Y]noframes[E][#|Y]isindex[A|B|prompt][]fieldset[E][#|legend|Y]legend[E|accesskey|align][#|S]table[E|summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor][caption|col|colgroup|thead|tfoot|tbody|tr]caption[E|align][#|S]col[ZG][]colgroup[ZG][col]thead[ZF][tr]tr[ZF|bgcolor][th|td]th[E|ZE][#|Y]form[E|action|method|name|enctype|onsubmit|onreset|accept|accept-charset|target][#|X|R|Q]noscript[E][#|Y]td[E|ZE][#|Y]tfoot[ZF][tr]tbody[ZF][tr]area[E|D|shape|coords|href|nohref|alt|target][]base[id|href|target][]body[E|onload|onunload|background|bgcolor|text|link|vlink|alink][#|Y]")}return i}f.html.Schema=function(A){var u=this,s={},k={},j=[],D,y;var o,q,z,r,v,n,p={};function m(F,E,H){var G=A[F];if(!G){G=a[F];if(!G){G=e(E," ",e(E.toUpperCase()," "));G=f.extend(G,H);a[F]=G}}else{G=e(G,",",e(G.toUpperCase()," "))}return G}A=A||{};y=A.schema=="html5"?b():c();if(A.verify_html===false){A.valid_elements="*[*]"}if(A.valid_styles){D={};g(A.valid_styles,function(F,E){D[E]=f.explode(F)})}o=m("whitespace_elements","pre script style textarea");q=m("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr");z=m("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr");r=m("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls");n=m("non_empty_elements","td th iframe video audio object",z);v=m("block_elements","h1 h2 h3 h4 h5 h6 hr p div address pre form table tbody thead tfoot th tr td li ol ul caption blockquote center dl dt dd dir fieldset noscript menu isindex samp header footer article section hgroup aside nav figure option datalist select optgroup");function i(E){return new RegExp("^"+E.replace(/([?+*])/g,".$1")+"$")}function C(L){var K,G,Z,V,aa,F,I,U,X,Q,Y,ac,O,J,W,E,S,H,ab,ad,P,T,N=/^([#+\-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,R=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,M=/[*?+]/;if(L){L=d(L);if(s["@"]){S=s["@"].attributes;H=s["@"].attributesOrder}for(K=0,G=L.length;K<G;K++){F=N.exec(L[K]);if(F){W=F[1];Q=F[2];E=F[3];X=F[4];O={};J=[];I={attributes:O,attributesOrder:J};if(W==="#"){I.paddEmpty=true}if(W==="-"){I.removeEmpty=true}if(S){for(ad in S){O[ad]=S[ad]}J.push.apply(J,H)}if(X){X=d(X,"|");for(Z=0,V=X.length;Z<V;Z++){F=R.exec(X[Z]);if(F){U={};ac=F[1];Y=F[2].replace(/::/g,":");W=F[3];T=F[4];if(ac==="!"){I.attributesRequired=I.attributesRequired||[];I.attributesRequired.push(Y);U.required=true}if(ac==="-"){delete O[Y];J.splice(f.inArray(J,Y),1);continue}if(W){if(W==="="){I.attributesDefault=I.attributesDefault||[];I.attributesDefault.push({name:Y,value:T});U.defaultValue=T}if(W===":"){I.attributesForced=I.attributesForced||[];I.attributesForced.push({name:Y,value:T});U.forcedValue=T}if(W==="<"){U.validValues=e(T,"?")}}if(M.test(Y)){I.attributePatterns=I.attributePatterns||[];U.pattern=i(Y);I.attributePatterns.push(U)}else{if(!O[Y]){J.push(Y)}O[Y]=U}}}}if(!S&&Q=="@"){S=O;H=J}if(E){I.outputName=Q;s[E]=I}if(M.test(Q)){I.pattern=i(Q);j.push(I)}else{s[Q]=I}}}}}function t(E){s={};j=[];C(E);g(y,function(G,F){k[F]=G.children})}function l(F){var E=/^(~)?(.+)$/;if(F){g(d(F),function(J){var H=E.exec(J),I=H[1]==="~",K=I?"span":"div",G=H[2];k[G]=k[K];p[G]=K;if(!I){v[G]={}}g(k,function(L,M){if(L[K]){L[G]=L[K]}})})}}function x(F){var E=/^([+\-]?)(\w+)\[([^\]]+)\]$/;if(F){g(d(F),function(J){var I=E.exec(J),G,H;if(I){H=I[1];if(H){G=k[I[2]]}else{G=k[I[2]]={"#comment":{}}}G=k[I[2]];g(d(I[3],"|"),function(K){if(H==="-"){delete G[K]}else{G[K]={}}})}})}}function B(E){var G=s[E],F;if(G){return G}F=j.length;while(F--){G=j[F];if(G.pattern.test(E)){return G}}}if(!A.valid_elements){g(y,function(F,E){s[E]={attributes:F.attributes,attributesOrder:F.attributesOrder};k[E]=F.children});if(A.schema!="html5"){g(d("strong/b,em/i"),function(E){E=d(E,"/");s[E[1]].outputName=E[0]})}s.img.attributesDefault=[{name:"alt",value:""}];g(d("ol,ul,sub,sup,blockquote,span,font,a,table,tbody,tr,strong,em,b,i"),function(E){if(s[E]){s[E].removeEmpty=true}});g(d("p,h1,h2,h3,h4,h5,h6,th,td,pre,div,address,caption"),function(E){s[E].paddEmpty=true})}else{t(A.valid_elements)}l(A.custom_elements);x(A.valid_children);C(A.extended_valid_elements);x("+ol[ul|ol],+ul[ul|ol]");if(A.invalid_elements){f.each(f.explode(A.invalid_elements),function(E){if(s[E]){delete s[E]}})}if(!B("span")){C("span[!data-mce-type|*]")}u.children=k;u.styles=D;u.getBoolAttrs=function(){return r};u.getBlockElements=function(){return v};u.getShortEndedElements=function(){return z};u.getSelfClosingElements=function(){return q};u.getNonEmptyElements=function(){return n};u.getWhiteSpaceElements=function(){return o};u.isValidChild=function(E,G){var F=k[E];return !!(F&&F[G])};u.isValid=function(F,E){var H,G,I=B(F);if(I){if(E){if(I.attributes[E]){return true}H=I.attributePatterns;if(H){G=H.length;while(G--){if(H[G].pattern.test(F)){return true}}}}else{return true}}return false};u.getElementRule=B;u.getCustomElements=function(){return p};u.addValidElements=C;u.setValidElements=t;u.addCustomElements=l;u.addValidChildren=x}})(tinymce);(function(a){a.html.SaxParser=function(c,e){var b=this,d=function(){};c=c||{};b.schema=e=e||new a.html.Schema();if(c.fix_self_closing!==false){c.fix_self_closing=true}a.each("comment cdata text start end pi doctype".split(" "),function(f){if(f){b[f]=c[f]||d}});b.parse=function(E){var n=this,g,G=0,I,B,A=[],N,Q,C,r,z,s,M,H,O,v,m,k,t,R,o,P,F,S,L,f,J,l,D,K,h,x=0,j=a.html.Entities.decode,y,q;function u(T){var V,U;V=A.length;while(V--){if(A[V].name===T){break}}if(V>=0){for(U=A.length-1;U>=V;U--){T=A[U];if(T.valid){n.end(T.name)}}A.length=V}}function p(U,T,Y,X,W){var Z,V;T=T.toLowerCase();Y=T in H?T:j(Y||X||W||"");if(v&&!z&&T.indexOf("data-")!==0){Z=P[T];if(!Z&&F){V=F.length;while(V--){Z=F[V];if(Z.pattern.test(T)){break}}if(V===-1){Z=null}}if(!Z){return}if(Z.validValues&&!(Y in Z.validValues)){return}}N.map[T]=Y;N.push({name:T,value:Y})}l=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([A-Za-z0-9\\-\\:]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g");D=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:\\.|[^\"])*)\")|(?:\'((?:\\.|[^\'])*)\')|([^>\s]+)))?/g;K={script:/<\/script[^>]*>/gi,style:/<\/style[^>]*>/gi,noscript:/<\/noscript[^>]*>/gi};M=e.getShortEndedElements();J=c.self_closing_elements||e.getSelfClosingElements();H=e.getBoolAttrs();v=c.validate;s=c.remove_internals;y=c.fix_self_closing;q=a.isIE;o=/^:/;while(g=l.exec(E)){if(G<g.index){n.text(j(E.substr(G,g.index-G)))}if(I=g[6]){I=I.toLowerCase();if(q&&o.test(I)){I=I.substr(1)}u(I)}else{if(I=g[7]){I=I.toLowerCase();if(q&&o.test(I)){I=I.substr(1)}O=I in M;if(y&&J[I]&&A.length>0&&A[A.length-1].name===I){u(I)}if(!v||(m=e.getElementRule(I))){k=true;if(v){P=m.attributes;F=m.attributePatterns}if(R=g[8]){z=R.indexOf("data-mce-type")!==-1;if(z&&s){k=false}N=[];N.map={};R.replace(D,p)}else{N=[];N.map={}}if(v&&!z){S=m.attributesRequired;L=m.attributesDefault;f=m.attributesForced;if(f){Q=f.length;while(Q--){t=f[Q];r=t.name;h=t.value;if(h==="{$uid}"){h="mce_"+x++}N.map[r]=h;N.push({name:r,value:h})}}if(L){Q=L.length;while(Q--){t=L[Q];r=t.name;if(!(r in N.map)){h=t.value;if(h==="{$uid}"){h="mce_"+x++}N.map[r]=h;N.push({name:r,value:h})}}}if(S){Q=S.length;while(Q--){if(S[Q] in N.map){break}}if(Q===-1){k=false}}if(N.map["data-mce-bogus"]){k=false}}if(k){n.start(I,N,O)}}else{k=false}if(B=K[I]){B.lastIndex=G=g.index+g[0].length;if(g=B.exec(E)){if(k){C=E.substr(G,g.index-G)}G=g.index+g[0].length}else{C=E.substr(G);G=E.length}if(k&&C.length>0){n.text(C,true)}if(k){n.end(I)}l.lastIndex=G;continue}if(!O){if(!R||R.indexOf("/")!=R.length-1){A.push({name:I,valid:k})}else{if(k){n.end(I)}}}}else{if(I=g[1]){n.comment(I)}else{if(I=g[2]){n.cdata(I)}else{if(I=g[3]){n.doctype(I)}else{if(I=g[4]){n.pi(I,g[5])}}}}}}G=g.index+g[0].length}if(G<E.length){n.text(j(E.substr(G)))}for(Q=A.length-1;Q>=0;Q--){I=A[Q];if(I.valid){n.end(I.name)}}}}})(tinymce);(function(d){var c=/^[ \t\r\n]*$/,e={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};function a(k,l,j){var i,h,f=j?"lastChild":"firstChild",g=j?"prev":"next";if(k[f]){return k[f]}if(k!==l){i=k[g];if(i){return i}for(h=k.parent;h&&h!==l;h=h.parent){i=h[g];if(i){return i}}}}function b(f,g){this.name=f;this.type=g;if(g===1){this.attributes=[];this.attributes.map={}}}d.extend(b.prototype,{replace:function(g){var f=this;if(g.parent){g.remove()}f.insert(g,f);f.remove();return f},attr:function(h,l){var f=this,g,j,k;if(typeof h!=="string"){for(j in h){f.attr(j,h[j])}return f}if(g=f.attributes){if(l!==k){if(l===null){if(h in g.map){delete g.map[h];j=g.length;while(j--){if(g[j].name===h){g=g.splice(j,1);return f}}}return f}if(h in g.map){j=g.length;while(j--){if(g[j].name===h){g[j].value=l;break}}}else{g.push({name:h,value:l})}g.map[h]=l;return f}else{return g.map[h]}}},clone:function(){var g=this,n=new b(g.name,g.type),h,f,m,j,k;if(m=g.attributes){k=[];k.map={};for(h=0,f=m.length;h<f;h++){j=m[h];if(j.name!=="id"){k[k.length]={name:j.name,value:j.value};k.map[j.name]=j.value}}n.attributes=k}n.value=g.value;n.shortEnded=g.shortEnded;return n},wrap:function(g){var f=this;f.parent.insert(g,f);g.append(f);return f},unwrap:function(){var f=this,h,g;for(h=f.firstChild;h;){g=h.next;f.insert(h,f,true);h=g}f.remove()},remove:function(){var f=this,h=f.parent,g=f.next,i=f.prev;if(h){if(h.firstChild===f){h.firstChild=g;if(g){g.prev=null}}else{i.next=g}if(h.lastChild===f){h.lastChild=i;if(i){i.next=null}}else{g.prev=i}f.parent=f.next=f.prev=null}return f},append:function(h){var f=this,g;if(h.parent){h.remove()}g=f.lastChild;if(g){g.next=h;h.prev=g;f.lastChild=h}else{f.lastChild=f.firstChild=h}h.parent=f;return h},insert:function(h,f,i){var g;if(h.parent){h.remove()}g=f.parent||this;if(i){if(f===g.firstChild){g.firstChild=h}else{f.prev.next=h}h.prev=f.prev;h.next=f;f.prev=h}else{if(f===g.lastChild){g.lastChild=h}else{f.next.prev=h}h.next=f.next;h.prev=f;f.next=h}h.parent=g;return h},getAll:function(g){var f=this,h,i=[];for(h=f.firstChild;h;h=a(h,f)){if(h.name===g){i.push(h)}}return i},empty:function(){var g=this,f,h,j;if(g.firstChild){f=[];for(j=g.firstChild;j;j=a(j,g)){f.push(j)}h=f.length;while(h--){j=f[h];j.parent=j.firstChild=j.lastChild=j.next=j.prev=null}}g.firstChild=g.lastChild=null;return g},isEmpty:function(k){var f=this,j=f.firstChild,h,g;if(j){do{if(j.type===1){if(j.attributes.map["data-mce-bogus"]){continue}if(k[j.name]){return false}h=j.attributes.length;while(h--){g=j.attributes[h].name;if(g==="name"||g.indexOf("data-")===0){return false}}}if(j.type===8){return false}if((j.type===3&&!c.test(j.value))){return false}}while(j=a(j,f))}return true},walk:function(f){return a(this,null,f)}});d.extend(b,{create:function(g,f){var i,h;i=new b(g,e[g]||1);if(f){for(h in f){i.attr(h,f[h])}}return i}});d.html.Node=b})(tinymce);(function(b){var a=b.html.Node;b.html.DomParser=function(g,h){var f=this,e={},d=[],i={},c={};g=g||{};g.validate="validate" in g?g.validate:true;g.root_name=g.root_name||"body";f.schema=h=h||new b.html.Schema();function j(m){var o,p,x,v,z,n,q,l,t,u,k,s,y,r;s=b.makeMap("tr,td,th,tbody,thead,tfoot,table");k=h.getNonEmptyElements();for(o=0;o<m.length;o++){p=m[o];if(!p.parent){continue}v=[p];for(x=p.parent;x&&!h.isValidChild(x.name,p.name)&&!s[x.name];x=x.parent){v.push(x)}if(x&&v.length>1){v.reverse();z=n=f.filterNode(v[0].clone());for(t=0;t<v.length-1;t++){if(h.isValidChild(n.name,v[t].name)){q=f.filterNode(v[t].clone());n.append(q)}else{q=n}for(l=v[t].firstChild;l&&l!=v[t+1];){r=l.next;q.append(l);l=r}n=q}if(!z.isEmpty(k)){x.insert(z,v[0],true);x.insert(p,z)}else{x.insert(p,v[0],true)}x=v[0];if(x.isEmpty(k)||x.firstChild===x.lastChild&&x.firstChild.name==="br"){x.empty().remove()}}else{if(p.parent){if(p.name==="li"){y=p.prev;if(y&&(y.name==="ul"||y.name==="ul")){y.append(p);continue}y=p.next;if(y&&(y.name==="ul"||y.name==="ul")){y.insert(p,y.firstChild,true);continue}p.wrap(f.filterNode(new a("ul",1)));continue}if(h.isValidChild(p.parent.name,"div")&&h.isValidChild("div",p.name)){p.wrap(f.filterNode(new a("div",1)))}else{if(p.name==="style"||p.name==="script"){p.empty().remove()}else{p.unwrap()}}}}}}f.filterNode=function(m){var l,k,n;if(k in e){n=i[k];if(n){n.push(m)}else{i[k]=[m]}}l=d.length;while(l--){k=d[l].name;if(k in m.attributes.map){n=c[k];if(n){n.push(m)}else{c[k]=[m]}}}return m};f.addNodeFilter=function(k,l){b.each(b.explode(k),function(m){var n=e[m];if(!n){e[m]=n=[]}n.push(l)})};f.addAttributeFilter=function(k,l){b.each(b.explode(k),function(m){var n;for(n=0;n<d.length;n++){if(d[n].name===m){d[n].callbacks.push(l);return}}d.push({name:m,callbacks:[l]})})};f.parse=function(v,m){var n,J,B,A,D,C,x,r,F,N,z,o,E,M=[],L,t,k,y,s,p,u,q;m=m||{};i={};c={};o=b.extend(b.makeMap("script,style,head,html,body,title,meta,param"),h.getBlockElements());u=h.getNonEmptyElements();p=h.children;z=g.validate;q="forced_root_block" in m?m.forced_root_block:g.forced_root_block;s=h.getWhiteSpaceElements();E=/^[ \t\r\n]+/;t=/[ \t\r\n]+$/;k=/[ \t\r\n]+/g;y=/^[ \t\r\n]+$/;function G(){var O=J.firstChild,l,P;while(O){l=O.next;if(O.type==3||(O.type==1&&O.name!=="p"&&!o[O.name]&&!O.attr("data-mce-type"))){if(!P){P=K(q,1);J.insert(P,O);P.append(O)}else{P.append(O)}}else{P=null}O=l}}function K(l,O){var P=new a(l,O),Q;if(l in e){Q=i[l];if(Q){Q.push(P)}else{i[l]=[P]}}return P}function I(P){var Q,l,O;for(Q=P.prev;Q&&Q.type===3;){l=Q.value.replace(t,"");if(l.length>0){Q.value=l;Q=Q.prev}else{O=Q.prev;Q.remove();Q=O}}}function H(O){var P,l={};for(P in O){if(P!=="li"&&P!="p"){l[P]=O[P]}}return l}n=new b.html.SaxParser({validate:z,self_closing_elements:H(h.getSelfClosingElements()),cdata:function(l){B.append(K("#cdata",4)).value=l},text:function(P,l){var O;if(!L){P=P.replace(k," ");if(B.lastChild&&o[B.lastChild.name]){P=P.replace(E,"")}}if(P.length!==0){O=K("#text",3);O.raw=!!l;B.append(O).value=P}},comment:function(l){B.append(K("#comment",8)).value=l},pi:function(l,O){B.append(K(l,7)).value=O;I(B)},doctype:function(O){var l;l=B.append(K("#doctype",10));l.value=O;I(B)},start:function(l,W,P){var U,R,Q,O,S,X,V,T;Q=z?h.getElementRule(l):{};if(Q){U=K(Q.outputName||l,1);U.attributes=W;U.shortEnded=P;B.append(U);T=p[B.name];if(T&&p[U.name]&&!T[U.name]){M.push(U)}R=d.length;while(R--){S=d[R].name;if(S in W.map){F=c[S];if(F){F.push(U)}else{c[S]=[U]}}}if(o[l]){I(U)}if(!P){B=U}if(!L&&s[l]){L=true}}},end:function(l){var S,P,R,O,Q;P=z?h.getElementRule(l):{};if(P){if(o[l]){if(!L){S=B.firstChild;if(S&&S.type===3){R=S.value.replace(E,"");if(R.length>0){S.value=R;S=S.next}else{O=S.next;S.remove();S=O}while(S&&S.type===3){R=S.value;O=S.next;if(R.length===0||y.test(R)){S.remove();S=O}S=O}}S=B.lastChild;if(S&&S.type===3){R=S.value.replace(t,"");if(R.length>0){S.value=R;S=S.prev}else{O=S.prev;S.remove();S=O}while(S&&S.type===3){R=S.value;O=S.prev;if(R.length===0||y.test(R)){S.remove();S=O}S=O}}}S=B.prev;if(S&&S.type===3){R=S.value.replace(E,"");if(R.length>0){S.value=R}else{S.remove()}}}if(L&&s[l]){L=false}if(P.removeEmpty||P.paddEmpty){if(B.isEmpty(u)){if(P.paddEmpty){B.empty().append(new a("#text","3")).value="\u00a0"}else{if(!B.attributes.map.name&&!B.attributes.map.id){Q=B.parent;B.empty().remove();B=Q;return}}}}B=B.parent}}},h);J=B=new a(m.context||g.root_name,11);n.parse(v);if(z&&M.length){if(!m.context){j(M)}else{m.invalid=true}}if(q&&J.name=="body"){G()}if(!m.invalid){for(N in i){F=e[N];A=i[N];x=A.length;while(x--){if(!A[x].parent){A.splice(x,1)}}for(D=0,C=F.length;D<C;D++){F[D](A,N,m)}}for(D=0,C=d.length;D<C;D++){F=d[D];if(F.name in c){A=c[F.name];x=A.length;while(x--){if(!A[x].parent){A.splice(x,1)}}for(x=0,r=F.callbacks.length;x<r;x++){F.callbacks[x](A,F.name,m)}}}}return J};if(g.remove_trailing_brs){f.addNodeFilter("br",function(n,m){var r,q=n.length,o,v=b.extend({},h.getBlockElements()),k=h.getNonEmptyElements(),t,s,p,u;v.body=1;for(r=0;r<q;r++){o=n[r];t=o.parent;if(v[o.parent.name]&&o===t.lastChild){p=o.prev;while(p){u=p.name;if(u!=="span"||p.attr("data-mce-type")!=="bookmark"){if(u!=="br"){break}if(u==="br"){o=null;break}}p=p.prev}if(o){o.remove();if(t.isEmpty(k)){elementRule=h.getElementRule(t.name);if(elementRule){if(elementRule.removeEmpty){t.remove()}else{if(elementRule.paddEmpty){t.empty().append(new b.html.Node("#text",3)).value="\u00a0"}}}}}}else{s=o;while(t.firstChild===s&&t.lastChild===s){s=t;if(v[t.name]){break}t=t.parent}if(s===t){textNode=new b.html.Node("#text",3);textNode.value="\u00a0";o.replace(textNode)}}}})}if(!g.allow_html_in_named_anchor){f.addAttributeFilter("id,name",function(k,l){var n=k.length,p,m,o,q;while(n--){q=k[n];if(q.name==="a"&&q.firstChild&&!q.attr("href")){o=q.parent;p=q.lastChild;do{m=p.prev;o.insert(p,q);p=m}while(p)}}})}}})(tinymce);tinymce.html.Writer=function(e){var c=[],a,b,d,f,g;e=e||{};a=e.indent;b=tinymce.makeMap(e.indent_before||"");d=tinymce.makeMap(e.indent_after||"");f=tinymce.html.Entities.getEncodeFunc(e.entity_encoding||"raw",e.entities);g=e.element_format=="html";return{start:function(m,k,p){var n,j,h,o;if(a&&b[m]&&c.length>0){o=c[c.length-1];if(o.length>0&&o!=="\n"){c.push("\n")}}c.push("<",m);if(k){for(n=0,j=k.length;n<j;n++){h=k[n];c.push(" ",h.name,'="',f(h.value,true),'"')}}if(!p||g){c[c.length]=">"}else{c[c.length]=" />"}if(p&&a&&d[m]&&c.length>0){o=c[c.length-1];if(o.length>0&&o!=="\n"){c.push("\n")}}},end:function(h){var i;c.push("</",h,">");if(a&&d[h]&&c.length>0){i=c[c.length-1];if(i.length>0&&i!=="\n"){c.push("\n")}}},text:function(i,h){if(i.length>0){c[c.length]=h?i:f(i)}},cdata:function(h){c.push("<![CDATA[",h,"]]>")},comment:function(h){c.push("<!--",h,"-->")},pi:function(h,i){if(i){c.push("<?",h," ",i,"?>")}else{c.push("<?",h,"?>")}if(a){c.push("\n")}},doctype:function(h){c.push("<!DOCTYPE",h,">",a?"\n":"")},reset:function(){c.length=0},getContent:function(){return c.join("").replace(/\n$/,"")}}};(function(a){a.html.Serializer=function(c,d){var b=this,e=new a.html.Writer(c);c=c||{};c.validate="validate" in c?c.validate:true;b.schema=d=d||new a.html.Schema();b.writer=e;b.serialize=function(h){var g,i;i=c.validate;g={3:function(k,j){e.text(k.value,k.raw)},8:function(j){e.comment(j.value)},7:function(j){e.pi(j.name,j.value)},10:function(j){e.doctype(j.value)},4:function(j){e.cdata(j.value)},11:function(j){if((j=j.firstChild)){do{f(j)}while(j=j.next)}}};e.reset();function f(k){var t=g[k.type],j,o,s,r,p,u,n,m,q;if(!t){j=k.name;o=k.shortEnded;s=k.attributes;if(i&&s&&s.length>1){u=[];u.map={};q=d.getElementRule(k.name);for(n=0,m=q.attributesOrder.length;n<m;n++){r=q.attributesOrder[n];if(r in s.map){p=s.map[r];u.map[r]=p;u.push({name:r,value:p})}}for(n=0,m=s.length;n<m;n++){r=s[n].name;if(!(r in u.map)){p=s.map[r];u.map[r]=p;u.push({name:r,value:p})}}s=u}e.start(k.name,s,o);if(!o){if((k=k.firstChild)){do{f(k)}while(k=k.next)}e.end(j)}}else{t(k)}}if(h.type==1&&!c.inner){f(h)}else{g[11](h)}return e.getContent()}}})(tinymce);tinymce.dom={};(function(b,h){var g=!!document.addEventListener;function c(k,j,l,i){if(k.addEventListener){k.addEventListener(j,l,i||false)}else{if(k.attachEvent){k.attachEvent("on"+j,l)}}}function e(k,j,l,i){if(k.removeEventListener){k.removeEventListener(j,l,i||false)}else{if(k.detachEvent){k.detachEvent("on"+j,l)}}}function a(n,l){var i,k=l||{};function j(){return false}function m(){return true}for(i in n){if(i!=="layerX"&&i!=="layerY"){k[i]=n[i]}}if(!k.target){k.target=k.srcElement||document}k.preventDefault=function(){k.isDefaultPrevented=m;if(n){if(n.preventDefault){n.preventDefault()}else{n.returnValue=false}}};k.stopPropagation=function(){k.isPropagationStopped=m;if(n){if(n.stopPropagation){n.stopPropagation()}else{n.cancelBubble=true}}};k.stopImmediatePropagation=function(){k.isImmediatePropagationStopped=m;k.stopPropagation()};if(!k.isDefaultPrevented){k.isDefaultPrevented=j;k.isPropagationStopped=j;k.isImmediatePropagationStopped=j}return k}function d(m,n,l){var k=m.document,j={type:"ready"};function i(){if(!l.domLoaded){l.domLoaded=true;n(j)}}if(g){c(m,"DOMContentLoaded",i)}else{c(k,"readystatechange",function(){if(k.readyState==="complete"){e(k,"readystatechange",arguments.callee);i()}});if(k.documentElement.doScroll&&m===m.top){(function(){try{k.documentElement.doScroll("left")}catch(o){setTimeout(arguments.callee,0);return}i()})()}}c(m,"load",i)}function f(k){var q=this,p={},i,o,n,m,l;m="onmouseenter" in document.documentElement;n="onfocusin" in document.documentElement;l={mouseenter:"mouseover",mouseleave:"mouseout"};i=1;q.domLoaded=false;q.events=p;function j(t,x){var s,u,r,v;s=p[x][t.type];if(s){for(u=0,r=s.length;u<r;u++){v=s[u];if(v&&v.func.call(v.scope,t)===false){t.preventDefault()}if(t.isImmediatePropagationStopped()){return}}}}q.bind=function(x,A,D,E){var s,t,u,r,B,z,C,v=window;function y(F){j(a(F||v.event),s)}if(!x||x.nodeType===3||x.nodeType===8){return}if(!x[h]){s=i++;x[h]=s;p[s]={}}else{s=x[h];if(!p[s]){p[s]={}}}E=E||x;A=A.split(" ");u=A.length;while(u--){r=A[u];z=y;B=C=false;if(r==="DOMContentLoaded"){r="ready"}if((q.domLoaded||x.readyState=="complete")&&r==="ready"){q.domLoaded=true;D.call(E,a({type:r}));continue}if(!m){B=l[r];if(B){z=function(F){var H,G;H=F.currentTarget;G=F.relatedTarget;if(G&&H.contains){G=H.contains(G)}else{while(G&&G!==H){G=G.parentNode}}if(!G){F=a(F||v.event);F.type=F.type==="mouseout"?"mouseleave":"mouseenter";F.target=H;j(F,s)}}}}if(!n&&(r==="focusin"||r==="focusout")){C=true;B=r==="focusin"?"focus":"blur";z=function(F){F=a(F||v.event);F.type=F.type==="focus"?"focusin":"focusout";j(F,s)}}t=p[s][r];if(!t){p[s][r]=t=[{func:D,scope:E}];t.fakeName=B;t.capture=C;t.nativeHandler=z;if(!g){t.proxyHandler=k(s)}if(r==="ready"){d(x,z,q)}else{c(x,B||r,g?z:t.proxyHandler,C)}}else{t.push({func:D,scope:E})}}x=t=0;return D};q.unbind=function(x,z,A){var s,u,v,B,r,t;if(!x||x.nodeType===3||x.nodeType===8){return q}s=x[h];if(s){t=p[s];if(z){z=z.split(" ");v=z.length;while(v--){r=z[v];u=t[r];if(u){if(A){B=u.length;while(B--){if(u[B].func===A){u.splice(B,1)}}}if(!A||u.length===0){delete t[r];e(x,u.fakeName||r,g?u.nativeHandler:u.proxyHandler,u.capture)}}}}else{for(r in t){u=t[r];e(x,u.fakeName||r,g?u.nativeHandler:u.proxyHandler,u.capture)}t={}}for(r in t){return q}delete p[s];try{delete x[h]}catch(y){x[h]=null}}return q};q.fire=function(u,s,r){var v,t;if(!u||u.nodeType===3||u.nodeType===8){return q}t=a(null,r);t.type=s;do{v=u[h];if(v){j(t,v)}u=u.parentNode||u.ownerDocument||u.defaultView||u.parentWindow}while(u&&!t.isPropagationStopped());return q};q.clean=function(u){var s,r,t=q.unbind;if(!u||u.nodeType===3||u.nodeType===8){return q}if(u[h]){t(u)}if(!u.getElementsByTagName){u=u.document}if(u&&u.getElementsByTagName){t(u);r=u.getElementsByTagName("*");s=r.length;while(s--){u=r[s];if(u[h]){t(u)}}}return q};q.callNativeHandler=function(s,r){if(p){p[s][r.type].nativeHandler(r)}};q.destory=function(){p={}};q.add=function(v,s,u,t){if(typeof(v)==="string"){v=document.getElementById(v)}if(v&&v instanceof Array){var r=v.length;while(r--){q.add(v[r],s,u,t)}return}if(s==="init"){s="ready"}return q.bind(v,s instanceof Array?s.join(" "):s,u,t)};q.remove=function(v,s,u,t){if(!v){return q}if(typeof(v)==="string"){v=document.getElementById(v)}if(v instanceof Array){var r=v.length;while(r--){q.remove(v[r],s,u,t)}return q}return q.unbind(v,s instanceof Array?s.join(" "):s,u)};q.clear=function(r){if(typeof(r)==="string"){r=document.getElementById(r)}return q.clean(r)};q.cancel=function(r){if(r){q.prevent(r);q.stop(r)}return false};q.prevent=function(r){if(!r.preventDefault){r=a(r)}r.preventDefault();return false};q.stop=function(r){if(!r.stopPropagation){r=a(r)}r.stopPropagation();return false}}b.EventUtils=f;b.Event=new f(function(i){return function(j){tinymce.dom.Event.callNativeHandler(i,j)}});b.Event.bind(window,"ready",function(){});b=0})(tinymce.dom,"data-mce-expando");tinymce.dom.TreeWalker=function(a,c){var b=a;function d(i,f,e,j){var h,g;if(i){if(!j&&i[f]){return i[f]}if(i!=c){h=i[e];if(h){return h}for(g=i.parentNode;g&&g!=c;g=g.parentNode){h=g[e];if(h){return h}}}}}this.current=function(){return b};this.next=function(e){return(b=d(b,"firstChild","nextSibling",e))};this.prev=function(e){return(b=d(b,"lastChild","previousSibling",e))}};(function(e){var g=e.each,d=e.is,f=e.isWebKit,b=e.isIE,h=e.html.Entities,c=/^([a-z0-9],?)+$/i,a=/^[ \t\r\n]*$/;e.create("tinymce.dom.DOMUtils",{doc:null,root:null,files:null,pixelStyles:/^(top|left|bottom|right|width|height|borderWidth)$/,props:{"for":"htmlFor","class":"className",className:"className",checked:"checked",disabled:"disabled",maxlength:"maxLength",readonly:"readOnly",selected:"selected",value:"value",id:"id",name:"name",type:"type"},DOMUtils:function(o,l){var k=this,i,j,n;k.doc=o;k.win=window;k.files={};k.cssFlicker=false;k.counter=0;k.stdMode=!e.isIE||o.documentMode>=8;k.boxModel=!e.isIE||o.compatMode=="CSS1Compat"||k.stdMode;k.hasOuterHTML="outerHTML" in o.createElement("a");k.settings=l=e.extend({keep_values:false,hex_colors:1},l);k.schema=l.schema;k.styles=new e.html.Styles({url_converter:l.url_converter,url_converter_scope:l.url_converter_scope},l.schema);if(e.isIE6){try{o.execCommand("BackgroundImageCache",false,true)}catch(m){k.cssFlicker=true}}k.fixDoc(o);k.events=l.ownEvents?new e.dom.EventUtils(l.proxy):e.dom.Event;e.addUnload(k.destroy,k);n=l.schema?l.schema.getBlockElements():{};k.isBlock=function(q){var p=q.nodeType;if(p){return !!(p===1&&n[q.nodeName])}return !!n[q]}},fixDoc:function(k){var j=this.settings,i;if(b&&j.schema){("abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video").replace(/\w+/g,function(l){k.createElement(l)});for(i in j.schema.getCustomElements()){k.createElement(i)}}},clone:function(k,i){var j=this,m,l;if(!b||k.nodeType!==1||i){return k.cloneNode(i)}l=j.doc;if(!i){m=l.createElement(k.nodeName);g(j.getAttribs(k),function(n){j.setAttrib(m,n.nodeName,j.getAttrib(k,n.nodeName))});return m}return m.firstChild},getRoot:function(){var i=this,j=i.settings;return(j&&i.get(j.root_element))||i.doc.body},getViewPort:function(j){var k,i;j=!j?this.win:j;k=j.document;i=this.boxModel?k.documentElement:k.body;return{x:j.pageXOffset||i.scrollLeft,y:j.pageYOffset||i.scrollTop,w:j.innerWidth||i.clientWidth,h:j.innerHeight||i.clientHeight}},getRect:function(l){var k,i=this,j;l=i.get(l);k=i.getPos(l);j=i.getSize(l);return{x:k.x,y:k.y,w:j.w,h:j.h}},getSize:function(l){var j=this,i,k;l=j.get(l);i=j.getStyle(l,"width");k=j.getStyle(l,"height");if(i.indexOf("px")===-1){i=0}if(k.indexOf("px")===-1){k=0}return{w:parseInt(i,10)||l.offsetWidth||l.clientWidth,h:parseInt(k,10)||l.offsetHeight||l.clientHeight}},getParent:function(k,j,i){return this.getParents(k,j,i,false)},getParents:function(s,m,k,q){var j=this,i,l=j.settings,p=[];s=j.get(s);q=q===undefined;if(l.strict_root){k=k||j.getRoot()}if(d(m,"string")){i=m;if(m==="*"){m=function(o){return o.nodeType==1}}else{m=function(o){return j.is(o,i)}}}while(s){if(s==k||!s.nodeType||s.nodeType===9){break}if(!m||m(s)){if(q){p.push(s)}else{return s}}s=s.parentNode}return q?p:null},get:function(i){var j;if(i&&this.doc&&typeof(i)=="string"){j=i;i=this.doc.getElementById(i);if(i&&i.id!==j){return this.doc.getElementsByName(j)[1]}}return i},getNext:function(j,i){return this._findSib(j,i,"nextSibling")},getPrev:function(j,i){return this._findSib(j,i,"previousSibling")},select:function(k,j){var i=this;return e.dom.Sizzle(k,i.get(j)||i.get(i.settings.root_element)||i.doc,[])},is:function(l,j){var k;if(l.length===undefined){if(j==="*"){return l.nodeType==1}if(c.test(j)){j=j.toLowerCase().split(/,/);l=l.nodeName.toLowerCase();for(k=j.length-1;k>=0;k--){if(j[k]==l){return true}}return false}}return e.dom.Sizzle.matches(j,l.nodeType?[l]:l).length>0},add:function(l,o,i,k,m){var j=this;return this.run(l,function(r){var q,n;q=d(o,"string")?j.doc.createElement(o):o;j.setAttribs(q,i);if(k){if(k.nodeType){q.appendChild(k)}else{j.setHTML(q,k)}}return !m?r.appendChild(q):q})},create:function(k,i,j){return this.add(this.doc.createElement(k),k,i,j,1)},createHTML:function(q,i,m){var p="",l=this,j;p+="<"+q;for(j in i){if(i.hasOwnProperty(j)){p+=" "+j+'="'+l.encode(i[j])+'"'}}if(typeof(m)!="undefined"){return p+">"+m+"</"+q+">"}return p+" />"},remove:function(i,j){return this.run(i,function(l){var m,k=l.parentNode;if(!k){return null}if(j){while(m=l.firstChild){if(!e.isIE||m.nodeType!==3||m.nodeValue){k.insertBefore(m,l)}else{l.removeChild(m)}}}return k.removeChild(l)})},setStyle:function(l,i,j){var k=this;return k.run(l,function(o){var n,m;n=o.style;i=i.replace(/-(\D)/g,function(q,p){return p.toUpperCase()});if(k.pixelStyles.test(i)&&(e.is(j,"number")||/^[\-0-9\.]+$/.test(j))){j+="px"}switch(i){case"opacity":if(b){n.filter=j===""?"":"alpha(opacity="+(j*100)+")";if(!l.currentStyle||!l.currentStyle.hasLayout){n.display="inline-block"}}n[i]=n["-moz-opacity"]=n["-khtml-opacity"]=j||"";break;case"float":b?n.styleFloat=j:n.cssFloat=j;break;default:n[i]=j||""}if(k.settings.update_styles){k.setAttrib(o,"data-mce-style")}})},getStyle:function(l,i,k){l=this.get(l);if(!l){return}if(this.doc.defaultView&&k){i=i.replace(/[A-Z]/g,function(m){return"-"+m});try{return this.doc.defaultView.getComputedStyle(l,null).getPropertyValue(i)}catch(j){return null}}i=i.replace(/-(\D)/g,function(n,m){return m.toUpperCase()});if(i=="float"){i=b?"styleFloat":"cssFloat"}if(l.currentStyle&&k){return l.currentStyle[i]}return l.style?l.style[i]:undefined},setStyles:function(l,m){var j=this,k=j.settings,i;i=k.update_styles;k.update_styles=0;g(m,function(o,p){j.setStyle(l,p,o)});k.update_styles=i;if(k.update_styles){j.setAttrib(l,k.cssText)}},removeAllAttribs:function(i){return this.run(i,function(l){var k,j=l.attributes;for(k=j.length-1;k>=0;k--){l.removeAttributeNode(j.item(k))}})},setAttrib:function(k,l,i){var j=this;if(!k||!l){return}if(j.settings.strict){l=l.toLowerCase()}return this.run(k,function(p){var o=j.settings;var m=p.getAttribute(l);if(i!==null){switch(l){case"style":if(!d(i,"string")){g(i,function(q,r){j.setStyle(p,r,q)});return}if(o.keep_values){if(i&&!j._isRes(i)){p.setAttribute("data-mce-style",i,2)}else{p.removeAttribute("data-mce-style",2)}}p.style.cssText=i;break;case"class":p.className=i||"";break;case"src":case"href":if(o.keep_values){if(o.url_converter){i=o.url_converter.call(o.url_converter_scope||j,i,l,p)}j.setAttrib(p,"data-mce-"+l,i,2)}break;case"shape":p.setAttribute("data-mce-style",i);break}}if(d(i)&&i!==null&&i.length!==0){p.setAttribute(l,""+i,2)}else{p.removeAttribute(l,2)}if(tinyMCE.activeEditor&&m!=i){var n=tinyMCE.activeEditor;n.onSetAttrib.dispatch(n,p,l,i)}})},setAttribs:function(j,k){var i=this;return this.run(j,function(l){g(k,function(m,o){i.setAttrib(l,o,m)})})},getAttrib:function(m,o,k){var i,j=this,l;m=j.get(m);if(!m||m.nodeType!==1){return k===l?false:k}if(!d(k)){k=""}if(/^(src|href|style|coords|shape)$/.test(o)){i=m.getAttribute("data-mce-"+o);if(i){return i}}if(b&&j.props[o]){i=m[j.props[o]];i=i&&i.nodeValue?i.nodeValue:i}if(!i){i=m.getAttribute(o,2)}if(/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(o)){if(m[j.props[o]]===true&&i===""){return o}return i?o:""}if(m.nodeName==="FORM"&&m.getAttributeNode(o)){return m.getAttributeNode(o).nodeValue}if(o==="style"){i=i||m.style.cssText;if(i){i=j.serializeStyle(j.parseStyle(i),m.nodeName);if(j.settings.keep_values&&!j._isRes(i)){m.setAttribute("data-mce-style",i)}}}if(f&&o==="class"&&i){i=i.replace(/(apple|webkit)\-[a-z\-]+/gi,"")}if(b){switch(o){case"rowspan":case"colspan":if(i===1){i=""}break;case"size":if(i==="+0"||i===20||i===0){i=""}break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":if(i===0){i=""}break;case"hspace":if(i===-1){i=""}break;case"maxlength":case"tabindex":if(i===32768||i===2147483647||i==="32768"){i=""}break;case"multiple":case"compact":case"noshade":case"nowrap":if(i===65535){return o}return k;case"shape":i=i.toLowerCase();break;default:if(o.indexOf("on")===0&&i){i=e._replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1",""+i)}}}return(i!==l&&i!==null&&i!=="")?""+i:k},getPos:function(q,l){var j=this,i=0,p=0,m,o=j.doc,k;q=j.get(q);l=l||o.body;if(q){if(q.getBoundingClientRect){q=q.getBoundingClientRect();m=j.boxModel?o.documentElement:o.body;i=q.left+(o.documentElement.scrollLeft||o.body.scrollLeft)-m.clientTop;p=q.top+(o.documentElement.scrollTop||o.body.scrollTop)-m.clientLeft;return{x:i,y:p}}k=q;while(k&&k!=l&&k.nodeType){i+=k.offsetLeft||0;p+=k.offsetTop||0;k=k.offsetParent}k=q.parentNode;while(k&&k!=l&&k.nodeType){i-=k.scrollLeft||0;p-=k.scrollTop||0;k=k.parentNode}}return{x:i,y:p}},parseStyle:function(i){return this.styles.parse(i)},serializeStyle:function(j,i){return this.styles.serialize(j,i)},addStyle:function(j){var k=this.doc,i;styleElm=k.getElementById("mceDefaultStyles");if(!styleElm){styleElm=k.createElement("style"),styleElm.id="mceDefaultStyles";styleElm.type="text/css";i=k.getElementsByTagName("head")[0];if(i.firstChild){i.insertBefore(styleElm,i.firstChild)}else{i.appendChild(styleElm)}}if(styleElm.styleSheet){styleElm.styleSheet.cssText+=j}else{styleElm.appendChild(k.createTextNode(j))}},loadCSS:function(i){var k=this,l=k.doc,j;if(!i){i=""}j=l.getElementsByTagName("head")[0];g(i.split(","),function(m){var n;if(k.files[m]){return}k.files[m]=true;n=k.create("link",{rel:"stylesheet",href:e._addVer(m)});if(b&&l.documentMode&&l.recalc){n.onload=function(){if(l.recalc){l.recalc()}n.onload=null}}j.appendChild(n)})},addClass:function(i,j){return this.run(i,function(k){var l;if(!j){return 0}if(this.hasClass(k,j)){return k.className}l=this.removeClass(k,j);return k.className=(l!=""?(l+" "):"")+j})},removeClass:function(k,l){var i=this,j;return i.run(k,function(n){var m;if(i.hasClass(n,l)){if(!j){j=new RegExp("(^|\\s+)"+l+"(\\s+|$)","g")}m=n.className.replace(j," ");m=e.trim(m!=" "?m:"");n.className=m;if(!m){n.removeAttribute("class");n.removeAttribute("className")}return m}return n.className})},hasClass:function(j,i){j=this.get(j);if(!j||!i){return false}return(" "+j.className+" ").indexOf(" "+i+" ")!==-1},show:function(i){return this.setStyle(i,"display","block")},hide:function(i){return this.setStyle(i,"display","none")},isHidden:function(i){i=this.get(i);return !i||i.style.display=="none"||this.getStyle(i,"display")=="none"},uniqueId:function(i){return(!i?"mce_":i)+(this.counter++)},setHTML:function(k,j){var i=this;return i.run(k,function(m){if(b){while(m.firstChild){m.removeChild(m.firstChild)}try{m.innerHTML="<br />"+j;m.removeChild(m.firstChild)}catch(l){var n=i.create("div");n.innerHTML="<br />"+j;g(e.grep(n.childNodes),function(p,o){if(o&&m.canHaveHTML){m.appendChild(p)}})}}else{m.innerHTML=j}return j})},getOuterHTML:function(k){var j,i=this;k=i.get(k);if(!k){return null}if(k.nodeType===1&&i.hasOuterHTML){return k.outerHTML}j=(k.ownerDocument||i.doc).createElement("body");j.appendChild(k.cloneNode(true));return j.innerHTML},setOuterHTML:function(l,j,m){var i=this;function k(p,o,r){var s,q;q=r.createElement("body");q.innerHTML=o;s=q.lastChild;while(s){i.insertAfter(s.cloneNode(true),p);s=s.previousSibling}i.remove(p)}return this.run(l,function(o){o=i.get(o);if(o.nodeType==1){m=m||o.ownerDocument||i.doc;if(b){try{if(b&&o.nodeType==1){o.outerHTML=j}else{k(o,j,m)}}catch(n){k(o,j,m)}}else{k(o,j,m)}}})},decode:h.decode,encode:h.encodeAllRaw,insertAfter:function(i,j){j=this.get(j);return this.run(i,function(l){var k,m;k=j.parentNode;m=j.nextSibling;if(m){k.insertBefore(l,m)}else{k.appendChild(l)}return l})},replace:function(m,l,i){var j=this;if(d(l,"array")){m=m.cloneNode(true)}return j.run(l,function(k){if(i){g(e.grep(k.childNodes),function(n){m.appendChild(n)})}return k.parentNode.replaceChild(m,k)})},rename:function(l,i){var k=this,j;if(l.nodeName!=i.toUpperCase()){j=k.create(i);g(k.getAttribs(l),function(m){k.setAttrib(j,m.nodeName,k.getAttrib(l,m.nodeName))});k.replace(j,l,1)}return j||l},findCommonAncestor:function(k,i){var l=k,j;while(l){j=i;while(j&&l!=j){j=j.parentNode}if(l==j){break}l=l.parentNode}if(!l&&k.ownerDocument){return k.ownerDocument.documentElement}return l},toHex:function(i){var k=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(i);function j(l){l=parseInt(l,10).toString(16);return l.length>1?l:"0"+l}if(k){i="#"+j(k[1])+j(k[2])+j(k[3]);return i}return i},getClasses:function(){var n=this,j=[],m,o={},p=n.settings.class_filter,l;if(n.classes){return n.classes}function q(i){g(i.imports,function(s){q(s)});g(i.cssRules||i.rules,function(s){switch(s.type||1){case 1:if(s.selectorText){g(s.selectorText.split(","),function(r){r=r.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(r)||!/\.[\w\-]+$/.test(r)){return}l=r;r=e._replace(/.*\.([a-z0-9_\-]+).*/i,"$1",r);if(p&&!(r=p(r,l))){return}if(!o[r]){j.push({"class":r});o[r]=1}})}break;case 3:q(s.styleSheet);break}})}try{g(n.doc.styleSheets,q)}catch(k){}if(j.length>0){n.classes=j}return j},run:function(l,k,j){var i=this,m;if(i.doc&&typeof(l)==="string"){l=i.get(l)}if(!l){return false}j=j||this;if(!l.nodeType&&(l.length||l.length===0)){m=[];g(l,function(o,n){if(o){if(typeof(o)=="string"){o=i.doc.getElementById(o)}m.push(k.call(j,o,n))}});return m}return k.call(j,l)},getAttribs:function(j){var i;j=this.get(j);if(!j){return[]}if(b){i=[];if(j.nodeName=="OBJECT"){return j.attributes}if(j.nodeName==="OPTION"&&this.getAttrib(j,"selected")){i.push({specified:1,nodeName:"selected"})}j.cloneNode(false).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(k){i.push({specified:1,nodeName:k})});return i}return j.attributes},isEmpty:function(m,k){var r=this,o,n,q,j,l,p=0;m=m.firstChild;if(m){j=new e.dom.TreeWalker(m,m.parentNode);k=k||r.schema?r.schema.getNonEmptyElements():null;do{q=m.nodeType;if(q===1){if(m.getAttribute("data-mce-bogus")){continue}l=m.nodeName.toLowerCase();if(k&&k[l]){if(l==="br"){p++;continue}return false}n=r.getAttribs(m);o=m.attributes.length;while(o--){l=m.attributes[o].nodeName;if(l==="name"||l==="data-mce-bookmark"){return false}}}if(q==8){return false}if((q===3&&!a.test(m.nodeValue))){return false}}while(m=j.next())}return p<=1},destroy:function(j){var i=this;i.win=i.doc=i.root=i.events=i.frag=null;if(!j){e.removeUnload(i.destroy)}},createRng:function(){var i=this.doc;return i.createRange?i.createRange():new e.dom.Range(this)},nodeIndex:function(m,n){var i=0,k,l,j;if(m){for(k=m.nodeType,m=m.previousSibling,l=m;m;m=m.previousSibling){j=m.nodeType;if(n&&j==3){if(j==k||!m.nodeValue.length){continue}}i++;k=j}}return i},split:function(m,l,p){var q=this,i=q.createRng(),n,k,o;function j(v){var t,s=v.childNodes,u=v.nodeType;function x(A){var z=A.previousSibling&&A.previousSibling.nodeName=="SPAN";var y=A.nextSibling&&A.nextSibling.nodeName=="SPAN";return z&&y}if(u==1&&v.getAttribute("data-mce-type")=="bookmark"){return}for(t=s.length-1;t>=0;t--){j(s[t])}if(u!=9){if(u==3&&v.nodeValue.length>0){var r=e.trim(v.nodeValue).length;if(!q.isBlock(v.parentNode)||r>0||r===0&&x(v)){return}}else{if(u==1){s=v.childNodes;if(s.length==1&&s[0]&&s[0].nodeType==1&&s[0].getAttribute("data-mce-type")=="bookmark"){v.parentNode.insertBefore(s[0],v)}if(s.length||/^(br|hr|input|img)$/i.test(v.nodeName)){return}}}q.remove(v)}return v}if(m&&l){i.setStart(m.parentNode,q.nodeIndex(m));i.setEnd(l.parentNode,q.nodeIndex(l));n=i.extractContents();i=q.createRng();i.setStart(l.parentNode,q.nodeIndex(l)+1);i.setEnd(m.parentNode,q.nodeIndex(m)+1);k=i.extractContents();o=m.parentNode;o.insertBefore(j(n),m);if(p){o.replaceChild(p,l)}else{o.insertBefore(l,m)}o.insertBefore(j(k),m);q.remove(m);return p||l}},bind:function(l,i,k,j){return this.events.add(l,i,k,j||this)},unbind:function(k,i,j){return this.events.remove(k,i,j)},fire:function(k,j,i){return this.events.fire(k,j,i)},getContentEditable:function(j){var i;if(j.nodeType!=1){return null}i=j.getAttribute("data-mce-contenteditable");if(i&&i!=="inherit"){return i}return j.contentEditable!=="inherit"?j.contentEditable:null},_findSib:function(l,i,j){var k=this,m=i;if(l){if(d(m,"string")){m=function(n){return k.is(n,i)}}for(l=l[j];l;l=l[j]){if(m(l)){return l}}}return null},_isRes:function(i){return/^(top|left|bottom|right|width|height)/i.test(i)||/;\s*(top|left|bottom|right|width|height)/i.test(i)}});e.DOM=new e.dom.DOMUtils(document,{process_html:0})})(tinymce);(function(a){function b(c){var O=this,e=c.doc,U=0,F=1,j=2,E=true,S=false,W="startOffset",h="startContainer",Q="endContainer",A="endOffset",k=tinymce.extend,n=c.nodeIndex;k(O,{startContainer:e,startOffset:0,endContainer:e,endOffset:0,collapsed:E,commonAncestorContainer:e,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:q,setEnd:s,setStartBefore:g,setStartAfter:J,setEndBefore:K,setEndAfter:u,collapse:B,selectNode:y,selectNodeContents:G,compareBoundaryPoints:v,deleteContents:p,extractContents:I,cloneContents:d,insertNode:D,surroundContents:N,cloneRange:L,toStringIE:T});function x(){return e.createDocumentFragment()}function q(X,t){C(E,X,t)}function s(X,t){C(S,X,t)}function g(t){q(t.parentNode,n(t))}function J(t){q(t.parentNode,n(t)+1)}function K(t){s(t.parentNode,n(t))}function u(t){s(t.parentNode,n(t)+1)}function B(t){if(t){O[Q]=O[h];O[A]=O[W]}else{O[h]=O[Q];O[W]=O[A]}O.collapsed=E}function y(t){g(t);u(t)}function G(t){q(t,0);s(t,t.nodeType===1?t.childNodes.length:t.nodeValue.length)}function v(aa,t){var ad=O[h],Y=O[W],ac=O[Q],X=O[A],ab=t.startContainer,af=t.startOffset,Z=t.endContainer,ae=t.endOffset;if(aa===0){return H(ad,Y,ab,af)}if(aa===1){return H(ac,X,ab,af)}if(aa===2){return H(ac,X,Z,ae)}if(aa===3){return H(ad,Y,Z,ae)}}function p(){l(j)}function I(){return l(U)}function d(){return l(F)}function D(aa){var X=this[h],t=this[W],Z,Y;if((X.nodeType===3||X.nodeType===4)&&X.nodeValue){if(!t){X.parentNode.insertBefore(aa,X)}else{if(t>=X.nodeValue.length){c.insertAfter(aa,X)}else{Z=X.splitText(t);X.parentNode.insertBefore(aa,Z)}}}else{if(X.childNodes.length>0){Y=X.childNodes[t]}if(Y){X.insertBefore(aa,Y)}else{X.appendChild(aa)}}}function N(X){var t=O.extractContents();O.insertNode(X);X.appendChild(t);O.selectNode(X)}function L(){return k(new b(c),{startContainer:O[h],startOffset:O[W],endContainer:O[Q],endOffset:O[A],collapsed:O.collapsed,commonAncestorContainer:O.commonAncestorContainer})}function P(t,X){var Y;if(t.nodeType==3){return t}if(X<0){return t}Y=t.firstChild;while(Y&&X>0){--X;Y=Y.nextSibling}if(Y){return Y}return t}function m(){return(O[h]==O[Q]&&O[W]==O[A])}function H(Z,ab,X,aa){var ac,Y,t,ad,af,ae;if(Z==X){if(ab==aa){return 0}if(ab<aa){return -1}return 1}ac=X;while(ac&&ac.parentNode!=Z){ac=ac.parentNode}if(ac){Y=0;t=Z.firstChild;while(t!=ac&&Y<ab){Y++;t=t.nextSibling}if(ab<=Y){return -1}return 1}ac=Z;while(ac&&ac.parentNode!=X){ac=ac.parentNode}if(ac){Y=0;t=X.firstChild;while(t!=ac&&Y<aa){Y++;t=t.nextSibling}if(Y<aa){return -1}return 1}ad=c.findCommonAncestor(Z,X);af=Z;while(af&&af.parentNode!=ad){af=af.parentNode}if(!af){af=ad}ae=X;while(ae&&ae.parentNode!=ad){ae=ae.parentNode}if(!ae){ae=ad}if(af==ae){return 0}t=ad.firstChild;while(t){if(t==af){return -1}if(t==ae){return 1}t=t.nextSibling}}function C(X,aa,Z){var t,Y;if(X){O[h]=aa;O[W]=Z}else{O[Q]=aa;O[A]=Z}t=O[Q];while(t.parentNode){t=t.parentNode}Y=O[h];while(Y.parentNode){Y=Y.parentNode}if(Y==t){if(H(O[h],O[W],O[Q],O[A])>0){O.collapse(X)}}else{O.collapse(X)}O.collapsed=m();O.commonAncestorContainer=c.findCommonAncestor(O[h],O[Q])}function l(ad){var ac,Z=0,af=0,X,ab,Y,aa,t,ae;if(O[h]==O[Q]){return f(ad)}for(ac=O[Q],X=ac.parentNode;X;ac=X,X=X.parentNode){if(X==O[h]){return r(ac,ad)}++Z}for(ac=O[h],X=ac.parentNode;X;ac=X,X=X.parentNode){if(X==O[Q]){return V(ac,ad)}++af}ab=af-Z;Y=O[h];while(ab>0){Y=Y.parentNode;ab--}aa=O[Q];while(ab<0){aa=aa.parentNode;ab++}for(t=Y.parentNode,ae=aa.parentNode;t!=ae;t=t.parentNode,ae=ae.parentNode){Y=t;aa=ae}return o(Y,aa,ad)}function f(ac){var ae,af,t,Y,Z,ad,aa,X,ab;if(ac!=j){ae=x()}if(O[W]==O[A]){return ae}if(O[h].nodeType==3){af=O[h].nodeValue;t=af.substring(O[W],O[A]);if(ac!=F){Y=O[h];X=O[W];ab=O[A]-O[W];if(X===0&&ab>=Y.nodeValue.length-1){Y.parentNode.removeChild(Y)}else{Y.deleteData(X,ab)}O.collapse(E)}if(ac==j){return}if(t.length>0){ae.appendChild(e.createTextNode(t))}return ae}Y=P(O[h],O[W]);Z=O[A]-O[W];while(Y&&Z>0){ad=Y.nextSibling;aa=z(Y,ac);if(ae){ae.appendChild(aa)}--Z;Y=ad}if(ac!=F){O.collapse(E)}return ae}function r(ad,aa){var ac,ab,X,t,Z,Y;if(aa!=j){ac=x()}ab=i(ad,aa);if(ac){ac.appendChild(ab)}X=n(ad);t=X-O[W];if(t<=0){if(aa!=F){O.setEndBefore(ad);O.collapse(S)}return ac}ab=ad.previousSibling;while(t>0){Z=ab.previousSibling;Y=z(ab,aa);if(ac){ac.insertBefore(Y,ac.firstChild)}--t;ab=Z}if(aa!=F){O.setEndBefore(ad);O.collapse(S)}return ac}function V(ab,aa){var ad,X,ac,t,Z,Y;if(aa!=j){ad=x()}ac=R(ab,aa);if(ad){ad.appendChild(ac)}X=n(ab);++X;t=O[A]-X;ac=ab.nextSibling;while(ac&&t>0){Z=ac.nextSibling;Y=z(ac,aa);if(ad){ad.appendChild(Y)}--t;ac=Z}if(aa!=F){O.setStartAfter(ab);O.collapse(E)}return ad}function o(ab,t,ae){var Y,ag,aa,ac,ad,X,af,Z;if(ae!=j){ag=x()}Y=R(ab,ae);if(ag){ag.appendChild(Y)}aa=ab.parentNode;ac=n(ab);ad=n(t);++ac;X=ad-ac;af=ab.nextSibling;while(X>0){Z=af.nextSibling;Y=z(af,ae);if(ag){ag.appendChild(Y)}af=Z;--X}Y=i(t,ae);if(ag){ag.appendChild(Y)}if(ae!=F){O.setStartAfter(ab);O.collapse(E)}return ag}function i(ac,ad){var Y=P(O[Q],O[A]-1),ae,ab,aa,t,X,Z=Y!=O[Q];if(Y==ac){return M(Y,Z,S,ad)}ae=Y.parentNode;ab=M(ae,S,S,ad);while(ae){while(Y){aa=Y.previousSibling;t=M(Y,Z,S,ad);if(ad!=j){ab.insertBefore(t,ab.firstChild)}Z=E;Y=aa}if(ae==ac){return ab}Y=ae.previousSibling;ae=ae.parentNode;X=M(ae,S,S,ad);if(ad!=j){X.appendChild(ab)}ab=X}}function R(ac,ad){var Z=P(O[h],O[W]),aa=Z!=O[h],ae,ab,Y,t,X;if(Z==ac){return M(Z,aa,E,ad)}ae=Z.parentNode;ab=M(ae,S,E,ad);while(ae){while(Z){Y=Z.nextSibling;t=M(Z,aa,E,ad);if(ad!=j){ab.appendChild(t)}aa=E;Z=Y}if(ae==ac){return ab}Z=ae.nextSibling;ae=ae.parentNode;X=M(ae,S,E,ad);if(ad!=j){X.appendChild(ab)}ab=X}}function M(t,aa,ad,ae){var Z,Y,ab,X,ac;if(aa){return z(t,ae)}if(t.nodeType==3){Z=t.nodeValue;if(ad){X=O[W];Y=Z.substring(X);ab=Z.substring(0,X)}else{X=O[A];Y=Z.substring(0,X);ab=Z.substring(X)}if(ae!=F){t.nodeValue=ab}if(ae==j){return}ac=c.clone(t,S);ac.nodeValue=Y;return ac}if(ae==j){return}return c.clone(t,S)}function z(X,t){if(t!=j){return t==F?c.clone(X,E):X}X.parentNode.removeChild(X)}function T(){return c.create("body",null,d()).outerText}return O}a.Range=b;b.prototype.toString=function(){return this.toStringIE()}})(tinymce.dom);(function(){function a(d){var b=this,h=d.dom,c=true,f=false;function e(i,j){var k,t=0,q,n,m,l,o,r,p=-1,s;k=i.duplicate();k.collapse(j);s=k.parentElement();if(s.ownerDocument!==d.dom.doc){return}while(s.contentEditable==="false"){s=s.parentNode}if(!s.hasChildNodes()){return{node:s,inside:1}}m=s.children;q=m.length-1;while(t<=q){r=Math.floor((t+q)/2);l=m[r];k.moveToElementText(l);p=k.compareEndPoints(j?"StartToStart":"EndToEnd",i);if(p>0){q=r-1}else{if(p<0){t=r+1}else{return{node:l}}}}if(p<0){if(!l){k.moveToElementText(s);k.collapse(true);l=s;n=true}else{k.collapse(false)}o=0;while(k.compareEndPoints(j?"StartToStart":"StartToEnd",i)!==0){if(k.move("character",1)===0||s!=k.parentElement()){break}o++}}else{k.collapse(true);o=0;while(k.compareEndPoints(j?"StartToStart":"StartToEnd",i)!==0){if(k.move("character",-1)===0||s!=k.parentElement()){break}o++}}return{node:l,position:p,offset:o,inside:n}}function g(){var i=d.getRng(),r=h.createRng(),l,k,p,q,m,j;l=i.item?i.item(0):i.parentElement();if(l.ownerDocument!=h.doc){return r}k=d.isCollapsed();if(i.item){r.setStart(l.parentNode,h.nodeIndex(l));r.setEnd(r.startContainer,r.startOffset+1);return r}function o(A){var u=e(i,A),s,y,z=0,x,v,t;s=u.node;y=u.offset;if(u.inside&&!s.hasChildNodes()){r[A?"setStart":"setEnd"](s,0);return}if(y===v){r[A?"setStartBefore":"setEndAfter"](s);return}if(u.position<0){x=u.inside?s.firstChild:s.nextSibling;if(!x){r[A?"setStartAfter":"setEndAfter"](s);return}if(!y){if(x.nodeType==3){r[A?"setStart":"setEnd"](x,0)}else{r[A?"setStartBefore":"setEndBefore"](x)}return}while(x){t=x.nodeValue;z+=t.length;if(z>=y){s=x;z-=y;z=t.length-z;break}x=x.nextSibling}}else{x=s.previousSibling;if(!x){return r[A?"setStartBefore":"setEndBefore"](s)}if(!y){if(s.nodeType==3){r[A?"setStart":"setEnd"](x,s.nodeValue.length)}else{r[A?"setStartAfter":"setEndAfter"](x)}return}while(x){z+=x.nodeValue.length;if(z>=y){s=x;z-=y;break}x=x.previousSibling}}r[A?"setStart":"setEnd"](s,z)}try{o(true);if(!k){o()}}catch(n){if(n.number==-2147024809){m=b.getBookmark(2);p=i.duplicate();p.collapse(true);l=p.parentElement();if(!k){p=i.duplicate();p.collapse(false);q=p.parentElement();q.innerHTML=q.innerHTML}l.innerHTML=l.innerHTML;b.moveToBookmark(m);i=d.getRng();o(true);if(!k){o()}}else{throw n}}return r}this.getBookmark=function(m){var j=d.getRng(),o,i,l={};function n(u){var t,p,s,r,q=[];t=u.parentNode;p=h.getRoot().parentNode;while(t!=p&&t.nodeType!==9){s=t.children;r=s.length;while(r--){if(u===s[r]){q.push(r);break}}u=t;t=t.parentNode}return q}function k(q){var p;p=e(j,q);if(p){return{position:p.position,offset:p.offset,indexes:n(p.node),inside:p.inside}}}if(m===2){if(!j.item){l.start=k(true);if(!d.isCollapsed()){l.end=k()}}else{l.start={ctrl:true,indexes:n(j.item(0))}}}return l};this.moveToBookmark=function(k){var j,i=h.doc.body;function m(o){var r,q,n,p;r=h.getRoot();for(q=o.length-1;q>=0;q--){p=r.children;n=o[q];if(n<=p.length-1){r=p[n]}}return r}function l(r){var n=k[r?"start":"end"],q,p,o;if(n){q=n.position>0;p=i.createTextRange();p.moveToElementText(m(n.indexes));offset=n.offset;if(offset!==o){p.collapse(n.inside||q);p.moveStart("character",q?-offset:offset)}else{p.collapse(r)}j.setEndPoint(r?"StartToStart":"EndToStart",p);if(r){j.collapse(true)}}}if(k.start){if(k.start.ctrl){j=i.createControlRange();j.addElement(m(k.start.indexes));j.select()}else{j=i.createTextRange();l(true);l();j.select()}}};this.addRange=function(i){var n,l,k,p,t,q,s,r=d.dom.doc,m=r.body;function j(A){var v,z,u,y,x;u=h.create("a");v=A?k:t;z=A?p:q;y=n.duplicate();if(v==r||v==r.documentElement){v=m;z=0}if(v.nodeType==3){v.parentNode.insertBefore(u,v);y.moveToElementText(u);y.moveStart("character",z);h.remove(u);n.setEndPoint(A?"StartToStart":"EndToEnd",y)}else{x=v.childNodes;if(x.length){if(z>=x.length){h.insertAfter(u,x[x.length-1])}else{v.insertBefore(u,x[z])}y.moveToElementText(u)}else{if(v.canHaveHTML){v.innerHTML="<span>\uFEFF</span>";u=v.firstChild;y.moveToElementText(u);y.collapse(f)}}n.setEndPoint(A?"StartToStart":"EndToEnd",y);h.remove(u)}}k=i.startContainer;p=i.startOffset;t=i.endContainer;q=i.endOffset;n=m.createTextRange();if(k==t&&k.nodeType==1){if(p==q&&!k.hasChildNodes()){if(k.canHaveHTML){s=k.previousSibling;if(s&&!s.hasChildNodes()&&h.isBlock(s)){s.innerHTML="\uFEFF"}else{s=null}k.innerHTML="<span>\uFEFF</span><span>\uFEFF</span>";n.moveToElementText(k.lastChild);n.select();h.doc.selection.clear();k.innerHTML="";if(s){s.innerHTML=""}return}else{p=h.nodeIndex(k);k=k.parentNode}}if(p==q-1){try{l=m.createControlRange();l.addElement(k.childNodes[p]);l.select();return}catch(o){}}}j(true);j();n.select()};this.getRangeAt=g}tinymce.dom.TridentSelection=a})();(function(){var n=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,i="sizcache",o=0,r=Object.prototype.toString,h=false,g=true,q=/\\/g,u=/\r\n/g,x=/\W/;[0,0].sort(function(){g=false;return 0});var d=function(C,e,F,G){F=F||[];e=e||document;var I=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!C||typeof C!=="string"){return F}var z,K,N,y,J,M,L,E,B=true,A=d.isXML(e),D=[],H=C;do{n.exec("");z=n.exec(H);if(z){H=z[3];D.push(z[1]);if(z[2]){y=z[3];break}}}while(z);if(D.length>1&&j.exec(C)){if(D.length===2&&k.relative[D[0]]){K=s(D[0]+D[1],e,G)}else{K=k.relative[D[0]]?[e]:d(D.shift(),e);while(D.length){C=D.shift();if(k.relative[C]){C+=D.shift()}K=s(C,K,G)}}}else{if(!G&&D.length>1&&e.nodeType===9&&!A&&k.match.ID.test(D[0])&&!k.match.ID.test(D[D.length-1])){J=d.find(D.shift(),e,A);e=J.expr?d.filter(J.expr,J.set)[0]:J.set[0]}if(e){J=G?{expr:D.pop(),set:l(G)}:d.find(D.pop(),D.length===1&&(D[0]==="~"||D[0]==="+")&&e.parentNode?e.parentNode:e,A);K=J.expr?d.filter(J.expr,J.set):J.set;if(D.length>0){N=l(K)}else{B=false}while(D.length){M=D.pop();L=M;if(!k.relative[M]){M=""}else{L=D.pop()}if(L==null){L=e}k.relative[M](N,L,A)}}else{N=D=[]}}if(!N){N=K}if(!N){d.error(M||C)}if(r.call(N)==="[object Array]"){if(!B){F.push.apply(F,N)}else{if(e&&e.nodeType===1){for(E=0;N[E]!=null;E++){if(N[E]&&(N[E]===true||N[E].nodeType===1&&d.contains(e,N[E]))){F.push(K[E])}}}else{for(E=0;N[E]!=null;E++){if(N[E]&&N[E].nodeType===1){F.push(K[E])}}}}}else{l(N,F)}if(y){d(y,I,F,G);d.uniqueSort(F)}return F};d.uniqueSort=function(y){if(p){h=g;y.sort(p);if(h){for(var e=1;e<y.length;e++){if(y[e]===y[e-1]){y.splice(e--,1)}}}}return y};d.matches=function(e,y){return d(e,null,null,y)};d.matchesSelector=function(e,y){return d(y,null,null,[e]).length>0};d.find=function(E,e,F){var D,z,B,A,C,y;if(!E){return[]}for(z=0,B=k.order.length;z<B;z++){C=k.order[z];if((A=k.leftMatch[C].exec(E))){y=A[1];A.splice(1,1);if(y.substr(y.length-1)!=="\\"){A[1]=(A[1]||"").replace(q,"");D=k.find[C](A,e,F);if(D!=null){E=E.replace(k.match[C],"");break}}}}if(!D){D=typeof e.getElementsByTagName!=="undefined"?e.getElementsByTagName("*"):[]}return{set:D,expr:E}};d.filter=function(I,H,L,B){var D,e,G,N,K,y,A,C,J,z=I,M=[],F=H,E=H&&H[0]&&d.isXML(H[0]);while(I&&H.length){for(G in k.filter){if((D=k.leftMatch[G].exec(I))!=null&&D[2]){y=k.filter[G];A=D[1];e=false;D.splice(1,1);if(A.substr(A.length-1)==="\\"){continue}if(F===M){M=[]}if(k.preFilter[G]){D=k.preFilter[G](D,F,L,M,B,E);if(!D){e=N=true}else{if(D===true){continue}}}if(D){for(C=0;(K=F[C])!=null;C++){if(K){N=y(K,D,C,F);J=B^N;if(L&&N!=null){if(J){e=true}else{F[C]=false}}else{if(J){M.push(K);e=true}}}}}if(N!==undefined){if(!L){F=M}I=I.replace(k.match[G],"");if(!e){return[]}break}}}if(I===z){if(e==null){d.error(I)}else{break}}z=I}return F};d.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};var b=d.getText=function(B){var z,A,e=B.nodeType,y="";if(e){if(e===1||e===9||e===11){if(typeof B.textContent==="string"){return B.textContent}else{if(typeof B.innerText==="string"){return B.innerText.replace(u,"")}else{for(B=B.firstChild;B;B=B.nextSibling){y+=b(B)}}}}else{if(e===3||e===4){return B.nodeValue}}}else{for(z=0;(A=B[z]);z++){if(A.nodeType!==8){y+=b(A)}}}return y};var k=d.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(e){return e.getAttribute("href")},type:function(e){return e.getAttribute("type")}},relative:{"+":function(D,y){var A=typeof y==="string",C=A&&!x.test(y),E=A&&!C;if(C){y=y.toLowerCase()}for(var z=0,e=D.length,B;z<e;z++){if((B=D[z])){while((B=B.previousSibling)&&B.nodeType!==1){}D[z]=E||B&&B.nodeName.toLowerCase()===y?B||false:B===y}}if(E){d.filter(y,D,true)}},">":function(D,y){var C,B=typeof y==="string",z=0,e=D.length;if(B&&!x.test(y)){y=y.toLowerCase();for(;z<e;z++){C=D[z];if(C){var A=C.parentNode;D[z]=A.nodeName.toLowerCase()===y?A:false}}}else{for(;z<e;z++){C=D[z];if(C){D[z]=B?C.parentNode:C.parentNode===y}}if(B){d.filter(y,D,true)}}},"":function(A,y,C){var B,z=o++,e=t;if(typeof y==="string"&&!x.test(y)){y=y.toLowerCase();B=y;e=a}e("parentNode",y,z,A,B,C)},"~":function(A,y,C){var B,z=o++,e=t;if(typeof y==="string"&&!x.test(y)){y=y.toLowerCase();B=y;e=a}e("previousSibling",y,z,A,B,C)}},find:{ID:function(y,z,A){if(typeof z.getElementById!=="undefined"&&!A){var e=z.getElementById(y[1]);return e&&e.parentNode?[e]:[]}},NAME:function(z,C){if(typeof C.getElementsByName!=="undefined"){var y=[],B=C.getElementsByName(z[1]);for(var A=0,e=B.length;A<e;A++){if(B[A].getAttribute("name")===z[1]){y.push(B[A])}}return y.length===0?null:y}},TAG:function(e,y){if(typeof y.getElementsByTagName!=="undefined"){return y.getElementsByTagName(e[1])}}},preFilter:{CLASS:function(A,y,z,e,D,E){A=" "+A[1].replace(q,"")+" ";if(E){return A}for(var B=0,C;(C=y[B])!=null;B++){if(C){if(D^(C.className&&(" "+C.className+" ").replace(/[\t\n\r]/g," ").indexOf(A)>=0)){if(!z){e.push(C)}}else{if(z){y[B]=false}}}}return false},ID:function(e){return e[1].replace(q,"")},TAG:function(y,e){return y[1].replace(q,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){d.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var y=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(y[1]+(y[2]||1))-0;e[3]=y[3]-0}else{if(e[2]){d.error(e[0])}}e[0]=o++;return e},ATTR:function(B,y,z,e,C,D){var A=B[1]=B[1].replace(q,"");if(!D&&k.attrMap[A]){B[1]=k.attrMap[A]}B[4]=(B[4]||B[5]||"").replace(q,"");if(B[2]==="~="){B[4]=" "+B[4]+" "}return B},PSEUDO:function(B,y,z,e,C){if(B[1]==="not"){if((n.exec(B[3])||"").length>1||/^\w/.test(B[3])){B[3]=d(B[3],null,null,y)}else{var A=d.filter(B[3],y,z,true^C);if(!z){e.push.apply(e,A)}return false}}else{if(k.match.POS.test(B[0])||k.match.CHILD.test(B[0])){return true}}return B},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(z,y,e){return !!d(e[3],z).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(z){var e=z.getAttribute("type"),y=z.type;return z.nodeName.toLowerCase()==="input"&&"text"===y&&(e===y||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(y){var e=y.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===y.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(y){var e=y.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===y.type},button:function(y){var e=y.nodeName.toLowerCase();return e==="input"&&"button"===y.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(y,e){return e===0},last:function(z,y,e,A){return y===A.length-1},even:function(y,e){return e%2===0},odd:function(y,e){return e%2===1},lt:function(z,y,e){return y<e[3]-0},gt:function(z,y,e){return y>e[3]-0},nth:function(z,y,e){return e[3]-0===y},eq:function(z,y,e){return e[3]-0===y}},filter:{PSEUDO:function(z,E,D,F){var e=E[1],y=k.filters[e];if(y){return y(z,D,E,F)}else{if(e==="contains"){return(z.textContent||z.innerText||b([z])||"").indexOf(E[3])>=0}else{if(e==="not"){var A=E[3];for(var C=0,B=A.length;C<B;C++){if(A[C]===z){return false}}return true}else{d.error(e)}}}},CHILD:function(z,B){var A,H,D,G,e,C,F,E=B[1],y=z;switch(E){case"only":case"first":while((y=y.previousSibling)){if(y.nodeType===1){return false}}if(E==="first"){return true}y=z;case"last":while((y=y.nextSibling)){if(y.nodeType===1){return false}}return true;case"nth":A=B[2];H=B[3];if(A===1&&H===0){return true}D=B[0];G=z.parentNode;if(G&&(G[i]!==D||!z.nodeIndex)){C=0;for(y=G.firstChild;y;y=y.nextSibling){if(y.nodeType===1){y.nodeIndex=++C}}G[i]=D}F=z.nodeIndex-H;if(A===0){return F===0}else{return(F%A===0&&F/A>=0)}}},ID:function(y,e){return y.nodeType===1&&y.getAttribute("id")===e},TAG:function(y,e){return(e==="*"&&y.nodeType===1)||!!y.nodeName&&y.nodeName.toLowerCase()===e},CLASS:function(y,e){return(" "+(y.className||y.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(C,A){var z=A[1],e=d.attr?d.attr(C,z):k.attrHandle[z]?k.attrHandle[z](C):C[z]!=null?C[z]:C.getAttribute(z),D=e+"",B=A[2],y=A[4];return e==null?B==="!=":!B&&d.attr?e!=null:B==="="?D===y:B==="*="?D.indexOf(y)>=0:B==="~="?(" "+D+" ").indexOf(y)>=0:!y?D&&e!==false:B==="!="?D!==y:B==="^="?D.indexOf(y)===0:B==="$="?D.substr(D.length-y.length)===y:B==="|="?D===y||D.substr(0,y.length+1)===y+"-":false},POS:function(B,y,z,C){var e=y[2],A=k.setFilters[e];if(A){return A(B,z,y,C)}}}};var j=k.match.POS,c=function(y,e){return"\\"+(e-0+1)};for(var f in k.match){k.match[f]=new RegExp(k.match[f].source+(/(?![^\[]*\])(?![^\(]*\))/.source));k.leftMatch[f]=new RegExp(/(^(?:.|\r|\n)*?)/.source+k.match[f].source.replace(/\\(\d+)/g,c))}k.match.globalPOS=j;var l=function(y,e){y=Array.prototype.slice.call(y,0);if(e){e.push.apply(e,y);return e}return y};try{Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType}catch(v){l=function(B,A){var z=0,y=A||[];if(r.call(B)==="[object Array]"){Array.prototype.push.apply(y,B)}else{if(typeof B.length==="number"){for(var e=B.length;z<e;z++){y.push(B[z])}}else{for(;B[z];z++){y.push(B[z])}}}return y}}var p,m;if(document.documentElement.compareDocumentPosition){p=function(y,e){if(y===e){h=true;return 0}if(!y.compareDocumentPosition||!e.compareDocumentPosition){return y.compareDocumentPosition?-1:1}return y.compareDocumentPosition(e)&4?-1:1}}else{p=function(F,E){if(F===E){h=true;return 0}else{if(F.sourceIndex&&E.sourceIndex){return F.sourceIndex-E.sourceIndex}}var C,y,z=[],e=[],B=F.parentNode,D=E.parentNode,G=B;if(B===D){return m(F,E)}else{if(!B){return -1}else{if(!D){return 1}}}while(G){z.unshift(G);G=G.parentNode}G=D;while(G){e.unshift(G);G=G.parentNode}C=z.length;y=e.length;for(var A=0;A<C&&A<y;A++){if(z[A]!==e[A]){return m(z[A],e[A])}}return A===C?m(F,e[A],-1):m(z[A],E,1)};m=function(y,e,z){if(y===e){return z}var A=y.nextSibling;while(A){if(A===e){return -1}A=A.nextSibling}return 1}}(function(){var y=document.createElement("div"),z="script"+(new Date()).getTime(),e=document.documentElement;y.innerHTML="<a name='"+z+"'/>";e.insertBefore(y,e.firstChild);if(document.getElementById(z)){k.find.ID=function(B,C,D){if(typeof C.getElementById!=="undefined"&&!D){var A=C.getElementById(B[1]);return A?A.id===B[1]||typeof A.getAttributeNode!=="undefined"&&A.getAttributeNode("id").nodeValue===B[1]?[A]:undefined:[]}};k.filter.ID=function(C,A){var B=typeof C.getAttributeNode!=="undefined"&&C.getAttributeNode("id");return C.nodeType===1&&B&&B.nodeValue===A}}e.removeChild(y);e=y=null})();(function(){var e=document.createElement("div");e.appendChild(document.createComment(""));if(e.getElementsByTagName("*").length>0){k.find.TAG=function(y,C){var B=C.getElementsByTagName(y[1]);if(y[1]==="*"){var A=[];for(var z=0;B[z];z++){if(B[z].nodeType===1){A.push(B[z])}}B=A}return B}}e.innerHTML="<a href='#'></a>";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){k.attrHandle.href=function(y){return y.getAttribute("href",2)}}e=null})();if(document.querySelectorAll){(function(){var e=d,A=document.createElement("div"),z="__sizzle__";A.innerHTML="<p class='TEST'></p>";if(A.querySelectorAll&&A.querySelectorAll(".TEST").length===0){return}d=function(L,C,G,K){C=C||document;if(!K&&!d.isXML(C)){var J=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(L);if(J&&(C.nodeType===1||C.nodeType===9)){if(J[1]){return l(C.getElementsByTagName(L),G)}else{if(J[2]&&k.find.CLASS&&C.getElementsByClassName){return l(C.getElementsByClassName(J[2]),G)}}}if(C.nodeType===9){if(L==="body"&&C.body){return l([C.body],G)}else{if(J&&J[3]){var F=C.getElementById(J[3]);if(F&&F.parentNode){if(F.id===J[3]){return l([F],G)}}else{return l([],G)}}}try{return l(C.querySelectorAll(L),G)}catch(H){}}else{if(C.nodeType===1&&C.nodeName.toLowerCase()!=="object"){var D=C,E=C.getAttribute("id"),B=E||z,N=C.parentNode,M=/^\s*[+~]/.test(L);if(!E){C.setAttribute("id",B)}else{B=B.replace(/'/g,"\\$&")}if(M&&N){C=C.parentNode}try{if(!M||N){return l(C.querySelectorAll("[id='"+B+"'] "+L),G)}}catch(I){}finally{if(!E){D.removeAttribute("id")}}}}}return e(L,C,G,K)};for(var y in e){d[y]=e[y]}A=null})()}(function(){var e=document.documentElement,z=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(z){var B=!z.call(document.createElement("div"),"div"),y=false;try{z.call(document.documentElement,"[test!='']:sizzle")}catch(A){y=true}d.matchesSelector=function(D,F){F=F.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!d.isXML(D)){try{if(y||!k.match.PSEUDO.test(F)&&!/!=/.test(F)){var C=z.call(D,F);if(C||!B||D.document&&D.document.nodeType!==11){return C}}}catch(E){}}return d(F,null,null,[D]).length>0}}})();(function(){var e=document.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}k.order.splice(1,0,"CLASS");k.find.CLASS=function(y,z,A){if(typeof z.getElementsByClassName!=="undefined"&&!A){return z.getElementsByClassName(y[1])}};e=null})();function a(y,D,C,G,E,F){for(var A=0,z=G.length;A<z;A++){var e=G[A];if(e){var B=false;e=e[y];while(e){if(e[i]===C){B=G[e.sizset];break}if(e.nodeType===1&&!F){e[i]=C;e.sizset=A}if(e.nodeName.toLowerCase()===D){B=e;break}e=e[y]}G[A]=B}}}function t(y,D,C,G,E,F){for(var A=0,z=G.length;A<z;A++){var e=G[A];if(e){var B=false;e=e[y];while(e){if(e[i]===C){B=G[e.sizset];break}if(e.nodeType===1){if(!F){e[i]=C;e.sizset=A}if(typeof D!=="string"){if(e===D){B=true;break}}else{if(d.filter(D,[e]).length>0){B=e;break}}}e=e[y]}G[A]=B}}}if(document.documentElement.contains){d.contains=function(y,e){return y!==e&&(y.contains?y.contains(e):true)}}else{if(document.documentElement.compareDocumentPosition){d.contains=function(y,e){return !!(y.compareDocumentPosition(e)&16)}}else{d.contains=function(){return false}}}d.isXML=function(e){var y=(e?e.ownerDocument||e:0).documentElement;return y?y.nodeName!=="HTML":false};var s=function(z,e,D){var C,E=[],B="",F=e.nodeType?[e]:e;while((C=k.match.PSEUDO.exec(z))){B+=C[0];z=z.replace(k.match.PSEUDO,"")}z=k.relative[z]?z+"*":z;for(var A=0,y=F.length;A<y;A++){d(z,F[A],E,D)}return d.filter(B,E)};window.tinymce.dom.Sizzle=d})();(function(a){a.dom.Element=function(f,d){var b=this,e,c;b.settings=d=d||{};b.id=f;b.dom=e=d.dom||a.DOM;if(!a.isIE){c=e.get(b.id)}a.each(("getPos,getRect,getParent,add,setStyle,getStyle,setStyles,setAttrib,setAttribs,getAttrib,addClass,removeClass,hasClass,getOuterHTML,setOuterHTML,remove,show,hide,isHidden,setHTML,get").split(/,/),function(g){b[g]=function(){var h=[f],j;for(j=0;j<arguments.length;j++){h.push(arguments[j])}h=e[g].apply(e,h);b.update(g);return h}});a.extend(b,{on:function(i,h,g){return a.dom.Event.add(b.id,i,h,g)},getXY:function(){return{x:parseInt(b.getStyle("left")),y:parseInt(b.getStyle("top"))}},getSize:function(){var g=e.get(b.id);return{w:parseInt(b.getStyle("width")||g.clientWidth),h:parseInt(b.getStyle("height")||g.clientHeight)}},moveTo:function(g,h){b.setStyles({left:g,top:h})},moveBy:function(g,i){var h=b.getXY();b.moveTo(h.x+g,h.y+i)},resizeTo:function(g,i){b.setStyles({width:g,height:i})},resizeBy:function(g,j){var i=b.getSize();b.resizeTo(i.w+g,i.h+j)},update:function(h){var g;if(a.isIE6&&d.blocker){h=h||"";if(h.indexOf("get")===0||h.indexOf("has")===0||h.indexOf("is")===0){return}if(h=="remove"){e.remove(b.blocker);return}if(!b.blocker){b.blocker=e.uniqueId();g=e.add(d.container||e.getRoot(),"iframe",{id:b.blocker,style:"position:absolute;",frameBorder:0,src:'javascript:""'});e.setStyle(g,"opacity",0)}else{g=e.get(b.blocker)}e.setStyles(g,{left:b.getStyle("left",1),top:b.getStyle("top",1),width:b.getStyle("width",1),height:b.getStyle("height",1),display:b.getStyle("display",1),zIndex:parseInt(b.getStyle("zIndex",1)||0)-1})}}})}})(tinymce);(function(d){function f(g){return g.replace(/[\n\r]+/g,"")}var c=d.is,b=d.isIE,e=d.each,a=d.dom.TreeWalker;d.create("tinymce.dom.Selection",{Selection:function(k,j,i,h){var g=this;g.dom=k;g.win=j;g.serializer=i;g.editor=h;e(["onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent"],function(l){g[l]=new d.util.Dispatcher(g)});if(!g.win.getSelection){g.tridentSel=new d.dom.TridentSelection(g)}if(d.isIE&&k.boxModel){this._fixIESelection()}d.addUnload(g.destroy,g)},setCursorLocation:function(i,j){var g=this;var h=g.dom.createRng();h.setStart(i,j);h.setEnd(i,j);g.setRng(h);g.collapse(false)},getContent:function(h){var g=this,i=g.getRng(),m=g.dom.create("body"),k=g.getSel(),j,l,o;h=h||{};j=l="";h.get=true;h.format=h.format||"html";h.forced_root_block="";g.onBeforeGetContent.dispatch(g,h);if(h.format=="text"){return g.isCollapsed()?"":(i.text||(k.toString?k.toString():""))}if(i.cloneContents){o=i.cloneContents();if(o){m.appendChild(o)}}else{if(c(i.item)||c(i.htmlText)){m.innerHTML="<br>"+(i.item?i.item(0).outerHTML:i.htmlText);m.removeChild(m.firstChild)}else{m.innerHTML=i.toString()}}if(/^\s/.test(m.innerHTML)){j=" "}if(/\s+$/.test(m.innerHTML)){l=" "}h.getInner=true;h.content=g.isCollapsed()?"":j+g.serializer.serialize(m,h)+l;g.onGetContent.dispatch(g,h);return h.content},setContent:function(h,j){var o=this,g=o.getRng(),k,l=o.win.document,n,m;j=j||{format:"html"};j.set=true;h=j.content=h;if(!j.no_events){o.onBeforeSetContent.dispatch(o,j)}h=j.content;if(g.insertNode){h+='<span id="__caret">_</span>';if(g.startContainer==l&&g.endContainer==l){l.body.innerHTML=h}else{g.deleteContents();if(l.body.childNodes.length===0){l.body.innerHTML=h}else{if(g.createContextualFragment){g.insertNode(g.createContextualFragment(h))}else{n=l.createDocumentFragment();m=l.createElement("div");n.appendChild(m);m.outerHTML=h;g.insertNode(n)}}}k=o.dom.get("__caret");g=l.createRange();g.setStartBefore(k);g.setEndBefore(k);o.setRng(g);o.dom.remove("__caret");try{o.setRng(g)}catch(i){}}else{if(g.item){l.execCommand("Delete",false,null);g=o.getRng()}if(/^\s+/.test(h)){g.pasteHTML('<span id="__mce_tmp">_</span>'+h);o.dom.remove("__mce_tmp")}else{g.pasteHTML(h)}}if(!j.no_events){o.onSetContent.dispatch(o,j)}},getStart:function(){var i=this,h=i.getRng(),j,g,l,k;if(h.duplicate||h.item){if(h.item){return h.item(0)}l=h.duplicate();l.collapse(1);j=l.parentElement();if(j.ownerDocument!==i.dom.doc){j=i.dom.getRoot()}g=k=h.parentElement();while(k=k.parentNode){if(k==j){j=g;break}}return j}else{j=h.startContainer;if(j.nodeType==1&&j.hasChildNodes()){j=j.childNodes[Math.min(j.childNodes.length-1,h.startOffset)]}if(j&&j.nodeType==3){return j.parentNode}return j}},getEnd:function(){var h=this,g=h.getRng(),j,i;if(g.duplicate||g.item){if(g.item){return g.item(0)}g=g.duplicate();g.collapse(0);j=g.parentElement();if(j.ownerDocument!==h.dom.doc){j=h.dom.getRoot()}if(j&&j.nodeName=="BODY"){return j.lastChild||j}return j}else{j=g.endContainer;i=g.endOffset;if(j.nodeType==1&&j.hasChildNodes()){j=j.childNodes[i>0?i-1:i]}if(j&&j.nodeType==3){return j.parentNode}return j}},getBookmark:function(s,v){var y=this,n=y.dom,h,k,j,o,i,p,q,m="\uFEFF",x;function g(z,A){var t=0;e(n.select(z),function(C,B){if(C==A){t=B}});return t}function u(t){function z(E){var A,D,C,B=E?"start":"end";A=t[B+"Container"];D=t[B+"Offset"];if(A.nodeType==1&&A.nodeName=="TR"){C=A.childNodes;A=C[Math.min(E?D:D-1,C.length-1)];if(A){D=E?0:A.childNodes.length;t["set"+(E?"Start":"End")](A,D)}}}z(true);z();return t}function l(){var z=y.getRng(true),t=n.getRoot(),A={};function B(E,J){var D=E[J?"startContainer":"endContainer"],I=E[J?"startOffset":"endOffset"],C=[],F,H,G=0;if(D.nodeType==3){if(v){for(F=D.previousSibling;F&&F.nodeType==3;F=F.previousSibling){I+=F.nodeValue.length}}C.push(I)}else{H=D.childNodes;if(I>=H.length&&H.length){G=1;I=Math.max(0,H.length-1)}C.push(y.dom.nodeIndex(H[I],v)+G)}for(;D&&D!=t;D=D.parentNode){C.push(y.dom.nodeIndex(D,v))}return C}A.start=B(z,true);if(!y.isCollapsed()){A.end=B(z)}return A}if(s==2){if(y.tridentSel){return y.tridentSel.getBookmark(s)}return l()}if(s){return{rng:y.getRng()}}h=y.getRng();j=n.uniqueId();o=tinyMCE.activeEditor.selection.isCollapsed();x="overflow:hidden;line-height:0px";if(h.duplicate||h.item){if(!h.item){k=h.duplicate();try{h.collapse();h.pasteHTML('<span data-mce-type="bookmark" id="'+j+'_start" style="'+x+'">'+m+"</span>");if(!o){k.collapse(false);h.moveToElementText(k.parentElement());if(h.compareEndPoints("StartToEnd",k)===0){k.move("character",-1)}k.pasteHTML('<span data-mce-type="bookmark" id="'+j+'_end" style="'+x+'">'+m+"</span>")}}catch(r){return null}}else{p=h.item(0);i=p.nodeName;return{name:i,index:g(i,p)}}}else{p=y.getNode();i=p.nodeName;if(i=="IMG"){return{name:i,index:g(i,p)}}k=u(h.cloneRange());if(!o){k.collapse(false);k.insertNode(n.create("span",{"data-mce-type":"bookmark",id:j+"_end",style:x},m))}h=u(h);h.collapse(true);h.insertNode(n.create("span",{"data-mce-type":"bookmark",id:j+"_start",style:x},m))}y.moveToBookmark({id:j,keep:1});return{id:j}},moveToBookmark:function(o){var s=this,m=s.dom,j,i,g,r,k,u,p,q;function h(A){var t=o[A?"start":"end"],x,y,z,v;if(t){z=t[0];for(y=r,x=t.length-1;x>=1;x--){v=y.childNodes;if(t[x]>v.length-1){return}y=v[t[x]]}if(y.nodeType===3){z=Math.min(t[0],y.nodeValue.length)}if(y.nodeType===1){z=Math.min(t[0],y.childNodes.length)}if(A){g.setStart(y,z)}else{g.setEnd(y,z)}}return true}function l(B){var v=m.get(o.id+"_"+B),A,t,y,z,x=o.keep;if(v){A=v.parentNode;if(B=="start"){if(!x){t=m.nodeIndex(v)}else{A=v.firstChild;t=1}k=u=A;p=q=t}else{if(!x){t=m.nodeIndex(v)}else{A=v.firstChild;t=1}u=A;q=t}if(!x){z=v.previousSibling;y=v.nextSibling;e(d.grep(v.childNodes),function(C){if(C.nodeType==3){C.nodeValue=C.nodeValue.replace(/\uFEFF/g,"")}});while(v=m.get(o.id+"_"+B)){m.remove(v,1)}if(z&&y&&z.nodeType==y.nodeType&&z.nodeType==3&&!d.isOpera){t=z.nodeValue.length;z.appendData(y.nodeValue);m.remove(y);if(B=="start"){k=u=z;p=q=t}else{u=z;q=t}}}}}function n(t){if(m.isBlock(t)&&!t.innerHTML&&!b){t.innerHTML='<br data-mce-bogus="1" />'}return t}if(o){if(o.start){g=m.createRng();r=m.getRoot();if(s.tridentSel){return s.tridentSel.moveToBookmark(o)}if(h(true)&&h()){s.setRng(g)}}else{if(o.id){l("start");l("end");if(k){g=m.createRng();g.setStart(n(k),p);g.setEnd(n(u),q);s.setRng(g)}}else{if(o.name){s.select(m.select(o.name)[o.index])}else{if(o.rng){s.setRng(o.rng)}}}}}},select:function(l,k){var j=this,m=j.dom,h=m.createRng(),g;function i(n,p){var o=new a(n,n);do{if(n.nodeType==3&&d.trim(n.nodeValue).length!==0){if(p){h.setStart(n,0)}else{h.setEnd(n,n.nodeValue.length)}return}if(n.nodeName=="BR"){if(p){h.setStartBefore(n)}else{h.setEndBefore(n)}return}}while(n=(p?o.next():o.prev()))}if(l){g=m.nodeIndex(l);h.setStart(l.parentNode,g);h.setEnd(l.parentNode,g+1);if(k){i(l,1);i(l)}j.setRng(h)}return l},isCollapsed:function(){var g=this,i=g.getRng(),h=g.getSel();if(!i||i.item){return false}if(i.compareEndPoints){return i.compareEndPoints("StartToEnd",i)===0}return !h||i.collapsed},collapse:function(g){var i=this,h=i.getRng(),j;if(h.item){j=h.item(0);h=i.win.document.body.createTextRange();h.moveToElementText(j)}h.collapse(!!g);i.setRng(h)},getSel:function(){var h=this,g=this.win;return g.getSelection?g.getSelection():g.document.selection},getRng:function(m){var h=this,j,g,l,k=h.win.document;if(m&&h.tridentSel){return h.tridentSel.getRangeAt(0)}try{if(j=h.getSel()){g=j.rangeCount>0?j.getRangeAt(0):(j.createRange?j.createRange():k.createRange())}}catch(i){}if(d.isIE&&g&&g.setStart&&k.selection.createRange().item){l=k.selection.createRange().item(0);g=k.createRange();g.setStartBefore(l);g.setEndAfter(l)}if(!g){g=k.createRange?k.createRange():k.body.createTextRange()}if(g.setStart&&g.startContainer.nodeType===9&&g.collapsed){l=h.dom.getRoot();g.setStart(l,0);g.setEnd(l,0)}if(h.selectedRange&&h.explicitRange){if(g.compareBoundaryPoints(g.START_TO_START,h.selectedRange)===0&&g.compareBoundaryPoints(g.END_TO_END,h.selectedRange)===0){g=h.explicitRange}else{h.selectedRange=null;h.explicitRange=null}}return g},setRng:function(k,g){var j,i=this;if(!i.tridentSel){j=i.getSel();if(j){i.explicitRange=k;try{j.removeAllRanges()}catch(h){}j.addRange(k);if(g===false&&j.extend){j.collapse(k.endContainer,k.endOffset);j.extend(k.startContainer,k.startOffset)}i.selectedRange=j.rangeCount>0?j.getRangeAt(0):null}}else{if(k.cloneRange){try{i.tridentSel.addRange(k);return}catch(h){}}try{k.select()}catch(h){}}},setNode:function(h){var g=this;g.setContent(g.dom.getOuterHTML(h));return h},getNode:function(){var i=this,h=i.getRng(),j=i.getSel(),m,l=h.startContainer,g=h.endContainer;function k(q,o){var p=q;while(q&&q.nodeType===3&&q.length===0){q=o?q.nextSibling:q.previousSibling}return q||p}if(!h){return i.dom.getRoot()}if(h.setStart){m=h.commonAncestorContainer;if(!h.collapsed){if(h.startContainer==h.endContainer){if(h.endOffset-h.startOffset<2){if(h.startContainer.hasChildNodes()){m=h.startContainer.childNodes[h.startOffset]}}}if(l.nodeType===3&&g.nodeType===3){if(l.length===h.startOffset){l=k(l.nextSibling,true)}else{l=l.parentNode}if(h.endOffset===0){g=k(g.previousSibling,false)}else{g=g.parentNode}if(l&&l===g){return l}}}if(m&&m.nodeType==3){return m.parentNode}return m}return h.item?h.item(0):h.parentElement()},getSelectedBlocks:function(p,h){var o=this,k=o.dom,m,l,i,j=[];m=k.getParent(p||o.getStart(),k.isBlock);l=k.getParent(h||o.getEnd(),k.isBlock);if(m){j.push(m)}if(m&&l&&m!=l){i=m;var g=new a(m,k.getRoot());while((i=g.next())&&i!=l){if(k.isBlock(i)){j.push(i)}}}if(l&&m!=l){j.push(l)}return j},isForward:function(){var i=this.dom,g=this.getSel(),j,h;if(!g||g.anchorNode==null||g.focusNode==null){return true}j=i.createRng();j.setStart(g.anchorNode,g.anchorOffset);j.collapse(true);h=i.createRng();h.setStart(g.focusNode,g.focusOffset);h.collapse(true);return j.compareBoundaryPoints(j.START_TO_START,h)<=0},normalize:function(){var h=this,g,m,l,j,i;function k(p){var o,r,n,s=h.dom,u=s.getRoot(),q,t,v;function y(z,A){var B=new a(z,s.getParent(z.parentNode,s.isBlock)||u);while(z=B[A?"prev":"next"]()){if(z.nodeName==="BR"){return true}}}function x(B,z){var C,A;z=z||o;C=new a(z,s.getParent(z.parentNode,s.isBlock)||u);while(q=C[B?"prev":"next"]()){if(q.nodeType===3&&q.nodeValue.length>0){o=q;r=B?q.nodeValue.length:0;m=true;return}if(s.isBlock(q)||t[q.nodeName.toLowerCase()]){return}A=q}if(l&&A){o=A;m=true;r=0}}o=g[(p?"start":"end")+"Container"];r=g[(p?"start":"end")+"Offset"];t=s.schema.getNonEmptyElements();if(o.nodeType===9){o=s.getRoot();r=0}if(o===u){if(p){q=o.childNodes[r>0?r-1:0];if(q){v=q.nodeName.toLowerCase();if(t[q.nodeName]||q.nodeName=="TABLE"){return}}}if(o.hasChildNodes()){o=o.childNodes[Math.min(!p&&r>0?r-1:r,o.childNodes.length-1)];r=0;if(o.hasChildNodes()&&!/TABLE/.test(o.nodeName)){q=o;n=new a(o,u);do{if(q.nodeType===3&&q.nodeValue.length>0){r=p?0:q.nodeValue.length;o=q;m=true;break}if(t[q.nodeName.toLowerCase()]){r=s.nodeIndex(q);o=q.parentNode;if(q.nodeName=="IMG"&&!p){r++}m=true;break}}while(q=(p?n.next():n.prev()))}}}if(l){if(o.nodeType===3&&r===0){x(true)}if(o.nodeType===1){q=o.childNodes[r];if(q&&q.nodeName==="BR"&&!y(q)&&!y(q,true)){x(true,o.childNodes[r])}}}if(p&&!l&&o.nodeType===3&&r===o.nodeValue.length){x(false)}if(m){g["set"+(p?"Start":"End")](o,r)}}if(d.isIE){return}g=h.getRng();l=g.collapsed;k(true);if(!l){k()}if(m){if(l){g.collapse(true)}h.setRng(g,h.isForward())}},selectorChanged:function(g,j){var h=this,i;if(!h.selectorChangedData){h.selectorChangedData={};i={};h.editor.onNodeChange.addToTop(function(l,k,o){var p=h.dom,m=p.getParents(o,null,p.getRoot()),n={};e(h.selectorChangedData,function(r,q){e(m,function(s){if(p.is(s,q)){if(!i[q]){e(r,function(t){t(true,{node:s,selector:q,parents:m})});i[q]=r}n[q]=r;return false}})});e(i,function(r,q){if(!n[q]){delete i[q];e(r,function(s){s(false,{node:o,selector:q,parents:m})})}})})}if(!h.selectorChangedData[g]){h.selectorChangedData[g]=[]}h.selectorChangedData[g].push(j);return h},destroy:function(h){var g=this;g.win=null;if(!h){d.removeUnload(g.destroy)}},_fixIESelection:function(){var h=this.dom,n=h.doc,i=n.body,k,o,g;function j(p,s){var q=i.createTextRange();try{q.moveToPoint(p,s)}catch(r){q=null}return q}function m(q){var p;if(q.button){p=j(q.x,q.y);if(p){if(p.compareEndPoints("StartToStart",o)>0){p.setEndPoint("StartToStart",o)}else{p.setEndPoint("EndToEnd",o)}p.select()}}else{l()}}function l(){var p=n.selection.createRange();if(o&&!p.item&&p.compareEndPoints("StartToEnd",p)===0){o.select()}h.unbind(n,"mouseup",l);h.unbind(n,"mousemove",m);o=k=0}n.documentElement.unselectable=true;h.bind(n,["mousedown","contextmenu"],function(p){if(p.target.nodeName==="HTML"){if(k){l()}g=n.documentElement;if(g.scrollHeight>g.clientHeight){return}k=1;o=j(p.x,p.y);if(o){h.bind(n,"mouseup",l);h.bind(n,"mousemove",m);h.win.focus();o.select()}}})}})})(tinymce);(function(a){a.dom.Serializer=function(e,i,f){var h,b,d=a.isIE,g=a.each,c;if(!e.apply_source_formatting){e.indent=false}i=i||a.DOM;f=f||new a.html.Schema(e);e.entity_encoding=e.entity_encoding||"named";e.remove_trailing_brs="remove_trailing_brs" in e?e.remove_trailing_brs:true;h=new a.util.Dispatcher(self);b=new a.util.Dispatcher(self);c=new a.html.DomParser(e,f);c.addAttributeFilter("src,href,style",function(k,j){var o=k.length,l,q,n="data-mce-"+j,p=e.url_converter,r=e.url_converter_scope,m;while(o--){l=k[o];q=l.attributes.map[n];if(q!==m){l.attr(j,q.length>0?q:null);l.attr(n,null)}else{q=l.attributes.map[j];if(j==="style"){q=i.serializeStyle(i.parseStyle(q),l.name)}else{if(p){q=p.call(r,q,j,l.name)}}l.attr(j,q.length>0?q:null)}}});c.addAttributeFilter("class",function(j,k){var l=j.length,m,n;while(l--){m=j[l];n=m.attr("class").replace(/(?:^|\s)mce(Item\w+|Selected)(?!\S)/g,"");m.attr("class",n.length>0?n:null)}});c.addAttributeFilter("data-mce-type",function(j,l,k){var m=j.length,n;while(m--){n=j[m];if(n.attributes.map["data-mce-type"]==="bookmark"&&!k.cleanup){n.remove()}}});c.addAttributeFilter("data-mce-expando",function(j,l,k){var m=j.length;while(m--){j[m].attr(l,null)}});c.addNodeFilter("script,style",function(k,l){var m=k.length,n,o;function j(p){return p.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}while(m--){n=k[m];o=n.firstChild?n.firstChild.value:"";if(l==="script"){n.attr("type",(n.attr("type")||"text/javascript").replace(/^mce\-/,""));if(o.length>0){n.firstChild.value="// <![CDATA[\n"+j(o)+"\n// ]]>"}}else{if(o.length>0){n.firstChild.value="<!--\n"+j(o)+"\n-->"}}}});c.addNodeFilter("#comment",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.value.indexOf("[CDATA[")===0){m.name="#cdata";m.type=4;m.value=m.value.replace(/^\[CDATA\[|\]\]$/g,"")}else{if(m.value.indexOf("mce:protected ")===0){m.name="#text";m.type=3;m.raw=true;m.value=unescape(m.value).substr(14)}}}});c.addNodeFilter("xml:namespace,input",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.type===7){m.remove()}else{if(m.type===1){if(k==="input"&&!("type" in m.attributes.map)){m.attr("type","text")}}}}});if(e.fix_list_elements){c.addNodeFilter("ul,ol",function(k,l){var m=k.length,n,j;while(m--){n=k[m];j=n.parent;if(j.name==="ul"||j.name==="ol"){if(n.prev&&n.prev.name==="li"){n.prev.append(n)}}}})}c.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style",function(j,k){var l=j.length;while(l--){j[l].attr(k,null)}});return{schema:f,addNodeFilter:c.addNodeFilter,addAttributeFilter:c.addAttributeFilter,onPreProcess:h,onPostProcess:b,serialize:function(o,m){var l,p,k,j,n;if(d&&i.select("script,style,select,map").length>0){n=o.innerHTML;o=o.cloneNode(false);i.setHTML(o,n)}else{o=o.cloneNode(true)}l=o.ownerDocument.implementation;if(l.createHTMLDocument){p=l.createHTMLDocument("");g(o.nodeName=="BODY"?o.childNodes:[o],function(q){p.body.appendChild(p.importNode(q,true))});if(o.nodeName!="BODY"){o=p.body.firstChild}else{o=p.body}k=i.doc;i.doc=p}m=m||{};m.format=m.format||"html";if(!m.no_events){m.node=o;h.dispatch(self,m)}j=new a.html.Serializer(e,f);m.content=j.serialize(c.parse(a.trim(m.getInner?o.innerHTML:i.getOuterHTML(o)),m));if(!m.cleanup){m.content=m.content.replace(/\uFEFF|\u200B/g,"")}if(!m.no_events){b.dispatch(self,m)}if(k){i.doc=k}m.node=null;return m.content},addRules:function(j){f.addValidElements(j)},setRules:function(j){f.setValidElements(j)}}}})(tinymce);(function(a){a.dom.ScriptLoader=function(h){var c=0,k=1,i=2,l={},j=[],e={},d=[],g=0,f;function b(m,v){var x=this,q=a.DOM,s,o,r,n;function p(){q.remove(n);if(s){s.onreadystatechange=s.onload=s=null}v()}function u(){if(typeof(console)!=="undefined"&&console.log){console.log("Failed to load: "+m)}}n=q.uniqueId();if(a.isIE6){o=new a.util.URI(m);r=location;if(o.host==r.hostname&&o.port==r.port&&(o.protocol+":")==r.protocol&&o.protocol.toLowerCase()!="file"){a.util.XHR.send({url:a._addVer(o.getURI()),success:function(y){var t=q.create("script",{type:"text/javascript"});t.text=y;document.getElementsByTagName("head")[0].appendChild(t);q.remove(t);p()},error:u});return}}s=document.createElement("script");s.id=n;s.type="text/javascript";s.src=a._addVer(m);if(!a.isIE){s.onload=p}s.onerror=u;if(!a.isOpera){s.onreadystatechange=function(){var t=s.readyState;if(t=="complete"||t=="loaded"){p()}}}(document.getElementsByTagName("head")[0]||document.body).appendChild(s)}this.isDone=function(m){return l[m]==i};this.markDone=function(m){l[m]=i};this.add=this.load=function(m,q,n){var o,p=l[m];if(p==f){j.push(m);l[m]=c}if(q){if(!e[m]){e[m]=[]}e[m].push({func:q,scope:n||this})}};this.loadQueue=function(n,m){this.loadScripts(j,n,m)};this.loadScripts=function(m,q,p){var o;function n(r){a.each(e[r],function(s){s.func.call(s.scope)});e[r]=f}d.push({func:q,scope:p||this});o=function(){var r=a.grep(m);m.length=0;a.each(r,function(s){if(l[s]==i){n(s);return}if(l[s]!=k){l[s]=k;g++;b(s,function(){l[s]=i;g--;n(s);o()})}});if(!g){a.each(d,function(s){s.func.call(s.scope)});d.length=0}};o()}};a.ScriptLoader=new a.dom.ScriptLoader()})(tinymce);(function(a){a.dom.RangeUtils=function(c){var b="\uFEFF";this.walk=function(d,s){var i=d.startContainer,l=d.startOffset,t=d.endContainer,m=d.endOffset,j,g,o,h,r,q,e;e=c.select("td.mceSelected,th.mceSelected");if(e.length>0){a.each(e,function(u){s([u])});return}function f(u){var v;v=u[0];if(v.nodeType===3&&v===i&&l>=v.nodeValue.length){u.splice(0,1)}v=u[u.length-1];if(m===0&&u.length>0&&v===t&&v.nodeType===3){u.splice(u.length-1,1)}return u}function p(x,v,u){var y=[];for(;x&&x!=u;x=x[v]){y.push(x)}return y}function n(v,u){do{if(v.parentNode==u){return v}v=v.parentNode}while(v)}function k(x,v,y){var u=y?"nextSibling":"previousSibling";for(h=x,r=h.parentNode;h&&h!=v;h=r){r=h.parentNode;q=p(h==x?h:h[u],u);if(q.length){if(!y){q.reverse()}s(f(q))}}}if(i.nodeType==1&&i.hasChildNodes()){i=i.childNodes[l]}if(t.nodeType==1&&t.hasChildNodes()){t=t.childNodes[Math.min(m-1,t.childNodes.length-1)]}if(i==t){return s(f([i]))}j=c.findCommonAncestor(i,t);for(h=i;h;h=h.parentNode){if(h===t){return k(i,j,true)}if(h===j){break}}for(h=t;h;h=h.parentNode){if(h===i){return k(t,j)}if(h===j){break}}g=n(i,j)||i;o=n(t,j)||t;k(i,g,true);q=p(g==i?g:g.nextSibling,"nextSibling",o==t?o.nextSibling:o);if(q.length){s(f(q))}k(t,o)};this.split=function(e){var h=e.startContainer,d=e.startOffset,i=e.endContainer,g=e.endOffset;function f(j,k){return j.splitText(k)}if(h==i&&h.nodeType==3){if(d>0&&d<h.nodeValue.length){i=f(h,d);h=i.previousSibling;if(g>d){g=g-d;h=i=f(i,g).previousSibling;g=i.nodeValue.length;d=0}else{g=0}}}else{if(h.nodeType==3&&d>0&&d<h.nodeValue.length){h=f(h,d);d=0}if(i.nodeType==3&&g>0&&g<i.nodeValue.length){i=f(i,g).previousSibling;g=i.nodeValue.length}}return{startContainer:h,startOffset:d,endContainer:i,endOffset:g}}};a.dom.RangeUtils.compareRanges=function(c,b){if(c&&b){if(c.item||c.duplicate){if(c.item&&b.item&&c.item(0)===b.item(0)){return true}if(c.isEqual&&b.isEqual&&b.isEqual(c)){return true}}else{return c.startContainer==b.startContainer&&c.startOffset==b.startOffset}}return false}})(tinymce);(function(b){var a=b.dom.Event,c=b.each;b.create("tinymce.ui.KeyboardNavigation",{KeyboardNavigation:function(e,f){var q=this,n=e.root,m=e.items,o=e.enableUpDown,i=e.enableLeftRight||!e.enableUpDown,l=e.excludeFromTabOrder,k,h,p,d,g;f=f||b.DOM;k=function(r){g=r.target.id};h=function(r){f.setAttrib(r.target.id,"tabindex","-1")};d=function(r){var s=f.get(g);f.setAttrib(s,"tabindex","0");s.focus()};q.focus=function(){f.get(g).focus()};q.destroy=function(){c(m,function(s){var t=f.get(s.id);f.unbind(t,"focus",k);f.unbind(t,"blur",h)});var r=f.get(n);f.unbind(r,"focus",d);f.unbind(r,"keydown",p);m=f=n=q.focus=k=h=p=d=null;q.destroy=function(){}};q.moveFocus=function(v,s){var r=-1,u=q.controls,t;if(!g){return}c(m,function(y,x){if(y.id===g){r=x;return false}});r+=v;if(r<0){r=m.length-1}else{if(r>=m.length){r=0}}t=m[r];f.setAttrib(g,"tabindex","-1");f.setAttrib(t.id,"tabindex","0");f.get(t.id).focus();if(e.actOnFocus){e.onAction(t.id)}if(s){a.cancel(s)}};p=function(z){var v=37,u=39,y=38,A=40,r=27,t=14,s=13,x=32;switch(z.keyCode){case v:if(i){q.moveFocus(-1)}break;case u:if(i){q.moveFocus(1)}break;case y:if(o){q.moveFocus(-1)}break;case A:if(o){q.moveFocus(1)}break;case r:if(e.onCancel){e.onCancel();a.cancel(z)}break;case t:case s:case x:if(e.onAction){e.onAction(g);a.cancel(z)}break}};c(m,function(t,r){var s,u;if(!t.id){t.id=f.uniqueId("_mce_item_")}u=f.get(t.id);if(l){f.bind(u,"blur",h);s="-1"}else{s=(r===0?"0":"-1")}u.setAttribute("tabindex",s);f.bind(u,"focus",k)});if(m[0]){g=m[0].id}f.setAttrib(n,"tabindex","-1");var j=f.get(n);f.bind(j,"focus",d);f.bind(j,"keydown",p)}})})(tinymce);(function(c){var b=c.DOM,a=c.is;c.create("tinymce.ui.Control",{Control:function(f,e,d){this.id=f;this.settings=e=e||{};this.rendered=false;this.onRender=new c.util.Dispatcher(this);this.classPrefix="";this.scope=e.scope||this;this.disabled=0;this.active=0;this.editor=d},setAriaProperty:function(f,e){var d=b.get(this.id+"_aria")||b.get(this.id);if(d){b.setAttrib(d,"aria-"+f,!!e)}},focus:function(){b.get(this.id).focus()},setDisabled:function(d){if(d!=this.disabled){this.setAriaProperty("disabled",d);this.setState("Disabled",d);this.setState("Enabled",!d);this.disabled=d}},isDisabled:function(){return this.disabled},setActive:function(d){if(d!=this.active){this.setState("Active",d);this.active=d;this.setAriaProperty("pressed",d)}},isActive:function(){return this.active},setState:function(f,d){var e=b.get(this.id);f=this.classPrefix+f;if(d){b.addClass(e,f)}else{b.removeClass(e,f)}},isRendered:function(){return this.rendered},renderHTML:function(){},renderTo:function(d){b.setHTML(d,this.renderHTML())},postRender:function(){var e=this,d;if(a(e.disabled)){d=e.disabled;e.disabled=-1;e.setDisabled(d)}if(a(e.active)){d=e.active;e.active=-1;e.setActive(d)}},remove:function(){b.remove(this.id);this.destroy()},destroy:function(){c.dom.Event.clear(this.id)}})})(tinymce);tinymce.create("tinymce.ui.Container:tinymce.ui.Control",{Container:function(c,b,a){this.parent(c,b,a);this.controls=[];this.lookup={}},add:function(a){this.lookup[a.id]=a;this.controls.push(a);return a},get:function(a){return this.lookup[a]}});tinymce.create("tinymce.ui.Separator:tinymce.ui.Control",{Separator:function(b,a){this.parent(b,a);this.classPrefix="mceSeparator";this.setDisabled(true)},renderHTML:function(){return tinymce.DOM.createHTML("span",{"class":this.classPrefix,role:"separator","aria-orientation":"vertical",tabindex:"-1"})}});(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.MenuItem:tinymce.ui.Control",{MenuItem:function(g,f){this.parent(g,f);this.classPrefix="mceMenuItem"},setSelected:function(f){this.setState("Selected",f);this.setAriaProperty("checked",!!f);this.selected=f},isSelected:function(){return this.selected},postRender:function(){var f=this;f.parent();if(c(f.selected)){f.setSelected(f.selected)}}})})(tinymce);(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.Menu:tinymce.ui.MenuItem",{Menu:function(h,g){var f=this;f.parent(h,g);f.items={};f.collapsed=false;f.menuCount=0;f.onAddItem=new d.util.Dispatcher(this)},expand:function(g){var f=this;if(g){a(f,function(h){if(h.expand){h.expand()}},"items",f)}f.collapsed=false},collapse:function(g){var f=this;if(g){a(f,function(h){if(h.collapse){h.collapse()}},"items",f)}f.collapsed=true},isCollapsed:function(){return this.collapsed},add:function(f){if(!f.settings){f=new d.ui.MenuItem(f.id||b.uniqueId(),f)}this.onAddItem.dispatch(this,f);return this.items[f.id]=f},addSeparator:function(){return this.add({separator:true})},addMenu:function(f){if(!f.collapse){f=this.createMenu(f)}this.menuCount++;return this.add(f)},hasMenus:function(){return this.menuCount!==0},remove:function(f){delete this.items[f.id]},removeAll:function(){var f=this;a(f,function(g){if(g.removeAll){g.removeAll()}else{g.remove()}g.destroy()},"items",f);f.items={}},createMenu:function(g){var f=new d.ui.Menu(g.id||b.uniqueId(),g);f.onAddItem.add(this.onAddItem.dispatch,this.onAddItem);return f}})})(tinymce);(function(e){var d=e.is,c=e.DOM,f=e.each,a=e.dom.Event,b=e.dom.Element;e.create("tinymce.ui.DropMenu:tinymce.ui.Menu",{DropMenu:function(h,g){g=g||{};g.container=g.container||c.doc.body;g.offset_x=g.offset_x||0;g.offset_y=g.offset_y||0;g.vp_offset_x=g.vp_offset_x||0;g.vp_offset_y=g.vp_offset_y||0;if(d(g.icons)&&!g.icons){g["class"]+=" mceNoIcons"}this.parent(h,g);this.onShowMenu=new e.util.Dispatcher(this);this.onHideMenu=new e.util.Dispatcher(this);this.classPrefix="mceMenu"},createMenu:function(j){var h=this,i=h.settings,g;j.container=j.container||i.container;j.parent=h;j.constrain=j.constrain||i.constrain;j["class"]=j["class"]||i["class"];j.vp_offset_x=j.vp_offset_x||i.vp_offset_x;j.vp_offset_y=j.vp_offset_y||i.vp_offset_y;j.keyboard_focus=i.keyboard_focus;g=new e.ui.DropMenu(j.id||c.uniqueId(),j);g.onAddItem.add(h.onAddItem.dispatch,h.onAddItem);return g},focus:function(){var g=this;if(g.keyboardNav){g.keyboardNav.focus()}},update:function(){var i=this,j=i.settings,g=c.get("menu_"+i.id+"_tbl"),l=c.get("menu_"+i.id+"_co"),h,k;h=j.max_width?Math.min(g.offsetWidth,j.max_width):g.offsetWidth;k=j.max_height?Math.min(g.offsetHeight,j.max_height):g.offsetHeight;if(!c.boxModel){i.element.setStyles({width:h+2,height:k+2})}else{i.element.setStyles({width:h,height:k})}if(j.max_width){c.setStyle(l,"width",h)}if(j.max_height){c.setStyle(l,"height",k);if(g.clientHeight<j.max_height){c.setStyle(l,"overflow","hidden")}}},showMenu:function(p,n,r){var z=this,A=z.settings,o,g=c.getViewPort(),u,l,v,q,i=2,k,j,m=z.classPrefix;z.collapse(1);if(z.isMenuVisible){return}if(!z.rendered){o=c.add(z.settings.container,z.renderNode());f(z.items,function(h){h.postRender()});z.element=new b("menu_"+z.id,{blocker:1,container:A.container})}else{o=c.get("menu_"+z.id)}if(!e.isOpera){c.setStyles(o,{left:-65535,top:-65535})}c.show(o);z.update();p+=A.offset_x||0;n+=A.offset_y||0;g.w-=4;g.h-=4;if(A.constrain){u=o.clientWidth-i;l=o.clientHeight-i;v=g.x+g.w;q=g.y+g.h;if((p+A.vp_offset_x+u)>v){p=r?r-u:Math.max(0,(v-A.vp_offset_x)-u)}if((n+A.vp_offset_y+l)>q){n=Math.max(0,(q-A.vp_offset_y)-l)}}c.setStyles(o,{left:p,top:n});z.element.update();z.isMenuVisible=1;z.mouseClickFunc=a.add(o,"click",function(s){var h;s=s.target;if(s&&(s=c.getParent(s,"tr"))&&!c.hasClass(s,m+"ItemSub")){h=z.items[s.id];if(h.isDisabled()){return}k=z;while(k){if(k.hideMenu){k.hideMenu()}k=k.settings.parent}if(h.settings.onclick){h.settings.onclick(s)}return false}});if(z.hasMenus()){z.mouseOverFunc=a.add(o,"mouseover",function(x){var h,t,s;x=x.target;if(x&&(x=c.getParent(x,"tr"))){h=z.items[x.id];if(z.lastMenu){z.lastMenu.collapse(1)}if(h.isDisabled()){return}if(x&&c.hasClass(x,m+"ItemSub")){t=c.getRect(x);h.showMenu((t.x+t.w-i),t.y-i,t.x);z.lastMenu=h;c.addClass(c.get(h.id).firstChild,m+"ItemActive")}}})}a.add(o,"keydown",z._keyHandler,z);z.onShowMenu.dispatch(z);if(A.keyboard_focus){z._setupKeyboardNav()}},hideMenu:function(j){var g=this,i=c.get("menu_"+g.id),h;if(!g.isMenuVisible){return}if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(i,"mouseover",g.mouseOverFunc);a.remove(i,"click",g.mouseClickFunc);a.remove(i,"keydown",g._keyHandler);c.hide(i);g.isMenuVisible=0;if(!j){g.collapse(1)}if(g.element){g.element.hide()}if(h=c.get(g.id)){c.removeClass(h.firstChild,g.classPrefix+"ItemActive")}g.onHideMenu.dispatch(g)},add:function(i){var g=this,h;i=g.parent(i);if(g.isRendered&&(h=c.get("menu_"+g.id))){g._add(c.select("tbody",h)[0],i)}return i},collapse:function(g){this.parent(g);this.hideMenu(1)},remove:function(g){c.remove(g.id);this.destroy();return this.parent(g)},destroy:function(){var g=this,h=c.get("menu_"+g.id);if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(h,"mouseover",g.mouseOverFunc);a.remove(c.select("a",h),"focus",g.mouseOverFunc);a.remove(h,"click",g.mouseClickFunc);a.remove(h,"keydown",g._keyHandler);if(g.element){g.element.remove()}c.remove(h)},renderNode:function(){var i=this,j=i.settings,l,h,k,g;g=c.create("div",{role:"listbox",id:"menu_"+i.id,"class":j["class"],style:"position:absolute;left:0;top:0;z-index:200000;outline:0"});if(i.settings.parent){c.setAttrib(g,"aria-parent","menu_"+i.settings.parent.id)}k=c.add(g,"div",{role:"presentation",id:"menu_"+i.id+"_co","class":i.classPrefix+(j["class"]?" "+j["class"]:"")});i.element=new b("menu_"+i.id,{blocker:1,container:j.container});if(j.menu_line){c.add(k,"span",{"class":i.classPrefix+"Line"})}l=c.add(k,"table",{role:"presentation",id:"menu_"+i.id+"_tbl",border:0,cellPadding:0,cellSpacing:0});h=c.add(l,"tbody");f(i.items,function(m){i._add(h,m)});i.rendered=true;return g},_setupKeyboardNav:function(){var i,h,g=this;i=c.get("menu_"+g.id);h=c.select("a[role=option]","menu_"+g.id);h.splice(0,0,i);g.keyboardNav=new e.ui.KeyboardNavigation({root:"menu_"+g.id,items:h,onCancel:function(){g.hideMenu()},enableUpDown:true});i.focus()},_keyHandler:function(g){var h=this,i;switch(g.keyCode){case 37:if(h.settings.parent){h.hideMenu();h.settings.parent.focus();a.cancel(g)}break;case 39:if(h.mouseOverFunc){h.mouseOverFunc(g)}break}},_add:function(j,h){var i,q=h.settings,p,l,k,m=this.classPrefix,g;if(q.separator){l=c.add(j,"tr",{id:h.id,"class":m+"ItemSeparator"});c.add(l,"td",{"class":m+"ItemSeparator"});if(i=l.previousSibling){c.addClass(i,"mceLast")}return}i=l=c.add(j,"tr",{id:h.id,"class":m+"Item "+m+"ItemEnabled"});i=k=c.add(i,q.titleItem?"th":"td");i=p=c.add(i,"a",{id:h.id+"_aria",role:q.titleItem?"presentation":"option",href:"javascript:;",onclick:"return false;",onmousedown:"return false;"});if(q.parent){c.setAttrib(p,"aria-haspopup","true");c.setAttrib(p,"aria-owns","menu_"+h.id)}c.addClass(k,q["class"]);g=c.add(i,"span",{"class":"mceIcon"+(q.icon?" mce_"+q.icon:"")});if(q.icon_src){c.add(g,"img",{src:q.icon_src})}i=c.add(i,q.element||"span",{"class":"mceText",title:h.settings.title},h.settings.title);if(h.settings.style){if(typeof h.settings.style=="function"){h.settings.style=h.settings.style()}c.setAttrib(i,"style",h.settings.style)}if(j.childNodes.length==1){c.addClass(l,"mceFirst")}if((i=l.previousSibling)&&c.hasClass(i,m+"ItemSeparator")){c.addClass(l,"mceFirst")}if(h.collapse){c.addClass(l,m+"ItemSub")}if(i=l.previousSibling){c.removeClass(i,"mceLast")}c.addClass(l,"mceLast")}})})(tinymce);(function(b){var a=b.DOM;b.create("tinymce.ui.Button:tinymce.ui.Control",{Button:function(e,d,c){this.parent(e,d,c);this.classPrefix="mceButton"},renderHTML:function(){var f=this.classPrefix,e=this.settings,d,c;c=a.encode(e.label||"");d='<a role="button" id="'+this.id+'" href="javascript:;" class="'+f+" "+f+"Enabled "+e["class"]+(c?" "+f+"Labeled":"")+'" onmousedown="return false;" onclick="return false;" aria-labelledby="'+this.id+'_voice" title="'+a.encode(e.title)+'">';if(e.image&&!(this.editor&&this.editor.forcedHighContrastMode)){d+='<span class="mceIcon '+e["class"]+'"><img class="mceIcon" src="'+e.image+'" alt="'+a.encode(e.title)+'" /></span>'+(c?'<span class="'+f+'Label">'+c+"</span>":"")}else{d+='<span class="mceIcon '+e["class"]+'"></span>'+(c?'<span class="'+f+'Label">'+c+"</span>":"")}d+='<span class="mceVoiceLabel mceIconOnly" style="display: none;" id="'+this.id+'_voice">'+e.title+"</span>";d+="</a>";return d},postRender:function(){var d=this,e=d.settings,c;if(b.isIE&&d.editor){b.dom.Event.add(d.id,"mousedown",function(f){var g=d.editor.selection.getNode().nodeName;c=g==="IMG"?d.editor.selection.getBookmark():null})}b.dom.Event.add(d.id,"click",function(f){if(!d.isDisabled()){if(b.isIE&&d.editor&&c!==null){d.editor.selection.moveToBookmark(c)}return e.onclick.call(e.scope,f)}});b.dom.Event.add(d.id,"keyup",function(f){if(!d.isDisabled()&&f.keyCode==b.VK.SPACEBAR){return e.onclick.call(e.scope,f)}})}})})(tinymce);(function(e){var d=e.DOM,b=e.dom.Event,f=e.each,a=e.util.Dispatcher,c;e.create("tinymce.ui.ListBox:tinymce.ui.Control",{ListBox:function(j,i,g){var h=this;h.parent(j,i,g);h.items=[];h.onChange=new a(h);h.onPostRender=new a(h);h.onAdd=new a(h);h.onRenderMenu=new e.util.Dispatcher(this);h.classPrefix="mceListBox";h.marked={}},select:function(h){var g=this,j,i;g.marked={};if(h==c){return g.selectByIndex(-1)}if(h&&typeof(h)=="function"){i=h}else{i=function(k){return k==h}}if(h!=g.selectedValue){f(g.items,function(l,k){if(i(l.value)){j=1;g.selectByIndex(k);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(g){var i=this,j,k,h;i.marked={};if(g!=i.selectedIndex){j=d.get(i.id+"_text");h=d.get(i.id+"_voiceDesc");k=i.items[g];if(k){i.selectedValue=k.value;i.selectedIndex=g;d.setHTML(j,d.encode(k.title));d.setHTML(h,i.settings.title+" - "+k.title);d.removeClass(j,"mceTitle");d.setAttrib(i.id,"aria-valuenow",k.title)}else{d.setHTML(j,d.encode(i.settings.title));d.setHTML(h,d.encode(i.settings.title));d.addClass(j,"mceTitle");i.selectedValue=i.selectedIndex=null;d.setAttrib(i.id,"aria-valuenow",i.settings.title)}j=0}},mark:function(g){this.marked[g]=true},add:function(j,g,i){var h=this;i=i||{};i=e.extend(i,{title:j,value:g});h.items.push(i);h.onAdd.dispatch(h,i)},getLength:function(){return this.items.length},renderHTML:function(){var j="",g=this,i=g.settings,k=g.classPrefix;j='<span role="listbox" aria-haspopup="true" aria-labelledby="'+g.id+'_voiceDesc" aria-describedby="'+g.id+'_voiceDesc"><table role="presentation" tabindex="0" id="'+g.id+'" cellpadding="0" cellspacing="0" class="'+k+" "+k+"Enabled"+(i["class"]?(" "+i["class"]):"")+'"><tbody><tr>';j+="<td>"+d.createHTML("span",{id:g.id+"_voiceDesc","class":"voiceLabel",style:"display:none;"},g.settings.title);j+=d.createHTML("a",{id:g.id+"_text",tabindex:-1,href:"javascript:;","class":"mceText",onclick:"return false;",onmousedown:"return false;"},d.encode(g.settings.title))+"</td>";j+="<td>"+d.createHTML("a",{id:g.id+"_open",tabindex:-1,href:"javascript:;","class":"mceOpen",onclick:"return false;",onmousedown:"return false;"},'<span><span style="display:none;" class="mceIconOnly" aria-hidden="true">\u25BC</span></span>')+"</td>";j+="</tr></tbody></table></span>";return j},showMenu:function(){var h=this,j,i=d.get(this.id),g;if(h.isDisabled()||h.items.length===0){return}if(h.menu&&h.menu.isMenuVisible){return h.hideMenu()}if(!h.isMenuRendered){h.renderMenu();h.isMenuRendered=true}j=d.getPos(i);g=h.menu;g.settings.offset_x=j.x;g.settings.offset_y=j.y;g.settings.keyboard_focus=!e.isOpera;f(h.items,function(k){if(g.items[k.id]){g.items[k.id].setSelected(0)}});f(h.items,function(k){if(g.items[k.id]&&h.marked[k.value]){g.items[k.id].setSelected(1)}if(k.value===h.selectedValue){g.items[k.id].setSelected(1)}});g.showMenu(0,i.clientHeight);b.add(d.doc,"mousedown",h.hideMenu,h);d.addClass(h.id,h.classPrefix+"Selected")},hideMenu:function(h){var g=this;if(g.menu&&g.menu.isMenuVisible){d.removeClass(g.id,g.classPrefix+"Selected");if(h&&h.type=="mousedown"&&(h.target.id==g.id+"_text"||h.target.id==g.id+"_open")){return}if(!h||!d.getParent(h.target,".mceMenu")){d.removeClass(g.id,g.classPrefix+"Selected");b.remove(d.doc,"mousedown",g.hideMenu,g);g.menu.hideMenu()}}},renderMenu:function(){var h=this,g;g=h.settings.control_manager.createDropMenu(h.id+"_menu",{menu_line:1,"class":h.classPrefix+"Menu mceNoIcons",max_width:250,max_height:150});g.onHideMenu.add(function(){h.hideMenu();h.focus()});g.add({title:h.settings.title,"class":"mceMenuItemTitle",onclick:function(){if(h.settings.onselect("")!==false){h.select("")}}});f(h.items,function(i){if(i.value===c){g.add({title:i.title,role:"option","class":"mceMenuItemTitle",onclick:function(){if(h.settings.onselect("")!==false){h.select("")}}})}else{i.id=d.uniqueId();i.role="option";i.onclick=function(){if(h.settings.onselect(i.value)!==false){h.select(i.value)}};g.add(i)}});h.onRenderMenu.dispatch(h,g);h.menu=g},postRender:function(){var g=this,h=g.classPrefix;b.add(g.id,"click",g.showMenu,g);b.add(g.id,"keydown",function(i){if(i.keyCode==32){g.showMenu(i);b.cancel(i)}});b.add(g.id,"focus",function(){if(!g._focused){g.keyDownHandler=b.add(g.id,"keydown",function(i){if(i.keyCode==40){g.showMenu();b.cancel(i)}});g.keyPressHandler=b.add(g.id,"keypress",function(j){var i;if(j.keyCode==13){i=g.selectedValue;g.selectedValue=null;b.cancel(j);g.settings.onselect(i)}})}g._focused=1});b.add(g.id,"blur",function(){b.remove(g.id,"keydown",g.keyDownHandler);b.remove(g.id,"keypress",g.keyPressHandler);g._focused=0});if(e.isIE6||!d.boxModel){b.add(g.id,"mouseover",function(){if(!d.hasClass(g.id,h+"Disabled")){d.addClass(g.id,h+"Hover")}});b.add(g.id,"mouseout",function(){if(!d.hasClass(g.id,h+"Disabled")){d.removeClass(g.id,h+"Hover")}})}g.onPostRender.dispatch(g,d.get(g.id))},destroy:function(){this.parent();b.clear(this.id+"_text");b.clear(this.id+"_open")}})})(tinymce);(function(e){var d=e.DOM,b=e.dom.Event,f=e.each,a=e.util.Dispatcher,c;e.create("tinymce.ui.NativeListBox:tinymce.ui.ListBox",{NativeListBox:function(h,g){this.parent(h,g);this.classPrefix="mceNativeListBox"},setDisabled:function(g){d.get(this.id).disabled=g;this.setAriaProperty("disabled",g)},isDisabled:function(){return d.get(this.id).disabled},select:function(h){var g=this,j,i;if(h==c){return g.selectByIndex(-1)}if(h&&typeof(h)=="function"){i=h}else{i=function(k){return k==h}}if(h!=g.selectedValue){f(g.items,function(l,k){if(i(l.value)){j=1;g.selectByIndex(k);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(g){d.get(this.id).selectedIndex=g+1;this.selectedValue=this.items[g]?this.items[g].value:null},add:function(k,h,g){var j,i=this;g=g||{};g.value=h;if(i.isRendered()){d.add(d.get(this.id),"option",g,k)}j={title:k,value:h,attribs:g};i.items.push(j);i.onAdd.dispatch(i,j)},getLength:function(){return this.items.length},renderHTML:function(){var i,g=this;i=d.createHTML("option",{value:""},"-- "+g.settings.title+" --");f(g.items,function(h){i+=d.createHTML("option",{value:h.value},h.title)});i=d.createHTML("select",{id:g.id,"class":"mceNativeListBox","aria-labelledby":g.id+"_aria"},i);i+=d.createHTML("span",{id:g.id+"_aria",style:"display: none"},g.settings.title);return i},postRender:function(){var h=this,i,j=true;h.rendered=true;function g(l){var k=h.items[l.target.selectedIndex-1];if(k&&(k=k.value)){h.onChange.dispatch(h,k);if(h.settings.onselect){h.settings.onselect(k)}}}b.add(h.id,"change",g);b.add(h.id,"keydown",function(l){var k;b.remove(h.id,"change",i);j=false;k=b.add(h.id,"blur",function(){if(j){return}j=true;b.add(h.id,"change",g);b.remove(h.id,"blur",k)});if(e.isWebKit&&(l.keyCode==37||l.keyCode==39)){return b.prevent(l)}if(l.keyCode==13||l.keyCode==32){g(l);return b.cancel(l)}});h.onPostRender.dispatch(h,d.get(h.id))}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.MenuButton:tinymce.ui.Button",{MenuButton:function(g,f,e){this.parent(g,f,e);this.onRenderMenu=new c.util.Dispatcher(this);f.menu_container=f.menu_container||b.doc.body},showMenu:function(){var g=this,j,i,h=b.get(g.id),f;if(g.isDisabled()){return}if(!g.isMenuRendered){g.renderMenu();g.isMenuRendered=true}if(g.isMenuVisible){return g.hideMenu()}j=b.getPos(g.settings.menu_container);i=b.getPos(h);f=g.menu;f.settings.offset_x=i.x;f.settings.offset_y=i.y;f.settings.vp_offset_x=i.x;f.settings.vp_offset_y=i.y;f.settings.keyboard_focus=g._focused;f.showMenu(0,h.firstChild.clientHeight);a.add(b.doc,"mousedown",g.hideMenu,g);g.setState("Selected",1);g.isMenuVisible=1},renderMenu:function(){var f=this,e;e=f.settings.control_manager.createDropMenu(f.id+"_menu",{menu_line:1,"class":this.classPrefix+"Menu",icons:f.settings.icons});e.onHideMenu.add(function(){f.hideMenu();f.focus()});f.onRenderMenu.dispatch(f,e);f.menu=e},hideMenu:function(g){var f=this;if(g&&g.type=="mousedown"&&b.getParent(g.target,function(h){return h.id===f.id||h.id===f.id+"_open"})){return}if(!g||!b.getParent(g.target,".mceMenu")){f.setState("Selected",0);a.remove(b.doc,"mousedown",f.hideMenu,f);if(f.menu){f.menu.hideMenu()}}f.isMenuVisible=0},postRender:function(){var e=this,f=e.settings;a.add(e.id,"click",function(){if(!e.isDisabled()){if(f.onclick){f.onclick(e.value)}e.showMenu()}})}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.SplitButton:tinymce.ui.MenuButton",{SplitButton:function(g,f,e){this.parent(g,f,e);this.classPrefix="mceSplitButton"},renderHTML:function(){var i,f=this,g=f.settings,e;i="<tbody><tr>";if(g.image){e=b.createHTML("img ",{src:g.image,role:"presentation","class":"mceAction "+g["class"]})}else{e=b.createHTML("span",{"class":"mceAction "+g["class"]},"")}e+=b.createHTML("span",{"class":"mceVoiceLabel mceIconOnly",id:f.id+"_voice",style:"display:none;"},g.title);i+="<td >"+b.createHTML("a",{role:"button",id:f.id+"_action",tabindex:"-1",href:"javascript:;","class":"mceAction "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"</td>";e=b.createHTML("span",{"class":"mceOpen "+g["class"]},'<span style="display:none;" class="mceIconOnly" aria-hidden="true">\u25BC</span>');i+="<td >"+b.createHTML("a",{role:"button",id:f.id+"_open",tabindex:"-1",href:"javascript:;","class":"mceOpen "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"</td>";i+="</tr></tbody>";i=b.createHTML("table",{role:"presentation","class":"mceSplitButton mceSplitButtonEnabled "+g["class"],cellpadding:"0",cellspacing:"0",title:g.title},i);return b.createHTML("div",{id:f.id,role:"button",tabindex:"0","aria-labelledby":f.id+"_voice","aria-haspopup":"true"},i)},postRender:function(){var e=this,g=e.settings,f;if(g.onclick){f=function(h){if(!e.isDisabled()){g.onclick(e.value);a.cancel(h)}};a.add(e.id+"_action","click",f);a.add(e.id,["click","keydown"],function(h){var k=32,m=14,i=13,j=38,l=40;if((h.keyCode===32||h.keyCode===13||h.keyCode===14)&&!h.altKey&&!h.ctrlKey&&!h.metaKey){f();a.cancel(h)}else{if(h.type==="click"||h.keyCode===l){e.showMenu();a.cancel(h)}}})}a.add(e.id+"_open","click",function(h){e.showMenu();a.cancel(h)});a.add([e.id,e.id+"_open"],"focus",function(){e._focused=1});a.add([e.id,e.id+"_open"],"blur",function(){e._focused=0});if(c.isIE6||!b.boxModel){a.add(e.id,"mouseover",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.addClass(e.id,"mceSplitButtonHover")}});a.add(e.id,"mouseout",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.removeClass(e.id,"mceSplitButtonHover")}})}},destroy:function(){this.parent();a.clear(this.id+"_action");a.clear(this.id+"_open");a.clear(this.id)}})})(tinymce);(function(d){var c=d.DOM,a=d.dom.Event,b=d.is,e=d.each;d.create("tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton",{ColorSplitButton:function(i,h,f){var g=this;g.parent(i,h,f);g.settings=h=d.extend({colors:"000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF",grid_width:8,default_color:"#888888"},g.settings);g.onShowMenu=new d.util.Dispatcher(g);g.onHideMenu=new d.util.Dispatcher(g);g.value=h.default_color},showMenu:function(){var f=this,g,j,i,h;if(f.isDisabled()){return}if(!f.isMenuRendered){f.renderMenu();f.isMenuRendered=true}if(f.isMenuVisible){return f.hideMenu()}i=c.get(f.id);c.show(f.id+"_menu");c.addClass(i,"mceSplitButtonSelected");h=c.getPos(i);c.setStyles(f.id+"_menu",{left:h.x,top:h.y+i.firstChild.clientHeight,zIndex:200000});i=0;a.add(c.doc,"mousedown",f.hideMenu,f);f.onShowMenu.dispatch(f);if(f._focused){f._keyHandler=a.add(f.id+"_menu","keydown",function(k){if(k.keyCode==27){f.hideMenu()}});c.select("a",f.id+"_menu")[0].focus()}f.keyboardNav=new d.ui.KeyboardNavigation({root:f.id+"_menu",items:c.select("a",f.id+"_menu"),onCancel:function(){f.hideMenu();f.focus()}});f.keyboardNav.focus();f.isMenuVisible=1},hideMenu:function(g){var f=this;if(f.isMenuVisible){if(g&&g.type=="mousedown"&&c.getParent(g.target,function(h){return h.id===f.id+"_open"})){return}if(!g||!c.getParent(g.target,".mceSplitButtonMenu")){c.removeClass(f.id,"mceSplitButtonSelected");a.remove(c.doc,"mousedown",f.hideMenu,f);a.remove(f.id+"_menu","keydown",f._keyHandler);c.hide(f.id+"_menu")}f.isMenuVisible=0;f.onHideMenu.dispatch();f.keyboardNav.destroy()}},renderMenu:function(){var p=this,h,k=0,q=p.settings,g,j,l,o,f;o=c.add(q.menu_container,"div",{role:"listbox",id:p.id+"_menu","class":q.menu_class+" "+q["class"],style:"position:absolute;left:0;top:-1000px;"});h=c.add(o,"div",{"class":q["class"]+" mceSplitButtonMenu"});c.add(h,"span",{"class":"mceMenuLine"});g=c.add(h,"table",{role:"presentation","class":"mceColorSplitMenu"});j=c.add(g,"tbody");k=0;e(b(q.colors,"array")?q.colors:q.colors.split(","),function(m){m=m.replace(/^#/,"");if(!k--){l=c.add(j,"tr");k=q.grid_width-1}g=c.add(l,"td");var i={href:"javascript:;",style:{backgroundColor:"#"+m},title:p.editor.getLang("colors."+m,m),"data-mce-color":"#"+m};if(!d.isIE){i.role="option"}g=c.add(g,"a",i);if(p.editor.forcedHighContrastMode){g=c.add(g,"canvas",{width:16,height:16,"aria-hidden":"true"});if(g.getContext&&(f=g.getContext("2d"))){f.fillStyle="#"+m;f.fillRect(0,0,16,16)}else{c.remove(g)}}});if(q.more_colors_func){g=c.add(j,"tr");g=c.add(g,"td",{colspan:q.grid_width,"class":"mceMoreColors"});g=c.add(g,"a",{role:"option",id:p.id+"_more",href:"javascript:;",onclick:"return false;","class":"mceMoreColors"},q.more_colors_title);a.add(g,"click",function(i){q.more_colors_func.call(q.more_colors_scope||this);return a.cancel(i)})}c.addClass(h,"mceColorSplitMenu");a.add(p.id+"_menu","mousedown",function(i){return a.cancel(i)});a.add(p.id+"_menu","click",function(i){var m;i=c.getParent(i.target,"a",j);if(i&&i.nodeName.toLowerCase()=="a"&&(m=i.getAttribute("data-mce-color"))){p.setColor(m)}return false});return o},setColor:function(f){this.displayColor(f);this.hideMenu();this.settings.onselect(f)},displayColor:function(g){var f=this;c.setStyle(f.id+"_preview","backgroundColor",g);f.value=g},postRender:function(){var f=this,g=f.id;f.parent();c.add(g+"_action","div",{id:g+"_preview","class":"mceColorPreview"});c.setStyle(f.id+"_preview","backgroundColor",f.value)},destroy:function(){var f=this;f.parent();a.clear(f.id+"_menu");a.clear(f.id+"_more");c.remove(f.id+"_menu");if(f.keyboardNav){f.keyboardNav.destroy()}}})})(tinymce);(function(b){var d=b.DOM,c=b.each,a=b.dom.Event;b.create("tinymce.ui.ToolbarGroup:tinymce.ui.Container",{renderHTML:function(){var f=this,i=[],e=f.controls,j=b.each,g=f.settings;i.push('<div id="'+f.id+'" role="group" aria-labelledby="'+f.id+'_voice">');i.push("<span role='application'>");i.push('<span id="'+f.id+'_voice" class="mceVoiceLabel" style="display:none;">'+d.encode(g.name)+"</span>");j(e,function(h){i.push(h.renderHTML())});i.push("</span>");i.push("</div>");return i.join("")},focus:function(){var e=this;d.get(e.id).focus()},postRender:function(){var f=this,e=[];c(f.controls,function(g){c(g.controls,function(h){if(h.id){e.push(h)}})});f.keyNav=new b.ui.KeyboardNavigation({root:f.id,items:e,onCancel:function(){if(b.isWebKit){d.get(f.editor.id+"_ifr").focus()}f.editor.focus()},excludeFromTabOrder:!f.settings.tab_focus_toolbar})},destroy:function(){var e=this;e.parent();e.keyNav.destroy();a.clear(e.id)}})})(tinymce);(function(a){var c=a.DOM,b=a.each;a.create("tinymce.ui.Toolbar:tinymce.ui.Container",{renderHTML:function(){var m=this,f="",j,k,n=m.settings,e,d,g,l;l=m.controls;for(e=0;e<l.length;e++){k=l[e];d=l[e-1];g=l[e+1];if(e===0){j="mceToolbarStart";if(k.Button){j+=" mceToolbarStartButton"}else{if(k.SplitButton){j+=" mceToolbarStartSplitButton"}else{if(k.ListBox){j+=" mceToolbarStartListBox"}}}f+=c.createHTML("td",{"class":j},c.createHTML("span",null,"<!-- IE -->"))}if(d&&k.ListBox){if(d.Button||d.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarEnd"},c.createHTML("span",null,"<!-- IE -->"))}}if(c.stdMode){f+='<td style="position: relative">'+k.renderHTML()+"</td>"}else{f+="<td>"+k.renderHTML()+"</td>"}if(g&&k.ListBox){if(g.Button||g.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarStart"},c.createHTML("span",null,"<!-- IE -->"))}}}j="mceToolbarEnd";if(k.Button){j+=" mceToolbarEndButton"}else{if(k.SplitButton){j+=" mceToolbarEndSplitButton"}else{if(k.ListBox){j+=" mceToolbarEndListBox"}}}f+=c.createHTML("td",{"class":j},c.createHTML("span",null,"<!-- IE -->"));return c.createHTML("table",{id:m.id,"class":"mceToolbar"+(n["class"]?" "+n["class"]:""),cellpadding:"0",cellspacing:"0",align:m.settings.align||"",role:"presentation",tabindex:"-1"},"<tbody><tr>"+f+"</tr></tbody>")}})})(tinymce);(function(b){var a=b.util.Dispatcher,c=b.each;b.create("tinymce.AddOnManager",{AddOnManager:function(){var d=this;d.items=[];d.urls={};d.lookup={};d.onAdd=new a(d)},get:function(d){if(this.lookup[d]){return this.lookup[d].instance}else{return undefined}},dependencies:function(e){var d;if(this.lookup[e]){d=this.lookup[e].dependencies}return d||[]},requireLangPack:function(e){var d=b.settings;if(d&&d.language&&d.language_load!==false){b.ScriptLoader.add(this.urls[e]+"/langs/"+d.language+".js")}},add:function(f,e,d){this.items.push(e);this.lookup[f]={instance:e,dependencies:d};this.onAdd.dispatch(this,f,e);return e},createUrl:function(d,e){if(typeof e==="object"){return e}else{return{prefix:d.prefix,resource:e,suffix:d.suffix}}},addComponents:function(f,d){var e=this.urls[f];b.each(d,function(g){b.ScriptLoader.add(e+"/"+g)})},load:function(j,f,d,h){var g=this,e=f;function i(){var k=g.dependencies(j);b.each(k,function(m){var l=g.createUrl(f,m);g.load(l.resource,l,undefined,undefined)});if(d){if(h){d.call(h)}else{d.call(b.ScriptLoader)}}}if(g.urls[j]){return}if(typeof f==="object"){e=f.prefix+f.resource+f.suffix}if(e.indexOf("/")!==0&&e.indexOf("://")==-1){e=b.baseURL+"/"+e}g.urls[j]=e.substring(0,e.lastIndexOf("/"));if(g.lookup[j]){i()}else{b.ScriptLoader.add(e,i,h)}}});b.PluginManager=new b.AddOnManager();b.ThemeManager=new b.AddOnManager()}(tinymce));(function(j){var g=j.each,d=j.extend,k=j.DOM,i=j.dom.Event,f=j.ThemeManager,b=j.PluginManager,e=j.explode,h=j.util.Dispatcher,a,c=0;j.documentBaseURL=window.location.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,"");if(!/[\/\\]$/.test(j.documentBaseURL)){j.documentBaseURL+="/"}j.baseURL=new j.util.URI(j.documentBaseURL).toAbsolute(j.baseURL);j.baseURI=new j.util.URI(j.baseURL);j.onBeforeUnload=new h(j);i.add(window,"beforeunload",function(l){j.onBeforeUnload.dispatch(j,l)});j.onAddEditor=new h(j);j.onRemoveEditor=new h(j);j.EditorManager=d(j,{editors:[],i18n:{},activeEditor:null,init:function(x){var v=this,o,n=j.ScriptLoader,u,l=[],r;function q(t){var s=t.id;if(!s){s=t.name;if(s&&!k.get(s)){s=t.name}else{s=k.uniqueId()}t.setAttribute("id",s)}return s}function m(z,A,t){var y=z[A];if(!y){return}if(j.is(y,"string")){t=y.replace(/\.\w+$/,"");t=t?j.resolve(t):0;y=j.resolve(y)}return y.apply(t||this,Array.prototype.slice.call(arguments,2))}function p(t,s){return s.constructor===RegExp?s.test(t.className):k.hasClass(t,s)}v.settings=x;i.bind(window,"ready",function(){var s,t;m(x,"onpageload");switch(x.mode){case"exact":s=x.elements||"";if(s.length>0){g(e(s),function(y){if(k.get(y)){r=new j.Editor(y,x);l.push(r);r.render(1)}else{g(document.forms,function(z){g(z.elements,function(A){if(A.name===y){y="mce_editor_"+c++;k.setAttrib(A,"id",y);r=new j.Editor(y,x);l.push(r);r.render(1)}})})}})}break;case"textareas":case"specific_textareas":g(k.select("textarea"),function(y){if(x.editor_deselector&&p(y,x.editor_deselector)){return}if(!x.editor_selector||p(y,x.editor_selector)){r=new j.Editor(q(y),x);l.push(r);r.render(1)}});break;default:if(x.types){g(x.types,function(y){g(k.select(y.selector),function(A){var z=new j.Editor(q(A),j.extend({},x,y));l.push(z);z.render(1)})})}else{if(x.selector){g(k.select(x.selector),function(z){var y=new j.Editor(q(z),x);l.push(y);y.render(1)})}}}if(x.oninit){s=t=0;g(l,function(y){t++;if(!y.initialized){y.onInit.add(function(){s++;if(s==t){m(x,"oninit")}})}else{s++}if(s==t){m(x,"oninit")}})}})},get:function(l){if(l===a){return this.editors}return this.editors[l]},getInstanceById:function(l){return this.get(l)},add:function(m){var l=this,n=l.editors;n[m.id]=m;n.push(m);l._setActive(m);l.onAddEditor.dispatch(l,m);return m},remove:function(n){var m=this,l,o=m.editors;if(!o[n.id]){return null}delete o[n.id];for(l=0;l<o.length;l++){if(o[l]==n){o.splice(l,1);break}}if(m.activeEditor==n){m._setActive(o[0])}n.destroy();m.onRemoveEditor.dispatch(m,n);return n},execCommand:function(r,p,o){var q=this,n=q.get(o),l;function m(){n.destroy();l.detachEvent("onunload",m);l=l.tinyMCE=l.tinymce=null}switch(r){case"mceFocus":n.focus();return true;case"mceAddEditor":case"mceAddControl":if(!q.get(o)){new j.Editor(o,q.settings).render()}return true;case"mceAddFrameControl":l=o.window;l.tinyMCE=tinyMCE;l.tinymce=j;j.DOM.doc=l.document;j.DOM.win=l;n=new j.Editor(o.element_id,o);n.render();if(j.isIE){l.attachEvent("onunload",m)}o.page_window=null;return true;case"mceRemoveEditor":case"mceRemoveControl":if(n){n.remove()}return true;case"mceToggleEditor":if(!n){q.execCommand("mceAddControl",0,o);return true}if(n.isHidden()){n.show()}else{n.hide()}return true}if(q.activeEditor){return q.activeEditor.execCommand(r,p,o)}return false},execInstanceCommand:function(p,o,n,m){var l=this.get(p);if(l){return l.execCommand(o,n,m)}return false},triggerSave:function(){g(this.editors,function(l){l.save()})},addI18n:function(n,q){var l,m=this.i18n;if(!j.is(n,"string")){g(n,function(r,p){g(r,function(t,s){g(t,function(v,u){if(s==="common"){m[p+"."+u]=v}else{m[p+"."+s+"."+u]=v}})})})}else{g(q,function(r,p){m[n+"."+p]=r})}},_setActive:function(l){this.selectedInstance=this.activeEditor=l}})})(tinymce);(function(k){var l=k.DOM,j=k.dom.Event,f=k.extend,i=k.each,a=k.isGecko,b=k.isIE,e=k.isWebKit,d=k.is,h=k.ThemeManager,c=k.PluginManager,g=k.explode;k.create("tinymce.Editor",{Editor:function(p,o){var m=this,n=true;m.settings=o=f({id:p,language:"en",theme:"advanced",skin:"default",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:k.documentBaseURL,add_form_submit_trigger:n,submit_patch:n,add_unload_trigger:n,convert_urls:n,relative_urls:n,remove_script_host:n,table_inline_editing:false,object_resizing:n,accessibility_focus:n,doctype:k.isIE6?'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">':"<!DOCTYPE>",visual:n,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",apply_source_formatting:n,directionality:"ltr",forced_root_block:"p",hidden_input:n,padd_empty_editor:n,render_ui:n,indentation:"30px",fix_table_elements:n,inline_styles:n,convert_fonts_to_spans:n,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",validate:n,entity_encoding:"named",url_converter:m.convertURL,url_converter_scope:m,ie7_compat:n},o);m.id=m.editorId=p;m.isNotDirty=false;m.plugins={};m.documentBaseURI=new k.util.URI(o.document_base_url||k.documentBaseURL,{base_uri:tinyMCE.baseURI});m.baseURI=k.baseURI;m.contentCSS=[];m.contentStyles=[];m.setupEvents();m.execCommands={};m.queryStateCommands={};m.queryValueCommands={};m.execCallback("setup",m)},render:function(o){var p=this,q=p.settings,r=p.id,m=k.ScriptLoader;if(!j.domLoaded){j.add(window,"ready",function(){p.render()});return}tinyMCE.settings=q;if(!p.getElement()){return}if(k.isIDevice&&!k.isIOS5){return}if(!/TEXTAREA|INPUT/i.test(p.getElement().nodeName)&&q.hidden_input&&l.getParent(r,"form")){l.insertAfter(l.create("input",{type:"hidden",name:r}),r)}if(!q.content_editable){p.orgVisibility=p.getElement().style.visibility;p.getElement().style.visibility="hidden"}if(k.WindowManager){p.windowManager=new k.WindowManager(p)}if(q.encoding=="xml"){p.onGetContent.add(function(s,t){if(t.save){t.content=l.encode(t.content)}})}if(q.add_form_submit_trigger){p.onSubmit.addToTop(function(){if(p.initialized){p.save();p.isNotDirty=1}})}if(q.add_unload_trigger){p._beforeUnload=tinyMCE.onBeforeUnload.add(function(){if(p.initialized&&!p.destroyed&&!p.isHidden()){p.save({format:"raw",no_events:true})}})}k.addUnload(p.destroy,p);if(q.submit_patch){p.onBeforeRenderUI.add(function(){var s=p.getElement().form;if(!s){return}if(s._mceOldSubmit){return}if(!s.submit.nodeType&&!s.submit.length){p.formElement=s;s._mceOldSubmit=s.submit;s.submit=function(){k.triggerSave();p.isNotDirty=1;return p.formElement._mceOldSubmit(p.formElement)}}s=null})}function n(){if(q.language&&q.language_load!==false){m.add(k.baseURL+"/langs/"+q.language+".js")}if(q.theme&&typeof q.theme!="function"&&q.theme.charAt(0)!="-"&&!h.urls[q.theme]){h.load(q.theme,"themes/"+q.theme+"/editor_template"+k.suffix+".js")}i(g(q.plugins),function(t){if(t&&!c.urls[t]){if(t.charAt(0)=="-"){t=t.substr(1,t.length);var s=c.dependencies(t);i(s,function(v){var u={prefix:"plugins/",resource:v,suffix:"/editor_plugin"+k.suffix+".js"};v=c.createUrl(u,v);c.load(v.resource,v)})}else{if(t=="safari"){return}c.load(t,{prefix:"plugins/",resource:t,suffix:"/editor_plugin"+k.suffix+".js"})}}});m.loadQueue(function(){if(!p.removed){p.init()}})}n()},init:function(){var q,G=this,H=G.settings,D,y,z,C=G.getElement(),p,m,E,v,B,F,x,r=[];k.add(G);H.aria_label=H.aria_label||l.getAttrib(C,"aria-label",G.getLang("aria.rich_text_area"));if(H.theme){if(typeof H.theme!="function"){H.theme=H.theme.replace(/-/,"");p=h.get(H.theme);G.theme=new p();if(G.theme.init){G.theme.init(G,h.urls[H.theme]||k.documentBaseURL.replace(/\/$/,""))}}else{G.theme=H.theme}}function A(s){var t=c.get(s),o=c.urls[s]||k.documentBaseURL.replace(/\/$/,""),n;if(t&&k.inArray(r,s)===-1){i(c.dependencies(s),function(u){A(u)});n=new t(G,o);G.plugins[s]=n;if(n.init){n.init(G,o);r.push(s)}}}i(g(H.plugins.replace(/\-/g,"")),A);if(H.popup_css!==false){if(H.popup_css){H.popup_css=G.documentBaseURI.toAbsolute(H.popup_css)}else{H.popup_css=G.baseURI.toAbsolute("themes/"+H.theme+"/skins/"+H.skin+"/dialog.css")}}if(H.popup_css_add){H.popup_css+=","+G.documentBaseURI.toAbsolute(H.popup_css_add)}G.controlManager=new k.ControlManager(G);G.onBeforeRenderUI.dispatch(G,G.controlManager);if(H.render_ui&&G.theme){G.orgDisplay=C.style.display;if(typeof H.theme!="function"){D=H.width||C.style.width||C.offsetWidth;y=H.height||C.style.height||C.offsetHeight;z=H.min_height||100;F=/^[0-9\.]+(|px)$/i;if(F.test(""+D)){D=Math.max(parseInt(D,10)+(p.deltaWidth||0),100)}if(F.test(""+y)){y=Math.max(parseInt(y,10)+(p.deltaHeight||0),z)}p=G.theme.renderUI({targetNode:C,width:D,height:y,deltaWidth:H.delta_width,deltaHeight:H.delta_height});l.setStyles(p.sizeContainer||p.editorContainer,{width:D,height:y});y=(p.iframeHeight||y)+(typeof(y)=="number"?(p.deltaHeight||0):"");if(y<z){y=z}}else{p=H.theme(G,C);if(p.editorContainer.nodeType){p.editorContainer=p.editorContainer.id=p.editorContainer.id||G.id+"_parent"}if(p.iframeContainer.nodeType){p.iframeContainer=p.iframeContainer.id=p.iframeContainer.id||G.id+"_iframecontainer"}y=p.iframeHeight||C.offsetHeight;if(b){G.onInit.add(function(n){n.dom.bind(n.getBody(),"beforedeactivate keydown",function(){n.lastIERng=n.selection.getRng()})})}}G.editorContainer=p.editorContainer}if(H.content_css){i(g(H.content_css),function(n){G.contentCSS.push(G.documentBaseURI.toAbsolute(n))})}if(H.content_editable){C=q=p=null;return G.initContentBody()}if(document.domain&&location.hostname!=document.domain){k.relaxedDomain=document.domain}G.iframeHTML=H.doctype+'<html><head xmlns="http://www.w3.org/1999/xhtml">';if(H.document_base_url!=k.documentBaseURL){G.iframeHTML+='<base href="'+G.documentBaseURI.getURI()+'" />'}if(H.ie7_compat){G.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=7" />'}else{G.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=edge" />'}G.iframeHTML+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';for(x=0;x<G.contentCSS.length;x++){G.iframeHTML+='<link type="text/css" rel="stylesheet" href="'+G.contentCSS[x]+'" />'}G.contentCSS=[];v=H.body_id||"tinymce";if(v.indexOf("=")!=-1){v=G.getParam("body_id","","hash");v=v[G.id]||v}B=H.body_class||"";if(B.indexOf("=")!=-1){B=G.getParam("body_class","","hash");B=B[G.id]||""}G.iframeHTML+='</head><body id="'+v+'" class="mceContentBody '+B+'" onload="window.parent.tinyMCE.get(\''+G.id+"').onLoad.dispatch();\"><br></body></html>";if(k.relaxedDomain&&(b||(k.isOpera&&parseFloat(opera.version())<11))){E='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+G.id+'");document.write(ed.iframeHTML);document.close();ed.initContentBody();})()'}q=l.add(p.iframeContainer,"iframe",{id:G.id+"_ifr",src:E||'javascript:""',frameBorder:"0",allowTransparency:"true",title:H.aria_label,style:{width:"100%",height:y,display:"block"}});G.contentAreaContainer=p.iframeContainer;if(p.editorContainer){l.get(p.editorContainer).style.display=G.orgDisplay}C.style.visibility=G.orgVisibility;l.get(G.id).style.display="none";l.setAttrib(G.id,"aria-hidden",true);if(!k.relaxedDomain||!E){G.initContentBody()}C=q=p=null},initContentBody:function(){var n=this,p=n.settings,q=l.get(n.id),r=n.getDoc(),o,m,s;if((!b||!k.relaxedDomain)&&!p.content_editable){r.open();r.write(n.iframeHTML);r.close();if(k.relaxedDomain){r.domain=k.relaxedDomain}}if(p.content_editable){l.addClass(q,"mceContentBody");n.contentDocument=r=p.content_document||document;n.contentWindow=p.content_window||window;n.bodyElement=q;p.content_document=p.content_window=null}m=n.getBody();m.disabled=true;if(!p.readonly){m.contentEditable=n.getParam("content_editable_state",true)}m.disabled=false;n.schema=new k.html.Schema(p);n.dom=new k.dom.DOMUtils(r,{keep_values:true,url_converter:n.convertURL,url_converter_scope:n,hex_colors:p.force_hex_style_colors,class_filter:p.class_filter,update_styles:true,root_element:p.content_editable?n.id:null,schema:n.schema});n.parser=new k.html.DomParser(p,n.schema);n.parser.addAttributeFilter("src,href,style",function(t,u){var v=t.length,y,A=n.dom,z,x;while(v--){y=t[v];z=y.attr(u);x="data-mce-"+u;if(!y.attributes.map[x]){if(u==="style"){y.attr(x,A.serializeStyle(A.parseStyle(z),y.name))}else{y.attr(x,n.convertURL(z,u,y.name))}}}});n.parser.addNodeFilter("script",function(t,u){var v=t.length,x;while(v--){x=t[v];x.attr("type","mce-"+(x.attr("type")||"text/javascript"))}});n.parser.addNodeFilter("#cdata",function(t,u){var v=t.length,x;while(v--){x=t[v];x.type=8;x.name="#comment";x.value="[CDATA["+x.value+"]]"}});n.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(u,v){var x=u.length,y,t=n.schema.getNonEmptyElements();while(x--){y=u[x];if(y.isEmpty(t)){y.empty().append(new k.html.Node("br",1)).shortEnded=true}}});n.serializer=new k.dom.Serializer(p,n.dom,n.schema);n.selection=new k.dom.Selection(n.dom,n.getWin(),n.serializer,n);n.formatter=new k.Formatter(n);n.undoManager=new k.UndoManager(n);n.forceBlocks=new k.ForceBlocks(n);n.enterKey=new k.EnterKey(n);n.editorCommands=new k.EditorCommands(n);n.onExecCommand.add(function(t,u){if(!/^(FontName|FontSize)$/.test(u)){n.nodeChanged()}});n.serializer.onPreProcess.add(function(t,u){return n.onPreProcess.dispatch(n,u,t)});n.serializer.onPostProcess.add(function(t,u){return n.onPostProcess.dispatch(n,u,t)});n.onPreInit.dispatch(n);if(!p.browser_spellcheck&&!p.gecko_spellcheck){r.body.spellcheck=false}if(!p.readonly){n.bindNativeEvents()}n.controlManager.onPostRender.dispatch(n,n.controlManager);n.onPostRender.dispatch(n);n.quirks=k.util.Quirks(n);if(p.directionality){m.dir=p.directionality}if(p.nowrap){m.style.whiteSpace="nowrap"}if(p.protect){n.onBeforeSetContent.add(function(t,u){i(p.protect,function(v){u.content=u.content.replace(v,function(x){return"<!--mce:protected "+escape(x)+"-->"})})})}n.onSetContent.add(function(){n.addVisual(n.getBody())});if(p.padd_empty_editor){n.onPostProcess.add(function(t,u){u.content=u.content.replace(/^(<p[^>]*>(&nbsp;|&#160;|\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,"")})}n.load({initial:true,format:"html"});n.startContent=n.getContent({format:"raw"});n.initialized=true;n.onInit.dispatch(n);n.execCallback("setupcontent_callback",n.id,m,r);n.execCallback("init_instance_callback",n);n.focus(true);n.nodeChanged({initial:true});if(n.contentStyles.length>0){s="";i(n.contentStyles,function(t){s+=t+"\r\n"});n.dom.addStyle(s)}i(n.contentCSS,function(t){n.dom.loadCSS(t)});if(p.auto_focus){setTimeout(function(){var t=k.get(p.auto_focus);t.selection.select(t.getBody(),1);t.selection.collapse(1);t.getBody().focus();t.getWin().focus()},100)}q=r=m=null},focus:function(p){var o,u=this,t=u.selection,q=u.settings.content_editable,n,r,s=u.getDoc(),m;if(!p){if(u.lastIERng){t.setRng(u.lastIERng)}n=t.getRng();if(n.item){r=n.item(0)}u._refreshContentEditable();if(!q){u.getWin().focus()}if(k.isGecko||q){m=u.getBody();if(m.setActive){m.setActive()}else{m.focus()}if(q){t.normalize()}}if(r&&r.ownerDocument==s){n=s.body.createControlRange();n.addElement(r);n.select()}}if(k.activeEditor!=u){if((o=k.activeEditor)!=null){o.onDeactivate.dispatch(o,u)}u.onActivate.dispatch(u,o)}k._setActive(u)},execCallback:function(q){var m=this,p=m.settings[q],o;if(!p){return}if(m.callbackLookup&&(o=m.callbackLookup[q])){p=o.func;o=o.scope}if(d(p,"string")){o=p.replace(/\.\w+$/,"");o=o?k.resolve(o):0;p=k.resolve(p);m.callbackLookup=m.callbackLookup||{};m.callbackLookup[q]={func:p,scope:o}}return p.apply(o||m,Array.prototype.slice.call(arguments,1))},translate:function(m){var o=this.settings.language||"en",n=k.i18n;if(!m){return""}return n[o+"."+m]||m.replace(/\{\#([^\}]+)\}/g,function(q,p){return n[o+"."+p]||"{#"+p+"}"})},getLang:function(o,m){return k.i18n[(this.settings.language||"en")+"."+o]||(d(m)?m:"{#"+o+"}")},getParam:function(t,q,m){var r=k.trim,p=d(this.settings[t])?this.settings[t]:q,s;if(m==="hash"){s={};if(d(p,"string")){i(p.indexOf("=")>0?p.split(/[;,](?![^=;,]*(?:[;,]|$))/):p.split(","),function(n){n=n.split("=");if(n.length>1){s[r(n[0])]=r(n[1])}else{s[r(n[0])]=r(n)}})}else{s=p}return s}return p},nodeChanged:function(q){var m=this,n=m.selection,p;if(m.initialized){q=q||{};p=n.getStart()||m.getBody();p=b&&p.ownerDocument!=m.getDoc()?m.getBody():p;q.parents=[];m.dom.getParent(p,function(o){if(o.nodeName=="BODY"){return true}q.parents.push(o)});m.onNodeChange.dispatch(m,q?q.controlManager||m.controlManager:m.controlManager,p,n.isCollapsed(),q)}},addButton:function(n,o){var m=this;m.buttons=m.buttons||{};m.buttons[n]=o},addCommand:function(m,o,n){this.execCommands[m]={func:o,scope:n||this}},addQueryStateHandler:function(m,o,n){this.queryStateCommands[m]={func:o,scope:n||this}},addQueryValueHandler:function(m,o,n){this.queryValueCommands[m]={func:o,scope:n||this}},addShortcut:function(o,q,m,p){var n=this,r;if(n.settings.custom_shortcuts===false){return false}n.shortcuts=n.shortcuts||{};if(d(m,"string")){r=m;m=function(){n.execCommand(r,false,null)}}if(d(m,"object")){r=m;m=function(){n.execCommand(r[0],r[1],r[2])}}i(g(o),function(s){var t={func:m,scope:p||this,desc:n.translate(q),alt:false,ctrl:false,shift:false};i(g(s,"+"),function(u){switch(u){case"alt":case"ctrl":case"shift":t[u]=true;break;default:t.charCode=u.charCodeAt(0);t.keyCode=u.toUpperCase().charCodeAt(0)}});n.shortcuts[(t.ctrl?"ctrl":"")+","+(t.alt?"alt":"")+","+(t.shift?"shift":"")+","+t.keyCode]=t});return true},execCommand:function(u,r,x,m){var p=this,q=0,v,n;if(!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(u)&&(!m||!m.skip_focus)){p.focus()}m=f({},m);p.onBeforeExecCommand.dispatch(p,u,r,x,m);if(m.terminate){return false}if(p.execCallback("execcommand_callback",p.id,p.selection.getNode(),u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);return true}if(v=p.execCommands[u]){n=v.func.call(v.scope,r,x);if(n!==true){p.onExecCommand.dispatch(p,u,r,x,m);return n}}i(p.plugins,function(o){if(o.execCommand&&o.execCommand(u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);q=1;return false}});if(q){return true}if(p.theme&&p.theme.execCommand&&p.theme.execCommand(u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);return true}if(p.editorCommands.execCommand(u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);return true}p.getDoc().execCommand(u,r,x);p.onExecCommand.dispatch(p,u,r,x,m)},queryCommandState:function(q){var n=this,r,p;if(n._isHidden()){return}if(r=n.queryStateCommands[q]){p=r.func.call(r.scope);if(p!==true){return p}}r=n.editorCommands.queryCommandState(q);if(r!==-1){return r}try{return this.getDoc().queryCommandState(q)}catch(m){}},queryCommandValue:function(r){var n=this,q,p;if(n._isHidden()){return}if(q=n.queryValueCommands[r]){p=q.func.call(q.scope);if(p!==true){return p}}q=n.editorCommands.queryCommandValue(r);if(d(q)){return q}try{return this.getDoc().queryCommandValue(r)}catch(m){}},show:function(){var m=this;l.show(m.getContainer());l.hide(m.id);m.load()},hide:function(){var m=this,n=m.getDoc();if(b&&n){n.execCommand("SelectAll")}m.save();l.hide(m.getContainer());l.setStyle(m.id,"display",m.orgDisplay)},isHidden:function(){return !l.isHidden(this.id)},setProgressState:function(m,n,p){this.onSetProgressState.dispatch(this,m,n,p);return m},load:function(q){var m=this,p=m.getElement(),n;if(p){q=q||{};q.load=true;n=m.setContent(d(p.value)?p.value:p.innerHTML,q);q.element=p;if(!q.no_events){m.onLoadContent.dispatch(m,q)}q.element=p=null;return n}},save:function(r){var m=this,q=m.getElement(),n,p;if(!q||!m.initialized){return}r=r||{};r.save=true;r.element=q;n=r.content=m.getContent(r);if(!r.no_events){m.onSaveContent.dispatch(m,r)}n=r.content;if(!/TEXTAREA|INPUT/i.test(q.nodeName)){q.innerHTML=n;if(p=l.getParent(m.id,"form")){i(p.elements,function(o){if(o.name==m.id){o.value=n;return false}})}}else{q.value=n}r.element=q=null;return n},setContent:function(r,p){var o=this,n,m=o.getBody(),q;p=p||{};p.format=p.format||"html";p.set=true;p.content=r;if(!p.no_events){o.onBeforeSetContent.dispatch(o,p)}r=p.content;if(!k.isIE&&(r.length===0||/^\s+$/.test(r))){q=o.settings.forced_root_block;if(q){r="<"+q+'><br data-mce-bogus="1"></'+q+">"}else{r='<br data-mce-bogus="1">'}m.innerHTML=r;o.selection.select(m,true);o.selection.collapse(true);return}if(p.format!=="raw"){r=new k.html.Serializer({},o.schema).serialize(o.parser.parse(r))}p.content=k.trim(r);o.dom.setHTML(m,p.content);if(!p.no_events){o.onSetContent.dispatch(o,p)}if(!o.settings.content_editable||document.activeElement===o.getBody()){o.selection.normalize()}return p.content},getContent:function(n){var m=this,o;n=n||{};n.format=n.format||"html";n.get=true;n.getInner=true;if(!n.no_events){m.onBeforeGetContent.dispatch(m,n)}if(n.format=="raw"){o=m.getBody().innerHTML}else{o=m.serializer.serialize(m.getBody(),n)}n.content=k.trim(o);if(!n.no_events){m.onGetContent.dispatch(m,n)}return n.content},isDirty:function(){var m=this;return k.trim(m.startContent)!=k.trim(m.getContent({format:"raw",no_events:1}))&&!m.isNotDirty},getContainer:function(){var m=this;if(!m.container){m.container=l.get(m.editorContainer||m.id+"_parent")}return m.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return l.get(this.settings.content_element||this.id)},getWin:function(){var m=this,n;if(!m.contentWindow){n=l.get(m.id+"_ifr");if(n){m.contentWindow=n.contentWindow}}return m.contentWindow},getDoc:function(){var m=this,n;if(!m.contentDocument){n=m.getWin();if(n){m.contentDocument=n.document}}return m.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(o,n,q){var m=this,p=m.settings;if(p.urlconverter_callback){return m.execCallback("urlconverter_callback",o,q,true,n)}if(!p.convert_urls||(q&&q.nodeName=="LINK")||o.indexOf("file:")===0){return o}if(p.relative_urls){return m.documentBaseURI.toRelative(o)}o=m.documentBaseURI.toAbsolute(o,p.remove_script_host);return o},addVisual:function(q){var n=this,o=n.settings,p=n.dom,m;q=q||n.getBody();if(!d(n.hasVisual)){n.hasVisual=o.visual}i(p.select("table,a",q),function(s){var r;switch(s.nodeName){case"TABLE":m=o.visual_table_class||"mceItemTable";r=p.getAttrib(s,"border");if(!r||r=="0"){if(n.hasVisual){p.addClass(s,m)}else{p.removeClass(s,m)}}return;case"A":if(!p.getAttrib(s,"href",false)){r=p.getAttrib(s,"name")||s.id;m="mceItemAnchor";if(r){if(n.hasVisual){p.addClass(s,m)}else{p.removeClass(s,m)}}}return}});n.onVisualAid.dispatch(n,q,n.hasVisual)},remove:function(){var m=this,n=m.getContainer();if(!m.removed){m.removed=1;m.hide();if(!m.settings.content_editable){j.unbind(m.getWin());j.unbind(m.getDoc())}j.unbind(m.getBody());j.clear(n);m.execCallback("remove_instance_callback",m);m.onRemove.dispatch(m);m.onExecCommand.listeners=[];k.remove(m);l.remove(n)}},destroy:function(n){var m=this;if(m.destroyed){return}if(a){j.unbind(m.getDoc());j.unbind(m.getWin());j.unbind(m.getBody())}if(!n){k.removeUnload(m.destroy);tinyMCE.onBeforeUnload.remove(m._beforeUnload);if(m.theme&&m.theme.destroy){m.theme.destroy()}m.controlManager.destroy();m.selection.destroy();m.dom.destroy()}if(m.formElement){m.formElement.submit=m.formElement._mceOldSubmit;m.formElement._mceOldSubmit=null}m.contentAreaContainer=m.formElement=m.container=m.settings.content_element=m.bodyElement=m.contentDocument=m.contentWindow=null;if(m.selection){m.selection=m.selection.win=m.selection.dom=m.selection.dom.doc=null}m.destroyed=1},_refreshContentEditable:function(){var n=this,m,o;if(n._isHidden()){m=n.getBody();o=m.parentNode;o.removeChild(m);o.appendChild(m);m.focus()}},_isHidden:function(){var m;if(!a){return 0}m=this.selection.getSel();return(!m||!m.rangeCount||m.rangeCount===0)}})})(tinymce);(function(a){var b=a.each;a.Editor.prototype.setupEvents=function(){var c=this,d=c.settings;b(["onPreInit","onBeforeRenderUI","onPostRender","onLoad","onInit","onRemove","onActivate","onDeactivate","onClick","onEvent","onMouseUp","onMouseDown","onDblClick","onKeyDown","onKeyUp","onKeyPress","onContextMenu","onSubmit","onReset","onPaste","onPreProcess","onPostProcess","onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent","onLoadContent","onSaveContent","onNodeChange","onChange","onBeforeExecCommand","onExecCommand","onUndo","onRedo","onVisualAid","onSetProgressState","onSetAttrib"],function(e){c[e]=new a.util.Dispatcher(c)});if(d.cleanup_callback){c.onBeforeSetContent.add(function(e,f){f.content=e.execCallback("cleanup_callback","insert_to_editor",f.content,f)});c.onPreProcess.add(function(e,f){if(f.set){e.execCallback("cleanup_callback","insert_to_editor_dom",f.node,f)}if(f.get){e.execCallback("cleanup_callback","get_from_editor_dom",f.node,f)}});c.onPostProcess.add(function(e,f){if(f.set){f.content=e.execCallback("cleanup_callback","insert_to_editor",f.content,f)}if(f.get){f.content=e.execCallback("cleanup_callback","get_from_editor",f.content,f)}})}if(d.save_callback){c.onGetContent.add(function(e,f){if(f.save){f.content=e.execCallback("save_callback",e.id,f.content,e.getBody())}})}if(d.handle_event_callback){c.onEvent.add(function(f,g,h){if(c.execCallback("handle_event_callback",g,f,h)===false){g.preventDefault();g.stopPropagation()}})}if(d.handle_node_change_callback){c.onNodeChange.add(function(f,e,g){f.execCallback("handle_node_change_callback",f.id,g,-1,-1,true,f.selection.isCollapsed())})}if(d.save_callback){c.onSaveContent.add(function(e,g){var f=e.execCallback("save_callback",e.id,g.content,e.getBody());if(f){g.content=f}})}if(d.onchange_callback){c.onChange.add(function(f,e){f.execCallback("onchange_callback",f,e)})}};a.Editor.prototype.bindNativeEvents=function(){var l=this,f,d=l.settings,e=l.dom,h;h={mouseup:"onMouseUp",mousedown:"onMouseDown",click:"onClick",keyup:"onKeyUp",keydown:"onKeyDown",keypress:"onKeyPress",submit:"onSubmit",reset:"onReset",contextmenu:"onContextMenu",dblclick:"onDblClick",paste:"onPaste"};function c(i,m){var n=i.type;if(l.removed){return}if(l.onEvent.dispatch(l,i,m)!==false){l[h[i.fakeType||i.type]].dispatch(l,i,m)}}function j(i){l.focus(true)}function k(i,m){if(m.keyCode!=65||!a.VK.metaKeyPressed(m)){l.selection.normalize()}l.nodeChanged()}b(h,function(m,n){var i=d.content_editable?l.getBody():l.getDoc();switch(n){case"contextmenu":e.bind(i,n,c);break;case"paste":e.bind(l.getBody(),n,c);break;case"submit":case"reset":e.bind(l.getElement().form||a.DOM.getParent(l.id,"form"),n,c);break;default:e.bind(i,n,c)}});e.bind(d.content_editable?l.getBody():(a.isGecko?l.getDoc():l.getWin()),"focus",function(i){l.focus(true)});if(d.content_editable&&a.isOpera){e.bind(l.getBody(),"click",j);e.bind(l.getBody(),"keydown",j)}l.onMouseUp.add(k);l.onKeyUp.add(function(i,n){var m=n.keyCode;if((m>=33&&m<=36)||(m>=37&&m<=40)||m==13||m==45||m==46||m==8||(a.isMac&&(m==91||m==93))||n.ctrlKey){k(i,n)}});l.onReset.add(function(){l.setContent(l.startContent,{format:"raw"})});function g(m,i){if(m.altKey||m.ctrlKey||m.metaKey){b(l.shortcuts,function(n){var o=a.isMac?m.metaKey:m.ctrlKey;if(n.ctrl!=o||n.alt!=m.altKey||n.shift!=m.shiftKey){return}if(m.keyCode==n.keyCode||(m.charCode&&m.charCode==n.charCode)){m.preventDefault();if(i){n.func.call(n.scope)}return true}})}}l.onKeyUp.add(function(i,m){g(m)});l.onKeyPress.add(function(i,m){g(m)});l.onKeyDown.add(function(i,m){g(m,true)});if(a.isOpera){l.onClick.add(function(i,m){m.preventDefault()})}}})(tinymce);(function(d){var e=d.each,b,a=true,c=false;d.EditorCommands=function(n){var m=n.dom,p=n.selection,j={state:{},exec:{},value:{}},k=n.settings,q=n.formatter,o;function r(z,y,x){var v;z=z.toLowerCase();if(v=j.exec[z]){v(z,y,x);return a}return c}function l(x){var v;x=x.toLowerCase();if(v=j.state[x]){return v(x)}return -1}function h(x){var v;x=x.toLowerCase();if(v=j.value[x]){return v(x)}return c}function u(v,x){x=x||"exec";e(v,function(z,y){e(y.toLowerCase().split(","),function(A){j[x][A]=z})})}d.extend(this,{execCommand:r,queryCommandState:l,queryCommandValue:h,addCommands:u});function f(y,x,v){if(x===b){x=c}if(v===b){v=null}return n.getDoc().execCommand(y,x,v)}function t(v){return q.match(v)}function s(v,x){q.toggle(v,x?{value:x}:b)}function i(v){o=p.getBookmark(v)}function g(){p.moveToBookmark(o)}u({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){n.undoManager.add()},"Cut,Copy,Paste":function(z){var y=n.getDoc(),v;try{f(z)}catch(x){v=a}if(v||!y.queryCommandSupported(z)){if(d.isGecko){n.windowManager.confirm(n.getLang("clipboard_msg"),function(A){if(A){open("http://www.mozilla.org/editor/midasdemo/securityprefs.html","_blank")}})}else{n.windowManager.alert(n.getLang("clipboard_no_support"))}}},unlink:function(v){if(p.isCollapsed()){p.select(p.getNode())}f(v);p.collapse(c)},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(v){var x=v.substring(7);e("left,center,right,full".split(","),function(y){if(x!=y){q.remove("align"+y)}});s("align"+x);r("mceRepaint")},"InsertUnorderedList,InsertOrderedList":function(y){var v,x;f(y);v=m.getParent(p.getNode(),"ol,ul");if(v){x=v.parentNode;if(/^(H[1-6]|P|ADDRESS|PRE)$/.test(x.nodeName)){i();m.split(x,v);g()}}},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(v){s(v)},"ForeColor,HiliteColor,FontName":function(y,x,v){s(y,v)},FontSize:function(z,y,x){var v,A;if(x>=1&&x<=7){A=d.explode(k.font_size_style_values);v=d.explode(k.font_size_classes);if(v){x=v[x-1]||x}else{x=A[x-1]||x}}s(z,x)},RemoveFormat:function(v){q.remove(v)},mceBlockQuote:function(v){s("blockquote")},FormatBlock:function(y,x,v){return s(v||"p")},mceCleanup:function(){var v=p.getBookmark();n.setContent(n.getContent({cleanup:a}),{cleanup:a});p.moveToBookmark(v)},mceRemoveNode:function(z,y,x){var v=x||p.getNode();if(v!=n.getBody()){i();n.dom.remove(v,a);g()}},mceSelectNodeDepth:function(z,y,x){var v=0;m.getParent(p.getNode(),function(A){if(A.nodeType==1&&v++==x){p.select(A);return c}},n.getBody())},mceSelectNode:function(y,x,v){p.select(v)},mceInsertContent:function(B,I,K){var y,J,E,z,F,G,D,C,L,x,A,M,v,H;y=n.parser;J=new d.html.Serializer({},n.schema);v='<span id="mce_marker" data-mce-type="bookmark">\uFEFF</span>';G={content:K,format:"html"};p.onBeforeSetContent.dispatch(p,G);K=G.content;if(K.indexOf("{$caret}")==-1){K+="{$caret}"}K=K.replace(/\{\$caret\}/,v);if(!p.isCollapsed()){n.getDoc().execCommand("Delete",false,null)}E=p.getNode();G={context:E.nodeName.toLowerCase()};F=y.parse(K,G);A=F.lastChild;if(A.attr("id")=="mce_marker"){D=A;for(A=A.prev;A;A=A.walk(true)){if(A.type==3||!m.isBlock(A.name)){A.parent.insert(D,A,A.name==="br");break}}}if(!G.invalid){K=J.serialize(F);A=E.firstChild;M=E.lastChild;if(!A||(A===M&&A.nodeName==="BR")){m.setHTML(E,K)}else{p.setContent(K)}}else{p.setContent(v);E=n.selection.getNode();z=n.getBody();if(E.nodeType==9){E=A=z}else{A=E}while(A!==z){E=A;A=A.parentNode}K=E==z?z.innerHTML:m.getOuterHTML(E);K=J.serialize(y.parse(K.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return J.serialize(F)})));if(E==z){m.setHTML(z,K)}else{m.setOuterHTML(E,K)}}D=m.get("mce_marker");C=m.getRect(D);L=m.getViewPort(n.getWin());if((C.y+C.h>L.y+L.h||C.y<L.y)||(C.x>L.x+L.w||C.x<L.x)){H=d.isIE?n.getDoc().documentElement:n.getBody();H.scrollLeft=C.x;H.scrollTop=C.y-L.h+25}x=m.createRng();A=D.previousSibling;if(A&&A.nodeType==3){x.setStart(A,A.nodeValue.length)}else{x.setStartBefore(D);x.setEndBefore(D)}m.remove(D);p.setRng(x);p.onSetContent.dispatch(p,G);n.addVisual()},mceInsertRawHTML:function(y,x,v){p.setContent("tiny_mce_marker");n.setContent(n.getContent().replace(/tiny_mce_marker/g,function(){return v}))},mceToggleFormat:function(y,x,v){s(v)},mceSetContent:function(y,x,v){n.setContent(v)},"Indent,Outdent":function(z){var x,v,y;x=k.indentation;v=/[a-z%]+$/i.exec(x);x=parseInt(x);if(!l("InsertUnorderedList")&&!l("InsertOrderedList")){if(!k.forced_root_block&&!m.getParent(p.getNode(),m.isBlock)){q.apply("div")}e(p.getSelectedBlocks(),function(A){if(z=="outdent"){y=Math.max(0,parseInt(A.style.paddingLeft||0)-x);m.setStyle(A,"paddingLeft",y?y+v:"")}else{m.setStyle(A,"paddingLeft",(parseInt(A.style.paddingLeft||0)+x)+v)}})}else{f(z)}},mceRepaint:function(){var x;if(d.isGecko){try{i(a);if(p.getSel()){p.getSel().selectAllChildren(n.getBody())}p.collapse(a);g()}catch(v){}}},mceToggleFormat:function(y,x,v){q.toggle(v)},InsertHorizontalRule:function(){n.execCommand("mceInsertContent",false,"<hr />")},mceToggleVisualAid:function(){n.hasVisual=!n.hasVisual;n.addVisual()},mceReplaceContent:function(y,x,v){n.execCommand("mceInsertContent",false,v.replace(/\{\$selection\}/g,p.getContent({format:"text"})))},mceInsertLink:function(z,y,x){var v;if(typeof(x)=="string"){x={href:x}}v=m.getParent(p.getNode(),"a");x.href=x.href.replace(" ","%20");if(!v||!x.href){q.remove("link")}if(x.href){q.apply("link",x,v)}},selectAll:function(){var x=m.getRoot(),v=m.createRng();v.setStart(x,0);v.setEnd(x,x.childNodes.length);n.selection.setRng(v)}});u({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(z){var x="align"+z.substring(7);var v=p.isCollapsed()?[m.getParent(p.getNode(),m.isBlock)]:p.getSelectedBlocks();var y=d.map(v,function(A){return !!q.matchNode(A,x)});return d.inArray(y,a)!==-1},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(v){return t(v)},mceBlockQuote:function(){return t("blockquote")},Outdent:function(){var v;if(k.inline_styles){if((v=m.getParent(p.getStart(),m.isBlock))&&parseInt(v.style.paddingLeft)>0){return a}if((v=m.getParent(p.getEnd(),m.isBlock))&&parseInt(v.style.paddingLeft)>0){return a}}return l("InsertUnorderedList")||l("InsertOrderedList")||(!k.inline_styles&&!!m.getParent(p.getNode(),"BLOCKQUOTE"))},"InsertUnorderedList,InsertOrderedList":function(v){return m.getParent(p.getNode(),v=="insertunorderedlist"?"UL":"OL")}},"state");u({"FontSize,FontName":function(y){var x=0,v;if(v=m.getParent(p.getNode(),"span")){if(y=="fontsize"){x=v.style.fontSize}else{x=v.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()}}return x}},"value");u({Undo:function(){n.undoManager.undo()},Redo:function(){n.undoManager.redo()}})}})(tinymce);(function(b){var a=b.util.Dispatcher;b.UndoManager=function(h){var l,i=0,e=[],g,k,j,f;function c(){return b.trim(h.getContent({format:"raw",no_events:1}).replace(/<span[^>]+data-mce-bogus[^>]+>[\u200B\uFEFF]+<\/span>/g,""))}function d(){l.typing=false;l.add()}onBeforeAdd=new a(l);k=new a(l);j=new a(l);f=new a(l);k.add(function(m,n){if(m.hasUndo()){return h.onChange.dispatch(h,n,m)}});j.add(function(m,n){return h.onUndo.dispatch(h,n,m)});f.add(function(m,n){return h.onRedo.dispatch(h,n,m)});h.onInit.add(function(){l.add()});h.onBeforeExecCommand.add(function(m,p,o,q,n){if(p!="Undo"&&p!="Redo"&&p!="mceRepaint"&&(!n||!n.skip_undo)){l.beforeChange()}});h.onExecCommand.add(function(m,p,o,q,n){if(p!="Undo"&&p!="Redo"&&p!="mceRepaint"&&(!n||!n.skip_undo)){l.add()}});h.onSaveContent.add(d);h.dom.bind(h.dom.getRoot(),"dragend",d);h.dom.bind(h.getDoc(),b.isGecko?"blur":"focusout",function(m){if(!h.removed&&l.typing){d()}});h.onKeyUp.add(function(m,o){var n=o.keyCode;if((n>=33&&n<=36)||(n>=37&&n<=40)||n==45||n==13||o.ctrlKey){d()}});h.onKeyDown.add(function(m,o){var n=o.keyCode;if((n>=33&&n<=36)||(n>=37&&n<=40)||n==45){if(l.typing){d()}return}if((n<16||n>20)&&n!=224&&n!=91&&!l.typing){l.beforeChange();l.typing=true;l.add()}});h.onMouseDown.add(function(m,n){if(l.typing){d()}});h.addShortcut("ctrl+z","undo_desc","Undo");h.addShortcut("ctrl+y","redo_desc","Redo");l={data:e,typing:false,onBeforeAdd:onBeforeAdd,onAdd:k,onUndo:j,onRedo:f,beforeChange:function(){g=h.selection.getBookmark(2,true)},add:function(p){var m,n=h.settings,o;p=p||{};p.content=c();l.onBeforeAdd.dispatch(l,p);o=e[i];if(o&&o.content==p.content){return null}if(e[i]){e[i].beforeBookmark=g}if(n.custom_undo_redo_levels){if(e.length>n.custom_undo_redo_levels){for(m=0;m<e.length-1;m++){e[m]=e[m+1]}e.length--;i=e.length}}p.bookmark=h.selection.getBookmark(2,true);if(i<e.length-1){e.length=i+1}e.push(p);i=e.length-1;l.onAdd.dispatch(l,p);h.isNotDirty=0;return p},undo:function(){var n,m;if(l.typing){l.add();l.typing=false}if(i>0){n=e[--i];h.setContent(n.content,{format:"raw"});h.selection.moveToBookmark(n.beforeBookmark);l.onUndo.dispatch(l,n)}return n},redo:function(){var m;if(i<e.length-1){m=e[++i];h.setContent(m.content,{format:"raw"});h.selection.moveToBookmark(m.bookmark);l.onRedo.dispatch(l,m)}return m},clear:function(){e=[];i=0;l.typing=false},hasUndo:function(){return i>0||this.typing},hasRedo:function(){return i<e.length-1&&!this.typing}};return l}})(tinymce);tinymce.ForceBlocks=function(c){var b=c.settings,e=c.dom,a=c.selection,d=c.schema.getBlockElements();function f(){var j=a.getStart(),h=c.getBody(),g,k,o,s,q,i,l,m=-16777215,p,r;if(!j||j.nodeType!==1||!b.forced_root_block){return}while(j&&j!=h){if(d[j.nodeName]){return}j=j.parentNode}g=a.getRng();if(g.setStart){k=g.startContainer;o=g.startOffset;s=g.endContainer;q=g.endOffset}else{if(g.item){j=g.item(0);g=c.getDoc().body.createTextRange();g.moveToElementText(j)}r=g.parentElement().ownerDocument===c.getDoc();tmpRng=g.duplicate();tmpRng.collapse(true);o=tmpRng.move("character",m)*-1;if(!tmpRng.collapsed){tmpRng=g.duplicate();tmpRng.collapse(false);q=(tmpRng.move("character",m)*-1)-o}}j=h.firstChild;while(j){if(j.nodeType===3||(j.nodeType==1&&!d[j.nodeName])){if(!i){i=e.create(b.forced_root_block);j.parentNode.insertBefore(i,j);p=true}l=j;j=j.nextSibling;i.appendChild(l)}else{i=null;j=j.nextSibling}}if(p){if(g.setStart){g.setStart(k,o);g.setEnd(s,q);a.setRng(g)}else{if(r){try{g=c.getDoc().body.createTextRange();g.moveToElementText(h);g.collapse(true);g.moveStart("character",o);if(q>0){g.moveEnd("character",q)}g.select()}catch(n){}}}c.nodeChanged()}}if(b.forced_root_block){c.onKeyUp.add(f);c.onNodeChange.add(f)}};(function(c){var b=c.DOM,a=c.dom.Event,d=c.each,e=c.extend;c.create("tinymce.ControlManager",{ControlManager:function(f,j){var h=this,g;j=j||{};h.editor=f;h.controls={};h.onAdd=new c.util.Dispatcher(h);h.onPostRender=new c.util.Dispatcher(h);h.prefix=j.prefix||f.id+"_";h._cls={};h.onPostRender.add(function(){d(h.controls,function(i){i.postRender()})})},get:function(f){return this.controls[this.prefix+f]||this.controls[f]},setActive:function(h,f){var g=null;if(g=this.get(h)){g.setActive(f)}return g},setDisabled:function(h,f){var g=null;if(g=this.get(h)){g.setDisabled(f)}return g},add:function(g){var f=this;if(g){f.controls[g.id]=g;f.onAdd.dispatch(g,f)}return g},createControl:function(j){var o,k,g,h=this,m=h.editor,n,f;if(!h.controlFactories){h.controlFactories=[];d(m.plugins,function(i){if(i.createControl){h.controlFactories.push(i)}})}n=h.controlFactories;for(k=0,g=n.length;k<g;k++){o=n[k].createControl(j,h);if(o){return h.add(o)}}if(j==="|"||j==="separator"){return h.createSeparator()}if(m.buttons&&(o=m.buttons[j])){return h.createButton(j,o)}return h.add(o)},createDropMenu:function(f,n,h){var m=this,i=m.editor,j,g,k,l;n=e({"class":"mceDropDown",constrain:i.settings.constrain_menus},n);n["class"]=n["class"]+" "+i.getParam("skin")+"Skin";if(k=i.getParam("skin_variant")){n["class"]+=" "+i.getParam("skin")+"Skin"+k.substring(0,1).toUpperCase()+k.substring(1)}n["class"]+=i.settings.directionality=="rtl"?" mceRtl":"";f=m.prefix+f;l=h||m._cls.dropmenu||c.ui.DropMenu;j=m.controls[f]=new l(f,n);j.onAddItem.add(function(r,q){var p=q.settings;p.title=i.getLang(p.title,p.title);if(!p.onclick){p.onclick=function(o){if(p.cmd){i.execCommand(p.cmd,p.ui||false,p.value)}}}});i.onRemove.add(function(){j.destroy()});if(c.isIE){j.onShowMenu.add(function(){i.focus();g=i.selection.getBookmark(1)});j.onHideMenu.add(function(){if(g){i.selection.moveToBookmark(g);g=0}})}return m.add(j)},createListBox:function(f,n,h){var l=this,j=l.editor,i,k,m;if(l.get(f)){return null}n.title=j.translate(n.title);n.scope=n.scope||j;if(!n.onselect){n.onselect=function(o){j.execCommand(n.cmd,n.ui||false,o||n.value)}}n=e({title:n.title,"class":"mce_"+f,scope:n.scope,control_manager:l},n);f=l.prefix+f;function g(o){return o.settings.use_accessible_selects&&!c.isGecko}if(j.settings.use_native_selects||g(j)){k=new c.ui.NativeListBox(f,n)}else{m=h||l._cls.listbox||c.ui.ListBox;k=new m(f,n,j)}l.controls[f]=k;if(c.isWebKit){k.onPostRender.add(function(p,o){a.add(o,"mousedown",function(){j.bookmark=j.selection.getBookmark(1)});a.add(o,"focus",function(){j.selection.moveToBookmark(j.bookmark);j.bookmark=null})})}if(k.hideMenu){j.onMouseDown.add(k.hideMenu,k)}return l.add(k)},createButton:function(m,i,l){var h=this,g=h.editor,j,k,f;if(h.get(m)){return null}i.title=g.translate(i.title);i.label=g.translate(i.label);i.scope=i.scope||g;if(!i.onclick&&!i.menu_button){i.onclick=function(){g.execCommand(i.cmd,i.ui||false,i.value)}}i=e({title:i.title,"class":"mce_"+m,unavailable_prefix:g.getLang("unavailable",""),scope:i.scope,control_manager:h},i);m=h.prefix+m;if(i.menu_button){f=l||h._cls.menubutton||c.ui.MenuButton;k=new f(m,i,g);g.onMouseDown.add(k.hideMenu,k)}else{f=h._cls.button||c.ui.Button;k=new f(m,i,g)}return h.add(k)},createMenuButton:function(h,f,g){f=f||{};f.menu_button=1;return this.createButton(h,f,g)},createSplitButton:function(m,i,l){var h=this,g=h.editor,j,k,f;if(h.get(m)){return null}i.title=g.translate(i.title);i.scope=i.scope||g;if(!i.onclick){i.onclick=function(n){g.execCommand(i.cmd,i.ui||false,n||i.value)}}if(!i.onselect){i.onselect=function(n){g.execCommand(i.cmd,i.ui||false,n||i.value)}}i=e({title:i.title,"class":"mce_"+m,scope:i.scope,control_manager:h},i);m=h.prefix+m;f=l||h._cls.splitbutton||c.ui.SplitButton;k=h.add(new f(m,i,g));g.onMouseDown.add(k.hideMenu,k);return k},createColorSplitButton:function(f,n,h){var l=this,j=l.editor,i,k,m,g;if(l.get(f)){return null}n.title=j.translate(n.title);n.scope=n.scope||j;if(!n.onclick){n.onclick=function(o){if(c.isIE){g=j.selection.getBookmark(1)}j.execCommand(n.cmd,n.ui||false,o||n.value)}}if(!n.onselect){n.onselect=function(o){j.execCommand(n.cmd,n.ui||false,o||n.value)}}n=e({title:n.title,"class":"mce_"+f,menu_class:j.getParam("skin")+"Skin",scope:n.scope,more_colors_title:j.getLang("more_colors")},n);f=l.prefix+f;m=h||l._cls.colorsplitbutton||c.ui.ColorSplitButton;k=new m(f,n,j);j.onMouseDown.add(k.hideMenu,k);j.onRemove.add(function(){k.destroy()});if(c.isIE){k.onShowMenu.add(function(){j.focus();g=j.selection.getBookmark(1)});k.onHideMenu.add(function(){if(g){j.selection.moveToBookmark(g);g=0}})}return l.add(k)},createToolbar:function(k,h,j){var i,g=this,f;k=g.prefix+k;f=j||g._cls.toolbar||c.ui.Toolbar;i=new f(k,h,g.editor);if(g.get(k)){return null}return g.add(i)},createToolbarGroup:function(k,h,j){var i,g=this,f;k=g.prefix+k;f=j||this._cls.toolbarGroup||c.ui.ToolbarGroup;i=new f(k,h,g.editor);if(g.get(k)){return null}return g.add(i)},createSeparator:function(g){var f=g||this._cls.separator||c.ui.Separator;return new f()},setControlType:function(g,f){return this._cls[g.toLowerCase()]=f},destroy:function(){d(this.controls,function(f){f.destroy()});this.controls=null}})})(tinymce);(function(d){var a=d.util.Dispatcher,e=d.each,c=d.isIE,b=d.isOpera;d.create("tinymce.WindowManager",{WindowManager:function(f){var g=this;g.editor=f;g.onOpen=new a(g);g.onClose=new a(g);g.params={};g.features={}},open:function(z,h){var v=this,k="",n,m,i=v.editor.settings.dialog_type=="modal",q,o,j,g=d.DOM.getViewPort(),r;z=z||{};h=h||{};o=b?g.w:screen.width;j=b?g.h:screen.height;z.name=z.name||"mc_"+new Date().getTime();z.width=parseInt(z.width||320);z.height=parseInt(z.height||240);z.resizable=true;z.left=z.left||parseInt(o/2)-(z.width/2);z.top=z.top||parseInt(j/2)-(z.height/2);h.inline=false;h.mce_width=z.width;h.mce_height=z.height;h.mce_auto_focus=z.auto_focus;if(i){if(c){z.center=true;z.help=false;z.dialogWidth=z.width+"px";z.dialogHeight=z.height+"px";z.scroll=z.scrollbars||false}}e(z,function(p,f){if(d.is(p,"boolean")){p=p?"yes":"no"}if(!/^(name|url)$/.test(f)){if(c&&i){k+=(k?";":"")+f+":"+p}else{k+=(k?",":"")+f+"="+p}}});v.features=z;v.params=h;v.onOpen.dispatch(v,z,h);r=z.url||z.file;r=d._addVer(r);try{if(c&&i){q=1;window.showModalDialog(r,window,k)}else{q=window.open(r,z.name,k)}}catch(l){}if(!q){alert(v.editor.getLang("popup_blocked"))}},close:function(f){f.close();this.onClose.dispatch(this)},createInstance:function(i,h,g,m,l,k){var j=d.resolve(i);return new j(h,g,m,l,k)},confirm:function(h,f,i,g){g=g||window;f.call(i||this,g.confirm(this._decode(this.editor.getLang(h,h))))},alert:function(h,f,j,g){var i=this;g=g||window;g.alert(i._decode(i.editor.getLang(h,h)));if(f){f.call(j||i)}},resizeBy:function(f,g,h){h.resizeBy(f,g)},_decode:function(f){return d.DOM.decode(f).replace(/\\n/g,"\n")}})}(tinymce));(function(a){a.Formatter=function(aa){var Q={},T=a.each,c=aa.dom,r=aa.selection,t=a.dom.TreeWalker,N=new a.dom.RangeUtils(c),d=aa.schema.isValidChild,H=c.isBlock,m=aa.settings.forced_root_block,s=c.nodeIndex,G=a.isGecko?"\u200B":"\uFEFF",e=/^(src|href|style)$/,X=false,C=true,P,D,x=c.getContentEditable;function A(ab){return ab instanceof Array}function n(ac,ab){return c.getParents(ac,ab,c.getRoot())}function b(ab){return ab.nodeType===1&&ab.id==="_mce_caret"}function j(){l({alignleft:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"left"},defaultBlock:"div"},{selector:"img,table",collapsed:false,styles:{"float":"left"}}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"center"},defaultBlock:"div"},{selector:"img",collapsed:false,styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",collapsed:false,styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"right"},defaultBlock:"div"},{selector:"img,table",collapsed:false,styles:{"float":"right"}}],alignfull:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"justify"},defaultBlock:"div"}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:true},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:true},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},wrap_links:false},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},wrap_links:false},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},link:{inline:"a",selector:"a",remove:"all",split:true,deep:true,onmatch:function(ab){return true},onformat:function(ad,ab,ac){T(ac,function(af,ae){c.setAttrib(ad,ae,af)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike",remove:"all",split:true,expand:false,block_expand:true,deep:true},{selector:"span",attributes:["style","class"],remove:"empty",split:true,expand:false,deep:true},{selector:"*",attributes:["style","class"],split:false,expand:false,deep:true}]});T("p h1 h2 h3 h4 h5 h6 div address pre div code dt dd samp".split(/\s/),function(ab){l(ab,{block:ab,remove:"all"})});l(aa.settings.formats)}function W(){aa.addShortcut("ctrl+b","bold_desc","Bold");aa.addShortcut("ctrl+i","italic_desc","Italic");aa.addShortcut("ctrl+u","underline_desc","Underline");for(var ab=1;ab<=6;ab++){aa.addShortcut("ctrl+"+ab,"",["FormatBlock",false,"h"+ab])}aa.addShortcut("ctrl+7","",["FormatBlock",false,"p"]);aa.addShortcut("ctrl+8","",["FormatBlock",false,"div"]);aa.addShortcut("ctrl+9","",["FormatBlock",false,"address"])}function V(ab){return ab?Q[ab]:Q}function l(ab,ac){if(ab){if(typeof(ab)!=="string"){T(ab,function(ae,ad){l(ad,ae)})}else{ac=ac.length?ac:[ac];T(ac,function(ad){if(ad.deep===D){ad.deep=!ad.selector}if(ad.split===D){ad.split=!ad.selector||ad.inline}if(ad.remove===D&&ad.selector&&!ad.inline){ad.remove="none"}if(ad.selector&&ad.inline){ad.mixed=true;ad.block_expand=true}if(typeof(ad.classes)==="string"){ad.classes=ad.classes.split(/\s+/)}});Q[ab]=ac}}}var i=function(ac){var ab;aa.dom.getParent(ac,function(ad){ab=aa.dom.getStyle(ad,"text-decoration");return ab&&ab!=="none"});return ab};var L=function(ab){var ac;if(ab.nodeType===1&&ab.parentNode&&ab.parentNode.nodeType===1){ac=i(ab.parentNode);if(aa.dom.getStyle(ab,"color")&&ac){aa.dom.setStyle(ab,"text-decoration",ac)}else{if(aa.dom.getStyle(ab,"textdecoration")===ac){aa.dom.setStyle(ab,"text-decoration",null)}}}};function Y(ae,al,ag){var ah=V(ae),am=ah[0],ak,ac,aj,ai=r.isCollapsed();function ab(aq,ap){ap=ap||am;if(aq){if(ap.onformat){ap.onformat(aq,ap,al,ag)}T(ap.styles,function(at,ar){c.setStyle(aq,ar,q(at,al))});T(ap.attributes,function(at,ar){c.setAttrib(aq,ar,q(at,al))});T(ap.classes,function(ar){ar=q(ar,al);if(!c.hasClass(aq,ar)){c.addClass(aq,ar)}})}}function af(){function ar(ay,aw){var ax=new t(aw);for(ag=ax.current();ag;ag=ax.prev()){if(ag.childNodes.length>1||ag==ay||ag.tagName=="BR"){return ag}}}var aq=aa.selection.getRng();var av=aq.startContainer;var ap=aq.endContainer;if(av!=ap&&aq.endOffset===0){var au=ar(av,ap);var at=au.nodeType==3?au.length:au.childNodes.length;aq.setEnd(au,at)}return aq}function ad(at,ay,aw,av,aq){var ap=[],ar=-1,ax,aA=-1,au=-1,az;T(at.childNodes,function(aC,aB){if(aC.nodeName==="UL"||aC.nodeName==="OL"){ar=aB;ax=aC;return false}});T(at.childNodes,function(aC,aB){if(aC.nodeName==="SPAN"&&c.getAttrib(aC,"data-mce-type")=="bookmark"){if(aC.id==ay.id+"_start"){aA=aB}else{if(aC.id==ay.id+"_end"){au=aB}}}});if(ar<=0||(aA<ar&&au>ar)){T(a.grep(at.childNodes),aq);return 0}else{az=c.clone(aw,X);T(a.grep(at.childNodes),function(aC,aB){if((aA<ar&&aB<ar)||(aA>ar&&aB>ar)){ap.push(aC);aC.parentNode.removeChild(aC)}});if(aA<ar){at.insertBefore(az,ax)}else{if(aA>ar){at.insertBefore(az,ax.nextSibling)}}av.push(az);T(ap,function(aB){az.appendChild(aB)});return az}}function an(aq,at,aw){var ap=[],av,ar,au=true;av=am.inline||am.block;ar=c.create(av);ab(ar);N.walk(aq,function(ax){var ay;function az(aA){var aF,aD,aB,aC,aE;aE=au;aF=aA.nodeName.toLowerCase();aD=aA.parentNode.nodeName.toLowerCase();if(aA.nodeType===1&&x(aA)){aE=au;au=x(aA)==="true";aC=true}if(g(aF,"br")){ay=0;if(am.block){c.remove(aA)}return}if(am.wrapper&&y(aA,ae,al)){ay=0;return}if(au&&!aC&&am.block&&!am.wrapper&&I(aF)){aA=c.rename(aA,av);ab(aA);ap.push(aA);ay=0;return}if(am.selector){T(ah,function(aG){if("collapsed" in aG&&aG.collapsed!==ai){return}if(c.is(aA,aG.selector)&&!b(aA)){ab(aA,aG);aB=true}});if(!am.inline||aB){ay=0;return}}if(au&&!aC&&d(av,aF)&&d(aD,av)&&!(!aw&&aA.nodeType===3&&aA.nodeValue.length===1&&aA.nodeValue.charCodeAt(0)===65279)&&!b(aA)){if(!ay){ay=c.clone(ar,X);aA.parentNode.insertBefore(ay,aA);ap.push(ay)}ay.appendChild(aA)}else{if(aF=="li"&&at){ay=ad(aA,at,ar,ap,az)}else{ay=0;T(a.grep(aA.childNodes),az);if(aC){au=aE}ay=0}}}T(ax,az)});if(am.wrap_links===false){T(ap,function(ax){function ay(aC){var aB,aA,az;if(aC.nodeName==="A"){aA=c.clone(ar,X);ap.push(aA);az=a.grep(aC.childNodes);for(aB=0;aB<az.length;aB++){aA.appendChild(az[aB])}aC.appendChild(aA)}T(a.grep(aC.childNodes),ay)}ay(ax)})}T(ap,function(az){var ax;function aA(aC){var aB=0;T(aC.childNodes,function(aD){if(!f(aD)&&!K(aD)){aB++}});return aB}function ay(aB){var aD,aC;T(aB.childNodes,function(aE){if(aE.nodeType==1&&!K(aE)&&!b(aE)){aD=aE;return X}});if(aD&&h(aD,am)){aC=c.clone(aD,X);ab(aC);c.replace(aC,aB,C);c.remove(aD,1)}return aC||aB}ax=aA(az);if((ap.length>1||!H(az))&&ax===0){c.remove(az,1);return}if(am.inline||am.wrapper){if(!am.exact&&ax===1){az=ay(az)}T(ah,function(aB){T(c.select(aB.inline,az),function(aD){var aC;if(aB.wrap_links===false){aC=aD.parentNode;do{if(aC.nodeName==="A"){return}}while(aC=aC.parentNode)}Z(aB,al,aD,aB.exact?aD:null)})});if(y(az.parentNode,ae,al)){c.remove(az,1);az=0;return C}if(am.merge_with_parents){c.getParent(az.parentNode,function(aB){if(y(aB,ae,al)){c.remove(az,1);az=0;return C}})}if(az&&am.merge_siblings!==false){az=u(E(az),az);az=u(az,E(az,C))}}})}if(am){if(ag){if(ag.nodeType){ac=c.createRng();ac.setStartBefore(ag);ac.setEndAfter(ag);an(p(ac,ah),null,true)}else{an(ag,null,true)}}else{if(!ai||!am.inline||c.select("td.mceSelected,th.mceSelected").length){var ao=aa.selection.getNode();if(!m&&ah[0].defaultBlock&&!c.getParent(ao,c.isBlock)){Y(ah[0].defaultBlock)}aa.selection.setRng(af());ak=r.getBookmark();an(p(r.getRng(C),ah),ak);if(am.styles&&(am.styles.color||am.styles.textDecoration)){a.walk(ao,L,"childNodes");L(ao)}r.moveToBookmark(ak);R(r.getRng(C));aa.nodeChanged()}else{U("apply",ae,al)}}}}function B(ad,am,af){var ag=V(ad),ao=ag[0],ak,aj,ac,al=true;function ae(av){var au,at,ar,aq,ax,aw;if(av.nodeType===1&&x(av)){ax=al;al=x(av)==="true";aw=true}au=a.grep(av.childNodes);if(al&&!aw){for(at=0,ar=ag.length;at<ar;at++){if(Z(ag[at],am,av,av)){break}}}if(ao.deep){if(au.length){for(at=0,ar=au.length;at<ar;at++){ae(au[at])}if(aw){al=ax}}}}function ah(aq){var ar;T(n(aq.parentNode).reverse(),function(at){var au;if(!ar&&at.id!="_start"&&at.id!="_end"){au=y(at,ad,am);if(au&&au.split!==false){ar=at}}});return ar}function ab(au,aq,aw,az){var aA,ay,ax,at,av,ar;if(au){ar=au.parentNode;for(aA=aq.parentNode;aA&&aA!=ar;aA=aA.parentNode){ay=c.clone(aA,X);for(av=0;av<ag.length;av++){if(Z(ag[av],am,ay,ay)){ay=0;break}}if(ay){if(ax){ay.appendChild(ax)}if(!at){at=ay}ax=ay}}if(az&&(!ao.mixed||!H(au))){aq=c.split(au,aq)}if(ax){aw.parentNode.insertBefore(ax,aw);at.appendChild(aw)}}return aq}function an(aq){return ab(ah(aq),aq,aq,true)}function ai(at){var ar=c.get(at?"_start":"_end"),aq=ar[at?"firstChild":"lastChild"];if(K(aq)){aq=aq[at?"firstChild":"lastChild"]}c.remove(ar,true);return aq}function ap(aq){var at,au,ar;aq=p(aq,ag,C);if(ao.split){at=M(aq,C);au=M(aq);if(at!=au){if(/^(TR|TD)$/.test(at.nodeName)&&at.firstChild){at=(at.nodeName=="TD"?at.firstChild:at.firstChild.firstChild)||at}at=S(at,"span",{id:"_start","data-mce-type":"bookmark"});au=S(au,"span",{id:"_end","data-mce-type":"bookmark"});an(at);an(au);at=ai(C);au=ai()}else{at=au=an(at)}aq.startContainer=at.parentNode;aq.startOffset=s(at);aq.endContainer=au.parentNode;aq.endOffset=s(au)+1}N.walk(aq,function(av){T(av,function(aw){ae(aw);if(aw.nodeType===1&&aa.dom.getStyle(aw,"text-decoration")==="underline"&&aw.parentNode&&i(aw.parentNode)==="underline"){Z({deep:false,exact:true,inline:"span",styles:{textDecoration:"underline"}},null,aw)}})})}if(af){if(af.nodeType){ac=c.createRng();ac.setStartBefore(af);ac.setEndAfter(af);ap(ac)}else{ap(af)}return}if(!r.isCollapsed()||!ao.inline||c.select("td.mceSelected,th.mceSelected").length){ak=r.getBookmark();ap(r.getRng(C));r.moveToBookmark(ak);if(ao.inline&&k(ad,am,r.getStart())){R(r.getRng(true))}aa.nodeChanged()}else{U("remove",ad,am)}}function F(ac,ae,ad){var ab=V(ac);if(k(ac,ae,ad)&&(!("toggle" in ab[0])||ab[0].toggle)){B(ac,ae,ad)}else{Y(ac,ae,ad)}}function y(ac,ab,ah,af){var ad=V(ab),ai,ag,ae;function aj(an,ap,aq){var am,ao,ak=ap[aq],al;if(ap.onmatch){return ap.onmatch(an,ap,aq)}if(ak){if(ak.length===D){for(am in ak){if(ak.hasOwnProperty(am)){if(aq==="attributes"){ao=c.getAttrib(an,am)}else{ao=O(an,am)}if(af&&!ao&&!ap.exact){return}if((!af||ap.exact)&&!g(ao,q(ak[am],ah))){return}}}}else{for(al=0;al<ak.length;al++){if(aq==="attributes"?c.getAttrib(an,ak[al]):O(an,ak[al])){return ap}}}}return ap}if(ad&&ac){for(ag=0;ag<ad.length;ag++){ai=ad[ag];if(h(ac,ai)&&aj(ac,ai,"attributes")&&aj(ac,ai,"styles")){if(ae=ai.classes){for(ag=0;ag<ae.length;ag++){if(!c.hasClass(ac,ae[ag])){return}}}return ai}}}}function k(ad,af,ae){var ac;function ab(ag){ag=c.getParent(ag,function(ah){return !!y(ah,ad,af,true)});return y(ag,ad,af)}if(ae){return ab(ae)}ae=r.getNode();if(ab(ae)){return C}ac=r.getStart();if(ac!=ae){if(ab(ac)){return C}}return X}function v(ai,ah){var af,ag=[],ae={},ad,ac,ab;af=r.getStart();c.getParent(af,function(al){var ak,aj;for(ak=0;ak<ai.length;ak++){aj=ai[ak];if(!ae[aj]&&y(al,aj,ah)){ae[aj]=true;ag.push(aj)}}},c.getRoot());return ag}function z(af){var ah=V(af),ae,ad,ag,ac,ab;if(ah){ae=r.getStart();ad=n(ae);for(ac=ah.length-1;ac>=0;ac--){ab=ah[ac].selector;if(!ab){return C}for(ag=ad.length-1;ag>=0;ag--){if(c.is(ad[ag],ab)){return C}}}}return X}function J(ab,ad){var ac;if(!P){P={};ac={};aa.onNodeChange.addToTop(function(af,ae,ah){var ag=n(ah),ai={};T(P,function(aj,ak){T(ag,function(al){if(y(al,ak,{},true)){if(!ac[ak]){T(aj,function(am){am(true,{node:al,format:ak,parents:ag})});ac[ak]=aj}ai[ak]=aj;return false}})});T(ac,function(aj,ak){if(!ai[ak]){delete ac[ak];T(aj,function(al){al(false,{node:ah,format:ak,parents:ag})})}})})}T(ab.split(","),function(ae){if(!P[ae]){P[ae]=[]}P[ae].push(ad)});return this}a.extend(this,{get:V,register:l,apply:Y,remove:B,toggle:F,match:k,matchAll:v,matchNode:y,canApply:z,formatChanged:J});j();W();function h(ab,ac){if(g(ab,ac.inline)){return C}if(g(ab,ac.block)){return C}if(ac.selector){return c.is(ab,ac.selector)}}function g(ac,ab){ac=ac||"";ab=ab||"";ac=""+(ac.nodeName||ac);ab=""+(ab.nodeName||ab);return ac.toLowerCase()==ab.toLowerCase()}function O(ac,ab){var ad=c.getStyle(ac,ab);if(ab=="color"||ab=="backgroundColor"){ad=c.toHex(ad)}if(ab=="fontWeight"&&ad==700){ad="bold"}return""+ad}function q(ab,ac){if(typeof(ab)!="string"){ab=ab(ac)}else{if(ac){ab=ab.replace(/%(\w+)/g,function(ae,ad){return ac[ad]||ae})}}return ab}function f(ab){return ab&&ab.nodeType===3&&/^([\t \r\n]+|)$/.test(ab.nodeValue)}function S(ad,ac,ab){var ae=c.create(ac,ab);ad.parentNode.insertBefore(ae,ad);ae.appendChild(ad);return ae}function p(ab,am,ae){var ap,an,ah,al,ad=ab.startContainer,ai=ab.startOffset,ar=ab.endContainer,ak=ab.endOffset;function ao(az){var au,ax,ay,aw,av,at;au=ax=az?ad:ar;av=az?"previousSibling":"nextSibling";at=c.getRoot();if(au.nodeType==3&&!f(au)){if(az?ai>0:ak<au.nodeValue.length){return au}}for(;;){if(!am[0].block_expand&&H(ax)){return ax}for(aw=ax[av];aw;aw=aw[av]){if(!K(aw)&&!f(aw)){return ax}}if(ax.parentNode==at){au=ax;break}ax=ax.parentNode}return au}function ag(at,au){if(au===D){au=at.nodeType===3?at.length:at.childNodes.length}while(at&&at.hasChildNodes()){at=at.childNodes[au];if(at){au=at.nodeType===3?at.length:at.childNodes.length}}return{node:at,offset:au}}if(ad.nodeType==1&&ad.hasChildNodes()){an=ad.childNodes.length-1;ad=ad.childNodes[ai>an?an:ai];if(ad.nodeType==3){ai=0}}if(ar.nodeType==1&&ar.hasChildNodes()){an=ar.childNodes.length-1;ar=ar.childNodes[ak>an?an:ak-1];if(ar.nodeType==3){ak=ar.nodeValue.length}}function aq(au){var at=au;while(at){if(at.nodeType===1&&x(at)){return x(at)==="false"?at:au}at=at.parentNode}return au}function aj(au,ay,aA){var ax,av,az,at;function aw(aC,aE){var aF,aB,aD=aC.nodeValue;if(typeof(aE)=="undefined"){aE=aA?aD.length:0}if(aA){aF=aD.lastIndexOf(" ",aE);aB=aD.lastIndexOf("\u00a0",aE);aF=aF>aB?aF:aB;if(aF!==-1&&!ae){aF++}}else{aF=aD.indexOf(" ",aE);aB=aD.indexOf("\u00a0",aE);aF=aF!==-1&&(aB===-1||aF<aB)?aF:aB}return aF}if(au.nodeType===3){az=aw(au,ay);if(az!==-1){return{container:au,offset:az}}at=au}ax=new t(au,c.getParent(au,H)||aa.getBody());while(av=ax[aA?"prev":"next"]()){if(av.nodeType===3){at=av;az=aw(av);if(az!==-1){return{container:av,offset:az}}}else{if(H(av)){break}}}if(at){if(aA){ay=0}else{ay=at.length}return{container:at,offset:ay}}}function af(au,at){var av,aw,ay,ax;if(au.nodeType==3&&au.nodeValue.length===0&&au[at]){au=au[at]}av=n(au);for(aw=0;aw<av.length;aw++){for(ay=0;ay<am.length;ay++){ax=am[ay];if("collapsed" in ax&&ax.collapsed!==ab.collapsed){continue}if(c.is(av[aw],ax.selector)){return av[aw]}}}return au}function ac(au,at,aw){var av;if(!am[0].wrapper){av=c.getParent(au,am[0].block)}if(!av){av=c.getParent(au.nodeType==3?au.parentNode:au,H)}if(av&&am[0].wrapper){av=n(av,"ul,ol").reverse()[0]||av}if(!av){av=au;while(av[at]&&!H(av[at])){av=av[at];if(g(av,"br")){break}}}return av||au}ad=aq(ad);ar=aq(ar);if(K(ad.parentNode)||K(ad)){ad=K(ad)?ad:ad.parentNode;ad=ad.nextSibling||ad;if(ad.nodeType==3){ai=0}}if(K(ar.parentNode)||K(ar)){ar=K(ar)?ar:ar.parentNode;ar=ar.previousSibling||ar;if(ar.nodeType==3){ak=ar.length}}if(am[0].inline){if(ab.collapsed){al=aj(ad,ai,true);if(al){ad=al.container;ai=al.offset}al=aj(ar,ak);if(al){ar=al.container;ak=al.offset}}ah=ag(ar,ak);if(ah.node){while(ah.node&&ah.offset===0&&ah.node.previousSibling){ah=ag(ah.node.previousSibling)}if(ah.node&&ah.offset>0&&ah.node.nodeType===3&&ah.node.nodeValue.charAt(ah.offset-1)===" "){if(ah.offset>1){ar=ah.node;ar.splitText(ah.offset-1)}}}}if(am[0].inline||am[0].block_expand){if(!am[0].inline||(ad.nodeType!=3||ai===0)){ad=ao(true)}if(!am[0].inline||(ar.nodeType!=3||ak===ar.nodeValue.length)){ar=ao()}}if(am[0].selector&&am[0].expand!==X&&!am[0].inline){ad=af(ad,"previousSibling");ar=af(ar,"nextSibling")}if(am[0].block||am[0].selector){ad=ac(ad,"previousSibling");ar=ac(ar,"nextSibling");if(am[0].block){if(!H(ad)){ad=ao(true)}if(!H(ar)){ar=ao()}}}if(ad.nodeType==1){ai=s(ad);ad=ad.parentNode}if(ar.nodeType==1){ak=s(ar)+1;ar=ar.parentNode}return{startContainer:ad,startOffset:ai,endContainer:ar,endOffset:ak}}function Z(ah,ag,ae,ab){var ad,ac,af;if(!h(ae,ah)){return X}if(ah.remove!="all"){T(ah.styles,function(aj,ai){aj=q(aj,ag);if(typeof(ai)==="number"){ai=aj;ab=0}if(!ab||g(O(ab,ai),aj)){c.setStyle(ae,ai,"")}af=1});if(af&&c.getAttrib(ae,"style")==""){ae.removeAttribute("style");ae.removeAttribute("data-mce-style")}T(ah.attributes,function(ak,ai){var aj;ak=q(ak,ag);if(typeof(ai)==="number"){ai=ak;ab=0}if(!ab||g(c.getAttrib(ab,ai),ak)){if(ai=="class"){ak=c.getAttrib(ae,ai);if(ak){aj="";T(ak.split(/\s+/),function(al){if(/mce\w+/.test(al)){aj+=(aj?" ":"")+al}});if(aj){c.setAttrib(ae,ai,aj);return}}}if(ai=="class"){ae.removeAttribute("className")}if(e.test(ai)){ae.removeAttribute("data-mce-"+ai)}ae.removeAttribute(ai)}});T(ah.classes,function(ai){ai=q(ai,ag);if(!ab||c.hasClass(ab,ai)){c.removeClass(ae,ai)}});ac=c.getAttribs(ae);for(ad=0;ad<ac.length;ad++){if(ac[ad].nodeName.indexOf("_")!==0){return X}}}if(ah.remove!="none"){o(ae,ah);return C}}function o(ad,ae){var ab=ad.parentNode,ac;function af(ah,ag,ai){ah=E(ah,ag,ai);return !ah||(ah.nodeName=="BR"||H(ah))}if(ae.block){if(!m){if(H(ad)&&!H(ab)){if(!af(ad,X)&&!af(ad.firstChild,C,1)){ad.insertBefore(c.create("br"),ad.firstChild)}if(!af(ad,C)&&!af(ad.lastChild,X,1)){ad.appendChild(c.create("br"))}}}else{if(ab==c.getRoot()){if(!ae.list_block||!g(ad,ae.list_block)){T(a.grep(ad.childNodes),function(ag){if(d(m,ag.nodeName.toLowerCase())){if(!ac){ac=S(ag,m)}else{ac.appendChild(ag)}}else{ac=0}})}}}}if(ae.selector&&ae.inline&&!g(ae.inline,ad)){return}c.remove(ad,1)}function E(ac,ab,ad){if(ac){ab=ab?"nextSibling":"previousSibling";for(ac=ad?ac:ac[ab];ac;ac=ac[ab]){if(ac.nodeType==1||!f(ac)){return ac}}}}function K(ab){return ab&&ab.nodeType==1&&ab.getAttribute("data-mce-type")=="bookmark"}function u(af,ae){var ab,ad,ac;function ah(ak,aj){if(ak.nodeName!=aj.nodeName){return X}function ai(am){var an={};T(c.getAttribs(am),function(ao){var ap=ao.nodeName.toLowerCase();if(ap.indexOf("_")!==0&&ap!=="style"){an[ap]=c.getAttrib(am,ap)}});return an}function al(ap,ao){var an,am;for(am in ap){if(ap.hasOwnProperty(am)){an=ao[am];if(an===D){return X}if(ap[am]!=an){return X}delete ao[am]}}for(am in ao){if(ao.hasOwnProperty(am)){return X}}return C}if(!al(ai(ak),ai(aj))){return X}if(!al(c.parseStyle(c.getAttrib(ak,"style")),c.parseStyle(c.getAttrib(aj,"style")))){return X}return C}function ag(aj,ai){for(ad=aj;ad;ad=ad[ai]){if(ad.nodeType==3&&ad.nodeValue.length!==0){return aj}if(ad.nodeType==1&&!K(ad)){return ad}}return aj}if(af&&ae){af=ag(af,"previousSibling");ae=ag(ae,"nextSibling");if(ah(af,ae)){for(ad=af.nextSibling;ad&&ad!=ae;){ac=ad;ad=ad.nextSibling;af.appendChild(ac)}c.remove(ae);T(a.grep(ae.childNodes),function(ai){af.appendChild(ai)});return af}}return ae}function I(ab){return/^(h[1-6]|p|div|pre|address|dl|dt|dd)$/.test(ab)}function M(ac,ag){var ab,af,ad,ae;ab=ac[ag?"startContainer":"endContainer"];af=ac[ag?"startOffset":"endOffset"];if(ab.nodeType==1){ad=ab.childNodes.length-1;if(!ag&&af){af--}ab=ab.childNodes[af>ad?ad:af]}if(ab.nodeType===3&&ag&&af>=ab.nodeValue.length){ab=new t(ab,aa.getBody()).next()||ab}if(ab.nodeType===3&&!ag&&af===0){ab=new t(ab,aa.getBody()).prev()||ab}return ab}function U(ak,ab,ai){var al="_mce_caret",ac=aa.settings.caret_debug;function ad(ap){var ao=c.create("span",{id:al,"data-mce-bogus":true,style:ac?"color:red":""});if(ap){ao.appendChild(aa.getDoc().createTextNode(G))}return ao}function aj(ap,ao){while(ap){if((ap.nodeType===3&&ap.nodeValue!==G)||ap.childNodes.length>1){return false}if(ao&&ap.nodeType===1){ao.push(ap)}ap=ap.firstChild}return true}function ag(ao){while(ao){if(ao.id===al){return ao}ao=ao.parentNode}}function af(ao){var ap;if(ao){ap=new t(ao,ao);for(ao=ap.current();ao;ao=ap.next()){if(ao.nodeType===3){return ao}}}}function ae(aq,ap){var ar,ao;if(!aq){aq=ag(r.getStart());if(!aq){while(aq=c.get(al)){ae(aq,false)}}}else{ao=r.getRng(true);if(aj(aq)){if(ap!==false){ao.setStartBefore(aq);ao.setEndBefore(aq)}c.remove(aq)}else{ar=af(aq);if(ar.nodeValue.charAt(0)===G){ar=ar.deleteData(0,1)}c.remove(aq,1)}r.setRng(ao)}}function ah(){var aq,ao,av,au,ar,ap,at;aq=r.getRng(true);au=aq.startOffset;ap=aq.startContainer;at=ap.nodeValue;ao=ag(r.getStart());if(ao){av=af(ao)}if(at&&au>0&&au<at.length&&/\w/.test(at.charAt(au))&&/\w/.test(at.charAt(au-1))){ar=r.getBookmark();aq.collapse(true);aq=p(aq,V(ab));aq=N.split(aq);Y(ab,ai,aq);r.moveToBookmark(ar)}else{if(!ao||av.nodeValue!==G){ao=ad(true);av=ao.firstChild;aq.insertNode(ao);au=1;Y(ab,ai,ao)}else{Y(ab,ai,ao)}r.setCursorLocation(av,au)}}function am(){var ao=r.getRng(true),ap,ar,av,au,aq,ay,ax=[],at,aw;ap=ao.startContainer;ar=ao.startOffset;aq=ap;if(ap.nodeType==3){if(ar!=ap.nodeValue.length||ap.nodeValue===G){au=true}aq=aq.parentNode}while(aq){if(y(aq,ab,ai)){ay=aq;break}if(aq.nextSibling){au=true}ax.push(aq);aq=aq.parentNode}if(!ay){return}if(au){av=r.getBookmark();ao.collapse(true);ao=p(ao,V(ab),true);ao=N.split(ao);B(ab,ai,ao);r.moveToBookmark(av)}else{aw=ad();aq=aw;for(at=ax.length-1;at>=0;at--){aq.appendChild(c.clone(ax[at],false));aq=aq.firstChild}aq.appendChild(c.doc.createTextNode(G));aq=aq.firstChild;c.insertAfter(aw,ay);r.setCursorLocation(aq,1)}}function an(){var ap,ao,aq;ao=ag(r.getStart());if(ao&&!c.isEmpty(ao)){a.walk(ao,function(ar){if(ar.nodeType==1&&ar.id!==al&&!c.isEmpty(ar)){c.setAttrib(ar,"data-mce-bogus",null)}},"childNodes")}}if(!self._hasCaretEvents){aa.onBeforeGetContent.addToTop(function(){var ao=[],ap;if(aj(ag(r.getStart()),ao)){ap=ao.length;while(ap--){c.setAttrib(ao[ap],"data-mce-bogus","1")}}});a.each("onMouseUp onKeyUp".split(" "),function(ao){aa[ao].addToTop(function(){ae();an()})});aa.onKeyDown.addToTop(function(ao,aq){var ap=aq.keyCode;if(ap==8||ap==37||ap==39){ae(ag(r.getStart()))}an()});r.onSetContent.add(an);self._hasCaretEvents=true}if(ak=="apply"){ah()}else{am()}}function R(ac){var ab=ac.startContainer,ai=ac.startOffset,ae,ah,ag,ad,af;if(ab.nodeType==3&&ai>=ab.nodeValue.length){ai=s(ab);ab=ab.parentNode;ae=true}if(ab.nodeType==1){ad=ab.childNodes;ab=ad[Math.min(ai,ad.length-1)];ah=new t(ab,c.getParent(ab,c.isBlock));if(ai>ad.length-1||ae){ah.next()}for(ag=ah.current();ag;ag=ah.next()){if(ag.nodeType==3&&!f(ag)){af=c.create("a",null,G);ag.parentNode.insertBefore(af,ag);ac.setStart(ag,0);r.setRng(ac);c.remove(af);return}}}}}})(tinymce);tinymce.onAddEditor.add(function(e,a){var d,h,g,c=a.settings;function b(j,i){e.each(i,function(l,k){if(l){g.setStyle(j,k,l)}});g.rename(j,"span")}function f(i,j){g=i.dom;if(c.convert_fonts_to_spans){e.each(g.select("font,u,strike",j.node),function(k){d[k.nodeName.toLowerCase()](a.dom,k)})}}if(c.inline_styles){h=e.explode(c.font_size_legacy_values);d={font:function(j,i){b(i,{backgroundColor:i.style.backgroundColor,color:i.color,fontFamily:i.face,fontSize:h[parseInt(i.size,10)-1]})},u:function(j,i){b(i,{textDecoration:"underline"})},strike:function(j,i){b(i,{textDecoration:"line-through"})}};a.onPreProcess.add(f);a.onSetContent.add(f);a.onInit.add(function(){a.selection.onSetContent.add(f)})}});(function(b){var a=b.dom.TreeWalker;b.EnterKey=function(f){var i=f.dom,e=f.selection,d=f.settings,h=f.undoManager,c=f.schema.getNonEmptyElements();function g(A){var v=e.getRng(true),E,j,z,u,p,L,o,k,n,t,I,x,B;function D(M){return M&&i.isBlock(M)&&!/^(TD|TH|CAPTION|FORM)$/.test(M.nodeName)&&!/^(fixed|absolute)/i.test(M.style.position)&&i.getContentEditable(M)!=="true"}function F(N){var M;if(b.isIE&&i.isBlock(N)){M=e.getRng();N.appendChild(i.create("span",null,"\u00a0"));e.select(N);N.lastChild.outerHTML="";e.setRng(M)}}function y(O){var N=O,P=[],M;while(N=N.firstChild){if(i.isBlock(N)){return}if(N.nodeType==1&&!c[N.nodeName.toLowerCase()]){P.push(N)}}M=P.length;while(M--){N=P[M];if(!N.hasChildNodes()||(N.firstChild==N.lastChild&&N.firstChild.nodeValue==="")){i.remove(N)}}}function m(N){var S,Q,M,T,R,P=N,O;M=i.createRng();if(N.hasChildNodes()){S=new a(N,N);while(Q=S.current()){if(Q.nodeType==3){M.setStart(Q,0);M.setEnd(Q,0);break}if(c[Q.nodeName.toLowerCase()]){M.setStartBefore(Q);M.setEndBefore(Q);break}P=Q;Q=S.next()}if(!Q){M.setStart(P,0);M.setEnd(P,0)}}else{if(N.nodeName=="BR"){if(N.nextSibling&&i.isBlock(N.nextSibling)){if(!L||L<9){O=i.create("br");N.parentNode.insertBefore(O,N)}M.setStartBefore(N);M.setEndBefore(N)}else{M.setStartAfter(N);M.setEndAfter(N)}}else{M.setStart(N,0);M.setEnd(N,0)}}e.setRng(M);i.remove(O);R=i.getViewPort(f.getWin());T=i.getPos(N).y;if(T<R.y||T+25>R.y+R.h){f.getWin().scrollTo(0,T<R.y?T:T-R.h+25)}}function r(N){var O=z,Q,P,M;Q=N||t=="TABLE"?i.create(N||x):p.cloneNode(false);M=Q;if(d.keep_styles!==false){do{if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(O.nodeName)){P=O.cloneNode(false);i.setAttrib(P,"id","");if(Q.hasChildNodes()){P.appendChild(Q.firstChild);Q.appendChild(P)}else{M=P;Q.appendChild(P)}}}while(O=O.parentNode)}if(!b.isIE){M.innerHTML="<br>"}return Q}function q(P){var O,N,M;if(z.nodeType==3&&(P?u>0:u<z.nodeValue.length)){return false}if(z.parentNode==p&&B&&!P){return true}if(P&&z.nodeType==1&&z==p.firstChild){return true}if(z.nodeName==="TABLE"||(z.previousSibling&&z.previousSibling.nodeName=="TABLE")){return(B&&!P)||(!B&&P)}O=new a(z,p);if(z.nodeType==3){if(P&&u==0){O.prev()}else{if(!P&&u==z.nodeValue.length){O.next()}}}while(N=O.current()){if(N.nodeType===1){if(!N.getAttribute("data-mce-bogus")){M=N.nodeName.toLowerCase();if(c[M]&&M!=="br"){return false}}}else{if(N.nodeType===3&&!/^[ \t\r\n]*$/.test(N.nodeValue)){return false}}if(P){O.prev()}else{O.next()}}return true}function l(M,S){var T,R,O,Q,P,N=x||"P";R=i.getParent(M,i.isBlock);if(!R||!D(R)){R=R||j;if(!R.hasChildNodes()){T=i.create(N);R.appendChild(T);v.setStart(T,0);v.setEnd(T,0);return T}Q=M;while(Q.parentNode!=R){Q=Q.parentNode}while(Q&&!i.isBlock(Q)){O=Q;Q=Q.previousSibling}if(O){T=i.create(N);O.parentNode.insertBefore(T,O);Q=O;while(Q&&!i.isBlock(Q)){P=Q.nextSibling;T.appendChild(Q);Q=P}v.setStart(M,S);v.setEnd(M,S)}}return M}function G(){function M(O){var N=n[O?"firstChild":"lastChild"];while(N){if(N.nodeType==1){break}N=N[O?"nextSibling":"previousSibling"]}return N===p}o=x?r(x):i.create("BR");if(M(true)&&M()){i.replace(o,n)}else{if(M(true)){n.parentNode.insertBefore(o,n)}else{if(M()){i.insertAfter(o,n);F(o)}else{E=v.cloneRange();E.setStartAfter(p);E.setEndAfter(n);k=E.extractContents();i.insertAfter(k,n);i.insertAfter(o,n)}}}i.remove(p);m(o);h.add()}function C(){var N=new a(z,p),M;while(M=N.current()){if(M.nodeName=="BR"){return true}M=N.next()}}function K(){var N,M;if(z&&z.nodeType==3&&u>=z.nodeValue.length){if(!b.isIE&&!C()){N=i.create("br");v.insertNode(N);v.setStartAfter(N);v.setEndAfter(N);M=true}}N=i.create("br");v.insertNode(N);if(b.isIE&&t=="PRE"&&(!L||L<8)){N.parentNode.insertBefore(i.doc.createTextNode("\r"),N)}if(!M){v.setStartAfter(N);v.setEndAfter(N)}else{v.setStartBefore(N);v.setEndBefore(N)}e.setRng(v);h.add()}function s(M){do{if(M.nodeType===3){M.nodeValue=M.nodeValue.replace(/^[\r\n]+/,"")}M=M.firstChild}while(M)}function J(O){var M=i.getRoot(),N,P;N=O;while(N!==M&&i.getContentEditable(N)!=="false"){if(i.getContentEditable(N)==="true"){P=N}N=N.parentNode}return N!==M?P:M}function H(N){var M;if(!b.isIE){N.normalize();M=N.lastChild;if(!M||(/^(left|right)$/gi.test(i.getStyle(M,"float",true)))){i.add(N,"br")}}}if(!v.collapsed){f.execCommand("Delete");return}if(A.isDefaultPrevented()){return}z=v.startContainer;u=v.startOffset;x=d.forced_root_block;x=x?x.toUpperCase():"";L=i.doc.documentMode;if(z.nodeType==1&&z.hasChildNodes()){B=u>z.childNodes.length-1;z=z.childNodes[Math.min(u,z.childNodes.length-1)]||z;if(B&&z.nodeType==3){u=z.nodeValue.length}else{u=0}}j=J(z);if(!j){return}h.beforeChange();if(!i.isBlock(j)&&j!=i.getRoot()){if(!x||A.shiftKey){K()}return}if((x&&!A.shiftKey)||(!x&&A.shiftKey)){z=l(z,u)}p=i.getParent(z,i.isBlock);n=p?i.getParent(p.parentNode,i.isBlock):null;t=p?p.nodeName.toUpperCase():"";I=n?n.nodeName.toUpperCase():"";if(t=="LI"&&i.isEmpty(p)){if(/^(UL|OL|LI)$/.test(n.parentNode.nodeName)){return false}G();return}if(t=="PRE"&&d.br_in_pre!==false){if(!A.shiftKey){K();return}}else{if((!x&&!A.shiftKey&&t!="LI")||(x&&A.shiftKey)){K();return}}x=x||"P";if(q()){if(/^(H[1-6]|PRE)$/.test(t)&&I!="HGROUP"){o=r(x)}else{o=r()}if(d.end_container_on_empty_block&&D(n)&&i.isEmpty(p)){o=i.split(n,p)}else{i.insertAfter(o,p)}m(o)}else{if(q(true)){o=p.parentNode.insertBefore(r(),p);F(o)}else{E=v.cloneRange();E.setEndAfter(p);k=E.extractContents();s(k);o=k.firstChild;i.insertAfter(k,p);y(o);H(p);m(o)}}i.setAttrib(o,"id","");h.add()}f.onKeyDown.add(function(k,j){if(j.keyCode==13){if(g(j)!==false){j.preventDefault()}}})}})(tinymce);
wordpress-creation-kit-api/assets/js/tiny_mce/tiny_mce_popup.js ADDED
@@ -0,0 +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();
wordpress-creation-kit-api/assets/js/tiny_mce/utils/editable_selects.js ADDED
@@ -0,0 +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
+ };
wordpress-creation-kit-api/assets/js/tiny_mce/utils/form_utils.js ADDED
@@ -0,0 +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
+ }
wordpress-creation-kit-api/assets/js/tiny_mce/utils/mctabs.js ADDED
@@ -0,0 +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
+ });
wordpress-creation-kit-api/assets/js/tiny_mce/utils/validate.js ADDED
@@ -0,0 +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
+ };
wordpress-creation-kit-api/assets/js/tiny_mce/wck_tiny_mce_init.js ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function wckInitTinyMCE( element ){
2
+ tinyMCE.init({
3
+ // General options
4
+ mode : "specific_textareas",
5
+ theme : "advanced",
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",
12
+ theme_advanced_buttons2:"formatselect,underline,justifyfull,forecolor,|,pastetext,pasteword,removeformat,|,charmap,|,outdent,indent,|,undo,redo,code",
13
+ theme_advanced_buttons3:"",
14
+ theme_advanced_buttons4:"",
15
+ theme_advanced_toolbar_location : "top",
16
+ theme_advanced_toolbar_align : "left",
17
+ theme_advanced_statusbar_location : "bottom",
18
+ theme_advanced_resizing : true,
19
+
20
+ // Skin options
21
+ skin : "wp_theme",
22
+ language : "en",
23
+ spellchecker_languages : "+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv"
24
+
25
+ });
26
+ }
wordpress-creation-kit-api/fields/checkbox.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* @param string $meta Meta name.
3
+ * @param array $details Contains the details for the field.
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
+ if( !empty( $details['options'] ) ){
9
+ $element .= '<div class="wck-checkboxes">';
10
+ foreach( $details['options'] as $option ){
11
+ $found = false;
12
+
13
+ if( !is_array( $value ) )
14
+ $values = explode( ', ', $value );
15
+ else
16
+ $values = $value;
17
+
18
+ if( strpos( $option, '%' ) === false ){
19
+ $label = $option;
20
+ $value_attr = $option;
21
+ if ( in_array( $option, $values ) )
22
+ $found = true;
23
+ }
24
+ else{
25
+ $option_parts = explode( '%', $option );
26
+ if( !empty( $option_parts ) ){
27
+ if( empty( $option_parts[0] ) && count( $option_parts ) == 3 ){
28
+ $label = $option_parts[1];
29
+ $value_attr = $option_parts[2];
30
+ if ( in_array( $option_parts[2], $values ) )
31
+ $found = true;
32
+ }
33
+ }
34
+ }
35
+
36
+ $element .= '<div><label><input type="checkbox" name="'. esc_attr( sanitize_title_with_dashes( remove_accents( $details['title'] ) ) ) .'" id="'. $frontend_prefix . esc_attr( sanitize_title_with_dashes( remove_accents( $details['title'] . '_' . $value_attr ) ) ) .'" value="'. esc_attr( $value_attr ) .'" '. checked( $found, true, false ) .'class="mb-checkbox mb-field" />'. esc_html( $label ) .'</label></div>' ;
37
+ }
38
+ $element .= '</div>';
39
+ }
40
+
41
+ ?>
wordpress-creation-kit-api/fields/radio.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* @param string $meta Meta name.
3
+ * @param array $details Contains the details for the field.
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
+ if( !empty( $details['options'] ) ){
9
+ $element .= '<div class="wck-radiobuttons">';
10
+ foreach( $details['options'] as $option ){
11
+ $found = false;
12
+
13
+ $values = explode( ', ', $value );
14
+ if( strpos( $option, '%' ) === false ){
15
+ $label = $option;
16
+ $value_attr = $option;
17
+ if ( in_array( $option, $values ) )
18
+ $found = true;
19
+ }
20
+ else{
21
+ $option_parts = explode( '%', $option );
22
+ if( !empty( $option_parts ) ){
23
+ if( empty( $option_parts[0] ) && count( $option_parts ) == 3 ){
24
+ $label = $option_parts[1];
25
+ $value_attr = $option_parts[2];
26
+ if ( in_array( $option_parts[2], $values ) )
27
+ $found = true;
28
+ }
29
+ }
30
+ }
31
+
32
+ $element .= '<div><label><input type="radio" name="'. esc_attr( sanitize_title_with_dashes( remove_accents( $details['title'] ) ) ) .'" id="'. $frontend_prefix . esc_attr( sanitize_title_with_dashes( remove_accents( $details['title'] . '_' . $value_attr ) ) ) .'" value="'. esc_attr( $value_attr ) .'" '. checked( $found, true, false ) .'class="mb-radio mb-field" />'. esc_html( $label ) .'</label></div>';
33
+ }
34
+ $element .= '</div>';
35
+ }
36
+ ?>
wordpress-creation-kit-api/fields/select.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* @param string $meta Meta name.
3
+ * @param array $details Contains the details for the field.
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
+ $element .= '<select name="'. esc_attr( sanitize_title_with_dashes( remove_accents( $details['title'] ) ) ) .'" id="'. $frontend_prefix . esc_attr( sanitize_title_with_dashes( remove_accents( $details['title'] ) ) ) .'" class="mb-select mb-field" >';
9
+
10
+ if( !empty( $details['default-option'] ) && $details['default-option'] )
11
+ $element .= '<option value="">'. __('...Chose', 'wck') .'</option>';
12
+
13
+ if( !empty( $details['options'] ) ){
14
+
15
+ $i = 0;
16
+ $options = '';
17
+ foreach( $details['options'] as $option ){
18
+
19
+ if( strpos( $option, '%' ) === false ){
20
+ $label = $option;
21
+ if( !empty( $details['values'] ) )
22
+ $value_attr = $details['values'][$i];
23
+ else
24
+ $value_attr = $option;
25
+ }
26
+ else{
27
+ $option_parts = explode( '%', $option );
28
+ if( !empty( $option_parts ) ){
29
+ if( empty( $option_parts[0] ) && count( $option_parts ) == 3 ){
30
+ $label = $option_parts[1];
31
+ if( !empty( $details['values'] ) )
32
+ $value_attr = $details['values'][$i];
33
+ else
34
+ $value_attr = $option_parts[2];
35
+ }
36
+ }
37
+ }
38
+
39
+ $options .= '<option value="'. esc_attr( $value_attr ) .'" '. selected( $value_attr, $value, false ) .' >'. esc_html( $label ) .'</option>';
40
+ $i++;
41
+ }
42
+ }
43
+ $field_name = sanitize_title_with_dashes( remove_accents( $details['title'] ) );
44
+ $element .= apply_filters( "wck_select_{$meta}_{$field_name}_options", $options );
45
+ $element .= '</select>';
46
+ ?>
wordpress-creation-kit-api/fields/text.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* @param string $meta Meta name.
3
+ * @param array $details Contains the details for the field.
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
+ $element .= '<input type="text" name="'. esc_attr( sanitize_title_with_dashes( remove_accents( $details['title'] ) ) ) .'" id="'. $frontend_prefix . esc_attr( sanitize_title_with_dashes( remove_accents( $details['title'] ) ) ) .'" value="'. esc_attr( $value ) .'" class="mb-text-input mb-field"/>';
10
+ ?>
wordpress-creation-kit-api/fields/textarea.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* @param string $meta Meta name.
3
+ * @param array $details Contains the details for the field.
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
+ $element .= '<textarea name="'. esc_attr( sanitize_title_with_dashes( remove_accents( $details['title'] ) ) ) .'" id="'. $frontend_prefix . esc_attr( sanitize_title_with_dashes( remove_accents( $details['title'] ) ) ) .'" style="vertical-align:top;" class="mb-textarea mb-field">'. esc_html( $value ) .'</textarea>';
9
+ ?>
wordpress-creation-kit-api/fields/upload.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* @param string $meta Meta name.
3
+ * @param array $details Contains the details for the field.
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( '-', '_', sanitize_title_with_dashes( remove_accents( $meta . $details['title'] ) ) );
10
+ $upload_info_div_id = str_replace( '-', '_', sanitize_title_with_dashes( remove_accents( $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( sanitize_title_with_dashes( remove_accents ( $details['title'] ) ) ) .'" value="'. $value .'" class="mb-text-input mb-field"/>';
14
+
15
+ /* container for the image preview (or file ico) and name and file type */
16
+ if( !empty ( $value ) ){
17
+ $file_src = wp_get_attachment_url($value);
18
+ $thumbnail = wp_get_attachment_image( $value, array( 80, 60 ), true );
19
+ $file_name = get_the_title( $value );
20
+
21
+ if ( preg_match( '/^.*?\.(\w+)$/', get_attached_file( $value ), $matches ) )
22
+ $file_type = esc_html( strtoupper( $matches[1] ) );
23
+ else
24
+ $file_type = strtoupper( str_replace( 'image/', '', get_post_mime_type( $value ) ) );
25
+ }
26
+ $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>';
27
+ if( !empty ( $value ) )
28
+ $element .= '<span class="wck-remove-upload">'.__( 'Remove', 'wck' ).'</span>';
29
+ $element .= '</p></div>';
30
+ /* the upload link. we send through get the hidden input id, details div id and meta name */
31
+ if( $details['attach_to_post'] )
32
+ $attach_to_post = 'post_id='. get_the_id() .'&amp;';
33
+ else
34
+ $attach_to_post = '';
35
+
36
+ $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';
37
+
38
+ $media_upload_url = admin_url( $media_upload_url );
39
+
40
+ $element .= '<a id="upload_'. esc_attr(sanitize_title_with_dashes( remove_accents( $details['title'] ) )) .'_button" class="button" onclick="tb_show(\'\', \''.$media_upload_url.'\');">'. __( 'Upload ', 'wck' ) . $details['title'] .' </a>';
41
+
42
+ /* add js global var for the hidden input, and info container div */
43
+ $element .= '<script type="text/javascript">';
44
+ $element .= 'window.'. $var_prefix . strtolower( $upload_input_id ) .' = jQuery(\''.$edit_class.'#'. $upload_input_id.'\');';
45
+ $element .= 'window.'. $var_prefix . strtolower( $upload_info_div_id ) .' = jQuery(\''.$edit_class.'#'. $upload_info_div_id.'\');';
46
+ $element .= '</script>';
47
+ ?>
wordpress-creation-kit-api/fields/wysiwyg editor.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* @param string $meta Meta name.
3
+ * @param array $details Contains the details for the field.
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
+ $element .= '<textarea name="'. esc_attr( sanitize_title_with_dashes( remove_accents( $details['title'] ) ) ) .'" style="vertical-align:top;width:400px;height:200px" class="mb-textarea mb-field '. esc_attr( sanitize_title_with_dashes( remove_accents( $details['title'] ) ) ) .'">'. esc_html( $value ) .'</textarea>';
9
+ $element .= '<script type="text/javascript">jQuery( function(){ wckInitTinyMCE("'. sanitize_title_with_dashes( remove_accents( $details['title'] ) ) .'")});</script>';
10
+ ?>
wordpress-creation-kit-api/images/ajax-loader.gif ADDED
Binary file
wordpress-creation-kit-api/readme.txt ADDED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Usage Example 1
2
+
3
+ <?php
4
+
5
+ $fint = array(
6
+ array( 'type' => 'text', 'title' => 'Title', 'description' => 'Description for this input' ),
7
+ array( 'type' => 'textarea', 'title' => 'Description' ),
8
+ array( 'type' => 'upload', 'title' => 'Image', 'description' => 'Upload a image' ),
9
+ array( 'type' => 'select', 'title' => 'Select This', 'options' => array( 'Option 1', 'Option 2', 'Option 3' ) ),
10
+
11
+ array( 'type' => 'checkbox', 'title' => 'Check This', 'options' => array( 'Option 1', 'Option 2', 'Option 3' ) ),
12
+
13
+ array( 'type' => 'radio', 'title' => 'Radio This', 'options' => array( 'Radio 1', 'Radio 2', 'Radio 3' ) ),
14
+ );
15
+
16
+ $args = array(
17
+ 'metabox_id' => 'rm_slider_content',
18
+ 'metabox_title' => 'Slideshow Class',
19
+ 'post_type' => 'slideshows',
20
+ 'meta_name' => 'rmscontent',
21
+ 'meta_array' => $fint
22
+ );
23
+
24
+ new Wordpress_Creation_Kit( $args );
25
+
26
+ ?>
27
+
28
+ For Frontend use like this:
29
+
30
+ <?php $meta = get_post_meta( $post->ID, 'rmscontent', true ); ?>
31
+
32
+
33
+
34
+
35
+ Default Parameters
36
+
37
+ <?php $args = array(
38
+ 'metabox_id' => '',
39
+ 'metabox_title' => 'Meta Box',
40
+ 'post_type' => 'post',
41
+ 'meta_name' => '',
42
+ 'meta_array' => array(),
43
+ 'page_template' => '',
44
+ 'post_id' => '',
45
+ 'single' => false,
46
+ 'unserialize_fields' => false,
47
+ 'sortable' => true,
48
+ 'context' => 'post_meta'
49
+ )
50
+ ?>
51
+
52
+ Parameters
53
+
54
+ $metabox_id
55
+ (string) (required) HTML 'id' attribute of the edit screen section
56
+
57
+ Default: None
58
+
59
+ $metabox_title
60
+ (string) (required) Title of the edit screen section, visible to user
61
+
62
+ Default: 'Meta Box'
63
+
64
+ $post_type
65
+ (string) (required) The type of Write screen on which to show the edit screen section ('post', 'page', 'link', or 'custom_post_type' where custom_post_type is the custom post type slug)
66
+
67
+ Default: 'post'
68
+
69
+ $meta_name
70
+ (string) (required) The name of the meta key used to query for data
71
+
72
+ Default: None
73
+
74
+ $meta_array
75
+ (array) (required) The array of fields used to create the form. See example above. Must be array( array() ). Type and Title are required.
76
+
77
+ Default: None
78
+
79
+ $page_template
80
+ (string) (optional) The name of the page template on wich you want the meta box to appear. If this is set than $post_type can be omitted.
81
+
82
+ Default: None
83
+
84
+ $post_id
85
+ (string) (optional) The id of the post you want the meta box to appear. If this is set than $post_type can be omitted.
86
+
87
+ Default: None
88
+
89
+ $single
90
+ (boolean) (optional) Set this to true if you don't want a repeater box and you will be able to enter just one value.
91
+
92
+ Default: false
93
+
94
+ $unserialize_fields
95
+ (boolean) (optional) Set this to true if you want to enable wpml compatibility
96
+
97
+ $sortable
98
+ (boolean) (optional) Wheater or not the fields in a repeater box are sortable.
99
+
100
+ Default: true
101
+
102
+ $context
103
+ (string) (optional) WCK API can add data as meta or as option depending on the context. Using 'post_meta' will add data as post meta and using 'option' will add data as option
104
+
105
+ Default: 'post_meta'
106
+
107
+ Parameters for meta_array
108
+
109
+ 'title' (string) Title of the field.
110
+ 'type' (string) The field type. Possible values: 'text', 'textarea', 'select', 'checkbox', 'radio', 'upload'.
111
+ 'description' (string) The description of the field.
112
+ 'required' (boolean) true if the field is required.
113
+ 'default' (string) If you want the string to have a default value enter it here. For Checkboxes if there are multiple
114
+ values separete them with a ",".
115
+ 'default-option' (boolean) true if you want Select to have a default option.
116
+ 'options' (array) Options for field types "select", "checkbox" and "radio".
117
+
118
+
119
+ How to add into a plugin:
120
+
121
+ 1. Copy the foldder "wordpress-creation-kit-api" into the plugin dir
122
+ 2. Change the class name "Wordpress_Creation_Kit" if multiple plugins use wordpress-creation-kit-api on the same site.
123
+ 3. Include "wordpress-creation-kit.php" into the plugin file
124
+
125
+ /* include Custom Fields Creator API */
126
+ require_once('wordpress-creation-kit/wordpress-creation-kit.php');
127
+
128
+ 4. Use the API as in Exampe 1, in your plugin file or functions or whatever fits the situation.
129
+
130
+
131
+ WPML Compatibility
132
+
133
+ When unserialize_fields is true on a meta box, besides saving the contents of the box in one serialized custom field, we create automatically a custom field for every field in every entry. We do this because WPML can't handle serialized custom fields and also we will get good control on what actions we want to perform (don't translate, copy, translate ) on each of the fields.
134
+
135
+ After the fields are translated with Icanlcalize and we have the translated post in our system, we can go on the translated post and press the "Syncronize WCK Translation" button which will create the serialized array from the individual custom fields.
wordpress-creation-kit-api/wordpress-creation-kit.css ADDED
@@ -0,0 +1,207 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .wck-post-box{
2
+ visibility:hidden;
3
+ height:0;
4
+ overflow:auto;
5
+ }
6
+
7
+ .mb-list-entry-fields li{
8
+ margin-bottom:15px;
9
+ clear:both;
10
+ overflow:hidden;
11
+ }
12
+
13
+ .mb-right-column{
14
+ overflow:hidden;
15
+ }
16
+
17
+ .field-label{
18
+ /* width:190px; */
19
+ float:left;
20
+ min-height:30px;
21
+ font-weight:bold;
22
+ padding-right:10px;
23
+ }
24
+
25
+ .field-label.error{
26
+ color:#ff0000;
27
+ }
28
+
29
+ .field-label .required{
30
+ color:#ff0000;
31
+ padding:0 2px;
32
+ }
33
+
34
+ .mb-right-column label{
35
+ padding:0 6px 0 0;
36
+ }
37
+
38
+ .mb-right-column input[type="checkbox"], .mb-right-column input[type="radio"]{
39
+ margin-right:3px;
40
+ }
41
+
42
+ #mb-ajax-loading{
43
+ position:absolute;
44
+ top:0;
45
+ left:0;
46
+ width:100%;
47
+ height:100%;
48
+ background:url(images/ajax-loader.gif) center center no-repeat; z-index:999;
49
+ }
50
+
51
+ .mb-table-container pre{
52
+ display:inline-block;
53
+ vertical-align:top;
54
+ margin:0;
55
+ white-space: -moz-pre-wrap;
56
+ white-space: -pre-wrap;
57
+ white-space: -o-pre-wrap;
58
+ white-space: pre-wrap;
59
+ word-wrap: break-word;
60
+ }
61
+
62
+
63
+ .wck-edit, .wck-delete, .wck-number{
64
+ width:50px;
65
+ text-align:center !important;
66
+ }
67
+
68
+ td.wck-number{
69
+ cursor:move;
70
+ }
71
+
72
+ .wck-content > ul{
73
+ margin:0;
74
+ }
75
+
76
+ .not-sortable td.wck-number{
77
+ cursor:auto;
78
+ }
79
+
80
+ .wck-edit .button-secondary{
81
+ padding:0 15px;
82
+ }
83
+
84
+ .mbdelete, .wck-remove-upload{
85
+ color:#BC0B0B;
86
+ cursor:pointer;
87
+ }
88
+
89
+ .mbdelete:hover, .wck-remove-upload:hover{
90
+ color:#FF0000;
91
+ }
92
+
93
+ .mb-list-entry-fields{
94
+ list-style:none;
95
+ }
96
+
97
+ .mb-table-container tr:nth-child(2n+1) {
98
+ background-color:#FCFCFC;
99
+ }
100
+
101
+ .mb-table-container tr:last-child td {
102
+ border-bottom: 0 none;
103
+ }
104
+
105
+ .mb-table-container tr td {
106
+ background: none repeat scroll 0 0 transparent;
107
+ border-bottom: 1px solid #EDEDED;
108
+ border-right: 1px solid #EDEDED;
109
+ padding: 8px;
110
+ position: relative;
111
+ }
112
+
113
+ .mb-table-container tr td:last-child {
114
+ border-right: 0 none;
115
+ }
116
+
117
+ .mb-table-container thead > tr > th {
118
+ border-right: 1px solid #E1E1E1;
119
+ }
120
+
121
+ .mb-table-container tr > th:last-child {
122
+ border-right: 0 none;
123
+ }
124
+
125
+ .mb-textarea{
126
+ width:60%;
127
+ max-width:600px;
128
+ height:130px;
129
+ }
130
+ .mb-text-input{
131
+ width:40%;
132
+ max-width:400px;
133
+ }
134
+
135
+ .mb-select{
136
+ min-width:150px;
137
+ }
138
+
139
+ /* upload field */
140
+ .upload-field-details{
141
+ display:inline-block;
142
+ vertical-align:middle;
143
+ min-height:24px;
144
+ padding:2px 0;
145
+ }
146
+
147
+ .upload-field-details p{
148
+ margin:2px 0 0;
149
+ }
150
+
151
+ .upload-field-details img{
152
+ margin:0 5px;
153
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
154
+ }
155
+
156
+ .upload-field-details > *{
157
+ float:left;
158
+ }
159
+
160
+ .upload-field-details span{
161
+ display:block;
162
+ }
163
+
164
+ .upload-field-details .file-name{
165
+ font-weight:bold;
166
+ color:#21759B;
167
+ }
168
+
169
+
170
+ /* Settings page. */
171
+ .side .form-table th {
172
+ width: 20%;
173
+ font-weight: bold;
174
+ text-align: left;
175
+ padding-left: 0;
176
+ }
177
+
178
+ .wck-post-body{
179
+ clear: left;
180
+ float: left;
181
+ margin-right: -2000px;
182
+ width: 100%;
183
+ }
184
+
185
+ .metabox-holder .column-1 {
186
+ margin-right:300px;
187
+ }
188
+ .metabox-holder .column-2 {
189
+ float: right;
190
+ width: 280px;
191
+ clear:right;
192
+ position:relative;
193
+ }
194
+ .metabox-holder .column-3 {
195
+ clear: both;
196
+ margin-right:300px;
197
+ }
198
+
199
+ /* wysiwyg */
200
+ .mb-right-column .wp_themeSkin table.mceLayout{
201
+ border-color: #CCCCCC #CCCCCC #DFDFDF;
202
+ border-style: solid;
203
+ border-top-left-radius: 3px;
204
+ border-top-right-radius: 3px;
205
+ border-width: 1px;
206
+ background-color:#fff;
207
+ }
wordpress-creation-kit-api/wordpress-creation-kit.js ADDED
@@ -0,0 +1,373 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Add width to elements at startup */
2
+ jQuery(function(){
3
+ jQuery('.mb-table-container tbody td').css('width', function(){ return jQuery(this).width() });
4
+ });
5
+
6
+ /* Add width to labels if the post box is closed at load */
7
+ jQuery(function(){
8
+
9
+ /* Callback version */
10
+ /* postboxes.pbshow = function(box){
11
+ jQuery('strong, .field-label', jQuery('#'+box)).css( 'width', 'auto' );
12
+ } */
13
+
14
+ jQuery( '.wck-post-box .hndle' ).click( function(){
15
+ jQuery('strong, .field-label', jQuery(this).parent() ).css( 'width', 'auto' );
16
+ })
17
+
18
+ });
19
+
20
+
21
+
22
+
23
+ /* add reccord to the meta */
24
+ function addMeta(value, id, nonce){
25
+
26
+ /* if tinyMCE then trigger save. save puts the content in the hidden textarea */
27
+ if( tinyMCE !== undefined )
28
+ tinyMCE.triggerSave();
29
+
30
+ jQuery('#'+value).parent().css({'opacity':'0.4', 'position':'relative'}).append('<div id="mb-ajax-loading"></div>');
31
+ /*object to hold the values */
32
+ var values = {};
33
+
34
+ jQuery('#'+value+' .mb-field').each(function(){
35
+
36
+ var key = jQuery(this).attr('name');
37
+
38
+ if(jQuery(this).attr('type') == 'checkbox' || jQuery(this).attr('type') == 'radio' ) {
39
+
40
+ if( typeof values[key.toString()] === "undefined" )
41
+ values[key.toString()] = '';
42
+
43
+ if(jQuery(this).is(':checked')){
44
+ if( values[key.toString()] == '' )
45
+ values[key.toString()] += jQuery(this).val().toString();
46
+ else
47
+ values[key.toString()] += ', ' + jQuery(this).val().toString();
48
+ }
49
+ }
50
+
51
+ else
52
+ values[key.toString()] = jQuery(this).val().toString();
53
+ });
54
+
55
+
56
+ jQuery.post( wckAjaxurl , { action:"wck_add_meta"+value, meta:value, id:id, values:values, _ajax_nonce:nonce}, function(response) {
57
+
58
+ jQuery( '#'+value+' .field-label').removeClass('error');
59
+
60
+ if( response.error ){
61
+ jQuery('#'+value).parent().css('opacity','1');
62
+ jQuery('#mb-ajax-loading').remove();
63
+
64
+ jQuery.each( response.errorfields, function (index, value) {
65
+ jQuery( '#'+value+' .field-label[for="' + value + '"]' ).addClass('error');
66
+ });
67
+
68
+ alert( response.error );
69
+ }
70
+ else{
71
+ /* refresh the list */
72
+ jQuery.post( wckAjaxurl , { action:"wck_refresh_list"+value, meta:value, id:id}, function(response) {
73
+
74
+ jQuery('#container_'+value).replaceWith(response);
75
+
76
+ /* set width of strong label */
77
+ wck_set_to_widest('strong', '#container_'+value );
78
+
79
+ jQuery('.mb-table-container tbody td').css('width', function(){ return jQuery(this).width() });
80
+
81
+ if( !jQuery( '#'+value ).hasClass('single') )
82
+ mb_sortable_elements();
83
+
84
+ /* restore the add form to the original values */
85
+ if( !jQuery( '#'+value ).hasClass('single') ){
86
+ jQuery.post( wckAjaxurl , { action:"wck_add_form"+value, meta:value, id:id }, function(response) {
87
+ jQuery( '#'+value ).replaceWith( response );
88
+ wck_set_to_widest( '.field-label', '#'+value );
89
+ });
90
+ }
91
+
92
+ /* jQuery('#'+value+' .mb-field').each(function(){
93
+ if(jQuery(this).attr('type') == 'checkbox' || jQuery(this).attr('type') == 'radio' )
94
+ jQuery(this).removeAttr( 'checked' );
95
+ else
96
+ jQuery(this).val('');
97
+ });
98
+
99
+ jQuery('#'+value+' .upload-field-details').each(function(){
100
+ jQuery(this).html('<p><span class="file-name"></span><span class="file-type"></span></p>');
101
+ }); */
102
+
103
+ jQuery('#'+value).parent().css('opacity','1');
104
+
105
+ /* Remove form if is single */
106
+ if( jQuery( '#'+value ).hasClass('single') )
107
+ jQuery( '#'+value ).remove();
108
+
109
+
110
+ jQuery('body').trigger('wck-added-element');
111
+
112
+ jQuery('#mb-ajax-loading').remove();
113
+ });
114
+ }
115
+ });
116
+ }
117
+
118
+ /* remove reccord from the meta */
119
+ function removeMeta(value, id, element_id, nonce){
120
+
121
+ var response = confirm( "Delete this item ?" );
122
+
123
+ if( response == true ){
124
+
125
+ jQuery('#'+value).parent().css({'opacity':'0.4', 'position':'relative'}).append('<div id="mb-ajax-loading"></div>');
126
+ jQuery.post( wckAjaxurl , { action:"wck_remove_meta"+value, meta:value, id:id, element_id:element_id, _ajax_nonce:nonce}, function(response) {
127
+
128
+ /* If single add the form */
129
+ if( jQuery( '#container_'+value ).hasClass('single') ){
130
+ jQuery.post( wckAjaxurl , { action:"wck_add_form"+value, meta:value, id:id }, function(response) {
131
+ jQuery( '#container_'+value ).before( response );
132
+ jQuery( '#'+value ).addClass('single');
133
+ });
134
+ }
135
+
136
+ /* refresh the list */
137
+ jQuery.post( wckAjaxurl , { action:"wck_refresh_list"+value, meta:value, id:id}, function(response) {
138
+ jQuery('#container_'+value).replaceWith(response);
139
+
140
+ /* set width of strong label */
141
+ wck_set_to_widest('strong', '#container_'+value );
142
+
143
+ jQuery('.mb-table-container tbody td').css('width', function(){ return jQuery(this).width() });
144
+
145
+ mb_sortable_elements();
146
+ jQuery('#'+value).parent().css('opacity','1');
147
+ jQuery('#mb-ajax-loading').remove();
148
+ });
149
+
150
+ });
151
+ }
152
+ }
153
+
154
+ /* swap two reccords */
155
+ /*function swapMetaMb(value, id, element_id, swap_with){
156
+ jQuery('#'+value).parent().css({'opacity':'0.4', 'position':'relative'}).append('<div id="mb-ajax-loading"></div>');
157
+ jQuery.post( wckAjaxurl , { action:"swap_meta_mb", meta:value, id:id, element_id:element_id, swap_with:swap_with}, function(response) {
158
+
159
+ jQuery.post( wckAjaxurl , { action:"refresh_list", meta:value, id:id}, function(response) {
160
+ jQuery('#container_'+value).replaceWith(response); jQuery('#'+value).parent().css('opacity','1'); jQuery('#mb-ajax-loading').remove();
161
+ });
162
+
163
+ });
164
+ }
165
+ */
166
+
167
+ /* reorder elements through drag and drop */
168
+ function mb_sortable_elements() {
169
+ jQuery( ".mb-table-container tbody" ).not( jQuery( ".mb-table-container.single tbody, .mb-table-container.not-sortable tbody" ) ).sortable({
170
+ update: function(event, ui){
171
+
172
+ var value = jQuery(this).parent().prev().attr('id');
173
+ var id = jQuery(this).parent().attr('post');
174
+
175
+ var result = jQuery(this).sortable('toArray');
176
+
177
+ var values = {};
178
+ for(var i in result)
179
+ {
180
+ values[i] = result[i].replace('element_','');
181
+ }
182
+
183
+ jQuery('#'+value).parent().css({'opacity':'0.4', 'position':'relative'}).append('<div id="mb-ajax-loading"></div>');
184
+
185
+ jQuery.post( wckAjaxurl , { action:"wck_reorder_meta"+value, meta:value, id:id, values:values}, function(response) {
186
+ jQuery.post( wckAjaxurl , { action:"wck_refresh_list"+value, meta:value, id:id}, function(response) {
187
+ jQuery('#container_'+value).replaceWith(response);
188
+
189
+ /* set width of strong label */
190
+ wck_set_to_widest('strong', '#container_'+value );
191
+
192
+ jQuery('.mb-table-container tbody td').css('width', function(){ return jQuery(this).width() });
193
+
194
+ mb_sortable_elements();
195
+ jQuery('#'+value).parent().css('opacity','1');
196
+ jQuery('#mb-ajax-loading').remove();
197
+ });
198
+
199
+ });
200
+ }
201
+ });
202
+ jQuery( "#sortable" ).disableSelection();
203
+
204
+
205
+ jQuery('.mb-table-container ul').mousedown( function(e){
206
+ e.stopPropagation();
207
+ });
208
+ }
209
+ jQuery(mb_sortable_elements);
210
+
211
+
212
+
213
+ /* show the update form */
214
+ function showUpdateFormMeta(value, id, element_id, nonce){
215
+ if( jQuery( '#update_container_' + value + '_' + element_id ).length == 0 ){
216
+ jQuery('#container_'+value).parent().css({'opacity':'0.4', 'position':'relative'}).append('<div id="mb-ajax-loading"></div>');
217
+
218
+ if( jQuery( '#container_' + value + " tbody" ).hasClass('ui-sortable') )
219
+ jQuery( '#container_' + value + " tbody" ).sortable("disable");
220
+
221
+ jQuery.post( wckAjaxurl , { action:"wck_show_update"+value, meta:value, id:id, element_id:element_id, _ajax_nonce:nonce}, function(response) {
222
+ //jQuery('#container_'+value+' #element_'+element_id).append(response);
223
+ jQuery(response).insertAfter('#container_'+value+' #element_'+element_id);
224
+
225
+ /* set width of field-label */
226
+ wck_set_to_widest('.field-label', '#update_container_' + value + '_' + element_id );
227
+
228
+ jQuery('#container_'+value).parent().css('opacity','1');
229
+ jQuery('#mb-ajax-loading').remove();
230
+ wckGoToByScroll('update_container_' + value + '_' + element_id);
231
+ });
232
+ }
233
+ }
234
+
235
+ /* remove the update form */
236
+ function removeUpdateForm( id ){
237
+ jQuery('html, body').animate({
238
+ scrollTop: jQuery( '#'+id).prev().offset().top - 40 }, 700);
239
+
240
+ jQuery( '#'+id).prev().animate({
241
+ backgroundColor: '#FFFF9C'
242
+ }, 700);
243
+ jQuery( '#'+id).prev().animate({
244
+ backgroundColor: 'none'
245
+ }, 700);
246
+
247
+ jQuery( '#'+id ).remove();
248
+ }
249
+
250
+ /* update reccord */
251
+ function updateMeta(value, id, element_id, nonce){
252
+
253
+ /* if tinyMCE then trigger save. save puts the content in the hidden textarea */
254
+ if( tinyMCE !== undefined )
255
+ tinyMCE.triggerSave();
256
+
257
+ jQuery('#container_'+value).parent().css({'opacity':'0.4', 'position':'relative'}).append('<div id="mb-ajax-loading"></div>');
258
+ var values = {};
259
+ jQuery('#update_container_'+value+'_'+element_id+' .mb-field').each(function(){
260
+ var key = jQuery(this).attr('name');
261
+
262
+ if(jQuery(this).attr('type') == 'checkbox' || jQuery(this).attr('type') == 'radio' ) {
263
+
264
+ if( typeof values[key.toString()] === "undefined" )
265
+ values[key.toString()] = '';
266
+
267
+ if(jQuery(this).is(':checked')){
268
+ if( values[key.toString()] == '' )
269
+ values[key.toString()] += jQuery(this).val().toString();
270
+ else
271
+ values[key.toString()] += ', ' + jQuery(this).val().toString();
272
+ }
273
+ }
274
+
275
+ else
276
+ values[key.toString()] = jQuery(this).val().toString();
277
+
278
+ });
279
+
280
+ jQuery.post( wckAjaxurl , { action:"wck_update_meta"+value, meta:value, id:id, element_id:element_id, values:values, _ajax_nonce:nonce}, function(response) {
281
+
282
+ jQuery( '#update_container_'+value+'_'+element_id + ' .field-label').removeClass('error');
283
+
284
+ if( response.error ){
285
+ jQuery('#container_'+value).parent().css('opacity','1');
286
+ jQuery('#mb-ajax-loading').remove();
287
+
288
+ jQuery.each( response.errorfields, function (index, value) {
289
+ jQuery( '#update_container_'+value+'_'+element_id + ' .field-label[for="' + value + '"]' ).addClass('error');
290
+ });
291
+
292
+ alert( response.error );
293
+ }
294
+ else{
295
+ jQuery('html, body').animate({
296
+ scrollTop: jQuery('#container_'+value+' #element_' + element_id).offset().top - 40 }, 700);
297
+
298
+ jQuery('#container_'+value+' #element_' + element_id).animate({
299
+ backgroundColor: '#FFFF9C'
300
+ }, 700);
301
+ jQuery('#container_'+value+' #element_' + element_id).animate({
302
+ backgroundColor: 'none'
303
+ }, 700);
304
+
305
+ jQuery('#update_container_'+value+'_'+element_id).remove();
306
+
307
+ /* refresh the list */
308
+ jQuery.post( wckAjaxurl , { action:"wck_refresh_entry"+value, meta:value, id:id, element_id:element_id}, function(response) {
309
+ jQuery('#container_'+value+' #element_'+element_id).replaceWith(response);
310
+
311
+ /* set width of strong label */
312
+ wck_set_to_widest('strong', '#container_'+value+' #element_'+element_id );
313
+
314
+ jQuery('.mb-table-container tbody td').css('width', function(){ return jQuery(this).width() });
315
+
316
+ if( jQuery( '#container_' + value + " tbody" ).hasClass('ui-sortable') )
317
+ jQuery( '#container_' + value + " tbody" ).sortable("enable");
318
+
319
+ jQuery('#container_'+value).parent().css('opacity','1');
320
+ jQuery('#mb-ajax-loading').remove();
321
+ });
322
+ }
323
+ });
324
+ }
325
+
326
+ /* function syncs the translation */
327
+ function wckSyncTranslation(id){
328
+ jQuery.post( wckAjaxurl , { action:"wck_sync_translation", id:id}, function(response) {
329
+ if( response == 'syncsuccess' )
330
+ window.location.reload();
331
+ });
332
+ }
333
+
334
+ function wckGoToByScroll(id){
335
+ jQuery('html,body').animate({scrollTop: jQuery("#"+id).offset().top - 28},'slow');
336
+ }
337
+
338
+ /* Remove uploaded file */
339
+ jQuery(function(){
340
+ jQuery('.wck-remove-upload').live('click', function(e){
341
+ jQuery(this).parent().parent().parent().children('.mb-field').val("");
342
+ jQuery(this).parent().parent('.upload-field-details').html('<p><span class="file-name"></span><span class="file-type"></span></p>');
343
+ });
344
+ });
345
+
346
+ /* Set width for listing "label" equal to the widest */
347
+ jQuery( function(){
348
+ jQuery('.mb-table-container').each(function(){
349
+ wck_set_to_widest( 'strong', jQuery(this) );
350
+ });
351
+
352
+ jQuery('.mb-list-entry-fields').each(function(){
353
+ wck_set_to_widest( '.field-label', jQuery(this) );
354
+ });
355
+
356
+ jQuery('.wck-post-box').css( {visibility: 'visible', height: 'auto'} );
357
+ });
358
+
359
+ function wck_set_to_widest( element, parent ){
360
+ if( jQuery( element, parent).length != 0 ){
361
+ var widest = null;
362
+ jQuery( element, parent).each(function() {
363
+ if (widest == null)
364
+ widest = jQuery(this);
365
+ else
366
+ if ( jQuery(this).width() > widest.width() )
367
+ widest = jQuery(this);
368
+ });
369
+
370
+ jQuery(element, parent).css( {display: 'inline-block', width: widest.width(), paddingRight: '5px'} );
371
+ }
372
+ else return;
373
+ }
wordpress-creation-kit-api/wordpress-creation-kit.php ADDED
@@ -0,0 +1,1195 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* Copyright 2011 Ungureanu Madalin (email : madalin@reflectionmedia.ro)
3
+ This program is free software; you can redistribute it and/or modify
4
+ it under the terms of the GNU General Public License as published by
5
+ the Free Software Foundation; either version 2 of the License, or
6
+ (at your option) any later version.
7
+ This program is distributed in the hope that it will be useful,
8
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
9
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
+ GNU General Public License for more details.
11
+ You should have received a copy of the GNU General Public License
12
+ along with this program; if not, write to the Free Software
13
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
14
+ */
15
+
16
+ if( file_exists( dirname(__FILE__). '/wck-fep/wck-fep.php' ) )
17
+ require_once( 'wck-fep/wck-fep.php' );
18
+
19
+ /*
20
+
21
+ Usage Example 1:
22
+
23
+
24
+ $fint = array(
25
+ array( 'type' => 'text', 'title' => 'Title', 'description' => 'Description for this input' ),
26
+ array( 'type' => 'textarea', 'title' => 'Description' ),
27
+ array( 'type' => 'upload', 'title' => 'Image', 'description' => 'Upload a image' ),
28
+ array( 'type' => 'select', 'title' => 'Select This', 'options' => array( 'Option 1', 'Option 2', 'Option 3' ) ),
29
+ array( 'type' => 'checkbox', 'title' => 'Check This', 'options' => array( 'Option 1', 'Option 2', 'Option 3' ) ),
30
+ array( 'type' => 'radio', 'title' => 'Radio This', 'options' => array( 'Radio 1', 'Radio 2', 'Radio 3' ) ),
31
+ );
32
+
33
+ $args = array(
34
+ 'metabox_id' => 'rm_slider_content',
35
+ 'metabox_title' => 'Slideshow Class',
36
+ 'post_type' => 'slideshows',
37
+ 'meta_name' => 'rmscontent',
38
+ 'meta_array' => $fint
39
+ );
40
+
41
+ new Wordpress_Creation_Kit( $args );
42
+
43
+
44
+ On the frontend:
45
+
46
+ $meta = get_post_meta( $post->ID, 'rmscontent', true );
47
+
48
+ */
49
+
50
+ class Wordpress_Creation_Kit{
51
+
52
+ private $defaults = array(
53
+ 'metabox_id' => '',
54
+ 'metabox_title' => 'Meta Box',
55
+ 'post_type' => 'post',
56
+ 'meta_name' => '',
57
+ 'meta_array' => array(),
58
+ 'page_template' => '',
59
+ 'post_id' => '',
60
+ 'single' => false,
61
+ 'unserialize_fields' => false,
62
+ 'sortable' => true,
63
+ 'context' => 'post_meta'
64
+ );
65
+ private $args;
66
+
67
+
68
+ /* Constructor method for the class. */
69
+ function __construct( $args ) {
70
+
71
+ /* Global that will hold all the arguments for all the custom boxes */
72
+ global $wck_objects;
73
+
74
+ /* Merge the input arguments and the defaults. */
75
+ $this->args = wp_parse_args( $args, $this->defaults );
76
+
77
+ /* Add the settings for this box to the global object */
78
+ $wck_objects[$this->args['metabox_id']] = $this->args;
79
+
80
+ /*print scripts*/
81
+ add_action('admin_enqueue_scripts', array( &$this, 'wck_print_scripts' ));
82
+ /* add our own ajaxurl because we are going to use the wck script also in frontend and we want to avoid any conflicts */
83
+ add_action( 'admin_head', array( &$this, 'wck_print_ajax_url' ) );
84
+
85
+ // Set up the AJAX hooks
86
+ add_action("wp_ajax_wck_add_meta".$this->args['meta_name'], array( &$this, 'wck_add_meta') );
87
+ add_action("wp_ajax_wck_update_meta".$this->args['meta_name'], array( &$this, 'wck_update_meta') );
88
+ add_action("wp_ajax_wck_show_update".$this->args['meta_name'], array( &$this, 'wck_show_update_form') );
89
+ add_action("wp_ajax_wck_refresh_list".$this->args['meta_name'], array( &$this, 'wck_refresh_list') );
90
+ add_action("wp_ajax_wck_refresh_entry".$this->args['meta_name'], array( &$this, 'wck_refresh_entry') );
91
+ add_action("wp_ajax_wck_add_form".$this->args['meta_name'], array( &$this, 'wck_add_form') );
92
+ add_action("wp_ajax_wck_remove_meta".$this->args['meta_name'], array( &$this, 'wck_remove_meta') );
93
+ add_action("wp_ajax_wck_reorder_meta".$this->args['meta_name'], array( &$this, 'wck_reorder_meta') );
94
+
95
+ /* modify Insert into post button */
96
+ add_action('admin_head-media-upload-popup', array( &$this, 'wck_media_upload_popup_head') );
97
+
98
+ /* custom functionality for upload video */
99
+ add_filter('media_send_to_editor', array( &$this, 'wck_media_send_to_editor' ), 15, 2 );
100
+
101
+ add_action('add_meta_boxes', array( &$this, 'wck_add_metabox') );
102
+
103
+ /* hook to add a side metabox with the Syncronize translation button */
104
+ add_action('add_meta_boxes', array( &$this, 'wck_add_sync_translation_metabox' ) );
105
+
106
+ /* ajax hook the syncronization function */
107
+ add_action("wp_ajax_wck_sync_translation", array( &$this, 'wck_sync_translation_ajax' ) );
108
+
109
+ }
110
+
111
+
112
+ //add metabox using wordpress api
113
+
114
+ function wck_add_metabox() {
115
+
116
+ global $wck_pages_hooknames;
117
+
118
+ if( $this->args['context'] == 'post_meta' ){
119
+ if( $this->args['post_id'] == '' && $this->args['page_template'] == '' ){
120
+ add_meta_box($this->args['metabox_id'], $this->args['metabox_title'], array( &$this, 'wck_content' ), $this->args['post_type'], 'normal', 'high', array( 'meta_name' => $this->args['meta_name'], 'meta_array' => $this->args['meta_array']) );
121
+ /* add class to meta box */
122
+ add_filter( "postbox_classes_".$this->args['post_type']."_".$this->args['metabox_id'], array( &$this, 'wck_add_metabox_classes' ) );
123
+ }
124
+ else{
125
+ $post_id = $_GET['post'] ? $_GET['post'] : $_POST['post_ID'] ;
126
+
127
+ if( $this->args['post_id'] != '' && $this->args['page_template'] != '' ){
128
+ $template_file = get_post_meta($post_id,'_wp_page_template',TRUE);
129
+ if( $this->args['post_id'] == $post_id && $template_file == $this->args['page_template'] )
130
+ add_meta_box($this->args['metabox_id'], $this->args['metabox_title'], array( &$this, 'wck_content' ), 'page', 'normal', 'high', array( 'meta_name' => $this->args['meta_name'], 'meta_array' => $this->args['meta_array'] ) );
131
+
132
+ /* add class to meta box */
133
+ add_filter( "postbox_classes_page_".$this->args['metabox_id'], array( &$this, 'wck_add_metabox_classes' ) );
134
+ }
135
+ else{
136
+
137
+ if( $this->args['post_id'] != '' ){
138
+ if( $this->args['post_id'] == $post_id ){
139
+ $post_type = get_post_type( $post_id );
140
+ add_meta_box($this->args['metabox_id'], $this->args['metabox_title'], array( &$this, 'wck_content' ), $post_type, 'normal', 'high', array( 'meta_name' => $this->args['meta_name'], 'meta_array' => $this->args['meta_array'] ) );
141
+ /* add class to meta box */
142
+ add_filter( "postbox_classes_".$post_type."_".$this->args['metabox_id'], array( &$this, 'wck_add_metabox_classes' ) );
143
+ }
144
+ }
145
+
146
+ if( $this->args['page_template'] != '' ){
147
+ $template_file = get_post_meta($post_id,'_wp_page_template',TRUE);
148
+ if ( $template_file == $this->args['page_template'] ){
149
+ add_meta_box($this->args['metabox_id'], $this->args['metabox_title'], array( &$this, 'wck_content' ), 'page', 'normal', 'high', array( 'meta_name' => $this->args['meta_name'], 'meta_array' => $this->args['meta_array']) );
150
+ /* add class to meta box */
151
+ add_filter( "postbox_classes_page_".$this->args['metabox_id'], array( &$this, 'wck_add_metabox_classes' ) );
152
+ }
153
+ }
154
+
155
+ }
156
+
157
+ }
158
+ }
159
+ else if( $this->args['context'] == 'option' ){
160
+ add_meta_box($this->args['metabox_id'], $this->args['metabox_title'], array( &$this, 'wck_content' ), $wck_pages_hooknames[$this->args['post_type']], 'normal', 'high', array( 'meta_name' => $this->args['meta_name'], 'meta_array' => $this->args['meta_array']) );
161
+ /* add class to meta box */
162
+ add_filter( "postbox_classes_".$wck_pages_hooknames[$this->args['post_type']]."_".$this->args['metabox_id'], array( &$this, 'wck_add_metabox_classes' ) );
163
+ }
164
+ }
165
+
166
+ /* Function used to add classes to the wck meta boxes */
167
+ function wck_add_metabox_classes( $classes ){
168
+ array_push($classes,'wck-post-box');
169
+ return $classes;
170
+ }
171
+
172
+ function wck_content($post, $metabox){
173
+ //output the add form
174
+ if( $this->args['single'] ){
175
+
176
+ if( $this->args['context'] == 'post_meta' )
177
+ $meta_val = get_post_meta( $post->ID, $metabox['args']['meta_name'], true );
178
+ else if ( $this->args['context'] == 'option' )
179
+ $meta_val = get_option( $metabox['args']['meta_name'] );
180
+
181
+ if( empty( $meta_val ) )
182
+ self::create_add_form($metabox['args']['meta_array'], $metabox['args']['meta_name'], $post);
183
+ }
184
+ else
185
+ self::create_add_form($metabox['args']['meta_array'], $metabox['args']['meta_name'], $post);
186
+
187
+ //output the entries
188
+ echo self::wck_output_meta_content($metabox['args']['meta_name'], $post->ID, $metabox['args']['meta_array']);
189
+ }
190
+
191
+ /**
192
+ * The function used to create a form element
193
+ *
194
+ * @since 1.0.0
195
+ *
196
+ * @param string $meta Meta name.
197
+ * @param array $details Contains the details for the field.
198
+ * @param string $value Contains input value;
199
+ * @param string $context Context where the function is used. Depending on it some actions are preformed.;
200
+ * @return string $element input element html string.
201
+ */
202
+
203
+ function wck_output_form_field( $meta, $details, $value = '', $context = '' ){
204
+ $element = '';
205
+
206
+ if( $context == 'edit_form' ){
207
+ $edit_class = '.mb-table-container ';
208
+ $var_prefix = 'edit';
209
+ }
210
+ else if( $context == 'fep' ){
211
+ /* id prefix for frontend posting */
212
+ $frontend_prefix = 'fep-';
213
+ }
214
+ else{
215
+ if( !empty( $details['default'] ) )
216
+ $value = apply_filters( "wck_default_value_{$meta}_".sanitize_title_with_dashes( remove_accents ( $details['title'] ) ) , $details['default'] );
217
+ }
218
+
219
+
220
+ $element .= '<label for="'. esc_attr( sanitize_title_with_dashes( remove_accents ( $details['title'] ) ) ) .'" class="field-label">'. ucfirst($details['title']) .':';
221
+ if( $details['required'] )
222
+ $element .= '<span class="required">*</span>';
223
+ $element .= '</label>';
224
+
225
+ $element .= '<div class="mb-right-column">';
226
+
227
+ /*
228
+ include actual field type
229
+ possible field types: text, textarea, select, checkbox, radio, upload, wysiwyg editor, datepicker, country select, user select
230
+ */
231
+ //$details['type'] = str_replace( ' ', '-', trim( $details['type'] ) );
232
+ if( file_exists( dirname( __FILE__ ).'/fields/'.$details['type'].'.php' ) ){
233
+ require( dirname( __FILE__ ).'/fields/'.$details['type'].'.php' );
234
+ }
235
+
236
+ if( !empty( $details['description'] ) ){
237
+ $element .= '<p class="description">'. $details['description'].'</p>';
238
+ }
239
+
240
+ $element .= '</div><!-- .mb-right-column -->';
241
+
242
+ return $element;
243
+
244
+ }
245
+
246
+
247
+ /**
248
+ * The function used to create the form for adding records
249
+ *
250
+ * @since 1.0.0
251
+ *
252
+ * @param array $fields Contains the desired inputs in the repeater field. Must be like: array('Key:type').
253
+ * Key is used for the name attribute of the field, label of the field and as the meta_key.
254
+ * Supported types: input, textarea, upload
255
+ * @param string $meta It is used in update_post_meta($id, $meta, $results);. Use '_' prefix if you don't want
256
+ * the meta to apear in custom fields box.
257
+ * @param object $post Post object
258
+ */
259
+ function create_add_form($fields, $meta, $post){
260
+ $nonce = wp_create_nonce( 'wck-add-meta' );
261
+ ?>
262
+ <div id="<?php echo $meta ?>" style="padding:10px 0;" <?php if( $this->args['single'] ) echo 'class="single"' ?>>
263
+ <ul class="mb-list-entry-fields">
264
+ <?php
265
+ $element_id = 0;
266
+ foreach ($fields as $details ){
267
+
268
+ do_action( "wck_before_add_form_{$meta}_element_{$element_id}" );
269
+
270
+ ?>
271
+ <li class="row-<?php echo esc_attr( sanitize_title_with_dashes( remove_accents( $details['title'] ) ) ) ?>">
272
+ <?php echo self::wck_output_form_field( $meta, $details ); ?>
273
+ </li>
274
+ <?php
275
+
276
+ do_action( "wck_after_add_form_{$meta}_element_{$element_id}" );
277
+
278
+ $element_id++;
279
+ }
280
+ ?>
281
+ <li style="overflow:visible;" class="add-entry-button">
282
+ <a href="javascript:void(0)" class="button-primary" onclick="addMeta('<?php echo esc_js($meta); ?>', '<?php echo esc_js($post->ID); ?>', '<?php echo esc_js($nonce); ?>')"><span><?php _e( 'Add Entry', 'wck' ); ?></span></a>
283
+ </li>
284
+ </ul>
285
+ </div>
286
+ <?php
287
+ }
288
+
289
+ /**
290
+ * The function used to display a form to update a reccord from meta
291
+ *
292
+ * @since 1.0.0
293
+ *
294
+ * @param string $meta It is used in get_post_meta($id, $meta, $results);. Use '_' prefix if you don't want
295
+ * the meta to apear in custom fields box.
296
+ * @param int $id Post id
297
+ * @param int $element_id The id of the reccord. The meta is stored as array(array());
298
+ */
299
+ function mb_update_form($fields, $meta, $id, $element_id){
300
+
301
+ $update_nonce = wp_create_nonce( 'wck-update-entry' );
302
+
303
+ if( $this->args['context'] == 'post_meta' )
304
+ $results = get_post_meta($id, $meta, true);
305
+ else if ( $this->args['context'] == 'option' )
306
+ $results = get_option( $meta );
307
+
308
+ $form = '';
309
+ $form .= '<tr id="update_container_'.$meta.'_'.$element_id.'"><td colspan="4">';
310
+
311
+ if($results != null){
312
+ $i = 0;
313
+ $form .= '<ul class="mb-list-entry-fields">';
314
+
315
+ foreach( $fields as $field ){
316
+ $details = $field;
317
+ $value = $results[$element_id][sanitize_title_with_dashes( remove_accents( $details['title'] ) )];
318
+
319
+ $form = apply_filters( "wck_before_update_form_{$meta}_element_{$i}", $form, $element_id, $value );
320
+
321
+ $form .= '<li class="row-'. esc_attr( sanitize_title_with_dashes( remove_accents( $details['title'] ) ) ) .'">';
322
+
323
+ $form .= self::wck_output_form_field( $meta, $details, $value, 'edit_form' );
324
+
325
+ $form .= '</li>';
326
+
327
+ $form = apply_filters( "wck_after_update_form_{$meta}_element_{$i}", $form, $element_id, $value );
328
+
329
+ $i++;
330
+ }
331
+ $form .= '<li style="overflow:visible;">';
332
+ $form .= '<a href="javascript:void(0)" class="button-primary" onclick=\'updateMeta("'.esc_js($meta).'", "'.esc_js($id).'", "'.esc_js($element_id).'", "'.esc_js($update_nonce).'")\'><span>'. __( 'Save Changes', 'wck' ) .'</span></a>';
333
+ $form .= '<a href="javascript:void(0)" class="button-secondary" style="margin-left:10px;" onclick=\'removeUpdateForm("'. esc_js( 'update_container_'.$meta.'_'.$element_id ). '" )\'><span>'. __( 'Cancel', 'wck' ) .'</span></a>';
334
+ $form .= '</li>';
335
+
336
+ $form .= '</ul>';
337
+ }
338
+ $form .= '</td></tr>';
339
+
340
+ return $form;
341
+ }
342
+
343
+
344
+ /**
345
+ * The function used to output the content of a meta
346
+ *
347
+ * @since 1.0.0
348
+ *
349
+ * @param string $meta It is used in get_post_meta($id, $meta, $results);. Use '_' prefix if you don't want
350
+ * the meta to apear in custom fields box.
351
+ * @param int $id Post id
352
+ */
353
+ function wck_output_meta_content($meta, $id, $fields){
354
+
355
+ if( $this->args['context'] == 'post_meta' || $this->args['context'] == '' )
356
+ $results = get_post_meta($id, $meta, true);
357
+ else if ( $this->args['context'] == 'option' )
358
+ $results = get_option( $meta );
359
+
360
+ $list = '';
361
+ $list .= '<table id="container_'.esc_attr($meta).'" class="mb-table-container widefat';
362
+
363
+ if( $this->args['single'] ) $list .= ' single';
364
+ if( !$this->args['sortable'] ) $list .= ' not-sortable';
365
+
366
+ $list .= '" post="'.esc_attr($id).'">';
367
+
368
+
369
+ if($results != null){
370
+ $list .= '<thead><tr><th class="wck-number">#</th><th class="wck-content">'. __( 'Content', 'wck' ) .'</th><th class="wck-edit">'. __( 'Edit', 'wck' ) .'</th><th class="wck-delete">'. __( 'Delete', 'wck' ) .'</th></tr></thead>';
371
+ $i=0;
372
+ foreach ($results as $result){
373
+
374
+ $list .= self::wck_output_entry_content( $meta, $id, $fields, $results, $i );
375
+
376
+ $i++;
377
+ }
378
+ }
379
+ $list .= '</table>';
380
+
381
+ $list = apply_filters('wck_metabox_content_'.$meta, $list, $id);
382
+ return $list;
383
+ }
384
+
385
+ function wck_output_entry_content( $meta, $id, $fields, $results, $element_id ){
386
+ $edit_nonce = wp_create_nonce( 'wck-edit-entry' );
387
+ $delete_nonce = wp_create_nonce( 'wck-delete-entry' );
388
+ $entry_nr = $element_id +1;
389
+
390
+ $list = '';
391
+ $list .= '<tr id="element_'.$element_id.'">';
392
+ $list .= '<td style="text-align:center;vertical-align:middle;" class="wck-number">'. $entry_nr .'</td>';
393
+ $list .= '<td class="wck-content"><ul>';
394
+
395
+ $j = 0;
396
+
397
+ foreach( $fields as $field ){
398
+ $details = $field;
399
+
400
+ $value = $results[$element_id][sanitize_title_with_dashes( remove_accents( $details['title'] ) )];
401
+
402
+ /* filter display value */
403
+ $value = apply_filters( "wck_displayed_value_{$meta}_element_{$j}", $value );
404
+
405
+ /* for the upload field display it differently */
406
+ if( $details['type'] == 'upload' && !empty ( $value ) && is_numeric( $value ) ){
407
+ $file_src = wp_get_attachment_url($value);
408
+ $thumbnail = wp_get_attachment_image( $value, array( 80, 60 ), true );
409
+ $file_name = get_the_title( $value );
410
+
411
+ if ( preg_match( '/^.*?\.(\w+)$/', get_attached_file( $value ), $matches ) )
412
+ $file_type = esc_html( strtoupper( $matches[1] ) );
413
+ else
414
+ $file_type = strtoupper( str_replace( 'image/', '', get_post_mime_type( $value ) ) );
415
+
416
+ $display_value = '<div class="upload-field-details">'. $thumbnail .'<p><span class="file-name">'. $file_name .'</span><span class="file-type">'. $file_type . '</span></p></div>';
417
+ }
418
+ else{
419
+
420
+ $display_value = '<pre>'.htmlspecialchars( $value ) . '</pre>';
421
+ }
422
+
423
+
424
+ $list = apply_filters( "wck_before_listed_{$meta}_element_{$j}", $list, $element_id, $value );
425
+
426
+ $list .= '<li class="row-'. esc_attr( sanitize_title_with_dashes( remove_accents( $details['title'] ) ) ) .'"><strong>'.$details['title'].': </strong>'.$display_value.' </li>';
427
+
428
+ $list = apply_filters( "wck_after_listed_{$meta}_element_{$j}", $list, $element_id, $value );
429
+
430
+ $j++;
431
+ }
432
+ $list .= '</ul></td>';
433
+ $list .= '<td style="text-align:center;vertical-align:middle;" class="wck-edit"><a href="javascript:void(0)" class="button-secondary" onclick=\'showUpdateFormMeta("'.esc_js($meta).'", "'.esc_js($id).'", "'.esc_js($element_id).'", "'.esc_js($edit_nonce).'")\' title="'. __( 'Edit this item', 'wck' ) .'">'. __( 'Edit', 'wck' ) .'</a></td>';
434
+ $list .= '<td style="text-align:center;vertical-align:middle;" class="wck-delete"><a href="javascript:void(0)" class="mbdelete" onclick=\'removeMeta("'.esc_js($meta).'", "'.esc_js($id).'", "'.esc_js($element_id).'", "'.esc_js($delete_nonce).'")\' title="'. __( 'Delete this item', 'wck' ) .'">'. __( 'Delete', 'wck' ) .'</a></td>';
435
+
436
+ $list .= '</tr>';
437
+
438
+ return $list;
439
+ }
440
+
441
+ /* enque the js/css */
442
+ function wck_print_scripts($hook){
443
+ global $wck_pages_hooknames;
444
+
445
+ if( $this->args['context'] == 'post_meta' ) {
446
+ if( 'post.php' == $hook || 'post-new.php' == $hook){
447
+ self::wck_enqueue();
448
+ }
449
+ }
450
+ elseif( $this->args['context'] == 'option' ){
451
+ if( $wck_pages_hooknames[$this->args['post_type']] == $hook ){
452
+ self::wck_enqueue( 'options' );
453
+ }
454
+ }
455
+ }
456
+
457
+ /* our own ajaxurl */
458
+ function wck_print_ajax_url(){
459
+ echo '<script type="text/javascript">var wckAjaxurl = "'. admin_url('admin-ajax.php') .'";</script>';
460
+ }
461
+
462
+
463
+ /* Helper function for enqueueing scripts and styles */
464
+ private static function wck_enqueue( $context = '' ){
465
+ wp_enqueue_script( 'jquery-ui-draggable' );
466
+ wp_enqueue_script( 'jquery-ui-droppable' );
467
+ wp_enqueue_script( 'jquery-ui-sortable' );
468
+
469
+ if( $context == 'options' ){
470
+ wp_enqueue_script( 'thickbox' );
471
+ wp_enqueue_style( 'thickbox' );
472
+ }
473
+
474
+ wp_enqueue_script('wordpress-creation-kit', plugins_url('/wordpress-creation-kit.js', __FILE__), array('jquery', 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-sortable' ) );
475
+ wp_register_style('wordpress-creation-kit-css', plugins_url('/wordpress-creation-kit.css', __FILE__));
476
+ wp_enqueue_style('wordpress-creation-kit-css');
477
+
478
+ // wysiwyg
479
+ wp_register_script( 'wck-tinymce', plugins_url( '/assets/js/tiny_mce/tiny_mce.js', __FILE__ ), array(), '1.0', true );
480
+ wp_enqueue_script( 'wck-tinymce' );
481
+ wp_register_script( 'wck-tinymce-init', plugins_url( '/assets/js/tiny_mce/wck_tiny_mce_init.js', __FILE__ ), array(), '1.0', true );
482
+ wp_enqueue_script( 'wck-tinymce-init' );
483
+
484
+ //datepicker
485
+ wp_enqueue_script('jquery-ui-datepicker');
486
+ wp_enqueue_style('jquery-style', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css');
487
+
488
+ }
489
+
490
+ /* Helper function for required fields */
491
+ function wck_test_required( $meta_array, $meta, $values, $id ){
492
+ $fields = $meta_array;
493
+ $required_fields = array();
494
+ $required_fields_with_errors = array();
495
+ $required_message = '';
496
+
497
+ $errors = '';
498
+
499
+ foreach( $fields as $field ){
500
+ if( $field['required'] )
501
+ $required_fields[sanitize_title_with_dashes( remove_accents ( $field['title'] ) )] = $field['title'];
502
+ }
503
+
504
+ foreach( $values as $key => $value ){
505
+ if( array_key_exists( $key, $required_fields ) && apply_filters( "wck_required_test_{$meta}_{$key}", empty( $value ), $value, $id ) ){
506
+ $required_message .= apply_filters( "wck_required_message_{$meta}_{$key}", __( "Please enter a value for the required field ", "wck" ) . "$required_fields[$key] \n", $value );
507
+ $required_fields_with_errors[] = $key;
508
+ }
509
+ }
510
+
511
+ if( $required_message != '' ){
512
+ $errors = array( 'error' => $required_message, 'errorfields' => $required_fields_with_errors );
513
+ }
514
+
515
+ return $errors;
516
+ }
517
+
518
+
519
+ /* ajax add a reccord to the meta */
520
+ function wck_add_meta(){
521
+ check_ajax_referer( "wck-add-meta" );
522
+ $meta = $_POST['meta'];
523
+ $id = absint($_POST['id']);
524
+ $values = $_POST['values'];
525
+
526
+ $values = apply_filters( "wck_add_meta_filter_values_{$meta}", $values );
527
+
528
+ /* check required fields */
529
+ $errors = self::wck_test_required( $this->args['meta_array'], $meta, $values, $id );
530
+ if( $errors != '' ){
531
+ header( 'Content-type: application/json' );
532
+ die( json_encode( $errors ) );
533
+ }
534
+
535
+
536
+ if( $this->args['context'] == 'post_meta' )
537
+ $results = get_post_meta($id, $meta, true);
538
+ else if ( $this->args['context'] == 'option' )
539
+ $results = get_option( $meta );
540
+
541
+ $results[] = $values;
542
+
543
+ do_action( 'wck_before_add_meta', $meta, $id, $values );
544
+
545
+ if( $this->args['context'] == 'post_meta' )
546
+ update_post_meta($id, $meta, $results);
547
+ else if ( $this->args['context'] == 'option' )
548
+ update_option( $meta, $results );
549
+
550
+ /* if unserialize_fields is true add for each entry separete post meta for every element of the form */
551
+ if( $this->args['unserialize_fields'] && $this->args['context'] == 'post_meta' ){
552
+
553
+ $meta_suffix = count( $results );
554
+ foreach( $values as $name => $value ){
555
+ update_post_meta($id, $meta.'_'.$name.'_'.$meta_suffix, $value);
556
+ }
557
+ }
558
+
559
+ exit;
560
+ }
561
+
562
+ /* ajax update a reccord in the meta */
563
+ function wck_update_meta(){
564
+ check_ajax_referer( "wck-update-entry" );
565
+ $meta = $_POST['meta'];
566
+ $id = absint($_POST['id']);
567
+ $element_id = $_POST['element_id'];
568
+ $values = $_POST['values'];
569
+
570
+ $values = apply_filters( "wck_update_meta_filter_values_{$meta}", $values, $element_id );
571
+
572
+ /* check required fields */
573
+ $errors = self::wck_test_required( $this->args['meta_array'], $meta, $values, $id );
574
+ if( $errors != '' ){
575
+ header( 'Content-type: application/json' );
576
+ die( json_encode( $errors ) );
577
+ }
578
+
579
+ if( $this->args['context'] == 'post_meta' )
580
+ $results = get_post_meta($id, $meta, true);
581
+ else if ( $this->args['context'] == 'option' )
582
+ $results = get_option( $meta );
583
+
584
+ $results[$element_id] = $values;
585
+
586
+ do_action( 'wck_before_update_meta', $meta, $id, $values, $element_id );
587
+
588
+ if( $this->args['context'] == 'post_meta' )
589
+ update_post_meta($id, $meta, $results);
590
+ else if ( $this->args['context'] == 'option' )
591
+ update_option( $meta, $results );
592
+
593
+ /* if unserialize_fields is true update the coresponding post metas for every element of the form */
594
+ if( $this->args['unserialize_fields'] && $this->args['context'] == 'post_meta' ){
595
+
596
+ $meta_suffix = $element_id + 1;
597
+ foreach( $values as $name => $value ){
598
+ update_post_meta($id, $meta.'_'.$name.'_'.$meta_suffix, $value);
599
+ }
600
+ }
601
+
602
+ exit;
603
+ }
604
+
605
+ /* ajax to refresh the meta content */
606
+ function wck_refresh_list(){
607
+ $meta = $_POST['meta'];
608
+ $id = absint($_POST['id']);
609
+ echo self::wck_output_meta_content($meta, $id, $this->args['meta_array']);
610
+
611
+ do_action( "wck_refresh_list_{$meta}", $id );
612
+
613
+ exit;
614
+ }
615
+
616
+ /* ajax to refresh an entry content */
617
+ function wck_refresh_entry(){
618
+ $meta = $_POST['meta'];
619
+ $id = absint($_POST['id']);
620
+ $element_id = $_POST['element_id'];
621
+
622
+ if( $this->args['context'] == 'post_meta' )
623
+ $results = get_post_meta($id, $meta, true);
624
+ else if ( $this->args['context'] == 'option' )
625
+ $results = get_option( $meta );
626
+
627
+ echo self::wck_output_entry_content( $meta, $id, $this->args['meta_array'], $results, $element_id );
628
+
629
+ do_action( "wck_refresh_entry_{$meta}", $id );
630
+
631
+ exit;
632
+ }
633
+
634
+ /* ajax to add the form for single */
635
+ function wck_add_form(){
636
+ $meta = $_POST['meta'];
637
+ $id = absint( $_POST['id'] );
638
+ $post = get_post($id);
639
+ self::create_add_form($this->args['meta_array'], $meta, $post );
640
+ do_action( "wck_ajax_add_form_{$meta}", $id );
641
+
642
+ exit;
643
+ }
644
+
645
+
646
+ /* ajax to show the update form */
647
+ function wck_show_update_form(){
648
+ check_ajax_referer( "wck-edit-entry" );
649
+ $meta = $_POST['meta'];
650
+ $id = absint($_POST['id']);
651
+ $element_id = $_POST['element_id'];
652
+ echo self::mb_update_form($this->args['meta_array'], $meta, $id, $element_id);
653
+ exit;
654
+ }
655
+
656
+ /* ajax to remove a reccord from the meta */
657
+ function wck_remove_meta(){
658
+ check_ajax_referer( "wck-delete-entry" );
659
+ $meta = $_POST['meta'];
660
+ $id = absint($_POST['id']);
661
+ $element_id = absint($_POST['element_id']);
662
+
663
+ if( $this->args['context'] == 'post_meta' )
664
+ $results = get_post_meta($id, $meta, true);
665
+ else if ( $this->args['context'] == 'option' )
666
+ $results = get_option( $meta );
667
+
668
+ $old_results = $results;
669
+ unset($results[$element_id]);
670
+ /* reset the keys for the array */
671
+ $results = array_values($results);
672
+
673
+ do_action( 'wck_before_remove_meta', $meta, $id, $element_id );
674
+
675
+ if( $this->args['context'] == 'post_meta' )
676
+ update_post_meta($id, $meta, $results);
677
+ else if ( $this->args['context'] == 'option' )
678
+ update_option( $meta, $results );
679
+
680
+
681
+
682
+ /* TODO: optimize so that it updates from the deleted element forward */
683
+ /* if unserialize_fields is true delete the coresponding post metas */
684
+ if( $this->args['unserialize_fields'] && $this->args['context'] == 'post_meta' ){
685
+
686
+ $meta_suffix = 1;
687
+
688
+ foreach( $results as $result ){
689
+ foreach ( $result as $name => $value){
690
+ update_post_meta($id, $meta.'_'.$name.'_'.$meta_suffix, $value);
691
+ }
692
+ $meta_suffix++;
693
+ }
694
+
695
+ if( count( $results ) == 0 )
696
+ $results = $old_results;
697
+
698
+ foreach( $results as $result ){
699
+ foreach ( $result as $name => $value){
700
+ delete_post_meta( $id, $meta.'_'.$name.'_'.$meta_suffix );
701
+ }
702
+ break;
703
+ }
704
+ }
705
+
706
+ exit;
707
+ }
708
+
709
+
710
+ /* ajax to reorder records */
711
+ function wck_reorder_meta(){
712
+ $meta = $_POST['meta'];
713
+ $id = absint($_POST['id']);
714
+ $elements_id = $_POST['values'];
715
+
716
+ if( $this->args['context'] == 'post_meta' )
717
+ $results = get_post_meta($id, $meta, true);
718
+ else if ( $this->args['context'] == 'option' )
719
+ $results = get_option( $meta );
720
+
721
+ $new_results = array();
722
+ foreach($elements_id as $element_id){
723
+ $new_results[] = $results[$element_id];
724
+ }
725
+
726
+ $results = $new_results;
727
+
728
+ if( $this->args['context'] == 'post_meta' )
729
+ update_post_meta($id, $meta, $results);
730
+ else if ( $this->args['context'] == 'option' )
731
+ update_option( $meta, $results );
732
+
733
+
734
+ /* if unserialize_fields is true reorder all the coresponding post metas */
735
+ if( $this->args['unserialize_fields'] && $this->args['context'] == 'post_meta' ){
736
+
737
+ $meta_suffix = 1;
738
+ foreach( $new_results as $result ){
739
+ foreach ( $result as $name => $value){
740
+ update_post_meta($id, $meta.'_'.$name.'_'.$meta_suffix, $value);
741
+ }
742
+ $meta_suffix++;
743
+ }
744
+
745
+ }
746
+
747
+ exit;
748
+ }
749
+
750
+ /* modify Insert into post button */
751
+ function wck_media_upload_popup_head()
752
+ {
753
+ if( $this->args['meta_name'] == $_GET["meta_name"] ){
754
+ if( ( isset( $_GET["mb_type"] ) ) ){
755
+ ?>
756
+ <style type="text/css">
757
+ #media-upload-header #sidemenu li#tab-type_url,
758
+ #media-upload-header #sidemenu li#tab-gallery {
759
+ display: none;
760
+ }
761
+
762
+ #media-items tr.url,
763
+ #media-items tr.align,
764
+ #media-items tr.image_alt,
765
+ #media-items tr.image-size,
766
+ #media-items tr.post_excerpt,
767
+ #media-items tr.post_content,
768
+ #media-items tr.image_alt p,
769
+ #media-items table thead input.button,
770
+ #media-items table thead img.imgedit-wait-spin,
771
+ #media-items tr.submit a.wp-post-thumbnail {
772
+ display: none;
773
+ }
774
+
775
+ .media-item table thead img {
776
+ border: #DFDFDF solid 1px;
777
+ margin-right: 10px;
778
+ }
779
+
780
+ </style>
781
+ <script type="text/javascript">
782
+ (function($){
783
+
784
+ $(document).ready(function(){
785
+
786
+ $('#media-items').bind('DOMNodeInserted',function(){
787
+ $('input[value="Insert into Post"]').each(function(){
788
+ $(this).attr('value','<?php _e("Select File")?>');
789
+ });
790
+ }).trigger('DOMNodeInserted');
791
+
792
+ $('form#filter').each(function(){
793
+
794
+ $(this).append('<input type="hidden" name="mb_type" value="<?php echo $_GET['mb_type']; ?>" />');
795
+ $(this).append('<input type="hidden" name="mb_info_div" value="<?php echo $_GET['mb_info_div']; ?>" />');
796
+
797
+ });
798
+ });
799
+
800
+ })(jQuery);
801
+ </script>
802
+ <?php
803
+ }
804
+ }
805
+ }
806
+
807
+ /* custom functionality for upload button */
808
+
809
+ function wck_media_send_to_editor($html, $id)
810
+ {
811
+ parse_str($_POST["_wp_http_referer"], $arr_postinfo);
812
+
813
+ if(isset($arr_postinfo["mb_type"]))
814
+ {
815
+ $file_src = wp_get_attachment_url($id);
816
+ $thumbnail = wp_get_attachment_image( $id, array( 80, 60 ), true );
817
+ $file_name = get_the_title( $id );
818
+
819
+ if ( preg_match( '/^.*?\.(\w+)$/', get_attached_file( $id ), $matches ) )
820
+ $file_type = esc_html( strtoupper( $matches[1] ) );
821
+ else
822
+ $file_type = strtoupper( str_replace( 'image/', '', get_post_mime_type( $id ) ) );
823
+
824
+ ?>
825
+ <script type="text/javascript">
826
+
827
+ self.parent.window. <?php echo $arr_postinfo["mb_type"];?> .val('<?php echo $id; ?>');
828
+ 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>');
829
+
830
+ self.parent.tb_remove();
831
+
832
+ </script>
833
+ <?php
834
+ exit;
835
+ }
836
+ else
837
+ {
838
+ return $html;
839
+ }
840
+
841
+ }
842
+
843
+ /* WPML Compatibility */
844
+
845
+ /**
846
+ * Function that ads the side metabox with the Syncronize translation button.
847
+ * The meta box is only added if the lang attribute is set and
848
+ * if any of the custom fields has the 'wckwpml' prefix.
849
+ */
850
+ function wck_add_sync_translation_metabox(){
851
+ global $post;
852
+
853
+ if( isset( $_GET['lang'] ) ){
854
+
855
+ $has_wck_with_unserialize_fields = false;
856
+ $custom_field_keys = get_post_custom_keys( $post->ID );
857
+ foreach( $custom_field_keys as $custom_field_key ){
858
+ $custom_field_key = explode( '_', $custom_field_key );
859
+ if( $custom_field_key[0] == 'wckwpml' ){
860
+ $has_wck_with_unserialize_fields = true;
861
+ break;
862
+ }
863
+ }
864
+
865
+ if($has_wck_with_unserialize_fields){
866
+ add_meta_box( 'wck_sync_translation', __( 'Syncronize WCK', 'wck' ), array( &$this, 'wck_add_sync_box' ), $post->post_type, 'side', 'low' );
867
+ }
868
+
869
+ }
870
+ }
871
+
872
+ /**
873
+ * Callback for the add_meta_box function that ads the "Syncronize WCK Translation" button.
874
+ */
875
+ function wck_add_sync_box(){
876
+ global $post;
877
+ ?>
878
+ <span id="wck_sync" class="button" onclick="wckSyncTranslation(<?php echo $post->ID; ?>)"><?php _e( 'Syncronize WCK Translation', 'wck' ) ?></span>
879
+ <?php
880
+ }
881
+
882
+
883
+
884
+ /**
885
+ * Function that recreates the serialized metas from the individual meta fields.
886
+ */
887
+ function wck_sync_translation_ajax(){
888
+ $post_id = $_POST['id'];
889
+
890
+ /* get all the custom fields keys for the post */
891
+ $custom_field_keys = (array)get_post_custom_keys( $post_id );
892
+
893
+ /* initialize an array that will hold all the arrays for all the wck boxes */
894
+ $wck_array = array();
895
+
896
+ /* go through all the custom fields and if it is a custom field created automaticaly for the translation add it to the $wck_array array*/
897
+ foreach( $custom_field_keys as $cf ){
898
+
899
+ $cf_name_array = explode( '_', $cf );
900
+
901
+ /* a custom field added for the translation will have this form
902
+ 'wckwpml_{meta name}_{field name}_{entry position}_{field position}'
903
+ */
904
+ if( count( $cf_name_array ) >= 5 ){
905
+
906
+ $cf_name = implode( '_', array_slice( $cf_name_array, 1, -3 ) );
907
+
908
+ if( $cf_name_array[0] == 'wckwpml' ){
909
+
910
+ $wck_key = $cf_name_array[ count($cf_name_array) -3 ];
911
+ $wck_position = $cf_name_array[ count($cf_name_array) -2 ];
912
+ $wck_field_position = $cf_name_array[ count($cf_name_array) -1 ];
913
+
914
+ /* "$wck_position - 1" is required because fields in wck by default start at 0 and the additional
915
+ translation fields start at 1 */
916
+ $wck_array[$cf_name][$wck_position - 1][$wck_field_position][$wck_key] = get_post_meta($post_id,$cf,true);
917
+
918
+ }
919
+ }
920
+ }
921
+
922
+
923
+
924
+ if( !empty( $wck_array ) ){
925
+ /* sort the array so that the entry order and fields order are synced */
926
+ self::deep_ksort( $wck_array );
927
+
928
+ /* remove the field position level in the array because it was added just so we could keep the field
929
+ order in place */
930
+ $wck_array = self::wck_reconstruct_array($wck_array);
931
+
932
+ /* add the translated meta to the post */
933
+ foreach( $wck_array as $wck_key => $wck_meta ){
934
+ update_post_meta( $post_id, $wck_key, $wck_meta );
935
+ }
936
+ echo('syncsuccess');
937
+ }
938
+
939
+ exit;
940
+ }
941
+
942
+ /**
943
+ * Function that deep sorts a multy array by numeric key
944
+ */
945
+ function deep_ksort(&$arr) {
946
+ ksort($arr);
947
+ foreach ($arr as &$a) {
948
+ if (is_array($a) && !empty($a)) {
949
+ self::deep_ksort($a);
950
+ }
951
+ }
952
+ }
953
+
954
+ /**
955
+ * Function that removes the field position level
956
+ */
957
+ function wck_reconstruct_array($wck_array){
958
+ foreach( $wck_array as $wck_array_key => $wck_meta ){
959
+ foreach( $wck_meta as $wck_meta_key => $wck_entry ){
960
+ foreach( $wck_entry as $wck_entry_key => $wck_field ){
961
+ $wck_array[$wck_array_key][$wck_meta_key][key($wck_field)] = current($wck_field);
962
+ unset($wck_array[$wck_array_key][$wck_meta_key][$wck_entry_key]);
963
+ }
964
+ }
965
+ }
966
+ return $wck_array;
967
+ }
968
+
969
+
970
+ function wck_get_meta_boxes( $screen = null ){
971
+ global $wp_meta_boxes, $wck_objects;
972
+
973
+ if ( empty( $screen ) )
974
+ $screen = get_current_screen();
975
+ elseif ( is_string( $screen ) )
976
+ $screen = convert_to_screen( $screen );
977
+
978
+ $page = $screen->id;
979
+
980
+ $wck_meta_boxes = array();
981
+
982
+ if( !empty( $wck_objects ) && !empty( $wp_meta_boxes[$page]['normal']['low'] ) ){
983
+ foreach( $wck_objects as $key => $wck_object ){
984
+ if( array_key_exists( $key, $wp_meta_boxes[$page]['normal']['low'] ) )
985
+ $wck_meta_boxes[] = $key;
986
+ }
987
+ }
988
+
989
+ return $wck_meta_boxes;
990
+ }
991
+ }
992
+
993
+
994
+ /*
995
+ Helper class that creates admin menu pages ( both top level menu pages and submenu pages )
996
+ Default Usage:
997
+
998
+ $args = array(
999
+ 'page_type' => 'menu_page',
1000
+ 'page_title' => '',
1001
+ 'menu_title' => '',
1002
+ 'capability' => '',
1003
+ 'menu_slug' => '',
1004
+ 'icon_url' => '',
1005
+ 'position' => '',
1006
+ 'parent_slug' => ''
1007
+ );
1008
+
1009
+ 'page_type' (string) (required) The type of page you want to add. Possible values: 'menu_page', 'submenu_page'
1010
+ 'page_title' (string) (required) The text to be displayed in the title tags and header of
1011
+ the page when the menu is selected
1012
+ 'menu_title' (string) (required) The on-screen name text for the menu
1013
+ 'capability' (string) (required) The capability required for this menu to be displayed to
1014
+ the user.
1015
+ 'menu_slug' (string) (required) The slug name to refer to this menu by (should be unique
1016
+ for this menu).
1017
+ 'icon_url' (string) (optional for 'page_type' => 'menu_page') The url to the icon to be used for this menu.
1018
+ This parameter is optional. Icons should be fairly small, around 16 x 16 pixels
1019
+ for best results.
1020
+ 'position' (integer) (optional for 'page_type' => 'menu_page') The position in the menu order this menu
1021
+ should appear.
1022
+ By default, if this parameter is omitted, the menu will appear at the bottom
1023
+ of the menu structure. The higher the number, the lower its position in the menu.
1024
+ WARNING: if 2 menu items use the same position attribute, one of the items may be
1025
+ overwritten so that only one item displays!
1026
+ 'parent_slug' (string) (required for 'page_type' => 'submenu_page' ) The slug name for the parent menu
1027
+ (or the file name of a standard WordPress admin page) For examples see http://codex.wordpress.org/Function_Reference/add_submenu_page $parent_slug parameter
1028
+ 'priority' (int) (optional) How important your function is. Alter this to make your function
1029
+ be called before or after other functions. The default is 10, so (for example) setting it to 5 would make it run earlier and setting it to 12 would make it run later.
1030
+
1031
+ public $hookname ( for required for 'page_type' => 'menu_page' ) string used internally to
1032
+ track menu page callbacks for outputting the page inside the global $menu array
1033
+ ( for required for 'page_type' => 'submenu_page' ) The resulting page's hook_suffix,
1034
+ or false if the user does not have the capability required.
1035
+ */
1036
+
1037
+ class WCK_Page_Creator{
1038
+
1039
+ private $defaults = array(
1040
+ 'page_type' => 'menu_page',
1041
+ 'page_title' => '',
1042
+ 'menu_title' => '',
1043
+ 'capability' => '',
1044
+ 'menu_slug' => '',
1045
+ 'icon_url' => '',
1046
+ 'position' => '',
1047
+ 'parent_slug' => '',
1048
+ 'priority' => 10,
1049
+ 'network_page' => false
1050
+ );
1051
+ private $args;
1052
+ public $hookname;
1053
+
1054
+
1055
+ /* Constructor method for the class. */
1056
+ function __construct( $args ) {
1057
+
1058
+ /* Global that will hold all the arguments for all the menu pages */
1059
+ global $wck_pages;
1060
+
1061
+ /* Merge the input arguments and the defaults. */
1062
+ $this->args = wp_parse_args( $args, $this->defaults );
1063
+
1064
+ /* Add the settings for this page to the global object */
1065
+ $wck_pages[$this->args['page_title']] = $this->args;
1066
+
1067
+ if( !$this->args['network_page'] ){
1068
+ /* Hook the page function to 'admin_menu'. */
1069
+ add_action( 'admin_menu', array( &$this, 'wck_page_init' ), $this->args['priority'] );
1070
+ }
1071
+ else{
1072
+ /* Hook the page function to 'admin_menu'. */
1073
+ add_action( 'network_admin_menu', array( &$this, 'wck_page_init' ), $this->args['priority'] );
1074
+ }
1075
+ }
1076
+
1077
+ /**
1078
+ * Function that creates the admin page
1079
+ */
1080
+ function wck_page_init(){
1081
+ global $wck_pages_hooknames;
1082
+
1083
+ /* Create the page using either add_menu_page or add_submenu_page functions depending on the 'page_type' parameter. */
1084
+ if( $this->args['page_type'] == 'menu_page' ){
1085
+ $this->hookname = add_menu_page( $this->args['page_title'], $this->args['menu_title'], $this->args['capability'], $this->args['menu_slug'], array( &$this, 'wck_page_template' ), $this->args['icon_url'], $this->args['position'] );
1086
+
1087
+ $wck_pages_hooknames[$this->args['menu_slug']] = $this->hookname;
1088
+ }
1089
+ else if( $this->args['page_type'] == 'submenu_page' ){
1090
+ $this->hookname = add_submenu_page( $this->args['parent_slug'], $this->args['page_title'], $this->args['menu_title'], $this->args['capability'], $this->args['menu_slug'], array( &$this, 'wck_page_template' ) );
1091
+
1092
+ $wck_pages_hooknames[$this->args['menu_slug']] = $this->hookname;
1093
+ }
1094
+
1095
+ do_action( 'wck_page_creator_after_init', $this->hookname );
1096
+
1097
+ /* Create a hook for adding meta boxes. */
1098
+ add_action( "load-{$this->hookname}", array( &$this, 'wck_settings_page_add_meta_boxes' ) );
1099
+ /* Load the JavaScript needed for the screen. */
1100
+ add_action( 'admin_enqueue_scripts', array( &$this, 'wck_page_enqueue_scripts' ) );
1101
+ add_action( "admin_head-{$this->hookname}", array( &$this, 'wck_page_load_scripts' ) );
1102
+ }
1103
+
1104
+ /**
1105
+ * Do action 'add_meta_boxes'. This hook isn't executed by default on a admin page so we have to add it.
1106
+ */
1107
+ function wck_settings_page_add_meta_boxes() {
1108
+ do_action( 'add_meta_boxes', $this->hookname );
1109
+ }
1110
+
1111
+ /**
1112
+ * Loads the JavaScript files required for managing the meta boxes on the theme settings
1113
+ * page, which allows users to arrange the boxes to their liking.
1114
+ *
1115
+ * @global string $bareskin_settings_page. The global setting page (returned by add_theme_page in function
1116
+ * bareskin_settings_page_init ).
1117
+ * @since 1.0.0
1118
+ * @param string $hook The current page being viewed.
1119
+ */
1120
+ function wck_page_enqueue_scripts( $hook ) {
1121
+ if ( $hook == $this->hookname ) {
1122
+ wp_enqueue_script( 'common' );
1123
+ wp_enqueue_script( 'wp-lists' );
1124
+ wp_enqueue_script( 'postbox' );
1125
+ }
1126
+ }
1127
+
1128
+ /**
1129
+ * Loads the JavaScript required for toggling the meta boxes on the theme settings page.
1130
+ *
1131
+ * @global string $bareskin_settings_page. The global setting page (returned by add_theme_page in function
1132
+ * bareskin_settings_page_init ).
1133
+ * @since 1.0.0
1134
+ */
1135
+ function wck_page_load_scripts() {
1136
+ ?>
1137
+ <script type="text/javascript">
1138
+ //<![CDATA[
1139
+ jQuery(document).ready( function($) {
1140
+ $('.if-js-closed').removeClass('if-js-closed').addClass('closed');
1141
+ postboxes.add_postbox_toggles( '<?php echo $this->hookname; ?>' );
1142
+ });
1143
+ //]]>
1144
+ </script><?php
1145
+ }
1146
+
1147
+ /**
1148
+ * Outputs default template for the page. It contains placeholders for metaboxes. It also
1149
+ * provides two action hooks 'wck_before_meta_boxes' and 'wck_after_meta_boxes'.
1150
+ */
1151
+ function wck_page_template(){
1152
+ ?>
1153
+ <div class="wrap">
1154
+
1155
+ <?php if( $this->args['page_icon'] != '' ): ?>
1156
+ <div id="<?php echo $this->args['menu_slug'] ?>-icon" style="background: url('<?php echo $this->args['page_icon']; ?>') no-repeat;" class="icon32">
1157
+ <br/>
1158
+ </div>
1159
+ <?php endif; ?>
1160
+
1161
+ <h2><?php echo $this->args['page_title'] ?></h2>
1162
+
1163
+ <div id="poststuff">
1164
+
1165
+ <?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
1166
+ <?php wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>
1167
+
1168
+ <?php do_action( 'wck_before_meta_boxes', $this->hookname ); ?>
1169
+
1170
+ <div class="metabox-holder">
1171
+ <div class="post-box-container column-2 side"><?php do_meta_boxes( $this->hookname, 'side', null ); ?></div>
1172
+ <div class="wck-post-body">
1173
+ <div class="post-box-container column-1 normal">
1174
+ <?php do_action( 'wck_before_column1_metabox_content', $this->hookname ); ?>
1175
+ <?php do_meta_boxes( $this->hookname, 'normal', null ); ?>
1176
+ <?php do_action( 'wck_after_column1_metabox_content', $this->hookname ); ?>
1177
+ </div>
1178
+ <div class="post-box-container column-3 advanced">
1179
+ <?php do_action( 'wck_before_column3_metabox_content', $this->hookname ); ?>
1180
+ <?php do_meta_boxes( $this->hookname, 'advanced', null ); ?>
1181
+ <?php do_action( 'wck_after_column3_metabox_content', $this->hookname ); ?>
1182
+ </div>
1183
+ </div>
1184
+
1185
+ </div>
1186
+
1187
+ <?php do_action( 'wck_after_meta_boxes', $this->hookname ); ?>
1188
+
1189
+ </div><!-- #poststuff -->
1190
+
1191
+ </div><!-- .wrap -->
1192
+ <?php
1193
+ }
1194
+ }
1195
+ ?>