Fixed alert message for export menu item disabled
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/reports@71087 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
805b40d661
commit
eaacd1d5c8
|
@ -232,14 +232,23 @@ public class Headerbar extends Composite{
|
||||||
Command openNothing = new Command() {
|
Command openNothing = new Command() {
|
||||||
|
|
||||||
public void execute() {
|
public void execute() {
|
||||||
|
|
||||||
MessageBox.alert("Alert",
|
|
||||||
"Export is disabled for templates, please save this template as a Report and retry", null);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return openNothing;
|
return openNothing;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Command getDisabledExportMenuItemCmd() {
|
||||||
|
|
||||||
|
Command disabledExportMenuItemCmd = new Command() {
|
||||||
|
public void execute() {
|
||||||
|
|
||||||
|
MessageBox.alert("Alert",
|
||||||
|
"Export is disabled for templates, please save this template as a Report and retry." +
|
||||||
|
" If you just saved this Template as a Report please save it and reopen the Report", null);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return disabledExportMenuItemCmd;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* temporary command
|
* temporary command
|
||||||
* @return the command instance
|
* @return the command instance
|
||||||
|
@ -328,10 +337,10 @@ public class Headerbar extends Composite{
|
||||||
exportsMenu.setAnimationEnabled(true);
|
exportsMenu.setAnimationEnabled(true);
|
||||||
MenuItem toReturn = new MenuItem("Export", exportsMenu);
|
MenuItem toReturn = new MenuItem("Export", exportsMenu);
|
||||||
|
|
||||||
optionDOCX = new MenuItem("<font color=\"gray\">"+ EXPORT_OPENXML +"</font>", true, getNullCommand());
|
optionDOCX = new MenuItem("<font color=\"gray\">"+ EXPORT_OPENXML +"</font>", true, getDisabledExportMenuItemCmd());
|
||||||
optionPDF = new MenuItem("<font color=\"gray\">Export to PDF</font>", true, getNullCommand());
|
optionPDF = new MenuItem("<font color=\"gray\">Export to PDF</font>", true, getDisabledExportMenuItemCmd());
|
||||||
optionHTML = new MenuItem("<font color=\"gray\">"+ EXPORT_HTML +"</font>", true, getNullCommand());
|
optionHTML = new MenuItem("<font color=\"gray\">"+ EXPORT_HTML +"</font>", true, getDisabledExportMenuItemCmd());
|
||||||
optionFimes = new MenuItem("<font color=\"gray\">"+ EXPORT_FIMES +"</font>", true, getNullCommand());
|
optionFimes = new MenuItem("<font color=\"gray\">"+ EXPORT_FIMES +"</font>", true, getDisabledExportMenuItemCmd());
|
||||||
|
|
||||||
exportsMenu.addItem(optionDOCX);
|
exportsMenu.addItem(optionDOCX);
|
||||||
exportsMenu.addItem(optionHTML);
|
exportsMenu.addItem(optionHTML);
|
||||||
|
|
Reference in New Issue