Project

General

Profile

Feature #233

Delete Confirmation on Site-Group Dialog

Added by Luke Murphey about 14 years ago. Updated about 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Web Interface
Target version:
Start date:
10/29/2010
Due date:
10/29/2010
% Done:

100%

Estimated time:
2.00 h

History

#1 Updated by Luke Murphey about 14 years ago

  • Assignee set to Luke Murphey

#2 Updated by Luke Murphey about 14 years ago

  • Due date set to 10/29/2010
  • Start date changed from 10/25/2010 to 10/29/2010
  • Estimated time set to 2.00 h

#3 Updated by Luke Murphey about 14 years ago

Below is example code that allows you to change the URL to go to when deleting the item:

            $(function() {
                    $("#dialog").dialog({
                            bgiframe: true,
                            resizable: false,
                            height:140,
                            modal: true,
                            autoOpen: false,
                            overlay: {
                                    backgroundColor: '#000',
                                    opacity: 0.5
                            }
                    });
            });

            function show_delete_dialog(url) {

                    buttons = {
                            'Delete this asset': function() {
                                    location=url;
                            },
                            Cancel: function() {
                                    $(this).dialog('close');
                            }
                    }

                    $("#dialog").dialog('option', 'buttons', buttons);
                    $("#dialog").dialog("open");
            }

#4 Updated by Luke Murphey about 14 years ago

The onSubmit can be intercepted using a confirm() call. On the other hand, a jQuery dialog could be used that calls click on the relevant dialog button. Below is an example that clicks the "Delete" button:

$('input[value=Delete][type=submit]').click();

#5 Updated by Luke Murphey about 14 years ago

A confirm dialog can be added this way:

$('input[value=Delete][type=submit]').click( function() { return confirm("Are you sure?"); } );

#6 Updated by Luke Murphey about 14 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Implemented in r926.

#7 Updated by Luke Murphey about 14 years ago

  • Category set to Web Interface

Also available in: Atom PDF