tb_banners 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0c852929b1637e62064e63bdd120059fa48c39c4
4
- data.tar.gz: 460c049bdd6d53166a067a4a2c47a39a0b9e6109
3
+ metadata.gz: 5084f24ce0780c4f094bda989dea064c2b444bd0
4
+ data.tar.gz: c31a8e5ed4cf76249e77a8d169718d8bf3d535b6
5
5
  SHA512:
6
- metadata.gz: f28f0749dde9be8adee20c9341507185cfa080ccfe79f77b3c4957cce9575555801ca8137833113034376a47dfe4fd209add17468de336350555ff63ef71158c
7
- data.tar.gz: 6f2ac71955140b0ed8e4576d7879690ebb1bc5969c0942fdb1c0152c7b27a5ef60fd6903c5db24ddb8a0d29c88aec18cc1a85455a2677c38f78310d1bdfd8ec4
6
+ metadata.gz: e500326dd50361f539c42aadc48aeebf51370b1ecd66bb2e98f7f0ccdffbb75ca373110155b17edaa4d3e9424d0dda94970082a12ccf5dce5c59d1704cd26be3
7
+ data.tar.gz: 2e2c66573d537ee204f6751ae1b73cb6abb8647f15ef89a0fc6e2d7098df6a580cc20733f1db2f7d88384a2dfc757e4ba146860213f2c546edfc62033415dc9a
@@ -36,6 +36,7 @@ var fixHelper = function(e, ui) {
36
36
  var clickedAddNewBanner = function(e){
37
37
  e.preventDefault();
38
38
  bannerEditId = false;
39
+ spud.admin.editor.unload();
39
40
  $.ajax({
40
41
  url: $(this).attr('href'),
41
42
  dataType: 'html',
@@ -51,8 +52,8 @@ var clickedAddNewBanner = function(e){
51
52
 
52
53
  var clickedEditBanner = function(e){
53
54
  e.preventDefault();
54
- spud.admin.editor.unload();
55
55
  bannerEditId = parseInt($(this).parents('.admin-banner-set-item').attr('data-id'), 10);
56
+ spud.admin.editor.unload();
56
57
  $.ajax({
57
58
  url: $(this).attr('href'),
58
59
  dataType: 'html',
@@ -187,7 +188,9 @@ var sortedBanners = function(e, ui){
187
188
  var initForm = function(){
188
189
  var richText = $('#admin-banner-rich-text');
189
190
  if(richText){
190
- tinymce.EditorManager.execCommand('mceRemoveEditor', true, 'admin-banner-rich-text');
191
+ if(typeof tinymce != "undefined"){
192
+ tinymce.EditorManager.execCommand('mceRemoveEditor', true, 'admin-banner-rich-text');
193
+ }
191
194
  spud.admin.editor.init({
192
195
  selector: '#admin-banner-rich-text',
193
196
  buttons: ['bold','italic','underline','formatselect','|','bullist','numlist','|','link','unlink','anchor', '|', 'code'],
@@ -2,7 +2,7 @@ class Admin::BannerSetsController < Admin::ApplicationController
2
2
 
3
3
  before_filter :get_record, :only => [:show, :edit, :update, :destroy]
4
4
  respond_to :html
5
- belongs_to_spud_app :banner_sets
5
+ belongs_to_app :banner_sets
6
6
  add_breadcrumb 'Banner Sets', :admin_banner_sets_path
7
7
  layout false
8
8
 
@@ -6,8 +6,7 @@ module Spud
6
6
  module Banners
7
7
  class Engine < Rails::Engine
8
8
  engine_name :tb_banners
9
- Spud::Core.append_admin_stylesheets('admin/banners/application')
10
- Spud::Core.append_admin_javascripts('admin/banners/application')
9
+
11
10
  initializer :admin do
12
11
  Spud::Core.config.admin_applications += [{
13
12
  :name => 'Banner Sets',
@@ -17,9 +16,17 @@ module Spud
17
16
  :order => 120
18
17
  }]
19
18
  end
19
+
20
20
  initializer :liquid do
21
21
  Liquid::Template.register_tag('spud_banner_set', Spud::Banners::BannerSetTag) if defined?(Liquid::Template)
22
22
  end
23
+
24
+ initializer 'tb_banners.assets' do
25
+ Spud::Core.append_admin_stylesheets('admin/banners/application')
26
+ Spud::Core.append_admin_javascripts('admin/banners/application')
27
+ Rails.application.config.assets.precompile += ['admin/banners/banners.png']
28
+ end
29
+
23
30
  end
24
31
  end
25
32
  end
@@ -1,5 +1,5 @@
1
1
  module Spud
2
2
  module Banners
3
- VERSION = "1.2.0"
3
+ VERSION = "1.2.1"
4
4
  end
5
5
  end
@@ -0,0 +1,7 @@
1
+ # This migration comes from tb_banners (originally 20140721142719)
2
+ class AddStartAndEndDatesToSpudBanners < ActiveRecord::Migration
3
+ def change
4
+ add_column :spud_banners, :start_date, :date
5
+ add_column :spud_banners, :end_date, :date
6
+ end
7
+ end
@@ -0,0 +1,6 @@
1
+ # This migration comes from tb_core (originally 20150610143438)
2
+ class AddRequiresPasswordChangeToSpudUsers < ActiveRecord::Migration
3
+ def change
4
+ add_column :spud_users, :requires_password_change, :boolean, :default => false
5
+ end
6
+ end
@@ -11,104 +11,107 @@
11
11
  #
12
12
  # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(version: 20140120174546) do
15
-
16
- create_table "spud_banner_sets", force: true do |t|
17
- t.string "name", null: false
18
- t.integer "width", null: false
19
- t.integer "height", null: false
20
- t.boolean "cropped", default: true
21
- t.datetime "created_at", null: false
22
- t.datetime "updated_at", null: false
23
- t.boolean "has_rich_text", default: false
14
+ ActiveRecord::Schema.define(version: 20160310164644) do
15
+
16
+ create_table "spud_banner_sets", force: :cascade do |t|
17
+ t.string "name", limit: 255, null: false
18
+ t.integer "width", limit: 4, null: false
19
+ t.integer "height", limit: 4, null: false
20
+ t.boolean "cropped", default: true
21
+ t.datetime "created_at"
22
+ t.datetime "updated_at"
23
+ t.boolean "has_rich_text", default: false
24
24
  end
25
25
 
26
26
  add_index "spud_banner_sets", ["name"], name: "index_spud_banner_sets_on_name", unique: true, using: :btree
27
27
 
28
- create_table "spud_banners", force: true do |t|
29
- t.integer "spud_banner_set_id", null: false
30
- t.string "link_to"
31
- t.string "link_target", default: "_self"
32
- t.string "title"
33
- t.string "alt"
34
- t.integer "sort_order", default: 0
35
- t.string "banner_file_name"
36
- t.string "banner_content_type"
37
- t.integer "banner_file_size"
28
+ create_table "spud_banners", force: :cascade do |t|
29
+ t.integer "spud_banner_set_id", limit: 4, null: false
30
+ t.string "link_to", limit: 255
31
+ t.string "link_target", limit: 255, default: "_self"
32
+ t.string "title", limit: 255
33
+ t.string "alt", limit: 255
34
+ t.integer "sort_order", limit: 4, default: 0
35
+ t.string "banner_file_name", limit: 255
36
+ t.string "banner_content_type", limit: 255
37
+ t.integer "banner_file_size", limit: 4
38
38
  t.datetime "banner_updated_at"
39
- t.datetime "created_at", null: false
40
- t.datetime "updated_at", null: false
41
- t.text "rich_text"
39
+ t.datetime "created_at"
40
+ t.datetime "updated_at"
41
+ t.text "rich_text", limit: 65535
42
+ t.date "start_date"
43
+ t.date "end_date"
42
44
  end
43
45
 
44
46
  add_index "spud_banners", ["spud_banner_set_id"], name: "index_spud_banners_on_spud_banner_set_id", using: :btree
45
47
 
46
- create_table "spud_liquid_tags", force: true do |t|
47
- t.integer "attachment_id"
48
- t.string "attachment_type"
49
- t.string "tag_name"
50
- t.string "value"
48
+ create_table "spud_liquid_tags", force: :cascade do |t|
49
+ t.integer "attachment_id", limit: 4
50
+ t.string "attachment_type", limit: 255
51
+ t.string "tag_name", limit: 255
52
+ t.string "value", limit: 255
51
53
  t.datetime "created_at"
52
54
  t.datetime "updated_at"
53
55
  end
54
56
 
55
57
  add_index "spud_liquid_tags", ["tag_name", "value"], name: "index_spud_liquid_tags_on_tag_name_and_value", using: :btree
56
58
 
57
- create_table "spud_permissions", force: true do |t|
58
- t.string "name", null: false
59
- t.string "tag", null: false
60
- t.datetime "created_at", null: false
61
- t.datetime "updated_at", null: false
59
+ create_table "spud_permissions", force: :cascade do |t|
60
+ t.string "name", limit: 255, null: false
61
+ t.string "tag", limit: 255, null: false
62
+ t.datetime "created_at"
63
+ t.datetime "updated_at"
62
64
  end
63
65
 
64
66
  add_index "spud_permissions", ["tag"], name: "index_spud_permissions_on_tag", unique: true, using: :btree
65
67
 
66
- create_table "spud_role_permissions", force: true do |t|
67
- t.integer "spud_role_id", null: false
68
- t.string "spud_permission_tag", null: false
69
- t.datetime "created_at", null: false
70
- t.datetime "updated_at", null: false
68
+ create_table "spud_role_permissions", force: :cascade do |t|
69
+ t.integer "spud_role_id", limit: 4, null: false
70
+ t.string "spud_permission_tag", limit: 255, null: false
71
+ t.datetime "created_at"
72
+ t.datetime "updated_at"
71
73
  end
72
74
 
73
75
  add_index "spud_role_permissions", ["spud_permission_tag"], name: "index_spud_role_permissions_on_spud_permission_tag", using: :btree
74
76
  add_index "spud_role_permissions", ["spud_role_id"], name: "index_spud_role_permissions_on_spud_role_id", using: :btree
75
77
 
76
- create_table "spud_roles", force: true do |t|
77
- t.string "name"
78
- t.datetime "created_at", null: false
79
- t.datetime "updated_at", null: false
78
+ create_table "spud_roles", force: :cascade do |t|
79
+ t.string "name", limit: 255
80
+ t.datetime "created_at"
81
+ t.datetime "updated_at"
80
82
  end
81
83
 
82
- create_table "spud_user_settings", force: true do |t|
83
- t.integer "spud_user_id"
84
- t.string "key"
85
- t.string "value"
86
- t.datetime "created_at", null: false
87
- t.datetime "updated_at", null: false
84
+ create_table "spud_user_settings", force: :cascade do |t|
85
+ t.integer "spud_user_id", limit: 4
86
+ t.string "key", limit: 255
87
+ t.string "value", limit: 255
88
+ t.datetime "created_at"
89
+ t.datetime "updated_at"
88
90
  end
89
91
 
90
- create_table "spud_users", force: true do |t|
91
- t.string "first_name"
92
- t.string "last_name"
92
+ create_table "spud_users", force: :cascade do |t|
93
+ t.string "first_name", limit: 255
94
+ t.string "last_name", limit: 255
93
95
  t.boolean "super_admin"
94
- t.string "login", null: false
95
- t.string "email", null: false
96
- t.string "crypted_password", null: false
97
- t.string "password_salt", null: false
98
- t.string "persistence_token", null: false
99
- t.string "single_access_token", null: false
100
- t.string "perishable_token", null: false
101
- t.integer "login_count", default: 0, null: false
102
- t.integer "failed_login_count", default: 0, null: false
96
+ t.string "login", limit: 255, null: false
97
+ t.string "email", limit: 255, null: false
98
+ t.string "crypted_password", limit: 255, null: false
99
+ t.string "password_salt", limit: 255, null: false
100
+ t.string "persistence_token", limit: 255, null: false
101
+ t.string "single_access_token", limit: 255, null: false
102
+ t.string "perishable_token", limit: 255, null: false
103
+ t.integer "login_count", limit: 4, default: 0, null: false
104
+ t.integer "failed_login_count", limit: 4, default: 0, null: false
103
105
  t.datetime "last_request_at"
104
106
  t.datetime "current_login_at"
105
107
  t.datetime "last_login_at"
106
- t.string "current_login_ip"
107
- t.string "last_login_ip"
108
- t.datetime "created_at", null: false
109
- t.datetime "updated_at", null: false
110
- t.string "time_zone"
111
- t.integer "spud_role_id"
108
+ t.string "current_login_ip", limit: 255
109
+ t.string "last_login_ip", limit: 255
110
+ t.datetime "created_at"
111
+ t.datetime "updated_at"
112
+ t.string "time_zone", limit: 255
113
+ t.integer "spud_role_id", limit: 4
114
+ t.boolean "requires_password_change", default: false
112
115
  end
113
116
 
114
117
  add_index "spud_users", ["email"], name: "index_spud_users_on_email", using: :btree
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tb_banners
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Westlake
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-25 00:00:00.000000000 Z
11
+ date: 2016-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tb_core
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.3.0
19
+ version: 1.3.7
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.3.0
26
+ version: 1.3.7
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: paperclip
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -208,6 +208,8 @@ files:
208
208
  - spec/dummy/db/migrate/20130920154447_create_spud_banner_sets.tb_banners.rb
209
209
  - spec/dummy/db/migrate/20130920154448_add_rich_text_to_spud_banners.tb_banners.rb
210
210
  - spec/dummy/db/migrate/20140120174546_create_tb_liquid_spud_liquid_tags.tb_liquid.rb
211
+ - spec/dummy/db/migrate/20160310164427_add_start_and_end_dates_to_spud_banners.tb_banners.rb
212
+ - spec/dummy/db/migrate/20160310164644_add_requires_password_change_to_spud_users.tb_core.rb
211
213
  - spec/dummy/db/schema.rb
212
214
  - spec/dummy/public/404.html
213
215
  - spec/dummy/public/422.html
@@ -235,7 +237,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
235
237
  version: '0'
236
238
  requirements: []
237
239
  rubyforge_project:
238
- rubygems_version: 2.4.5
240
+ rubygems_version: 2.4.6
239
241
  signing_key:
240
242
  specification_version: 4
241
243
  summary: Twice Baked Banners
@@ -276,6 +278,8 @@ test_files:
276
278
  - spec/dummy/db/migrate/20130920154447_create_spud_banner_sets.tb_banners.rb
277
279
  - spec/dummy/db/migrate/20130920154448_add_rich_text_to_spud_banners.tb_banners.rb
278
280
  - spec/dummy/db/migrate/20140120174546_create_tb_liquid_spud_liquid_tags.tb_liquid.rb
281
+ - spec/dummy/db/migrate/20160310164427_add_start_and_end_dates_to_spud_banners.tb_banners.rb
282
+ - spec/dummy/db/migrate/20160310164644_add_requires_password_change_to_spud_users.tb_core.rb
279
283
  - spec/dummy/db/schema.rb
280
284
  - spec/dummy/public/404.html
281
285
  - spec/dummy/public/422.html