In an Alchemy Plugin I would like to show a popup with a simple message like, "You are about to UnLocalize all Child Components. Do you want to continue" and then when the 'Continue' button is clicked to execute some Core Service code.
The AddUser Alchemy extension has a nice example but I am a bit lost with the complexity of the JavaScript and ASPX page. Is it possible to call the Controller web service directly from the aspx page using a jQuery AJAX call?
My understanding is that the CoreService code should be located in a Controller implementing the AlchemyApiController. The AddUser GUI Extension has a nice example:
[AlchemyRoutePrefix("AddUserService")]
public class AddUserController : AlchemyApiController
{
[HttpPost]
[Route(@"NewUser")]
public IHttpActionResult NewUser(UserInfoModel data)
{ // .. magic happens here
}
}