mirror of
https://github.com/friendica/friendica
synced 2025-04-23 07:50:12 +00:00
Move mod/fbrowser to src\Modules\Attachment|Photos\Browser
This commit is contained in:
parent
a95e93c725
commit
d0b16b2fc1
24 changed files with 483 additions and 233 deletions
|
@ -82,7 +82,7 @@ $(document).ready(function () {
|
|||
});
|
||||
|
||||
// Insert filebrowser images into the input field (field_fileinput.tpl).
|
||||
$("body").on("fbrowser.image.input", function (e, filename, embedcode, id, img) {
|
||||
$("body").on("fbrowser.photos.input", function (e, filename, embedcode, id, img) {
|
||||
// Select the clicked button by it's attribute.
|
||||
var elm = $("[image-input='select']");
|
||||
// Select the input field which belongs to this button.
|
||||
|
@ -132,12 +132,12 @@ Dialog.show = function (url, title) {
|
|||
Dialog._get_url = function (type, name, id) {
|
||||
var hash = name;
|
||||
if (id !== undefined) hash = hash + "-" + id;
|
||||
return "fbrowser/" + type + "/?mode=none&theme=frio#" + hash;
|
||||
return "profile/" + localNickname + "/" + type + "/browser?mode=none&theme=frio#" + hash;
|
||||
};
|
||||
|
||||
// Does load the filebrowser into the jot modal.
|
||||
Dialog.showJot = function () {
|
||||
var type = "image";
|
||||
var type = "photos";
|
||||
var name = "main";
|
||||
|
||||
var url = Dialog._get_url(type, name);
|
||||
|
@ -159,7 +159,7 @@ Dialog._load = function (url) {
|
|||
let filebrowser = document.getElementById("filebrowser");
|
||||
|
||||
// Try to fetch the hash form the url.
|
||||
let match = url.match(/fbrowser\/[a-z]+\/.*(#.*)/);
|
||||
let match = url.match(/profile\/[a-z]+\/.*(#.*)/);
|
||||
if (!filebrowser || match === null) {
|
||||
return; //not fbrowser
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue