app/helpers/alchemy/admin/pages_helper.rb in alchemy_cms-2.5.3.1 vs app/helpers/alchemy/admin/pages_helper.rb in alchemy_cms-2.6.0.rc5

- old
+ new

@@ -17,16 +17,18 @@ jQuery(function($) { if (typeof(Alchemy) !== 'object') { Alchemy = {}; }; Alchemy.Tinymce = { init : function(callback) { var init = { #{init} }; + var spinner = Alchemy.Spinner.small(); + $('.tinymce_container').prepend(spinner.spin().el); init.mode = 'specific_textareas'; init.editor_selector = 'default_tinymce'; init.plugins = '#{Alchemy::Tinymce.plugins.join(',')}'; init.language = '#{::I18n.locale.to_s.split('-')[0].downcase }'; init.init_instance_callback = function(inst) { - $('#' + inst.editorId).prev('.essence_richtext_loader').hide(); + $('#' + inst.editorId).prev('.spinner').remove(); } if (callback) init.oninit = callback; #{setup} tinymce.init(init); @@ -65,12 +67,13 @@ init.editor_selector = /custom_tinymce #{Regexp.escape(content['name'])}/; init.plugins = '#{Alchemy::Tinymce.plugins.join(',')}'; init.language = '#{::I18n.locale.to_s.split('-')[0].downcase }'; init.init_instance_callback = function(inst) { var $this = $('#' + inst.editorId); - $this.prev('.essence_richtext_loader').hide(); + var parent = $this.parents('.element_editor'); + parent.find('.spinner').remove(); inst.onChange.add(function (ed, l) { - Alchemy.setElementDirty($this.parents('.element_editor')); + Alchemy.setElementDirty(parent); }); } tinymce.init(init); });" end