tenon 1.0.74 → 1.0.75
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/tenon/features/cocoon_hooks.js.coffee +2 -1
- data/app/controllers/tenon/index_controller.rb +1 -1
- data/app/models/tenon/gallery.rb +1 -1
- data/app/views/devise/passwords/edit.html.haml +2 -2
- data/app/views/tenon/assets/crop.html.haml +1 -1
- data/app/views/tenon/assets/edit.html.haml +1 -1
- data/app/views/tenon/events/_form.html.haml +1 -1
- data/app/views/tenon/galleries/_form.html.haml +1 -1
- data/app/views/tenon/pages/_form.html.haml +1 -1
- data/app/views/tenon/post_categories/_form.html.haml +1 -1
- data/app/views/tenon/posts/_form.html.haml +1 -1
- data/app/views/tenon/redirects/_form.html.haml +1 -1
- data/app/views/tenon/settings/show.html.haml +1 -1
- data/app/views/tenon/tenon_callouts/_form.html.haml +1 -2
- data/app/views/tenon/users/_form.html.haml +1 -1
- data/db/migrate/20150928230951_remove_unique_key_from_tenon_pages.rb +5 -0
- data/lib/generators/tenon/scaffold/templates/view__form.html.haml +1 -1
- data/lib/generators/tenon/scaffold_small/templates/view__form.html.haml +1 -1
- data/lib/tenon/version.rb +1 -1
- data/lib/tenon/warning_generator.rb +8 -8
- data/spec/lib/tenon/warning_generator_spec.rb +28 -27
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5fd4a384937ea49830fea08eebe3b700e7144f78
|
4
|
+
data.tar.gz: 8217584c00c96aed38263bcabc48780c84d46149
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2349301eb6a82537e49ea3b748c13e1ac171982c96df098747f598454fca0125fff80684b09c8fa03d73e6d9b66ed3ed3b5a30c3f0a4822d1a257f573bc73034
|
7
|
+
data.tar.gz: 1670a56532c4e3defe57cf62c5561f1201a16e61548ff545886c2b2d239ca874f7c6395e97401ff51538118385d71c34d92289c6e2facf8c73e23ad60d5638cf
|
@@ -5,7 +5,8 @@ class Tenon.features.CocoonHooks
|
|
5
5
|
afterInsert: (e, insertedItem) =>
|
6
6
|
@$insertedItem = $(insertedItem)
|
7
7
|
@_checkTenonContent()
|
8
|
+
$('select').select2()
|
8
9
|
|
9
10
|
_checkTenonContent: ->
|
10
11
|
if @$insertedItem.find('.tn-tc')
|
11
|
-
new Tenon.features.tenonContent.Base
|
12
|
+
new Tenon.features.tenonContent.Base
|
data/app/models/tenon/gallery.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Tenon
|
2
2
|
class Gallery < ActiveRecord::Base
|
3
3
|
include Tenon::Reorderable
|
4
|
-
has_many :photos, inverse_of: :gallery
|
4
|
+
has_many :photos, inverse_of: :gallery, dependent: :destroy
|
5
5
|
accepts_nested_attributes_for :photos, allow_destroy: true, reject_if: ->(p) { p[:file_id].blank? }
|
6
6
|
validates_presence_of :title
|
7
7
|
validates_uniqueness_of :title
|
@@ -8,11 +8,11 @@
|
|
8
8
|
|
9
9
|
.row.bordered
|
10
10
|
= f.label :password, class: "font"
|
11
|
-
= f.password_field :password, placeholder: '
|
11
|
+
= f.password_field :password, placeholder: '--'
|
12
12
|
|
13
13
|
.row.bordered
|
14
14
|
= f.label :password_confirmation, class: "font"
|
15
|
-
= f.password_field :password_confirmation, placeholder: '
|
15
|
+
= f.password_field :password_confirmation, placeholder: '--'
|
16
16
|
|
17
17
|
.row.bordered
|
18
18
|
= f.submit "Change my password", class: 'btn btn-info'
|
@@ -14,4 +14,4 @@
|
|
14
14
|
.crop_buttons.right.full
|
15
15
|
= f.check_box :duplicate, checked: true, class: 'tn-checkbox-right'
|
16
16
|
= f.label :duplicate, "Create New Asset From Crop?", class: 'left'
|
17
|
-
.right= f.submit "Save", class: 'save btn btn-comp'
|
17
|
+
.right= f.submit "Save", class: 'save btn btn-comp', data: { disable_with: "Please wait..." }
|
@@ -30,7 +30,7 @@
|
|
30
30
|
|
31
31
|
.row.content
|
32
32
|
- if can?(:publish, @event)
|
33
|
-
%button.btn.btn-comp.btn-block.submit Save
|
33
|
+
%button.btn.btn-comp.btn-block.submit{ data: { disable_with: "Please wait..." } } Save
|
34
34
|
- if can?(:create, Tenon::ItemVersion)
|
35
35
|
= save_draft_button(@event)
|
36
36
|
.last-autosave
|
@@ -24,7 +24,7 @@
|
|
24
24
|
.box
|
25
25
|
.content
|
26
26
|
- if can?(:publish, @gallery)
|
27
|
-
= f.submit 'Save', class: 'btn btn-block btn-comp'
|
27
|
+
= f.submit 'Save', class: 'btn btn-block btn-comp', data: { disable_with: "Please wait..." }
|
28
28
|
|
29
29
|
- if can?(:create, Tenon::ItemVersion)
|
30
30
|
= save_draft_button(@gallery)
|
@@ -28,7 +28,7 @@
|
|
28
28
|
.box
|
29
29
|
.content
|
30
30
|
- if can?(:publish, @redirect)
|
31
|
-
%button.btn.btn-block.btn-comp Save
|
31
|
+
%button.btn.btn-block.btn-comp{ data: { disable_with: "Please wait..." } } Save
|
32
32
|
- if can?(:create, Tenon::ItemVersion)
|
33
33
|
= save_draft_button(@redirect)
|
34
34
|
.last-autosave
|
@@ -35,8 +35,7 @@
|
|
35
35
|
= f.super_label :published
|
36
36
|
|
37
37
|
.content
|
38
|
-
%button.btn.btn-comp.submit.btn-block{:href => 'javascript:;'} Save
|
39
|
-
|
38
|
+
%button.btn.btn-comp.submit.btn-block{:href => 'javascript:;', data: { disable_with: "Please wait..." } } Save
|
40
39
|
|
41
40
|
- if @tenon_callout.persisted?
|
42
41
|
%hr
|
@@ -66,7 +66,7 @@
|
|
66
66
|
<% end -%>
|
67
67
|
.content
|
68
68
|
- if can?(:publish, @<%= singular_name %>)
|
69
|
-
%button.btn.btn-block.btn-comp Save
|
69
|
+
%button.btn.btn-block.btn-comp{ data: { disable_with: "Please wait..." } } Save
|
70
70
|
- if can?(:create, Tenon::ItemVersion)
|
71
71
|
= save_draft_button(@<%= singular_name %>)
|
72
72
|
.last-autosave
|
data/lib/tenon/version.rb
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
module Tenon
|
2
2
|
class WarningGenerator
|
3
|
-
def self.generate
|
4
|
-
new.warnings
|
3
|
+
def self.generate(root_path)
|
4
|
+
new.warnings(root_path)
|
5
5
|
end
|
6
6
|
|
7
|
-
def warnings
|
7
|
+
def warnings(root_path)
|
8
8
|
warnings = []
|
9
|
-
warnings << "Your site needs a title.<br /><br /><a class='btn btn-comp btn-block' href='
|
10
|
-
warnings << "Your site needs an address.<br /><br /><a class='btn btn-comp btn-block' href='
|
11
|
-
warnings << "You haven't entered an email address to receive contact messages.<br /><br /><a class='btn btn-comp btn-block' href='
|
12
|
-
warnings << "You haven't entered an email address from which to send contact messages and other site notices.<br /><br /><a class='btn btn-comp btn-block' href='
|
13
|
-
warnings << "You haven't entered the Google Analytics code.<br /><br /><a class='btn btn-comp btn-block' href='
|
9
|
+
warnings << "Your site needs a title.<br /><br /><a class='btn btn-comp btn-block' href='#{root_path}settings'>OK</a>".html_safe if Tenon::MySettings.site_title.blank?
|
10
|
+
warnings << "Your site needs an address.<br /><br /><a class='btn btn-comp btn-block' href='#{root_path}settings'>OK</a>".html_safe if Tenon::MySettings.site_url.blank?
|
11
|
+
warnings << "You haven't entered an email address to receive contact messages.<br /><br /><a class='btn btn-comp btn-block' href='#{root_path}settings'>Correct This</a>".html_safe if Tenon::MySettings.contact_email.blank?
|
12
|
+
warnings << "You haven't entered an email address from which to send contact messages and other site notices.<br /><br /><a class='btn btn-comp btn-block' href='#{root_path}settings'>Correct This</a>".html_safe if Tenon::MySettings.from_email.blank?
|
13
|
+
warnings << "You haven't entered the Google Analytics code.<br /><br /><a class='btn btn-comp btn-block' href='#{root_path}settings'>Correct This</a>".html_safe if Tenon::MySettings.google_analytics.blank?
|
14
14
|
warnings << 'You have not included a custom favicon.' unless favicon && favicon.size > 0
|
15
15
|
warnings
|
16
16
|
end
|
@@ -3,6 +3,7 @@ require 'spec_helper'
|
|
3
3
|
describe Tenon::WarningGenerator do
|
4
4
|
let(:settings) { double.as_null_object }
|
5
5
|
let(:wg) { Tenon::WarningGenerator.new }
|
6
|
+
root_path = '/tenon/'
|
6
7
|
before do
|
7
8
|
stub_const('Tenon::MySettings', settings)
|
8
9
|
end
|
@@ -13,8 +14,8 @@ describe Tenon::WarningGenerator do
|
|
13
14
|
end
|
14
15
|
|
15
16
|
it 'should include a warning about no site title' do
|
16
|
-
warning = "Your site needs a title.<br /><br /><a class='btn btn-comp btn-block' href='
|
17
|
-
expect(wg.warnings).to include(warning)
|
17
|
+
warning = "Your site needs a title.<br /><br /><a class='btn btn-comp btn-block' href='#{root_path}settings'>OK</a>"
|
18
|
+
expect(wg.warnings(root_path)).to include(warning)
|
18
19
|
end
|
19
20
|
end
|
20
21
|
|
@@ -23,9 +24,9 @@ describe Tenon::WarningGenerator do
|
|
23
24
|
settings.stub(:site_title) { 'test' }
|
24
25
|
end
|
25
26
|
|
26
|
-
it 'should include a warning about no site title' do
|
27
|
-
warning = "Your site needs a title.<br /><br /><a class='btn btn-comp btn-block' href='
|
28
|
-
expect(wg.warnings).not_to include(warning)
|
27
|
+
it 'should not include a warning about no site title' do
|
28
|
+
warning = "Your site needs a title.<br /><br /><a class='btn btn-comp btn-block' href='#{root_path}settings'>OK</a>"
|
29
|
+
expect(wg.warnings(root_path)).not_to include(warning)
|
29
30
|
end
|
30
31
|
end
|
31
32
|
|
@@ -34,9 +35,9 @@ describe Tenon::WarningGenerator do
|
|
34
35
|
settings.stub(:site_url) { nil }
|
35
36
|
end
|
36
37
|
|
37
|
-
it 'should
|
38
|
-
warning = "Your site needs an address.<br /><br /><a class='btn btn-comp btn-block' href='
|
39
|
-
expect(wg.warnings).to include(warning)
|
38
|
+
it 'should include a warning about no site domain' do
|
39
|
+
warning = "Your site needs an address.<br /><br /><a class='btn btn-comp btn-block' href='#{root_path}settings'>OK</a>"
|
40
|
+
expect(wg.warnings(root_path)).to include(warning)
|
40
41
|
end
|
41
42
|
end
|
42
43
|
|
@@ -46,8 +47,8 @@ describe Tenon::WarningGenerator do
|
|
46
47
|
end
|
47
48
|
|
48
49
|
it 'should not include a warning about no site title' do
|
49
|
-
warning = "Your site needs an address.<br /><br /><a class='btn btn-comp btn-block' href='
|
50
|
-
expect(wg.warnings).not_to include(warning)
|
50
|
+
warning = "Your site needs an address.<br /><br /><a class='btn btn-comp btn-block' href='#{root_path}settings'>OK</a>"
|
51
|
+
expect(wg.warnings(root_path)).not_to include(warning)
|
51
52
|
end
|
52
53
|
end
|
53
54
|
|
@@ -57,8 +58,8 @@ describe Tenon::WarningGenerator do
|
|
57
58
|
end
|
58
59
|
|
59
60
|
it 'should include a warning about no contact email' do
|
60
|
-
warning = "You haven't entered an email address to receive contact messages.<br /><br /><a class='btn btn-comp btn-block' href='
|
61
|
-
expect(wg.warnings).to include(warning)
|
61
|
+
warning = "You haven't entered an email address to receive contact messages.<br /><br /><a class='btn btn-comp btn-block' href='#{root_path}settings'>Correct This</a>"
|
62
|
+
expect(wg.warnings(root_path)).to include(warning)
|
62
63
|
end
|
63
64
|
end
|
64
65
|
|
@@ -68,8 +69,8 @@ describe Tenon::WarningGenerator do
|
|
68
69
|
end
|
69
70
|
|
70
71
|
it 'should include a warning about no contact email' do
|
71
|
-
warning = "You haven't entered an email address to receive contact messages.<br /><br /><a class='btn btn-comp btn-block' href='
|
72
|
-
expect(wg.warnings).not_to include(warning)
|
72
|
+
warning = "You haven't entered an email address to receive contact messages.<br /><br /><a class='btn btn-comp btn-block' href='#{root_path}settings'>Correct This</a>"
|
73
|
+
expect(wg.warnings(root_path)).not_to include(warning)
|
73
74
|
end
|
74
75
|
end
|
75
76
|
|
@@ -79,8 +80,8 @@ describe Tenon::WarningGenerator do
|
|
79
80
|
end
|
80
81
|
|
81
82
|
it 'should include a warning about no from email' do
|
82
|
-
warning = "You haven't entered an email address from which to send contact messages and other site notices.<br /><br /><a class='btn btn-comp btn-block' href='
|
83
|
-
expect(wg.warnings).to include(warning)
|
83
|
+
warning = "You haven't entered an email address from which to send contact messages and other site notices.<br /><br /><a class='btn btn-comp btn-block' href='#{root_path}settings'>Correct This</a>"
|
84
|
+
expect(wg.warnings(root_path)).to include(warning)
|
84
85
|
end
|
85
86
|
end
|
86
87
|
|
@@ -89,9 +90,9 @@ describe Tenon::WarningGenerator do
|
|
89
90
|
settings.stub(:from_email) { 'test' }
|
90
91
|
end
|
91
92
|
|
92
|
-
it 'should include a warning about no from email' do
|
93
|
-
warning = "You haven't entered an email address from which to send contact messages and other site notices.<br /><br /><a class='btn btn-comp btn-block' href='
|
94
|
-
expect(wg.warnings).not_to include(warning)
|
93
|
+
it 'should not include a warning about no from email' do
|
94
|
+
warning = "You haven't entered an email address from which to send contact messages and other site notices.<br /><br /><a class='btn btn-comp btn-block' href='#{root_path}settings'>Correct This</a>"
|
95
|
+
expect(wg.warnings(root_path)).not_to include(warning)
|
95
96
|
end
|
96
97
|
end
|
97
98
|
|
@@ -101,8 +102,8 @@ describe Tenon::WarningGenerator do
|
|
101
102
|
end
|
102
103
|
|
103
104
|
it 'should include a warning about no Google Analytics' do
|
104
|
-
warning = "You haven't entered the Google Analytics code.<br /><br /><a class='btn btn-comp btn-block' href='
|
105
|
-
expect(wg.warnings).to include(warning)
|
105
|
+
warning = "You haven't entered the Google Analytics code.<br /><br /><a class='btn btn-comp btn-block' href='#{root_path}settings'>Correct This</a>"
|
106
|
+
expect(wg.warnings(root_path)).to include(warning)
|
106
107
|
end
|
107
108
|
end
|
108
109
|
|
@@ -111,9 +112,9 @@ describe Tenon::WarningGenerator do
|
|
111
112
|
settings.stub(:google_analytics) { 'test' }
|
112
113
|
end
|
113
114
|
|
114
|
-
it 'should include a warning about no Google Analytics' do
|
115
|
-
warning = "You haven't entered the Google Analytics code.<br /><br /><a class='btn btn-comp btn-block' href='
|
116
|
-
expect(wg.warnings).not_to include(warning)
|
115
|
+
it 'should not include a warning about no Google Analytics' do
|
116
|
+
warning = "You haven't entered the Google Analytics code.<br /><br /><a class='btn btn-comp btn-block' href='#{root_path}settings'>Correct This</a>"
|
117
|
+
expect(wg.warnings(root_path)).not_to include(warning)
|
117
118
|
end
|
118
119
|
end
|
119
120
|
|
@@ -124,7 +125,7 @@ describe Tenon::WarningGenerator do
|
|
124
125
|
|
125
126
|
it 'should include a warning about no favicon' do
|
126
127
|
warning = 'You have not included a custom favicon.'
|
127
|
-
expect(wg.warnings).to include(warning)
|
128
|
+
expect(wg.warnings(root_path)).to include(warning)
|
128
129
|
end
|
129
130
|
end
|
130
131
|
|
@@ -135,7 +136,7 @@ describe Tenon::WarningGenerator do
|
|
135
136
|
|
136
137
|
it 'should include a warning about no favicon' do
|
137
138
|
warning = 'You have not included a custom favicon.'
|
138
|
-
expect(wg.warnings).to include(warning)
|
139
|
+
expect(wg.warnings(root_path)).to include(warning)
|
139
140
|
end
|
140
141
|
end
|
141
142
|
|
@@ -146,7 +147,7 @@ describe Tenon::WarningGenerator do
|
|
146
147
|
|
147
148
|
it 'should not include a warning about no favicon' do
|
148
149
|
warning = 'You have not included a custom favicon.'
|
149
|
-
expect(wg.warnings).not_to include(warning)
|
150
|
+
expect(wg.warnings(root_path)).not_to include(warning)
|
150
151
|
end
|
151
152
|
end
|
152
153
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tenon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.75
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- factor[e] design initiative
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: better_errors
|
@@ -1335,6 +1335,7 @@ files:
|
|
1335
1335
|
- db/migrate/20141115154243_remove_unused_tenon_photo_columns.rb
|
1336
1336
|
- db/migrate/20141117202434_remove_dispatches_and_delayed_jobs.rb
|
1337
1337
|
- db/migrate/20150318162013_remove_taggings.rb
|
1338
|
+
- db/migrate/20150928230951_remove_unique_key_from_tenon_pages.rb
|
1338
1339
|
- db/seeds.rb
|
1339
1340
|
- lib/generators/tenon/i18n_migrations/i18n_migrations_generator.rb
|
1340
1341
|
- lib/generators/tenon/i18n_migrations/templates/migration.rb
|
@@ -1507,7 +1508,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1507
1508
|
version: '0'
|
1508
1509
|
requirements: []
|
1509
1510
|
rubyforge_project:
|
1510
|
-
rubygems_version: 2.
|
1511
|
+
rubygems_version: 2.4.8
|
1511
1512
|
signing_key:
|
1512
1513
|
specification_version: 4
|
1513
1514
|
summary: A highly flexible mountable Rails CMS built for rapid application development.
|