Make WordPress Core

Opened 19 years ago

Closed 17 years ago

#2560 closed defect (bug) (wontfix)

Javascript alert I18N and interface consistency

Reported by: steveagl's profile SteveAgl Owned by:
Milestone: Priority: high
Severity: normal Version: 2.0.1
Component: Administration Keywords:
Focuses: Cc:

Description

Referring to the thrad on polyglot ML: http://comox.textdrive.com/pipermail/wp-polyglots/2006-March/000882.html

Javascript alerts:  some have "OK" to delete, "Cancel" to stop;  
others have "Cancel" to stop, "OK" to delete (and variations).  I  
suggest standardising on the first, since that's the order the  
buttons appear in Windows.

Her the patch to stndardise all the alert to OK - Cancel order.

Attachments (1)

javascript-alerts.patch (10.9 KB) - added by SteveAgl 19 years ago.

Download all attachments as: .zip

Change History (22)

#1 @davidhouse
19 years ago

Can we not have verb-based buttons which are regarded to be more usable? I.e.,

"Warning; this will irretrievably delete this post. [ Delete ]; [ Cancel ]"

#2 @ryan
19 years ago

I prefer using imperative verbs too.

Alert Buttons

#3 @markjaquith
19 years ago

+1 ... and let's standardize the order of them as SteveAgl suggested... so that it's always [ Delete ] [ Cancel ] or [ VERB ] [ Cancel ] in generic form.

#4 @SteveAgl
19 years ago

+1 for using imperative verbs too, using the order suggested on polyglots ML.

#5 @ryan
19 years ago

Let's do it. Anyone want to work up a new patch?

#6 @davidhouse
19 years ago

  • Owner changed from SteveAgl to davidhouse
  • Status changed from new to assigned

I'll give this a shot. If anyone feels like working up a list of where in the admin the dialogs appear, that'd be great ;) If not, I'll do a hunt myself.

#7 @mdawaffe
19 years ago

davidhouse, you may run into collision here with the patch I'm working on over at #2561. I'll be putting up some code soon.

#8 @davidhouse
19 years ago

Sure. I'll wait.

#9 @davidhouse
19 years ago

This could be tricky. There's no JS call to pop up a dialog with custom text on the buttons: you get OK or OK/Cancel.

We could do this with a window, but it'd likely get popup-blocked. How about doing some JS-fu to grey out the screen, then display a box in the middle with some text and some buttons? This really goes beyond the JS skills/knowledge I have, so shoot this down if it sucks. Also, for the coding, I'd probably want to delegate as this isn't exactly my area of expertise.

#10 @mdawaffe
19 years ago

I don't know where all the JS confirms are in WP, but consider this.

For the JS confirms spawned by AJAX calls (see #2561), what if we replaced the actual HTML item being deleted with an "Are you sure..." message? As an example, say you go to Manage->Categories and delete one of the categories listed in that table. The TR is replaced with "Are you sure you want to delete this Category named X? _Delete_ _Cancel_". On Delete, the TR would fade away, on Cancel the TR would be re-replaced by the old information.

My friend Greg thought of this idea, seems slick to me.

#11 @matt
18 years ago

I like the direction of the modal dialogs, especially if there was a checkbox "never show this to me again." They would need to be just as accesible as regular popups, in that they should have proper tabbing between them (and no where else in the page), they should capture proper key presses, and have a sane "enter" default, be exitable with "esc", etc.

Also a little visual pizazz would be nice, say a OS X type drop shadow on the box, and a smoother background transition (like the widgets plugin has).

#12 @matt
18 years ago

BTW, the above comment was in response to:

http://leftjustified.net/lab/wordpress/modal-windows

Whoops!

#13 @leftjustified
18 years ago

I've started on the modifications suggested by Matt.

  • 'Do not show me again' checkbox added. Should ticking this box disable the Cancel button? Allowing them to set an auto-cancel makes the delete functionality unusable :-/
  • The captureKeys observer kicks in when a modal dialog is activated and gets removed on closing the dialog.
  • Escape key is mapped to the cancel function.
  • Focus is immedietly moved to the first input element (the 'Do not show me..' check) upon display of the window.

I'm in the process of restricting the tab order to form elements and links within the window. It's a mess at the moment, if anyone would like to have a look the function is called captureKeys. Go on, you know you want to! ;)

#14 @matt
18 years ago

  • Milestone changed from 2.1 to 2.2
  • Priority changed from normal to high

BTW, I really want to get the modal windows from above in, but let's target 2.2.

#15 @rob1n
17 years ago

I'm +100 for modal windows. Makes for UI consistency and it's more reliable/useful than JavaScript's alert() or its sisters.

#16 @rob1n
17 years ago

  • Owner changed from davidhouse to rob1n
  • Status changed from assigned to new

#18 @rob1n
17 years ago

  • Milestone changed from 2.2 to 2.3

#19 @rob1n
17 years ago

  • Owner rob1n deleted

#20 @Nazgul
17 years ago

  • Milestone changed from 2.3 (trunk) to 2.4 (future)

#21 @Nazgul
17 years ago

  • Milestone 2.5 deleted
  • Resolution set to wontfix
  • Status changed from new to closed

This ticket has had no real activity for some time and has partially been superseded by #4089, so closing as wontfix for now.

Feel free to re-open if you have additional patches/information/suggestions/...

Note: See TracTickets for help on using tickets.