mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 03:40:37 +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:
@@ -1164,7 +1164,7 @@ class media_admin_ui extends e_admin_ui
|
|||||||
if($this->getQuery('bbcode') != 'video' && $this->getQuery('bbcode') != 'glyph')
|
if($this->getQuery('bbcode') != 'video' && $this->getQuery('bbcode') != 'glyph')
|
||||||
{
|
{
|
||||||
$text .= "<div class='tab-pane active' id='core-media-select'>
|
$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);
|
$text .= $this->imageTab($type,$options);
|
||||||
|
|
||||||
|
@@ -622,6 +622,8 @@ class e_media
|
|||||||
else {
|
else {
|
||||||
$option = $att;
|
$option = $att;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$tp = e107::getParser();
|
||||||
|
|
||||||
$frm = varset($option['from']) ? $option['from'] : 0;
|
$frm = varset($option['from']) ? $option['from'] : 0;
|
||||||
$limit = varset($option['limit']) ? $option['limit'] : 20;
|
$limit = varset($option['limit']) ? $option['limit'] : 20;
|
||||||
@@ -629,25 +631,34 @@ class e_media
|
|||||||
$bbcode = varset($option['bbcode']) ? $option['bbcode'] : null;
|
$bbcode = varset($option['bbcode']) ? $option['bbcode'] : null;
|
||||||
$navMode = varset($option['nav']) ? TRUE : FALSE;
|
$navMode = varset($option['nav']) ? TRUE : FALSE;
|
||||||
$search = varset($option['search']) ? $option['search'] : null;
|
$search = varset($option['search']) ? $option['search'] : null;
|
||||||
|
$prevId = $tagid."_prev"; // ID of image in Form.
|
||||||
|
|
||||||
if($category !='_icon')
|
if($category !='_icon')
|
||||||
{
|
{
|
||||||
$cat = ($category) ? $category."+" : ""; // the '+' loads category '_common' as well as the chosen category.
|
$cat = ($category) ? $category."+" : ""; // the '+' loads category '_common' as well as the chosen category.
|
||||||
$images = $this->getImages($cat,$frm,$limit,$search);
|
$images = $this->getImages($cat,$frm,$limit,$search);
|
||||||
$class = "media-select-image";
|
$class = "media-select-image";
|
||||||
|
$classN = "media-select-image-none";
|
||||||
$w = 120;
|
$w = 120;
|
||||||
$h = 100;
|
$h = 100;
|
||||||
$total = $this->countImages($cat,$search);
|
$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
|
else // Icons
|
||||||
{
|
{
|
||||||
$cat = "";
|
$cat = "";
|
||||||
$images = $this->getIcons($cat,0,200);
|
$images = $this->getIcons($cat,0,200);
|
||||||
$class = "media-select-icon";
|
$class = "media-select-icon";
|
||||||
|
$classN = "media-select-icon-none";
|
||||||
$w = 64;
|
$w = 64;
|
||||||
$h = 64;
|
$h = 64;
|
||||||
$total = 500;
|
$total = 500;
|
||||||
$total = $this->countImages("_icon_16|_icon_32|_icon_48|_icon_64",$search);
|
$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
|
// $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.
|
// $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.
|
$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.
|
$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.
|
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';
|
// TODO LAN.
|
||||||
return false;";
|
$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>
|
||||||
$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>
|
|
||||||
</a>";
|
</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -149,7 +149,7 @@ if((e107::wysiwyg() === true && check_class($pref['post_html'])) || strpos(e_SEL
|
|||||||
|
|
||||||
$('.e-dialog-close').click(function(){
|
$('.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; }
|
.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(){
|
$(document).on("click", ".e-dialog-close", function(){
|
||||||
parent.$('.modal').modal('hide');
|
parent.$('.modal').modal('hide');
|
||||||
$('.modal').modal('hide');
|
$('.modal').modal('hide');
|
||||||
|
parent.$('[data-dismiss=modal]').trigger({ type: 'click' });
|
||||||
|
|
||||||
// $('#modal').modal('hide');
|
// $('#modal').modal('hide');
|
||||||
// parent.$.colorbox.close()
|
// parent.$.colorbox.close()
|
||||||
|
Reference in New Issue
Block a user