changeset 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 4d5d25039a5f
children 7e85f7988ab8
files plugins/redmine_bibliography/assets/javascripts/order_authorships.js
diffstat 1 files changed, 28 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/redmine_bibliography/assets/javascripts/order_authorships.js	Mon Aug 19 16:05:50 2013 +0100
@@ -0,0 +1,28 @@
+$(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'});
+              }
+          });
+     });
+
+
+
+
+
+