includes/clientside/static/ajax.js
changeset 779 609e35845ec3
parent 699 c7d737202d59
child 800 9cdfe82c56cd
equal deleted inserted replaced
778:57ce13805b6f 779:609e35845ec3
    76   // IE <6 pseudo-compatibility
    76   // IE <6 pseudo-compatibility
    77   if ( KILL_SWITCH )
    77   if ( KILL_SWITCH )
    78     return true;
    78     return true;
    79   
    79   
    80   // updated - 1.1.4 to use miniPrompt
    80   // updated - 1.1.4 to use miniPrompt
    81   load_component('l10n');
    81   load_component(['l10n', 'messagebox', 'flyin', 'fadefilter']);
    82   load_component('messagebox');
       
    83   miniPrompt(ajaxRenameConstructDialog);
    82   miniPrompt(ajaxRenameConstructDialog);
    84 }
    83 }
    85 
    84 
    86 var ajaxRenameConstructDialog = function(div)
    85 var ajaxRenameConstructDialog = function(div)
    87 {
    86 {
   219 window.ajaxDeletePage = function()
   218 window.ajaxDeletePage = function()
   220 {
   219 {
   221   // IE <6 pseudo-compatibility
   220   // IE <6 pseudo-compatibility
   222   if ( KILL_SWITCH )
   221   if ( KILL_SWITCH )
   223     return true;
   222     return true;
   224   load_component('l10n');
   223   load_component(['l10n', 'messagebox', 'jquery', 'jquery-ui', 'fadefilter', 'flyin']);
   225   load_component('messagebox');
       
   226   load_component('jquery');
       
   227   load_component('jquery-ui');
       
   228   
   224   
   229   // stage 1: prompt for reason and confirmation
   225   // stage 1: prompt for reason and confirmation
   230   miniPrompt(function(parent)
   226   miniPrompt(function(parent)
   231     {
   227     {
   232       // heading/title
   228       // heading/title
   407   return true;
   403   return true;
   408 }
   404 }
   409 
   405 
   410 window.ajaxDelVote = function()
   406 window.ajaxDelVote = function()
   411 {
   407 {
   412   load_component('l10n');
   408   load_component(['l10n', 'messagebox', 'flyin', 'fadefilter']);
   413   load_component('messagebox');
       
   414   
   409   
   415   // IE <6 pseudo-compatibility
   410   // IE <6 pseudo-compatibility
   416   if ( KILL_SWITCH )
   411   if ( KILL_SWITCH )
   417     return true;
   412     return true;
   418   miniPromptMessage({
   413   miniPromptMessage({
   448     });
   443     });
   449 }
   444 }
   450 
   445 
   451 window.ajaxResetDelVotes = function()
   446 window.ajaxResetDelVotes = function()
   452 {
   447 {
   453   load_component('l10n');
   448   load_component(['l10n', 'messagebox', 'flyin', 'fadefilter']);
   454   load_component('messagebox');
       
   455   
   449   
   456   // IE <6 pseudo-compatibility
   450   // IE <6 pseudo-compatibility
   457   if ( KILL_SWITCH )
   451   if ( KILL_SWITCH )
   458     return true;
   452     return true;
   459   miniPromptMessage({
   453   miniPromptMessage({
   617 {
   611 {
   618   // IE <6 pseudo-compatibility
   612   // IE <6 pseudo-compatibility
   619   if ( KILL_SWITCH )
   613   if ( KILL_SWITCH )
   620     return true;
   614     return true;
   621   
   615   
   622   load_component('l10n');
   616   load_component(['l10n', 'messagebox', 'flyin', 'fadefilter']);
   623   load_component('messagebox');
       
   624   
   617   
   625   miniPromptMessage({
   618   miniPromptMessage({
   626       title: $lang.get('ajax_clearlogs_confirm_title'),
   619       title: $lang.get('ajax_clearlogs_confirm_title'),
   627       message: $lang.get('ajax_clearlogs_confirm_body'),
   620       message: $lang.get('ajax_clearlogs_confirm_body'),
   628       buttons: [
   621       buttons: [
   743 window.ajaxChangeStyle = function()
   736 window.ajaxChangeStyle = function()
   744 {
   737 {
   745   // IE <6 pseudo-compatibility
   738   // IE <6 pseudo-compatibility
   746   if ( KILL_SWITCH )
   739   if ( KILL_SWITCH )
   747     return true;
   740     return true;
   748   load_component('l10n');
   741   load_component(['l10n', 'messagebox', 'flyin', 'fadefilter']);
   749   load_component('messagebox');
       
   750   
   742   
   751   var inner_html = '';
   743   var inner_html = '';
   752   inner_html += '<p><label>' + $lang.get('ajax_changestyle_lbl_theme') + ' ';
   744   inner_html += '<p><label>' + $lang.get('ajax_changestyle_lbl_theme') + ' ';
   753   inner_html += '  <select id="chtheme_sel_theme" onchange="ajaxGetStyles(this.value);">';
   745   inner_html += '  <select id="chtheme_sel_theme" onchange="ajaxGetStyles(this.value);">';
   754   inner_html += '    <option value="_blank" selected="selected">' + $lang.get('ajax_changestyle_select') + '</option>';
   746   inner_html += '    <option value="_blank" selected="selected">' + $lang.get('ajax_changestyle_select') + '</option>';
  1211   }
  1203   }
  1212 };
  1204 };
  1213 
  1205 
  1214 window.aboutKeepAlive = function()
  1206 window.aboutKeepAlive = function()
  1215 {
  1207 {
  1216   load_component('messagebox');
  1208   load_component(['messagebox', 'flyin', 'fadefilter']);
  1217   new MessageBox(MB_OK|MB_ICONINFORMATION, $lang.get('user_keepalive_info_title'), $lang.get('user_keepalive_info_body'));
  1209   new MessageBox(MB_OK|MB_ICONINFORMATION, $lang.get('user_keepalive_info_title'), $lang.get('user_keepalive_info_body'));
  1218 }
  1210 }
  1219 
  1211 
  1220 window.ajaxUpdateCheck = function(targetelement)
  1212 window.ajaxUpdateCheck = function(targetelement)
  1221 {
  1213 {