]> git.mxchange.org Git - friendica.git/commitdiff
Issue 11880: Provide "alt" description from uploaded file
authorMichael <heluecht@pirati.ca>
Mon, 3 Oct 2022 21:23:04 +0000 (21:23 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 3 Oct 2022 21:23:04 +0000 (21:23 +0000)
mod/fbrowser.php
view/js/filebrowser.js
view/templates/filebrowser.tpl
view/theme/frio/js/filebrowser.js
view/theme/frio/templates/filebrowser.tpl

index 60b290850a579e175630a423b01cfa2fcb830369..2f1181a8564b4a250700f28079e94a582d7e4110 100644 (file)
@@ -103,7 +103,8 @@ function fbrowser_content(App $a)
                                return [
                                        DI::baseUrl() . '/photos/' . $a->getLoggedInUserNickname() . '/image/' . $rr['resource-id'],
                                        $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);
index d35e4866fa5a9fceab5ef515261e07633dcfbd74..24b4d904fde383a5c2f541ada8bbca514fdfac33 100644 (file)
@@ -85,7 +85,7 @@ var FileBrowser = {
 
                        var embed = "";
                        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") {
                                // attachment links are "baseurl/attach/id"; we need id
index 7afcad3903baeb6de2b4e6e5394b577221a42b3d..8082355d1d9d6ccb67296957530cdf7c5a70c882 100644 (file)
@@ -32,7 +32,7 @@
        <div class="list">
                {{foreach $files as $f}}
                <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}}">
                                <p>{{$f.1}}</p>
                        </a>
index bebb27907820b1687e2b28803c4e19b7aea03506..359c6636eb243fcda4cc9375fc26d4624c34d0f2 100644 (file)
@@ -116,7 +116,7 @@ var FileBrowser = {
 
                        var embed = "";
                        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") {
                                // attachment links are "baseurl/attach/id"; we need id
index e8c03cf386872fe0b7250c6383cdd9e28dbda08b..13c47904873648907c56abe3a71e6124c00c4922 100644 (file)
@@ -42,7 +42,7 @@
                                <div class="fbrowser-content-container">
                                        {{foreach $files as $f}}
                                        <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}}">
                                                        <p>{{$f.1}}</p>
                                                </a>