Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesAdd a confirmation to delete button in a gridAdd a confirmation to delete button in a grid
Previous
 
Next
New Post
2/3/2013 6:50 AM
 

Hi Michael,

I think we have attached a click event that, when clicked attaches the dnnConfirm.  That's why you only see action on the second click.

Here is a new version (still wondering how you get yours to look prettly!)

There is a number of sweet things about this new version:

  • It is unobtrusive in the code.  You do not need to generate it.  Just paste it into script tags at the top of the module.
  • I have a MUCH cleaner way of finding the confirm data.  Just add the marker class confirmData to the column you want confirmed
  • I think there is no need for the PostbackTrigger.  I didn't use it in my test module
  • I think it works both with and without UpdatePanels but I have not tested all the combinations.

I changed the isButton property to false because my test module uses a linkbutton.

jQuery(function () {
Sys.Application.add_load(function () {
jQuery(".confirmingGrid .DeleteButton")
.each(function () {
$(this).dnnConfirm({
text: "Are you sure you want to delete '" + $(".confirmData", $(this).parents("tr")).text() + "'?",
yesText: "Yes",
noText: "No",
title: "Confirm",
dialogClass: "dnnFormPopup",
isButton: true
});
})
;
});
});


Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
New Post
2/3/2013 9:24 AM
 
Richard,

thanks so much! This is working (also without the postback trigger), and it's really pretty!

Best wishes
Michael

Michael Tobisch
DNN★MVP

dnn-Connect.org - The most vibrant community around the DNN-platform
 
New Post
2/16/2013 4:41 AM
 
Hi again,

can anyone lead me in the right direction to the following problem:

in a control, this script works fine, as long as the control does not support pop-ups. When I check the "Supports popups" options in the control's definition, I get an error message that the "object does not nupport the property or method "dnnConfirm".

Any idea(s)?

Best wishes
Michael

Michael Tobisch
DNN★MVP

dnn-Connect.org - The most vibrant community around the DNN-platform
 
New Post
8/13/2013 5:42 AM
 

Hi,

I've implemented this solution in a Datalist but it displays the popup and at the same time executes the click event (deletes the record) ... it doesn't wait for me to click yes or no.

 

Any ideas anybody.

 

Thanx

 
New Post
1/18/2014 12:12 PM
 
Hi Michael,

I read somewhere that when you use pop-ups DNN loads your control in "A special skin that shows only your control." My bet is that this special skin does not load the javascript for dnnConfirm. I suspect that if you read these links http://www.dnnsoftware.com/wiki/Page/... and http://www.dnnsoftware.com/wiki/Page/... and then toss these two into your control...

DotNetNuke.Framework.jQuery.RequestDnnPluginsRegistration();

ClientAPI.RegisterClientReference(this.Page, ClientAPI.ClientNamespaceReferences.dnn);

...it will magically spring into life.

Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesAdd a confirmation to delete button in a gridAdd a confirmation to delete button in a grid


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out