* });\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
\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
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