includes/clientside/static/login.js
changeset 779 609e35845ec3
parent 741 a216e412c439
child 780 f65e35566b63
equal deleted inserted replaced
778:57ce13805b6f 779:609e35845ec3
    96  * @param int The security level to authenticate at - see http://docs.enanocms.org/Help:Appendix_B
    96  * @param int The security level to authenticate at - see http://docs.enanocms.org/Help:Appendix_B
    97  */
    97  */
    98 
    98 
    99 window.ajaxLoginInit = function(call_on_finish, user_level)
    99 window.ajaxLoginInit = function(call_on_finish, user_level)
   100 {
   100 {
   101   load_component('messagebox');
   101   load_component(['messagebox', 'flyin', 'jquery', 'jquery-ui', 'l10n', 'crypto']);
   102   load_component('flyin');
       
   103   load_component('jquery');
       
   104   load_component('jquery-ui');
       
   105   load_component('l10n');
       
   106   load_component('crypto');
       
   107   
   102   
   108   logindata = {};
   103   logindata = {};
   109   
   104   
   110   var title = ( user_level > USER_LEVEL_MEMBER ) ? $lang.get('user_login_ajax_prompt_title_elev') : $lang.get('user_login_ajax_prompt_title');
   105   var title = ( user_level > USER_LEVEL_MEMBER ) ? $lang.get('user_login_ajax_prompt_title_elev') : $lang.get('user_login_ajax_prompt_title');
   111   logindata.mb_object = new MessageBox(MB_OKCANCEL | MB_ICONLOCK, title, '');
   106   logindata.mb_object = new MessageBox(MB_OKCANCEL | MB_ICONLOCK, title, '');
  1053   body.appendChild(mydiv);
  1048   body.appendChild(mydiv);
  1054 }
  1049 }
  1055 
  1050 
  1056 window.ajaxInitLogout = function()
  1051 window.ajaxInitLogout = function()
  1057 {
  1052 {
  1058   load_component('messagebox');
  1053   load_component(['messagebox', 'l10n', 'flyin', 'fadefilter']);
  1059   load_component('l10n');
       
  1060   var mb = new MessageBox(MB_YESNO|MB_ICONQUESTION, $lang.get('user_logout_confirm_title'), $lang.get('user_logout_confirm_body'));
  1054   var mb = new MessageBox(MB_YESNO|MB_ICONQUESTION, $lang.get('user_logout_confirm_title'), $lang.get('user_logout_confirm_body'));
  1061   mb.onclick['Yes'] = function()
  1055   mb.onclick['Yes'] = function()
  1062     {
  1056     {
  1063       window.location = makeUrlNS('Special', 'Logout/' + csrf_token + '/' + title);
  1057       window.location = makeUrlNS('Special', 'Logout/' + csrf_token + '/' + title);
  1064     }
  1058     }