Example usage for com.google.gwt.user.client Window enableScrolling

List of usage examples for com.google.gwt.user.client Window enableScrolling

Introduction

In this page you can find the example usage for com.google.gwt.user.client Window enableScrolling.

Prototype

public static void enableScrolling(boolean enable) 

Source Link

Usage

From source file:org.ednovo.gooru.client.mvp.home.library.assign.AssignPopupVc.java

License:Open Source License

/**
 * // w  w  w .  j a  va 2  s .  c om
 */
public AssignPopupVc(String collectionIdVal, String collectionTitle, String collectionDescription) {
    super(false);

    res = AssignPopUpCBundle.INSTANCE;
    AssignPopUpCBundle.INSTANCE.css().ensureInjected();
    add(uiBinder.createAndBindUi(this));
    this.setGlassEnabled(true);
    swithUrlLbl.setText(GL0639);
    swithToEmbedLbl.setText(GL0640);
    AppClientFactory.getEventBus().addHandler(SetLoginStatusEvent.TYPE, setLoginStatusHandler);

    setLabelsAndIds();
    setHandlers();

    shareContainer = new ShareViewUc("", "");
    ftmPanel = new HTMLPanel("");

    htmlLoginPanel.setVisible(false);

    loadingImageLabel.setVisible(true);
    popupContentAssign.setVisible(false);

    AppClientFactory.getInjector().getClasspageService().getSCollIdClasspageById(collectionIdVal,
            new AsyncCallback<CollectionDo>() {

                @Override
                public void onFailure(Throwable caught) {

                }

                @Override
                public void onSuccess(CollectionDo result) {

                    toAssignStr = result.getGooruOid();

                    if (result.getGooruOid() != null) {

                        collectionDoGlobal = result;

                        if (AppClientFactory.isAnonymous()) {
                            hideContainers();

                        } else {
                            loadListContainers();

                        }

                    }

                    loadingImageLabel.setVisible(false);
                    popupContentAssign.setVisible(true);

                }
            });
    generateShareLink(collectionIdVal, collectionTitle, collectionDescription);
    setShareUrlGenerationAsyncCallback(new SimpleAsyncCallback<Map<String, String>>() {

        @Override
        public void onSuccess(Map<String, String> result) {
            embedBitlyLink = result.get("decodeRawUrl");
        }
    });
    Window.enableScrolling(false);
    AppClientFactory.fireEvent(new SetHeaderZIndexEvent(99, false));
    this.center();
}

From source file:org.ednovo.gooru.client.mvp.home.library.assign.SuccessPopupAssignVc.java

License:Open Source License

/**
 * //  ww w. j a v  a2  s.c  om
 */
public SuccessPopupAssignVc(String assignmentTitle, String collectionTitle, String classpageTitle) {
    super(false);
    this.res = AssignPopUpCBundle.INSTANCE;
    res.css().ensureInjected();
    add(binder.createAndBindUi(this));
    this.setGlassEnabled(true);

    Window.enableScrolling(false);
    AppClientFactory.fireEvent(new SetHeaderZIndexEvent(99, false));

    this.center();
    lblAssignmentTitle.setText(assignmentTitle);
    lblCollectionTitle.setText(collectionTitle);
    lblClasspageTitle.setText(classpageTitle + ":");
}

From source file:org.ednovo.gooru.client.mvp.home.library.customize.LoginCustomizePopUp.java

License:Open Source License

/**
 * /*from   w ww .ja  v a  2  s .  c  om*/
 */
