From 1b1c2c0032f39b92588ddfe15b46a2e942b1b16d Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Thu, 17 May 2012 20:19:31 +0800 Subject: [PATCH 1/3] =?UTF-8?q?image=20title=20and=20description=20callbac?= =?UTF-8?q?k=20fixed=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/assets/javascripts/tinymce_orbit.js.erb | 6 ++++-- app/views/admin/assets/create.js.erb | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/tinymce_orbit.js.erb b/app/assets/javascripts/tinymce_orbit.js.erb index 51f86b6f..f12bfa3d 100644 --- a/app/assets/javascripts/tinymce_orbit.js.erb +++ b/app/assets/javascripts/tinymce_orbit.js.erb @@ -62,14 +62,16 @@ function myFileBrowser(field_name, url, type, win) { tinyMCE.activeEditor.windowManager.open({ file : cmsURL, title : 'File Browser', - width : 850, // Your dimensions may differ - toy around with them! - height : 455, + width : 530, // Your dimensions may differ - toy around with them! + height : 350, resizable : "no", inline : "no", // This parameter only has an effect if you use the inlinepopups plugin! close_previous : "no" }, { window : win, input : field_name, + alt : "alt", + title : "title" }); return false; } diff --git a/app/views/admin/assets/create.js.erb b/app/views/admin/assets/create.js.erb index 4e44a870..f307f6f9 100644 --- a/app/views/admin/assets/create.js.erb +++ b/app/views/admin/assets/create.js.erb @@ -3,12 +3,13 @@ // 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(' + + + + + + +<% end -%> diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/realtime_preview.js.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/realtime_preview.js.erb new file mode 100644 index 00000000..e65e4f9d --- /dev/null +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/realtime_preview.js.erb @@ -0,0 +1,2 @@ +$('#show_preview').html("<%= escape_javascript(render(:partial => 'modal_preview',:locals => {:bulletin => @bulletin})) %>"); +var start_modal_with_id = "bulletin-<%=@bulletin.id%>" \ No newline at end of file diff --git a/vendor/built_in_modules/page_content/app/views/panel/page_content/back_end/page_contexts/_modal_preview.html.erb b/vendor/built_in_modules/page_content/app/views/panel/page_content/back_end/page_contexts/_modal_preview.html.erb new file mode 100644 index 00000000..49414cfd --- /dev/null +++ b/vendor/built_in_modules/page_content/app/views/panel/page_content/back_end/page_contexts/_modal_preview.html.erb @@ -0,0 +1,55 @@ + <% if page_context -%> + + + + + +<% end -%> diff --git a/vendor/built_in_modules/page_content/app/views/panel/page_content/back_end/page_contexts/realtime_preview.js.erb b/vendor/built_in_modules/page_content/app/views/panel/page_content/back_end/page_contexts/realtime_preview.js.erb new file mode 100644 index 00000000..2d7df9ff --- /dev/null +++ b/vendor/built_in_modules/page_content/app/views/panel/page_content/back_end/page_contexts/realtime_preview.js.erb @@ -0,0 +1,2 @@ +$('#show_preview').html("<%= escape_javascript(render(:partial => 'modal_preview',:locals => {:page_context => @page_context})) %>"); +var start_modal_with_id = "page_context-<%=@page_context.id%>" \ No newline at end of file