Changeset 1189


Ignore:
Timestamp:
Nov 23, 2010, 10:11:15 AM (6 years ago)
Author:
robert@…
Message:

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

File:
1 edited

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;
Note: See TracChangeset for help on using the changeset viewer.