public LoginCustomizePopUp(String collectionId, final Boolean loginFlag) {
    super(false);
    this.res = AssignPopUpCBundle.INSTANCE;
    res.css().ensureInjected();
    add(binder.createAndBindUi(this));
    this.setGlassEnabled(true);

    panelAssign.getElement().getStyle().setMarginBottom(10, Unit.PX);
    loginCustom.getElement().getStyle().setMarginBottom(15, Unit.PX);

    Window.enableScrolling(false);
    AppClientFactory.fireEvent(new SetHeaderZIndexEvent(99, false));

    popupcontentCustomize.setVisible(false);
    loadingImageLabel.setVisible(true);

    AppClientFactory.getInjector().getClasspageService().getSCollIdClasspageById(collectionId,
            new AsyncCallback<CollectionDo>() {

                @Override
                public void onFailure(Throwable caught) {

                }

                @Override
                public void onSuccess(CollectionDo result) {
                    successDesc.setText(MessageProperties.GL0476);

                    if (loginFlag) {
                        loginCustom.setVisible(true);
                        copyCollectionSuccess.setVisible(false);
                        LoginPluginView assignWidget = new LoginPluginView(result) {

                            @Override
                            public void closePoupfromChild() {
                                closePoup();
                            }

                            @Override
                            public void showSuccessMsgfromChild(String collectionId) {
                                showSuccessMsg(collectionId);

                            }
                        };
                        loginCustom.add(assignWidget);
                    } else {
                        loginCustom.setVisible(false);
                        copyCollectionSuccess.setVisible(true);
                        AppClientFactory.getInjector().getResourceService().copyCollection(result, "true", null,
                                getSaveCollectionAsyncCallback());

                    }
                    popupcontentCustomize.setVisible(true);
                    loadingImageLabel.setVisible(false);
                }
            });

    MixpanelUtil.mixpanelEvent("CoursePage_customize_collection");
    this.center();

}

From source file:org.ednovo.gooru.client.mvp.home.library.LibraryTopicListView.java

License:Open Source License

/**
 * /*from  w w w .  j  av  a  2s.  c o  m*/
 * @function onassignCollectionBtnClicked 
 * 
 * @created_date : 11-Dec-2013
 * 
 * @description
 * 
 * 
 * @parm(s) : @param clickEvent
 * 
 * @return : void
 *
 * @throws : <Mentioned if any exceptions>
 *
 * 
 */
@UiHandler("assignCollectionBtn")
public void onassignCollectionBtnClicked(ClickEvent clickEvent) {
    String collectionId = getConceptDo().getGooruOid();
    if (AppClientFactory.getPlaceManager().getRequestParameter(STANDARD_ID) != null) {
        MixpanelUtil.mixpanelEvent("standardlibrary_assign_collection");
    }
    MixpanelUtil.mixpanelEvent("LandingPage_Assign_Collection");

    if (!isAssignPopup) {
        isAssignPopup = true;
        AssignPopupVc successPopupVc = new AssignPopupVc(collectionId, getConceptDo().getTitle(),
                getConceptDo().getGoals()) {

            @Override
            public void closePoup() {
                Window.enableScrolling(true);
                this.hide();
                isAssignPopup = false;
            }
        };
        Window.scrollTo(0, 0);
        successPopupVc.setWidth("500px");
        successPopupVc.setHeight("auto");

        successPopupVc.show();
        successPopupVc.center();
        if (AppClientFactory.isAnonymous()) {
            successPopupVc.setPopupPosition(successPopupVc.getAbsoluteLeft(), 30);
        } else {
            successPopupVc.setPopupPosition(successPopupVc.getAbsoluteLeft(), 30);
        }

    }

}

From source file:org.ednovo.gooru.client.mvp.home.library.LibraryTopicListView.java

License:Open Source License

/**
 * /*ww  w  .  j  ava2 s.  c  o  m*/
 * @function oncustomizeCollectionBtnClicked 
 * 
 * @created_date : 11-Dec-2013
 * 
 * @description
 * 
 * 
 * @parm(s) : @param clickEvent
 * 
 * @return : void
 *
 * @throws : <Mentioned if any exceptions>
 *
 */
