Ticket #10690 (closed enhancement: fixed)

Opened 6 months ago

Last modified 3 months ago

Add a 'Revert changes' button

Reported by: rjollos Assigned to: rjollos
Priority: normal Component: AdminEnumListPlugin
Severity: normal Keywords:
Cc: nonplus, jun66j5 Trac Release:

Description

Add a Revert changes button to the right of the Apply changes button.

Attachments

Change History

12/09/12 11:56:20 changed by rjollos

(In [12421]) Refs #10690: Added a Revert changes button.

(follow-up: ↓ 5 ) 12/09/12 11:58:02 changed by rjollos

  • status changed from new to assigned.

The Revert changes button is enabled only when the list is changed. This got me thinking that this plugin could provide some other similar features:

  • Disable Remove selected items on page load, and enable it when a checkbox is selected.
  • Disable Apply changes until the list order is changed, or one of the Default radio buttons is selected.

12/09/12 14:16:55 changed by jun66j5

I tried "Revert changes" feature. If reload after using "revert", the browser shows the confirmation.

It would be better to reload without confirmation.

Index: adminenumlistplugin/htdocs/adminenumlist.js
===================================================================
--- adminenumlistplugin/htdocs/adminenumlist.js	(revision 12422)
+++ adminenumlistplugin/htdocs/adminenumlist.js	(working copy)
@@ -46,6 +46,11 @@
 	$('#enumtable').submit(function(){
 		if(button_pressed === 'apply' || button_pressed === 'revert')
 			$(window).unbind('beforeunload');
+		if(button_pressed === 'revert') {
+			// Send GET request instead of POST
+			location = location;
+			return false;
+		}
 	});
 	
 	// This keep track of current vertical coordinates

12/09/12 14:37:36 changed by rjollos

(In [12424]) Refs #10690: Avoid confirmation dialog1 on page reload after reverting changes. Patch by Jun Omae.

(1) FF16: The page that you're looking for used information that you entered. Returning to that page might cause any action you took to be repeated. Do you want to continue?

(in reply to: ↑ 2 ) 12/11/12 13:16:59 changed by rjollos

Replying to rjollos:

The Revert changes button is enabled only when the list is changed. This got me thinking that this plugin could provide some other similar features: * Disable Remove selected items on page load, and enable it when a checkbox is selected.

=> #10695.

* Disable Apply changes until the list order is changed, or one of the Default radio buttons is selected.

=> #10694.

02/17/13 03:57:45 changed by rjollos

  • status changed from assigned to closed.
  • resolution set to fixed.

Add/Change #10690 (Add a 'Revert changes' button)




Change Properties
Action