[ Index ]

MailPress 7.2

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    

title

Body

[close]

/mp-admin/js/ -> settings_roles_and_capabilities.js (source)

   1  // settings_RandC
   2  
   3  var mp_settings_RandC = {
   4  
   5      init : function() {
   6          jQuery('td.capacity > label > input').click( function() {
   7              var name = jQuery(this).attr('name');
   8              var checked = jQuery(this).attr('checked');
   9              var r_and_c = name.split(/\[|\]\[|]/g);
  10              var spanid = r_and_c[1] + '_' + r_and_c[2] ;
  11  
  12              var rc_data = {    action:    "mp_ajax", 
  13                          mp_action:    "r_and_c", 
  14                          role:        r_and_c[1], 
  15                          capability: r_and_c[2], 
  16                          add:        (checked) ? '1' : '0'
  17                        };
  18          //ajax
  19              jQuery.ajax({
  20                  data : rc_data, 
  21                  type : "POST", 
  22                  url : MP_AdminPageL10n.requestFile, 
  23                  success: mp_settings_RandC.crko_vs_crok(checked, spanid)
  24              });
  25          });
  26      },
  27  
  28      crko_vs_crok : function(checked, spanid) {
  29          jQuery('span#'+spanid).removeClass( (checked) ? 'crko' : 'crok' ).addClass( (checked) ? 'crok' : 'crko' );
  30      } 
  31  }
  32  jQuery(document).ready( function() { mp_settings_RandC.init() });


Generated: Tue May 19 15:55:14 2020 Cross-referenced by PHPXref 0.7.1