mirror of
https://github.com/e107inc/e107.git
synced 2025-04-17 02:59:28 +02:00
Media-Manager: Fix for incorrect 'empty image' size when selected. Fix for 'empty icon' when selected. Fix for media-manager close-window issue. GUI fix for 'no image' option.
This commit is contained in:
parent
524bed7a17
commit
689b4c8c77
e107_admin
e107_handlers
e107_plugins/tinymce4
e107_web/js/core
@ -1164,7 +1164,7 @@ class media_admin_ui extends e_admin_ui
|
||||
if($this->getQuery('bbcode') != 'video' && $this->getQuery('bbcode') != 'glyph')
|
||||
{
|
||||
$text .= "<div class='tab-pane active' id='core-media-select'>
|
||||
<div class='table' style='display:block'>";
|
||||
<div style='display:block;width:100%'>";
|
||||
|
||||
$text .= $this->imageTab($type,$options);
|
||||
|
||||
|
@ -622,6 +622,8 @@ class e_media
|
||||
else {
|
||||
$option = $att;
|
||||
}
|
||||
|
||||
$tp = e107::getParser();
|
||||
|
||||
$frm = varset($option['from']) ? $option['from'] : 0;
|
||||
$limit = varset($option['limit']) ? $option['limit'] : 20;
|
||||
@ -629,25 +631,34 @@ class e_media
|
||||
$bbcode = varset($option['bbcode']) ? $option['bbcode'] : null;
|
||||
$navMode = varset($option['nav']) ? TRUE : FALSE;
|
||||
$search = varset($option['search']) ? $option['search'] : null;
|
||||
$prevId = $tagid."_prev"; // ID of image in Form.
|
||||
|
||||
if($category !='_icon')
|
||||
{
|
||||
$cat = ($category) ? $category."+" : ""; // the '+' loads category '_common' as well as the chosen category.
|
||||
$images = $this->getImages($cat,$frm,$limit,$search);
|
||||
$class = "media-select-image";
|
||||
$classN = "media-select-image-none";
|
||||
$w = 120;
|
||||
$h = 100;
|
||||
$total = $this->countImages($cat,$search);
|
||||
$onclick_clear = "parent.document.getElementById('{$tagid}').value = '';
|
||||
parent.document.getElementById('".$prevId."').src = '".e_IMAGE_ABS."generic/nomedia.png';
|
||||
return false;";
|
||||
}
|
||||
else // Icons
|
||||
{
|
||||
$cat = "";
|
||||
$images = $this->getIcons($cat,0,200);
|
||||
$class = "media-select-icon";
|
||||
$classN = "media-select-icon-none";
|
||||
$w = 64;
|
||||
$h = 64;
|
||||
$total = 500;
|
||||
$total = $this->countImages("_icon_16|_icon_32|_icon_48|_icon_64",$search);
|
||||
$onclick_clear = "parent.document.getElementById('{$tagid}').value = '';
|
||||
parent.document.getElementById('".$prevId."').innerHTML= '';
|
||||
return false;";
|
||||
// $total = $this->countIcons($cat); //TODO
|
||||
}
|
||||
|
||||
@ -656,7 +667,7 @@ class e_media
|
||||
// $total_images = $this->getImages($cat); // for use by next/prev in filter at some point.
|
||||
|
||||
$prevAtt = '&aw='.vartrue($option['w'],$w); // .'&ah=100'; // Image Parsed back to Form as PREVIEW image.
|
||||
$prevId = $tagid."_prev"; // ID of image in Form.
|
||||
|
||||
$thumbAtt = 'aw=120&ah=120'; // Thumbnail of the Media-Manager Preview.
|
||||
|
||||
|
||||
@ -692,12 +703,10 @@ class e_media
|
||||
|
||||
if($bbcode == null) // e107 Media Manager - new-image mode.
|
||||
{
|
||||
$onclick_clear = "parent.document.getElementById('{$tagid}').value = '';
|
||||
parent.document.getElementById('".$prevId."').src = '".e_IMAGE_ABS."generic/blank.gif';
|
||||
return false;";
|
||||
|
||||
$text .= "<a class='thumbnail {$class} media-select-none e-dialog-close' data-src='".varset($im['media_url'])."' style='vertical-align:middle;display:block;float:left;' href='#' onclick=\"{$onclick_clear}\" >
|
||||
<div style='text-align:center;position: relative; top: 30%'>No image</div>
|
||||
|
||||
// TODO LAN.
|
||||
$text .= "<a title='No Image' class='e-tip thumbnail {$class} ".$classN." media-select-none e-dialog-close' data-src='".varset($im['media_url'])."' style='vertical-align:middle;display:block;float:left;' href='#' onclick=\"{$onclick_clear}\" >
|
||||
<span>".$tp->toGlyph('fa-ban')."</span>
|
||||
</a>";
|
||||
}
|
||||
|
||||
|
@ -149,7 +149,7 @@ if((e107::wysiwyg() === true && check_class($pref['post_html'])) || strpos(e_SEL
|
||||
|
||||
$('.e-dialog-close').click(function(){
|
||||
|
||||
top.tinymce.activeEditor.windowManager.close();
|
||||
// top.tinymce.activeEditor.windowManager.close();
|
||||
|
||||
});
|
||||
|
||||
|
@ -21,13 +21,23 @@ a.media-select-icon:hover { border:1px solid red; }
|
||||
|
||||
.media-select-active { opacity: .5; }
|
||||
|
||||
.e-moving { background-color: silver; }
|
||||
.e-moving { background-color: silver; }
|
||||
|
||||
legend { display: none; }
|
||||
.chzn-choices { width: 350px; }
|
||||
.e-autocomplete { display: none }
|
||||
.e-expandit-container { margin-top:10px }
|
||||
|
||||
input.helpbox { display:none; } /* legacy BBcode helper box - deprecated and hidden if found in v2.x */
|
||||
|
||||
a.media-select-none { text-align:center; text-decoration: none }
|
||||
a.media-select-image-none span { font-size:50px }
|
||||
a.media-select-icon-none span { font-size:30px }
|
||||
|
||||
|
||||
@media (min-height: 500px){
|
||||
a.media-select-image-none span { font-size:80px }
|
||||
}
|
||||
|
||||
legend { display: none; }
|
||||
.chzn-choices { width: 350px; }
|
||||
.e-autocomplete { display: none }
|
||||
.e-expandit-container { margin-top:10px }
|
||||
|
||||
input.helpbox { display:none; } /* legacy BBcode helper box - deprecated and hidden if found in v2.x */
|
||||
|
||||
*/
|
@ -993,7 +993,7 @@ $(document).ready(function()
|
||||
$(document).on("click", ".e-dialog-close", function(){
|
||||
parent.$('.modal').modal('hide');
|
||||
$('.modal').modal('hide');
|
||||
|
||||
parent.$('[data-dismiss=modal]').trigger({ type: 'click' });
|
||||
|
||||
// $('#modal').modal('hide');
|
||||
// parent.$.colorbox.close()
|
||||
|
Loading…
x
Reference in New Issue
Block a user