upgrade to mongoid 2.4.5 + allow authors to edit editable elements from the back-office (bug)

This commit is contained in:
Didier Lafforgue 2012-03-01 16:39:38 +01:00
parent 74038467aa
commit 3e3691ad4a
4 changed files with 24 additions and 20 deletions

View File

@ -8,8 +8,8 @@ gemspec # Include gemspec dependencies
# The rest of the dependencies are for use when in the locomotive development environment # The rest of the dependencies are for use when in the locomotive development environment
group :development do group :development do
gem 'custom_fields', :path => '../gems/custom_fields' # Locale # gem 'custom_fields', :path => '../gems/custom_fields' # for Developers
# # gem 'custom_fields', :git => 'git://github.com/locomotivecms/custom_fields.git', :branch => '2.0.0.rc' # Branch on Github gem 'custom_fields', :git => 'git://github.com/locomotivecms/custom_fields.git', :branch => '2.0.0.rc' # Branch on Github
gem 'rspec-rails', '~> 2.8.0' # In order to have rspec tasks and generators gem 'rspec-rails', '~> 2.8.0' # In order to have rspec tasks and generators
gem 'rspec-cells' gem 'rspec-cells'

View File

@ -15,6 +15,16 @@ GIT
fssm (>= 0.2.7) fssm (>= 0.2.7)
sass (~> 3.1) sass (~> 3.1)
GIT
remote: git://github.com/locomotivecms/custom_fields.git
revision: a965fb3c76a1d689804770d04d510279cf75cf4c
branch: 2.0.0.rc
specs:
custom_fields (2.0.0.rc5)
activesupport (~> 3.2.1)
carrierwave-mongoid (~> 0.1.3)
mongoid (~> 2.4.3)
PATH PATH
remote: . remote: .
specs: specs:
@ -43,7 +53,7 @@ PATH
locomotive_liquid (= 2.2.2) locomotive_liquid (= 2.2.2)
mimetype-fu (~> 0.1.2) mimetype-fu (~> 0.1.2)
mongo (~> 1.5.2) mongo (~> 1.5.2)
mongoid (~> 2.4.3) mongoid (~> 2.4.5)
rack-cache (~> 1.1) rack-cache (~> 1.1)
rails (~> 3.2.1) rails (~> 3.2.1)
rails-backbone (~> 0.6.1) rails-backbone (~> 0.6.1)
@ -52,14 +62,6 @@ PATH
rmagick (~> 2.12.2) rmagick (~> 2.12.2)
sanitize (~> 2.0.3) sanitize (~> 2.0.3)
PATH
remote: ../gems/custom_fields
specs:
custom_fields (2.0.0.rc5)
activesupport (~> 3.2.1)
carrierwave-mongoid (~> 0.1.3)
mongoid (~> 2.4.3)
GEM GEM
remote: http://rubygems.org/ remote: http://rubygems.org/
specs: specs:

View File

@ -64,14 +64,16 @@ class Locomotive.Views.Pages.FormView extends Locomotive.Views.Shared.FormView
enable_liquid_editing: -> enable_liquid_editing: ->
input = @$('#page_raw_template') input = @$('#page_raw_template')
@editor = CodeMirror.fromTextArea input.get()[0],
mode: 'liquid' if input.size() > 0
autoMatchParens: false @editor = CodeMirror.fromTextArea input.get()[0],
lineNumbers: false mode: 'liquid'
passDelay: 50 autoMatchParens: false
tabMode: 'shift' lineNumbers: false
theme: 'default' passDelay: 50
onChange: (editor) => @model.set(raw_template: editor.getValue()) tabMode: 'shift'
theme: 'default'
onChange: (editor) => @model.set(raw_template: editor.getValue())
after_inputs_fold: -> after_inputs_fold: ->
@editor.refresh() @editor.refresh()

View File

@ -27,7 +27,7 @@ Gem::Specification.new do |s|
s.add_dependency 'mongo', '~> 1.5.2' s.add_dependency 'mongo', '~> 1.5.2'
s.add_dependency 'bson_ext', '~> 1.5.2' s.add_dependency 'bson_ext', '~> 1.5.2'
s.add_dependency 'mongoid', '~> 2.4.3' s.add_dependency 'mongoid', '~> 2.4.5'
s.add_dependency 'locomotive-mongoid-tree', '~> 0.6.2' s.add_dependency 'locomotive-mongoid-tree', '~> 0.6.2'
s.add_dependency 'custom_fields', '~> 2.0.0.rc5' s.add_dependency 'custom_fields', '~> 2.0.0.rc5'