X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=js%2Ffilebrowser.js;h=78cee0e77ed8f7349d4ca434ea60a338cc4e859e;hb=66366b2804fb3f94016663b107a32993ae084dfa;hp=a2b1702a8750f063605543f008a96a0cc093eacf;hpb=65d37a8c2093ae6da95ac2a8b56bd854ab1e7b8b;p=friendica.git diff --git a/js/filebrowser.js b/js/filebrowser.js index a2b1702a87..78cee0e77e 100644 --- a/js/filebrowser.js +++ b/js/filebrowser.js @@ -51,35 +51,21 @@ * }); **/ - -/* - * IMPORTANT - * - * This is a modified version to work with - * the frio theme.and bootstrap modals - * - * The origninal file is under: - * js/filebrowser.js - * - */ - - var FileBrowser = { nickname : "", type : "", event: "", id : null, - init: function(nickname, type, hash) { + init: function(nickname, type) { FileBrowser.nickname = nickname; FileBrowser.type = type; FileBrowser.event = "fbrowser."+type; - - if (hash!=="") { - var h = hash.replace("#",""); + if (location['hash']!=="") { + var h = location['hash'].replace("#",""); FileBrowser.event = FileBrowser.event + "." + h.split("-")[0]; FileBrowser.id = h.split("-")[1]; - }; + } console.log("FileBrowser:", nickname, type,FileBrowser.event, FileBrowser.id ); @@ -90,14 +76,8 @@ var FileBrowser = { $(".folders a, .path a").on("click", function(e){ e.preventDefault(); - var url = baseurl + "/fbrowser/" + FileBrowser.type + "/" + this.dataset.folder + "?mode=modal"+ location['hash']; - - // load new content to modal - $('.modal-body').load(url,function(){ - $(function() { - FileBrowser.init(nickname, type, hash); - }); - }); + var url = baseurl + "/fbrowser/" + FileBrowser.type + "/" + this.dataset.folder + "?mode=minimal" + location['hash']; + location.href = url; }); $(".photo-album-photo-link").on('click', function(e){ @@ -115,17 +95,9 @@ var FileBrowser = { parent.$("body").trigger(FileBrowser.event, [ this.dataset.filename, embed, - FileBrowser.id, + FileBrowser.id ]); - // close model - $('#modal').modal('hide'); - if (id!=="") { - $("#comment-edit-text-" + FileBrowser.id).empty(); - commentExpand(FileBrowser.id); - //$("#comment-edit-text-558").empty(); - }; - }); if ($("#upload-image").length)