imagine_cms 5.2.2 → 5.2.3

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
  SHA256:
3
- metadata.gz: 463afd9f9daba1b0c0a16f0df7fd8e70a0c990d9bfad455cd65fccfc2c06d71c
4
- data.tar.gz: 515cb433392199c789c3557ab622c5819df8d851f4f165433bfd0e0bd6ca289c
3
+ metadata.gz: ccebbb2a50cfd351fdb4f1732d9a1962064dc6a1036308612db3b8c7c53b23cd
4
+ data.tar.gz: b03bd71743e5fd6b7a659d820f98a0ffbd4a9249160356a9504213d9abf697c7
5
5
  SHA512:
6
- metadata.gz: dbffc87ab7a4088661650784ba2114cf09d0533866f23b05be424ef3bd6fb39e0e646becae7e96026f4b3323a81b1a18d9768a5ba0e0ff2501d47cbbfc77415e
7
- data.tar.gz: 6812f71fcff897f94907b4f101fdecdc3569f2f42a117cef95cd7c81bedd4e65b386c9ac478db788919953abc300504d06ddb8325fc6d14e5e76a29b2a6ffd66
6
+ metadata.gz: dfb6e1131fe106b647f50025c6513b61422da2502acbc5f2d6623200f392f8f01a178b5bb6a918f8230b4daec3000334776c9738bda36173cb3805e1c38e0640
7
+ data.tar.gz: 4e2982264ebc4bccb7c169542fc5e8ae33001b6ffccf88f66d65ce413821e1e9410a754799f2a40265afa5a5e155b636ffa5f2c71c6a528f22898b7098316032
@@ -249,7 +249,7 @@ function cancelSelectThumbnail() {
249
249
  hideDojoDialog('select_thumbnail_dialog');
250
250
  }
251
251
 
