diff --git a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/server/ServerFacade.js b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/server/ServerFacade.js index 1790f3cb8aa3ca127c0e57af49a4b00d63150c86..d9861073d7cf766d07d2dd6d0ea5a252f6176f05 100644 --- a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/server/ServerFacade.js +++ b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/server/ServerFacade.js @@ -680,6 +680,8 @@ function ServerFacade(openbisServer) { var firstDotIndex = fieldName.indexOf("."); fieldNameType = fieldName.substring(0, firstDotIndex); fieldName = fieldName.substring(firstDotIndex + 1, fieldName.length); + } else { + fieldValue = "*"; } var setPropertyCriteria = function(criteria, propertyName, propertyValue) { diff --git a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/AdvancedSearch/AdvancedSearchView.js b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/AdvancedSearch/AdvancedSearchView.js index 9c78306935614c7959a892c6ac70d03b45202fdc..25fe0ef563d75c8806ee74bb9a29b82fcd4c861f 100644 --- a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/AdvancedSearch/AdvancedSearchView.js +++ b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/AdvancedSearch/AdvancedSearchView.js @@ -143,7 +143,7 @@ function AdvancedSearchView(advancedSearchController, advancedSearchModel) { }); var $newFieldNameContainer = $("<td>"); - $newRow.append($("<td>").append(this._getNewFieldTypeDropdownComponent($newFieldNameContainer, this._advancedSearchModel.criteria.entityKind))) + $newRow.append($("<td>").append(this._getNewFieldTypeDropdownComponent($newFieldNameContainer, this._advancedSearchModel.criteria.entityKind, uuidValue))) .append($newFieldNameContainer) .append($("<td>").append($fieldValue)) .append($("<td>").append(this._getMinusButtonComponentForRow(this._$tbody, $newRow))); @@ -153,7 +153,7 @@ function AdvancedSearchView(advancedSearchController, advancedSearchModel) { //should make new objects every time. otherwise, using the same object will produce odd results! //how to make an on-select event?? - this._getNewFieldTypeDropdownComponent = function($newFieldNameContainer, entityKind) { + this._getNewFieldTypeDropdownComponent = function($newFieldNameContainer, entityKind, uuid) { var _this = this; var fieldTypeOptions = null; switch(entityKind) { @@ -183,6 +183,8 @@ function AdvancedSearchView(advancedSearchController, advancedSearchModel) { break; } + this._advancedSearchModel.criteria.rules[uuid].type = "All"; //Update model with defaults + var $fieldTypeComponent = FormUtil.getDropdown(fieldTypeOptions, "Select Field Type"); $fieldTypeComponent.change(function() { var $thisComponent = $(this); @@ -521,7 +523,7 @@ function AdvancedSearchView(advancedSearchController, advancedSearchModel) { } } - var dataGrid = new DataGridController("Search Results", columns, getDataRows, rowClick, false, "ADVANCED_SEARCH_OPENBIS"); + var dataGrid = new DataGridController("Search Results", columns, getDataRows, rowClick, false, "ADVANCED_SEARCH_OPENBIS_" + this._advancedSearchModel.criteria.entityKind); return dataGrid; }