alchemy_cms 2.3.0 → 2.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -30,14 +30,12 @@ Alchemy.loadjQuery = function(callback) {
30
30
  head.appendChild(script);
31
31
  }
32
32
 
33
- ;
34
-
35
- getScript('/assets/jquery.min.js', function() {
33
+ getScript('//code.jquery.com/jquery.min.js', function() {
36
34
  if (typeof(jQuery) !== 'undefined') {
37
35
  if (thisPageUsingOtherJSLibrary) {
38
36
  jQuery.noConflict();
39
37
  }
40
- callback();
38
+ callback(jQuery);
41
39
  }
42
40
  });
43
41
 
@@ -6,12 +6,20 @@ Alchemy.loadAlchemyMenuBar = function(options) {
6
6
 
7
7
  Alchemy.Menubar = {
8
8
 
9
+ init: function ($) {
10
+ var self = Alchemy.Menubar;
11
+ self._$ = $;
12
+ self.show();
13
+ },
14
+
9
15
  show: function() {
10
- $('body').prepend(Alchemy.Menubar.build());
16
+ var self = Alchemy.Menubar;
17
+ self._$('body').prepend(Alchemy.Menubar.build());
11
18
  },
12
19
 
13
20
  build: function() {
14
- var bar = $('<div id="alchemy_menubar"/>').append('<ul/>');
21
+ var self = Alchemy.Menubar;
22
+ var bar = self._$('<div id="alchemy_menubar"/>').append('<ul/>');
15
23
  bar.find('ul').append('<li><a href="' + options.route + '/admin">' + Alchemy.Menubar.t("to_alchemy") + '</a></li>').append('<li><a href="' + options.route + '/admin/pages/' + options.page_id + '/edit">' + Alchemy.Menubar.t("edit_page") + '</a></li>').append('<li><a href="' + options.route + '/admin/logout">' + Alchemy.Menubar.t("logout") + '</a></li>');
16
24
  return bar;
17
25
  },
@@ -43,9 +51,9 @@ Alchemy.loadAlchemyMenuBar = function(options) {
43
51
  };
44
52
 
45
53
  if (typeof(jQuery) === 'undefined') {
46
- Alchemy.loadjQuery(Alchemy.Menubar.show);
54
+ Alchemy.loadjQuery(Alchemy.Menubar.init);
47
55
  } else {
48
- Alchemy.Menubar.show();
56
+ Alchemy.Menubar.init(jQuery);
49
57
  }
50
58
 
51
59
  };
@@ -100,10 +100,7 @@
100
100
  @include default-button-style;
101
101
  font-weight: normal;
102
102
  line-height: 34px;
103
-
104
- &:hover {
105
- text-decoration: none !important;
106
- }
103
+ text-decoration: none !important;
107
104
  }
108
105
  }
109
106
  }
@@ -95,6 +95,7 @@ div.sitemap_page:hover a.sitemap_pagename_link {
95
95
  }
96
96
 
97
97
  div.sitemap_left_images {
98
+ width: 16px;
98
99
  margin-top: 3px;
99
100
  float: left;
100
101
  margin-right: 8px;
@@ -340,7 +340,7 @@ module Alchemy
340
340
  # :overlay_options [Hash] # Overlay options. See link_to_overlay_window helper.
341
341
  # :if_permitted_to [Array] # Check permission for button. [:action, :controller]. Exactly how you defined the permission in your +authorization_rules.rb+. Defaults to controller and action from button url.
342
342
  # :skip_permission_check [Boolean] # Skip the permission check. Default false. NOT RECOMMENDED!
343
- # :loading_indicator [Boolean] # Shows the please wait overlay while loading. Default false.
343
+ # :loading_indicator [Boolean] # Shows the please wait overlay while loading. Only for buttons not opening an overlay window. Default true.
344
344
  #
345
345
  def toolbar_button(options = {})
346
346
  options.symbolize_keys!
@@ -350,7 +350,7 @@ module Alchemy
350
350
  :active => false,
351
351
  :link_options => {},
352
352
  :overlay_options => {},
353
- :loading_indicator => false
353
+ :loading_indicator => true
354
354
  }
355
355
  options = defaults.merge(options)
356
356
  button = content_tag('div', :class => 'button_with_label' + (options[:active] ? ' active' : '')) do
@@ -365,7 +365,7 @@ module Alchemy
365
365
  }
366
366
  )
367
367
  else
368
- link_to options[:url], {:class => "icon_button#{options[:loading_indicator] ? nil : ' please_wait'}", :title => options[:title]}.merge(options[:link_options]) do
368
+ link_to options[:url], {:class => "icon_button#{options[:loading_indicator] ? ' please_wait' : nil}", :title => options[:title]}.merge(options[:link_options]) do
369
369
  render_icon(options[:icon])
370
370
  end
371
371
  end
@@ -479,7 +479,7 @@ module Alchemy
479
479
  Alchemy.loadAlchemyMenuBar({
480
480
  page_id: #{@page.id},
481
481
  route: '#{Alchemy.mount_point}',
482
- locale: '#{current_user.language}'
482
+ locale: '#{current_user.language || ::I18n.default_locale}'
483
483
  });
484
484
  } catch(e) {
485
485
  if(console){console.log(e)}
@@ -18,14 +18,15 @@
18
18
  )
19
19
  ) %>');
20
20
  Alchemy.enableButton('.disabled.button');
21
- Alchemy.overlayObserver('#<%= content_dom_id(@content) %>');
22
21
  Alchemy.growl('<%= t("Successfully added content") % {:content => @content.name_for_label} %>')
23
22
 
24
23
  <% end %>
25
24
 
26
25
  <% if @content.essence_type == "Alchemy::EssencePicture" %>
27
26
 
27
+ <% if @content.ingredient %>
28
28
  $('#picture_to_assign_<%= @content.ingredient.id %> a').attr('href', '#').off('click');
29
+ <% end %>
29
30
 
30
31
  <% if @contents_of_this_type.length > 1 %>
31
32
  $('#element_<%= @element.id %>_contents .essence_picture_editor').addClass('dragable_picture');
@@ -50,5 +51,6 @@
50
51
  Alchemy.reloadPreview();
51
52
  Alchemy.closeCurrentWindow();
52
53
  Alchemy.SelectBox("#element_<%= @element.id %>");
54
+ Alchemy.overlayObserver('#<%= content_dom_id(@content) %>');
53
55
 
54
56
  })()
@@ -1,6 +1,6 @@
1
1
  module Alchemy
2
2
 
3
- VERSION = "2.3.0"
3
+ VERSION = "2.3.1"
4
4
 
5
5
  def self.version
6
6
  VERSION
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.3.0
4
+ version: 2.3.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2012-09-12 00:00:00.000000000 Z
15
+ date: 2012-11-19 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rails
@@ -1094,7 +1094,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1094
1094
  version: '0'
1095
1095
  segments:
1096
1096
  - 0
1097
- hash: -4162011237072179792
1097
+ hash: -2692259618496397345
1098
1098
  requirements:
1099
1099
  - ImageMagick (libmagick), v6.6 or greater.
1100
1100
  rubyforge_project: