mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-12 01:54:26 +02:00
Move Browser & Upload to own namespace
This commit is contained in:
parent
051253a745
commit
50316bbb80
20 changed files with 77 additions and 121 deletions
|
@ -84,7 +84,7 @@ const FileBrowser = {
|
|||
e.preventDefault();
|
||||
|
||||
let embed = '';
|
||||
if (FileBrowser.type === "photos") {
|
||||
if (FileBrowser.type === "photo") {
|
||||
embed = '[url=' + this.dataset.link + '][img=' + this.dataset.img + ']' + this.dataset.alt + '[/img][/url]';
|
||||
}
|
||||
if (FileBrowser.type === "attachment") {
|
||||
|
@ -99,12 +99,11 @@ const FileBrowser = {
|
|||
|
||||
});
|
||||
|
||||
if ($('#upload-photos').length)
|
||||
{
|
||||
if ($('#upload-photo').length) {
|
||||
new window.AjaxUpload(
|
||||
'upload-photos',
|
||||
'upload-photo',
|
||||
{
|
||||
action: 'profile/' + FileBrowser.nickname + '/photos/upload?response=json',
|
||||
action: 'media/photo/upload?response=json',
|
||||
name: 'userfile',
|
||||
responseType: 'json',
|
||||
onSubmit: function (file, ext) {
|
||||
|
@ -125,12 +124,11 @@ const FileBrowser = {
|
|||
);
|
||||
}
|
||||
|
||||
if ($('#upload-attachment').length)
|
||||
{
|
||||
if ($('#upload-attachment').length) {
|
||||
new window.AjaxUpload(
|
||||
'upload-attachment',
|
||||
{
|
||||
action: 'profile/' + FileBrowser.nickname + '/attachment/upload?response=json',
|
||||
action: 'media/attachment/upload?response=json',
|
||||
name: 'userfile',
|
||||
responseType: 'json',
|
||||
onSubmit: function (file, ext) {
|
||||
|
@ -148,8 +146,8 @@ const FileBrowser = {
|
|||
location.reload();
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
_getUrl: function (mode, hash, folder) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue