Changeset 6999


Ignore:
Timestamp:
Nov 4, 2015, 1:14:13 PM (7 years ago)
Author:
Nicklas Nordborg
Message:

References #1962: Trying to load item with ID=1 as parent item when inheriting annotations

Seems like setting the value to "NaN" when permission is denied (and also for other non-selectable alternative) solves the problem.

Keeping this ticket open in case any side-effects are discovered.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/Select.java

    r6881 r6999  
    532532    if (isDenied())
    533533    {
    534       sb.append("<option value=\"-1\">- denied -\n");
     534      sb.append("<option value=\"NaN\">- denied -\n");
    535535    }
    536536    else
     
    552552      if (recent != null && recent.size() > 0)
    553553      {
    554         sb.append("<option value=\"0\" disabled class=\"recentheader\">› recently used\n");
     554        sb.append("<option value=\"NaN\" disabled class=\"recentheader\">› recently used\n");
    555555        int i = 1;
    556556        for (BasicItem item : recent)
     
    576576      if (defaultItems != null && defaultItems.size() > 0)
    577577      {
    578         sb.append("<option value=\"0\" disabled class=\"defaultheader\">› project default\n");
     578        sb.append("<option value=\"NaN\" disabled class=\"defaultheader\">› project default\n");
    579579        for (BasicItem defaultitem : defaultItems)
    580580        {
  • trunk/www/include/scripts/subtypes.js

    r6621 r6999  
    254254    {
    255255      // Add recently used items
    256       var recentlyUsedHeader = new Option('› recently used', 0);
     256      var recentlyUsedHeader = new Option('› recently used', 'NaN');
    257257      recentlyUsedHeader.className = 'recentheader';
    258258      recentlyUsedHeader.disabled = true;
     
    271271    {
    272272      // Add project default items
    273       var projectDefaultHeader = new Option('› project default', 0);
     273      var projectDefaultHeader = new Option('› project default', 'NaN');
    274274      projectDefaultHeader.className = 'defaultheader';
    275275      projectDefaultHeader.disabled = true;
Note: See TracChangeset for help on using the changeset viewer.