Skip to content

Commit 0203d03

Browse files
committed
Minor improvements, fix error in locales and bump version.
1 parent bf71536 commit 0203d03

File tree

6 files changed

+19
-25
lines changed

6 files changed

+19
-25
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77
tmp
88
nbproject
99
*.swp
10+
*.gem

Rakefile

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
require File.expand_path('../../config/application', __FILE__)
2-
31
require 'rubygems'
42
require 'rake'
53
require 'rake/testtask'
@@ -28,4 +26,4 @@ RSpec::Core::RakeTask.new
2826
# require 'cucumber/rake/task'
2927
# Cucumber::Rake::Task.new do |t|
3028
# t.cucumber_opts = %w{--format pretty}
31-
# end
29+
# end

app/views/shared/_editor.html.erb

+10-16
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<script type="text/javascript" charset="utf-8">
2525
var <%= editor_id %>_editor = new YAHOO.widget.Editor('<%= editor_id %>', {
2626
height: '350px',
27-
width: '790px',
27+
width: 'auto',
2828
animate: true,
2929
handleSubmit: true,
3030
toolbar: {
@@ -108,26 +108,20 @@
108108
{ type: 'push', label: 'HTML Link CTRL + SHIFT + L', value: 'createlink', disabled: true },
109109
{ type: 'push', label: '<%= t("editor.insert_image") %>', value: 'insertimage' }
110110
]
111+
},
112+
{ type: 'separator' },
113+
{ group: 'uploaditem', label: '<%= t("editor.upload_file") %>',
114+
buttons: [
115+
{ type: 'push', label: '<%= t("editor.upload_image") %>', value: 'imageUpload' },
116+
{ type: 'push', label: '<%= t("editor.upload_file") %>', value: 'fileUpload' }
117+
]
111118
}
119+
112120
]
113121
}
114122
});
115123

116-
<%= editor_id %>_editor.on('toolbarLoaded', function() {
117-
var imageUploadConfig = {
118-
type: 'push',
119-
label: '<%= t("editor.upload_image") %>',
120-
value: 'imageUpload'
121-
};
122-
<%= editor_id %>_editor.toolbar.addButtonToGroup(imageUploadConfig, 'insertitem');
123-
124-
var fileUploadConfig = {
125-
type: 'push',
126-
label: '<%= t("editor.upload_file") %>',
127-
value: 'fileUpload'
128-
};
129-
<%= editor_id %>_editor.toolbar.addButtonToGroup(fileUploadConfig, 'insertitem');
130-
});
124+
131125

132126
<%= editor_id %>_editor.addListener('editorContentLoaded', function() {
133127
$(".yui-toolbar-imageUpload").upload({

config/locales/en.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ en:
1010
insert_item: Insert Item
1111
insert_image: Insert Image
1212
upload_image: Upload Image
13-
upload_image: Upload File
13+
upload_file: Upload File
1414
show_more_fields: Show more fields
1515
hide_more_fields: Hide more fields
1616
switch_simple: Switch to Simple Editor

config/locales/ru.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ru:
99
insert_item: Вставка
1010
insert_image: Вставить картинки по адресу
1111
upload_image: Загрузить картинку
12-
upload_image: Загрузить файл
12+
upload_file: Загрузить файл
1313
show_more_fields: Показать дополнительные поля
1414
hide_more_fields: Скрыть дополнительные поля
1515
switch_simple: Переключиться на простой редактор

spree_editor.gemspec

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
Gem::Specification.new do |s|
22
s.platform = Gem::Platform::RUBY
33
s.name = 'spree_editor'
4-
s.version = '1.0.0'
4+
s.version = '0.30.1'
55
s.summary = 'Add gem summary here'
66
#s.description = 'Add (optional) gem description here'
77
s.required_ruby_version = '>= 1.8.7'
88

9-
# s.author = 'David Heinemeier Hansson'
9+
s.author = 'divineforest'
1010
# s.email = '[email protected]'
11-
# s.homepage = 'http://www.rubyonrails.org'
11+
s.homepage = 'http://github.com/divineforest/spree_editor'
1212
# s.rubyforge_project = 'actionmailer'
1313

14-
s.files = Dir['CHANGELOG', 'README.md', 'LICENSE', 'lib/**/*', 'app/**/*']
14+
s.files = `git ls-files`.split("\n")
15+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
1516
s.require_path = 'lib'
1617
s.requirements << 'none'
1718

0 commit comments

Comments
 (0)