Updated Rules

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@114366 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2015-04-23 13:44:33 +00:00
parent d2d1d39a6d
commit f5f0a20244
8 changed files with 26 additions and 18 deletions

View File

@ -135,11 +135,11 @@ public interface TabularDataResources extends ClientBundle {
@Source("rule-close.png")
ImageResource ruleClose();
@Source("rule-edit_32.png")
ImageResource ruleEdit32();
@Source("rule-open_32.png")
ImageResource ruleOpen32();
@Source("rule-edit.png")
ImageResource ruleEdit();
@Source("rule-open.png")
ImageResource ruleOpen();
@Source("rule-delete.png")
ImageResource ruleDelete();

View File

@ -74,7 +74,7 @@ public class RuleToolBar {
rulesGroup.add(ruleLayout);
ruleOpenButton = new TextButton(msgs.ruleOpenButton(),
TabularDataResources.INSTANCE.ruleEdit32());
TabularDataResources.INSTANCE.ruleOpen32());
ruleOpenButton.enable();
ruleOpenButton.setToolTip(msgs.ruleOpenButtonToolTip());
ruleOpenButton.setScale(ButtonScale.LARGE);

View File

@ -1,9 +1,9 @@
package org.gcube.portlets.user.td.client.rule;
import org.gcube.portlets.user.td.client.resource.TabularDataResources;
import org.gcube.portlets.user.td.expressionwidget.client.RuleDialog;
import org.gcube.portlets.user.td.expressionwidget.client.notification.RuleDialogNotification;
import org.gcube.portlets.user.td.expressionwidget.client.notification.RuleDialogNotification.RuleDialogNotificationListener;
import org.gcube.portlets.user.td.expressionwidget.client.RuleEditDialog;
import org.gcube.portlets.user.td.expressionwidget.client.notification.RuleEditDialogNotification;
import org.gcube.portlets.user.td.expressionwidget.client.notification.RuleEditDialogNotification.RuleEditDialogNotificationListener;
import org.gcube.portlets.user.td.gwtservice.shared.rule.RuleDescriptionData;
import com.allen_sauer.gwt.log.client.Log;
@ -18,16 +18,16 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class RuleOpenDialog extends Window implements RuleDialogNotificationListener {
public class RuleOpenDialog extends Window implements RuleEditDialogNotificationListener {
private static final String WIDTH = "720px";
private static final String HEIGHT = "530px";
private EventBus eventBus;
private RuleOpenPanel rulesOpenPanel;
private EventBus eventBus;
public RuleOpenDialog(EventBus eventBus) {
initWindow();
this.eventBus=eventBus;
rulesOpenPanel= new RuleOpenPanel(this,
initWindow();
rulesOpenPanel= new RuleOpenPanel(this,
eventBus);
add(rulesOpenPanel);
}
@ -41,7 +41,7 @@ public class RuleOpenDialog extends Window implements RuleDialogNotificationList
setClosable(true);
setModal(true);
forceLayoutOnResize = true;
getHeader().setIcon(TabularDataResources.INSTANCE.ruleEdit());
getHeader().setIcon(TabularDataResources.INSTANCE.ruleOpen());
}
@ -72,14 +72,20 @@ public class RuleOpenDialog extends Window implements RuleDialogNotificationList
protected void openRuleDialog(RuleDescriptionData ruleDescriptionData) {
Log.debug("Request Open New Rule Dialog");
RuleDialog cfDialog = new RuleDialog(ruleDescriptionData,eventBus);
RuleEditDialog reDialog = new RuleEditDialog(ruleDescriptionData,eventBus);
reDialog.addRuleEditDialogNotificationListener(this);
reDialog.show();
/*RuleDialog cfDialog = new RuleDialog(ruleDescriptionData,eventBus);
cfDialog.addRuleDialogNotificationListener(this);
cfDialog.show();
cfDialog.show();*/
}
@Override
public void onNotification(RuleDialogNotification ruleDialogNotification) {
public void onNotification(RuleEditDialogNotification ruleEditDialogNotification) {
rulesOpenPanel.gridReload();
}
@ -94,6 +100,8 @@ public class RuleOpenDialog extends Window implements RuleDialogNotificationList
Log.debug("Error in edit rule: "+throwable.getLocalizedMessage());
}

View File

@ -282,7 +282,7 @@ public class RuleOpenPanel extends FramedPanel {
toolBar.getElement().getStyle().setProperty("borderBottom", "none");
btnOpen = new TextButton("Edit");
btnOpen.setIcon(TabularDataResources.INSTANCE.ruleEdit());
btnOpen.setIcon(TabularDataResources.INSTANCE.ruleOpen());
btnOpen.setIconAlign(IconAlign.RIGHT);
btnOpen.setToolTip("Edit");
btnOpen.addSelectHandler(new SelectHandler() {