@UiHandler("customizeCollectionBtn")
public void oncustomizeCollectionBtnClicked(ClickEvent clickEvent) {
    if (AppClientFactory.getPlaceManager().getRequestParameter(STANDARD_ID) != null) {
        MixpanelUtil.mixpanelEvent("standardlibrary_customize_collection");
    }
    String collectionId = getConceptDo().getGooruOid();
    MixpanelUtil.mixpanelEvent("LandingPage_customize_collection");

    if (!isCustomizePopup) {
        isCustomizePopup = true;
        Boolean loginFlag = false;
        if (AppClientFactory.isAnonymous()) {
            loginFlag = true;
        } else {
            loginFlag = false;
        }
        RenameAndCustomizeLibraryPopUp successPopupVc = new RenameAndCustomizeLibraryPopUp(collectionId,
                loginFlag, getConceptDo().getTitle()) {

            @Override
            public void closePoup() {
                Window.enableScrolling(true);
                this.hide();
                isCustomizePopup = false;
            }
        };
        Window.scrollTo(0, 0);
        successPopupVc.setWidth("500px");
        successPopupVc.setHeight("340px");
        successPopupVc.show();
        successPopupVc.center();
    }

}

From source file:org.ednovo.gooru.client.mvp.home.library.LibraryView.java

License:Open Source License

/**
 * //w  w w .j a  v a2 s .  c om
 * @function loadContributorsPage 
 * 
 * @created_date : 03-Dec-2013
 * 
 * @description
 * 
 * @param placeToken 
 * 
 * @return : void
 *
 * @throws : <Mentioned if any exceptions>
 *
 */
public void loadContributorsPage(String callBack, String placeToken) {
    setPlaceToken(placeToken);
    String courseId = AppClientFactory.getPlaceManager().getRequestParameter(COURSE_ID);
    String unitId = AppClientFactory.getPlaceManager().getRequestParameter(UNIT_ID);
    String subjectId = AppClientFactory.getPlaceManager().getRequestParameter(SUBJECT_NAME);
    String standardId = AppClientFactory.getPlaceManager().getRequestParameter(STANDARD_ID);
    subjectListId = subjectId;
    unitListId = unitId;
    standardListId = standardId;
    selectedPage = 1;
    String callBackSignup = AppClientFactory.getPlaceManager().getRequestParameter(CALLBACK, null);
    String discoverUrl = Window.Location.getHref();
    if (!AppClientFactory.isAnonymous()) {
        final String loginType = AppClientFactory.getLoggedInUser().getLoginType() != null
                ? AppClientFactory.getLoggedInUser().getLoginType()
                : "";
        int flag = AppClientFactory.getLoggedInUser().getViewFlag();
        if (flag <= 7 && !loginType.equalsIgnoreCase("apps")) {
            Window.enableScrolling(false);
        } else {
            Window.enableScrolling(true);
        }
    } else {
        Window.enableScrolling(true);
    }

    if (callBack.equalsIgnoreCase(FEATURED_CONTRIBUTORS)) {
        discoverUrl.replaceAll("&page=" + FEATURED_CONTRIBUTORS, "");
        AppClientFactory.fireEvent(new SetDiscoverLinkEvent(discoverUrl));
        featuredCourseTabs.setVisible(false);
        featuredCousesLbl.setVisible(false);
        landingBanner.setVisible(false);
        container.setVisible(false);
        contributorsContainer.setVisible(true);
        if (contributorsContainer.getWidgetCount() <= 0) {
            contributorsContainer.add(new LibraryContributorsView(getPlaceToken()));
        }
        libraryMenuNavigation.setTabSelection(FEATURED_CONTRIBUTORS);
    } else if (callBack.equalsIgnoreCase(COURSE_PAGE)) {
        AppClientFactory.fireEvent(new SetDiscoverLinkEvent(discoverUrl));
        landingBanner.setVisible(false);
        contributorsContainer.setVisible(false);
        featuredCourseTabs.setVisible(false);
        featuredCousesLbl.setVisible(false);
        if (subjectId.equals(STANDARDS)) {
            featuredContributorsLink.setVisible(false);
        } else {
            featuredContributorsLink.setVisible(true);
        }
        featuredEducator.setVisible(true);
        courseBanner.setVisible(true);
        container.setVisible(true);

        Window.scrollTo(0, 0);
        if (standardId == null) {
            String subjectName = getSubjectNameBySubjectId(courseMap, subjectId);
            CourseDo courseDo = null;
            if (subjectName != null && courseMap.get(subjectName) != null
                    && courseMap.get(subjectName).getData() != null && courseId != null) {
                libraryMenuNavigation.setTabSelection(subjectName);
                courseDo = getCourseDoFromCourseId(courseMap.get(subjectName), courseId);
                setCourseData(courseDo);
            } else {
                libraryMenuNavigation.getTaxonomyData(subjectId, courseId);
            }
        } else {
            String subjectName = STANDARDS;
            CourseDo courseDo = null;
            if (subjectName != null && standardsMap.get(subjectName) != null
                    && standardsMap.get(subjectName).getData() != null && courseId != null) {
                libraryMenuNavigation.setTabSelection(subjectName);
                courseDo = getCourseDoFromCourseIdStandards(standardsMap.get(STANDARDS), standardId, courseId);
                setCourseData(courseDo);
            } else {
                libraryMenuNavigation.getTaxonomyData(subjectId, courseId);
            }
        }

    } else if (callBack.equalsIgnoreCase(FEATURED_COURSE_PAGE)) {
        libraryMenuNavigation.setTabSelection(FEATURED_LABEL);
        if (callBackSignup != null) {
            Window.enableScrolling(false);
        }
        AppClientFactory.fireEvent(new SetDiscoverLinkEvent(discoverUrl));
        contributorsContainer.setVisible(false);
        featuredEducator.setVisible(false);
        courseBanner.setVisible(false);
        landingBanner.setVisible(true);
        container.setVisible(true);
        featuredCourseTabs.setVisible(true);
        featuredCousesLbl.setVisible(true);
        if ((callBack != previousCallBack) || (courseId != previousCourseId)) {
            if (courseMap != null && courseMap.get("featured") != null) {
                setFeaturedCourseWidgets(courseMap.get("featured").getData(), true);
            } else {
                getFeaturedCourses(FEATURED_LABEL);
            }
        }
    } else if (callBack.equalsIgnoreCase(PARTNER_PAGE)) {
        if (courseMap != null && courseMap.get(FEATURED_LABEL) != null) {
        } else {
            getFeaturedCourses(FEATURED_LABEL);
        }
        landingBanner.setVisible(false);
        contributorsContainer.setVisible(false);

        //For setting the partner's website data
        featuredEducator.setVisible(true);
        educatorPhoto.setVisible(false);
        featuredContributor.setVisible(false);
        featuredContributorsLink.setVisible(true);

        featuredCourseTabs.setVisible(false);
        featuredCousesLbl.setVisible(false);
        courseBanner.setVisible(true);
        container.setVisible(true);
    }
    this.previousCallBack = callBack;
    this.previousCourseId = courseId;
}

