From b1c2e030d58176a985aa80c4bae58bbfb9e494d8 Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 11 Jan 2016 20:53:05 -0800 Subject: [PATCH] Default image resize pref is now used correctly by TinyMce media-manager. Image captions may now be added to inline images. TinyMce media-manager 'cancel' button is working again. --- e107_admin/image.php | 55 ++++++++++++++----- e107_admin/newspost.php | 4 +- e107_core/bbcodes/bb_img.php | 41 ++++++++++++-- .../shortcodes/batch/news_shortcodes.php | 5 +- e107_handlers/e_parse_class.php | 4 +- e107_handlers/media_class.php | 49 ++++++++++++++--- e107_plugins/tinymce4/e_footer.php | 6 +- e107_plugins/tinymce4/plugins/e107/parser.php | 3 +- e107_web/js/core/mediaManager.js | 30 ++++++---- 9 files changed, 151 insertions(+), 46 deletions(-) diff --git a/e107_admin/image.php b/e107_admin/image.php index aa673a9fe..822dc5bae 100644 --- a/e107_admin/image.php +++ b/e107_admin/image.php @@ -1065,18 +1065,31 @@ class media_admin_ui extends e_admin_ui return ''; } - // if 'for' has no value, files are placed in /temp and not added to the db. - $text = '
+ // if 'for' has no value, files are placed in /temp and not added to the db. + $text = "

From your computer

"; + $text .= '

No HTML5 support.

'; - + $text .= '
'; $frm = e107::getForm(); - + $text .= $frm->open('upload-url-form','post'); $text .= '
'; - $text .= "
Or upload a remote image or file "; - $text .= ""; - $text .= $frm->admin_button('upload_remote_url',1,'create','Start Upload'); + $text .= "

From a remote location

"; + $text .= "
"; + $text .= ""; + + $text .= " + + + + "; + $text .= " +"; + + $text .= "
Image/File URL:".$frm->admin_button('upload_remote_url',1,'create','Start Upload')."
Caption (optional):
"; + // $text .= ; + $text .= "
"; $text .= "
\n\n"; @@ -1182,7 +1195,7 @@ class media_admin_ui extends e_admin_ui * */ - if($options['bbcode']) + if($options['bbcode']) //TODO LAN lan_image.php { $text .= "
@@ -1194,11 +1207,17 @@ class media_admin_ui extends e_admin_ui + + Caption: + + + + Dimensions: - px - X px + px   + ❌   px @@ -1230,7 +1249,7 @@ class media_admin_ui extends e_admin_ui
-
Preview
+
".LAN_PREVIEW."
@@ -1269,14 +1288,15 @@ class media_admin_ui extends e_admin_ui $text .= "
"; - // For BBCODE mode. //TODO image-float. + // For BBCODE/TinyMce mode. + // e-dialog-save if($options['bbcode'] || E107_DEBUG_LEVEL > 0) { $text .= "
-