Skip to content

Commit

Permalink
Minor improvements, fix error in locales and bump version.
Browse files Browse the repository at this point in the history
  • Loading branch information
romul committed Jan 31, 2011
1 parent bf71536 commit 0203d03
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 25 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
tmp
nbproject
*.swp
*.gem
4 changes: 1 addition & 3 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require File.expand_path('../../config/application', __FILE__)

require 'rubygems'
require 'rake'
require 'rake/testtask'
Expand Down Expand Up @@ -28,4 +26,4 @@ RSpec::Core::RakeTask.new
# require 'cucumber/rake/task'
# Cucumber::Rake::Task.new do |t|
# t.cucumber_opts = %w{--format pretty}
# end
# end
26 changes: 10 additions & 16 deletions app/views/shared/_editor.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<script type="text/javascript" charset="utf-8">
var <%= editor_id %>_editor = new YAHOO.widget.Editor('<%= editor_id %>', {
height: '350px',
width: '790px',
width: 'auto',
animate: true,
handleSubmit: true,
toolbar: {
Expand Down Expand Up @@ -108,26 +108,20 @@
{ type: 'push', label: 'HTML Link CTRL + SHIFT + L', value: 'createlink', disabled: true },
{ type: 'push', label: '<%= t("editor.insert_image") %>', value: 'insertimage' }
]
},
{ type: 'separator' },
{ group: 'uploaditem', label: '<%= t("editor.upload_file") %>',
buttons: [
{ type: 'push', label: '<%= t("editor.upload_image") %>', value: 'imageUpload' },
{ type: 'push', label: '<%= t("editor.upload_file") %>', value: 'fileUpload' }
]
}

]
}
});

<%= editor_id %>_editor.on('toolbarLoaded', function() {
var imageUploadConfig = {
type: 'push',
label: '<%= t("editor.upload_image") %>',
value: 'imageUpload'
};
<%= editor_id %>_editor.toolbar.addButtonToGroup(imageUploadConfig, 'insertitem');

var fileUploadConfig = {
type: 'push',
label: '<%= t("editor.upload_file") %>',
value: 'fileUpload'
};
<%= editor_id %>_editor.toolbar.addButtonToGroup(fileUploadConfig, 'insertitem');
});


<%= editor_id %>_editor.addListener('editorContentLoaded', function() {
$(".yui-toolbar-imageUpload").upload({
Expand Down
2 changes: 1 addition & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ en:
insert_item: Insert Item
insert_image: Insert Image
upload_image: Upload Image
upload_image: Upload File
upload_file: Upload File
show_more_fields: Show more fields
hide_more_fields: Hide more fields
switch_simple: Switch to Simple Editor
Expand Down
2 changes: 1 addition & 1 deletion config/locales/ru.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ru:
insert_item: Вставка
insert_image: Вставить картинки по адресу
upload_image: Загрузить картинку
upload_image: Загрузить файл
upload_file: Загрузить файл
show_more_fields: Показать дополнительные поля
hide_more_fields: Скрыть дополнительные поля
switch_simple: Переключиться на простой редактор
Expand Down
9 changes: 5 additions & 4 deletions spree_editor.gemspec
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.name = 'spree_editor'
s.version = '1.0.0'
s.version = '0.30.1'
s.summary = 'Add gem summary here'
#s.description = 'Add (optional) gem description here'
s.required_ruby_version = '>= 1.8.7'

# s.author = 'David Heinemeier Hansson'
s.author = 'divineforest'
# s.email = '[email protected]'
# s.homepage = 'http://www.rubyonrails.org'
s.homepage = 'http://github.com/divineforest/spree_editor'
# s.rubyforge_project = 'actionmailer'

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

Expand Down

0 comments on commit 0203d03

Please sign in to comment.