Fixed close button
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-expression-widget@93147 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
de4d3ae3e3
commit
bc0cbdd652
|
@ -3,6 +3,8 @@ package org.gcube.portlets.user.td.expressionwidget.client;
|
|||
import org.gcube.portlets.user.td.expressionwidget.client.resource.ExpressionResources;
|
||||
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ExpressionEvent;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.client.type.ExpressionType;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.C_Expression;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnDataType;
|
||||
|
@ -15,7 +17,9 @@ import com.google.web.bindery.event.shared.EventBus;
|
|||
import com.sencha.gxt.widget.core.client.Window;
|
||||
import com.sencha.gxt.widget.core.client.box.AlertMessageBox;
|
||||
import com.sencha.gxt.widget.core.client.event.HideEvent;
|
||||
import com.sencha.gxt.widget.core.client.event.SelectEvent;
|
||||
import com.sencha.gxt.widget.core.client.event.HideEvent.HideHandler;
|
||||
import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -62,13 +66,39 @@ public class ColumnExpressionDialog extends Window {
|
|||
setBodyBorder(false);
|
||||
setResizable(false);
|
||||
setHeadingText("New Rule");
|
||||
setClosable(false);
|
||||
setClosable(true);
|
||||
setModal(true);
|
||||
forceLayoutOnResize = true;
|
||||
getHeader().setIcon(ExpressionResources.INSTANCE.rule());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected void initTools() {
|
||||
super.initTools();
|
||||
|
||||
closeBtn.addSelectHandler(new SelectHandler() {
|
||||
|
||||
|
||||
public void onSelect(SelectEvent event) {
|
||||
close();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
protected void close (){
|
||||
ExpressionEvent expressionEvent = new ExpressionEvent(
|
||||
ExpressionType.EXPRESSIONNULL);
|
||||
Log.debug(expressionEvent.toString());
|
||||
hide();
|
||||
eventBus.fireEvent(expressionEvent);
|
||||
}
|
||||
|
||||
|
||||
protected void create() {
|
||||
if (column.getTypeCode()
|
||||
.compareTo(ColumnTypeCode.ANNOTATION.toString()) == 0
|
||||
|
|
|
@ -18,7 +18,9 @@ import com.google.web.bindery.event.shared.EventBus;
|
|||
import com.sencha.gxt.widget.core.client.Window;
|
||||
import com.sencha.gxt.widget.core.client.box.AlertMessageBox;
|
||||
import com.sencha.gxt.widget.core.client.event.HideEvent;
|
||||
import com.sencha.gxt.widget.core.client.event.SelectEvent;
|
||||
import com.sencha.gxt.widget.core.client.event.HideEvent.HideHandler;
|
||||
import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -66,11 +68,28 @@ public class ColumnFilterDialog extends Window {
|
|||
setBodyBorder(false);
|
||||
setResizable(false);
|
||||
setHeadingText("New Filter");
|
||||
setClosable(false);
|
||||
setClosable(true);
|
||||
getHeader().setIcon(ExpressionResources.INSTANCE.filter());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected void initTools() {
|
||||
super.initTools();
|
||||
|
||||
closeBtn.addSelectHandler(new SelectHandler() {
|
||||
|
||||
|
||||
public void onSelect(SelectEvent event) {
|
||||
close();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
protected void create() {
|
||||
if (column.getTypeCode()
|
||||
.compareTo(ColumnTypeCode.ANNOTATION.toString()) == 0
|
||||
|
|
|
@ -6,6 +6,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.C_Expressi
|
|||
|
||||
import com.google.web.bindery.event.shared.EventBus;
|
||||
import com.sencha.gxt.widget.core.client.Window;
|
||||
import com.sencha.gxt.widget.core.client.event.SelectEvent;
|
||||
import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -46,7 +48,25 @@ public class MultiColumnFilterDialog extends Window {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected void initTools() {
|
||||
super.initTools();
|
||||
|
||||
closeBtn.addSelectHandler(new SelectHandler() {
|
||||
|
||||
|
||||
public void onSelect(SelectEvent event) {
|
||||
close();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
protected void close() {
|
||||
hide();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue