tb_cms 1.3.5 → 1.3.6

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
- SHA256:
3
- metadata.gz: d674e42a14812fcc99fc125a85514ba33f016752e5cdcc7c4d7319e841505ea3
4
- data.tar.gz: 5b1669484dff7f06e78db700051107954229d95ec11819a3d05144d5929fe050
2
+ SHA1:
3
+ metadata.gz: 13270a188b116b592cf0ca1dfcc2693f89e10a72
4
+ data.tar.gz: ce7dfc3f907926f416f053b15276801570230840
5
5
  SHA512:
6
- metadata.gz: b819655bcdbb65fc611da5ddbba4a159dcb9a495d05fbcbd46b7c8d04351d014b8d974b0889b2fb0b53162a089658b99cbe69a190b88916699fbfa97e9240a59
7
- data.tar.gz: 6583b6a1d64056748b9252381e51d6cfda5949c7b119ed0a731e7b5e382cb9522e0e6355d1a9392ba36ed50509d2c3b9c233ed389f037a16a1d77e42f392e88a
6
+ metadata.gz: '09f2d4d365bd67a2e929d66c446cb34cffdcb60c9c07ced83c979261b2bc7be43507d8ba0e47f9f4965800cc74d852d13a1a1505667e9d103623f1fecaf30fd8'
7
+ data.tar.gz: b2c889ecec952493d8ea28fe54812f682cd8b0939455e718c6415d53fca081ab3dad0fec60c215edd7a09fcd919bd5a280a2decf004e30d09a738e15ae4ad0a7
@@ -2,4 +2,4 @@
2
2
  //= require admin/cms/pages
3
3
  //= require admin/cms/menu_items
4
4
 
5
- spud.admin.cms = {};
5
+ tb.cms = {};
@@ -1,7 +1,7 @@
1
- spud.admin.cms.menu_items = {};
1
+ tb.cms.menu_items = {};
2
2
 