From source file:org.ednovo.gooru.client.mvp.home.LoginPopupUc.java

License:Open Source License

/**
 * Class constructor , assign {@link HeaderUc} instance
 * /*from ww w  .jav  a  2 s. com*/
 * @param headerUc
 *            instance of {@link HeaderUc}
 */
public LoginPopupUc(HeaderUc headerUc) {
    super(false);
    this.res = LoginPopUpCBundle.INSTANCE;
    res.css().ensureInjected();
    this.headerUc = headerUc;
    add(binder.createAndBindUi(this));
    this.setGlassEnabled(true);
    this.setGlassStyleName(LoginPopUpCBundle.INSTANCE.css().loginPopupGlassStyle());
    this.getElement().getStyle().setZIndex(99999);
    Window.enableScrolling(false);
    AppClientFactory.fireEvent(new SetHeaderZIndexEvent(99, false));
    //        lblKeepMeLogedIn.getElement().setId("chkLogin");
    setTextAndIds();
    lblPleaseWait.setVisible(false);

    setHandlers();

    this.center();
}

From source file:org.ednovo.gooru.client.mvp.home.LoginPopupUc.java

License:Open Source License

/**
 * Added click handler to perform Login operation by taking entered user name and password from the user.
 * @param clickEvent instance of {@link ClickEvent}
 */// www  .  j  a  va 2 s  .co m

