redmine_dashboard icon indicating copy to clipboard operation
redmine_dashboard copied to clipboard

Issue Context Menu

Open gjroelofs opened this issue 10 years ago • 7 comments

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?

gjroelofs avatar Aug 05 '14 08:08 gjroelofs

:+1:

hameno avatar Aug 07 '14 06:08 hameno

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 avatar Aug 07 '14 15:08 gjroelofs

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.

gjroelofs avatar Aug 07 '14 23:08 gjroelofs

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?

jgraichen avatar Aug 08 '14 20:08 jgraichen

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.

gjroelofs avatar Aug 09 '14 16:08 gjroelofs

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 avatar Aug 09 '14 16:08 jgraichen

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

gjroelofs avatar Dec 23 '15 10:12 gjroelofs