+ // Stuff which should be executed if ne content was loaded\r
+ postLoad: function() {\r
+ FileBrowser.initGallery();\r
+ $(".fbrowser .fbswitcher .btn").removeClass("active");\r
+ $(".fbrowser .fbswitcher [data-mode=" + FileBrowser.type + "]").addClass("active");\r
+ // We need to add the AjaxUpload to the button\r
+ FileBrowser.uploadButtons();\r
+ },\r
+\r
+ // Load new content (e.g. change photo album)\r
+ loadContent: function(url) {\r
+ $(".fbrowser-content").hide();\r
+ $(".fbrowser .profile-rotator-wrapper").show();\r
+\r
+ // load new content to fbrowser window\r
+ $(".fbrowser").load(url, function(responseText, textStatus) {\r
+ $(".profile-rotator-wrapper").hide();\r
+ if (textStatus === 'success') {\r
+ $(".fbrowser_content").show();\r
+ FileBrowser.postLoad();\r
+ }\r
+ });\r
+ },\r
+\r
+ // Initialize justified Gallery\r
+ initGallery: function() {\r
+ $(".fbrowser.image .fbrowser-content-container").justifiedGallery({\r
+ 'rowHeight': 80,\r
+ 'margins': 4,\r
+ 'border': 0\r
+ });\r
+ }\r
+};\r