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

Rewrite _getdir plugin #2718

Merged
merged 5 commits into from
Sep 30, 2024
Merged

Rewrite _getdir plugin #2718

merged 5 commits into from
Sep 30, 2024

Conversation

jevenski
Copy link
Contributor

Due to the heavy modifications made to upstream code, I made this new pull request based on the latest develop branch. Most of the features are the same as the original pull request, plus a few fixes for bugs that got their way in during the last few commits.

Plugin Features:

  • Combine getfiles.php and getdirs.php into one script: listdir.php;
  • Return the directory list in JSON format and render it in an HTML <dialog> instead of returning server-rendered HTML and display it in an `<iframe>``;
  • Attach the directory list frame to the root node (actually a wrapper #dir-container), instead of the containing dialog window, so that the frame can grow outside the boundary of the dialog window and still show up properly. Otherwise, the directory list would be "clipped" when the height exceeds that of its containing window. The original Save To window used an invisible pad attached to the bottom to contain the extra height of the frame. In my previous flex layout patch, I increased the gap between the options so that the window would be high enough to contain the frame. Now the problem is solved.
  • Add a linkage to the directory list frame and its containing window for drap-n-drop movement, since the frame now don't belong to the containing window, it would not have moved automatically with the window.
  • Allow navigating through the directories using arrow keys: ArrowUP and ArrowDown for selecting, ArrowRight for entering the selected directory, ArrowLeft for going back to the parent directory, Home and End for going to the top and the end respectively;
  • Adapt the directory list frame to different themes.

Original Pull Request: #2704

- Combine getfiles.php and getdirs.php into one script listdir.php;
- Return the directory list in JSON format and render it in an HTML
  `<dialog>` instead of returning server-rendered HTML and display it
  in an `<iframe>``;
- Attach the directory list frame to the root node (actually a wrapper
  `#dir-container`), instead of the containing dialog window, so that
  the frame can grow outside the boundary of the dialog window and
  still show up properly. Otherwise, the directory list would be
  "clipped" when the height exceeds that of its containing window.
  The original Save To window used an invisible pad attached to the
  bottom to contain the extra height of the frame. In my previous flex
  layout patch, I increased the gap between the options so that
  the window would be high enough to contain the frame. Now the problem
  is solved.
- Add a linkage to the directory list frame and its containing window
  for drap-n-drop movement, since the frame now don't belong to
  the containing window, it would not have moved automatically
  with the window.
- Allow navigating through the directories using arrow keys:
  ArrowUP and ArrowDown for selecting, ArrowRight for entering
  the selected directory, ArrowLeft for going back to the parent
  directory, Home and End for going to the top and the end respectively;
- Adapt the directory list frame to different themes.
- Fix scheduler table hour display and selection bugs.
- Increase decimal digit edit input width for better mobile display.
Copy link
Collaborator

@stickz stickz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please investigate why the directory browser does not default to the torrent files directory for all use cases. This is a regression with this pull request. Once these three issues are resolved, I'll merge and tag ruTorrent v5.B.1.

plugins/_getdir/listdir.php Outdated Show resolved Hide resolved
plugins/_getdir/listdir.php Outdated Show resolved Hide resolved
Copy link
Collaborator

@stickz stickz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address the requested revision to make the file list display properly by default. Afterwards, revise the pull request. If it passes on my web client, I'll merge and tag the beta release!

plugins/_getdir/listdir.php Outdated Show resolved Hide resolved
jevenski and others added 2 commits September 30, 2024 09:11
If the trailing slash is excluded, we need to add it in.
@stickz stickz merged commit d944e9b into Novik:develop Sep 30, 2024
@jevenski jevenski deleted the get-dir-v5 branch September 30, 2024 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants