List of usage examples for com.google.gwt.user.client Window enableScrolling
public static void enableScrolling(boolean enable)
From source file:org.ednovo.gooru.client.mvp.gshelf.ShelfMainPresenter.java
License:Open Source License
@Override protected void onReveal() { super.onReveal(); Window.enableScrolling(true); version = null; type = "Course"; }
From source file:org.ednovo.gooru.client.mvp.gshelf.ShelfMainPresenter.java
License:Open Source License
@Override protected void onReset() { super.onReset(); Window.enableScrolling(true); String id = getPlaceManager().getRequestParameter("id"); String o1 = getPlaceManager().getRequestParameter("o1"); String o2 = getPlaceManager().getRequestParameter("o2"); String o3 = getPlaceManager().getRequestParameter("o3"); String idParm = AppClientFactory.getPlaceManager().getRequestParameter("id") != null && !AppClientFactory.getPlaceManager().getRequestParameter("id").equalsIgnoreCase("") ? AppClientFactory.getPlaceManager().getRequestParameter("id") : null;/* w w w . ja va 2s. c o m*/ String isSuccessParm = AppClientFactory.getPlaceManager().getRequestParameter("isSuccess") != null && !AppClientFactory.getPlaceManager().getRequestParameter("isSuccess").equalsIgnoreCase("") ? AppClientFactory.getPlaceManager().getRequestParameter("isSuccess") : null; if (isSuccessParm != null && isSuccessParm.equalsIgnoreCase("true") && isSuccess) { SetDefaultTypeAndVersion(); isSuccess = false; } if (idParm != null && AppClientFactory.isAnonymous()) { AppClientFactory.fireEvent(new InvokeLoginEvent()); } else if (AppClientFactory.isAnonymous()) { getView().setNoDataForAnonymousUser(true); } else { if (version == null || (version != null && !version.equalsIgnoreCase(AppClientFactory.getLoggedInUser().getToken()))) { Window.scrollTo(0, 0); callWorkspaceApi(); version = AppClientFactory.getLoggedInUser().getToken(); if (o3 != null && id == null) { getFolderMetaData(o3); } else if (o2 != null && id == null) { getFolderMetaData(o2); } else if (o1 != null && id == null) { getFolderMetaData(o1); } else if (idParm != null && !isApiCalled) { isApiCalled = true; getResourceService().getCollection(idParm, false, getCollectionAsyncCallback()); } } } }
From source file:org.ednovo.gooru.client.mvp.gshelf.ShelfMainView.java
License:Open Source License
@Override public void setNoDataForAnonymousUser(boolean isAnonymous) { if (isAnonymous) { pnlMainContainer.setVisible(false); pnlNoDataContainer.setVisible(true); pnlNoDataContainer.clear();/* w w w . j ava 2 s. com*/ pnlNoDataContainer.add(new FoldersWelcomePage()); Window.enableScrolling(true); } else { pnlMainContainer.setVisible(true); pnlNoDataContainer.setVisible(false); } }
From source file:org.ednovo.gooru.client.mvp.home.AlmostDoneUc.java
License:Open Source License
/** * Class constructor , to create Almost done popup * @param userEmail //from w w w. j av a2s .co m * @param user {@link UserDo} */ public AlmostDoneUc(String userEmail, UserDo user) { super(false); this.user = user; this.res = AlmostDoneUcCBundle.INSTANCE; res.css().ensureInjected(); add(binder.createAndBindUi(this)); this.setGlassEnabled(true); this.center(); almostDoneText.getElement().setInnerText(GL1279 + GL_SPL_FULLSTOP + GL_SPL_FULLSTOP + GL_SPL_FULLSTOP); fillOutText.getElement().setInnerText(GL1280 + GL_SPL_SEMICOLON); emailTxtBox.getElement().setId("txtEmail"); emailText.getElement().setInnerText(GL0212); uNameLbl.getElement().setInnerText(GL0423); roleText.getElement().setInnerText(GL1281); roleListBox.setItemText(0, GL1282 + GL_SPL_QUESTION); roleListBox.setItemText(1, GL0417); roleListBox.setItemText(2, GL0416); roleListBox.setItemText(3, GL0418); roleListBox.setItemText(4, GL0419); agreeText.setText(GL1283); termsAndPolicyAnr.setText(GL0297 + " " + GL_GRR_AND + " " + GL0452); andText.setText(GL_GRR_AND + " " + GL_GRR_THE); copyRightAnr.setText(GL0421); gooruText.setText(GL_GRR_OF + " " + GL0733 + GL_SPL_FULLSTOP); okButton.getElement().setInnerText(GL0190); userNameTxtBox.getElement().setId("txtUserName"); termsAndPolicyAnr.getElement().setId("lnkTermsAndPolicy"); copyRightAnr.getElement().setId("lnkCopyRight"); emailTxtBox.setText(userEmail); emailTxtBox.setReadOnly(true); errorMessageForUserNameLbl.setVisible(false); copyRightPolicy = new CopyRightPolicyVc() { @Override public void openParentPopup() { //No need to set any thing. } }; /** * Added click handler for showing Terms and Policy popup in footer * @param clickEvent instance of {@link ClickEvent} **/ termsAndPolicyAnr.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { Window.enableScrolling(false); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(0, false)); termsAndPolicyVc = new TermsAndPolicyVc(false) { @Override public void openParentPopup() { // this.show(); } }; termsAndPolicyVc.show(); termsAndPolicyVc.setSize("600px", "300px"); termsAndPolicyVc.center(); } }); /** * Added click handler for showing copy right popup in footer * @param clickEvent instance of {@link ClickEvent} * **/ copyRightAnr.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { Window.enableScrolling(false); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(0, false)); copyRightPolicy.show(); copyRightPolicy.setSize("600px", "300px"); copyRightPolicy.center(); } }); userNameTxtBox.getElement().setAttribute("maxlength", "20"); Window.enableScrolling(false); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(0, false)); }
From source file:org.ednovo.gooru.client.mvp.home.AlmostDoneUc.java
License:Open Source License
/** * Added click handler to hide Almost done Popup * @param clickEvent instance of {@link ClickEvent} *///from w ww. j a v a2 s . co m @UiHandler("cancelButton") public void onCancelClicked(ClickEvent clickEvent) { hide(); Window.enableScrolling(true); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(0, true)); }
From source file:org.ednovo.gooru.client.mvp.home.AlmostDoneUc.java
License:Open Source License
/** * If username exists, display alert message else proceed further. * @param result {{@link UserDo}// w w w .ja v a2 s. c om */ public void checkUserNameAvailability(UserDo result) { if (result != null && result.isAvailability() && userNameTxtBox.getText() != null) { errorMessageForUserNameLbl.setText(GL0061 + userNameTxtBox.getText() + IS_ALREADY_AVAILABLE); errorMessageForUserNameLbl.setVisible(true); } else { String userName = userNameTxtBox.getText(); String userRole = roleListBox.getItemText(roleListBox.getSelectedIndex()); AppClientFactory.getInjector().getHomeService().updateUserDetails(userName, userRole, new AsyncCallback<Void>() { @Override public void onSuccess(Void result) { hide(); // Window.enableScrolling(true); // AppClientFactory.fireEvent(new SetHeaderZIndexEvent(0, true)); MixpanelUtil.Click_OK_AlmostDone(); AppClientFactory.getInjector().getUserService().updateUserViewFlag(user.getGooruUId(), 1, new SimpleAsyncCallback<UserDo>() { @Override public void onSuccess(UserDo newUser) { UserDo userDo = AppClientFactory.getLoggedInUser(); userDo.setViewFlag(newUser.getViewFlag()); AppClientFactory.setLoggedInUser(userDo); AppClientFactory.fireEvent(new SetHeaderEvent(newUser)); } }); Window.enableScrolling(false); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(0, false)); } @Override public void onFailure(Throwable caught) { } }); } }
From source file:org.ednovo.gooru.client.mvp.home.FooterUc.java
License:Open Source License
/** * Class constructor //from w ww. jav a 2 s .co m */ public FooterUc() { this.res = GooruCBundle.INSTANCE; res.css().ensureInjected(); termsAndPolicyVc = new TermsAndPolicyVc(false) { @Override public void openParentPopup() { } }; termsAndPolicyAnr = new Anchor(); copyRightAnr = new Anchor(); privacyAndPolicyAnr = new Anchor(); copyRightPolicy = new CopyRightPolicyVc() { @Override public void openParentPopup() { //No need to set. } }; termsOfUse = new TermsOfUse() { @Override public void openParentPopup() { // TODO Auto-generated method stub } }; /** * Added click handler for showing Terms ans Policy popup in footer **/ privacyAndPolicyAnr.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { Window.enableScrolling(false); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(99, false)); termsAndPolicyVc.show(); termsAndPolicyVc.setSize("902px", "300px"); termsAndPolicyVc.center(); } }); termsAndPolicyAnr.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { Window.enableScrolling(false); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(99, false)); termsOfUse.show(); termsOfUse.setSize("902px", "300px"); termsOfUse.center(); } }); /** * Added click handler for showing copy right popup in footer **/ copyRightAnr.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { Window.enableScrolling(false); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(99, false)); copyRightPolicy.show(); copyRightPolicy.setSize("902px", "300px"); copyRightPolicy.center(); } }); initWidget(uiBinder.createAndBindUi(this)); aboutGooruAnr.setText(GL1242); communityAnr.setText(GL1243); supportAnr.setText(GL0194); termsAndPolicyAnr.setText(GL0872); privacyAndPolicyAnr.setText(GL0873); copyRightAnr.setText(GL0875); careersAnr.setText(GL1244); contactUsAnr.setText(GL1245); copyRightYearText.setText(GL1246); mixpanelLink.setTarget("_blank"); mixpanelLink.setHref("https://mixpanel.com/f/partner"); aboutGooruAnr.setHref("http://about.goorulearning.org/"); aboutGooruAnr.setTarget("_blank"); //featuresAnr.setHref("http://about.goorulearning.org/product/overview/"); //featuresAnr.setTarget("_blank"); communityAnr.setHref("http://about.goorulearning.org/community/"); communityAnr.setTarget("_blank"); supportAnr.setHref("http://support.goorulearning.org/hc/en-us"); supportAnr.setTarget("_blank"); careersAnr.setHref("http://about.goorulearning.org/about/careers/"); careersAnr.setTarget("_blank"); contactUsAnr.setHref("http://about.goorulearning.org/contact/"); contactUsAnr.setTarget("_blank"); aboutGooruAnr.getElement().setId("lnkAboutGooru"); communityAnr.getElement().setId("lnkCommunity"); supportAnr.getElement().setId("lnkSupport"); termsAndPolicyAnr.getElement().setId("lnkTermsAndPolicy"); copyRightAnr.getElement().setId("lnkCopyRight"); careersAnr.getElement().setId("lnkCareers"); contactUsAnr.getElement().setId("lnkcontactUs"); AppClientFactory.getEventBus().addHandler(SetFooterEvent.TYPE, setFooter); }
From source file:org.ednovo.gooru.client.mvp.home.ForgotPasswordVc.java
License:Open Source License
@UiHandler("cancelButton") public void onCloseClick(ClickEvent clickEvent) { this.hide();//from w ww . j a v a 2s . c om if (AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken() .equals(PlaceTokens.COLLECTION_PLAY) || AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken() .equals(PlaceTokens.PREVIEW_PLAY) || AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken() .equals(PlaceTokens.RESOURCE_PLAY)) { } else { //appPopUp.hide(); Window.enableScrolling(true); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(0, true)); } }
From source file:org.ednovo.gooru.client.mvp.home.ForgotPwdSuccessVc.java
License:Open Source License
/** * Hide {@link ForgotPasswordVc} popup/*from w ww . j av a 2s .c o m*/ * @param clickEvent instance of {@link ClickEvent} */ @UiHandler("okBtnUc") public void onOkBtnUcClick(ClickEvent clickEvent) { Window.enableScrolling(true); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(0, true)); this.hide(); /*ForgotPasswordConfirmEmail forgotPasswordConfirmEmail=new ForgotPasswordConfirmEmail(); forgotPasswordConfirmEmail.setGlassEnabled(true); forgotPasswordConfirmEmail.show(); forgotPasswordConfirmEmail.center();*/ }
From source file:org.ednovo.gooru.client.mvp.home.ForgotPwdSuccessVc.java
License:Open Source License
@UiHandler("closeButton") public void onCloseClick(ClickEvent clickEvent) { Window.enableScrolling(true); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(0, true)); this.hide();//from w w w. j av a 2 s . c o m }