@UiHandler("loginButton")
public void onLoginClicked(ClickEvent clickEvent) {

    if (isCookieEnabled()) {

        final String username = loginTxtBox.getText().trim();
        String password = passwordTxtBox.getText().trim();

        JSONObject login = new JSONObject();
        login.put("username", new JSONString(username));
        login.put("password", new JSONString(password));

        if (username.length() > 1 && password.length() > 1) {

            loginButton.setVisible(false);
            lblPleaseWait.setVisible(true);
            //            AppClientFactory.getInjector().getAppService().signin(username, password, new AsyncCallback<UserDo>() {
            AppClientFactory.getInjector().getAppService().v2Signin(login.toString(),
                    new SimpleAsyncCallback<UserDo>() {
                        @Override
                        public void onSuccess(UserDo result) {
                            MixpanelUtil.Regular_User_Logged_In();
                            if (result.getDateOfBirth() != null && result.getAccountTypeId() == 2) {
                                MixpanelUtil.Registration_turns13();
                                com.google.gwt.i18n.client.DateTimeFormat dateFormat = com.google.gwt.i18n.client.DateTimeFormat
                                        .getFormat("yyyy-MM-dd hh:mm:ss.S");
                                Date convertedCurrentDate = null;
                                convertedCurrentDate = dateFormat.parse(result.getDateOfBirth());
                                age = getAge(convertedCurrentDate);
                                if (age >= 13) {
                                    Map<String, String> map = StringUtil.splitQuery(Window.Location.getHref());
                                    map.put("callback", "turn13");
                                    AppClientFactory.getPlaceManager()
                                            .revealPlace(AppClientFactory.getCurrentPlaceToken(), map);
                                }
                            }
                            AppClientFactory.setLoggedInUser(result);
                            AppClientFactory.fireEvent(new SetUserDetailsInPlayEvent(result.getToken()));
                            AppClientFactory.fireEvent(new SetUserDetailsInCollectionPlayEvent(
                                    result.getToken(), result.getGooruUId()));
                            //to Set the Options butts visibility in Player for comments.
                            if (AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken()
                                    .equalsIgnoreCase(PlaceTokens.PREVIEW_PLAY)) {
                                AppClientFactory.fireEvent(new SetCommentsOptionsEvent());
                            }
                            if (getWidgetMode() != null) {
                                //AppClientFactory.fireEvent(new ShowResourceTabWidgetEvent(getWidgetMode(), false));
                            }
                            hide();
                            //headerUc.setLoggedInUser(result);
                            AppClientFactory.fireEvent(new SetHeaderEvent(result));
                            //AppClientFactory.resetPlace();

                            /*                   if(result.getUsername().equalsIgnoreCase("TexasTeacher")) {
                                                 AppClientFactory.fireEvent(new SetTexasAccountEvent("failure"));
                                                 AppClientFactory.fireEvent(new SetTexasPlaceHolderEvent(true));
                                              }else{
                                                 AppClientFactory.fireEvent(new SetTexasAccountEvent("success"));
                                                 AppClientFactory.fireEvent(new SetTexasPlaceHolderEvent(false));
                                              }
                            */
                            AppClientFactory.setUserflag(true);
                            AppClientFactory.fireEvent(new StandardPreferenceSettingEvent(
                                    result.getMeta().getTaxonomyPreference().getCode()));
                            if (AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken()
                                    .equals(PlaceTokens.COLLECTION_PLAY)) {
                                AppClientFactory
                                        .fireEvent(new ShowCollectionTabWidgetEvent(getWidgetMode(), false));
                            }
                            if (AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken()
                                    .equals(PlaceTokens.PREVIEW_PLAY)) {
                                AppClientFactory
                                        .fireEvent(new ShowPreviewTabWidgetEvent(getWidgetMode(), false));
                            }

                            if (AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken()
                                    .equals(PlaceTokens.COLLECTION_PLAY)
                                    || AppClientFactory.getPlaceManager().getCurrentPlaceRequest()
                                            .getNameToken().equals(PlaceTokens.PREVIEW_PLAY)) {
                                AppClientFactory.fireEvent(new SetPlayerLoginStatusEvent(true));
                            } else if (AppClientFactory.getPlaceManager().getCurrentPlaceRequest()
                                    .getNameToken().equals(PlaceTokens.RESOURCE_PLAY)) {
                                AppClientFactory
                                        .fireEvent(new ShowResourceTabWidgetEvent(getWidgetMode(), false));
                            } else if (AppClientFactory.getPlaceManager().getCurrentPlaceRequest()
                                    .getNameToken().equals(PlaceTokens.SHELF)) {
                                AppClientFactory.resetPlace();
                                Window.enableScrolling(true);
                                AppClientFactory.fireEvent(new SetHeaderZIndexEvent(0, true));
                                AppClientFactory.fireEvent(new HomeEvent(HeaderTabType.ORGANIZE));
                                String id = AppClientFactory.getPlaceManager().getRequestParameter("id") != null
                                        && !AppClientFactory.getPlaceManager().getRequestParameter("id")
                                                .equalsIgnoreCase("")
                                                        ? AppClientFactory.getPlaceManager()
                                                                .getRequestParameter("id")
                                                        : null;
                                if (id != null) {
                                    AppClientFactory.getPlaceManager().revealPlace(PlaceTokens.SHELF,
                                            new String[] { "id", id });
                                } else {
                                    AppClientFactory.getPlaceManager().revealPlace(PlaceTokens.SHELF);
                                }
                                //Call shelf api to load the first collection.
                            } else {
                                AppClientFactory.resetPlace();
                                Window.enableScrolling(true);
                                AppClientFactory.fireEvent(new SetHeaderZIndexEvent(0, true));
                            }

                            showNewGooruTryOut(result);
                            if (AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken()
                                    .equalsIgnoreCase(PlaceTokens.HOME)) {
                                AppClientFactory.fireEvent(new SetLoginStatusEvent(true));
                            }

                            if (nameToken.equals(PlaceTokens.TEACH)) {
                                AppClientFactory.fireEvent(new OpenClasspageListEvent());
                            } else if (nameToken.equals(PlaceTokens.SHELF)) {
                                getCollectionFirstItem();
                            }
                            if (AppClientFactory.getCurrentPlaceToken().equals(PlaceTokens.STUDENT)) {
                                AppClientFactory.fireEvent(new OpenJoinClassPopupEvent());
                            }
                            if (result.getOrganizationName() != null) {
                                if (result.getOrganizationName().contains("rusd")
                                        && (AppClientFactory.getPlaceManager().getCurrentPlaceRequest()
                                                .getNameToken().equals(PlaceTokens.HOME)
                                                || AppClientFactory.getPlaceManager().getCurrentPlaceRequest()
                                                        .getNameToken().equals(PlaceTokens.RUSD_LIBRARY))) {
                                    AppClientFactory.getPlaceManager().revealPlace(PlaceTokens.RUSD_LIBRARY);
                                }
                            }

                            /*if(AppClientFactory.getCurrentPlaceToken().equals(PlaceTokens.SETTINGS)){
                               String newMailId = AppClientFactory.getPlaceManager()
                                    .getRequestParameter("newMailId");
                              String userId = AppClientFactory.getPlaceManager().getRequestParameter(
                                    "userId");
                              String confirmStatus = AppClientFactory.getPlaceManager()
                                    .getRequestParameter("confirmStatus");
                              if(newMailId!=null && userId!=null && confirmStatus!=null){
                                 System.out.println("login");
                                 Map<String, String> params = new HashMap<String, String>();
                                 params.put("confirmStatus", confirmStatus);
                                 params.put("newMailId", newMailId);
                                 params.put("userId", userId);
                                 PlaceRequest placeRequest=AppClientFactory.getPlaceManager().preparePlaceRequest(PlaceTokens.SETTINGS, params);
                                 AppClientFactory.getPlaceManager().revealPlace(true, placeRequest, false);
                              }
                            }*/
                        }

                        @Override
                        public void onFailure(Throwable caught) {
                            loginButton.setVisible(true);
                            lblPleaseWait.setVisible(false);
                            new AlertContentUc(OOPS, LOGIN_ERROR);
                        }
                    });
        } else {
            loginButton.setVisible(true);
            lblPleaseWait.setVisible(false);
            new AlertContentUc(OOPS, LOGIN_ERROR);
        }
    } else {
        loginButton.setVisible(true);
        lblPleaseWait.setVisible(false);
        new AlertMessageUc(GL0738, new HTML(LOGIN_COOKIE_DISABLE_MESSAGE));
    }
}

