i18n_locale_editor 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. data/CHANGELOG +7 -0
  2. data/README.rdoc +4 -3
  3. data/VERSION +1 -1
  4. data/app/helpers/translations_helper.rb +2 -1
  5. data/lib/i18n_locale_editor.rb +1 -20
  6. data/public/{i18n-locale-editor.js → i18n_locale_editor/i18n-locale-editor.js} +15 -4
  7. data/public/i18n_locale_editor/wymeditor/iframe/default/lbl-blockquote.png +0 -0
  8. data/public/i18n_locale_editor/wymeditor/iframe/default/lbl-h1.png +0 -0
  9. data/public/i18n_locale_editor/wymeditor/iframe/default/lbl-h2.png +0 -0
  10. data/public/i18n_locale_editor/wymeditor/iframe/default/lbl-h3.png +0 -0
  11. data/public/i18n_locale_editor/wymeditor/iframe/default/lbl-h4.png +0 -0
  12. data/public/i18n_locale_editor/wymeditor/iframe/default/lbl-h5.png +0 -0
  13. data/public/i18n_locale_editor/wymeditor/iframe/default/lbl-h6.png +0 -0
  14. data/public/i18n_locale_editor/wymeditor/iframe/default/lbl-p.png +0 -0
  15. data/public/i18n_locale_editor/wymeditor/iframe/default/lbl-pre.png +0 -0
  16. data/public/i18n_locale_editor/wymeditor/iframe/default/wymiframe.css +90 -0
  17. data/public/i18n_locale_editor/wymeditor/iframe/default/wymiframe.html +26 -0
  18. data/public/i18n_locale_editor/wymeditor/jquery.wymeditor.js +4688 -0
  19. data/public/i18n_locale_editor/wymeditor/jquery.wymeditor.min.js +1 -0
  20. data/public/i18n_locale_editor/wymeditor/jquery.wymeditor.pack.js +1 -0
  21. data/public/i18n_locale_editor/wymeditor/lang/bg.js +45 -0
  22. data/public/i18n_locale_editor/wymeditor/lang/ca.js +45 -0
  23. data/public/i18n_locale_editor/wymeditor/lang/cs.js +45 -0
  24. data/public/i18n_locale_editor/wymeditor/lang/cy.js +45 -0
  25. data/public/i18n_locale_editor/wymeditor/lang/de.js +45 -0
  26. data/public/i18n_locale_editor/wymeditor/lang/en.js +45 -0
  27. data/public/i18n_locale_editor/wymeditor/lang/es.js +45 -0
  28. data/public/i18n_locale_editor/wymeditor/lang/fa.js +46 -0
  29. data/public/i18n_locale_editor/wymeditor/lang/fi.js +44 -0
  30. data/public/i18n_locale_editor/wymeditor/lang/fr.js +45 -0
  31. data/public/i18n_locale_editor/wymeditor/lang/gl.js +45 -0
  32. data/public/i18n_locale_editor/wymeditor/lang/he.js +45 -0
  33. data/public/i18n_locale_editor/wymeditor/lang/hr.js +45 -0
  34. data/public/i18n_locale_editor/wymeditor/lang/hu.js +45 -0
  35. data/public/i18n_locale_editor/wymeditor/lang/it.js +45 -0
  36. data/public/i18n_locale_editor/wymeditor/lang/nb.js +45 -0
  37. data/public/i18n_locale_editor/wymeditor/lang/nl.js +45 -0
  38. data/public/i18n_locale_editor/wymeditor/lang/nn.js +45 -0
  39. data/public/i18n_locale_editor/wymeditor/lang/pl.js +45 -0
  40. data/public/i18n_locale_editor/wymeditor/lang/pt-br.js +45 -0
  41. data/public/i18n_locale_editor/wymeditor/lang/pt.js +45 -0
  42. data/public/i18n_locale_editor/wymeditor/lang/ru.js +45 -0
  43. data/public/i18n_locale_editor/wymeditor/lang/sv.js +45 -0
  44. data/public/i18n_locale_editor/wymeditor/lang/tr.js +45 -0
  45. data/public/i18n_locale_editor/wymeditor/lang/zh_cn.js +47 -0
  46. data/public/i18n_locale_editor/wymeditor/plugins/embed/jquery.wymeditor.embed.js +52 -0
  47. data/public/i18n_locale_editor/wymeditor/plugins/fullscreen/icon_fullscreen.gif +0 -0
  48. data/public/i18n_locale_editor/wymeditor/plugins/fullscreen/jquery.wymeditor.fullscreen.js +127 -0
  49. data/public/i18n_locale_editor/wymeditor/plugins/hovertools/jquery.wymeditor.hovertools.js +57 -0
  50. data/public/i18n_locale_editor/wymeditor/plugins/resizable/jquery.wymeditor.resizable.js +91 -0
  51. data/public/i18n_locale_editor/wymeditor/plugins/resizable/readme.txt +124 -0
  52. data/public/i18n_locale_editor/wymeditor/plugins/tidy/README +19 -0
  53. data/public/i18n_locale_editor/wymeditor/plugins/tidy/jquery.wymeditor.tidy.js +82 -0
  54. data/public/i18n_locale_editor/wymeditor/plugins/tidy/tidy.php +36 -0
  55. data/public/i18n_locale_editor/wymeditor/plugins/tidy/wand.png +0 -0
  56. data/public/i18n_locale_editor/wymeditor/skins/compact/icons.png +0 -0
  57. data/public/i18n_locale_editor/wymeditor/skins/compact/skin.css +134 -0
  58. data/public/i18n_locale_editor/wymeditor/skins/compact/skin.js +35 -0
  59. data/public/i18n_locale_editor/wymeditor/skins/default/icons.png +0 -0
  60. data/public/i18n_locale_editor/wymeditor/skins/default/skin.css +133 -0
  61. data/public/i18n_locale_editor/wymeditor/skins/default/skin.js +40 -0
  62. data/public/i18n_locale_editor/wymeditor/skins/minimal/images/bg.header.gif +0 -0
  63. data/public/i18n_locale_editor/wymeditor/skins/minimal/images/bg.selector.silver.gif +0 -0
  64. data/public/i18n_locale_editor/wymeditor/skins/minimal/images/bg.wymeditor.png +0 -0
  65. data/public/i18n_locale_editor/wymeditor/skins/minimal/images/icons.silver.gif +0 -0
  66. data/public/i18n_locale_editor/wymeditor/skins/minimal/skin.css +131 -0
  67. data/public/i18n_locale_editor/wymeditor/skins/minimal/skin.js +30 -0
  68. data/public/i18n_locale_editor/wymeditor/skins/silver/COPYING +674 -0
  69. data/public/i18n_locale_editor/wymeditor/skins/silver/README +27 -0
  70. data/public/i18n_locale_editor/wymeditor/skins/silver/images/bg.header.gif +0 -0
  71. data/public/i18n_locale_editor/wymeditor/skins/silver/images/bg.selector.silver.gif +0 -0
  72. data/public/i18n_locale_editor/wymeditor/skins/silver/images/bg.wymeditor.png +0 -0
  73. data/public/i18n_locale_editor/wymeditor/skins/silver/images/icons.silver.gif +0 -0
  74. data/public/i18n_locale_editor/wymeditor/skins/silver/skin.css +297 -0
  75. data/public/i18n_locale_editor/wymeditor/skins/silver/skin.js +61 -0
  76. data/public/i18n_locale_editor/wymeditor/skins/twopanels/icons.png +0 -0
  77. data/public/i18n_locale_editor/wymeditor/skins/twopanels/skin.css +134 -0
  78. data/public/i18n_locale_editor/wymeditor/skins/twopanels/skin.js +39 -0
  79. data/public/i18n_locale_editor/wymeditor/skins/wymeditor_icon.png +0 -0
  80. data/rails/init.rb +5 -5
  81. metadata +79 -5
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @version Alpha 0.1 2008-05-10 23:28:43 $
3
+ * @package Silver skin for WYMeditor
4
+ * @copyright Copyright (C) 2008 Scott Edwin Lewis. All rights reserved.
5
+ * @license GNU/GPL, see COPYING
6
+ * Silver skin for WYMeditor is free software and is licensed under the
7
+ * GNU General Public License. See COPYING for copyright notices and details.
8
+ */
9
+
10
+ Adds custom buttons and color palette to the WYMeditor XHTML Editor.
11
+
12
+ INSTALLATION:
13
+
14
+ 1. Copy the entire /silver/ directory to /wymeditor/skins/
15
+ 2. Initialize the WYMeditor 'skin' option as below:
16
+
17
+ <script type="text/javascript">
18
+ jQuery(function() {
19
+
20
+ jQuery('.wymeditor').wymeditor({
21
+ skin: 'silver'
22
+ });
23
+
24
+ });
25
+ </script>
26
+
27
+ That's it. You're done.
@@ -0,0 +1,297 @@
1
+ /*
2
+ * WYMeditor : what you see is What You Mean web-based editor
3
+ * Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/
4
+ * Dual licensed under the MIT (MIT-license.txt)
5
+ * and GPL (GPL-license.txt) licenses.
6
+ *
7
+ * For further information visit:
8
+ * http://www.wymeditor.org/
9
+ *
10
+ * File Name:
11
+ * screen.css
12
+ * main stylesheet for the default WYMeditor skin
13
+ * See the documentation for more info.
14
+ *
15
+ * File Authors:
16
+ * Daniel Reszka (d.reszka a-t wymeditor dotorg)
17
+ * Scott Edwin Lewis
18
+ */
19
+
20
+ /*TRYING TO RESET STYLES THAT MAY INTERFERE WITH WYMEDITOR*/
21
+ .wym_skin_silver p, .wym_skin_silver h2, .wym_skin_silver h3,
22
+ .wym_skin_silver ul, .wym_skin_silver li { background: transparent url(); margin: 0; padding: 0; border-width:0; list-style: none; }
23
+
24
+
25
+ /*HIDDEN BY DEFAULT*/
26
+ .wym_skin_silver .wym_area_left { display: none; }
27
+ .wym_skin_silver .wym_area_right { display: block; }
28
+
29
+
30
+ /*TYPO*/
31
+ .wym_skin_silver { font-size: 62.5%; font-family: Verdana, Arial, sans-serif; }
32
+ .wym_skin_silver h2 { font-size: 110%; /* = 11px */}
33
+ .wym_skin_silver h3 { font-size: 100%; /* = 10px */}
34
+ .wym_skin_silver li { font-size: 100%; /* = 10px */}
35
+
36
+
37
+ /*WYM_BOX*/
38
+ .wym_skin_silver { border: 1px solid gray; background: #f2f2f2; padding: 0px; margin: 0px;}
39
+
40
+ /*auto-clear the wym_box*/
41
+ .wym_skin_silver:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
42
+ * html .wym_skin_silver { height: 1%;}
43
+
44
+
45
+ /*WYM_HTML*/
46
+ .wym_skin_silver .wym_html { width: 98%;}
47
+ .wym_skin_silver .wym_html textarea { width: 100%; height: 200px; border: 1px solid gray; background: white; }
48
+
49
+
50
+ /*WYM_IFRAME*/
51
+ .wym_skin_silver .wym_iframe { width: 98%;}
52
+ .wym_skin_silver .wym_iframe iframe { width: 100%; height: 200px; border: 1px solid gray; background: white }
53
+
54
+
55
+ /*AREAS*/
56
+ .wym_skin_silver .wym_area_left { width: 150px; float: left;}
57
+ .wym_skin_silver .wym_area_right { width: 150px; float: right;}
58
+ .wym_skin_silver .wym_area_bottom { height: 1%; clear: both;}
59
+ * html .wym_skin_silver .wym_area_main { height: 1%;}
60
+ * html .wym_skin_silver .wym_area_top { height: 1%;}
61
+ *+html .wym_skin_silver .wym_area_top { height: 1%;}
62
+
63
+ /*SECTIONS SYSTEM*/
64
+
65
+ /*common defaults for all sections*/
66
+ .wym_skin_silver .wym_section { margin-bottom: 5px; }
67
+ .wym_skin_silver .wym_section h2,
68
+ .wym_skin_silver .wym_section h3 { padding: 1px 3px; margin: 0; cursor: pointer; }
69
+ .wym_skin_silver .wym_section a { padding: 5px 0px 0px 10px; display: block; text-decoration: none; color: black; }
70
+ .wym_skin_silver .wym_section a:hover { /*background-color: #DDD;*/}
71
+ /*hide section titles by default*/
72
+ .wym_skin_silver .wym_section h2 { display: none; }
73
+ /*disable any margin-collapse*/
74
+ .wym_skin_silver .wym_section { padding-top: 1px; padding-bottom: 1px; }
75
+ /*auto-clear sections*/
76
+ .wym_skin_silver .wym_section ul:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; padding: 0px; }
77
+ * html .wym_skin_silver .wym_section ul { height: 1%;}
78
+ .wym_skin_silver .wym_section li {}
79
+
80
+ /*option: add this class to a section to make it render as a panel*/
81
+ .wym_skin_silver .wym_panel { }
82
+ .wym_skin_silver .wym_panel h2 { display: block; font-size: 11px; }
83
+
84
+ /*option: add this class to a section to make it render as a dropdown menu*/
85
+ .wym_skin_silver .wym_dropdown h2 { display: block; font-size: 11px;}
86
+ .wym_skin_silver .wym_dropdown ul { position: absolute; background: white; padding: 0px;}
87
+ .wym_skin_silver .wym_dropdown:hover ul,
88
+ .wym_skin_silver .wym_dropdown.hover ul { cursor: pointer;}
89
+ .wym_skin_silver .wym_dropdown ul li a {/*border-bottom: 1px solid #AAA;*/}
90
+
91
+ /*option: add this class to a section to make its elements render buttons (icons are only available for the wym_tools section for now)*/
92
+ .wym_skin_silver .wym_buttons li { float:left;}
93
+ .wym_skin_silver .wym_buttons a { width: 20px; height: 20px; overflow: hidden; padding: 2px; text-decoration: none !important; border: 1px solid #666; }
94
+ .wym_skin_silver .wym_buttons a:hover { text-decoration: none !important; border: 1px solid #000;}
95
+ /*image replacements*/
96
+ .wym_skin_silver .wym_buttons li a { background: url(images/icons.silver.gif) no-repeat; text-indent: -9999px;}
97
+ .wym_skin_silver .wym_buttons li.wym_tools_strong a { background-position: 0 -384px;}
98
+ .wym_skin_silver .wym_buttons li.wym_tools_emphasis a { background-position: 0 -24px;}
99
+ .wym_skin_silver .wym_buttons li.wym_tools_superscript a { background-position: 0 -432px;}
100
+ .wym_skin_silver .wym_buttons li.wym_tools_subscript a { background-position: 0 -456px;}
101
+ .wym_skin_silver .wym_buttons li.wym_tools_ordered_list a { background-position: 0 -48px;}
102
+ .wym_skin_silver .wym_buttons li.wym_tools_unordered_list a{ background-position: 0 -72px;}
103
+ .wym_skin_silver .wym_buttons li.wym_tools_indent a { background-position: 0 -600px;}
104
+ .wym_skin_silver .wym_buttons li.wym_tools_outdent a { background-position: 0 -624px;}
105
+ .wym_skin_silver .wym_buttons li.wym_tools_undo a { background-position: 0 -504px;}
106
+ .wym_skin_silver .wym_buttons li.wym_tools_redo a { background-position: 0 -528px;}
107
+ .wym_skin_silver .wym_buttons li.wym_tools_link a { background-position: 0 -96px;}
108
+ .wym_skin_silver .wym_buttons li.wym_tools_unlink a { background-position: 0 -168px;}
109
+ .wym_skin_silver .wym_buttons li.wym_tools_image a { background-position: 0 -120px;}
110
+ .wym_skin_silver .wym_buttons li.wym_tools_table a { background-position: 0 -144px;}
111
+ .wym_skin_silver .wym_buttons li.wym_tools_paste a { background-position: 0 -552px;}
112
+ .wym_skin_silver .wym_buttons li.wym_tools_html a { background-position: 0 -192px;}
113
+ .wym_skin_silver .wym_buttons li.wym_tools_preview a { background-position: 0 -408px;}
114
+ .wym_skin_silver .wym_buttons li.wym_tools_gadget a { background-position: 0 -576px;}
115
+
116
+ .wym_skin_silver .wym_buttons li.wym_tools_strong a:hover { background-position: -24px -384px;}
117
+ .wym_skin_silver .wym_buttons li.wym_tools_emphasis a:hover { background-position: -24px -24px;}
118
+ .wym_skin_silver .wym_buttons li.wym_tools_superscript a:hover { background-position: -24px -432px;}
119
+ .wym_skin_silver .wym_buttons li.wym_tools_subscript a:hover { background-position: -24px -456px;}
120
+ .wym_skin_silver .wym_buttons li.wym_tools_ordered_list a:hover { background-position: -24px -48px;}
121
+ .wym_skin_silver .wym_buttons li.wym_tools_unordered_list a:hover{ background-position: -24px -72px;}
122
+ .wym_skin_silver .wym_buttons li.wym_tools_indent a:hover { background-position: -24px -600px;}
123
+ .wym_skin_silver .wym_buttons li.wym_tools_outdent a:hover { background-position: -24px -624px;}
124
+ .wym_skin_silver .wym_buttons li.wym_tools_undo a:hover { background-position: -24px -504px;}
125
+ .wym_skin_silver .wym_buttons li.wym_tools_redo a:hover { background-position: -24px -528px;}
126
+ .wym_skin_silver .wym_buttons li.wym_tools_link a:hover { background-position: -24px -96px;}
127
+ .wym_skin_silver .wym_buttons li.wym_tools_unlink a:hover { background-position: -24px -168px;}
128
+ .wym_skin_silver .wym_buttons li.wym_tools_image a:hover { background-position: -24px -120px;}
129
+ .wym_skin_silver .wym_buttons li.wym_tools_table a:hover { background-position: -24px -144px;}
130
+ .wym_skin_silver .wym_buttons li.wym_tools_paste a:hover { background-position: -24px -552px;}
131
+ .wym_skin_silver .wym_buttons li.wym_tools_html a:hover { background-position: -24px -192px;}
132
+ .wym_skin_silver .wym_buttons li.wym_tools_preview a:hover { background-position: -24px -408px;}
133
+ .wym_skin_silver .wym_buttons li.wym_tools_gadget a:hover { background-position: -24px -576px;}
134
+
135
+ /*DECORATION*/
136
+ .wym_skin_silver .wym_section h2 { background: #ddd; border: none;}
137
+ .wym_skin_silver .wym_section h2 span { color: gray;}
138
+ .wym_skin_silver .wym_panel { padding: 0; border: solid gray; border-width: 0px;}
139
+ .wym_skin_silver .wym_panel ul { margin: 2px 0 5px; }
140
+ .wym_skin_silver .wym_dropdown { padding: 0; border: none; }
141
+ .wym_skin_silver .wym_dropdown ul { border: none; margin-left: -1px; padding: 0px;}
142
+
143
+ /*DIALOGS*/
144
+ .wym_dialog div.row { margin-bottom: 5px;}
145
+ .wym_dialog div.row input { margin-right: 5px;}
146
+ .wym_dialog div.row label { float: left; width: 150px; display: block; text-align: right; margin-right: 10px; }
147
+ .wym_dialog div.row-indent { padding-left: 160px; }
148
+ /*autoclearing*/
149
+ .wym_dialog div.row:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
150
+ .wym_dialog div.row { display: inline-block; }
151
+ /* Hides from IE-mac \*/
152
+ * html .wym_dialog div.row { height: 1%; }
153
+ .wym_dialog div.row { display: block; }
154
+ /* End hide from IE-mac */
155
+
156
+ /*WYMEDITOR_LINK*/
157
+ a.wym_wymeditor_link
158
+ {
159
+ text-indent: -9999px;
160
+ float: right;
161
+ display: block;
162
+ width: 50px;
163
+ height: 15px;
164
+ background: url(../wymeditor_icon.png);
165
+ background-position: 1px 1px;
166
+ background-repeat: no-repeat;
167
+ overflow: hidden;
168
+ text-decoration: none;
169
+ padding: 1px !important;
170
+ border: 1px solid #333 !important;
171
+ background-color: #FFF !important;
172
+ }
173
+
174
+ .wym_box
175
+ {
176
+ padding: 0px !important;
177
+ margin: 0px;
178
+ }
179
+ .wym_inner
180
+ {
181
+ border-left: 1px solid #FFF;
182
+ border-top: 1px solid #FFF;
183
+ border-right: 1px solid #FFF;
184
+ border-bottom: 1px solid #FFF;
185
+ padding: 5px;
186
+ background-color: #B8C1C4;
187
+ height: auto;
188
+ }
189
+
190
+ .clear {clear: both;}
191
+
192
+ div.wym_dropdown
193
+ {
194
+ cursor: pointer;
195
+ width: 138px !important;
196
+ margin: 0px 4px 10px 0px !important;
197
+ padding: 0px;
198
+ z-index: 1001;
199
+ display: block;
200
+ border: 1px solid red;
201
+ }
202
+
203
+ div.wym_dropdown ul
204
+ {
205
+ display: none;
206
+ width: 124px;
207
+ padding: 0px !important;
208
+ margin: 0px !important;
209
+ list-style-type: none;
210
+ list-style-image: none;
211
+ z-index: 1002;
212
+ position: absolute;
213
+ border-top: 1px solid #AAA;
214
+ }
215
+
216
+ div.wym_dropdown ul li
217
+ {
218
+ width: 146px;
219
+ height: 20px;
220
+ padding: 0px !important;
221
+ margin: 0px;
222
+ border: 1px solid #777;
223
+ border-top: none;
224
+ background: #DDD;
225
+ list-style-image: none;
226
+ }
227
+
228
+ div.wym_dropdown h2
229
+ {
230
+ width: 138px;
231
+ height: 16px;
232
+ color: #000 !important;
233
+ background-image: url(images/bg.selector.silver.gif) !important;
234
+ background-position: 0px -18px;
235
+ background-repeat: no-repeat;
236
+ border: none;
237
+ font-family: "Trebuchet MS", Verdana, Arial, Helvetica, Sanserif;
238
+ font-size: 12px !important;
239
+ font-weight: bold !important;
240
+ padding: 2px 0px 0px 10px !important;
241
+ margin: 0px !important;
242
+ }
243
+
244
+ .wym_skin_silver .wym_panel h2
245
+ {
246
+ width: 138px;
247
+ height: 16px;
248
+ color: #000 !important;
249
+ background-image: url(images/bg.header.gif) !important;
250
+ background-position: 0px 0px;
251
+ background-repeat: no-repeat;
252
+ border: none;
253
+ font-family: "Trebuchet MS", Verdana, Arial, Helvetica, Sanserif;
254
+ font-size: 12px !important;
255
+ font-weight: bold !important;
256
+ padding: 2px 0px 0px 10px !important;
257
+ margin: 0px !important;
258
+ }
259
+
260
+ .wym_skin_silver .wym_panel ul
261
+ {
262
+ margin-top: 0px !important;
263
+ }
264
+
265
+ .wym_skin_silver .wym_panel ul li
266
+ {
267
+ width: 146px;
268
+ height: 20px;
269
+ padding: 0px !important;
270
+ margin: 0px;
271
+ border: 1px solid #777;
272
+ border-top: none;
273
+ background: #DDD;
274
+ list-style-image: none;
275
+ }
276
+
277
+ .wym_skin_silver .wym_panel a,
278
+ div.wym_dropdown a
279
+ {
280
+ text-decoration: none;
281
+ font-family: "Trebuchet MS", Verdana, Arial, Helvetica, Sanserif;
282
+ font-size: 12px;
283
+ padding: 5px 0px 0px 10px !important;
284
+ display: block;
285
+ width: 136px;
286
+ height: 15px;
287
+ color: #000;
288
+ text-align: left !important;
289
+ margin-left: 0px !important;
290
+ }
291
+
292
+ div.wym_dropdown a:hover,
293
+ .wym_skin_silver .wym_panel a:hover
294
+ {
295
+ background: #BBB;
296
+ border-bottom: none !important;
297
+ }
@@ -0,0 +1,61 @@
1
+ /* This file is part of the Silver skin for WYMeditor by Scott Edwin Lewis */
2
+
3
+ jQuery.fn.selectify = function() {
4
+ return this.each(function() {
5
+ jQuery(this).hover(
6
+ function() {
7
+ jQuery("h2", this).css("background-position", "0px -18px");
8
+ jQuery("ul", this).fadeIn("fast");
9
+ },
10
+ function() {
11
+ jQuery("h2", this).css("background-position", "");
12
+ jQuery("ul", this).fadeOut("fast");
13
+ }
14
+ );
15
+ });
16
+ };
17
+
18
+ WYMeditor.SKINS['silver'] = {
19
+
20
+ init: function(wym) {
21
+
22
+ //add some elements to improve the rendering
23
+ jQuery(wym._box)
24
+ .append('<div class="clear"></div>')
25
+ .wrapInner('<div class="wym_inner"></div>');
26
+
27
+ //render following sections as panels
28
+ jQuery(wym._box).find(wym._options.classesSelector)
29
+ .addClass("wym_panel");
30
+
31
+ //render following sections as buttons
32
+ jQuery(wym._box).find(wym._options.toolsSelector)
33
+ .addClass("wym_buttons");
34
+
35
+ //render following sections as dropdown menus
36
+ jQuery(wym._box).find(wym._options.containersSelector)
37
+ .addClass("wym_dropdown")
38
+ .selectify();
39
+
40
+ // auto add some margin to the main area sides if left area
41
+ // or right area are not empty (if they contain sections)
42
+ jQuery(wym._box).find("div.wym_area_right ul")
43
+ .parents("div.wym_area_right").show()
44
+ .parents(wym._options.boxSelector)
45
+ .find("div.wym_area_main")
46
+ .css({"margin-right": "155px"});
47
+
48
+ jQuery(wym._box).find("div.wym_area_left ul")
49
+ .parents("div.wym_area_left").show()
50
+ .parents(wym._options.boxSelector)
51
+ .find("div.wym_area_main")
52
+ .css({"margin-left": "155px"});
53
+
54
+ //make hover work under IE < 7
55
+ jQuery(wym._box).find(".wym_section").hover(function(){
56
+ jQuery(this).addClass("hover");
57
+ },function(){
58
+ jQuery(this).removeClass("hover");
59
+ });
60
+ }
61
+ };
@@ -0,0 +1,134 @@
1
+ /*
2
+ * WYMeditor : what you see is What You Mean web-based editor
3
+ * Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/
4
+ * Dual licensed under the MIT (MIT-license.txt)
5
+ * and GPL (GPL-license.txt) licenses.
6
+ *
7
+ * For further information visit:
8
+ * http://www.wymeditor.org/
9
+ *
10
+ * File Name:
11
+ * screen.css
12
+ * main stylesheet for the WYMeditor skin
13
+ * See the documentation for more info.
14
+ *
15
+ * File Authors:
16
+ * Daniel Reszka (d.reszka a-t wymeditor dotorg)
17
+ * Jean-Francois Hovinne
18
+ */
19
+
20
+ /*TRYING TO RESET STYLES THAT MAY INTERFERE WITH WYMEDITOR*/
21
+ .wym_skin_twopanels p, .wym_skin_twopanels h2, .wym_skin_twopanels h3,
22
+ .wym_skin_twopanels ul, .wym_skin_twopanels li { background: transparent url(); margin: 0; padding: 0; border-width:0; list-style: none; }
23
+
24
+
25
+ /*HIDDEN BY DEFAULT*/
26
+ .wym_skin_twopanels .wym_area_left { display: block; }
27
+ .wym_skin_twopanels .wym_area_right { display: block; }
28
+
29
+
30
+ /*TYPO*/
31
+ .wym_skin_twopanels { font-size: 62.5%; font-family: Verdana, Arial, sans-serif; }
32
+ .wym_skin_twopanels h2 { font-size: 110%; /* = 11px */}
33
+ .wym_skin_twopanels h3 { font-size: 100%; /* = 10px */}
34
+ .wym_skin_twopanels li { font-size: 100%; /* = 10px */}
35
+
36
+
37
+ /*WYM_BOX*/
38
+ .wym_skin_twopanels { border: 1px solid gray; background: #f2f2f2; padding: 5px}
39
+
40
+ /*auto-clear the wym_box*/
41
+ .wym_skin_twopanels:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
42
+ * html .wym_skin_twopanels { height: 1%;}
43
+
44
+
45
+ /*WYM_HTML*/
46
+ .wym_skin_twopanels .wym_html { width: 98%;}
47
+ .wym_skin_twopanels .wym_html textarea { width: 100%; height: 200px; border: 1px solid gray; background: white; }
48
+
49
+
50
+ /*WYM_IFRAME*/
51
+ .wym_skin_twopanels .wym_iframe { width: 98%;}
52
+ .wym_skin_twopanels .wym_iframe iframe { width: 100%; height: 200px; border: 1px solid gray; background: white }
53
+
54
+
55
+ /*AREAS*/
56
+ .wym_skin_twopanels .wym_area_left { width: 100px; float: left;}
57
+ .wym_skin_twopanels .wym_area_right { width: 150px; float: right;}
58
+ .wym_skin_twopanels .wym_area_bottom { height: 1%; clear: both;}
59
+ * html .wym_skin_twopanels .wym_area_main { height: 1%;}
60
+ * html .wym_skin_twopanels .wym_area_top { height: 1%;}
61
+ *+html .wym_skin_twopanels .wym_area_top { height: 1%;}
62
+
63
+ /*SECTIONS SYSTEM*/
64
+
65
+ /*common defaults for all sections*/
66
+ .wym_skin_twopanels .wym_section { margin-bottom: 5px; }
67
+ .wym_skin_twopanels .wym_section h2,
68
+ .wym_skin_twopanels .wym_section h3 { padding: 1px 3px; margin: 0; }
69
+ .wym_skin_twopanels .wym_section a { padding: 0 3px; display: block; text-decoration: none; color: black; }
70
+ .wym_skin_twopanels .wym_section a:hover { background-color: yellow; }
71
+ /*hide section titles by default*/
72
+ .wym_skin_twopanels .wym_section h2 { display: none; }
73
+ /*disable any margin-collapse*/
74
+ .wym_skin_twopanels .wym_section { padding-top: 1px; padding-bottom: 1px; }
75
+ /*auto-clear sections*/
76
+ .wym_skin_twopanels .wym_section ul:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
77
+ * html .wym_skin_twopanels .wym_section ul { height: 1%;}
78
+
79
+ /*option: add this class to a section to make it render as a panel*/
80
+ .wym_skin_twopanels .wym_panel { }
81
+ .wym_skin_twopanels .wym_panel h2 { display: block; }
82
+
83
+ /*option: add this class to a section to make it render as a dropdown menu*/
84
+ .wym_skin_twopanels .wym_dropdown h2 { display: block; }
85
+ .wym_skin_twopanels .wym_dropdown ul { display: none; position: absolute; background: white; }
86
+ .wym_skin_twopanels .wym_dropdown:hover ul,
87
+ .wym_skin_twopanels .wym_dropdown.hover ul { display: block; }
88
+
89
+ /*option: add this class to a section to make its elements render buttons (icons are only available for the wym_tools section for now)*/
90
+ .wym_skin_twopanels .wym_buttons li { float:left;}
91
+ .wym_skin_twopanels .wym_buttons a { width: 20px; height: 20px; overflow: hidden; padding: 2px }
92
+ /*image replacements*/
93
+ .wym_skin_twopanels .wym_buttons li a { background: url(icons.png) no-repeat; text-indent: -9999px;}
94
+ .wym_skin_twopanels .wym_buttons li.wym_tools_strong a { background-position: 0 -382px;}
95
+ .wym_skin_twopanels .wym_buttons li.wym_tools_emphasis a { background-position: 0 -22px;}
96
+ .wym_skin_twopanels .wym_buttons li.wym_tools_superscript a { background-position: 0 -430px;}
97
+ .wym_skin_twopanels .wym_buttons li.wym_tools_subscript a { background-position: 0 -454px;}
98
+ .wym_skin_twopanels .wym_buttons li.wym_tools_ordered_list a { background-position: 0 -48px;}
99
+ .wym_skin_twopanels .wym_buttons li.wym_tools_unordered_list a{ background-position: 0 -72px;}
100
+ .wym_skin_twopanels .wym_buttons li.wym_tools_indent a { background-position: 0 -574px;}
101
+ .wym_skin_twopanels .wym_buttons li.wym_tools_outdent a { background-position: 0 -598px;}
102
+ .wym_skin_twopanels .wym_buttons li.wym_tools_undo a { background-position: 0 -502px;}
103
+ .wym_skin_twopanels .wym_buttons li.wym_tools_redo a { background-position: 0 -526px;}
104
+ .wym_skin_twopanels .wym_buttons li.wym_tools_link a { background-position: 0 -96px;}
105
+ .wym_skin_twopanels .wym_buttons li.wym_tools_unlink a { background-position: 0 -168px;}
106
+ .wym_skin_twopanels .wym_buttons li.wym_tools_image a { background-position: 0 -121px;}
107
+ .wym_skin_twopanels .wym_buttons li.wym_tools_table a { background-position: 0 -144px;}
108
+ .wym_skin_twopanels .wym_buttons li.wym_tools_paste a { background-position: 0 -552px;}
109
+ .wym_skin_twopanels .wym_buttons li.wym_tools_html a { background-position: 0 -193px;}
110
+ .wym_skin_twopanels .wym_buttons li.wym_tools_preview a { background-position: 0 -408px;}
111
+
112
+ /*DECORATION*/
113
+ .wym_skin_twopanels .wym_section h2 { background: #ddd; border: solid gray; border-width: 0 0 1px;}
114
+ .wym_skin_twopanels .wym_section h2 span { color: gray;}
115
+ .wym_skin_twopanels .wym_panel { padding: 0; border: solid gray; border-width: 1px; background: white;}
116
+ .wym_skin_twopanels .wym_panel ul { margin: 2px 0 5px; }
117
+ .wym_skin_twopanels .wym_dropdown { padding: 0; border: solid gray; border-width: 1px 1px 0 1px; }
118
+ .wym_skin_twopanels .wym_dropdown ul { border: solid gray; border-width: 0 1px 1px 1px; margin-left: -1px; padding: 5px 10px 5px 3px;}
119
+
120
+ /*DIALOGS*/
121
+ .wym_dialog div.row { margin-bottom: 5px;}
122
+ .wym_dialog div.row input { margin-right: 5px;}
123
+ .wym_dialog div.row label { float: left; width: 150px; display: block; text-align: right; margin-right: 10px; }
124
+ .wym_dialog div.row-indent { padding-left: 160px; }
125
+ /*autoclearing*/
126
+ .wym_dialog div.row:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
127
+ .wym_dialog div.row { display: inline-block; }
128
+ /* Hides from IE-mac \*/
129
+ * html .wym_dialog div.row { height: 1%; }
130
+ .wym_dialog div.row { display: block; }
131
+ /* End hide from IE-mac */
132
+
133
+ /*WYMEDITOR_LINK*/
134
+ a.wym_wymeditor_link { text-indent: -9999px; float: right; display: block; width: 50px; height: 15px; background: url(../wymeditor_icon.png); overflow: hidden; text-decoration: none; }
@@ -0,0 +1,39 @@
1
+ WYMeditor.SKINS['twopanels'] = {
2
+
3
+ init: function(wym) {
4
+
5
+ //move the containers panel to the left area
6
+ jQuery(wym._box).find(wym._options.containersSelector)
7
+ .appendTo("div.wym_area_left");
8
+
9
+ //render following sections as panels
10
+ jQuery(wym._box).find(wym._options.classesSelector + ', '
11
+ + wym._options.containersSelector)
12
+ .addClass("wym_panel");
13
+
14
+ //render following sections as buttons
15
+ jQuery(wym._box).find(wym._options.toolsSelector)
16
+ .addClass("wym_buttons");
17
+
18
+ // auto add some margin to the main area sides if left area
19
+ // or right area are not empty (if they contain sections)
20
+ jQuery(wym._box).find("div.wym_area_right ul")
21
+ .parents("div.wym_area_right").show()
22
+ .parents(wym._options.boxSelector)
23
+ .find("div.wym_area_main")
24
+ .css({"margin-right": "155px"});
25
+
26
+ jQuery(wym._box).find("div.wym_area_left ul")
27
+ .parents("div.wym_area_left").show()
28
+ .parents(wym._options.boxSelector)
29
+ .find("div.wym_area_main")
30
+ .css({"margin-left": "115px"});
31
+
32
+ //make hover work under IE < 7
33
+ jQuery(wym._box).find(".wym_section").hover(function(){
34
+ jQuery(this).addClass("hover");
35
+ },function(){
36
+ jQuery(this).removeClass("hover");
37
+ });
38
+ }
39
+ };
data/rails/init.rb CHANGED
@@ -1,15 +1,15 @@
1
1
  require 'hash_tools'
2
2
  require 'translate_monkey_patch'
3
- require 'ftools'
3
+ require 'fileutils'
4
4
 
5
5
  if ENV['I18N_EDITOR']== "true"
6
- src = File.join(directory,'public',"i18n-locale-editor.js")
7
- dst = File.join(RAILS_ROOT,'public', 'javascripts')
8
- File.copy(src,dst)
6
+ src = File.join(File.dirname(__FILE__),'..','public','i18n_locale_editor')
7
+ dst = File.join(RAILS_ROOT,'public')
8
+ FileUtils.cp_r(src,dst)
9
9
  end
10
10
 
11
11
  %w{ models controllers helpers }.each do |dir|
12
- path = File.join(directory, 'app',dir)
12
+ path = File.join(File.dirname(__FILE__), 'app',dir)
13
13
  $LOAD_PATH << path
14
14
  ActiveSupport::Dependencies.load_paths << path
15
15
  ActiveSupport::Dependencies.load_once_paths.delete(path)