[ Index ]

MailPress 7.2

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

title

Body

[close]

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

   1  // write_posts
   2  
   3  jQuery(document).ready( function() {
   4      jQuery('#mppostchecklist').sortable({ 
   5          axis: 'y', 
   6          containment: '#mppostchecklist', 
   7          cursor: 'move', 
   8          handle: '.mppost-handle',
   9          opacity: 0.8,
  10          update: function(event, ui) {
  11              var data = { 
  12                  action : 'mp_ajax',
  13                  mp_action : 'order_mppost',
  14                  id: jQuery("#mail_id").val(),
  15                  posts : jQuery(this).sortable('toArray').toString(),
  16                  _ajax_nonce : mp_postsL10n.order_mppost
  17              };
  18  
  19              jQuery.ajax({
  20                  data: data,
  21                  type: "POST",
  22                  url: autosaveL10n.requestFile
  23              });
  24          }
  25      });
  26      jQuery('#mppostchecklist').wpList({
  27          response: 'mppost-ajax-response',
  28          addBefore: function( s ) {
  29              s.data += '&mail_id=' + jQuery('#mail_id').val(); 
  30              return s;
  31          },
  32          addAfter: function( xml, s ) {
  33              jQuery('table#mppostchecklist').show();
  34          }, 
  35          delBefore: function( s ) {
  36              s.data.mail_id = jQuery('#mail_id').val();
  37              return s;
  38          },
  39          delAfter: function( r, settings ) {
  40              jQuery('#mppost-' + r).remove();
  41          }
  42      });
  43  });


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