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.authentication.SignUpRoleView.java
License:Open Source License
/** * If username exists, display alert message else proceed further. * @param result {{@link UserDo}// w w w.j a v a2 s . com */ public void checkUserNameAvailability(UserDo result) { if (result != null && result.isAvailability() && loginTxtBox.getText() != null) { } else { String userName = loginTxtBox.getText(); String userRole = this.userRole; final UserDo userDo = AppClientFactory.getLoggedInUser(); AppClientFactory.getInjector().getHomeService().updateUserDetails(userName, userRole, new AsyncCallback<Void>() { @Override public void onSuccess(Void result) { AppClientFactory.getInjector().getUserService().updateUserViewFlag(userDo.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.authentication.SignUpView.java
License:Open Source License
public void displayPopUp(int displayScreen) { /* appPopUp = new AppPopUp("NoHeader"); appPopUp.setContent(uiBinder.createAndBindUi(this));*/ appPopUp.addStyleName(SignUpCBundle.INSTANCE.css().popupBackground()); Window.enableScrolling(false); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(98, false)); appPopUp.setGlassStyleName(SignUpCBundle.INSTANCE.css().signUpPopUpGlassCss()); appPopUp.center();//from ww w . j ava 2 s . c o m setUiAndIds(); showPanelById(displayScreen); account = AppClientFactory.getPlaceManager().getRequestParameter("account") != null ? AppClientFactory.getPlaceManager().getRequestParameter("account") : null; childDob = AppClientFactory.getPlaceManager().getRequestParameter("dob") != null ? AppClientFactory.getPlaceManager().getRequestParameter("dob") : null; childUserName = AppClientFactory.getPlaceManager().getRequestParameter("userName") != null ? AppClientFactory.getPlaceManager().getRequestParameter("userName") : null; }
From source file:org.ednovo.gooru.client.mvp.authentication.SignUpView.java
License:Open Source License
private void showPanelById(int id) { Window.enableScrolling(false); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(98, false)); panelSignUp.setVisible(id == 1 || id == 3 ? true : false); panelUserInfo.setVisible(id == 2 ? true : false); if (id == 2) { openCreateUser();//from w w w . j a v a 2 s . c om lblJoinGooruCommunity.setVisible(true); lblDescription.setVisible(true); lblParentInfo.setVisible(false); } else if (id == 3) { lblJoinGooruCommunity.setVisible(false); lblDescription.setVisible(false); lblParentInfo.setVisible(true); } }
From source file:org.ednovo.gooru.client.mvp.authentication.SignUpView.java
License:Open Source License
/** * Hide the popup and redirect to home page while clicking cancel * @param clickEvent instance of {@link ClickEvent} *//*from ww w . j a v a2s . c o m*/ @UiHandler("lblCancel") public void onCancelClick(ClickEvent clickEvent) { MixpanelUtil.close_signUp(); if (AppClientFactory.getPlaceManager().getRequestParameter("type") != null && !AppClientFactory.getPlaceManager().getRequestParameter("type").equalsIgnoreCase("1")) { LeaveRegistrationPopUpUc leaveRegistrationPopUpUc = new LeaveRegistrationPopUpUc(GL0074.toLowerCase(), "", "", ""); leaveRegistrationPopUpUc.show(); } else { Map<String, String> map = StringUtil.splitQuery(Window.Location.getHref()); if (map.containsKey("query")) { String queryVal = AppClientFactory.getPlaceManager().getRequestParameter("query"); queryVal = queryVal.replace("+", " "); map.put("query", queryVal); } if (map.containsKey("flt.subjectName")) { String subjectNameVal = AppClientFactory.getPlaceManager().getRequestParameter("flt.subjectName"); /*String subjectNameVal = map.get("flt.subjectName"); subjectNameVal = subjectNameVal.replaceAll("%5C1", "&"); try { subjectNameVal = URL.decodeQueryString(subjectNameVal); } catch(Exception ex) { }*/ subjectNameVal = subjectNameVal.replace("+", " "); map.put("flt.subjectName", subjectNameVal); } map.remove("callback"); map.remove("type"); map.remove("rp"); if (AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken() .equalsIgnoreCase(PlaceTokens.PREVIEW_PLAY) || AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken() .equalsIgnoreCase(PlaceTokens.COLLECTION_PLAY) || AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken() .equalsIgnoreCase(PlaceTokens.RESOURCE_PLAY) || AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken() .equalsIgnoreCase(PlaceTokens.STUDENT)) { } else { map.remove("id"); } if (AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken() .equalsIgnoreCase(PlaceTokens.PREVIEW_PLAY) || AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken() .equalsIgnoreCase(PlaceTokens.COLLECTION_PLAY) || AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken() .equalsIgnoreCase(PlaceTokens.RESOURCE_PLAY)) { PlaceRequest placeRequest = new PlaceRequest(AppClientFactory.getCurrentPlaceToken()); if (map != null) { for (String key : map.keySet()) { placeRequest = placeRequest.with(key, map.get(key)); } } AppClientFactory.getPlaceManager().revealPlace(false, placeRequest, true); } else { AppClientFactory.getPlaceManager().revealPlace(AppClientFactory.getCurrentPlaceToken(), map); Window.enableScrolling(true); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(0, true)); } } appPopUp.hide(); }
From source file:org.ednovo.gooru.client.mvp.authentication.SignUpView.java
License:Open Source License
private void openCreateUser() { createAccount = new CreateAccountUc() { private TermsAndPolicyVc termsAndPolicyVc; private CopyRightPolicyVc copyRightPolicy; private TermsOfUse termsOfUse; @Override/*from w w w. j ava2 s. c o m*/ public void OpenTermsPrivacy() { Window.enableScrolling(false); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(98, false)); appPopUp.hide(); termsAndPolicyVc = new TermsAndPolicyVc(false) { @Override public void openParentPopup() { Window.enableScrolling(false); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(98, false)); appPopUp.show(); } }; termsAndPolicyVc.show(); termsAndPolicyVc.setSize("902px", "300px"); termsAndPolicyVc.center(); termsAndPolicyVc.getElement().getStyle().setZIndex(99999);//To display the view in collection player. } @Override public void OpenCopyRight() { Window.enableScrolling(false); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(98, false)); appPopUp.hide(); copyRightPolicy = new CopyRightPolicyVc() { @Override public void openParentPopup() { Window.enableScrolling(false); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(98, false)); appPopUp.show(); } }; copyRightPolicy.show(); copyRightPolicy.setSize("902px", "300px"); copyRightPolicy.center(); copyRightPolicy.getElement().getStyle().setZIndex(99999);//To display the view in collection player. } @Override public void OpenPrivacy() { Window.enableScrolling(false); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(98, false)); appPopUp.hide(); termsOfUse = new TermsOfUse() { @Override public void openParentPopup() { Window.enableScrolling(false); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(98, false)); appPopUp.show(); } }; termsOfUse.show(); termsOfUse.setSize("902px", "300px"); termsOfUse.center(); termsOfUse.getElement().getStyle().setZIndex(99999);//To display the view in collection player. } //Send data to create user. @Override public void CreateUser(String data, String loginData) { getUiHandlers().CreateUser(data, loginData); } @Override public void closePoup() { appPopUp.hide(); } }; panelUserInfo.clear(); panelUserInfo.add(createAccount); }
From source file:org.ednovo.gooru.client.mvp.authentication.uc.CreateAccountUc.java
License:Open Source License
/** * Class constructor , to create Almost done popup * /*from w w w .java2s . c o m*/ * @param userEmail * @param user * {@link UserDo} */ @SuppressWarnings("unchecked") public CreateAccountUc() { super(false); this.res = SignUpCBundle.INSTANCE; res.css().ensureInjected(); add(binder.createAndBindUi(this)); this.setGlassEnabled(true); this.center(); account = AppClientFactory.getPlaceManager().getRequestParameter("account") != null ? AppClientFactory.getPlaceManager().getRequestParameter("account") : null; setUiAndIds(); dateBoxUc = new DateBoxUc(true, true, false); sPanelDateOfBirth.add(dateBoxUc); dateBoxUc.getDateBox().addFocusHandler(new OnDateFocus()); dateBoxUc.getDateBox().addBlurHandler(new OnDateBlur()); dateBoxUc.addDomHandler(new OnDateFocus(), FocusEvent.getType()); dateBoxUc.getDoneButton().addClickHandler(new OnDoneClick()); this.getElement().getStyle().setBackgroundColor("transparent"); dateValidationUc.setVisible(false); passwordValidUc.setVisible(false); userNameValidUc.setVisible(false); emailValidUc.setVisible(false); errorLblForUsername.setVisible(false); errorLblForFirstName.setVisible(false); //errorLblForLastName.getElement().setAttribute("style", "position: absolute;left: 32px;bottom: -6px;"); errorLblForLastName.setVisible(false); Window.enableScrolling(false); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(98, false)); AppClientFactory.getInjector().getSearchService().getHomeEndPointUrl(new SimpleAsyncCallback<String>() { @Override public void onSuccess(String result) { homeEndPoint = result; } }); RootPanel.get().addDomHandler(new DateValueChange(), ClickEvent.getType()); txtChooseUsername.addBlurHandler( new CheckProfanityInOnBlur(txtChooseUsername, null, errorLblForUsername, isHavingBadWordsUserName)); txtFirstName.addBlurHandler( new CheckProfanityInOnBlur(txtFirstName, null, errorLblForFirstName, isHavingBadWordsFirstName)); txtLastName.addBlurHandler( new CheckProfanityInOnBlur(txtLastName, null, errorLblForLastName, isHavingBadWordsLastName)); if (AppClientFactory.getPlaceManager().getRequestParameter("type") != null && AppClientFactory.getPlaceManager().getRequestParameter("email") != null && !AppClientFactory.getPlaceManager().getRequestParameter("email").equals("")) { txtChooseEmail.setText(AppClientFactory.getPlaceManager().getRequestParameter("email")); isValidEmailId = checkUserAvailability(txtChooseEmail.getText(), "emailId"); } }
From source file:org.ednovo.gooru.client.mvp.authentication.uc.LeaveRegistrationPopUpUc.java
License:Open Source License
public LeaveRegistrationPopUpUc(String type, String emailId, String username, String dob) { super(false); this.res = SignUpCBundle.INSTANCE; res.css().ensureInjected();//from ww w . j av a 2 s . co m setWidget(uiBinder.createAndBindUi(this)); accountType = type; parentEmailId = emailId; childUsername = username; childDob = dob; this.setGlassEnabled(true); this.center(); this.setSize("502px", "352px"); Window.enableScrolling(false); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(98, false)); this.addStyleName(SignUpCBundle.INSTANCE.css().popupBackground()); this.setGlassStyleName(SignUpCBundle.INSTANCE.css().signUpPopUpGlassCss()); setUiAndIds(); }
From source file:org.ednovo.gooru.client.mvp.authentication.uc.LeaveRegistrationPopUpUc.java
License:Open Source License
@UiHandler("lblCancel") public void onClickLblCancel(ClickEvent event) { MixpanelUtil.close_signUp();/* w ww. ja v a 2 s . c o m*/ if (AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken() .equalsIgnoreCase(PlaceTokens.PREVIEW_PLAY)) { } else { Window.enableScrolling(true); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(0, true)); String callBack = Window.Location.getHref(); Map<String, String> mapParms = StringUtil.splitQuery(callBack); if (mapParms.containsKey("query")) { String queryVal = AppClientFactory.getPlaceManager().getRequestParameter("query"); mapParms.put("query", queryVal); } if (mapParms.containsKey("flt.subjectName")) { String subjectNameVal = AppClientFactory.getPlaceManager().getRequestParameter("flt.subjectName"); mapParms.put("flt.subjectName", subjectNameVal); } mapParms.remove("callback"); mapParms.remove("type"); AppClientFactory.getPlaceManager().revealPlace(AppClientFactory.getCurrentPlaceToken(), mapParms); } this.hide(); }
From source file:org.ednovo.gooru.client.mvp.authentication.uc.LeaveRegistrationPopUpUc.java
License:Open Source License
@UiHandler("btnLeave") public void onClickButtonLeave(ClickEvent event) { MixpanelUtil.close_signUp();//from w w w .j a va 2 s.com this.hide(); if (AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken() .equalsIgnoreCase(PlaceTokens.PREVIEW_PLAY)) { } else { Window.enableScrolling(true); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(0, true)); String callBack = Window.Location.getHref(); Map<String, String> mapParms = StringUtil.splitQuery(callBack); if (mapParms.containsKey("query")) { String queryVal = AppClientFactory.getPlaceManager().getRequestParameter("query"); mapParms.put("query", queryVal); } if (mapParms.containsKey("flt.subjectName")) { String subjectNameVal = AppClientFactory.getPlaceManager().getRequestParameter("flt.subjectName"); mapParms.put("flt.subjectName", subjectNameVal); } mapParms.remove("callback"); mapParms.remove("type"); AppClientFactory.getPlaceManager().revealPlace(AppClientFactory.getCurrentPlaceToken(), mapParms); } }
From source file:org.ednovo.gooru.client.mvp.authentication.uc.SignUpDontWorryView.java
License:Open Source License
public SignUpDontWorryView() { super(false); this.res = SignUpCBundle.INSTANCE; res.css().ensureInjected();// w w w .ja v a2s . c o m setWidget(uiBinder.createAndBindUi(this)); this.setGlassEnabled(true); this.center(); this.setSize("502px", "352px"); Window.enableScrolling(false); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(98, false)); this.addStyleName(SignUpCBundle.INSTANCE.css().popupBackground()); this.setGlassStyleName(SignUpCBundle.INSTANCE.css().signUpPopUpGlassCss()); //this.getElement().getStyle().setBackgroundColor("transparent"); setUiAndIds(); }