[open-ils-commits] r426 - in servres/trunk/conifer: static syrup/views (gfawcett)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Apr 30 21:25:25 EDT 2009
Author: gfawcett
Date: 2009-04-30 21:25:24 -0400 (Thu, 30 Apr 2009)
New Revision: 426
Modified:
servres/trunk/conifer/static/menublocks.js
servres/trunk/conifer/syrup/views/items.py
Log:
fixed 'Resequence' bug that was affecting Internet Explorer
Modified: servres/trunk/conifer/static/menublocks.js
===================================================================
--- servres/trunk/conifer/static/menublocks.js 2009-04-30 19:45:19 UTC (rev 425)
+++ servres/trunk/conifer/static/menublocks.js 2009-05-01 01:25:24 UTC (rev 426)
@@ -69,9 +69,9 @@
$('.itemtree').sortable('destroy');
resequencing = false;
// get the LI item ids. Send them to the server.
- var new_sequence = $('.an_item').map(function() { return $(this).attr('id') });
- var new_seq_string = Array.join(new_sequence, ',');
- $.post('reseq', {'new_order':new_seq_string},
+ var new_sequence_str = '';
+ $('.an_item').each(function() { new_sequence_str += $(this).attr('id') + ' '; });
+ $.post('reseq', {'new_order':new_sequence_str},
function() {
$('#resequence_panel a').text($('#i18n-resequence-items').text());
alert($('#i18n-new-order-saved').text());
@@ -79,6 +79,8 @@
}
};
+var xxx = null;
+
function doToggleItemTree() {
if ($('.itemtree:hidden').length > 0) {
$('.itemtree:hidden').fadeIn(500);
Modified: servres/trunk/conifer/syrup/views/items.py
===================================================================
--- servres/trunk/conifer/syrup/views/items.py 2009-04-30 19:45:19 UTC (rev 425)
+++ servres/trunk/conifer/syrup/views/items.py 2009-05-01 01:25:24 UTC (rev 426)
@@ -283,7 +283,7 @@
# resequencing items
def _reseq(request, course, parent_heading):
- new_order = request.POST['new_order'].split(',')
+ new_order = request.POST['new_order'].strip().split(' ')
# new_order is now a list like this: ['item_3', 'item_8', 'item_1', ...].
# get at the ints.
new_order = [int(n.split('_')[1]) for n in new_order]
More information about the open-ils-commits
mailing list