1
0
Fork 0

Move Browser & Upload to own namespace

This commit is contained in:
Philipp Holzer 2022-11-27 01:25:59 +01:00
commit 50316bbb80
Signed by: nupplaPhil
GPG key ID: 24A7501396EB5432
20 changed files with 77 additions and 121 deletions

View file

@ -109,7 +109,7 @@ var 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') {
@ -155,12 +155,12 @@ var FileBrowser = {
// Initialize the AjaxUpload for the upload buttons
uploadButtons: function () {
if ($('#upload-photos').length) {
if ($('#upload-photo').length) {
//AjaxUpload for photos
new window.AjaxUpload(
'upload-photos',
'upload-photo',
{
action: 'profile/' + FileBrowser.nickname + '/photos/upload?response=json&album=' + encodeURIComponent(FileBrowser.folder),
action: 'media/photo/upload?response=json&album=' + encodeURIComponent(FileBrowser.folder),
name: 'userfile',
responseType: 'json',
onSubmit: function (file, ext) {
@ -187,7 +187,7 @@ var FileBrowser = {
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) {
@ -236,7 +236,7 @@ var FileBrowser = {
// Initialize justified Gallery
initGallery: function () {
$('.fbrowser.photos .fbrowser-content-container').justifiedGallery({
$('.fbrowser.photo .fbrowser-content-container').justifiedGallery({
rowHeight: 80,
margins: 4,
border: 0,