From source file:org.ednovo.gooru.client.mvp.home.LoginPopupUc.java

License:Open Source License

/**
 * Added click handler to hide the login popup.
 * //  ww  w. j  ava 2s . c  o m
 * @param clickEvent
 *            instance of {@link ClickEvent}
 */
@UiHandler("cancelButton")
public void onCancelClicked(ClickEvent clickEvent) {
    StudentAssignmentView.islogin = false;
    /*
     * Checks for parameter value if it is true then it will remove the parameter, so that it will avoid 
     * invoking login popup multiple times on refresh.
     */
    if (AppClientFactory.getPlaceManager().getRequestParameter(LOGINEVENT) != null
            && AppClientFactory.getPlaceManager().getRequestParameter(LOGINEVENT).equalsIgnoreCase("true")) {
        hide();
        AppClientFactory.getPlaceManager().revealPlace(PlaceTokens.HOME);
    }
    if (AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken()
            .equals(PlaceTokens.PREVIEW_PLAY)) {
        AppClientFactory.fireEvent(new ShowPreviewTabWidgetEvent(getWidgetMode(), true));
    }
    if (AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken()
            .equals(PlaceTokens.COLLECTION_PLAY)) {
        AppClientFactory.fireEvent(new ShowCollectionTabWidgetEvent(getWidgetMode(), true));
    } else if (AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken()
            .equals(PlaceTokens.RESOURCE_PLAY)) {
        AppClientFactory.fireEvent(new ShowResourceTabWidgetEvent(getWidgetMode(), true));
    } else if (AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken()
            .equals(PlaceTokens.STUDENT)) {
        if (!StudentAssignmentView.getMainContainerStatus()) {
            AppClientFactory.getPlaceManager().revealPlace(PlaceTokens.HOME);
        }
    } /*else if(AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken().equals(PlaceTokens.SETTINGS)){
        if(AppClientFactory.getPlaceManager().getRequestParameter("newMailId")!=null){
       AppClientFactory.getPlaceManager().revealPlace(PlaceTokens.HOME);
        }
      }*/
    else {
        Window.enableScrolling(true);
        AppClientFactory.fireEvent(new SetHeaderZIndexEvent(0, true));
        if (AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken()
                .equalsIgnoreCase(PlaceTokens.SHELF)
                && AppClientFactory.getPlaceManager().getRequestParameter("id") != null
                && !AppClientFactory.getPlaceManager().getRequestParameter("id").equalsIgnoreCase("")) {
            hide();
            AppClientFactory.getPlaceManager().revealPlace(PlaceTokens.HOME);
        }
    }
    hide();
}

From source file:org.ednovo.gooru.client.mvp.home.LogoutPanelVc.java

License:Open Source License

/**
 * Get confirm to logout popup//from  ww  w  . j a  va 2 s. co m
 * 
 * @param clickEvent
 *            instance of {@link ClickEvent}
 */

/*public int getGooruGuideIconLeft() {
   return gooruGuideImgLbl.getAbsoluteLeft();
}
        
public int getGooruGuideIconTop() {
   return gooruGuideImgLbl.getAbsoluteTop();
}
*/

@UiHandler("logoutAnr")
public void logoutPopupClicked(ClickEvent clickEvent) {
    hide();
    Window.enableScrolling(false);
    AppClientFactory.fireEvent(new SetHeaderZIndexEvent(98, false));
    logoutPopupVc = new LogoutPopupVc();
}