diff --git a/app/assets/javascripts/ajax_form.js b/app/assets/javascripts/ajax_form.js
index b683f43d..d9b5abfe 100644
--- a/app/assets/javascripts/ajax_form.js
+++ b/app/assets/javascripts/ajax_form.js
@@ -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;
- })
-})
+});
\ No newline at end of file
diff --git a/app/assets/javascripts/tinymce_orbit.js.erb b/app/assets/javascripts/tinymce_orbit.js.erb
index 0ee5e180..1a9d063d 100644
--- a/app/assets/javascripts/tinymce_orbit.js.erb
+++ b/app/assets/javascripts/tinymce_orbit.js.erb
@@ -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;
}
diff --git a/app/controllers/admin/assets_controller.rb b/app/controllers/admin/assets_controller.rb
index c9f0c009..89fd41b7 100644
--- a/app/controllers/admin/assets_controller.rb
+++ b/app/controllers/admin/assets_controller.rb
@@ -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|
diff --git a/app/views/admin/assets/_new.html.erb b/app/views/admin/assets/_new.html.erb
index 85d3c2e5..5d770a2e 100644
--- a/app/views/admin/assets/_new.html.erb
+++ b/app/views/admin/assets/_new.html.erb
@@ -1,16 +1,11 @@
<%= t('admin.new_asset') %>
- <%= 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 } %>
<% end %>
diff --git a/app/assets/javascripts/tiny_mce_popup.js b/app/views/admin/assets/create.js.erb
similarity index 90%
rename from app/assets/javascripts/tiny_mce_popup.js
rename to app/views/admin/assets/create.js.erb
index f859d24e..38c7992c 100644
--- a/app/assets/javascripts/tiny_mce_popup.js
+++ b/app/views/admin/assets/create.js.erb
@@ -2,4 +2,18 @@
// Uncomment and change this document.domain value if you are loading the script cross subdomains
// document.domain = 'moxiecode.com';
-var tinymce=null,tinyMCEPopup,tinyMCE;tinyMCEPopup={init:function(){var b=this,a,c;a=b.getWin();tinymce=a.tinymce;tinyMCE=a.tinyMCE;b.editor=tinymce.EditorManager.activeEditor;b.params=b.editor.windowManager.params;b.features=b.editor.windowManager.features;b.dom=b.editor.windowManager.createInstance("tinymce.dom.DOMUtils",document);if(b.features.popup_css!==false){b.dom.loadCSS(b.features.popup_css||b.editor.settings.popup_css)}b.listeners=[];b.onInit={add:function(e,d){b.listeners.push({func:e,scope:d})}};b.isWindow=!b.getWindowArg("mce_inline");b.id=b.getWindowArg("mce_window_id");b.editor.windowManager.onOpen.dispatch(b.editor.windowManager,window)},getWin:function(){return(!window.frameElement&&window.dialogArguments)||opener||parent||top},getWindowArg:function(c,b){var a=this.params[c];return tinymce.is(a)?a:b},getParam:function(b,a){return this.editor.getParam(b,a)},getLang:function(b,a){return this.editor.getLang(b,a)},execCommand:function(d,c,e,b){b=b||{};b.skip_focus=1;this.restoreSelection();return this.editor.execCommand(d,c,e,b)},resizeToInnerSize:function(){var a=this;setTimeout(function(){var b=a.dom.getViewPort(window);a.editor.windowManager.resizeBy(a.getWindowArg("mce_width")-b.w,a.getWindowArg("mce_height")-b.h,a.id||window)},10)},executeOnLoad:function(s){this.onInit.add(function(){eval(s)})},storeSelection:function(){this.editor.windowManager.bookmark=tinyMCEPopup.editor.selection.getBookmark(1)},restoreSelection:function(){var a=tinyMCEPopup;if(!a.isWindow&&tinymce.isIE){a.editor.selection.moveToBookmark(a.editor.windowManager.bookmark)}},requireLangPack:function(){var b=this,a=b.getWindowArg("plugin_url")||b.getWindowArg("theme_url");if(a&&b.editor.settings.language&&b.features.translate_i18n!==false&&b.editor.settings.language_load!==false){a+="/langs/"+b.editor.settings.language+"_dlg.js";if(!tinymce.ScriptLoader.isDone(a)){document.write('