AntonioChiancone / dropthings

Automatically exported from code.google.com/p/dropthings
0 stars 0 forks source link

IWidgetHost.Maximize/Restore events do not execute #243

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The issue:
Inside MyFramework.js you add a jquery event that unbinds the click() event for 
maximize and restore buttons.

Inside WidgetCOntrolHost.ascx you do not have the OnClick events bound for 
Maximize and Restore.

What happens is the DropthingsUI javascript events fire correctly but the 
IWidgetHost events do not fire at all.

The solution:
1. Add bindings for the OnClick events in the maximize/restore linkbuttons so 
the widgethost events will fire
2. Inside of MyFramework.js remove the Unbind() calls from the widget buttons 
because the will erase the OnClick event on the linkbuttons
3. Inside of the javascript click callbacks make them return true instead of 
return false.

At the end of the above, the DropthingsUI javscript code will execute and call 
the web service asynchronously, return true, and then the button callbacks will 
occur allowing IWidgetHost to run their server-side callbacks :)

Original issue reported on code.google.com by talktop...@gmail.com on 3 Jun 2012 at 12:37

GoogleCodeExporter commented 8 years ago
Thank you!

Original comment by omaralzabir@gmail.com on 24 Jul 2012 at 11:09

GoogleCodeExporter commented 8 years ago
Same problem here.
But the solution propossed by talktop won't work.
Alfer applying the solution, when I retore a maximized widget you get an error 
like "DropthingsUI undeffined", that JS class is created in MyFramework.js and 
I just don't get when this is disposed. I think is some kind of problem with 
the script manager control.

I've also tried instead of unbinding the click event, generating the postback 
with:

  eval(widgetRestore.attr("href"));
(like in other widget events, but I get the same error)

Any idea on how to solve this issue?

If I finally I'm able to solve it by myself I will post the solution here

Regards,

Original comment by EduG...@gmail.com on 27 Jul 2012 at 7:37