@Override
 public void actionPerformed(final ActionEvent event) {
   final StateToken token = session.getCurrentStateToken().copy().clearDocument();
   final String url =
       new Url(
               session.getSiteUrl() + FileConstants.EVENTSSERVLET,
               new UrlParam(FileConstants.TOKEN, token.toString()))
           .toString();
   NotifyUser.info(
       i18n.t("Calendar exporting"),
       i18n.t(
           "Open or use this address in your prefered calendar program for instance in your mobile: [%s]",
           TextUtils.generateHtmlLink(url, url, true)),
       ID,
       true);
 }
Beispiel #2
0
 /**
  * Instantiates a new p space parts.
  *
  * @param session the session
  * @param pspacePresenter the pspace presenter
  */
 @Inject
 public PSpaceParts(final Session session, final Provider<PSpacePresenter> pspacePresenter) {
   session.onAppStart(
       true,
       new AppStartHandler() {
         @Override
         public void onAppStart(final AppStartEvent event) {
           pspacePresenter.get();
         }
       });
 }
 @Override
 public void actionPerformed(final ActionEvent event) {
   NotifyUser.showProgress();
   final boolean setPublic = !isPublic();
   listService
       .get()
       .setPublic(
           session.getUserHash(),
           session.getCurrentStateToken(),
           setPublic,
           new AsyncCallbackSimple<StateContainerDTO>() {
             @Override
             public void onSuccess(final StateContainerDTO result) {
               NotifyUser.info(
                   setPublic
                       ? i18n.t("This list is now public")
                       : i18n.t("This list is now restricted to the public"));
               stateManager.setRetrievedState(result);
               stateManager.refreshCurrentState();
               NotifyUser.hideProgress();
             }
           });
 }
 @Override
 public void onPreviewAllowed(final Widget widget, final SimpleDropController dropController)
     throws VetoDragException {
   if (widget instanceof FolderItemWidget) {
     if (!((FolderItemWidget) widget).getToken().isComplete()) {
       throw new VetoDragException();
     }
   }
   if (widget instanceof BasicDragableThumb) {
     if (!session.getCurrentState().getGroupRights().isAdministrable()) {
       throw new VetoDragException();
     }
   }
   super.onPreviewAllowed(widget, dropController);
 }
Beispiel #5
0
 /**
  * Instantiates a new user opt tools presenter.
  *
  * @param session the session
  * @param stateManager the state manager
  * @param i18n the i18n
  * @param entityOptions the entity options
  * @param groupService the group service
  * @param view the view
  */
 @Inject
 public UserOptToolsPresenter(
     final Session session,
     final StateManager stateManager,
     final I18nTranslationService i18n,
     final UserOptions entityOptions,
     final Provider<GroupServiceAsync> groupService,
     final UserOptToolsView view) {
   super(session, stateManager, i18n, entityOptions, groupService);
   init(view);
   session.onUserSignIn(
       true,
       new UserSignInHandler() {
         @Override
         public void onUserSignIn(final UserSignInEvent event) {
           setState();
         }
       });
 }