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

Issue Context Menu #47

Open
gjroelofs opened this issue Aug 5, 2014 · 7 comments
Open

Issue Context Menu #47

gjroelofs opened this issue Aug 5, 2014 · 7 comments
Labels
feature request Request or idea for a new function

Comments

@gjroelofs
Copy link
Collaborator

Currently, a custom dropdown menu is shown upon clicking on the context button.

Maybe it would be more interesting to display the default redmine context menu?
Or even better, incorporate the items of the redmine context menu into the menu?

@hameno
Copy link
Contributor

hameno commented Aug 7, 2014

👍

@gjroelofs
Copy link
Collaborator Author

Looking at context_menu.js (see Issues tab), we'll need to change the following:

  • Add CSS for "context-menu-selection" to indicate the issue is selected. E.g.: change background
  • Add Checkbox Input to the issue element.
    • Optional: check whether modifiers work (Ctrl/Shift); I think it's best to remove the Shift modifier.
  • Add class "hascontextmenu" to divs of issues which can be altered.
  • Remove restriction of tr class as target; line 29.
  • Call contextMenuInit with appropriate context menu URL. (seems to be "/issues/context_menu")
  • Alter AJAX call on l.100 (contextMenuShow) to get the correct data, either by:
    • Specifying a Form class around the whole block; which serializes the Checkbox specified earlier.
    • Or, ensure that the Ajax call gets a param "ids[]" listing all the IDs we want to alter.

@gjroelofs
Copy link
Collaborator Author

I implemented a basic working version in branch:
https://github.com/methius/redmine_dashboard/tree/context-menu

Everything works, except for editing of multiple selected cards.
Shift-selection actually works pretty well, following column before row wise selection.
We will need to setup the form structure as used by the "Issues" overview; or implement JS that searches for all ticked input.

TODO:

  • Properly implement multiple-edit.
  • Remove the edit button on the cards.

Disclaimer: I have no real Javascript, Ruby or HAML experience.

@jgraichen
Copy link
Owner

Woa. I'm overwhelmed by all your ongoing contributions.

How about opening Pull Request for these features and keep the discussions and changes in one place?

@gjroelofs
Copy link
Collaborator Author

Hey,

The primary reason why I haven't done that is because of the "quality" of code, and I'd prefer a review before a PR. Especially as you indicated that you are thinking on fundamentally changing several aspects, I thought it wise to hear your input on the feature before doing a PR.

@jgraichen
Copy link
Owner

I understand your reasoning but a PR allows to keep track of discussion including comments attached to the code, easier review on changes, even easier pulling the changes locally.

I've also added you as a collaborator so feel to move the changes to a local branch. First look at your code doesn't look bad. I just need to test them some more.

@jgraichen jgraichen added the enhancement Improvement to an existing functionality label Sep 8, 2014
@gjroelofs
Copy link
Collaborator Author

If I recall correctly, this issue was integrated so it can be closed?

@jgraichen jgraichen added feature request Request or idea for a new function and removed enhancement Improvement to an existing functionality labels Jul 17, 2021
@jgraichen jgraichen changed the title [Enhancement] Issue Context Menu Issue Context Menu Jul 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request or idea for a new function
Projects
None yet
Development

No branches or pull requests

3 participants