spree_editor 0.50.0 → 0.50.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Versionfile +3 -0
- data/app/controllers/admin/editor_settings_controller.rb +5 -11
- data/app/views/admin/editor_settings/edit.html.erb +20 -19
- data/app/views/shared/editor_engines/_tiny_mce.html.erb +16 -33
- data/app/views/shared/editor_engines/_yui_rich_editor.html.erb +60 -7
- data/config/locales/en.yml +1 -0
- data/config/locales/es.yml +45 -0
- data/config/locales/ru.yml +2 -0
- data/lib/editor_configuration.rb +2 -2
- data/public/images/html_editor.gif +0 -0
- data/public/javascripts/tinymce/langs/en.js +56 -3
- data/public/javascripts/tinymce/plugins/advhr/langs/en_dlg.js +2 -0
- data/public/javascripts/tinymce/plugins/advhr/rule.htm +30 -29
- data/public/javascripts/tinymce/plugins/advimage/image.htm +34 -31
- data/public/javascripts/tinymce/plugins/advimage/js/image.js +20 -5
- data/public/javascripts/tinymce/plugins/advimage/langs/en_dlg.js +2 -0
- data/public/javascripts/tinymce/plugins/advlink/js/advlink.js +21 -17
- data/public/javascripts/tinymce/plugins/advlink/langs/en_dlg.js +4 -2
- data/public/javascripts/tinymce/plugins/advlink/link.htm +35 -30
- data/public/javascripts/tinymce/plugins/advlist/editor_plugin.js +1 -1
- data/public/javascripts/tinymce/plugins/advlist/editor_plugin_src.js +10 -3
- data/public/javascripts/tinymce/plugins/autolink/editor_plugin.js +1 -0
- data/public/javascripts/tinymce/plugins/autolink/editor_plugin_src.js +169 -0
- data/public/javascripts/tinymce/plugins/autoresize/editor_plugin.js +1 -1
- data/public/javascripts/tinymce/plugins/autoresize/editor_plugin_src.js +12 -3
- data/public/javascripts/tinymce/plugins/autosave/editor_plugin.js +1 -1
- data/public/javascripts/tinymce/plugins/autosave/editor_plugin_src.js +13 -4
- data/public/javascripts/tinymce/plugins/bbcode/editor_plugin.js +1 -1
- data/public/javascripts/tinymce/plugins/bbcode/editor_plugin_src.js +1 -1
- data/public/javascripts/tinymce/plugins/contextmenu/editor_plugin.js +1 -1
- data/public/javascripts/tinymce/plugins/contextmenu/editor_plugin_src.js +30 -16
- data/public/javascripts/tinymce/plugins/emotions/emotions.htm +15 -14
- data/public/javascripts/tinymce/plugins/fullpage/css/fullpage.css +3 -42
- data/public/javascripts/tinymce/plugins/fullpage/editor_plugin.js +1 -1
- data/public/javascripts/tinymce/plugins/fullpage/editor_plugin_src.js +309 -63
- data/public/javascripts/tinymce/plugins/fullpage/fullpage.htm +18 -330
- data/public/javascripts/tinymce/plugins/fullpage/js/fullpage.js +199 -438
- data/public/javascripts/tinymce/plugins/fullscreen/editor_plugin.js +1 -1
- data/public/javascripts/tinymce/plugins/fullscreen/editor_plugin_src.js +10 -2
- data/public/javascripts/tinymce/plugins/inlinepopups/editor_plugin.js +1 -1
- data/public/javascripts/tinymce/plugins/inlinepopups/editor_plugin_src.js +76 -15
- data/public/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css +0 -10
- data/public/javascripts/tinymce/plugins/layer/editor_plugin.js +1 -1
- data/public/javascripts/tinymce/plugins/layer/editor_plugin_src.js +2 -0
- data/public/javascripts/tinymce/plugins/legacyoutput/editor_plugin.js +1 -1
- data/public/javascripts/tinymce/plugins/legacyoutput/editor_plugin_src.js +31 -28
- data/public/javascripts/tinymce/plugins/lists/editor_plugin.js +1 -0
- data/public/javascripts/tinymce/plugins/lists/editor_plugin_src.js +617 -0
- data/public/javascripts/tinymce/plugins/media/css/media.css +5 -4
- data/public/javascripts/tinymce/plugins/media/editor_plugin.js +1 -1
- data/public/javascripts/tinymce/plugins/media/editor_plugin_src.js +652 -296
- data/public/javascripts/tinymce/plugins/media/js/media.js +327 -603
- data/public/javascripts/tinymce/plugins/media/langs/en_dlg.js +8 -2
- data/public/javascripts/tinymce/plugins/media/media.htm +283 -288
- data/public/javascripts/tinymce/plugins/media/moxieplayer.swf +0 -0
- data/public/javascripts/tinymce/plugins/nonbreaking/editor_plugin.js +1 -1
- data/public/javascripts/tinymce/plugins/nonbreaking/editor_plugin_src.js +1 -1
- data/public/javascripts/tinymce/plugins/noneditable/editor_plugin.js +1 -1
- data/public/javascripts/tinymce/plugins/noneditable/editor_plugin_src.js +2 -0
- data/public/javascripts/tinymce/plugins/pagebreak/editor_plugin.js +1 -1
- data/public/javascripts/tinymce/plugins/pagebreak/editor_plugin_src.js +1 -4
- data/public/javascripts/tinymce/plugins/paste/editor_plugin.js +1 -1
- data/public/javascripts/tinymce/plugins/paste/editor_plugin_src.js +118 -137
- data/public/javascripts/tinymce/plugins/searchreplace/editor_plugin.js +1 -1
- data/public/javascripts/tinymce/plugins/searchreplace/editor_plugin_src.js +4 -0
- data/public/javascripts/tinymce/plugins/searchreplace/js/searchreplace.js +14 -10
- data/public/javascripts/tinymce/plugins/searchreplace/searchreplace.htm +17 -16
- data/public/javascripts/tinymce/plugins/spellchecker/editor_plugin.js +1 -1
- data/public/javascripts/tinymce/plugins/spellchecker/editor_plugin_src.js +55 -37
- data/public/javascripts/tinymce/plugins/style/js/props.js +2 -8
- data/public/javascripts/tinymce/plugins/style/langs/en_dlg.js +8 -1
- data/public/javascripts/tinymce/plugins/style/props.htm +513 -398
- data/public/javascripts/tinymce/plugins/tabfocus/editor_plugin.js +1 -1
- data/public/javascripts/tinymce/plugins/tabfocus/editor_plugin_src.js +30 -28
- data/public/javascripts/tinymce/plugins/table/cell.htm +12 -12
- data/public/javascripts/tinymce/plugins/table/editor_plugin.js +1 -1
- data/public/javascripts/tinymce/plugins/table/editor_plugin_src.js +97 -34
- data/public/javascripts/tinymce/plugins/table/js/cell.js +9 -11
- data/public/javascripts/tinymce/plugins/table/js/row.js +13 -18
- data/public/javascripts/tinymce/plugins/table/js/table.js +8 -12
- data/public/javascripts/tinymce/plugins/table/langs/en_dlg.js +1 -1
- data/public/javascripts/tinymce/plugins/table/merge_cells.htm +11 -11
- data/public/javascripts/tinymce/plugins/table/row.htm +10 -8
- data/public/javascripts/tinymce/plugins/table/table.htm +54 -53
- data/public/javascripts/tinymce/plugins/template/js/template.js +1 -1
- data/public/javascripts/tinymce/plugins/visualchars/editor_plugin.js +1 -1
- data/public/javascripts/tinymce/plugins/visualchars/editor_plugin_src.js +1 -1
- data/public/javascripts/tinymce/plugins/wordcount/editor_plugin.js +1 -1
- data/public/javascripts/tinymce/plugins/wordcount/editor_plugin_src.js +35 -19
- data/public/javascripts/tinymce/plugins/xhtmlxtras/abbr.htm +6 -5
- data/public/javascripts/tinymce/plugins/xhtmlxtras/acronym.htm +6 -5
- data/public/javascripts/tinymce/plugins/xhtmlxtras/attributes.htm +6 -5
- data/public/javascripts/tinymce/plugins/xhtmlxtras/cite.htm +5 -4
- data/public/javascripts/tinymce/plugins/xhtmlxtras/del.htm +9 -8
- data/public/javascripts/tinymce/plugins/xhtmlxtras/editor_plugin.js +1 -1
- data/public/javascripts/tinymce/plugins/xhtmlxtras/editor_plugin_src.js +6 -6
- data/public/javascripts/tinymce/plugins/xhtmlxtras/ins.htm +11 -10
- data/public/javascripts/tinymce/plugins/xhtmlxtras/js/attributes.js +1 -16
- data/public/javascripts/tinymce/plugins/xhtmlxtras/js/del.js +2 -2
- data/public/javascripts/tinymce/plugins/xhtmlxtras/js/element_common.js +3 -5
- data/public/javascripts/tinymce/plugins/xhtmlxtras/js/ins.js +4 -3
- data/public/javascripts/tinymce/themes/advanced/about.htm +3 -5
- data/public/javascripts/tinymce/themes/advanced/anchor.htm +5 -5
- data/public/javascripts/tinymce/themes/advanced/charmap.htm +39 -40
- data/public/javascripts/tinymce/themes/advanced/color_picker.htm +10 -9
- data/public/javascripts/tinymce/themes/advanced/editor_template.js +1 -1
- data/public/javascripts/tinymce/themes/advanced/editor_template_src.js +172 -41
- data/public/javascripts/tinymce/themes/advanced/image.htm +51 -51
- data/public/javascripts/tinymce/themes/advanced/img/flash.gif +0 -0
- data/public/javascripts/tinymce/themes/advanced/img/iframe.gif +0 -0
- data/public/javascripts/tinymce/themes/advanced/img/pagebreak.gif +0 -0
- data/public/javascripts/tinymce/themes/advanced/img/quicktime.gif +0 -0
- data/public/javascripts/tinymce/themes/advanced/img/realmedia.gif +0 -0
- data/public/javascripts/tinymce/themes/advanced/img/shockwave.gif +0 -0
- data/public/javascripts/tinymce/themes/advanced/img/trans.gif +0 -0
- data/public/javascripts/tinymce/themes/advanced/img/video.gif +0 -0
- data/public/javascripts/tinymce/themes/advanced/img/windowsmedia.gif +0 -0
- data/public/javascripts/tinymce/themes/advanced/js/about.js +1 -0
- data/public/javascripts/tinymce/themes/advanced/js/anchor.js +5 -0
- data/public/javascripts/tinymce/themes/advanced/js/charmap.js +26 -6
- data/public/javascripts/tinymce/themes/advanced/js/color_picker.js +108 -32
- data/public/javascripts/tinymce/themes/advanced/js/image.js +3 -1
- data/public/javascripts/tinymce/themes/advanced/js/link.js +4 -7
- data/public/javascripts/tinymce/themes/advanced/js/source_editor.js +1 -1
- data/public/javascripts/tinymce/themes/advanced/langs/en.js +8 -2
- data/public/javascripts/tinymce/themes/advanced/langs/en_dlg.js +6 -3
- data/public/javascripts/tinymce/themes/advanced/link.htm +27 -28
- data/public/javascripts/tinymce/themes/advanced/shortcuts.htm +47 -0
- data/public/javascripts/tinymce/themes/advanced/skins/default/content.css +11 -0
- data/public/javascripts/tinymce/themes/advanced/skins/default/ui.css +4 -4
- data/public/javascripts/tinymce/themes/advanced/skins/highcontrast/content.css +23 -0
- data/public/javascripts/tinymce/themes/advanced/skins/highcontrast/dialog.css +105 -0
- data/public/javascripts/tinymce/themes/advanced/skins/highcontrast/ui.css +101 -0
- data/public/javascripts/tinymce/themes/advanced/skins/o2k7/content.css +10 -0
- data/public/javascripts/tinymce/themes/advanced/skins/o2k7/dialog.css +1 -0
- data/public/javascripts/tinymce/themes/advanced/skins/o2k7/ui.css +5 -4
- data/public/javascripts/tinymce/themes/advanced/skins/o2k7/ui_black.css +1 -1
- data/public/javascripts/tinymce/themes/advanced/skins/o2k7/ui_silver.css +1 -1
- data/public/javascripts/tinymce/themes/advanced/source_editor.htm +3 -3
- data/public/javascripts/tinymce/themes/simple/editor_template.js +1 -1
- data/public/javascripts/tinymce/themes/simple/editor_template_src.js +1 -2
- data/public/javascripts/tinymce/tiny_mce.js +1 -1
- data/public/javascripts/tinymce/tiny_mce_popup.js +1 -1
- data/public/javascripts/tinymce/tiny_mce_src.js +6488 -4070
- data/public/javascripts/tinymce/utils/form_utils.js +14 -4
- data/public/javascripts/tinymce/utils/mctabs.js +95 -10
- data/public/javascripts/tinymce/utils/validate.js +35 -3
- data/public/stylesheets/editor.css +23 -0
- data/spree_editor.gemspec +2 -2
- metadata +25 -4
data/Versionfile
ADDED
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
class Admin::EditorSettingsController < Admin::BaseController
|
|
2
2
|
def update
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
respond_to do |format|
|
|
9
|
-
format.html {
|
|
10
|
-
redirect_to admin_editor_settings_path
|
|
11
|
-
}
|
|
12
|
-
end
|
|
3
|
+
@config = Spree::Editor::Config.instance
|
|
4
|
+
@config.update_attributes(params[@config.class.name.underscore])
|
|
5
|
+
Rails.cache.delete("configuration_#{@config.class.name}".to_sym)
|
|
6
|
+
redirect_to admin_editor_settings_path
|
|
13
7
|
end
|
|
14
|
-
end
|
|
8
|
+
end
|
|
@@ -2,22 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
<h1><%= t('rich_editor') %></h1>
|
|
4
4
|
|
|
5
|
-
<%=
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
<%=
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<%=
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
<%=
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
5
|
+
<%= form_for(Spree::Editor::Config.instance, :url => admin_editor_settings_path) do |form| %>
|
|
6
|
+
<fieldset id="preferences">
|
|
7
|
+
<%= form.field_container :preferred_current_editor do %>
|
|
8
|
+
<%= form.label(:preferred_current_editor, t('rich_editor_engine')) %>
|
|
9
|
+
<%= form.select :preferred_current_editor, options_for_select(SpreeEditor::EditorEngines, Spree::Editor::Config[:current_editor]) %>
|
|
10
|
+
<% end %>
|
|
11
|
+
<%= form.field_container :preferred_enabled do %>
|
|
12
|
+
<%= preference_field(form, :preferred_enabled, :type => :boolean) %>
|
|
13
|
+
<%= form.label(:preferred_enabled, t(:enable_rich_editor)) %>
|
|
14
|
+
<% end %>
|
|
15
|
+
<%= form.field_container :preferred_ids do %>
|
|
16
|
+
<%= form.label(:preferred_ids, t(:rich_editor_ids_description)+": ") + tag(:br) %>
|
|
17
|
+
<%= preference_field(form, :preferred_ids, :type => :text) %>
|
|
18
|
+
<% end %>
|
|
19
|
+
</fieldset>
|
|
20
|
+
<p class="form-buttons">
|
|
21
|
+
<%= button t('update') %>
|
|
22
|
+
<%= t("or") %> <%= link_to t("cancel"), admin_editor_settings_url %>
|
|
23
|
+
</p>
|
|
24
|
+
<% end %>
|
|
@@ -6,19 +6,19 @@
|
|
|
6
6
|
var myConfig = { dompath: true };
|
|
7
7
|
var ids = [<%= ids.map{|id| "'#{id}'"}.join(', ') %>]
|
|
8
8
|
$.each(ids, function(index, id) {
|
|
9
|
-
if ($('textarea#' + id)) {
|
|
9
|
+
if ($('textarea#' + id).length) {
|
|
10
10
|
tinyMCE.init({
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
element : id,
|
|
14
|
-
mode : "textareas",
|
|
11
|
+
mode : "exact",
|
|
12
|
+
elements : id,
|
|
15
13
|
theme : "advanced",
|
|
16
|
-
|
|
14
|
+
language : '<%= I18n.locale.to_s.downcase %>',
|
|
15
|
+
skin : "o2k7",
|
|
16
|
+
plugins : "safari,style,layer,table,advhr,advimage,inlinepopups,insertdatetime,preview,media,searchreplace,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
|
|
17
17
|
|
|
18
18
|
// Theme options
|
|
19
|
-
theme_advanced_buttons1 : "
|
|
20
|
-
theme_advanced_buttons2 : "",
|
|
21
|
-
theme_advanced_buttons3 : "",
|
|
19
|
+
theme_advanced_buttons1 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,fullscreen,|,charmap,media,advhr,|,visualchars,nonbreaking,blockquote",
|
|
20
|
+
theme_advanced_buttons2 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,sub,sup,|,bullist,numlist,|,outdent,indent,blockquote,|,styleselect,formatselect,fontselect,fontsizeselect,|,forecolor,backcolor",
|
|
21
|
+
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid",
|
|
22
22
|
theme_advanced_buttons4 : "",
|
|
23
23
|
theme_advanced_toolbar_location : "top",
|
|
24
24
|
theme_advanced_toolbar_align : "left",
|
|
@@ -26,32 +26,15 @@
|
|
|
26
26
|
theme_advanced_resizing : true,
|
|
27
27
|
|
|
28
28
|
// Example content CSS (should be your site CSS)
|
|
29
|
-
content_css : "
|
|
30
|
-
|
|
31
|
-
// Style formats
|
|
32
|
-
style_formats : [
|
|
33
|
-
{title : 'Bold text', inline : 'b'},
|
|
34
|
-
{title : 'Red text', inline : 'span', styles : {color : '#ff0000'}},
|
|
35
|
-
{title : 'Red header', block : 'h1', styles : {color : '#ff0000'}},
|
|
36
|
-
{title : 'Example 1', inline : 'span', classes : 'example1'},
|
|
37
|
-
{title : 'Example 2', inline : 'span', classes : 'example2'},
|
|
38
|
-
{title : 'Table styles'},
|
|
39
|
-
{title : 'Table row 1', selector : 'tr', classes : 'tablerow1'}
|
|
40
|
-
],
|
|
29
|
+
content_css : "css/example.css",
|
|
41
30
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
bold : {inline : 'span', 'classes' : 'bold'},
|
|
48
|
-
italic : {inline : 'span', 'classes' : 'italic'},
|
|
49
|
-
underline : {inline : 'span', 'classes' : 'underline', exact : true},
|
|
50
|
-
strikethrough : {inline : 'del'},
|
|
51
|
-
customformat : {inline : 'span', styles : {color : '#00ff00', fontSize : '20px'}, attributes : {title : 'My custom format'}}
|
|
52
|
-
}
|
|
31
|
+
// Drop lists for link/image/media/template dialogs
|
|
32
|
+
template_external_list_url : "js/template_list.js",
|
|
33
|
+
external_link_list_url : "js/link_list.js",
|
|
34
|
+
external_image_list_url : "js/image_list.js",
|
|
35
|
+
media_external_list_url : "js/media_list.js",
|
|
53
36
|
});
|
|
54
37
|
}
|
|
55
38
|
});
|
|
56
39
|
});
|
|
57
|
-
</script>
|
|
40
|
+
</script>
|
|
@@ -25,11 +25,14 @@
|
|
|
25
25
|
|
|
26
26
|
<script type="text/javascript">
|
|
27
27
|
$(function() {
|
|
28
|
+
var Dom = YAHOO.util.Dom,
|
|
29
|
+
Event = YAHOO.util.Event;
|
|
28
30
|
var myConfig = { dompath: true };
|
|
29
31
|
var ids = [<%= ids.map{|id| "'#{id}'"}.join(', ') %>];
|
|
30
32
|
$.each(ids, function(index, id) {
|
|
31
|
-
if ($('textarea#' + id)) {
|
|
32
|
-
|
|
33
|
+
if ($('textarea#' + id).length) {
|
|
34
|
+
var state = 'off';
|
|
35
|
+
var newEditor = window[id + '_editor'] = new YAHOO.widget.Editor(id, {
|
|
33
36
|
height: '350px',
|
|
34
37
|
width: 'auto',
|
|
35
38
|
animate: true,
|
|
@@ -113,7 +116,8 @@
|
|
|
113
116
|
{ group: 'insertitem', label: '<%= t("editor.insert_item") %>',
|
|
114
117
|
buttons: [
|
|
115
118
|
{ type: 'push', label: '<%= t("editor.html_link") %> CTRL + SHIFT + L', value: 'createlink', disabled: true },
|
|
116
|
-
{ type: 'push', label: '<%= t("editor.insert_image") %>', value: 'insertimage' }
|
|
119
|
+
{ type: 'push', label: '<%= t("editor.insert_image") %>', value: 'insertimage' },
|
|
120
|
+
{ type: 'push', label: '<%= t("editor.edit_html_code") %>', value: 'editcode' }
|
|
117
121
|
]
|
|
118
122
|
},
|
|
119
123
|
{ type: 'separator' },
|
|
@@ -128,7 +132,7 @@
|
|
|
128
132
|
}
|
|
129
133
|
});
|
|
130
134
|
|
|
131
|
-
|
|
135
|
+
newEditor.addListener('editorContentLoaded', function() {
|
|
132
136
|
$(".yui-toolbar-imageUpload").upload({
|
|
133
137
|
name: 'content_image[attachment]',
|
|
134
138
|
action: '/content_images',
|
|
@@ -140,7 +144,7 @@
|
|
|
140
144
|
},
|
|
141
145
|
onComplete: function(image_src) {
|
|
142
146
|
var img_html = "<img src='" + image_src + "'/>";
|
|
143
|
-
|
|
147
|
+
newEditor.execCommand('inserthtml', img_html);
|
|
144
148
|
$(".editor-mask-container").removeClass("active");
|
|
145
149
|
}
|
|
146
150
|
});
|
|
@@ -160,12 +164,61 @@
|
|
|
160
164
|
$(".editor-mask-container").removeClass("active");
|
|
161
165
|
var file_name = prompt('<%= t("editor.enter_file_name") %>', file_name_original);
|
|
162
166
|
var link_html = "<a href='" + file_url + "'/>" + file_name + "</a>";
|
|
163
|
-
|
|
167
|
+
newEditor.execCommand('inserthtml', link_html);
|
|
164
168
|
}
|
|
165
169
|
});
|
|
166
170
|
});
|
|
167
171
|
|
|
168
|
-
|
|
172
|
+
|
|
173
|
+
newEditor.on('toolbarLoaded', function() {
|
|
174
|
+
this.toolbar.on('editcodeClick', function() {
|
|
175
|
+
var ta = this.get('element'),
|
|
176
|
+
iframe = this.get('iframe').get('element');
|
|
177
|
+
|
|
178
|
+
if (state == 'on') {
|
|
179
|
+
state = 'off';
|
|
180
|
+
this.toolbar.set('disabled', false);
|
|
181
|
+
this.setEditorHTML(ta.value);
|
|
182
|
+
if (!this.browser.ie) {
|
|
183
|
+
this._setDesignMode('on');
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
Dom.removeClass(iframe, 'editor-hidden');
|
|
187
|
+
Dom.addClass(ta, 'editor-hidden');
|
|
188
|
+
this.show();
|
|
189
|
+
this._focusWindow();
|
|
190
|
+
} else {
|
|
191
|
+
state = 'on';
|
|
192
|
+
this.cleanHTML();
|
|
193
|
+
Dom.addClass(iframe, 'editor-hidden');
|
|
194
|
+
Dom.removeClass(ta, 'editor-hidden');
|
|
195
|
+
this.toolbar.set('disabled', true);
|
|
196
|
+
this.toolbar.getButtonByValue('editcode').set('disabled', false);
|
|
197
|
+
this.toolbar.selectButton('editcode');
|
|
198
|
+
this.dompath.innerHTML = 'Editing HTML Code';
|
|
199
|
+
this.hide();
|
|
200
|
+
}
|
|
201
|
+
return false;
|
|
202
|
+
}, this, true);
|
|
203
|
+
|
|
204
|
+
this.on('cleanHTML', function(ev) {
|
|
205
|
+
this.get('element').value = ev.html;
|
|
206
|
+
}, this, true);
|
|
207
|
+
|
|
208
|
+
this.on('afterRender', function() {
|
|
209
|
+
var wrapper = this.get('editor_wrapper');
|
|
210
|
+
wrapper.appendChild(this.get('element'));
|
|
211
|
+
this.setStyle('width', '100%');
|
|
212
|
+
this.setStyle('height', '100%');
|
|
213
|
+
this.setStyle('visibility', '');
|
|
214
|
+
this.setStyle('top', '');
|
|
215
|
+
this.setStyle('left', '');
|
|
216
|
+
this.setStyle('position', '');
|
|
217
|
+
|
|
218
|
+
this.addClass('editor-hidden');
|
|
219
|
+
}, this, true);
|
|
220
|
+
}, newEditor, true);
|
|
221
|
+
newEditor.render();
|
|
169
222
|
}
|
|
170
223
|
});
|
|
171
224
|
});
|
data/config/locales/en.yml
CHANGED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
es:
|
|
2
|
+
editor:
|
|
3
|
+
align_center: Centrado
|
|
4
|
+
align_left: Alineación izquierda
|
|
5
|
+
align_right: Alineación derecha
|
|
6
|
+
alignment: Alineación
|
|
7
|
+
background_color: Color de fondo
|
|
8
|
+
bold: Negrita
|
|
9
|
+
create_an_ordered_list: Crear lista ordenada
|
|
10
|
+
create_an_unordered_list: Crear lista desordenada
|
|
11
|
+
enter_file_name: Nombre del archivo
|
|
12
|
+
font_name_and_size: Nombre y tamaño de la fuente
|
|
13
|
+
font_color: Color de la fuente
|
|
14
|
+
font_style: Estilo de la fuente
|
|
15
|
+
footer: Pie
|
|
16
|
+
header: Cabecera
|
|
17
|
+
hide_more_fields: Ocultar más campos
|
|
18
|
+
html_link: Enlace HTML
|
|
19
|
+
indenting_and_lists: "Tabulaciones y listas"
|
|
20
|
+
insert_item: Insertar elemento
|
|
21
|
+
insert_image: Insertar imagen
|
|
22
|
+
indent: Tabular hacia dentro
|
|
23
|
+
italic: Cursiva
|
|
24
|
+
justify: Justificar
|
|
25
|
+
loading: Cargando
|
|
26
|
+
normal: Normal
|
|
27
|
+
outdent: Tabular hacia fuera
|
|
28
|
+
paragraph_style: Estilo de párrafo
|
|
29
|
+
remove_formatting: Eliminar formato
|
|
30
|
+
show_hide_hidden_elements: "Mostrar/ocultar elementos ocultos"
|
|
31
|
+
show_more_fields: Mostrar más campos
|
|
32
|
+
sidebar: Barra lateral
|
|
33
|
+
subscript: Subíndice
|
|
34
|
+
superscript: Superíndice
|
|
35
|
+
underline: Subrayar
|
|
36
|
+
upload: Subir
|
|
37
|
+
upload_image: Subir imagen
|
|
38
|
+
upload_file: Subir fichero
|
|
39
|
+
|
|
40
|
+
enable_rich_editor: "Activar editor avanzado"
|
|
41
|
+
rich_editor: "Editor avanzado"
|
|
42
|
+
rich_editor_description: "Configurar opciones del editor."
|
|
43
|
+
rich_editor_engine: "Motor del editor avanzado"
|
|
44
|
+
rich_editor_ids: "Identificadores del editor avanzado"
|
|
45
|
+
rich_editor_ids_description: "Listar aquí los ids de los textareas, separados por espacios"
|
data/config/locales/ru.yml
CHANGED
|
@@ -9,10 +9,12 @@ ru:
|
|
|
9
9
|
bold: Полужирный
|
|
10
10
|
create_an_ordered_list: Нумерованный список
|
|
11
11
|
create_an_unordered_list: Ненумерованный список
|
|
12
|
+
edit_html_code: Редактировать HTML код
|
|
12
13
|
enter_file_name: Введите имя файла
|
|
13
14
|
font_name_and_size: Шрифт и размер
|
|
14
15
|
font_color: Цвет шрифта
|
|
15
16
|
font_style: Стиль шрифта
|
|
17
|
+
footer: Сноска
|
|
16
18
|
header: Заголовок
|
|
17
19
|
hide_more_fields: Скрыть дополнительные поля
|
|
18
20
|
html_link: HTML ссылка
|
data/lib/editor_configuration.rb
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
class EditorConfiguration < Configuration
|
|
2
2
|
preference :enabled, :boolean, :default => true
|
|
3
3
|
preference :current_editor, :string, :default => 'YUIRichEditor'
|
|
4
|
-
preference :ids, :
|
|
5
|
-
end
|
|
4
|
+
preference :ids, :text, :default => 'product_description page_body'
|
|
5
|
+
end
|
|
Binary file
|
|
@@ -12,9 +12,54 @@ not_set:"-- Not set --",
|
|
|
12
12
|
clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?",
|
|
13
13
|
clipboard_no_support:"Currently not supported by your browser, use keyboard shortcuts instead.",
|
|
14
14
|
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.",
|
|
15
|
-
invalid_data:"
|
|
15
|
+
invalid_data:"{#field} is invalid",
|
|
16
|
+
invalid_data_number:"{#field} must be a number",
|
|
17
|
+
invalid_data_min:"{#field} must be a number greater than {#min}",
|
|
18
|
+
invalid_data_size:"{#field} must be a number or percentage",
|
|
16
19
|
more_colors:"More colors"
|
|
17
20
|
},
|
|
21
|
+
colors:{
|
|
22
|
+
'000000':'Black',
|
|
23
|
+
'993300':'Burnt orange',
|
|
24
|
+
'333300':'Dark olive',
|
|
25
|
+
'003300':'Dark green',
|
|
26
|
+
'003366':'Dark azure',
|
|
27
|
+
'000080':'Navy Blue',
|
|
28
|
+
'333399':'Indigo',
|
|
29
|
+
'333333':'Very dark gray',
|
|
30
|
+
'800000':'Maroon',
|
|
31
|
+
'FF6600':'Orange',
|
|
32
|
+
'808000':'Olive',
|
|
33
|
+
'008000':'Green',
|
|
34
|
+
'008080':'Teal',
|
|
35
|
+
'0000FF':'Blue',
|
|
36
|
+
'666699':'Grayish blue',
|
|
37
|
+
'808080':'Gray',
|
|
38
|
+
'FF0000':'Red',
|
|
39
|
+
'FF9900':'Amber',
|
|
40
|
+
'99CC00':'Yellow green',
|
|
41
|
+
'339966':'Sea green',
|
|
42
|
+
'33CCCC':'Turquoise',
|
|
43
|
+
'3366FF':'Royal blue',
|
|
44
|
+
'800080':'Purple',
|
|
45
|
+
'999999':'Medium gray',
|
|
46
|
+
'FF00FF':'Magenta',
|
|
47
|
+
'FFCC00':'Gold',
|
|
48
|
+
'FFFF00':'Yellow',
|
|
49
|
+
'00FF00':'Lime',
|
|
50
|
+
'00FFFF':'Aqua',
|
|
51
|
+
'00CCFF':'Sky blue',
|
|
52
|
+
'993366':'Brown',
|
|
53
|
+
'C0C0C0':'Silver',
|
|
54
|
+
'FF99CC':'Pink',
|
|
55
|
+
'FFCC99':'Peach',
|
|
56
|
+
'FFFF99':'Light yellow',
|
|
57
|
+
'CCFFCC':'Pale green',
|
|
58
|
+
'CCFFFF':'Pale cyan',
|
|
59
|
+
'99CCFF':'Light sky blue',
|
|
60
|
+
'CC99FF':'Plum',
|
|
61
|
+
'FFFFFF':'White'
|
|
62
|
+
},
|
|
18
63
|
contextmenu:{
|
|
19
64
|
align:"Alignment",
|
|
20
65
|
left:"Left",
|
|
@@ -151,7 +196,8 @@ langs:"Languages",
|
|
|
151
196
|
wait:"Please wait...",
|
|
152
197
|
sug:"Suggestions",
|
|
153
198
|
no_sug:"No suggestions",
|
|
154
|
-
no_mpell:"No misspellings found."
|
|
199
|
+
no_mpell:"No misspellings found.",
|
|
200
|
+
learn_word:"Learn word"
|
|
155
201
|
},
|
|
156
202
|
pagebreak:{
|
|
157
203
|
desc:"Insert page break."
|
|
@@ -167,4 +213,11 @@ upper_roman:"Upper roman",
|
|
|
167
213
|
circle:"Circle",
|
|
168
214
|
disc:"Disc",
|
|
169
215
|
square:"Square"
|
|
170
|
-
}
|
|
216
|
+
},
|
|
217
|
+
aria:{
|
|
218
|
+
rich_text_area:"Rich Text Area"
|
|
219
|
+
},
|
|
220
|
+
wordcount:{
|
|
221
|
+
words: 'Words: '
|
|
222
|
+
}
|
|
223
|
+
}});
|
|
@@ -8,43 +8,44 @@
|
|
|
8
8
|
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
|
9
9
|
<link href="css/advhr.css" rel="stylesheet" type="text/css" />
|
|
10
10
|
</head>
|
|
11
|
-
<body>
|
|
11
|
+
<body role="application">
|
|
12
12
|
<form onsubmit="AdvHRDialog.update();return false;" action="#">
|
|
13
13
|
<div class="tabs">
|
|
14
14
|
<ul>
|
|
15
|
-
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advhr.advhr_desc}</a></span></li>
|
|
15
|
+
<li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advhr.advhr_desc}</a></span></li>
|
|
16
16
|
</ul>
|
|
17
17
|
</div>
|
|
18
18
|
|
|
19
19
|
<div class="panel_wrapper">
|
|
20
20
|
<div id="general_panel" class="panel current">
|
|
21
|
-
<table border="0" cellpadding="4" cellspacing="0">
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
21
|
+
<table role="presentation" border="0" cellpadding="4" cellspacing="0">
|
|
22
|
+
<tr role="group" aria-labelledby="width_label">
|
|
23
|
+
<td><label id="width_label" for="width">{#advhr_dlg.width}</label></td>
|
|
24
|
+
<td class="nowrap">
|
|
25
|
+
<input id="width" name="width" type="text" value="" class="mceFocus" />
|
|
26
|
+
<span style="display:none;" id="width_unit_label">{#advhr_dlg.widthunits}</span>
|
|
27
|
+
<select name="width2" id="width2" aria-labelledby="width_unit_label">
|
|
28
|
+
<option value="">px</option>
|
|
29
|
+
<option value="%">%</option>
|
|
30
|
+
</select>
|
|
31
|
+
</td>
|
|
32
|
+
</tr>
|
|
33
|
+
<tr>
|
|
34
|
+
<td><label for="size">{#advhr_dlg.size}</label></td>
|
|
35
|
+
<td><select id="size" name="size">
|
|
36
|
+
<option value="">{#advhr_dlg.normal}</option>
|
|
37
|
+
<option value="1">1</option>
|
|
38
|
+
<option value="2">2</option>
|
|
39
|
+
<option value="3">3</option>
|
|
40
|
+
<option value="4">4</option>
|
|
41
|
+
<option value="5">5</option>
|
|
42
|
+
</select></td>
|
|
43
|
+
</tr>
|
|
44
|
+
<tr>
|
|
45
|
+
<td><label for="noshade">{#advhr_dlg.noshade}</label></td>
|
|
46
|
+
<td><input type="checkbox" name="noshade" id="noshade" class="radio" /></td>
|
|
47
|
+
</tr>
|
|
48
|
+
</table>
|
|
48
49
|
</div>
|
|
49
50
|
</div>
|
|
50
51
|
|