You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using filemanager in an ASP.NET MVC environment as follows:
"serverRoot": false,
"fileRoot": "Archive",
Interesting to know: The complete filemanager package is located in wwwroot/FMPackage.
With this setup everything works fine except for a couple of things:
When initially opened the "Archive" folder (with a big icon) is shown in the center of the page without the subfolders. I have to press the 'Home' button to show the main folders within Archive.
When navigating the Current Map text (top left) shows an excessive '/': e.g. Current map: //Pictures.
When pressing the 'back' button from within the Archive or Home view filemanager still issues a request to the server to get folder information but with the path set to an empty string.
When pressing the 'back' button from within a subfolder it sometimes happens that the current folder is opened again.
I corrected this by changing the following code:
$('#level-up').click(function() {
var cpath = $('#uploader h1').attr('data-path'); // get path
// console.log(' cpath : ' + cpath + ' - fileRoot : ' + fileRoot ); // @todo remove
// MODIFIED: JH
// remove trailing '/' (if any)
cpath = cpath.replace(/\/$/, "");
if (cpath &&
cpath.length != 0 &&
cpath != fileRoot) {
// we get the parent folder - cpath.slice(0, - 1) removes last slash
parent = cpath.substring(0, cpath.slice(0, - 1).lastIndexOf("/")) + '/';
// console.log(' parent : ' + parent); // @todo remove
var currentViewMode = $('#fileinfo').data('view');
$('#fileinfo').data('view', currentViewMode);
// MODIFIED: JH !!!!! Navigate back otherwise sometimes re-displays the current folder
// $('#filetree').find('a[data-path="' + cpath + '"]').click(); // we close the previous folder
getFolderInfo(parent);
}
});
// Display Min Path
var displayPath = function(path, reduce) {
reduce = (typeof reduce === "undefined") ? true : false;
if(config.options.showFullPath == false) {
// if a "displayPathDecorator" function is defined, use it to decorate path
if('function' === typeof displayPathDecorator) {
return displayPathDecorator(path.replace(fileRoot, "/"));
} else {
path = path.replace(fileRoot, "/");
// MODIFIED: JH - Prevent "//"
path = path.replace("//", "/");
if(path.length > 50 && reduce === true) {
var n = path.split("/");
path = '/' + n[1] + '/' + n[2] + '/(...)/' + n[n.length-2] + '/';
}
return path;
}
} else {
return path;
}
};
By the way: I had to modify the c# MVC controller code that comes with the bundle considerably. But that will be subject of another issue I will prepare as soon as I have finished my project.
Best regards,
Jos
The text was updated successfully, but these errors were encountered:
@JosHuybrighs : thanks for your feedback. @servocoder is working now on a new version, breaking the current API. See #456. You should maybe wait a little to propose mvc conn enhancements.
I am using filemanager in an ASP.NET MVC environment as follows:
With this setup everything works fine except for a couple of things:
I corrected this by changing the following code:
By the way: I had to modify the c# MVC controller code that comes with the bundle considerably. But that will be subject of another issue I will prepare as soon as I have finished my project.
Best regards,
Jos
The text was updated successfully, but these errors were encountered: