]> git.mxchange.org Git - friendica.git/blobdiff - js/filebrowser.js
SQL fix fbrowser (RC)
[friendica.git] / js / filebrowser.js
index a2b1702a8750f063605543f008a96a0cc093eacf..78cee0e77ed8f7349d4ca434ea60a338cc4e859e 100644 (file)
  *             });\r
  **/\r
 \r
-\r
-/*\r
- * IMPORTANT\r
- * \r
- *  This is a modified version to work with \r
- *  the frio theme.and bootstrap modals\r
- *  \r
- *  The origninal file is under:\r
- *  js/filebrowser.js\r
- * \r
- */\r
-\r
-\r
 var FileBrowser = {\r
        nickname : "",\r
        type : "",\r
        event: "",\r
        id : null,\r
 \r
-       init: function(nickname, type, hash) {\r
+       init: function(nickname, type) {\r
                FileBrowser.nickname = nickname;\r
                FileBrowser.type = type;\r
                FileBrowser.event = "fbrowser."+type;\r
-\r
-               if (hash!=="") {\r
-                       var h = hash.replace("#","");\r
+               if (location['hash']!=="") {\r
+                       var h = location['hash'].replace("#","");\r
                        FileBrowser.event = FileBrowser.event + "." + h.split("-")[0];\r
                        FileBrowser.id = h.split("-")[1];\r
-               };\r
+               }\r
 \r
                console.log("FileBrowser:", nickname, type,FileBrowser.event, FileBrowser.id );\r
 \r
@@ -90,14 +76,8 @@ var FileBrowser = {
 \r
                $(".folders a, .path a").on("click", function(e){\r
                        e.preventDefault();\r
-                       var url = baseurl + "/fbrowser/" + FileBrowser.type + "/" + this.dataset.folder + "?mode=modal"+ location['hash'];\r
-\r
-                       // load new content to modal\r
-                       $('.modal-body').load(url,function(){\r
-                               $(function() {\r
-                                               FileBrowser.init(nickname, type, hash);\r
-                                       });\r
-                       });\r
+                       var url = baseurl + "/fbrowser/" + FileBrowser.type + "/" + this.dataset.folder + "?mode=minimal" + location['hash'];\r
+                       location.href = url;\r
                });\r
 \r
                $(".photo-album-photo-link").on('click', function(e){\r
@@ -115,17 +95,9 @@ var FileBrowser = {
                        parent.$("body").trigger(FileBrowser.event, [\r
                                this.dataset.filename,\r
                                embed,\r
-                               FileBrowser.id,\r
+                               FileBrowser.id\r
                        ]);\r
 \r
-                       // close model\r
-                       $('#modal').modal('hide');\r
-                       if (id!=="") {\r
-                               $("#comment-edit-text-" + FileBrowser.id).empty();\r
-                               commentExpand(FileBrowser.id);\r
-                               //$("#comment-edit-text-558").empty();\r
-                       };\r
-\r
                });\r
 \r
                if ($("#upload-image").length)\r