image insertion completed..
This commit is contained in:
parent
c380c4cad0
commit
617a683d00
|
@ -4,13 +4,4 @@ $(document).on('click', '#ajax_form_submit', function(){
|
|||
o.dataType = 'script';
|
||||
}
|
||||
});
|
||||
});
|
||||
$(document).ready(function(){
|
||||
var win = parent.OWindow;
|
||||
var thatwindow = win.thiswindow;
|
||||
alert(self.id);
|
||||
$("div.button_bar input[type=submit]").click(function(){
|
||||
thatwindow.document.getElementById(win.input).value = "Soemthing";
|
||||
return false;
|
||||
})
|
||||
})
|
||||
});
|
|
@ -1,4 +1,3 @@
|
|||
var OWindow = {};
|
||||
function load_tinymce() {
|
||||
$('.tinymce_textarea').tinymce({
|
||||
|
||||
|
@ -59,10 +58,6 @@ function myFileBrowser(field_name, url, type, win) {
|
|||
// (PHP session ID is now included if there is one at all)
|
||||
cmsURL = cmsURL + "&type=" + type;
|
||||
}
|
||||
OWindow = {
|
||||
thiswindow : win,
|
||||
input : field_name
|
||||
}
|
||||
|
||||
tinyMCE.activeEditor.windowManager.open({
|
||||
file : cmsURL,
|
||||
|
@ -74,7 +69,7 @@ function myFileBrowser(field_name, url, type, win) {
|
|||
close_previous : "no"
|
||||
}, {
|
||||
window : win,
|
||||
input : field_name
|
||||
input : field_name,
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ class Admin::AssetsController < OrbitBackendController
|
|||
if @asset.save
|
||||
respond_to do |format|
|
||||
format.html { render :text => @asset.data.url }
|
||||
format.js { render 'js/remove_pop_up_and_reload_content', :locals => {:function => 'append', :id => 'tbody_assets', :value => @asset, :values => nil, :partial => 'admin/assets/asset', :locals => nil} }
|
||||
format.js {}
|
||||
end
|
||||
else
|
||||
respond_to do |format|
|
||||
|
|
|
@ -1,16 +1,11 @@
|
|||
<div id='pop_up_content' class="main2">
|
||||
<h1><%= t('admin.new_asset') %></h1>
|
||||
|
||||
<%= form_for :asset, :url => admin_assets_path, :html => {:id => (is_html ? nil : 'ajaxForm'), :multipart => true } do |f| %>
|
||||
<%= form_for :asset, :url => admin_assets_path, :html => {:id => 'ajaxForm', :multipart => true } do |f| %>
|
||||
<%= f.error_messages %>
|
||||
<%= render :partial => "form", :locals => { :f => f } %>
|
||||
<div class="button_bar">
|
||||
<% if is_html %>
|
||||
<%= link_back %>
|
||||
<%= f.submit t(:create) %>
|
||||
<% else %>
|
||||
<a id='ajax_form_submit' class="new"><%= t(:create) %></a>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
File diff suppressed because one or more lines are too long
Reference in New Issue