alchemy_cms 2.1.3 → 2.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,7 +10,8 @@ if (typeof(Alchemy) === 'undefined') {
10
10
  Alchemy.PageSorter = {
11
11
 
12
12
  init : function () {
13
- $('ul#sitemap').nestedSortable({
13
+ var $sortables = $('ul#sitemap').find('ul.level_1_children');
14
+ $sortables.nestedSortable({
14
15
  disableNesting: 'no-nest',
15
16
  forcePlaceholderSize: true,
16
17
  handle: 'span.handle',
@@ -26,7 +27,7 @@ if (typeof(Alchemy) === 'undefined') {
26
27
  Alchemy.pleaseWaitOverlay();
27
28
  e.preventDefault();
28
29
  var params = {
29
- set: JSON.stringify($('ul#sitemap').nestedSortable('toHierarchy'))
30
+ set: JSON.stringify($sortables.nestedSortable('toHierarchy'))
30
31
  };
31
32
  $.post(Alchemy.routes.order_admin_pages_path, params);
32
33
  return false;
@@ -170,7 +170,7 @@ if (typeof(Alchemy) === 'undefined') {
170
170
  Alchemy.AjaxErrorHandler($dialog, XMLHttpRequest.status, textStatus, errorThrown);
171
171
  },
172
172
  complete: function(jqXHR, textStatus) {
173
- Alchemy.enableButton('.button');
173
+ Alchemy.enableButton('.button.disabled');
174
174
  }
175
175
  });
176
176
  },
@@ -9,13 +9,6 @@ a.button.small.disabled img {
9
9
  top: -1px;
10
10
  }
11
11
 
12
- a.button.disabled,
13
- a.button.disabled:hover,
14
- a.button.disabled:active {
15
- padding: 2px !important;
16
- text-align: center;
17
- }
18
-
19
12
  a.button {
20
13
  padding: 5px 8px;
21
14
  text-decoration: none;
@@ -60,14 +53,13 @@ input.button {
60
53
  }
61
54
 
62
55
  button.button {
63
- line-height: 21px;
64
- padding: 0px 8px;
56
+ padding: 4px 8px;
65
57
  }
66
58
 
67
59
  .button img {
68
60
  margin: 2px 0 0 0;
69
- width: 20px;
70
- height: 20px;
61
+ width: 16px;
62
+ height: 16px;
71
63
  }
72
64
 
73
65
  #new_page_form tbody tr td.second_row .button {
@@ -106,6 +98,15 @@ button.button.disabled:active {
106
98
  background-image: none;
107
99
  background-color: #f5f5f5;
108
100
  padding: 1px 0 0;
101
+ line-height: 15px;
102
+ }
103
+
104
+ a.button.disabled,
105
+ a.button.disabled:hover,
106
+ a.button.disabled:active {
107
+ padding: 2px 0 !important;
108
+ line-height: 13px !important;
109
+ text-align: center;
109
110
  }
110
111
 
111
112
  a.button.disabled img {
@@ -253,8 +253,13 @@ div.picture_gallery_images {
253
253
  padding: 1px;
254
254
  }
255
255
 
256
- div.picture_thumbnail div.picture_image img.img_paddingtop {
257
- @include disable-user-select;
256
+ div.picture_thumbnail div.picture_image {
257
+ height: 93px;
258
+ overflow: hidden;
259
+
260
+ img.img_paddingtop {
261
+ @include disable-user-select;
262
+ }
258
263
  }
259
264
 
260
265
  /* @group add moclecule */
@@ -568,7 +573,7 @@ div.file_name {
568
573
  overflow: hidden;
569
574
  float: left;
570
575
  width: 293px;
571
- line-height: 24px;
576
+ line-height: 25px;
572
577
  font-size: 10px;
573
578
  }
574
579
 
@@ -4,6 +4,22 @@ html {
4
4
  height: 100%;
5
5
  }
6
6
 
7
+ noscript {
8
+ position: fixed;
9
+ top: 0;
10
+ left: 0;
11
+ z-index: 1000;
12
+ width: 100%;
13
+ text-align:center;
14
+ line-height: 1em;
15
+ border-bottom: 1px solid #c4c19c;
16
+ color: #726d23;
17
+ background-color: #f3f0c1;
18
+ h1, p {
19
+ margin: 16px 0;
20
+ }
21
+ }
22
+
7
23
  body#alchemy {
8
24
  margin: 0;
9
25
  padding: 0;
@@ -33,6 +33,10 @@ div.login_signup_box {
33
33
  }
34
34
  }
35
35
 
36
+ html.no-js {
37
+ div.login_signup_box, div#alchemy_greeting h1 { display: none;}
38
+ }
39
+
36
40
  #login_box {
37
41
  height: 310px;
38
42
  width: 394px;
@@ -19,9 +19,7 @@ module Alchemy
19
19
  @content = Content.find_by_id(params[:id])
20
20
  @attachment = Attachment.find_by_id(params[:attachment_id])
21
21
  @content.essence.attachment = @attachment
22
- # @content.essence.save
23
- # @content.save
24
- @options = params[:options]
22
+ @options = params[:options] || {}
25
23
  end
26
24
 
27
25
  end
@@ -203,7 +203,7 @@ module Alchemy
203
203
  prev_item = nil
204
204
  neworder.each do |item|
205
205
  dbitem = Page.find(item['id'])
206
- prev_item.nil? ? dbitem.move_to_child_of(Page.root) : dbitem.move_to_right_of(prev_item)
206
+ prev_item.nil? ? dbitem.move_to_child_of(@page_root) : dbitem.move_to_right_of(prev_item)
207
207
  sort_children(item, dbitem) unless item['children'].nil?
208
208
  prev_item = dbitem.reload
209
209
  end
@@ -75,11 +75,7 @@ module Alchemy
75
75
  end
76
76
 
77
77
  def flush
78
- Picture.all.each do |picture|
79
- FileUtils.rm_rf("#{Rails.root}/public/pictures/show/#{picture.id}")
80
- FileUtils.rm_rf("#{Rails.root}/public/pictures/thumbnails/#{picture.id}")
81
- expire_page(:controller => '/pictures', :action => 'zoom', :id => picture.id)
82
- end
78
+ FileUtils.rm_rf Rails.root.join('public', Alchemy.mount_point, 'pictures')
83
79
  @notice = t('Picture cache flushed')
84
80
  end
85
81
 
@@ -1,12 +1,11 @@
1
1
  module Alchemy
2
2
  class ElementsController < Alchemy::BaseController
3
-
4
- filter_access_to [:show], :attribute_check => true
3
+
4
+ filter_access_to :show, :attribute_check => true, :model => Alchemy::Element, :load_method => :load_element
5
5
  layout false
6
6
 
7
7
  # Returns the element partial as HTML or as JavaScript that tries to replace a given +container_id+ with the partial content via jQuery.
8
8
  def show
9
- @element = Element.find(params[:id])
10
9
  @page = @element.page
11
10
  respond_to do |format|
12
11
  format.html
@@ -14,5 +13,11 @@ module Alchemy
14
13
  end
15
14
  end
16
15
 
16
+ private
17
+
18
+ def load_element
19
+ @element = Element.find(params[:id])
20
+ end
21
+
17
22
  end
18
23
  end
@@ -7,7 +7,7 @@
7
7
  </tr>
8
8
  <tr>
9
9
  <td class="label"><%= f.label "css_class" %></td>
10
- <td class="select"><%= f.select "css_class", [[t("Layout default"), ""], [t("above"), "no_float"], [t("left"), "left"], [t("right"), "right"]], {}, :class => 'long' %></td>
10
+ <td class="select"><%= f.select "css_class", [[t("Layout default"), ""], [t("above"), "no_float"], [t("left"), "left"], [t("right"), "right"]] %></td>
11
11
  </tr>
12
12
  <tr>
13
13
  <td colspan="2" class="submit">
@@ -2,7 +2,7 @@
2
2
  <div class="sitemap_page<%= page.locked ? ' locked' : '' %>">
3
3
  <div class="sitemap_left_images">
4
4
  <%= sitemapFolderLink(page) unless page.children.blank? || @sorting %>
5
- <span class="site_status <%= @sorting ? 'handle' : nil %> tooltip"></span>
5
+ <span class="site_status <%= @sorting && page.level > 1 ? 'handle' : nil %> tooltip"></span>
6
6
  <div class="tooltip_content" style="display: none;">
7
7
  <h1><%= t("page_type") %>: <%= page.layout_display_name %></h1>
8
8
  <p>
@@ -107,7 +107,7 @@
107
107
  </div>
108
108
  </div>
109
109
  <%- if @sorting || (!page.folded?(current_user) && !page.children.empty?) -%>
110
- <ul id="page_<%= page.id %>_children">
110
+ <ul id="page_<%= page.id %>_children" class="level_<%= page.level %>_children">
111
111
  <%= render :partial => 'page', :collection => page.children %>
112
112
  </ul>
113
113
  <%- end -%>
@@ -1,5 +1,5 @@
1
1
  <!DOCTYPE html>
2
- <html>
2
+ <html class="no-js">
3
3
  <head>
4
4
  <meta charset="UTF-8">
5
5
  <title><%= render_alchemy_title %></title>
@@ -17,6 +17,10 @@
17
17
  <%= yield :javascript_includes %>
18
18
  </head>
19
19
  <body id="alchemy">
20
+ <noscript>
21
+ <h1><%= t(:javascript_disabled_headline) %></h1>
22
+ <p><%= t(:javascript_disabled_text) %></p>
23
+ </noscript>
20
24
  <div id="overlay">
21
25
  <div id="overlay_text_box">
22
26
  <%= image_tag('alchemy/ajax_loader.gif', :id => 'ajax_loader') %>
@@ -57,6 +61,7 @@
57
61
  <%= yield(:javascripts) %>
58
62
  <script type="text/javascript" charset="utf-8">
59
63
  jQuery(function($) {
64
+ $('html').removeClass('no-js');
60
65
  Alchemy.locale = '<%= ::I18n.locale %>';
61
66
  Alchemy.resizeFrame();
62
67
  Alchemy.Tooltips();
@@ -1,5 +1,5 @@
1
1
  <!DOCTYPE html>
2
- <html>
2
+ <html class="no-js">
3
3
  <head>
4
4
  <meta charset="UTF-8">
5
5
  <title><%= render_alchemy_title %></title>
@@ -9,6 +9,10 @@
9
9
  <%= javascript_include_tag('alchemy/alchemy') %>
10
10
  </head>
11
11
  <body id="alchemy" class="login">
12
+ <noscript>
13
+ <h1><%= t(:javascript_disabled_headline) %></h1>
14
+ <p><%= t(:javascript_disabled_text) %></p>
15
+ </noscript>
12
16
  <div id="left_menu">
13
17
  <div id="main_navi">
14
18
  <div id="logout">
@@ -26,6 +30,7 @@
26
30
  <%= yield(:javascripts) %>
27
31
  <script type="text/javascript" charset="utf-8">
28
32
  jQuery(document).ready(function($) {
33
+ $('html').removeClass('no-js');
29
34
  Alchemy.SelectBox('body#alchemy select');
30
35
  Alchemy.ButtonObserver('.button');
31
36
  });
@@ -395,6 +395,8 @@ de:
395
395
  "item copied to clipboard": "%{name} wurde in die Zwischenablage kopiert."
396
396
  "item moved to clipboard": "%{name} wurde in die Zwischenablage bewegt."
397
397
  "item removed from clipboard": "%{name} wurde aus der Zwischenablage entfernt."
398
+ javascript_disabled_headline: "Javascript ist deaktiviert!"
399
+ javascript_disabled_text: "Alchemy funktioniert nur einwandfrei mit aktiviertem Javascript. Bitte aktivieren Sie es in Ihrem Browser."
398
400
  language_does_not_exist: "Dieser Sprachbaum existiert noch nicht"
399
401
  language_pages_copied: "Der Sprachbaum wurde kopiert"
400
402
  left: "links"
@@ -253,6 +253,8 @@ en:
253
253
  "item copied to clipboard": "Copied %{name} to clipboard"
254
254
  "item moved to clipboard": "Moved %{name} to clipboard"
255
255
  "item removed from clipboard": "Removed %{name} from clipboard"
256
+ javascript_disabled_headline: "Javascript is disabled!"
257
+ javascript_disabled_text: "Alchemy needs Javascript to run smoothly. Please enable it in your browser settings."
256
258
  language_does_not_exist: "This language tree does not exist"
257
259
  language_pages_copied: "Language tree succesfully copied."
258
260
  link_image: "Link this image."
@@ -1,5 +1,5 @@
1
1
  module Alchemy
2
2
 
3
- VERSION = "2.1.3"
3
+ VERSION = "2.1.4"
4
4
 
5
5
  end
@@ -1,9 +1,3 @@
1
- <%- unless @contents.blank? -%>
2
- <%- @contents.each do |content| -%>
3
- <%- unless content["type"] == "Alchemy::EssencePicture" || content["type"] == "EssencePicture" -%>
1
+ <%- @contents.each do |content| -%>
4
2
  <%%= render_essence_editor_by_name(element, '<%= content["name"] %>') %>
5
- <%- else -%>
6
- <%%= render_picture_editor(element) %>
7
- <%- end -%>
8
- <%- end -%>
9
3
  <%- end -%>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.3
4
+ version: 2.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,11 +11,11 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-02-06 00:00:00.000000000 Z
14
+ date: 2012-02-10 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails
18
- requirement: &70207620493240 !ruby/object:Gem::Requirement
18
+ requirement: &70096236707100 !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
21
21
  - - ~>
@@ -23,10 +23,10 @@ dependencies:
23
23
  version: 3.1.3
24
24
  type: :runtime
25
25
  prerelease: false
26
- version_requirements: *70207620493240
26
+ version_requirements: *70096236707100
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: authlogic
29
- requirement: &70207620490880 !ruby/object:Gem::Requirement
29
+ requirement: &70096236879620 !ruby/object:Gem::Requirement
30
30
  none: false
31
31
  requirements:
32
32
  - - ! '>='
@@ -34,10 +34,10 @@ dependencies:
34
34
  version: '0'
35
35
  type: :runtime
36
36
  prerelease: false
37
- version_requirements: *70207620490880
37
+ version_requirements: *70096236879620
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: awesome_nested_set
40
- requirement: &70207620535420 !ruby/object:Gem::Requirement
40
+ requirement: &70096236875620 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
43
  - - ~>
@@ -45,10 +45,10 @@ dependencies:
45
45
  version: '2.0'
46
46
  type: :runtime
47
47
  prerelease: false
48
- version_requirements: *70207620535420
48
+ version_requirements: *70096236875620
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: declarative_authorization
51
- requirement: &70207620534680 !ruby/object:Gem::Requirement
51
+ requirement: &70096236911760 !ruby/object:Gem::Requirement
52
52
  none: false
53
53
  requirements:
54
54
  - - ~>
@@ -56,10 +56,10 @@ dependencies:
56
56
  version: 0.5.4
57
57
  type: :runtime
58
58
  prerelease: false
59
- version_requirements: *70207620534680
59
+ version_requirements: *70096236911760
60
60
  - !ruby/object:Gem::Dependency
61
61
  name: tvdeyen-fleximage
62
- requirement: &70207620533640 !ruby/object:Gem::Requirement
62
+ requirement: &70096236908560 !ruby/object:Gem::Requirement
63
63
  none: false
64
64
  requirements:
65
65
  - - ~>
@@ -67,10 +67,10 @@ dependencies:
67
67
  version: 1.0.9
68
68
  type: :runtime
69
69
  prerelease: false
70
- version_requirements: *70207620533640
70
+ version_requirements: *70096236908560
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: will_paginate
73
- requirement: &70207620532420 !ruby/object:Gem::Requirement
73
+ requirement: &70096236904540 !ruby/object:Gem::Requirement
74
74
  none: false
75
75
  requirements:
76
76
  - - ~>
@@ -78,10 +78,10 @@ dependencies:
78
78
  version: '3.0'
79
79
  type: :runtime
80
80
  prerelease: false
81
- version_requirements: *70207620532420
81
+ version_requirements: *70096236904540
82
82
  - !ruby/object:Gem::Dependency
83
83
  name: acts_as_ferret
84
- requirement: &70207620531360 !ruby/object:Gem::Requirement
84
+ requirement: &70096236778220 !ruby/object:Gem::Requirement
85
85
  none: false
86
86
  requirements:
87
87
  - - ~>
@@ -89,10 +89,10 @@ dependencies:
89
89
  version: '0.5'
90
90
  type: :runtime
91
91
  prerelease: false
92
- version_requirements: *70207620531360
92
+ version_requirements: *70096236778220
93
93
  - !ruby/object:Gem::Dependency
94
94
  name: acts_as_list
95
- requirement: &70207620530160 !ruby/object:Gem::Requirement
95
+ requirement: &70096236775320 !ruby/object:Gem::Requirement
96
96
  none: false
97
97
  requirements:
98
98
  - - ~>
@@ -100,10 +100,10 @@ dependencies:
100
100
  version: '0.1'
101
101
  type: :runtime
102
102
  prerelease: false
103
- version_requirements: *70207620530160
103
+ version_requirements: *70096236775320
104
104
  - !ruby/object:Gem::Dependency
105
105
  name: magiclabs-userstamp
106
- requirement: &70207620529000 !ruby/object:Gem::Requirement
106
+ requirement: &70096236772540 !ruby/object:Gem::Requirement
107
107
  none: false
108
108
  requirements:
109
109
  - - ~>
@@ -111,10 +111,10 @@ dependencies:
111
111
  version: 2.0.2
112
112
  type: :runtime
113
113
  prerelease: false
114
- version_requirements: *70207620529000
114
+ version_requirements: *70096236772540
115
115
  - !ruby/object:Gem::Dependency
116
116
  name: dynamic_form
117
- requirement: &70207620558540 !ruby/object:Gem::Requirement
117
+ requirement: &70096236510540 !ruby/object:Gem::Requirement
118
118
  none: false
119
119
  requirements:
120
120
  - - ~>
@@ -122,10 +122,10 @@ dependencies:
122
122
  version: '1.1'
123
123
  type: :runtime
124
124
  prerelease: false
125
- version_requirements: *70207620558540
125
+ version_requirements: *70096236510540
126
126
  - !ruby/object:Gem::Dependency
127
127
  name: jquery-rails
128
- requirement: &70207620553520 !ruby/object:Gem::Requirement
128
+ requirement: &70096236965880 !ruby/object:Gem::Requirement
129
129
  none: false
130
130
  requirements:
131
131
  - - ~>
@@ -133,10 +133,10 @@ dependencies:
133
133
  version: 1.0.16
134
134
  type: :runtime
135
135
  prerelease: false
136
- version_requirements: *70207620553520
136
+ version_requirements: *70096236965880
137
137
  - !ruby/object:Gem::Dependency
138
138
  name: attachment_magic
139
- requirement: &70207620580400 !ruby/object:Gem::Requirement
139
+ requirement: &70096236964340 !ruby/object:Gem::Requirement
140
140
  none: false
141
141
  requirements:
142
142
  - - ~>
@@ -144,10 +144,10 @@ dependencies:
144
144
  version: 0.2.1
145
145
  type: :runtime
146
146
  prerelease: false
147
- version_requirements: *70207620580400
147
+ version_requirements: *70096236964340
148
148
  - !ruby/object:Gem::Dependency
149
149
  name: rspec-rails
150
- requirement: &70207620578660 !ruby/object:Gem::Requirement
150
+ requirement: &70096236963760 !ruby/object:Gem::Requirement
151
151
  none: false
152
152
  requirements:
153
153
  - - ~>
@@ -155,10 +155,10 @@ dependencies:
155
155
  version: '2.8'
156
156
  type: :development
157
157
  prerelease: false
158
- version_requirements: *70207620578660
158
+ version_requirements: *70096236963760
159
159
  - !ruby/object:Gem::Dependency
160
160
  name: sqlite3
161
- requirement: &70207620577380 !ruby/object:Gem::Requirement
161
+ requirement: &70096236962720 !ruby/object:Gem::Requirement
162
162
  none: false
163
163
  requirements:
164
164
  - - ! '>='
@@ -166,7 +166,7 @@ dependencies:
166
166
  version: '0'
167
167
  type: :development
168
168
  prerelease: false
169
- version_requirements: *70207620577380
169
+ version_requirements: *70096236962720
170
170
  description: Alchemy is a Rails 3 CMS with a flexible content storing architecture.
171
171
  email:
172
172
  - alchemy@magiclabs.de
@@ -809,7 +809,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
809
809
  version: '0'
810
810
  segments:
811
811
  - 0
812
- hash: -1495060895852714083
812
+ hash: -2683034050984755578
813
813
  required_rubygems_version: !ruby/object:Gem::Requirement
814
814
  none: false
815
815
  requirements:
@@ -818,7 +818,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
818
818
  version: '0'
819
819
  segments:
820
820
  - 0
821
- hash: -1495060895852714083
821
+ hash: -2683034050984755578
822
822
  requirements:
823
823
  - ImageMagick (libmagick), v6.6 or greater.
824
824
  rubyforge_project: