From 11c4f98efca7e64601973db713a10116a0f5996a Mon Sep 17 00:00:00 2001 From: did Date: Wed, 6 Jun 2012 01:34:37 -0700 Subject: [PATCH] asset picker was not accessible from the Aloha toolbar (fixed now) --- .../locomotive_media/lib/locomotive_media-plugin.js | 2 +- .../views/inline_editor/application_view.js.coffee | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/aloha/plugins/custom/locomotive_media/lib/locomotive_media-plugin.js b/app/assets/javascripts/aloha/plugins/custom/locomotive_media/lib/locomotive_media-plugin.js index 0edfc470..5c98eb33 100644 --- a/app/assets/javascripts/aloha/plugins/custom/locomotive_media/lib/locomotive_media-plugin.js +++ b/app/assets/javascripts/aloha/plugins/custom/locomotive_media/lib/locomotive_media-plugin.js @@ -25,7 +25,7 @@ define( picker.close(); } - picker.render() + picker.fetch_assets(); }, /** diff --git a/app/assets/javascripts/locomotive/views/inline_editor/application_view.js.coffee b/app/assets/javascripts/locomotive/views/inline_editor/application_view.js.coffee index 2e3cb346..cf50a063 100644 --- a/app/assets/javascripts/locomotive/views/inline_editor/application_view.js.coffee +++ b/app/assets/javascripts/locomotive/views/inline_editor/application_view.js.coffee @@ -24,6 +24,8 @@ class Locomotive.Views.InlineEditor.ApplicationView extends Backbone.View @toolbar_view.render() + @content_assets_picker_view.render() + enable_iframe_autoheight: -> iframe = @iframe @@ -89,6 +91,13 @@ class Locomotive.Views.InlineEditor.ApplicationView extends Backbone.View toolbar_view.show_status 'loading' window.history.pushState('Object', 'Title', link.attr('href').replace('_edit', '_admin')) + unique_dialog_zindex: -> + # returns the number of jQuery UI modals created in order to set a valid zIndex for each of them. + # Each modal window should have a different zIndex, otherwise there will be conflicts between them. + window.Locomotive.jQueryModals ||= 0 + + 1050 + window.Locomotive.jQueryModals++ + _$: (selector) -> $(selector, @iframe[0].contentWindow.document)