spec/dummy/tmp/cache/assets/D5A/AA0/sprockets%2F91ff8da99687b4b2f344def27538e18c in locomotivecms-search-0.2.8 vs spec/dummy/tmp/cache/assets/D5A/AA0/sprockets%2F91ff8da99687b4b2f344def27538e18c in locomotivecms-search-0.3.0

- old
+ new

@@ -1,9 +1,9 @@ -o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1384093243.996703: @value"—{I" +o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1396022040.945083: @value"p{I" class:ETI"ProcessedAsset;FI"logical_path;TI"9locomotive/views/content_entries/_popup_form_view.js;FI" pathname;TI"/Users/didier/Documents/LocomotiveCMS/engine/app/assets/javascripts/locomotive/views/content_entries/_popup_form_view.js.coffee;FI"content_type;TI"application/javascript;TI" -mtime;TI"2013-06-26T01:39:07+02:00;TI" length;Ti]I" digest;TI"%36866dae95059eb865333d21ecdba716;FI" source;TI"](function() { - var _base, _ref, +mtime;TI"2013-11-30T15:16:18+01:00;TI" length;Ti6I" digest;TI"%1c109ee9752c8b123980b42d7aaa80c8;FI" source;TI"6(function() { + var _base, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; (_base = Locomotive.Views).ContentEntries || (_base.ContentEntries = {}); @@ -11,12 +11,11 @@ Locomotive.Views.ContentEntries.PopupFormView = (function(_super) { __extends(PopupFormView, _super); function PopupFormView() { this.reset = __bind(this.reset, this); - _ref = PopupFormView.__super__.constructor.apply(this, arguments); - return _ref; + return PopupFormView.__super__.constructor.apply(this, arguments); } PopupFormView.prototype.initialize = function() { this.create_dialog(); return PopupFormView.__super__.initialize.call(this); @@ -26,55 +25,60 @@ PopupFormView.__super__.render.call(this); return this; }; PopupFormView.prototype.save = function(event) { - var _this = this; + this.touch_richtexteditor(); return this.save_in_ajax(event, { headers: { 'X-Flash': true }, - on_success: function(response, xhr) { - var entry; - entry = new Locomotive.Models.ContentEntry(JSON.parse(xhr.responseText)); - _this.options.parent_view.insert_or_update_entry(entry); - return _this.close(); - } + on_success: (function(_this) { + return function(response, xhr) { + var entry; + entry = new Locomotive.Models.ContentEntry(JSON.parse(xhr.responseText)); + _this.options.parent_view.insert_or_update_entry(entry); + return _this.close(); + }; + })(this) }); }; PopupFormView.prototype.create_dialog = function() { - var _this = this; return this.dialog = $(this.el).dialog({ autoOpen: false, modal: true, dialogClass: 'content-entry-popup', zIndex: window.application_view.unique_dialog_zindex(), width: 770, - create: function(event, ui) { - var actions; - $(_this.el).prev().find('.ui-dialog-title').html(_this.$('h2').html()); - _this.$('h2').remove(); - actions = _this.$('.dialog-actions').appendTo($(_this.el).parent()).addClass('ui-dialog-buttonpane ui-widget-content ui-helper-clearfix'); - actions.find('#close-link').click(function(event) { - return _this.close(event); - }); - return actions.find('input[type=submit]').click(function(event) { - var $buttons_pane, $form; - $form = _this.$el.find('form'); - $buttons_pane = $(event.target).parent(); - $.rails.disableFormElements($buttons_pane); - return $form.trigger('submit').bind('ajax:complete', function() { - return $.rails.enableFormElements($buttons_pane); + create: (function(_this) { + return function(event, ui) { + var actions; + $(_this.el).prev().find('.ui-dialog-title').html(_this.$('h2').html()); + _this.$('h2').remove(); + actions = _this.$('.dialog-actions').appendTo($(_this.el).parent()).addClass('ui-dialog-buttonpane ui-widget-content ui-helper-clearfix'); + actions.find('#close-link').click(function(event) { + return _this.close(event); }); - }); - }, - open: function(event, ui, extra) { - return $(_this.el).dialog('overlayEl').bind('click', function() { - return _this.close(); - }); - } + return actions.find('input[type=submit]').click(function(event) { + var $buttons_pane, $form; + $form = _this.$el.find('form'); + $buttons_pane = $(event.target).parent(); + $.rails.disableFormElements($buttons_pane); + return $form.trigger('submit').bind('ajax:complete', function() { + return $.rails.enableFormElements($buttons_pane); + }); + }); + }; + })(this), + open: (function(_this) { + return function(event, ui, extra) { + return $(_this.el).dialog('overlayEl').bind('click', function() { + return _this.close(); + }); + }; + })(this) }); }; PopupFormView.prototype.open = function() { var parent_el; @@ -102,10 +106,11 @@ PopupFormView.prototype.center = function() { return $(this.el).dialog('option', 'position', 'center'); }; PopupFormView.prototype.reset = function(entry) { + this.model.reset_attributes(); this.model.set(entry.attributes); if (entry.isNew()) { this.model.id = null; return PopupFormView.__super__.reset.call(this); } else { @@ -117,17 +122,25 @@ PopupFormView.prototype.enable_has_many_fields = function() {}; PopupFormView.prototype.enable_many_to_many_fields = function() {}; + PopupFormView.prototype.touch_richtexteditor = function() { + return _.each(this.$('li.input.rte textarea.html'), (function(_this) { + return function(textarea) { + return $(textarea).tinymce().save(); + }; + })(this)); + }; + PopupFormView.prototype.tinyMCE_settings = function() { return window.Locomotive.tinyMCE.popupSettings; }; return PopupFormView; })(Locomotive.Views.ContentEntries.FormView); }).call(this); -;TI"dependency_digest;TI"%4208cf2e185309a917b282c7035f8fd1;FI"required_paths;T[I"t/Users/didier/Documents/LocomotiveCMS/engine/app/assets/javascripts/locomotive/views/shared/form_view.js.coffee;FI"/Users/didier/Documents/LocomotiveCMS/engine/app/assets/javascripts/locomotive/views/content_entries/_popup_form_view.js.coffee;FI"dependency_paths;T[{I" path;TI"/Users/didier/Documents/LocomotiveCMS/engine/app/assets/javascripts/locomotive/views/content_entries/_popup_form_view.js.coffee;FI" -mtime;TI"2013-06-26T01:39:07+02:00;TI" digest;TI"%b05a4beedc571f28ba9e9f20e05639e6;F{I" path;TI"t/Users/didier/Documents/LocomotiveCMS/engine/app/assets/javascripts/locomotive/views/shared/form_view.js.coffee;FI" +;TI"dependency_digest;TI"%f0967fd1fab03284c97a1b96084313fb;FI"required_paths;T[I"t/Users/didier/Documents/LocomotiveCMS/engine/app/assets/javascripts/locomotive/views/shared/form_view.js.coffee;FI"/Users/didier/Documents/LocomotiveCMS/engine/app/assets/javascripts/locomotive/views/content_entries/_popup_form_view.js.coffee;FI"dependency_paths;T[{I" path;TI"/Users/didier/Documents/LocomotiveCMS/engine/app/assets/javascripts/locomotive/views/content_entries/_popup_form_view.js.coffee;FI" +mtime;TI"2013-11-30T15:16:18+01:00;TI" digest;TI"%61c03183c90f5cbed637915f1acf6691;F{I" path;TI"t/Users/didier/Documents/LocomotiveCMS/engine/app/assets/javascripts/locomotive/views/shared/form_view.js.coffee;FI" mtime;TI"2013-10-25T15:32:29+02:00;TI" digest;TI"%530d8faa1e59d267e84e809bd2f80524;FI" _version;TI"%ffd318ca8b794f42f5029101c2cf5d91;F \ No newline at end of file