1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 20:58:30 +01:00

Media-Manager thumbnail scaling

This commit is contained in:
Cameron 2013-03-24 05:34:06 -07:00
parent 8d6d54a38f
commit 811a5a1b26
2 changed files with 16 additions and 5 deletions

View File

@ -569,7 +569,7 @@ class e_media
$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. $prevId = $tagid."_prev"; // ID of image in Form.
$thumbAtt = 'aw=120&ah=100'; // Thumbnail of the Media-Manager Preview. $thumbAtt = 'aw=120&ah=120'; // Thumbnail of the Media-Manager Preview.
// EXAMPLE of FILTER GUI. // EXAMPLE of FILTER GUI.
@ -606,7 +606,7 @@ class e_media
parent.document.getElementById('".$prevId."').src = '".e_IMAGE_ABS."generic/blank.gif'; parent.document.getElementById('".$prevId."').src = '".e_IMAGE_ABS."generic/blank.gif';
return false;"; return false;";
$text .= "<a class='{$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}\" > $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> <div style='text-align:center;position: relative; top: 30%'>No image</div>
</a>"; </a>";
} }
@ -678,7 +678,7 @@ class e_media
$img_url = ($cat !='_icon') ? e107::getParser()->thumbUrl($im['media_url'], $thumbAtt) : $media_path; $img_url = ($cat !='_icon') ? e107::getParser()->thumbUrl($im['media_url'], $thumbAtt) : $media_path;
$text .= "<a data-toggle='context' class='{$class} e-tip' data-id='{$im['media_id']}' data-width='{$w}' data-height='{$h}' data-src='{$media_path}' data-bbcode='{$data_bb}' data-target='{$tagid}' data-path='{$im['media_url']}' data-preview='{$realPath}' title=\"".$diz."\" style='float:left' href='#' onclick=\"{$onclicki}\" >"; $text .= "<a data-toggle='context' class='thumbnail {$class} e-tip' data-id='{$im['media_id']}' data-width='{$w}' data-height='{$h}' data-src='{$media_path}' data-bbcode='{$data_bb}' data-target='{$tagid}' data-path='{$im['media_url']}' data-preview='{$realPath}' title=\"".$diz."\" style='float:left' href='#' onclick=\"{$onclicki}\" >";
$text .= "<img class='image-rounded' src='".$img_url."' alt=\"".$im['media_title']."\" title=\"{$diz}\" />"; $text .= "<img class='image-rounded' src='".$img_url."' alt=\"".$im['media_title']."\" title=\"{$diz}\" />";
$text .= "</a>\n\n"; $text .= "</a>\n\n";
} }

View File

@ -1,13 +1,24 @@
/* ADMIN specific styling */ /* ADMIN specific styling */
/*
a.media-select-image { margin:5px; border:1px solid rgb(102, 102, 102); width:120px; height:100px; border-radius:4px } a.media-select-image { margin:5px; border:1px solid rgb(102, 102, 102); width:120px; height:100px; border-radius:4px }
a.media-select-image:hover { border:1px solid red; } a.media-select-image:hover { border:1px solid red; }
*/
a.media-select-image,
a.media-select-none { margin:5px; text-decoration:none; width:80px; height:80px; box-shadow: 0px 1px 0px rgba(255, 255, 255, 0.1), 0px 1px 7px 0px rgba(0, 0, 0, 0.8) inset; background: none repeat scroll 0% 0% rgba(0, 0, 0, 0.3);}
@media (min-height: 500px){
a.media-select-image,
a.media-select-none { width:120px; height:120px; }
}
a.media-select-icon { text-align:center; vertical-align:middle; margin:1px; border:1px solid white; width:48px; height:48px;} a.media-select-icon { text-align:center; vertical-align:middle; margin:1px; border:1px solid white; width:48px; height:48px;}
a.media-select-icon:hover { border:1px solid red; } a.media-select-icon:hover { border:1px solid red; }
.media-select-container { padding:10px; } .media-select-container { padding:10px; }
.media-select-none { text-decoration:none; }
.media-select-active { border: 2px solid silver; } .media-select-active { border: 2px solid silver; }
.e-moving { background-color: silver; } .e-moving { background-color: silver; }