view plugins/redmine_bibliography/assets/javascripts/order_authorships.js @ 1367:a2e51c0a7860 luisf

Correctly clears the cache when publication authors' order is changed.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Mon, 19 Aug 2013 16:33:09 +0100
parents 72b6d7a2383d
children
line wrap: on
line source
$(document).ready(function(){

   $('#authorships').sortable({
       axis: 'y',
       dropOnEmpty: false,
       handle: '.handle',
       cursor: 'crosshair',
       items: 'li',
       opacity: 0.4,
       scroll: true,
       update: function(){
          $.ajax({
              type: 'post',
              data: $('#authorships').sortable('serialize'),
              dataType: 'script',
              complete: function(request){
                 $('#authorship').effect('highlight');
              },
                 url: '/authorships/sort'});
              }
          });
     });