Project

General

Profile

« Previous | Next » 

Revision 1a836a82

Added by Andreas Kohlbecker almost 6 years ago

readonly notification in editors

View differences:

src/main/java/eu/etaxonomy/vaadin/mvp/AbstractPopupEditor.java
81 81
public abstract class AbstractPopupEditor<DTO extends Object, P extends AbstractEditorPresenter<DTO, ? extends ApplicationView>>
82 82
    extends AbstractPopupView<P> {
83 83

  
84
    /**
85
     *
86
     */
87
    private static final String READ_ONLY_MESSAGE_TEXT = "The editor is in read-only mode. Your authorities are not sufficient to edit this data.";
88

  
84 89
    public static final Logger logger = Logger.getLogger(AbstractPopupEditor.class);
85 90

  
86 91
    private BeanFieldGroup<DTO> fieldGroup;
......
206 211
    @Override
207 212
    public void setReadOnly(boolean readOnly) {
208 213
        super.setReadOnly(readOnly);
214
        if(readOnly){
215
            statusMessageLabel.setValue(READ_ONLY_MESSAGE_TEXT);
216
            statusMessageLabel.addStyleName(ValoTheme.LABEL_COLORED);
217
        } else {
218
            statusMessageLabel.setValue(null);
219
        }
220
        statusMessageLabel.setVisible(readOnly);
209 221
        save.setVisible(!readOnly);
210 222
        delete.setVisible(!readOnly);
211 223
        cancel.setCaption(readOnly ? "Close" : "Cancel");
src/main/webapp/VAADIN/themes/edit-valo/edit-valo.scss
471 471
            float: right;
472 472
        }
473 473
    }
474

  
474
    
475 475
    // ---------- ---------- //
476 476

  
477 477
    .v-slot-message-item {

Also available in: Unified diff