Drag and drop handles wrong item
Signed-off-by: venu1278 <venugopal.boodidadinne@in.bosch.com>
This commit is contained in:
@@ -79,8 +79,7 @@ public class SoftwareModuleTable extends AbstractTable {
|
||||
@Autowired
|
||||
private UploadViewAcceptCriteria uploadViewAcceptCriteria;
|
||||
|
||||
private Boolean isFilterApplied = false;
|
||||
|
||||
|
||||
/**
|
||||
* Initialize the filter layout.
|
||||
*/
|
||||
@@ -107,18 +106,7 @@ public class SoftwareModuleTable extends AbstractTable {
|
||||
if (filterEvent == SMFilterEvent.FILTER_BY_TYPE || filterEvent == SMFilterEvent.FILTER_BY_TEXT
|
||||
|| filterEvent == SMFilterEvent.REMOVER_FILTER_BY_TYPE
|
||||
|| filterEvent == SMFilterEvent.REMOVER_FILTER_BY_TEXT) {
|
||||
final Map<String, Object> queryConfig = prepareQueryConfigFilters();
|
||||
if(queryConfig.size()<1 && isFilterApplied==false){
|
||||
UI.getCurrent().access(() -> ((LazyQueryContainer) getContainerDataSource()).refresh());
|
||||
|
||||
}else {
|
||||
refreshFilter();
|
||||
if(queryConfig.size()<1){
|
||||
isFilterApplied = false;
|
||||
}else{
|
||||
isFilterApplied = true;
|
||||
}
|
||||
}
|
||||
refreshFilter();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -219,8 +219,10 @@ public class SoftwareModuleTableHeader extends AbstractTableHeader {
|
||||
*/
|
||||
@Override
|
||||
protected void resetSearchText() {
|
||||
artifactUploadState.getSoftwareModuleFilters().setSearchText(null);
|
||||
eventbus.publish(this, SMFilterEvent.REMOVER_FILTER_BY_TEXT);
|
||||
if(artifactUploadState.getSoftwareModuleFilters().getSearchText().isPresent()){
|
||||
artifactUploadState.getSoftwareModuleFilters().setSearchText(null);
|
||||
eventbus.publish(this, SMFilterEvent.REMOVER_FILTER_BY_TEXT);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -115,8 +115,6 @@ public class DistributionSetTable extends AbstractTable {
|
||||
@Autowired
|
||||
private transient TargetManagement targetManagement;
|
||||
|
||||
private Boolean isFilterApplied = false;
|
||||
|
||||
/**
|
||||
* Initialize the component.
|
||||
*/
|
||||
@@ -616,18 +614,7 @@ public class DistributionSetTable extends AbstractTable {
|
||||
if (event == DistributionTableFilterEvent.FILTER_BY_TEXT
|
||||
|| event == DistributionTableFilterEvent.REMOVE_FILTER_BY_TEXT
|
||||
|| event == DistributionTableFilterEvent.FILTER_BY_TAG) {
|
||||
final Map<String, Object> queryConfig = prepareQueryConfigFilters();
|
||||
if(queryConfig.size()<1 && isFilterApplied==false){
|
||||
UI.getCurrent().access(() -> ((LazyQueryContainer) getContainerDataSource()).refresh());
|
||||
|
||||
}else {
|
||||
UI.getCurrent().access(() -> refreshFilter());
|
||||
if(queryConfig.size()<1){
|
||||
isFilterApplied = false;
|
||||
}else{
|
||||
isFilterApplied = true;
|
||||
}
|
||||
}
|
||||
UI.getCurrent().access(() -> refreshFilter());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -170,9 +170,10 @@ public class DistributionSetTableHeader extends AbstractTableHeader {
|
||||
|
||||
@Override
|
||||
protected void resetSearchText() {
|
||||
manageDistUIstate.getManageDistFilters().setSearchText(null);
|
||||
eventbus.publish(this, DistributionTableFilterEvent.REMOVE_FILTER_BY_TEXT);
|
||||
|
||||
if(manageDistUIstate.getManageDistFilters().getSearchText().isPresent()){
|
||||
manageDistUIstate.getManageDistFilters().setSearchText(null);
|
||||
eventbus.publish(this, DistributionTableFilterEvent.REMOVE_FILTER_BY_TEXT);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -95,9 +95,7 @@ public class SwModuleTable extends AbstractTable {
|
||||
@Autowired
|
||||
private ArtifactDetailsLayout artifactDetailsLayout;
|
||||
|
||||
private Boolean isFilterApplied = false;
|
||||
|
||||
/**
|
||||
/**
|
||||
* Initialize the filter layout.
|
||||
*/
|
||||
@PostConstruct
|
||||
@@ -126,21 +124,9 @@ public class SwModuleTable extends AbstractTable {
|
||||
if (filterEvent == SMFilterEvent.FILTER_BY_TYPE || filterEvent == SMFilterEvent.FILTER_BY_TEXT
|
||||
|| filterEvent == SMFilterEvent.REMOVER_FILTER_BY_TYPE
|
||||
|| filterEvent == SMFilterEvent.REMOVER_FILTER_BY_TEXT) {
|
||||
final Map<String, Object> queryConfig = prepareQueryConfigFilters();
|
||||
if(queryConfig.size()<2 && isFilterApplied==false){
|
||||
UI.getCurrent().access(() -> ((LazyQueryContainer) getContainerDataSource()).refresh());
|
||||
|
||||
}else {
|
||||
UI.getCurrent().access(() ->{ refreshFilter();
|
||||
styleTableOnDistSelection();
|
||||
});
|
||||
if(queryConfig.size()<2){
|
||||
isFilterApplied = false;
|
||||
}else{
|
||||
isFilterApplied = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
refreshFilter();
|
||||
styleTableOnDistSelection();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -203,8 +203,10 @@ public class SwModuleTableHeader extends AbstractTableHeader {
|
||||
*/
|
||||
@Override
|
||||
protected void resetSearchText() {
|
||||
manageDistUIState.getSoftwareModuleFilters().setSearchText(null);
|
||||
eventbus.publish(this, SMFilterEvent.REMOVER_FILTER_BY_TEXT);
|
||||
if(manageDistUIState.getSoftwareModuleFilters().getSearchText().isPresent()){
|
||||
manageDistUIState.getSoftwareModuleFilters().setSearchText(null);
|
||||
eventbus.publish(this, SMFilterEvent.REMOVER_FILTER_BY_TEXT);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -113,8 +113,7 @@ public class DistributionTable extends AbstractTable {
|
||||
|
||||
private Button distributinPinnedBtn;
|
||||
|
||||
private Boolean isFilterApplied = false;
|
||||
|
||||
|
||||
/**
|
||||
* Initialize the distribution table.
|
||||
*/
|
||||
@@ -142,24 +141,8 @@ public class DistributionTable extends AbstractTable {
|
||||
if (event == DistributionTableFilterEvent.FILTER_BY_TEXT
|
||||
|| event == DistributionTableFilterEvent.REMOVE_FILTER_BY_TEXT
|
||||
|| event == DistributionTableFilterEvent.FILTER_BY_TAG) {
|
||||
final Map<String, Object> queryConfig = prepareQueryConfigFilters();
|
||||
if(((boolean)queryConfig.get(SPUIDefinitions.FILTER_BY_NO_TAG)==false)
|
||||
&& ((List)queryConfig.get(SPUIDefinitions.FILTER_BY_TAG)).isEmpty()
|
||||
&& queryConfig.size()<3
|
||||
&& isFilterApplied==false){
|
||||
UI.getCurrent().access(() -> ((LazyQueryContainer) getContainerDataSource()).refresh());
|
||||
|
||||
}else {
|
||||
UI.getCurrent().access(() -> refreshFilter());
|
||||
if(((boolean)queryConfig.get(SPUIDefinitions.FILTER_BY_NO_TAG)==false)
|
||||
&& ((List)queryConfig.get(SPUIDefinitions.FILTER_BY_TAG)).isEmpty()
|
||||
&& queryConfig.size()<3){
|
||||
isFilterApplied = false;
|
||||
}else{
|
||||
isFilterApplied = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
UI.getCurrent().access(() -> refreshFilter());
|
||||
}
|
||||
}
|
||||
|
||||
@EventBusListenerMethod(scope = EventScope.SESSION)
|
||||
|
||||
@@ -210,8 +210,10 @@ public class DistributionTableHeader extends AbstractTableHeader {
|
||||
*/
|
||||
@Override
|
||||
protected void resetSearchText() {
|
||||
managementUIState.getDistributionTableFilters().setSearchText(null);
|
||||
eventbus.publish(this, DistributionTableFilterEvent.REMOVE_FILTER_BY_TEXT);
|
||||
if( managementUIState.getDistributionTableFilters().getSearchText().isPresent()){
|
||||
managementUIState.getDistributionTableFilters().setSearchText(null);
|
||||
eventbus.publish(this, DistributionTableFilterEvent.REMOVE_FILTER_BY_TEXT);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -140,8 +140,7 @@ public class TargetTable extends AbstractTable implements Handler {
|
||||
private ShortcutAction actionSelectAll;
|
||||
private ShortcutAction actionUnSelectAll;
|
||||
|
||||
private Boolean isFilterApplied = Boolean.FALSE;;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
@PostConstruct
|
||||
@@ -211,21 +210,7 @@ public class TargetTable extends AbstractTable implements Handler {
|
||||
void onEvent(final TargetFilterEvent filterEvent) {
|
||||
UI.getCurrent().access(() -> {
|
||||
if (checkFilterEvent(filterEvent)) {
|
||||
final Map<String, Object> queryConfiguration = prepareQueryConfigFilters();
|
||||
if(((boolean)queryConfiguration.get(SPUIDefinitions.FILTER_BY_NO_TAG)==false)
|
||||
&& queryConfiguration.size()<2
|
||||
&& isFilterApplied==Boolean.FALSE){
|
||||
((LazyQueryContainer) getContainerDataSource()).refresh();
|
||||
|
||||
}else {
|
||||
refreshFilter();
|
||||
if(queryConfiguration.size()<2){
|
||||
isFilterApplied = Boolean.FALSE;
|
||||
}else{
|
||||
isFilterApplied = Boolean.TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
refreshFilter();
|
||||
eventBus.publish(this, ManagementUIEvent.TARGET_TABLE_FILTER);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -258,8 +258,10 @@ public class TargetTableHeader extends AbstractTableHeader {
|
||||
|
||||
@Override
|
||||
protected void resetSearchText() {
|
||||
managementUIState.getTargetTableFilters().setSearchText(null);
|
||||
eventBus.publish(this, TargetFilterEvent.REMOVE_FILTER_BY_TEXT);
|
||||
if(managementUIState.getTargetTableFilters().getSearchText().isPresent()){
|
||||
managementUIState.getTargetTableFilters().setSearchText(null);
|
||||
eventBus.publish(this, TargetFilterEvent.REMOVE_FILTER_BY_TEXT);
|
||||
}
|
||||
}
|
||||
|
||||
private String getSearchText() {
|
||||
|
||||
Reference in New Issue
Block a user