merged with branch version at 119582
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@119616 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
635771de74
commit
210133ec30
|
@ -5,10 +5,7 @@
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||||
<dependent-module archiveName="workspace-tree-widget-6.9.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/workspace-tree-widget-BRANCH-6.9.0-SNAPSHOT/workspace-tree-widget-BRANCH-6.9.0-SNAPSHOT">
|
<dependent-module archiveName="workspace-tree-widget-6.9.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/workspace-tree-widget-TRUNK/workspace-tree-widget-TRUNK">
|
||||||
<dependency-type>uses</dependency-type>
|
|
||||||
</dependent-module>
|
|
||||||
<dependent-module archiveName="wsmail-widget-1.9.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/wsmail-widget-TRUNK/wsmail-widget-TRUNK">
|
|
||||||
<dependency-type>uses</dependency-type>
|
<dependency-type>uses</dependency-type>
|
||||||
</dependent-module>
|
</dependent-module>
|
||||||
|
|
||||||
|
|
|
@ -527,7 +527,7 @@ public class AppController implements SubscriberInterface {
|
||||||
|
|
||||||
private void doSaveSmartFolder(SaveSmartFolderEvent event) {
|
private void doSaveSmartFolder(SaveSmartFolderEvent event) {
|
||||||
|
|
||||||
AppControllerExplorer.getEventBus().fireEvent(new AddSmartFolderEvent(event.getSearchText()));
|
AppControllerExplorer.getEventBus().fireEvent(new AddSmartFolderEvent(event.getSearchText(), event.getWorkpaceFolderId()));
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -542,16 +542,10 @@ public class AppController implements SubscriberInterface {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void doElementDoubleClick(final FileGridModel fileModel) {
|
private void doElementDoubleClick(final FileGridModel fileModel) {
|
||||||
// appContrExplorer.expandFolder(event.getIdentifier());
|
|
||||||
|
|
||||||
//COMMENTED 01-02-2013
|
|
||||||
// appContrExplorer.expandFolder(event.getIdentifier());
|
|
||||||
|
|
||||||
|
|
||||||
if(fileModel.getIdentifier()!=null){
|
if(fileModel.getIdentifier()!=null){
|
||||||
|
|
||||||
if(wsPortlet.getSearchAndFilterContainer().isSearchActive()){
|
if(wsPortlet.getSearchAndFilterContainer().isSearchActive()){
|
||||||
AppController.getEventBus().fireEvent(new SearchTextEvent(null));
|
AppController.getEventBus().fireEvent(new SearchTextEvent(null, null));
|
||||||
wsPortlet.getSearchAndFilterContainer().setSearchActive(false);
|
wsPortlet.getSearchAndFilterContainer().setSearchActive(false);
|
||||||
resetSmartFolderSelected();
|
resetSmartFolderSelected();
|
||||||
}
|
}
|
||||||
|
@ -583,23 +577,21 @@ public class AppController implements SubscriberInterface {
|
||||||
// setSearchActive(true);
|
// setSearchActive(true);
|
||||||
appContrExplorer.searching(true);
|
appContrExplorer.searching(true);
|
||||||
wsPortlet.getGxtCardLayoutResultPanel().getToolBarItemFunctionalities().activeButtonsOnSearch(true); //ADDED 09-08-13
|
wsPortlet.getGxtCardLayoutResultPanel().getToolBarItemFunctionalities().activeButtonsOnSearch(true); //ADDED 09-08-13
|
||||||
doSearchText(searchTextEvent.getTextSearch());
|
doSearchText(searchTextEvent.getTextSearch(), searchTextEvent.getFolderId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void doSearchText(String textSearch) {
|
private void doSearchText(String textSearch, String folderId) {
|
||||||
|
|
||||||
if(wsPortlet.getGxtCardLayoutResultPanel().getActivePanel() instanceof GxtItemsPanel){ //If active panel is panel with file items
|
if(wsPortlet.getGxtCardLayoutResultPanel().getActivePanel() instanceof GxtItemsPanel){ //If active panel is panel with file items
|
||||||
|
|
||||||
wsPortlet.getSearchAndFilterContainer().setVisibleButtonSave(true); //ADDED 24/04/2012
|
wsPortlet.getSearchAndFilterContainer().setVisibleButtonSave(true); //ADDED 24/04/2012
|
||||||
|
|
||||||
// wsPortlet.getGxtCardLayoutResultPanel().getToolBarItem().activeAllButtonWithoutGroupView(false); //ADDED 06/02/2013
|
|
||||||
|
|
||||||
wsPortlet.getGridGroupContainer().setBorderAsOnSearch(true);
|
wsPortlet.getGridGroupContainer().setBorderAsOnSearch(true);
|
||||||
|
|
||||||
wsPortlet.getGridGroupContainer().mask(ConstantsExplorer.LOADING,ConstantsExplorer.LOADINGSTYLE);
|
wsPortlet.getGridGroupContainer().mask(ConstantsExplorer.LOADING,ConstantsExplorer.LOADINGSTYLE);
|
||||||
|
|
||||||
appContrExplorer.getRpcWorkspaceService().getItemsBySearchName(textSearch, new AsyncCallback<List<FileGridModel>>() {
|
appContrExplorer.getRpcWorkspaceService().getItemsBySearchName(textSearch, folderId, new AsyncCallback<List<FileGridModel>>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
|
@ -725,7 +717,7 @@ public class AppController implements SubscriberInterface {
|
||||||
wsPortlet.getSearchAndFilterContainer().searchCancel(); //cancel search
|
wsPortlet.getSearchAndFilterContainer().searchCancel(); //cancel search
|
||||||
|
|
||||||
if(wsPortlet.getGxtCardLayoutResultPanel().getActivePanel() instanceof GxtItemsPanel){ //If active panel is panel with file items
|
if(wsPortlet.getGxtCardLayoutResultPanel().getActivePanel() instanceof GxtItemsPanel){ //If active panel is panel with file items
|
||||||
AppController.getEventBus().fireEvent(new SearchTextEvent(null));
|
AppController.getEventBus().fireEvent(new SearchTextEvent(null, null));
|
||||||
}
|
}
|
||||||
|
|
||||||
doPathElementSelected(event);
|
doPathElementSelected(event);
|
||||||
|
@ -1427,7 +1419,7 @@ public class AppController implements SubscriberInterface {
|
||||||
//CASE IS A SEARCH
|
//CASE IS A SEARCH
|
||||||
if(wsPortlet.getSearchAndFilterContainer().isSearchActive()){ //ADDED 12-04-12
|
if(wsPortlet.getSearchAndFilterContainer().isSearchActive()){ //ADDED 12-04-12
|
||||||
wsPortlet.getSearchAndFilterContainer().searchCancel(); //TODO added in 05/04/2012
|
wsPortlet.getSearchAndFilterContainer().searchCancel(); //TODO added in 05/04/2012
|
||||||
AppController.getEventBus().fireEvent(new SearchTextEvent(null));
|
AppController.getEventBus().fireEvent(new SearchTextEvent(null, null));
|
||||||
wsPortlet.getSearchAndFilterContainer().setSearchActive(false);
|
wsPortlet.getSearchAndFilterContainer().setSearchActive(false);
|
||||||
resetSmartFolderSelected();
|
resetSmartFolderSelected();
|
||||||
updatGridViewForSelectedItem(item);
|
updatGridViewForSelectedItem(item);
|
||||||
|
@ -1578,7 +1570,7 @@ public class AppController implements SubscriberInterface {
|
||||||
|
|
||||||
//***ADDED 24/04/2012
|
//***ADDED 24/04/2012
|
||||||
wsPortlet.getSearchAndFilterContainer().searchCancel();
|
wsPortlet.getSearchAndFilterContainer().searchCancel();
|
||||||
eventBus.fireEvent(new SearchTextEvent(null));
|
eventBus.fireEvent(new SearchTextEvent(null, null));
|
||||||
// appContrExplorer.searching(false);
|
// appContrExplorer.searching(false);
|
||||||
//**************
|
//**************
|
||||||
|
|
||||||
|
|
|
@ -2,31 +2,60 @@ package org.gcube.portlets.user.workspace.client.event;
|
||||||
|
|
||||||
import com.google.gwt.event.shared.GwtEvent;
|
import com.google.gwt.event.shared.GwtEvent;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
* The Class SearchTextEvent.
|
||||||
*
|
*
|
||||||
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||||
|
* Oct 9, 2015
|
||||||
*/
|
*/
|
||||||
public class SearchTextEvent extends GwtEvent<SearchTextEventHandler> {
|
public class SearchTextEvent extends GwtEvent<SearchTextEventHandler> {
|
||||||
public static Type<SearchTextEventHandler> TYPE = new Type<SearchTextEventHandler>();
|
public static Type<SearchTextEventHandler> TYPE = new Type<SearchTextEventHandler>();
|
||||||
|
|
||||||
private String textSearch = null;
|
private String textSearch = null;
|
||||||
|
|
||||||
public SearchTextEvent(String text) {
|
private String folderId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantiates a new search text event.
|
||||||
|
*
|
||||||
|
* @param text the text
|
||||||
|
* @param folderId the folder id
|
||||||
|
*/
|
||||||
|
public SearchTextEvent(String text, String folderId) {
|
||||||
this.textSearch = text;
|
this.textSearch = text;
|
||||||
|
this.folderId = folderId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the folderId
|
||||||
|
*/
|
||||||
|
public String getFolderId() {
|
||||||
|
return folderId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see com.google.gwt.event.shared.GwtEvent#getAssociatedType()
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Type<SearchTextEventHandler> getAssociatedType() {
|
public Type<SearchTextEventHandler> getAssociatedType() {
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return TYPE;
|
return TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see com.google.gwt.event.shared.GwtEvent#dispatch(com.google.gwt.event.shared.EventHandler)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void dispatch(SearchTextEventHandler handler) {
|
protected void dispatch(SearchTextEventHandler handler) {
|
||||||
handler.onSearchText(this);
|
handler.onSearchText(this);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the text search.
|
||||||
|
*
|
||||||
|
* @return the text search
|
||||||
|
*/
|
||||||
public String getTextSearch() {
|
public String getTextSearch() {
|
||||||
return textSearch;
|
return textSearch;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@ import org.gcube.portlets.user.workspace.client.model.ScopeModel;
|
||||||
import org.gcube.portlets.user.workspace.client.view.GxtComboBox;
|
import org.gcube.portlets.user.workspace.client.view.GxtComboBox;
|
||||||
import org.gcube.portlets.user.workspace.client.view.toolbars.GxtBreadcrumbPathPanel;
|
import org.gcube.portlets.user.workspace.client.view.toolbars.GxtBreadcrumbPathPanel;
|
||||||
|
|
||||||
|
import com.extjs.gxt.ui.client.Style.VerticalAlignment;
|
||||||
import com.extjs.gxt.ui.client.event.ComponentEvent;
|
import com.extjs.gxt.ui.client.event.ComponentEvent;
|
||||||
import com.extjs.gxt.ui.client.event.KeyListener;
|
import com.extjs.gxt.ui.client.event.KeyListener;
|
||||||
import com.extjs.gxt.ui.client.event.SelectionChangedEvent;
|
import com.extjs.gxt.ui.client.event.SelectionChangedEvent;
|
||||||
|
@ -44,8 +45,12 @@ public class GxtSeachAndFilterPanel extends LayoutContainer {
|
||||||
private ComboBox<ScopeModel> cbViewScope = null;
|
private ComboBox<ScopeModel> cbViewScope = null;
|
||||||
private final TextField<String> textSearch = new TextField<String>();
|
private final TextField<String> textSearch = new TextField<String>();
|
||||||
private Button bSearch = new Button(ConstantsPortlet.SEARCH);
|
private Button bSearch = new Button(ConstantsPortlet.SEARCH);
|
||||||
|
// private Image bSearchIn = Resources.getIconSearchWs().createImage();
|
||||||
|
// private HorizontalPanel hpSearchIn = new HorizontalPanel();
|
||||||
|
// private String searchInFolderId = ""; //is the root
|
||||||
private Button bCancel = new Button(ConstantsPortlet.CANCEL);
|
private Button bCancel = new Button(ConstantsPortlet.CANCEL);
|
||||||
private Button bSave = new Button(ConstantsPortlet.SAVE);
|
private Button bSave = new Button(ConstantsPortlet.SAVE);
|
||||||
|
// private Label labelSearchIn = new Label();
|
||||||
private TextField<String> textFull = new TextField<String>();
|
private TextField<String> textFull = new TextField<String>();
|
||||||
private DateField fromDate = new DateField();
|
private DateField fromDate = new DateField();
|
||||||
private DateField toDate = new DateField();
|
private DateField toDate = new DateField();
|
||||||
|
@ -74,11 +79,9 @@ public class GxtSeachAndFilterPanel extends LayoutContainer {
|
||||||
// this.textSearch.setStyleAttribute("margin-bottom", "0px");
|
// this.textSearch.setStyleAttribute("margin-bottom", "0px");
|
||||||
this.cbViewScope.setWidth(360);
|
this.cbViewScope.setWidth(360);
|
||||||
// this.cbViewScope.setAutoWidth(true);
|
// this.cbViewScope.setAutoWidth(true);
|
||||||
|
|
||||||
this.toolbarPahtPanel = toolBarPathPanel;
|
this.toolbarPahtPanel = toolBarPathPanel;
|
||||||
|
|
||||||
hp.setStyleAttribute("margin-left", "2px");
|
hp.setStyleAttribute("margin-left", "2px");
|
||||||
|
|
||||||
seVisibleButtonsCancelSave(false);
|
seVisibleButtonsCancelSave(false);
|
||||||
|
|
||||||
textSearch.setAllowBlank(true);
|
textSearch.setAllowBlank(true);
|
||||||
|
@ -99,9 +102,55 @@ public class GxtSeachAndFilterPanel extends LayoutContainer {
|
||||||
bSave.setStyleName("wizardButton");
|
bSave.setStyleName("wizardButton");
|
||||||
bSave.getElement().getStyle().setMarginLeft(3, Unit.PX);
|
bSave.getElement().getStyle().setMarginLeft(3, Unit.PX);
|
||||||
|
|
||||||
|
/*bSearchIn.addStyleName("bSearchIn");
|
||||||
|
// hpSearchIn.setVerticalAlign(VerticalAlignment.BOTTOM);
|
||||||
|
bSearchIn.addClickHandler(new ClickHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(ClickEvent event) {
|
||||||
|
final WorkspaceExplorerSelectDialog navigator = new WorkspaceExplorerSelectDialog("Select a Folder", true);
|
||||||
|
|
||||||
|
WorskpaceExplorerSelectNotificationListener listener = new WorskpaceExplorerSelectNotificationListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSelectedItem(Item item) {
|
||||||
|
GWT.log("onSelectedItem: "+item);
|
||||||
|
selectedFolderToSearch(item);
|
||||||
|
navigator.hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailed(Throwable throwable) {
|
||||||
|
GWT.log("onFailed..");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAborted() {
|
||||||
|
GWT.log("onAborted..");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNotValidSelection() {
|
||||||
|
GWT.log("onNotValidSelection..");
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
navigator.addWorkspaceExplorerSelectNotificationListener(listener);
|
||||||
|
navigator.show();
|
||||||
|
}
|
||||||
|
});*/
|
||||||
|
/*
|
||||||
|
initSearchIn();
|
||||||
|
hpSearchIn.setVerticalAlign(VerticalAlignment.MIDDLE);
|
||||||
|
labelSearchIn.setStyleAttribute("margin-right", "2px");
|
||||||
|
hp.add(hpSearchIn);
|
||||||
|
*/
|
||||||
hp.add(bSearch);
|
hp.add(bSearch);
|
||||||
// hp.add(bCancel);
|
|
||||||
hp.add(bSave);
|
hp.add(bSave);
|
||||||
|
hp.setVerticalAlign(VerticalAlignment.MIDDLE);
|
||||||
|
|
||||||
hp.setHeight(20);
|
hp.setHeight(20);
|
||||||
hpMain.setHeight(20);
|
hpMain.setHeight(20);
|
||||||
|
@ -116,18 +165,14 @@ public class GxtSeachAndFilterPanel extends LayoutContainer {
|
||||||
verticalPanel.setId("VerticalPanelSearchAndFilter");
|
verticalPanel.setId("VerticalPanelSearchAndFilter");
|
||||||
verticalPanel.setStyleAttribute("background", "#D0DEF0");
|
verticalPanel.setStyleAttribute("background", "#D0DEF0");
|
||||||
hpMain.add(hp);
|
hpMain.add(hp);
|
||||||
|
hpMain.setVerticalAlign(VerticalAlignment.MIDDLE);
|
||||||
|
|
||||||
//SOLUTION FOR SCOPE INVISIBLE
|
//SOLUTION FOR SCOPE INVISIBLE
|
||||||
cbViewScope.setVisible(false);
|
cbViewScope.setVisible(false);
|
||||||
|
|
||||||
// hpMain.add(hp2);
|
|
||||||
|
|
||||||
// verticalPanel.setLayout(new FitLayout());
|
|
||||||
|
|
||||||
// hpMain.setStyleAttribute("margin", "2px; 8px;");
|
|
||||||
verticalPanel.add(this.toolbarPahtPanel.getToolBarPathPanel());
|
verticalPanel.add(this.toolbarPahtPanel.getToolBarPathPanel());
|
||||||
verticalPanel.add(hpMain);
|
verticalPanel.add(hpMain);
|
||||||
// verticalPanel.setStyleAttribute("background-color", "#d0def0");
|
verticalPanel.setVerticalAlign(VerticalAlignment.MIDDLE);
|
||||||
|
|
||||||
this.addListeners();
|
this.addListeners();
|
||||||
|
|
||||||
|
@ -143,6 +188,24 @@ public class GxtSeachAndFilterPanel extends LayoutContainer {
|
||||||
|
|
||||||
layout();
|
layout();
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
private void initSearchIn(){
|
||||||
|
|
||||||
|
hpSearchIn.removeAll();
|
||||||
|
searchInFolderId = "";
|
||||||
|
labelSearchIn.setText("");
|
||||||
|
// labelSearchIn.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
|
||||||
|
hpSearchIn.add(labelSearchIn);
|
||||||
|
hpSearchIn.setStyleAttribute("margin-left", "3px");
|
||||||
|
hpSearchIn.add(bSearchIn);
|
||||||
|
hpSearchIn.layout(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void selectedFolderToSearch(Item item){
|
||||||
|
searchInFolderId = item.getId();
|
||||||
|
labelSearchIn.setText("in "+item.getName());
|
||||||
|
labelSearchIn.setTitle("search in "+item.getName());
|
||||||
|
}*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update window size
|
* Update window size
|
||||||
|
@ -162,7 +225,8 @@ public class GxtSeachAndFilterPanel extends LayoutContainer {
|
||||||
public void searchText(String value){
|
public void searchText(String value){
|
||||||
textSearch.setValue(value);
|
textSearch.setValue(value);
|
||||||
seVisibleButtonsCancelSave(true);
|
seVisibleButtonsCancelSave(true);
|
||||||
AppController.getEventBus().fireEvent(new SearchTextEvent(value));
|
String parentId = toolbarPahtPanel.getLastParent()!=null?toolbarPahtPanel.getLastParent().getIdentifier():null;
|
||||||
|
AppController.getEventBus().fireEvent(new SearchTextEvent(value, parentId));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addListeners(){
|
private void addListeners(){
|
||||||
|
@ -170,10 +234,12 @@ public class GxtSeachAndFilterPanel extends LayoutContainer {
|
||||||
bSearch.addClickHandler(new ClickHandler() {
|
bSearch.addClickHandler(new ClickHandler() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(ClickEvent event) {
|
public void onClick(ClickEvent event) {
|
||||||
if(textSearch.getValue()!=null && !textSearch.getValue().isEmpty() && textSearch.isValid()){
|
if(isValidSearch()){
|
||||||
// seVisibleButtonsCancelSave(true);
|
// seVisibleButtonsCancelSave(true);
|
||||||
// AppController.getEventBus().fireEvent(new SearchTextEvent(textSearch.getValue()));
|
// AppController.getEventBus().fireEvent(new SearchTextEvent(textSearch.getValue()));
|
||||||
searchText(textSearch.getValue());
|
searchText(textSearch.getValue());
|
||||||
|
}else if(textSearch.getValue()==null || textSearch.getValue().isEmpty()){
|
||||||
|
searchCancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -181,9 +247,11 @@ public class GxtSeachAndFilterPanel extends LayoutContainer {
|
||||||
KeyListener keyListener = new KeyListener() {
|
KeyListener keyListener = new KeyListener() {
|
||||||
public void componentKeyUp(ComponentEvent event) {
|
public void componentKeyUp(ComponentEvent event) {
|
||||||
if (event.getKeyCode() == 13) { // KEY_ENTER
|
if (event.getKeyCode() == 13) { // KEY_ENTER
|
||||||
// seVisibleButtonsCancelSave(true);
|
if(isValidSearch()){
|
||||||
// AppController.getEventBus().fireEvent(new SearchTextEvent(textSearch.getValue()));
|
|
||||||
searchText(textSearch.getValue());
|
searchText(textSearch.getValue());
|
||||||
|
}else if(textSearch.getValue()==null || textSearch.getValue().isEmpty()){
|
||||||
|
searchCancel();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -205,7 +273,8 @@ public class GxtSeachAndFilterPanel extends LayoutContainer {
|
||||||
public void onClick(ClickEvent event) {
|
public void onClick(ClickEvent event) {
|
||||||
if(textSearch.getValue()!=null && !textSearch.getValue().isEmpty() && textSearch.isValid()){
|
if(textSearch.getValue()!=null && !textSearch.getValue().isEmpty() && textSearch.isValid()){
|
||||||
if (textSearch.getValue() != null && textSearch.getValue().length()>0) {
|
if (textSearch.getValue() != null && textSearch.getValue().length()>0) {
|
||||||
AppController.getEventBus().fireEvent(new SaveSmartFolderEvent(null, textSearch.getValue(), null));
|
String parentId = toolbarPahtPanel.getLastParent()!=null?toolbarPahtPanel.getLastParent().getIdentifier():null;
|
||||||
|
AppController.getEventBus().fireEvent(new SaveSmartFolderEvent(null, textSearch.getValue(), parentId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -234,6 +303,10 @@ public class GxtSeachAndFilterPanel extends LayoutContainer {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isValidSearch(){
|
||||||
|
return textSearch.getValue()!=null && !textSearch.getValue().isEmpty() && textSearch.isValid();
|
||||||
|
}
|
||||||
|
|
||||||
public void seVisibleButtonsCancelSave(boolean flag){
|
public void seVisibleButtonsCancelSave(boolean flag){
|
||||||
|
|
||||||
this.bCancel.setVisible(flag);
|
this.bCancel.setVisible(flag);
|
||||||
|
@ -242,6 +315,7 @@ public class GxtSeachAndFilterPanel extends LayoutContainer {
|
||||||
|
|
||||||
public void searchCancel(){
|
public void searchCancel(){
|
||||||
resetFields();
|
resetFields();
|
||||||
|
// initSearchIn();
|
||||||
seVisibleButtonsCancelSave(false);
|
seVisibleButtonsCancelSave(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -333,3 +333,6 @@
|
||||||
.Breadcrumbs-Personal a:hover {
|
.Breadcrumbs-Personal a:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
.bSearchIn {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
Loading…
Reference in New Issue