Advertisement
Guest User

Untitled

a guest
Nov 24th, 2014
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. * sets up the object with the AJAX url and security nonce, also retrieves language properties
  2. */
  3. setup: function(url, nonce, pluginUrl, userId, callbackFn, skipLoadGlobals) {
  4. if(!PI.ajaxSetup) {
  5. // create custom widgets
  6. initPICustom();
  7.  
  8. PI.globals.pluginUrl = pluginUrl;
  9. PI.userId = userId;
  10. this.url = url;
  11. this.nonce = nonce;
  12.  
  13. if(!skipLoadGlobals) {
  14. this.loadGlobalData(callbackFn);
  15. }
  16. else {
  17. callbackFn();
  18. }
  19. }
  20. else {
  21. alert('Ajax setup function already called');
  22. }
  23. },
  24.  
  25. getUserOldestResultYear: function(userId, callbackFn) {
  26. jQuery.ajax({
  27. type: "post",
  28. url: PI.Ajax.url
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement