Changeset 7383


Ignore:
Timestamp:
Jun 1, 2017, 1:59:12 PM (5 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #2089: Can't select bioplate in sample edit dialog

I hope I have found all places that create URLs with '|' in them. The should now be escaped to '%7C'

Location:
branches/3.11-stable/www
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/3.11-stable/www/biomaterials/extracts/extracts.js

    r7003 r7383  
    332332    var frm = document.forms['extract'];
    333333    var url = '&resetTemporary=1';
    334     url += '&tmpfilter:INT:bioPlateType.bioMaterialType=|'+Data.get('page-data', 'extract-type');
     334    url += '&tmpfilter:INT:bioPlateType.bioMaterialType='+encodeURIComponent('|'+Data.get('page-data', 'extract-type'));
    335335    var subtypeId = ItemSubtype.getSubtypeId('subtype_id');
    336336    // Restrict to plates with the given subtype
    337     url += '&tmpfilter:INT:bioPlateType.itemSubtype='+(subtypeId ? '|' + subtypeId : '=');
     337    url += '&tmpfilter:INT:bioPlateType.itemSubtype='+encodeURIComponent(subtypeId ? '|' + subtypeId : '=');
    338338    url += '&tmpfilter:BOOLEAN:destroyed=false';
    339339    Dialogs.selectItem('BIOPLATE', 'bioplate_id', 0, url);
  • branches/3.11-stable/www/biomaterials/samples/samples.js

    r7003 r7383  
    217217    var frm = document.forms['sample'];
    218218    var url = '&resetTemporary=1';
    219     url += '&tmpfilter:INT:bioPlateType.bioMaterialType=|'+Data.get('page-data', 'sample-type');
     219    url += '&tmpfilter:INT:bioPlateType.bioMaterialType='+encodeURIComponent('|'+Data.get('page-data', 'sample-type'));
    220220    var subtypeId = ItemSubtype.getSubtypeId('subtype_id');
    221221    // Restrict to plates with the given subtype
    222     url += '&tmpfilter:INT:bioPlateType.itemSubtype='+(subtypeId ? '|' + subtypeId : '=');
     222    url += '&tmpfilter:INT:bioPlateType.itemSubtype='+encodeURIComponent(subtypeId ? '|' + subtypeId : '=');
    223223    url += '&tmpfilter:BOOLEAN:destroyed=false';
    224224    Dialogs.selectItem('BIOPLATE', 'bioplate_id', 0, url);
  • branches/3.11-stable/www/biomaterials/wizards/create_child_bioplate.js

    r7001 r7383  
    248248    var childType = frm.child_biomaterial_type.value;
    249249    // Restrict to plates that can holds to target biomaterial
    250     url += '&tmpfilter:INT:bioMaterialType=|'+Data.int('page-data', childType);
     250    url += '&tmpfilter:INT:bioMaterialType='+encodeURIComponent('|'+Data.int('page-data', childType));
    251251    var subtypeId = ItemSubtype.getSubtypeId(childType+'_subtype_id');
    252252    // Restrict to plates with the given subtype
    253     url += '&tmpfilter:INT:itemSubtype='+(subtypeId ? '|' + subtypeId : '=');
     253    url += '&tmpfilter:INT:itemSubtype='+encodeURIComponent(subtypeId ? '|' + subtypeId : '=');
    254254 
    255255    Dialogs.selectItem('BIOPLATETYPE', 'bioplatetype_id', 0, url);
  • branches/3.11-stable/www/biomaterials/wizards/move_biomaterial.js

    r6997 r7383  
    9191    if (bioMaterialType)
    9292    {
    93       url += '&tmpfilter:INT:bioPlateType.bioMaterialType=|'+bioMaterialType;
     93      url += '&tmpfilter:INT:bioPlateType.bioMaterialType='+encodeURIComponent('|'+bioMaterialType);
    9494    }
    9595    var commonSubtype = Data.int('page-data', 'common-subtype');
    9696    if (commonSubtype)
    9797    {
    98       url += '&tmpfilter:INT:bioPlateType.itemSubtype=|'+commonSubtype;
     98      url += '&tmpfilter:INT:bioPlateType.itemSubtype='+encodeURIComponent('|'+commonSubtype);
    9999    }
    100100
  • branches/3.11-stable/www/biomaterials/wizards/place_on_plate.js

    r6997 r7383  
    9696    var url = '&resetTemporary=1';
    9797    var bioMaterialType = Data.int('page-data', 'biomaterial-type');
    98     url += '&tmpfilter:INT:bioPlateType.bioMaterialType=|'+bioMaterialType;
     98    url += '&tmpfilter:INT:bioPlateType.bioMaterialType='+encodeURIComponent('|'+bioMaterialType);
    9999    var commonSubtype = Data.int('page-data', 'common-subtype');
    100100    if (commonSubtype)
    101101    {
    102       url += '&tmpfilter:INT:bioPlateType.itemSubtype=|'+commonSubtype;
     102      url += '&tmpfilter:INT:bioPlateType.itemSubtype='+encodeURIComponent('|'+commonSubtype);
    103103    }
    104104    Dialogs.selectItem('BIOPLATE', 'btnSelectPlate', 0, url);
  • branches/3.11-stable/www/views/derivedbioassays/bioassays.js

    r7003 r7383  
    391391    if (relatedExtractIds)
    392392    {
    393       url += '&tmpfilter:INT:id='+relatedExtractIds.join('|');
     393      url += '&tmpfilter:INT:id='+encodeURIComponent(relatedExtractIds.join('|'));
    394394    }
    395395    url += ItemSubtype.createRelatedFilter('subtype_id', 'EXTRACT');
  • branches/3.11-stable/www/views/rawbioassays/bioassays.js

    r7003 r7383  
    382382    if (relatedExtractIds)
    383383    {
    384       url += '&tmpfilter:INT:id='+relatedExtractIds.join('|');
     384      url += '&tmpfilter:INT:id='+encodeURIComponent(relatedExtractIds.join('|'));
    385385    }
    386386    if (frm.extract_id.length > 1)
Note: See TracChangeset for help on using the changeset viewer.