alchemy_cms 2.0.pre2 → 2.0.pre3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +5 -1
- data/Gemfile +3 -0
- data/Rakefile +16 -14
- data/{alchemy.gemspec → alchemy_cms.gemspec} +1 -1
- data/app/models/message.rb +1 -1
- data/app/views/elements/_searchresult_view.html.erb +1 -1
- data/config/initializers/fast_gettext.rb +1 -1
- data/config/routes.rb +3 -0
- data/lib/alchemy/version.rb +1 -1
- data/lib/{alchemy.rb → alchemy_cms.rb} +0 -0
- data/lib/rails/generators/alchemy/scaffold/scaffold_generator.rb +2 -2
- data/lib/rails/templates/alchemy.rb +1 -1
- data/spec/alchemy_spec.rb +7 -0
- data/spec/config_spec.rb +7 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/alchemy/config.yml +199 -0
- data/spec/dummy/config/alchemy/elements.yml +91 -0
- data/spec/dummy/config/alchemy/page_layouts.yml +29 -0
- data/spec/dummy/config/application.rb +45 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml +22 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +26 -0
- data/spec/dummy/config/environments/production.rb +49 -0
- data/spec/dummy/config/environments/test.rb +35 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +10 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +58 -0
- data/spec/dummy/db/schema.rb +267 -0
- data/spec/dummy/log/production.log +0 -0
- data/spec/dummy/log/server.log +0 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +26 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/public/images/alchemy/ajax_loader.gif +0 -0
- data/spec/dummy/public/images/alchemy/alchemy-logo.png +0 -0
- data/spec/dummy/public/images/alchemy/flags.png +0 -0
- data/spec/dummy/public/images/alchemy/gui/navi-tab.png +0 -0
- data/spec/dummy/public/images/alchemy/gui/shading.png +0 -0
- data/spec/dummy/public/images/alchemy/gui/shading_90.png +0 -0
- data/spec/dummy/public/images/alchemy/gui/toggle.png +0 -0
- data/spec/dummy/public/images/alchemy/icons.png +0 -0
- data/spec/dummy/public/images/alchemy/jquery-sb/select_arrow.gif +0 -0
- data/spec/dummy/public/images/alchemy/jquery-sb/select_arrow_bg.gif +0 -0
- data/spec/dummy/public/images/alchemy/jquery-sb/select_arrow_bg_hover.gif +0 -0
- data/spec/dummy/public/images/alchemy/jquery-ui/ui-icons_666666_256x240.png +0 -0
- data/spec/dummy/public/images/alchemy/placeholder.png +0 -0
- data/spec/dummy/public/images/alchemy/swfupload/browse_button.png +0 -0
- data/spec/dummy/public/javascripts/alchemy/alchemy.element_editor_selector.js +88 -0
- data/spec/dummy/public/javascripts/alchemy/alchemy.growler.js +44 -0
- data/spec/dummy/public/javascripts/alchemy/alchemy.image_cropper.js +56 -0
- data/spec/dummy/public/javascripts/alchemy/alchemy.js +892 -0
- data/spec/dummy/public/javascripts/alchemy/alchemy.link_overlay.js +221 -0
- data/spec/dummy/public/javascripts/alchemy/alchemy.page_sorter.js +42 -0
- data/spec/dummy/public/javascripts/alchemy/alchemy.preview.js +145 -0
- data/spec/dummy/public/javascripts/alchemy/jquery-ui.js +428 -0
- data/spec/dummy/public/javascripts/alchemy/jquery.Jcrop.min.js +246 -0
- data/spec/dummy/public/javascripts/alchemy/jquery.dialogextend.min.js +8 -0
- data/spec/dummy/public/javascripts/alchemy/jquery.in-place-edit.js +171 -0
- data/spec/dummy/public/javascripts/alchemy/jquery.js +18 -0
- data/spec/dummy/public/javascripts/alchemy/jquery.rails.js +315 -0
- data/spec/dummy/public/javascripts/alchemy/jquery.sb.min.js +14 -0
- data/spec/dummy/public/javascripts/alchemy/jquery.scrollTo-1.4.2-min.js +11 -0
- data/spec/dummy/public/javascripts/alchemy/jquery.ui.nestedSortable.js +291 -0
- data/spec/dummy/public/javascripts/alchemy/jquery.ui.tabspaging.js +281 -0
- data/spec/dummy/public/javascripts/alchemy/swfupload/fileprogress.js +203 -0
- data/spec/dummy/public/javascripts/alchemy/swfupload/handlers.js +171 -0
- data/spec/dummy/public/javascripts/alchemy/swfupload/queue.js +98 -0
- data/spec/dummy/public/javascripts/alchemy/swfupload/swfupload.js +980 -0
- data/spec/dummy/public/javascripts/alchemy/swfupload/swfupload.swf +0 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/jquery.tinymce.js +1 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/langs/de.js +1 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/langs/en.js +223 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/license.txt +504 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/plugins/alchemy_link/editor_plugin.js +43 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/plugins/alchemy_link/langs/de.js +4 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/plugins/alchemy_link/langs/en.js +4 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/plugins/fullscreen/editor_plugin.js +1 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/plugins/fullscreen/fullscreen.htm +109 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/plugins/inlinepopups/editor_plugin.js +1 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/plugins/inlinepopups/skins/alchemy/window.css +402 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/plugins/inlinepopups/template.htm +387 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/plugins/lists/editor_plugin.js +1 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/plugins/paste/editor_plugin.js +1 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/plugins/paste/js/pastetext.js +36 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/plugins/paste/js/pasteword.js +51 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/plugins/paste/langs/de_dlg.js +1 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/plugins/paste/langs/en_dlg.js +5 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/plugins/paste/pastetext.htm +27 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/plugins/paste/pasteword.htm +21 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/plugins/table/cell.htm +180 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/plugins/table/css/cell.css +17 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/plugins/table/css/row.css +25 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/plugins/table/css/table.css +13 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/plugins/table/editor_plugin.js +1 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/plugins/table/js/cell.js +319 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/plugins/table/js/merge_cells.js +27 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/plugins/table/js/row.js +237 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/plugins/table/js/table.js +450 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/plugins/table/langs/de_dlg.js +1 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/plugins/table/langs/en_dlg.js +75 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/plugins/table/merge_cells.htm +32 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/plugins/table/row.htm +158 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/plugins/table/table.htm +188 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/about.htm +52 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/anchor.htm +26 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/charmap.htm +51 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/color_picker.htm +74 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/editor_template.js +1 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/image.htm +80 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/img/colorpicker.jpg +0 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/img/flash.gif +0 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/img/icons.gif +0 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/img/iframe.gif +0 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/img/pagebreak.gif +0 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/img/quicktime.gif +0 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/img/realmedia.gif +0 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/img/shockwave.gif +0 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/img/trans.gif +0 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/img/video.gif +0 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/img/windowsmedia.gif +0 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/js/about.js +73 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/js/anchor.js +42 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/js/charmap.js +355 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/js/color_picker.js +329 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/js/image.js +247 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/js/link.js +153 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/js/source_editor.js +56 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/langs/de.js +1 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/langs/de_dlg.js +1 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/langs/en.js +68 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/langs/en_dlg.js +54 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/link.htm +57 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/shortcuts.htm +47 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/skins/default/content.css +47 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/skins/default/dialog.css +117 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/skins/default/img/buttons.png +0 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/skins/default/img/items.gif +0 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif +0 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/skins/default/img/menu_check.gif +0 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/skins/default/img/progress.gif +0 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/skins/default/img/tabs.gif +0 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/skins/default/ui.css +214 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/skins/highcontrast/content.css +23 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/skins/highcontrast/dialog.css +105 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/skins/highcontrast/ui.css +102 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/skins/o2k7/content.css +46 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/skins/o2k7/dialog.css +117 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png +0 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png +0 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/skins/o2k7/ui.css +217 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/skins/o2k7/ui_black.css +8 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css +5 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/advanced/source_editor.htm +25 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/themes/simple/langs/de.js +1 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/tiny_mce.js +1 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/tiny_mce_popup.js +5 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/utils/editable_selects.js +70 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/utils/form_utils.js +210 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/utils/mctabs.js +162 -0
- data/spec/dummy/public/javascripts/alchemy/tiny_mce/utils/validate.js +252 -0
- data/spec/dummy/public/javascripts/application.js +2 -0
- data/spec/dummy/public/javascripts/controls.js +965 -0
- data/spec/dummy/public/javascripts/dragdrop.js +974 -0
- data/spec/dummy/public/javascripts/effects.js +1123 -0
- data/spec/dummy/public/javascripts/prototype.js +6001 -0
- data/spec/dummy/public/javascripts/rails.js +191 -0
- data/spec/dummy/public/stylesheets/.gitkeep +0 -0
- data/spec/dummy/public/stylesheets/alchemy/Jcrop.gif +0 -0
- data/spec/dummy/public/stylesheets/alchemy/alchemy.css +3629 -0
- data/spec/dummy/public/stylesheets/alchemy/alchemy_tinymce_content.css +94 -0
- data/spec/dummy/public/stylesheets/alchemy/alchemy_tinymce_dialog.css +415 -0
- data/spec/dummy/public/stylesheets/alchemy/default/img/tabs.gif +0 -0
- data/spec/dummy/public/stylesheets/alchemy/elements.css +900 -0
- data/spec/dummy/public/stylesheets/alchemy/flags.css +1 -0
- data/spec/dummy/public/stylesheets/alchemy/ie6.css +18 -0
- data/spec/dummy/public/stylesheets/alchemy/jquery-ui-1.8.7.alchemy.css +2023 -0
- data/spec/dummy/public/stylesheets/alchemy/jquery.Jcrop.css +35 -0
- data/spec/dummy/public/stylesheets/alchemy/jquery.sb.css +244 -0
- data/spec/dummy/public/stylesheets/alchemy/standard_set.css +374 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/integration/navigation_spec.rb +9 -0
- data/spec/integration/security_spec.rb +25 -0
- data/spec/spec_helper.rb +40 -0
- metadata +371 -8
@@ -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>
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){var e=tinymce.each,r=tinymce.dom.Event,g;function p(t,s){while(t&&(t.nodeType===8||(t.nodeType===3&&/^[ \t\n\r]*$/.test(t.nodeValue)))){t=s(t)}return t}function b(s){return p(s,function(t){return t.previousSibling})}function i(s){return p(s,function(t){return t.nextSibling})}function d(s,u,t){return s.dom.getParent(u,function(v){return tinymce.inArray(t,v)!==-1})}function n(s){return s&&(s.tagName==="OL"||s.tagName==="UL")}function c(u,v){var t,w,s;t=b(u.lastChild);while(n(t)){w=t;t=b(w.previousSibling)}if(w){s=v.create("li",{style:"list-style-type: none;"});v.split(u,w);v.insertAfter(s,w);s.appendChild(w);s.appendChild(w);u=s.previousSibling}return u}function m(t,s,u){t=a(t,s,u);return o(t,s,u)}function a(u,s,v){var t=b(u.previousSibling);if(t){return h(t,u,s?t:false,v)}else{return u}}function o(u,t,v){var s=i(u.nextSibling);if(s){return h(u,s,t?s:false,v)}else{return u}}function h(u,s,t,v){if(l(u,s,!!t,v)){return f(u,s,t)}else{if(u&&u.tagName==="LI"&&n(s)){u.appendChild(s)}}return s}function l(u,t,s,v){if(!u||!t){return false}else{if(u.tagName==="LI"&&t.tagName==="LI"){return t.style.listStyleType==="none"||j(t)}else{if(n(u)){return(u.tagName===t.tagName&&(s||u.style.listStyleType===t.style.listStyleType))||q(t)}else{if(v&&u.tagName==="P"&&t.tagName==="P"){return true}else{return false}}}}}function q(t){var s=i(t.firstChild),u=b(t.lastChild);return s&&u&&n(t)&&s===u&&(n(s)||s.style.listStyleType==="none"||j(s))}function j(u){var t=i(u.firstChild),s=b(u.lastChild);return t&&s&&t===s&&n(t)}function f(w,v,s){var u=b(w.lastChild),t=i(v.firstChild);if(w.tagName==="P"){w.appendChild(w.ownerDocument.createElement("br"))}while(v.firstChild){w.appendChild(v.firstChild)}if(s){w.style.listStyleType=s.style.listStyleType}v.parentNode.removeChild(v);h(u,t,false);return w}function k(t,u){var s;if(!u.is(t,"li,ol,ul")){s=u.getParent(t,"li");if(s){t=s}}return t}tinymce.create("tinymce.plugins.Lists",{init:function(u,v){var s=false;function y(z){return z.keyCode===9&&(u.queryCommandState("InsertUnorderedList")||u.queryCommandState("InsertOrderedList"))}function w(z,B){var A=z.selection,C;if(B.keyCode===13){C=A.getStart();if(C.tagName=="BR"&&C.parentNode.tagName=="LI"){C=C.parentNode}s=A.isCollapsed()&&C&&C.tagName==="LI"&&(C.childNodes.length===0||(C.firstChild.nodeName=="BR"&&C.childNodes.length===1));return s}}function t(z,A){if(y(A)||w(z,A)){return r.cancel(A)}}function x(C,E){if(!tinymce.isGecko){return}var A=C.selection.getStart();if(E.keyCode!=8||A.tagName!=="IMG"){return}function B(K){var L=K.firstChild;var J=null;do{if(!L){break}if(L.tagName==="LI"){J=L}}while(L=L.nextSibling);return J}function I(K,J){while(K.childNodes.length>0){J.appendChild(K.childNodes[0])}}var F;if(A.parentNode.previousSibling.tagName==="UL"||A.parentNode.previousSibling.tagName==="OL"){F=A.parentNode.previousSibling}else{if(A.parentNode.previousSibling.previousSibling.tagName==="UL"||A.parentNode.previousSibling.previousSibling.tagName==="OL"){F=A.parentNode.previousSibling.previousSibling}else{return}}var H=B(F);var z=C.dom.createRng();z.setStart(H,1);z.setEnd(H,1);C.selection.setRng(z);C.selection.collapse(true);var D=C.selection.getBookmark();var G=A.parentNode.cloneNode(true);if(G.tagName==="P"||G.tagName==="DIV"){I(G,H)}else{H.appendChild(G)}A.parentNode.parentNode.removeChild(A.parentNode);C.selection.moveToBookmark(D)}this.ed=u;u.addCommand("Indent",this.indent,this);u.addCommand("Outdent",this.outdent,this);u.addCommand("InsertUnorderedList",function(){this.applyList("UL","OL")},this);u.addCommand("InsertOrderedList",function(){this.applyList("OL","UL")},this);u.onInit.add(function(){u.editorCommands.addCommands({outdent:function(){var A=u.selection,B=u.dom;function z(C){C=B.getParent(C,B.isBlock);return C&&(parseInt(u.dom.getStyle(C,"margin-left")||0,10)+parseInt(u.dom.getStyle(C,"padding-left")||0,10))>0}return z(A.getStart())||z(A.getEnd())||u.queryCommandState("InsertOrderedList")||u.queryCommandState("InsertUnorderedList")}},"state")});u.onKeyUp.add(function(A,B){var C,z;if(y(B)){A.execCommand(B.shiftKey?"Outdent":"Indent",true,null);return r.cancel(B)}else{if(s&&w(A,B)){if(A.queryCommandState("InsertOrderedList")){A.execCommand("InsertOrderedList")}else{A.execCommand("InsertUnorderedList")}C=A.selection.getStart();if(C&&C.tagName==="LI"){C=A.dom.getParent(C,"ol,ul").nextSibling;if(C&&C.tagName==="P"){if(!C.firstChild){C.appendChild(A.getDoc().createTextNode(""))}z=A.dom.createRng();z.setStart(C.firstChild,1);z.setEnd(C.firstChild,1);A.selection.setRng(z)}}return r.cancel(B)}}});u.onKeyPress.add(t);u.onKeyDown.add(t);u.onKeyDown.add(x)},applyList:function(y,v){var C=this,z=C.ed,I=z.dom,s=[],H=false,u=false,w=false,B,G=z.selection.getSelectedBlocks();function E(t){if(t&&t.tagName==="BR"){I.remove(t)}}function F(M){var N=I.create(y),t;function L(O){if(O.style.marginLeft||O.style.paddingLeft){C.adjustPaddingFunction(false)(O)}}if(M.tagName==="LI"){}else{if(M.tagName==="P"||M.tagName==="DIV"||M.tagName==="BODY"){K(M,function(P,O,Q){J(P,O,M.tagName==="BODY"?null:P.parentNode);t=P.parentNode;L(t);E(O)});if(M.tagName==="P"||G.length>1){I.split(t.parentNode.parentNode,t.parentNode)}m(t.parentNode,true);return}else{t=I.create("li");I.insertAfter(t,M);t.appendChild(M);L(M);M=t}}I.insertAfter(N,M);N.appendChild(M);m(N,true);s.push(M)}function J(Q,L,O){var t,P=Q,N,M;while(!I.isBlock(Q.parentNode)&&Q.parentNode!==I.getRoot()){Q=I.split(Q.parentNode,Q.previousSibling);Q=Q.nextSibling;P=Q}if(O){t=O.cloneNode(true);Q.parentNode.insertBefore(t,Q);while(t.firstChild){I.remove(t.firstChild)}t=I.rename(t,"li")}else{t=I.create("li");Q.parentNode.insertBefore(t,Q)}while(P&&P!=L){N=P.nextSibling;t.appendChild(P);P=N}if(t.childNodes.length===0){t.innerHTML='<br _mce_bogus="1" />'}F(t)}function K(Q,T){var N,R,O=3,L=1,t="br,ul,ol,p,div,h1,h2,h3,h4,h5,h6,table,blockquote,address,pre,form,center,dl";function P(X,U){var V=I.createRng(),W;g.keep=true;z.selection.moveToBookmark(g);g.keep=false;W=z.selection.getRng(true);if(!U){U=X.parentNode.lastChild}V.setStartBefore(X);V.setEndAfter(U);return !(V.compareBoundaryPoints(O,W)>0||V.compareBoundaryPoints(L,W)<=0)}function S(U){if(U.nextSibling){return U.nextSibling}if(!I.isBlock(U.parentNode)&&U.parentNode!==I.getRoot()){return S(U.parentNode)}}N=Q.firstChild;var M=false;e(I.select(t,Q),function(V){var U;if(V.hasAttribute&&V.hasAttribute("_mce_bogus")){return true}if(P(N,V)){I.addClass(V,"_mce_tagged_br");N=S(V)}});M=(N&&P(N,undefined));N=Q.firstChild;e(I.select(t,Q),function(V){var U=S(V);if(V.hasAttribute&&V.hasAttribute("_mce_bogus")){return true}if(I.hasClass(V,"_mce_tagged_br")){T(N,V,R);R=null}else{R=V}N=U});if(M){T(N,undefined,R)}}function D(t){K(t,function(M,L,N){J(M,L);E(L);E(N)})}function A(t){if(tinymce.inArray(s,t)!==-1){return}if(t.parentNode.tagName===v){I.split(t.parentNode,t);F(t);o(t.parentNode,false)}s.push(t)}function x(M){var O,N,L,t;if(tinymce.inArray(s,M)!==-1){return}M=c(M,I);while(I.is(M.parentNode,"ol,ul,li")){I.split(M.parentNode,M)}s.push(M);M=I.rename(M,"p");L=m(M,false,z.settings.force_br_newlines);if(L===M){O=M.firstChild;while(O){if(I.isBlock(O)){O=I.split(O.parentNode,O);t=true;N=O.nextSibling&&O.nextSibling.firstChild}else{N=O.nextSibling;if(t&&O.tagName==="BR"){I.remove(O)}t=false}O=N}}}e(G,function(t){t=k(t,I);if(t.tagName===v||(t.tagName==="LI"&&t.parentNode.tagName===v)){u=true}else{if(t.tagName===y||(t.tagName==="LI"&&t.parentNode.tagName===y)){H=true}else{w=true}}});if(w||u||G.length===0){B={LI:A,H1:F,H2:F,H3:F,H4:F,H5:F,H6:F,P:F,BODY:F,DIV:G.length>1?F:D,defaultAction:D}}else{B={defaultAction:x}}this.process(B)},indent:function(){var u=this.ed,w=u.dom,x=[];function s(z){var y=w.create("li",{style:"list-style-type: none;"});w.insertAfter(y,z);return y}function t(B){var y=s(B),D=w.getParent(B,"ol,ul"),C=D.tagName,E=w.getStyle(D,"list-style-type"),A={},z;if(E!==""){A.style="list-style-type: "+E+";"}z=w.create(C,A);y.appendChild(z);return z}function v(z){if(!d(u,z,x)){z=c(z,w);var y=t(z);y.appendChild(z);m(y.parentNode,false);m(y,false);x.push(z)}}this.process({LI:v,defaultAction:this.adjustPaddingFunction(true)})},outdent:function(){var v=this,u=v.ed,w=u.dom,s=[];function x(t){var z,y,A;if(!d(u,t,s)){if(w.getStyle(t,"margin-left")!==""||w.getStyle(t,"padding-left")!==""){return v.adjustPaddingFunction(false)(t)}A=w.getStyle(t,"text-align",true);if(A==="center"||A==="right"){w.setStyle(t,"text-align","left");return}t=c(t,w);z=t.parentNode;y=t.parentNode.parentNode;if(y.tagName==="P"){w.split(y,t.parentNode)}else{w.split(z,t);if(y.tagName==="LI"){w.split(y,t)}else{if(!w.is(y,"ol,ul")){w.rename(t,"p")}}}s.push(t)}}this.process({LI:x,defaultAction:this.adjustPaddingFunction(false)});e(s,m)},process:function(x){var B=this,v=B.ed.selection,y=B.ed.dom,A,s;function w(t){y.removeClass(t,"_mce_act_on");if(!t||t.nodeType!==1){return}t=k(t,y);var C=x[t.tagName];if(!C){C=x.defaultAction}C(t)}function u(t){B.splitSafeEach(t.childNodes,w)}function z(t,C){return C>=0&&t.hasChildNodes()&&C<t.childNodes.length&&t.childNodes[C].tagName==="BR"}A=v.getSelectedBlocks();if(A.length===0){A=[y.getRoot()]}s=v.getRng(true);if(!s.collapsed){if(z(s.endContainer,s.endOffset-1)){s.setEnd(s.endContainer,s.endOffset-1);v.setRng(s)}if(z(s.startContainer,s.startOffset)){s.setStart(s.startContainer,s.startOffset+1);v.setRng(s)}}g=v.getBookmark();x.OL=x.UL=u;B.splitSafeEach(A,w);v.moveToBookmark(g);g=null;B.ed.execCommand("mceRepaint")},splitSafeEach:function(t,s){if(tinymce.isGecko&&(/Firefox\/[12]\.[0-9]/.test(navigator.userAgent)||/Firefox\/3\.[0-4]/.test(navigator.userAgent))){this.classBasedEach(t,s)}else{e(t,s)}},classBasedEach:function(v,u){var w=this.ed.dom,s,t;e(v,function(x){w.addClass(x,"_mce_act_on")});s=w.select("._mce_act_on");while(s.length>0){t=s.shift();w.removeClass(t,"_mce_act_on");u(t);s=w.select("._mce_act_on")}},adjustPaddingFunction:function(u){var s,v,t=this.ed;s=t.settings.indentation;v=/[a-z%]+/i.exec(s);s=parseInt(s,10);return function(w){var y,x;y=parseInt(t.dom.getStyle(w,"margin-left")||0,10)+parseInt(t.dom.getStyle(w,"padding-left")||0,10);if(u){x=y+s}else{x=y-s}t.dom.setStyle(w,"padding-left","");t.dom.setStyle(w,"margin-left",x>0?x+v:"")}},getInfo:function(){return{longname:"Lists",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/lists",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("lists",tinymce.plugins.Lists)}());
|
@@ -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:"p",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(d,k,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_sticky"))}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: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="<pre>"+o.encode(r).replace(/\r?\n/g,"<br />")+"</pre>"}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){d([[/(?:<br> [\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> [\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*( )+/gi,/( |<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>"],[/ /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(/"/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(/ /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+\.( |\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*( |\u00a0)+\s*/,"")}else{r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^\s*\w+\.( |\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(j,x,v){var t,u,l,k,r,e,p,f,n=j.getWin(),z=j.getDoc(),s=j.selection,m=tinymce.is,y=tinymce.inArray,g=b(j,"paste_text_linebreaktype"),o=b(j,"paste_text_replacements");function q(d){c(d,function(h){if(h.constructor==RegExp){v=v.replace(h,"")}else{v=v.replace(h[0],h[1])}})}if((typeof(v)==="string")&&(v.length>0)){if(/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(v)){q([/[\n\r]+/g])}else{q([/\r+/g])}q([[/<\/(?: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,[/ /gi," "],[/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi,"$1"],[/\n{3,}/g,"\n\n"],/^\s+|\s+$/g]);v=x.decode(tinymce.html.Entities.encodeRaw(v));if(!s.isCollapsed()){z.execCommand("Delete",false,null)}if(m(o,"array")||(m(o,"array"))){q(o)}else{if(m(o,"string")){q(new RegExp(o,"gi"))}}if(g=="none"){q([[/\n+/g," "]])}else{if(g=="br"){q([[/\n/g,"<br />"]])}else{q([/^\s+|\s+$/g,[/\n\n/g,"</p><p>"],[/\n/g,"<br />"]])}}if((l=v.indexOf("</p><p>"))!=-1){k=v.lastIndexOf("</p><p>");r=s.getNode();e=[];do{if(r.nodeType==1){if(r.nodeName=="TD"||r.nodeName=="BODY"){break}e[e.length]=r}}while(r=r.parentNode);if(e.length>0){p=v.substring(0,l);f="";for(t=0,u=e.length;t<u;t++){p+="</"+e[t].nodeName.toLowerCase()+">";f+="<"+e[e.length-t-1].nodeName.toLowerCase()+">"}if(l==k){v=p+f+v.substring(l+7)}else{v=p+v.substring(l+4,k+4)+f+v.substring(k+7)}}}j.execCommand("mceInsertRawHTML",false,v+'<span id="_plain_text_marker"> </span>');window.setTimeout(function(){var d=x.get("_plain_text_marker"),A,h,w,i;s.select(d,false);z.execCommand("Delete",false,null);d=null;A=s.getStart();h=x.getViewPort(n);w=x.getPos(A).y;i=A.clientHeight;if((w<h.y)||(w+i>h.y+h.h)){z.body.scrollTop=w<h.y?w:w-h.h+25}},0)}},_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)})();
|
@@ -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);
|
@@ -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);
|