tenon 1.0.74 → 1.0.75

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c6981cddef12c4929c2dbb9f0b7fc8b08653f708
4
- data.tar.gz: f30872e33b82e606756b891c607ca1ea0790074e
3
+ metadata.gz: 5fd4a384937ea49830fea08eebe3b700e7144f78
4
+ data.tar.gz: 8217584c00c96aed38263bcabc48780c84d46149
5
5
  SHA512:
6
- metadata.gz: 507f0524577a8a6926b06a264c0d9fe14a87244519d7bcac0ef64cd7ce351177fa63a1f2f11a1713cd4c02ebd6591cf11aa838fcda4f24d683eefcd8694c4526
7
- data.tar.gz: e9c61aa6b4ae173f2b881d84f42c758cfd3f9dcb3fbc66f02734d41880c926ec076d119ad60768bc455991d93a5e091e64683495e9e06cfae7ba4045143e72f4
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
@@ -1,7 +1,7 @@
1
1
  module Tenon
2
2
  class IndexController < Tenon::BaseController
3
3
  def index
4
- @warnings = Tenon::WarningGenerator.generate
4
+ @warnings = Tenon::WarningGenerator.generate(root_path)
5
5
  @tenon_callouts = Tenon::TenonCallout.published
6
6
  end
7
7
  end
@@ -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..." }
@@ -9,4 +9,4 @@
9
9
  .spacer
10
10
 
11
11
  .modal-footer
12
- = f.submit "Save", class: 'btn btn-comp'
12
+ = f.submit "Save", class: '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)
@@ -44,7 +44,7 @@
44
44
 
45
45
  .row.content
46
46
  - if can?(:publish, @page)
47
- %button.btn.btn-comp.btn-block.submit Save
47
+ %button.btn.btn-comp.btn-block.submit{ data: { disable_with: "Please wait..." } } Save
48
48
 
49
49
  - if can?(:create, Tenon::ItemVersion)
50
50
  = save_draft_button(@page)
@@ -8,4 +8,4 @@
8
8
  .spacer
9
9
 
10
10
  .modal-footer
11
- = f.submit "Save", class: 'btn btn-comp'
11
+ = f.submit "Save", class: 'btn btn-comp', data: { disable_with: "Please wait..." }
@@ -54,7 +54,7 @@
54
54
 
55
55
  .row.content
56
56
  - if can?(:publish, @post)
57
- %button.btn.btn-comp.btn-block.submit Save
57
+ %button.btn.btn-comp.btn-block.submit{ data: { disable_with: "Please wait..." } } Save
58
58
 
59
59
  - if can?(:create, Tenon::ItemVersion)
60
60
  = save_draft_button(@post)
@@ -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
@@ -27,5 +27,5 @@
27
27
  %h4.box-label Actions
28
28
  .box
29
29
  .content
30
- %button.btn.btn-primary.btn-block.submit Save
30
+ %button.btn.btn-primary.btn-block.submit{ data: { disable_with: "Please wait..." } } Save
31
31
 
@@ -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
@@ -42,7 +42,7 @@
42
42
  = f.super_label :approved, "Approved?"
43
43
 
44
44
  .content
45
- = f.submit "Save", :class => 'btn btn-block btn-comp'
45
+ = f.submit "Save", :class => 'btn btn-block btn-comp', data: { disable_with: "Please wait..." }
46
46
 
47
47
  - if @user.persisted?
48
48
  %hr
@@ -0,0 +1,5 @@
1
+ class RemoveUniqueKeyFromTenonPages < ActiveRecord::Migration
2
+ def change
3
+ remove_column :tenon_pages, :unique_key, :string
4
+ end
5
+ end
@@ -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
@@ -23,4 +23,4 @@
23
23
  .spacer
24
24
 
25
25
  .modal-footer
26
- = f.submit "Save", class: 'btn btn-comp'
26
+ = f.submit "Save", class: 'btn btn-comp', data: { disable_with: "Please wait..." }
data/lib/tenon/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Tenon
2
- VERSION = '1.0.74'
2
+ VERSION = '1.0.75'
3
3
  end
@@ -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='/tenon/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='/tenon/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='/tenon/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='/tenon/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='/tenon/settings'>Correct This</a>".html_safe if Tenon::MySettings.google_analytics.blank?
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='/tenon/settings'>OK</a>"
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='/tenon/settings'>OK</a>"
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 not include a warning about no site domain' do
38
- warning = "Your site needs an address.<br /><br /><a class='btn btn-comp btn-block' href='/tenon/settings'>OK</a>"
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='/tenon/settings'>OK</a>"
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='/tenon/settings'>Correct This</a>"
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='/tenon/settings'>Correct This</a>"
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='/tenon/settings'>Correct This</a>"
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='/tenon/settings'>Correct This</a>"
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='/tenon/settings'>Correct This</a>"
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='/tenon/settings'>Correct This</a>"
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.74
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-01 00:00:00.000000000 Z
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.2.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.