public static Button createPublishButton ( final I_CmsUpdateListener < String > updateListener ) { Button publishButton = CmsToolBar . createButton ( FontOpenCms . PUBLISH , CmsVaadinUtils . getMessageText ( Messages . GUI_PUBLISH_BUTTON_TITLE_0 ) ) ; if ( CmsAppWorkplaceUi . isOnlineProject ( ) ) { // disable publishing in online project publishButton . setEnabled ( false ) ; publishButton . setDescription ( CmsVaadinUtils . getMessageText ( Messages . GUI_TOOLBAR_NOT_AVAILABLE_ONLINE_0 ) ) ; } publishButton . addClickListener ( new ClickListener ( ) { /** Serial version id. */ private static final long serialVersionUID = 1L ; public void buttonClick ( ClickEvent event ) { CmsAppWorkplaceUi . get ( ) . disableGlobalShortcuts ( ) ; CmsGwtDialogExtension extension = new CmsGwtDialogExtension ( A_CmsUI . get ( ) , updateListener ) ; extension . openPublishDialog ( ) ; } } ) ; return publishButton ; }
Creates the publish button .