Minor Update

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@113990 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2015-04-13 17:03:18 +00:00
parent 37602b7d7e
commit eb52451ed6
2 changed files with 59 additions and 5 deletions

View File

@ -10,6 +10,10 @@ import java.util.HashMap;
import org.gcube.portlets.user.td.chartswidget.client.ChartsWidgetTD;
import org.gcube.portlets.user.td.client.logs.TDMLogs;
import org.gcube.portlets.user.td.client.rstudio.RStudio;
import org.gcube.portlets.user.td.client.rule.RuleApplyDialog;
import org.gcube.portlets.user.td.client.rule.RuleDeleteDialog;
import org.gcube.portlets.user.td.client.rule.RuleOpenDialog;
import org.gcube.portlets.user.td.client.rule.RuleShareDialog;
import org.gcube.portlets.user.td.client.template.TemplateApplyDialog;
import org.gcube.portlets.user.td.client.template.TemplateDeleteDialog;
import org.gcube.portlets.user.td.client.template.TemplateOpenDialog;
@ -21,6 +25,7 @@ import org.gcube.portlets.user.td.expressionwidget.client.ColumnFilterDialog;
import org.gcube.portlets.user.td.expressionwidget.client.MultiColumnFilterDialog;
import org.gcube.portlets.user.td.expressionwidget.client.ReplaceColumnByExpressionDialog;
import org.gcube.portlets.user.td.expressionwidget.client.RowsDeleteByExpressionDialog;
import org.gcube.portlets.user.td.expressionwidget.client.RuleDialog;
import org.gcube.portlets.user.td.extractcodelistwidget.client.ExtractCodelistWizardTD;
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
@ -352,7 +357,7 @@ public class TabularDataController {
String currentLocaleCookie = Cookies.getCookie(LocaleInfo
.getLocaleCookieName());
Log.debug(TD_LANG_COOKIE+":" + currentLocaleCookie);
Log.debug(TD_LANG_COOKIE + ":" + currentLocaleCookie);
LocaleInfo currentLocaleInfo = LocaleInfo.getCurrentLocale();
Log.debug("Current Locale:" + currentLocaleInfo.getLocaleName());
@ -364,8 +369,8 @@ public class TabularDataController {
long nowLong = now.getTime();
nowLong = nowLong + (1000 * 60 * 60 * 24 * 21);
now.setTime(nowLong);
String cookieLang=Cookies.getCookie(TD_LANG_COOKIE);
if(cookieLang!=null){
String cookieLang = Cookies.getCookie(TD_LANG_COOKIE);
if (cookieLang != null) {
Cookies.removeCookie(TD_LANG_COOKIE);
}
Cookies.setCookie(TD_LANG_COOKIE, localeName, now);
@ -892,14 +897,19 @@ public class TabularDataController {
case COLUMN_BATCH_REPLACE:
break;
case RULE_NEW:
openNewRule();
break;
case RULE_MODIFY:
openModifyRule();
break;
case RULE_DELETE:
openDeleteRule();
break;
case RULE_APPLY:
openApplyRule();
break;
case RULE_SHARE:
openShareRule();
break;
case TEMPLATE_OPEN:
openTemplateOpen();
@ -1701,6 +1711,50 @@ public class TabularDataController {
});
}
private void openNewRule() {
Log.debug("Request Open New Rule Dialog");
RuleDialog cfDialog = new RuleDialog(eventBus);
cfDialog.show();
}
private void openModifyRule() {
Log.debug("Request Open Modify Rule Dialog");
RuleOpenDialog cfDialog = new RuleOpenDialog(eventBus);
cfDialog.show();
}
private void openDeleteRule() {
Log.debug("Request Open Delete Rule Dialog");
RuleDeleteDialog cfDialog = new RuleDeleteDialog(eventBus);
cfDialog.show();
}
private void openApplyRule() {
Log.debug("Request Open Apply Rule Dialog");
if (trId != null) {
RuleApplyDialog raDialog = new RuleApplyDialog(
trId, eventBus);
raDialog.show();
} else {
Log.error("TRId is null");
UtilsGXT3.alert("Error",
"No current tabular resource present");
}
}
private void openShareRule() {
Log.debug("Request Open Share Rule Dialog");
RuleShareDialog cfDialog = new RuleShareDialog(eventBus);
cfDialog.show();
}
private void callDiscard() {
HistoryDiscard historyDiscard = new HistoryDiscard(eventBus);
historyDiscard.discard();

View File

@ -57,12 +57,12 @@ public class TabularDataRibbon {
con = new VerticalLayoutContainer();
con.add(modifyToolBar.getToolBar(), vldata);
ribbon.add(con, msgs.modify());
/*
ruleToolBar = new RuleToolBar(eventBus);
con = new VerticalLayoutContainer();
con.add(ruleToolBar.getToolBar(), vldata);
ribbon.add(con, msgs.rule());
*/
templateToolBar = new TemplateToolBar(eventBus);
con = new VerticalLayoutContainer();
con.add(templateToolBar.getToolBar(), vldata);