view plugins/redmine_bibliography/assets/javascripts/order_authorships.js @ 1365:72b6d7a2383d luisf

JS file needed to order authors; related to previous commit (addresses Bug #668).
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Mon, 19 Aug 2013 16:05:50 +0100
parents
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'});
              }
          });
     });