3
3
  (function() {
4
- var menu_items = spud.admin.cms.menu_items;
4
+ var menu_items = tb.cms.menu_items;
5
5
  var val;
6
6
 
7
7
  var setUrl = function(){
@@ -1,11 +1,10 @@
1
- spud.admin.cms.pages = {};
1
+ tb.cms.pages = {};
2
2
 
3
3
  (function(){
4
4
 
5
- spud.admin.cms.pages = {
5
+ tb.cms.pages = {
6
6
  edit: function(){
7
- spud.admin.editor.init({selector: '.page-partial-content-editor', width: $("#page_partials_form").width()});
8
- spud.admin.cms.pages.initFormTabs();
7
+ tb.cms.pages.initFormTabs();
9
8
  $(".btn-preview").on('click', clickedPreviewButton);
10
9
  $("#spud_page_layout").on('change', changedLayoutSelection);
11
10
  }
@@ -37,16 +36,16 @@ var changedLayoutSelection = function(e){
37
36
  spud.admin.editor.unload();
38
37
 
39
38
  $("#page_partials_form").replaceWith(data);
40
- spud.admin.cms.pages.initFormTabs();
39
+ tb.cms.pages.initFormTabs();
41
40
 
42
- spud.admin.editor.init({selector: '.page-partial-content-editor', width: $("#page_partials_form").width()});
41
+ tb.editor.init();
43
42
 
44
43
  }, 'text').error(function(jqXHR) {
45
44
  alert("Error: " + jqXHR.responseText);
46
45
  });
47
46
  };
48
47
 
49
- spud.admin.cms.pages.initFormTabs = function(){
48
+ tb.cms.pages.initFormTabs = function(){
50
49
  var tabNames = [];
51
50
 
52
51
  $('.formtabs .formtab').each(function(tabind) {
@@ -4,7 +4,7 @@ class Admin::PagesController < Admin::ApplicationController
4
4
  before_action :load_page, only: [:edit, :update, :show, :destroy]
5
5
 
6
6
  def index
7
- @pages = SpudPage.where(spud_page_id: nil).order(:page_order).includes(:spud_pages)
7
+ @pages = SpudPage.where(spud_page_id: nil).ordered.includes(:spud_pages)
8
8
  home_page = SpudPage.where(url_name: Spud::Cms.root_page_name).first
9
9
  if home_page.blank?
10
10
  flash.now[:warning] = "You have not setup your default CMS page. This page will be your homepage. To do so, create a page with the name '#{Spud::Cms.root_page_name.titlecase}'"
@@ -26,6 +26,7 @@ class SpudPage < ActiveRecord::Base
26
26
  scope :parent_pages, -> { where(spud_page_id: nil) }
27
27
  scope :published_pages, -> { where(published: true) }
28
28
  scope :viewable, -> { where(visibility: 0) }
29
+ scope :ordered, -> { order(page_order: :asc, name: :asc) }
29
30
 
30
31
  def full_content_processed
31
32
  ActiveSupport::Deprecation.warn('#full_content_processed is deprecated; use #full_content instead.')
@@ -21,8 +21,8 @@
21
21
  <input type="hidden" value=<%= @menu.id %> id="menu-id">
22
22
  </div>
23
23
  <script type="text/javascript">
24
- $(document).ready(spud.admin.cms.menu_items.init);
24
+ $(document).ready(tb.cms.menu_items.init);
25
25
  </script>
26
26
 
27
27
  <% end %>
28
-
28
+
@@ -17,7 +17,7 @@
17
17
  <%= f.fields_for :spud_page_partials do |b| %>
18
18
  <div class="formtab tab-pane">
19
19
  <%= b.hidden_field :name, :class => "tab_name" %>
20
- <%= b.text_area :content, :class => "page-partial-content-editor" %>
20
+ <%= b.text_area :content, :class => "page-partial-content-editor tinymce" %>
21
21
  </div>
22
22
  <% end %>
23
23
  </div>
@@ -101,5 +101,5 @@
101
101
  <%= hidden_field_tag "preview", 0 %>
102
102
 
103
103
  <script type="text/javascript">
104
- $(document).ready(spud.admin.cms.pages.edit);
104
+ $(document).ready(tb.cms.pages.edit);
105
105
  </script>
@@ -8,7 +8,7 @@
8
8
  <% if spud_page_partial.id %>
9
9
  <%= hidden_field_tag "spud_page[spud_page_partials_attributes][#{index}][id]", spud_page_partial.id %>
10
10
  <% end %>
11
- <textarea class="page-partial-content-editor" name="spud_page[spud_page_partials_attributes][<%= index %>][content]">
11
+ <textarea class="page-partial-content-editor tinymce" name="spud_page[spud_page_partials_attributes][<%= index %>][content]">
12
12
  <%= spud_page_partial.content %>
13
13
  </textarea>
14
14
  </div>
@@ -10,6 +10,6 @@
10
10
  <%= link_to 'Delete', admin_page_path(page), :method => :delete, :data => {:confirm => 'Are you sure?"'}, :class => 'btn btn-danger btn-sm' %>
11
11
  </td>
12
12
  </tr>
13
- <% page.spud_pages.each do |page| %>
13
+ <% page.spud_pages.ordered.each do |page| %>
14
14
  <%= render :partial => 'page_row', :locals => {:depth => depth+1, :page => page} %>
15
15
  <% end %>
@@ -1,5 +1,5 @@
1
1
  module Spud
2
2
  module Cms
3
- VERSION = '1.3.5'.freeze
3
+ VERSION = '1.3.6'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tb_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.5
4
+ version: 1.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Moser Consulting
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-07 00:00:00.000000000 Z
11
+ date: 2021-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -322,7 +322,7 @@ files:
322
322
  homepage: http://bitbucket.org/moser-inc/tb_cms
323
323
  licenses: []
324
324
  metadata: {}
325
- post_install_message:
325
+ post_install_message:
326
326
  rdoc_options: []
327
327
  require_paths:
328
328
  - lib
@@ -337,8 +337,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
337
337
  - !ruby/object:Gem::Version
338
338
  version: '0'
339
339
  requirements: []
340
- rubygems_version: 3.0.8
341
- signing_key:
340
+ rubyforge_project:
341
+ rubygems_version: 2.6.12
342
+ signing_key:
342
343
  specification_version: 4
343
344
  summary: Twice Baked CMS
344
345
  test_files: