Changeset 3909


Ignore:
Timestamp:
Nov 6, 2007, 8:57:58 AM (14 years ago)
Author:
Nicklas Nordborg
Message:

References #721: Store data in files instead of in the database

Remember most recently used platform/variant when creating raw bioassays/array designs

Location:
trunk/www
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/include/scripts/platforms.js

    r3867 r3909  
    7070  this.populateList = function(list, platformId, variantId)
    7171  {
     72    // Check that variant is part of platform; if ignore the variant
     73    if (platformId && variantId)
     74    {
     75      var platform = this.getPlatformById(platformId);
     76      if (platform)
     77      {
     78        var variant = platform.getVariantById(variantId);
     79        if (!variant) variantId = null;
     80      }
     81    }
    7282    for (var p = 0; p < allPlatforms.length; p++)
    7383    {
  • trunk/www/lims/arraydesigns/edit_design.jsp

    r3859 r3909  
    7676    title = "Create array design";
    7777    cc.removeObject("item");
     78    int currentPlatformId = Values.getInt(cc.getRecent(Item.PLATFORM.name(), 0), 0);
     79    int currentVariantId = Values.getInt(cc.getRecent(Item.PLATFORMVARIANT.name(), 0), 0);
     80    try
     81    {
     82      if (currentPlatformId != 0) currentPlatform = Platform.getById(dc, currentPlatformId);
     83      if (currentVariantId != 0) currentVariant = PlatformVariant.getById(dc, currentVariantId);
     84    }
     85    //catch (Throwable t)
     86    finally
     87    {}
    7888  }
    7989  else
  • trunk/www/lims/arraydesigns/index.jsp

    r3859 r3909  
    146146    Platform platform = platformId > 0 ? Platform.getById(dc, platformId) : null;
    147147    PlatformVariant variant = variantId > 0 ? PlatformVariant.getById(dc, variantId) : null;
     148    if (platform != null) cc.setRecent(platform, maxRecent);
     149    if (variant != null) cc.setRecent(variant, maxRecent);
    148150    if (design == null)
    149151    {
  • trunk/www/views/rawbioassays/edit_rawbioassay.jsp

    r3859 r3909  
    145145      currentPlatformId = Values.getInt(cc.getRecent(Item.PLATFORM.name(), 0), 0);
    146146    }
    147     if (currentPlatformId != 0) currentPlatform = Platform.getById(dc, currentPlatformId);
     147    int currentVariantId = Values.getInt(cc.getRecent(Item.PLATFORMVARIANT.name(), 0), 0);
     148   
     149    try
     150    {
     151      if (currentVariantId != 0) currentVariant = PlatformVariant.getById(dc, currentVariantId);
     152      if (currentPlatformId != 0) currentPlatform = Platform.getById(dc, currentPlatformId);
     153    }
     154    catch (Throwable t)
     155    {}
    148156   
    149157    currentRawDataType = RawDataTypes.getRawDataType(cc.getPropertyValue("rawDataType"));
  • trunk/www/views/rawbioassays/index.jsp

    r3859 r3909  
    228228      if (variantId > 0) variant = PlatformVariant.getById(dc, variantId);
    229229    }
    230    
    231230    RawDataType rdt = RawDataTypes.getRawDataType(Values.getStringOrNull(request.getParameter("rawdatatype")));
     231    if (platform != null) cc.setRecent(platform, maxRecent);
     232    if (variant != null) cc.setRecent(variant, maxRecent);
    232233    if (rdt != null) cc.setRecent("RawDataType", rdt.getId(), maxRecent);
    233234
Note: See TracChangeset for help on using the changeset viewer.