locomotive_cms 2.0.0.rc8 → 2.0.0.rc9
Sign up to get free protection for your applications and to get access to all the features.
- data/app/assets/javascripts/locomotive/views/shared/form_view.js.coffee +8 -1
- data/app/cells/locomotive/global_actions_cell.rb +1 -1
- data/app/models/locomotive/account.rb +14 -0
- data/app/views/locomotive/content_assets/_asset.html.haml +1 -1
- data/app/views/locomotive/content_entries/_list.html.haml +1 -1
- data/app/views/locomotive/content_entries/index.html.haml +1 -1
- data/app/views/locomotive/custom_fields/_form.html.haml +2 -2
- data/app/views/locomotive/custom_fields/types/_has_many.html.haml +1 -1
- data/app/views/locomotive/custom_fields/types/_many_to_many.html.haml +1 -1
- data/app/views/locomotive/my_account/edit.html.haml +1 -1
- data/app/views/locomotive/pages/_page.html.haml +1 -1
- data/app/views/locomotive/snippets/_snippet.html.haml +1 -1
- data/app/views/locomotive/theme_assets/_asset.html.haml +1 -1
- data/config/routes.rb +3 -1
- data/lib/locomotive.rb +1 -0
- data/lib/locomotive/dependencies.rb +1 -0
- data/lib/locomotive/devise.rb +1 -1
- data/lib/locomotive/version.rb +1 -1
- metadata +23 -7
@@ -82,7 +82,14 @@ class Locomotive.Views.Shared.FormView extends Backbone.View
|
|
82
82
|
content.slideUp 100, -> parent.addClass('folded')
|
83
83
|
|
84
84
|
enable_save_with_keys_combination: ->
|
85
|
-
$.cmd 'S', (() =>
|
85
|
+
$.cmd 'S', (() =>
|
86
|
+
# make sure that the current text field gets saved too
|
87
|
+
input = @$('form input[type=text]:focus, form input[type=password]:focus')
|
88
|
+
input.trigger('change') if input.size() > 0
|
89
|
+
|
90
|
+
@$('form input[type=submit]').trigger('click')
|
91
|
+
), [], ignoreCase: true
|
92
|
+
|
86
93
|
|
87
94
|
enable_form_notifications: ->
|
88
95
|
@$('form').formSubmitNotification()
|
@@ -25,7 +25,7 @@ module Locomotive
|
|
25
25
|
end
|
26
26
|
|
27
27
|
add :help, :url => 'http://doc.locomotivecms.com/templates/basics', :class => 'tutorial', :id => 'help'
|
28
|
-
add :logout, :url => destroy_locomotive_session_url, :confirm => t('locomotive.messages.confirm'), :method => :delete
|
28
|
+
add :logout, :url => destroy_locomotive_session_url, :data => { :confirm => t('locomotive.messages.confirm') }, :method => :delete
|
29
29
|
end
|
30
30
|
|
31
31
|
def localize_label(label, options = {})
|
@@ -5,6 +5,20 @@ module Locomotive
|
|
5
5
|
|
6
6
|
devise *Locomotive.config.devise_modules
|
7
7
|
|
8
|
+
## devise fields (need to be declared since 2.x) ##
|
9
|
+
field :remember_created_at, :type => Time
|
10
|
+
field :email, :type => String, :null => false
|
11
|
+
field :encrypted_password, :type => String, :null => false
|
12
|
+
field :authentication_token, :type => String
|
13
|
+
field :reset_password_token, :type => String
|
14
|
+
field :reset_password_sent_at, :type => Time
|
15
|
+
field :password_salt, :type => String
|
16
|
+
field :sign_in_count, :type => Integer
|
17
|
+
field :current_sign_in_at, :type => Time
|
18
|
+
field :last_sign_in_at, :type => Time
|
19
|
+
field :current_sign_in_ip, :type => String
|
20
|
+
field :last_sign_in_ip, :type => String
|
21
|
+
|
8
22
|
## attributes ##
|
9
23
|
field :name
|
10
24
|
field :locale, :default => Locomotive.config.default_locale.to_s or 'en'
|
@@ -2,4 +2,4 @@
|
|
2
2
|
%h4= link_to truncate(asset.name, :length => 17), edit_admin_asset_path(asset)
|
3
3
|
= vignette_tag(asset)
|
4
4
|
.actions
|
5
|
-
= link_to image_tag('admin/list/icons/cross.png'), '#', :class => 'remove', :confirm => t('locomotive.messages.confirm')
|
5
|
+
= link_to image_tag('admin/list/icons/cross.png'), '#', :class => 'remove', :data => { :confirm => t('locomotive.messages.confirm') }
|
@@ -16,4 +16,4 @@
|
|
16
16
|
!= t('locomotive.content_entries.index.updated_at')
|
17
17
|
= l entry.updated_at, :format => :short rescue 'n/a'
|
18
18
|
|
19
|
-
= link_to 'x', content_entry_url(content_type.slug, entry), :class => 'remove', :confirm => t('locomotive.messages.confirm'), :method => :delete
|
19
|
+
= link_to 'x', content_entry_url(content_type.slug, entry), :class => 'remove', :data => { :confirm => t('locomotive.messages.confirm') }, :method => :delete
|
@@ -29,4 +29,4 @@
|
|
29
29
|
- if can?(:manage, Locomotive::ContentType)
|
30
30
|
#local-actions-bottom-bar
|
31
31
|
%p.tleft
|
32
|
-
= link_to t('.destroy'), content_type_url(@content_type), :confirm => t('locomotive.messages.confirm'), :method => :delete, :class => 'button remove'
|
32
|
+
= link_to t('.destroy'), content_type_url(@content_type), :data => { :confirm => t('locomotive.messages.confirm') }, :method => :delete, :class => 'button remove'
|
@@ -52,7 +52,7 @@
|
|
52
52
|
|
53
53
|
%span.actions
|
54
54
|
= link_to 'toggle', '#', :class => 'toggle'
|
55
|
-
= link_to 'x', '#', :class => 'remove', :confirm => t('locomotive.messages.confirm')
|
55
|
+
= link_to 'x', '#', :class => 'remove', :data => { :confirm => t('locomotive.messages.confirm') }
|
56
56
|
|
57
57
|
.clear
|
58
58
|
|
@@ -72,4 +72,4 @@
|
|
72
72
|
|
73
73
|
%span.actions
|
74
74
|
= link_to 'drag', '#', :class => 'drag'
|
75
|
-
= link_to 'x', '#', :class => 'remove', :confirm => t('locomotive.messages.confirm')
|
75
|
+
= link_to 'x', '#', :class => 'remove', :data => { :confirm => t('locomotive.messages.confirm') }
|
@@ -32,7 +32,7 @@
|
|
32
32
|
|
33
33
|
%span.actions
|
34
34
|
= link_to 'e', '#', :class => 'edit'
|
35
|
-
= link_to 'x', '#', :class => 'remove', :confirm => t('locomotive.messages.confirm')
|
35
|
+
= link_to 'x', '#', :class => 'remove', :data => { :confirm => t('locomotive.messages.confirm') }
|
36
36
|
|
37
37
|
|
38
38
|
- content_for :backbone_view_data do
|
@@ -33,7 +33,7 @@
|
|
33
33
|
{{label}}
|
34
34
|
|
35
35
|
%span.actions
|
36
|
-
= link_to 'x', '#', :class => 'remove', :confirm => t('locomotive.messages.confirm')
|
36
|
+
= link_to 'x', '#', :class => 'remove', :data => { :confirm => t('locomotive.messages.confirm') }
|
37
37
|
|
38
38
|
|
39
39
|
- content_for :backbone_view_data do
|
@@ -35,6 +35,6 @@
|
|
35
35
|
|
36
36
|
- if admin_on?(site) && site != current_site
|
37
37
|
%span{ :class => 'actions' }
|
38
|
-
= link_to 'x', site_url(site), :class => 'remove', :confirm => t('locomotive.messages.confirm'), :method => :delete
|
38
|
+
= link_to 'x', site_url(site), :class => 'remove', :data => { :confirm => t('locomotive.messages.confirm') }, :method => :delete
|
39
39
|
|
40
40
|
= render 'locomotive/shared/form_actions', :button_label => :update
|
@@ -28,7 +28,7 @@
|
|
28
28
|
= l page.updated_at, :format => :short
|
29
29
|
|
30
30
|
- if !page.index_or_not_found? && can?(:manage, page)
|
31
|
-
= link_to 'x', page_url(page), :class => 'remove', :confirm => t('locomotive.messages.confirm'), :method => :delete
|
31
|
+
= link_to 'x', page_url(page), :class => 'remove', :data => { :confirm => t('locomotive.messages.confirm') }, :method => :delete
|
32
32
|
|
33
33
|
- if with_children
|
34
34
|
%ul{ :id => "folder-#{page._id}", :class => "page folder depth-#{(page.depth || 0) + 1}", :'data-url' => sort_page_url(page), :style => "display: #{cookies["folder-#{page._id}"] || 'block'}" }
|
data/config/routes.rb
CHANGED
@@ -6,7 +6,9 @@ Locomotive::Engine.routes.draw do
|
|
6
6
|
:path => '',
|
7
7
|
:path_prefix => nil,
|
8
8
|
:failure_app => 'Locomotive::Devise::FailureApp',
|
9
|
-
:controllers => { :sessions => 'locomotive/sessions', :passwords => 'locomotive/passwords' }
|
9
|
+
:controllers => { :sessions => 'locomotive/sessions', :passwords => 'locomotive/passwords' }
|
10
|
+
|
11
|
+
devise_scope :locomotive_account do
|
10
12
|
match '/' => 'sessions#new'
|
11
13
|
delete 'signout' => 'sessions#destroy', :as => :destroy_locomotive_session
|
12
14
|
end
|
data/lib/locomotive.rb
CHANGED
data/lib/locomotive/devise.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
# patches for devise here
|
1
|
+
# patches for devise here
|
data/lib/locomotive/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: locomotive_cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.
|
4
|
+
version: 2.0.0.rc9
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-06-
|
12
|
+
date: 2012-06-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -43,6 +43,22 @@ dependencies:
|
|
43
43
|
- - ~>
|
44
44
|
- !ruby/object:Gem::Version
|
45
45
|
version: 3.2.5
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: devise-encryptable
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ~>
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 0.1.1
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.1.1
|
46
62
|
- !ruby/object:Gem::Dependency
|
47
63
|
name: devise
|
48
64
|
requirement: !ruby/object:Gem::Requirement
|
@@ -50,7 +66,7 @@ dependencies:
|
|
50
66
|
requirements:
|
51
67
|
- - ~>
|
52
68
|
- !ruby/object:Gem::Version
|
53
|
-
version: 1.
|
69
|
+
version: 2.1.0
|
54
70
|
type: :runtime
|
55
71
|
prerelease: false
|
56
72
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -58,13 +74,13 @@ dependencies:
|
|
58
74
|
requirements:
|
59
75
|
- - ~>
|
60
76
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.
|
77
|
+
version: 2.1.0
|
62
78
|
- !ruby/object:Gem::Dependency
|
63
79
|
name: cancan
|
64
80
|
requirement: !ruby/object:Gem::Requirement
|
65
81
|
none: false
|
66
82
|
requirements:
|
67
|
-
- -
|
83
|
+
- - '='
|
68
84
|
- !ruby/object:Gem::Version
|
69
85
|
version: 1.6.7
|
70
86
|
type: :runtime
|
@@ -72,7 +88,7 @@ dependencies:
|
|
72
88
|
version_requirements: !ruby/object:Gem::Requirement
|
73
89
|
none: false
|
74
90
|
requirements:
|
75
|
-
- -
|
91
|
+
- - '='
|
76
92
|
- !ruby/object:Gem::Version
|
77
93
|
version: 1.6.7
|
78
94
|
- !ruby/object:Gem::Dependency
|
@@ -1147,7 +1163,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
1147
1163
|
version: '0'
|
1148
1164
|
segments:
|
1149
1165
|
- 0
|
1150
|
-
hash: -
|
1166
|
+
hash: -2595751512290909456
|
1151
1167
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
1152
1168
|
none: false
|
1153
1169
|
requirements:
|