Why not working the on_close_popup_ui function in OneAll social plugin?

159 views Asked by At

I built a custom login page for users here.

If a user tries to close the popup window before he/she registered, I want the div with ID "uzenet" to have a shake effect, like in a Wordpress login-form.

The good news is, the plugin has a good api function, which is documented: here.

The function I need to use is: on_close_popup_ui, but it isn't working for me, and I don't know why. If I understand the documentation, the correct code should look like this:

<!-- The plugin will be embedded into this div //-->
<div style="margin-top: 23px;" id="oa_social_login_container"></div>
<div style="margin-top: 23px;" id="oa_social_login_container"></div>

<script type="text/javascript">
 var _oneall = _oneall || [];
 _oneall.push(['social_login', 'do_popup_ui']);
 _oneall.push(['social_login', 'set_callback_uri', 'http://neocsatblog.mblx.hu/']);
 _oneall.push(['social_login', 'set_providers', ['facebook', 'google', 'steam', 'twitter', 'windowslive', 'wordpress']]);
 _oneall.push(['social_login', 'do_render_ui', 'oa_social_login_container']);
/* 
Signature 
  <scope> : string (social_login)
  <function> : JavaScript function to be executed
*/
_oneall.push(['social_login', 'set_event', 'on_close_popup_ui', 'my_on_close_popup_ui']);

/* Example */
var my_on_close_popup_ui = function() {
  alert("You have closed the popup user interface");  
}

_oneall.push(['social_login', 'set_event', 'on_close_popup_ui', 'my_on_close_popup_ui']);

 </script>

But unfortunately, this doesn't work, and I don't know why.
I don't get any syntax errors in chrome console, and I also don't get the alert popup, which means to me the function is stuck, before receiving themy_on_close_popup_ui named.

1

There are 1 answers

0
Claude Schlesser On
_oneall.push(['social_login', 'do_render_ui', 'oa_social_login_container']);

This line must always come last. Any _oneall.push(...) commands made after it are not take into consideration.