252
- var gallerySize = [];
252
+ if (!window.gallerySize) window.gallerySize = {};
253
253
  function changeGalleryImage(galleryName, index) {
254
254
  var target = galleryName + '_image_' + index;
255
255
  var caption = galleryName + '_caption_' + index;
@@ -483,7 +483,6 @@ class Manage::CmsPagesController < Manage::ApplicationController
483
483
  script_tag = <<-EOT
484
484
  <script type="text/javascript">
485
485
  window.addEventListener('load', (event) => {
486
- scanForPageObjects(#{@pg.id}, '#{key}', #{@pg.version});
487
486
  setInterval(function() {
488
487
  scanForPageObjects(#{@pg.id}, '#{key}', #{@pg.version});
489
488
  }, 1000);
@@ -491,7 +490,6 @@ class Manage::CmsPagesController < Manage::ApplicationController
491
490
  </script>
492
491
  EOT
493
492
  content << script_tag.html_safe
494
- # content << observe_field("page_objects_#{key}", function: "scanForPageObjects(#{@pg.id}, '#{key}', #{@pg.version});", frequency: 2)
495
493
  content
496
494
  when :page_list
497
495
  # set defaults unless values are present in template
@@ -814,17 +814,15 @@ module CmsApplicationHelper
814
814
  default_value ||= start_date
815
815
 
816
816
  draw_calendar = <<-EOT
817
- window.addEventListener('DOMContentLoaded', (event) => {
818
- new Ajax.Updater('date_picker_#{object}_#{method_prefix}_days',
819
- '#{date_picker_url}?month=' + $('#{object}_#{method_prefix}_month_sel').value +
820
- '&year=' + $('#{object}_#{method_prefix}_year_sel').value +
821
- '&min_time=' + #{start_date.to_i} +
822
- '&max_time=' + #{end_date.to_i} +
823
- '&exclude_days=#{exclude_days.join(',')}' +
824
- '&onchange=#{escape_javascript(options[:onchange])}' +
825
- '&object=#{object}' +
826
- '&method_prefix=#{method_prefix}', {method:'get', asynchronous:true, evalScripts:true})
827
- });
817
+ new Ajax.Updater('date_picker_#{object}_#{method_prefix}_days',
818
+ '#{date_picker_url}?month=' + $('#{object}_#{method_prefix}_month_sel').value +
819
+ '&year=' + $('#{object}_#{method_prefix}_year_sel').value +
820
+ '&min_time=' + #{start_date.to_i} +
821
+ '&max_time=' + #{end_date.to_i} +
822
+ '&exclude_days=#{exclude_days.join(',')}' +
823
+ '&onchange=#{escape_javascript(options[:onchange])}' +
824
+ '&object=#{object}' +
825
+ '&method_prefix=#{method_prefix}', {method:'get', asynchronous:true, evalScripts:true});
828
826
  EOT
829
827
 
830
828
  ret = <<-EOT
@@ -852,7 +850,17 @@ module CmsApplicationHelper
852
850
  </div>
853
851
  </div>
854
852
  EOT
855
- ret += javascript_tag(draw_calendar)
853
+ ret += <<-EOT
854
+ <script type="text/javascript">
855
+ if (typeof(Ajax) == 'undefined') {
856
+ window.addEventListener('DOMContentLoaded', (event) => {
857
+ #{draw_calendar}
858
+ });
859
+ } else {
860
+ #{draw_calendar}
861
+ }
862
+ </script>
863
+ EOT
856
864
  ret.html_safe
857
865
  end
858
866
 
@@ -5,11 +5,11 @@
5
5
  </div>
6
6
 
7
7
  <div dojoType="ModalFloatingPane" id="page_browser_dialog" title="Select Page"
8
- hasShadow="true" resizable="true" followScroll="false" displayCloseAction="true" style="width: 520px; height: 326px;">
8
+ hasShadow="true" resizable="true" followScroll="false" displayCloseAction="true" style="width: 620px; height: 426px;">
9
9
  <div>
10
- <div id="page_browser" style="height: 220px; padding-top: 10px; margin-bottom: 8px;">Loading...</div>
10
+ <div id="page_browser" style="height: 345px; padding-top: 0px; margin-bottom: 8px;">Loading...</div>
11
11
 
12
- <input id="page_browser_selection" type="text" class="form" style="width: 416px; padding: 2px;" />
12
+ <input id="page_browser_selection" type="text" class="form" style="width: 516px; padding: 2px;" />
13
13
  <button onclick="closePageBrowser(); return false;" class="form" style="width: 70px">Select</button>
14
14
  </div>
15
15
  </div>
@@ -1,8 +1,18 @@
1
- <div id="<%= "cb_item_#{list_page_select.id}" %>" class="cb_item" style="width: 148px; overflow: hidden; margin: 2px; float: left; cursor: pointer" onclick="$('page_browser_selection').value = '/<%= list_page_select.path %>'; setTimeout('cbSelectItem(\'' + this.id + '\', <%= @page_level %>, \'<%=raw url_for :action => 'list_pages_select', :level => @page_level + 1, :parent_id => list_page_select.id %>\');', 200);" ondblclick="return false;">
2
- <table cellpadding="0" cellspacing="0" border="0">
3
- <tr>
4
- <td valign="top"><%= image_tag 'management/icon_page.gif', style: 'margin: 2px 5px 0 0;' %></td>
5
- <td<%= list_page_select.published_version >= 0 ? '' : ' style="color: gray"'.html_safe %>><%= list_page_select.name %></td>
6
- </tr>
7
- </table>
1
+ <%- list_page = list_page_select -%>
2
+
3
+ <div id="cb_item_<%= list_page.id %>" class="cb_item<%= ' cb_item_offline' unless list_page.published_version >= 0 %>">
4
+ <%= image_tag 'management/icon_page.gif' %></td>
5
+ <span><%= list_page.name %></span>
8
6
  </div>
7
+
8
+ <script type="text/javascript">
9
+ jQuery('#cb_item_<%= list_page.id %>').on('click', () => {
10
+ jQuery('#page_browser_selection').val('/<%= list_page.path %>');
11
+ setTimeout(() => {
12
+ cbSelectItem('#cb_item_<%= list_page.id %>', <%= @page_level %>, '<%=raw url_for action: 'list_pages_select', level: @page_level + 1, parent_id: list_page.id %>');
13
+ }, 200);
14
+ });
15
+ jQuery('#cb_item_<%= list_page.id %>').on('dblclick', (event) => {
16
+ return false;
17
+ });
18
+ </script>
@@ -1 +1 @@
1
- <%= render :partial => 'list_page_select', :collection => @pages %>
1
+ <%= render partial: 'list_page_select', collection: @pages %>
@@ -70,7 +70,7 @@
70
70
  jQuery('#edit_content_link').prop('href', '<%=raw url_for action: 'edit_page_content', id: list_page, authenticity_token: form_authenticity_token.to_s %>');
71
71
  jQuery('#delete_link').prop('href', '<%=raw url_for action: 'delete_page', id: list_page.id %>');
72
72
  </script>
73
- <script type="text/javascript" async>
73
+ <script type="text/javascript" defer>
74
74
  dojo.require("dojo.widget.*");
75
75
  dojo.require("dojo.widget.Dialog");
76
76
  </script>
@@ -1,52 +1,57 @@
1
- <%
1
+ <%-
2
2
  cbNumColumns = 0;
3
3
  cbColWidth = 200;
4
- cbColHeight = 200;
4
+ cbColHeight = 343;
5
5
  -%>
6
6
  <script type="text/javascript">
7
- dojo.require("dojo.widget.*");
8
- dojo.require("dojo.widget.Dialog");
9
-
10
7
  window.cbColWidth = <%= cbColWidth %>;
11
8
  window.cbColHeight = <%= cbColHeight %>;
12
9
  </script>
10
+ <style type="text/css">
11
+ .cb_column {
12
+ width: <%= cbColWidth %>px;
13
+ height: <%= cbColHeight %>px;
14
+ }
15
+ </style>
13
16
 
14
- <div id="columnBrowserContainer" style="width: 100%; height: <%= cbColHeight + 20 %>px; overflow: auto;">
17
+ <div id="columnBrowserContainer" style="height: <%= cbColHeight + 2 %>px;">
15
18
  <div id="columnBrowser" style="width: <%= (cbColWidth+1) * @page_levels.size %>px;">
16
- <% @page_levels.each_with_index do |name, i| %>
17
- <%
18
- if !name.blank?
19
- @path << '/' if !@path.blank?
19
+ <%- @page_levels.each_with_index do |name, i| -%>
20
+ <%-
21
+ if name.present?
22
+ @path << '/' if @path.present?
20
23
  @path << name
21
24
  end
22
25
  @parent = @page
23
26
  @page = CmsPage.find_by_path @path
24
27
  @page_level = i
25
28
  @pages = @parent.children if @parent
26
-
29
+
27
30
  break_flag = false
28
-
31
+
29
32
  if !@page
30
- if @parent && @parent.children.first
31
- @page = @parent.children.first
32
- elsif @parent
33
- @page = @parent
34
- else
35
- @page = CmsPage.find(:first)
36
- end
33
+ @page = @parent.children.first || @parent || CmsPage.first
37
34
  break_flag = true
38
35
  end
39
36
  -%>
40
37
  <div id="columnBrowserLevel<%= i %>" class="cb_column">
41
- <% if i == 0 -%>
42
- <%= render :partial => 'list_page_select', :locals => { :list_page_select => CmsPage.find(1) } %>
43
- <% else -%>
44
- <%= render :partial => 'list_pages_select' %>
45
- <% end -%>
46
- <%= javascript_tag "$('cb_item_#{@parent.id}').className = 'cb_item cb_item_selected';" if @parent %>
38
+ <%- if i == 0 -%>
39
+ <%= render partial: 'list_page_select', locals: { list_page_select: CmsPage.first } %>
40
+ <%- else -%>
41
+ <%= render partial: 'list_pages_select' %>
42
+ <%- end -%>
43
+ <%= javascript_tag "jQuery('#cb_item_#{@parent.id}').addClass('cb_item_selected')[0].scrollIntoView();" if @parent %>
47
44
  </div>
48
45
  <%- break if break_flag -%>
49
- <% end -%>
46
+ <%- end -%>
50
47
  </div>
51
48
  </div>
52
- <%= javascript_tag "cbNumColumns = #{@page_levels.size - 1}; try { $('columnBrowserContainer').scrollLeft = $('columnBrowserContainer').scrollWidth; } catch (e) {}; $('page_browser_selection').value = '/#{@page.path}';" %>
49
+
50
+ <%- list_page = @page -%>
51
+
52
+ <script type="text/javascript">
53
+ cbNumColumns = <%= @page_levels.size - 1 %>;
54
+ jQuery('#columnBrowserLevel' + cbNumColumns)[0].scrollIntoView();
55
+
56
+ jQuery('#page_browser_selection').val('/<%= @page.path %>');
57
+ </script>
@@ -11,34 +11,20 @@ services:
11
11
  volumes:
12
12
  - ../mysite:/home/app/myapp:delegated # set to (relative) path to site you want to run
13
13
  # - .:/home/app/imagine_cms:delegated # when working on imagine itself
14
- # - ./prototype-rails:/home/app/prototype-rails:delegated # when working on imagine dependency prototype-rails
15
- - log:/home/app/myapp/log
16
- - node_modules:/home/app/myapp/node_modules
14
+ - /home/app/myapp/log
15
+ - /home/app/myapp/tmp
17
16
  - gems:/usr/local/rvm/gems
18
17
  - ~/.gitconfig:/home/app/.gitconfig # if you want to commit from within the container
19
18
  # environment:
20
19
  # PASSENGER_APP_ENV: production
21
- # networks: # to use traefik, uncomment this along with the networks section at the bottom
22
- # - traefik
23
- # - default
24
- # labels:
25
- # traefik.docker.network: traefik
26
20
 
27
21
  db:
28
22
  ports: # access using mysql -P (not -p), ex: mysql -h 127.0.0.1 -P 33060 -u root
29
23
  # - '33060:3306' # <---- change the first number to set your local port
30
24
  - '3306' # <---- or omit the first number entirely to use a random local port (use `docker ps`)
31
25
  volumes:
32
- - db-data:/var/lib/mysql
26
+ - /var/lib/mysql
33
27
 
34
28
  volumes:
35
- db-data:
36
- log:
37
- node_modules:
38
- tmp:
39
29
  gems:
40
30
  external: true
41
-
42
- # networks:
43
- # traefik:
44
- # external: true
@@ -16,4 +16,4 @@ services:
16
16
  MYSQL_ALLOW_EMPTY_PASSWORD: 1
17
17
 
18
18
  # redis:
19
- # image: redis:4.0-32bit # not really 32-bit, just compiled that way to reduce memory usage
19
+ # image: redis:5.0-32bit # not really 32-bit, just compiled that way to reduce memory usage
@@ -1,3 +1,3 @@
1
1
  module ImagineCms
2
- VERSION = "5.2.2"
2
+ VERSION = "5.2.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: imagine_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.2
4
+ version: 5.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Namba
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-09 00:00:00.000000000 Z
11
+ date: 2019-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails