use of com.qcadoo.view.internal.ribbon.model.InternalRibbonActionItem in project qcadoo by qcadoo.
the class RibbonTemplates method createFormSaveAction.
private InternalRibbonActionItem createFormSaveAction(final ViewDefinition viewDefinition) {
InternalRibbonActionItem ribbonSaveAction = new RibbonActionItemImpl();
ribbonSaveAction.setAction(RibbonUtils.translateRibbonAction("#{form}.performSave;", viewDefinition));
ribbonSaveAction.setIcon("saveIcon24.png");
ribbonSaveAction.setName("save");
ribbonSaveAction.setEnabled(true);
ribbonSaveAction.setType(RibbonActionItem.Type.BIG_BUTTON);
return ribbonSaveAction;
}
use of com.qcadoo.view.internal.ribbon.model.InternalRibbonActionItem in project qcadoo by qcadoo.
the class RibbonTemplates method createFormSaveAndBackAction.
private InternalRibbonActionItem createFormSaveAndBackAction(final ViewDefinition viewDefinition) {
InternalRibbonActionItem ribbonSaveBackAction = new RibbonActionItemImpl();
ribbonSaveBackAction.setAction(RibbonUtils.translateRibbonAction("#{form}.performSave; #{window}.performBack;", viewDefinition));
ribbonSaveBackAction.setIcon("saveBackIcon24.png");
ribbonSaveBackAction.setName("saveBack");
ribbonSaveBackAction.setEnabled(true);
ribbonSaveBackAction.setType(RibbonActionItem.Type.BIG_BUTTON);
return ribbonSaveBackAction;
}
use of com.qcadoo.view.internal.ribbon.model.InternalRibbonActionItem in project qcadoo by qcadoo.
the class RibbonTemplates method createGridCopyAction.
private InternalRibbonActionItem createGridCopyAction(final ViewDefinition viewDefinition) {
InternalRibbonActionItem ribbonCopyAction = new RibbonActionItemImpl();
ribbonCopyAction.setAction(RibbonUtils.translateRibbonAction("#{grid}.performCopy;", viewDefinition));
ribbonCopyAction.setIcon("copyIcon16.png");
ribbonCopyAction.setName("copy");
ribbonCopyAction.setEnabled(false);
ribbonCopyAction.setDefaultEnabled(false);
ribbonCopyAction.setScript("var listener = {onChange: function(selectedArray) {if (selectedArray.length == 0) {" + "this.disable();} else {this.enable();}}}; #{grid}.addOnChangeListener(listener);");
ribbonCopyAction.setType(RibbonActionItem.Type.SMALL_BUTTON);
return ribbonCopyAction;
}
use of com.qcadoo.view.internal.ribbon.model.InternalRibbonActionItem in project qcadoo by qcadoo.
the class RibbonTemplates method createFormSaveActionTemplate.
private InternalRibbonGroup createFormSaveActionTemplate(final ViewDefinition viewDefinition, final SecurityRole role) {
InternalRibbonActionItem ribbonSaveAction = new RibbonActionItemImpl();
ribbonSaveAction.setAction(RibbonUtils.translateRibbonAction("#{form}.performSave; #{window}.performBack", viewDefinition));
ribbonSaveAction.setIcon("saveBackIcon24.png");
ribbonSaveAction.setName("saveBack");
ribbonSaveAction.setType(RibbonActionItem.Type.BIG_BUTTON);
ribbonSaveAction.setEnabled(true);
InternalRibbonGroup ribbonGroup = new RibbonGroupImpl(ACTIONS, role);
ribbonGroup.addItem(ribbonSaveAction);
return ribbonGroup;
}
use of com.qcadoo.view.internal.ribbon.model.InternalRibbonActionItem in project qcadoo by qcadoo.
the class RibbonTemplates method createGridExportPdfAction.
private InternalRibbonActionItem createGridExportPdfAction(final ViewDefinition viewDefinition) {
InternalRibbonActionItem ribbonExportPdfAction = new RibbonActionItemImpl();
ribbonExportPdfAction.setIcon("pdfIcon16.png");
ribbonExportPdfAction.setName("pdf");
ribbonExportPdfAction.setEnabled(true);
ribbonExportPdfAction.setScript("var listener = {onClick: function() {#{grid}.performEvent('exportToPdf', [], 'exportToPdf');}};" + " this.addOnChangeListener(listener);");
ribbonExportPdfAction.setType(RibbonActionItem.Type.SMALL_BUTTON);
return ribbonExportPdfAction;
}
Aggregations