Merge pull request #11960 from annando/issue-11880
Issue 11880: Provide "alt" description from uploaded file
This commit is contained in:
commit
fa3f5d8d9c
5 changed files with 6 additions and 5 deletions
|
@ -103,7 +103,8 @@ function fbrowser_content(App $a)
|
||||||
return [
|
return [
|
||||||
DI::baseUrl() . '/photos/' . $a->getLoggedInUserNickname() . '/image/' . $rr['resource-id'],
|
DI::baseUrl() . '/photos/' . $a->getLoggedInUserNickname() . '/image/' . $rr['resource-id'],
|
||||||
$filename_e,
|
$filename_e,
|
||||||
DI::baseUrl() . '/photo/' . $rr['resource-id'] . '-' . $scale . '.'. $ext
|
DI::baseUrl() . '/photo/' . $rr['resource-id'] . '-' . $scale . '.'. $ext,
|
||||||
|
$rr['desc']
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
$files = array_map("_map_files1", $r);
|
$files = array_map("_map_files1", $r);
|
||||||
|
|
|
@ -85,7 +85,7 @@ var FileBrowser = {
|
||||||
|
|
||||||
var embed = "";
|
var embed = "";
|
||||||
if (FileBrowser.type == "image") {
|
if (FileBrowser.type == "image") {
|
||||||
embed = "[url="+this.dataset.link+"][img="+this.dataset.img+"][/img][/url]";
|
embed = "[url="+this.dataset.link+"][img="+this.dataset.img+"]"+this.dataset.alt+"[/img][/url]";
|
||||||
}
|
}
|
||||||
if (FileBrowser.type=="file") {
|
if (FileBrowser.type=="file") {
|
||||||
// attachment links are "baseurl/attach/id"; we need id
|
// attachment links are "baseurl/attach/id"; we need id
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
<div class="list">
|
<div class="list">
|
||||||
{{foreach $files as $f}}
|
{{foreach $files as $f}}
|
||||||
<div class="photo-album-image-wrapper">
|
<div class="photo-album-image-wrapper">
|
||||||
<a href="#" class="photo-album-photo-link" data-link="{{$f.0}}" data-filename="{{$f.1}}" data-img="{{$f.2}}">
|
<a href="#" class="photo-album-photo-link" data-link="{{$f.0}}" data-filename="{{$f.1}}" data-img="{{$f.2}}" data-alt="{{$f.3}}>
|
||||||
<img src="{{$f.2}}">
|
<img src="{{$f.2}}">
|
||||||
<p>{{$f.1}}</p>
|
<p>{{$f.1}}</p>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -116,7 +116,7 @@ var FileBrowser = {
|
||||||
|
|
||||||
var embed = "";
|
var embed = "";
|
||||||
if (FileBrowser.type === "image") {
|
if (FileBrowser.type === "image") {
|
||||||
embed = "[url=" + this.dataset.link + "][img=" + this.dataset.img + "][/img][/url]";
|
embed = "[url=" + this.dataset.link + "][img=" + this.dataset.img + "]" + this.dataset.alt + "[/img][/url]";
|
||||||
}
|
}
|
||||||
if (FileBrowser.type === "file") {
|
if (FileBrowser.type === "file") {
|
||||||
// attachment links are "baseurl/attach/id"; we need id
|
// attachment links are "baseurl/attach/id"; we need id
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
<div class="fbrowser-content-container">
|
<div class="fbrowser-content-container">
|
||||||
{{foreach $files as $f}}
|
{{foreach $files as $f}}
|
||||||
<div class="photo-album-image-wrapper">
|
<div class="photo-album-image-wrapper">
|
||||||
<a href="#" class="photo-album-photo-link" data-link="{{$f.0}}" data-filename="{{$f.1}}" data-img="{{$f.2}}">
|
<a href="#" class="photo-album-photo-link" data-link="{{$f.0}}" data-filename="{{$f.1}}" data-img="{{$f.2}}" data-alt="{{$f.3}}">
|
||||||
<img src="{{$f.2}}" alt="{{$f.1}}">
|
<img src="{{$f.2}}" alt="{{$f.1}}">
|
||||||
<p>{{$f.1}}</p>
|
<p>{{$f.1}}</p>
|
||||||
</a>
|
</a>
|
||||||
|
|
Loading…
Reference in a new issue