X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Ftheme%2Ffrio%2Fjs%2Ffilebrowser.js;h=40c0fbb7443bb9daecd3c7f4cd47f1da166548a9;hb=cf9a65cded8e8f270aedbb3ba46d5fe2fe351b4c;hp=5985ac742e8dd984b8c9f1acbec9ab8ff3b6e188;hpb=a2ad01383082a01eb540ffa6c89c82519fec7b11;p=friendica.git diff --git a/view/theme/frio/js/filebrowser.js b/view/theme/frio/js/filebrowser.js index 5985ac742e..40c0fbb744 100644 --- a/view/theme/frio/js/filebrowser.js +++ b/view/theme/frio/js/filebrowser.js @@ -81,17 +81,17 @@ var FileBrowser = { var destination = h.split("-")[0]; FileBrowser.id = h.split("-")[1]; FileBrowser.event = FileBrowser.event + "." + destination; - if (destination == "comment") { + if (destination === "comment") { // Get the comment textimput field var commentElm = document.getElementById("comment-edit-text-" + FileBrowser.id); } }; - console.log("FileBrowser:", nickname, type,FileBrowser.event, FileBrowser.id); + console.log("FileBrowser: " + nickname, type, FileBrowser.event, FileBrowser.id); FileBrowser.postLoad(); - $(".error a.close").on("click", function(e) { + $(".error .close").on("click", function(e) { e.preventDefault(); $(".error").addClass("hidden"); }); @@ -110,10 +110,10 @@ var FileBrowser = { e.preventDefault(); var embed = ""; - if (FileBrowser.type == "image") { + if (FileBrowser.type === "image") { embed = "[url=" + this.dataset.link + "][img]" + this.dataset.img + "[/img][/url]"; } - if (FileBrowser.type == "file") { + if (FileBrowser.type === "file") { // attachment links are "baseurl/attach/id"; we need id embed = "[attachment]" + this.dataset.link.split("/").pop() + "[/attachment]"; } @@ -123,7 +123,7 @@ var FileBrowser = { // work as expected (we need a way to wait until commentOpenUI would be finished). // As for now we insert pieces of this function here if ((commentElm !== null) && (typeof commentElm !== "undefined")) { - if (commentElm.value == "") { + if (commentElm.value === "") { $("#comment-edit-text-" + FileBrowser.id).addClass("comment-edit-text-full").removeClass("comment-edit-text-empty"); $("#comment-edit-submit-wrapper-" + FileBrowser.id).show(); $("#comment-edit-text-" + FileBrowser.id).attr('tabindex','9'); @@ -179,6 +179,7 @@ var FileBrowser = { $(".error span").html(response['error']); $(".error").removeClass('hidden'); $(".fbrowser .profile-rotator-wrapper").hide(); + $(".fbrowser-content").show(); return; } @@ -209,6 +210,7 @@ var FileBrowser = { $(".error span").html(response['error']); $(".error").removeClass('hidden'); $('#profile-rotator').hide(); + $(".fbrowser-content").show(); return; } @@ -231,7 +233,6 @@ var FileBrowser = { $(".fbrowser .fbswitcher [data-mode=" + FileBrowser.type + "]").addClass("active"); // We need to add the AjaxUpload to the button FileBrowser.uploadButtons(); - }, // Load new content (e.g. change photo album) @@ -253,7 +254,7 @@ var FileBrowser = { initGallery: function() { $(".fbrowser.image .fbrowser-content-container").justifiedGallery({ 'rowHeight': 80, - 'margins': 3, + 'margins': 4, 'border': 0 }); }