Edgewall Software
Modify

Opened 10 years ago

Closed 10 years ago

#11941 closed enhancement (fixed)

Allow to reorder subscription rules using drag-and-drop and submit in bulk in notifications of preferences

Reported by: Jun Omae Owned by: Jun Omae
Priority: normal Milestone: 1.1.4
Component: notification Version:
Severity: normal Keywords: preferences
Cc: Branch:
Release Notes:

Allow to reorder subscription rules using drag-and-drop and submit in bulk in notifications panel of preferences.

API Changes:
  • Added $.setWarningUnsavedChanges, which shows a warning if leaving the page.
  • Added .trac-button class styling regular button for button elements.
Internal Changes:

Description (last modified by Jun Omae)

In notifications panel in preferences, it needs to submit per adding, removing and reordering a subscription rule. That feels a bit of a pain.

If javascript is enabled in the user's browser, it's useful to allow to reorder subscription rules using drag-and-drop and submit the rules in bulk.

Proposed changes in jomae.git@t11941. In the changes, even if javascript is disabled, it is able to configure per subscription rule.

Attachments (0)

Change History (7)

comment:1 by Jun Omae, 10 years ago

Description: modified (diff)

comment:2 by Jun Omae, 10 years ago

Description: modified (diff)

comment:3 by Ryan J Ollos, 10 years ago

The changes look good to me. #11682 will implement similar functionality for the Admin enum list tables.

3 small suggestions:

  • When hovering over a rule there could be a helpful tooltip, such as Drag to reorder
  • An indicator for unsaved changes would be useful. This could be a JavaScript popup when navigating away for the page, though there's probably a better solution. We could use a notice on the page You have unsaved changes, or a background coloring.
  • A TracDev/CodingStyle#JavaScript guideline that was previously discussed on the trac-dev mailing list is to prefix jQuery variables with $. For example,
    - var rows = $("#content .subscription-rules .rules");
    + var $rows = $("#content .subscription-rules .rules");
    

in reply to:  3 ; comment:4 by Jun Omae, 10 years ago

Thanks for the reviewing.

3 small suggestions:

  • When hovering over a rule there could be a helpful tooltip, such as Drag to reorder
  • An indicator for unsaved changes would be useful. This could be a JavaScript popup when navigating away for the page, though there's probably a better solution. We could use a notice on the page You have unsaved changes, or a background coloring.

Updated jomae.git@t11941. $.setWarningUnsavedChanges() function would be added.

  • A TracDev/CodingStyle#JavaScript guideline that was previously discussed on the trac-dev mailing list is to prefix jQuery variables with $. For example,
    - var rows = $("#content .subscription-rules .rules");
    + var $rows = $("#content .subscription-rules .rules");
    

Hmm. I tried to modify but got the following error. Genshi substitutes $rows and $rows.on variables in the template. I'd like to leave without changes.

File "/.../src/tracdev/git/trac/notification/templates/prefs_notification.html", line 41, in <Expression u'rows.on'>
  $rows.on("click", ".delete-rule", function() {
UndefinedError: "rows" not defined

in reply to:  4 comment:5 by Ryan J Ollos, 10 years ago

Replying to jomae:

Hmm. I tried to modify but got the following error. Genshi substitutes $rows and $rows.on variables in the template. I'd like to leave without changes.

I've run into that issue as well. We may have to reconsider the coding guideline in light of the conflict with Genshi.

Changes look good to me.

comment:6 by Jun Omae, 10 years ago

API Changes: modified (diff)
Owner: set to Jun Omae
Release Notes: modified (diff)
Status: newassigned

Thanks, again! Committed in [13830].

comment:7 by Jun Omae, 10 years ago

Resolution: fixed
Status: assignedclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jun Omae to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.