Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reloadOnClick set to true? #103

Closed
dereks opened this issue Feb 10, 2017 · 1 comment
Closed

reloadOnClick set to true? #103

dereks opened this issue Feb 10, 2017 · 1 comment
Milestone

Comments

@dereks
Copy link
Contributor

dereks commented Feb 10, 2017

Once a tree node (of type directory) is opened, clicking that dir in the tree again to close and re-open it does not reload the dir.

I was using the files over both SSH and with RichFilemanager, and was confused by this default behaviour. I expected a close/re-open of a dir to reload it to show new (or deleted) files from the server.

Here is the relevant code in filemanager.js:

		var TreeModel = function() {
			var tree_model = this;
			this.isScrolling = ko.observable(false);
			this.selecledNode = ko.observable(null);

			this.options = {
				showLine: true,
				dblClickOpen: config.manager.dblClickOpen,
				reloadOnClick: false,
				expandSpeed: 200
			};

Simply changing the option reloadOnClick to true fixes the issue, and makes the dir tree behave the way I expected it would.

I can submit a one-line pull request, but thought it was worth opening to discussion. Is there any reason to keep it at false?

In my opinion, having it set to false makes RichFilemanager impossible to use on shared filesystems with more than one user, or with another file-sharing protocol in use (such as Samba, WebDAV, SSH, etc.). The user will sit there clicking the dir name over and over wondering why his new file is never showing up.

I believe true should be the default, but would not be opposed to making it a config var for single-user systems.

Thoughts?

@psolom
Copy link
Owner

psolom commented Feb 10, 2017

Good point. I agree that reloading a list of files from server is more relevant behavior once a tree node is clicked. reloadOnClick option is nice solution, I'm going to add it to the config file as well. No need for you to create new PR, I will take care of that. Thanks.

@psolom psolom added this to the 2.2.2 milestone Feb 10, 2017
@psolom psolom closed this as completed Feb 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants