mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-04 01:23:32 +09:00
Fix #879 align multimedia search results to the left
This commit is contained in:
parent
73c09ce876
commit
c714c3629a
3 changed files with 6 additions and 6 deletions
|
|
@ -536,9 +536,9 @@ function _displayMultimedia(src, width, height, options) {
|
||||||
height = parseInt(height, 10);
|
height = parseInt(height, 10);
|
||||||
|
|
||||||
if(/\.(gif|jpg|jpeg|bmp|png)$/i.test(src)){
|
if(/\.(gif|jpg|jpeg|bmp|png)$/i.test(src)){
|
||||||
html = '<img src="'+src+'" width="'+width+'" height="'+height+'" />';
|
html = '<img src="'+src+'" width="'+width+'" height="'+height+'" class="thumb" />';
|
||||||
} else {
|
} else {
|
||||||
html = '<span style="display:inline-block;position:relative;background:black;width:' + width + 'px;height:' + height + 'px;border:0;margin:0;padding:0">';
|
html = '<span style="position:relative;background:black;width:' + width + 'px;height:' + height + 'px" class="thumb">';
|
||||||
html += '<img style="width:24px;height:24px;position:absolute;left:50%;top:50%;border:0;margin:-12px 0 0 -12px;padding:0" src="./common/img/play.png" alt="" />';
|
html += '<img style="width:24px;height:24px;position:absolute;left:50%;top:50%;border:0;margin:-12px 0 0 -12px;padding:0" src="./common/img/play.png" alt="" />';
|
||||||
html += '</span>';
|
html += '</span>';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -194,13 +194,13 @@ class integration_searchModel extends module
|
||||||
$thumbnail_file = sprintf('%s%dx%d.%s.jpg', $thumbnail_path, 120, 120, 'crop');
|
$thumbnail_file = sprintf('%s%dx%d.%s.jpg', $thumbnail_path, 120, 120, 'crop');
|
||||||
$thumbnail_url = Context::getRequestUri().$thumbnail_file;
|
$thumbnail_url = Context::getRequestUri().$thumbnail_file;
|
||||||
if(!file_exists($thumbnail_file)) FileHandler::createImageFile($val->uploaded_filename, $thumbnail_file, 120, 120, 'jpg', 'crop');
|
if(!file_exists($thumbnail_file)) FileHandler::createImageFile($val->uploaded_filename, $thumbnail_file, 120, 120, 'jpg', 'crop');
|
||||||
$obj->src = sprintf('<img src="%s" alt="%s" width="%d" height="%d" />', $thumbnail_url, htmlspecialchars($obj->filename, ENT_COMPAT | ENT_HTML401, 'UTF-8', false), 120, 120);
|
$obj->src = sprintf('<img src="%s" alt="%s" width="%d" height="%d" class="thumb" />', $thumbnail_url, htmlspecialchars($obj->filename, ENT_COMPAT | ENT_HTML401, 'UTF-8', false), 120, 120);
|
||||||
// Videos
|
// Videos
|
||||||
}
|
}
|
||||||
else if(preg_match('/\.(swf|flv|wmv|avi|mpg|mpeg|asx|asf|mp3)$/i', $val->source_filename))
|
else if(preg_match('/\.(swf|flv|wmv|avi|mpg|mpeg|asx|asf|mp3)$/i', $val->source_filename))
|
||||||
{
|
{
|
||||||
$obj->type = 'multimedia';
|
$obj->type = 'multimedia';
|
||||||
$obj->src = sprintf('<script>displayMultimedia("%s",120,120);</script>', $val->uploaded_filename);
|
$obj->src = sprintf('<script>displayMultimedia("%s",80,80);</script>', $val->uploaded_filename);
|
||||||
// Others
|
// Others
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,10 @@
|
||||||
<!--@if(!count($output->data))-->
|
<!--@if(!count($output->data))-->
|
||||||
<span class="noResult">{$lang->msg_no_result}</span>
|
<span class="noResult">{$lang->msg_no_result}</span>
|
||||||
<!--@else-->
|
<!--@else-->
|
||||||
<ul class="searchImageResult">
|
<ul class="searchResult">
|
||||||
<!--@foreach($output->data as $no => $image)-->
|
<!--@foreach($output->data as $no => $image)-->
|
||||||
<li>
|
<li>
|
||||||
<a href="{$image->url}">{$image->src}</a>
|
<a href="{$image->url}" onclick="window.open(this.href);return false;">{$image->src}</a>
|
||||||
<dl>
|
<dl>
|
||||||
<dt><a href="{$image->url}">{$image->filename}</a></dt>
|
<dt><a href="{$image->url}">{$image->filename}</a></dt>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue