Changeset 1189

Show
Ignore:
Timestamp:
23-11-10 10:11:15 (3 years ago)
Author:
robert@…
Message:

Fixed ordering of template fields when adding a new field (see ticket #202)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/web-app/js/templateEditor.js

    r1136 r1189  
    406406    // http://stackoverflow.com/questions/2979643/jquery-ui-sortable-position 
    407407    // 
    408     // Because there is also a hidden 'empty template' list item in the list, 
    409     // the number is decreased by 1 
    410     var newposition = ui.item.index() - 1; 
     408    // There is also a hidden 'empty template' list item in the list. This is 
     409        // the last item in the list, so it doesn't matter in this computation 
     410    var newposition = ui.item.index(); 
    411411 
    412412        var item_id = ui.item.context.id;