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.library.partner.yesdlibrary.YesdLibraryPresenter.java
License:Open Source License
@Override public void prepareFromRequest(PlaceRequest request) { long startTime = System.currentTimeMillis(); super.prepareFromRequest(request); if (AppClientFactory.getPlaceManager().refreshPlace()) { clearSlot(TYPE_FOLDERS_SLOT);/*from w w w . j ava 2 s . c om*/ setInSlot(TYPE_FOLDERS_SLOT, partnerLibraryPresenter); partnerLibraryPresenter.setPartnerWidget(); } if (getPlaceManager().getRequestParameter(CALLBACK) != null && getPlaceManager().getRequestParameter(CALLBACK).equalsIgnoreCase("signup")) { //To show SignUp (Registration popup) if (AppClientFactory.isAnonymous()) { Window.enableScrolling(false); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(98, false)); String type = getPlaceManager().getRequestParameter("type"); int displayScreen = getPlaceManager().getRequestParameter("type") != null ? Integer.parseInt(type) : 1; signUpViewPresenter.displayPopup(displayScreen); addToPopupSlot(signUpViewPresenter); } } int flag = AppClientFactory.getLoggedInUser().getViewFlag(); final String loginType = AppClientFactory.getLoggedInUser().getLoginType() != null ? AppClientFactory.getLoggedInUser().getLoginType() : ""; if (!AppClientFactory.isAnonymous() && flag == 0 && !loginType.equalsIgnoreCase("Credential")) { AlmostDoneUc update = new AlmostDoneUc(AppClientFactory.getLoggedInUser().getEmailId(), AppClientFactory.getLoggedInUser()); update.setGlassEnabled(true); update.show(); update.center(); } }
From source file:org.ednovo.gooru.client.mvp.play.collection.end.study.CollectionHomeMetadataView.java
License:Open Source License
/** * //ww w. j av a 2 s . c o m * @function oncustomizeCollectionBtnClicked * * @created_date : 11-Dec-2013 * * @description * * * @parm(s) : @param clickEvent * * @return : void * * @throws : <Mentioned if any exceptions> * */ @UiHandler("shareCollectionBtn") public void onshareCollectionBtnClicked(ClickEvent clickEvent) { final Map<String, String> params = StringUtil.splitQuery(Window.Location.getHref()); String collectionId = collectionDo.getGooruOid(); // Window.enableScrolling(false); //final Map<String,String> params = new HashMap<String,String>(); AssignPopupVc successPopupVc = new AssignPopupVc(collectionId, collectionDo.getTitle(), collectionDo.getGoals()) { @Override public void closePoup() { Window.enableScrolling(true); this.hide(); params.remove("assign"); PlaceRequest placeRequest = AppClientFactory.getPlaceManager() .preparePlaceRequest(AppClientFactory.getCurrentPlaceToken(), params); AppClientFactory.getPlaceManager().revealPlace(false, placeRequest, true); } }; //Window.scrollTo(0, 0); int clientHeight = Window.getClientHeight(); //successPopupVc.setWidth("500px"); //successPopupVc.setHeight("658px"); /*if(clientHeight>625){ clientHeight=625; successPopupVc.getAssignContainer().getElement().setAttribute("style", "max-height:"+clientHeight+"px;width:500px;overflow-x:hidden;overflow-y:scroll"); }else{ successPopupVc.getAssignContainer().getElement().setAttribute("style", "max-height:"+clientHeight+"px;width:500px;overflow-x:hidden;overflow-y:scroll"); }*/ successPopupVc.show(); int left = (Window.getClientWidth() - 500) >> 1; int top = (Window.getClientHeight() - clientHeight) >> 1; successPopupVc.setHeight("658px"); successPopupVc.setPopupPosition(Math.max(Window.getScrollLeft() + left, 0), Math.max(Window.getScrollTop() + 5, 0)); //successPopupVc.center(); //successPopupVc.setPopupPosition(successPopupVc.getAbsoluteLeft(), 10); // if(!successPopupVc.isVisible()){ // successPopupVc.show(); // successPopupVc.center(); // } // Window.enableScrolling(false); // if (AppClientFactory.isAnonymous()){ // successPopupVc.setPopupPosition(successPopupVc.getAbsoluteLeft(), 10); // } // else{ //successPopupVc.setPopupPosition(successPopupVc.getAbsoluteLeft(), 10); // } params.put("assign", "yes"); PlaceRequest placeRequest = AppClientFactory.getPlaceManager() .preparePlaceRequest(AppClientFactory.getCurrentPlaceToken(), params); AppClientFactory.getPlaceManager().revealPlace(false, placeRequest, true); // final String collectionId = clickEvent.getRelativeElement().getAttribute("collectionId"); // // if(!isSharePopup){ // isSharePopup=true; // // SharePlayerVc successPopupVc = new SharePlayerVc(collectionId) { // // @Override // public void closePoup() { // Window.enableScrolling(true); // this.hide(); // isSharePopup = false; // } // public void triggerShareEvent(String shareType,boolean confirmStatus){ // getUiHandlers().triggerCollectionShareDataEvent(collectionId,PlayerDataLogEvents.COLLECTION,shareType,confirmStatus); // } // }; // Window.scrollTo(0, 0); // successPopupVc.setWidth("500px"); // successPopupVc.setHeight("350px"); // successPopupVc.show(); // successPopupVc.center(); // } }
From source file:org.ednovo.gooru.client.mvp.play.collection.end.study.CollectionHomeMetadataView.java
License:Open Source License
/** * //from ww w. j a v a 2s.c o m * Showing Customize or Assign popup after login with gmail account. * */ private void showPopupAfterGmailSignin() { // TODO Auto-generated method stub String collectionId = AppClientFactory.getPlaceManager().getRequestParameter("id") != null ? AppClientFactory.getPlaceManager().getRequestParameter("id") : null; String customize = AppClientFactory.getPlaceManager().getRequestParameter("customize") != null ? AppClientFactory.getPlaceManager().getRequestParameter("customize") : null; String assign = AppClientFactory.getPlaceManager().getRequestParameter("assign") != null ? AppClientFactory.getPlaceManager().getRequestParameter("assign") : null; String emailId = AppClientFactory.getPlaceManager().getRequestParameter("emailId") != null ? AppClientFactory.getPlaceManager().getRequestParameter("emailId") : null; if (customize != null && customize.equals("yes") && emailId != null) { Boolean loginFlag = false; if (AppClientFactory.isAnonymous()) { loginFlag = true; } else { loginFlag = false; } RenameCustomizePopUp successPopupVc = new RenameCustomizePopUp(collectionId, loginFlag, collectionTitle) { @Override public void closePoup() { Window.enableScrolling(true); this.hide(); isCustomizePopup = false; } }; Window.scrollTo(0, 0); successPopupVc.setWidth("500px"); successPopupVc.setHeight("471px"); successPopupVc.show(); successPopupVc.center(); } if (assign != null && assign.equals("yes") && emailId != null) { AssignPopupPlayerVc successPopupVc = new AssignPopupPlayerVc(collectionId) { @Override public void closePoup() { Window.enableScrolling(true); this.hide(); isAssignPopup = false; } }; Window.scrollTo(0, 0); successPopupVc.setWidth("500px"); successPopupVc.setHeight("635px"); 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.play.collection.preview.end.PreviewEndView.java
License:Open Source License
/** * /* w ww . j av a 2s . c om*/ * @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 = clickEvent.getRelativeElement().getAttribute("collectionId"); if (!isAssignPopup) { isAssignPopup = true; AssignPopupPlayerVc successPopupVc = new AssignPopupPlayerVc(collectionId) { @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.play.collection.preview.end.PreviewEndView.java
License:Open Source License
/** * // w ww. j av a 2 s .c om * @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) { String collectionId = clickEvent.getRelativeElement().getAttribute("collectionId"); if (!isCustomizePopup) { isCustomizePopup = true; Boolean loginFlag = false; if (AppClientFactory.isAnonymous()) { loginFlag = true; } else { loginFlag = false; } RenameCustomizePopUp successPopupVc = new RenameCustomizePopUp(collectionId, loginFlag) { @Override public void closePoup() { Window.enableScrolling(true); this.hide(); isCustomizePopup = false; } }; Window.scrollTo(0, 0); successPopupVc.setWidth("500px"); successPopupVc.setHeight("350px"); successPopupVc.show(); successPopupVc.center(); } }
From source file:org.ednovo.gooru.client.mvp.play.collection.preview.end.PreviewEndView.java
License:Open Source License
/** * //from ww w . j ava 2s.com * @function oncustomizeCollectionBtnClicked * * @created_date : 11-Dec-2013 * * @description * * * @parm(s) : @param clickEvent * * @return : void * * @throws : <Mentioned if any exceptions> * */ @UiHandler("shareCollectionBtn") public void onshareCollectionBtnClicked(ClickEvent clickEvent) { String collectionId = clickEvent.getRelativeElement().getAttribute("collectionId"); if (!isSharePopup) { isSharePopup = true; SharePlayerVc successPopupVc = new SharePlayerVc(collectionId) { @Override public void closePoup() { Window.enableScrolling(true); this.hide(); isSharePopup = false; } }; Window.scrollTo(0, 0); successPopupVc.setWidth("500px"); successPopupVc.setHeight("350px"); successPopupVc.show(); successPopupVc.center(); } }
From source file:org.ednovo.gooru.client.mvp.play.collection.preview.home.assign.AssignPopupPlayerVc.java
License:Open Source License
/** * //w ww . j a va 2s.c o m */ public AssignPopupPlayerVc(String collectionIdVal) { super(false); res = AssignPopUpCBundle.INSTANCE; AssignPopUpCBundle.INSTANCE.css().ensureInjected(); add(uiBinder.createAndBindUi(this)); this.setGlassEnabled(true); donothaveAccountText.getElement().setInnerHTML(GL0634); donothaveAccountText.getElement().setAttribute("style", "float: left;margin-left: 22%;"); ancSignUp.setText(GL0207 + GL_SPL_EXCLAMATION); swithUrlLbl.setText(GL0639); swithToEmbedLbl.setText(GL0640); ancSignUp.getElement().setAttribute("style", "float: left;margin-left: 2%;"); setLabelsAndIds(); setHandlers(); shareContainer = new ShareViewUc("", ""); ftmPanel = new HTMLPanel(""); htmlLoginPanel.setVisible(false); loadingImageLabel.setVisible(true); popupContentAssign.setVisible(false); try { AppClientFactory.getInjector().getClasspageService().getSCollIdClasspageById(collectionIdVal, new AsyncCallback<CollectionDo>() { @Override public void onFailure(Throwable caught) { } @Override public void onSuccess(CollectionDo result) { MixpanelUtil.Preview_Click_Assign_successful(); String collectionId = ""; if (result.getGooruOid() != null) { collectionId = result.getGooruOid(); } else { collectionId = "4b4bb39d-2892-4dd6-bd7f-5fd1227751de"; } toAssignStr = collectionId; if (collectionId != null) { collectionDoGlobal = result; if (AppClientFactory.isAnonymous()) { hideContainers(); } else { loadListContainers(); } generateShareLink(toAssignStr); } loadingImageLabel.setVisible(false); popupContentAssign.setVisible(true); } }); } catch (Exception ex) { ex.printStackTrace(); } setShareUrlGenerationAsyncCallback(new SimpleAsyncCallback<Map<String, String>>() { @Override public void onSuccess(Map<String, String> result) { embedBitlyLink = result.get("decodeRawUrl"); } }); Window.enableScrolling(false); this.getElement().setAttribute("style", "z-index:99999;"); this.getGlassElement().setAttribute("style", "z-index:99999; position:absolute; left:0px; top:0px;"); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(99999, false)); this.center(); }
From source file:org.ednovo.gooru.client.mvp.play.collection.preview.home.customize.RenameCustomizePopUp.java
License:Open Source License
/** * // w w w . ja v a2 s .com */ public RenameCustomizePopUp(String collectionId, final Boolean loginFlag) { super(false); this.res = AssignPopUpCBundle.INSTANCE; res.css().ensureInjected(); add(binder.createAndBindUi(this)); errorLabel.setVisible(false); this.setGlassEnabled(true); customizeText.getElement().setInnerHTML(GL0743); backtoLibrary.setText(GL0142); editCollection.setText(GL0636); panelAssign.getElement().getStyle().setMarginBottom(10, Unit.PX); loginCustom.getElement().getStyle().setMarginBottom(15, Unit.PX); isDraggedFromSearch = false; Window.enableScrolling(false); this.getElement().setAttribute("style", "z-index:99999;"); this.getGlassElement().setAttribute("style", "z-index:99999; position:absolute; left:0px; top:0px;"); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(99, false)); popupcontentCustomize.setVisible(false); loadingImageLabel.setVisible(true); editCollection.getElement().setAttribute("collectionId", collectionId); assignDes.setText(GL0744); lblpopupTitle.setText(GL0743); lbltxtBoxTitle.setText(GL0553); copycollectionTextbox.setMaxLength(50); copycollectionTextbox.addKeyPressHandler(new OnkeyPress()); copycollectionTextbox.addBlurHandler(new OnBlurr()); copycollectionTextbox.addKeyUpHandler(new OnkeyUp()); /*copycollectionTextbox.addBlurHandler(new BlurHandler() { @Override public void onBlur(BlurEvent event) { Map<String, String> parms = new HashMap<String, String>(); parms.put("text", copycollectionTextbox.getValue()); AppClientFactory.getInjector().getResourceService().checkProfanity(parms, new SimpleAsyncCallback<Boolean>() { @Override public void onSuccess(Boolean value) { isHavingBadWords=value; SetStyleForProfanity.SetStyleForProfanityForTextBox(copycollectionTextbox, errorLabel, value); } }); } });*/ AppClientFactory.getInjector().getClasspageService().getSCollIdClasspageById(collectionId, new AsyncCallback<CollectionDo>() { @Override public void onFailure(Throwable caught) { } @Override public void onSuccess(CollectionDo result) { collectionDo = result; MixpanelUtil.Preview_Click_Customize_successful(); copycollectionTextbox.setText(result.getTitle()); 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); } popupcontentCustomize.setVisible(true); loadingImageLabel.setVisible(false); } }); MixpanelUtil.mixpanelEvent("CoursePage_customize_collection"); this.center(); }
From source file:org.ednovo.gooru.client.mvp.play.collection.preview.home.customize.RenameCustomizePopUp.java
License:Open Source License
public RenameCustomizePopUp(String dragId) { super(false); this.res = AssignPopUpCBundle.INSTANCE; res.css().ensureInjected();// w w w . j a v a2 s. c o m add(binder.createAndBindUi(this)); errorLabel.setVisible(false); this.setGlassEnabled(true); customizeText.getElement().setInnerHTML(GL0322); isDraggedFromSearch = true; copyCollectionSuccess.getElement().getStyle().setPadding(0, Unit.PX); backtoLibrary.setText(GL0142); editCollection.setText(GL0190); panelAssign.getElement().getStyle().setMarginBottom(4, Unit.PX); loginCustom.getElement().getStyle().setMarginBottom(15, Unit.PX); buttonsContainer.setStyleName(res.css().collectionSearchRenamePopupButtons()); loadingLbl.getElement().getStyle().setMarginTop(5, Unit.PCT); loadingLbl.getElement().getStyle().setMarginLeft(25, Unit.PCT); errorLabel.getElement().getStyle().setPaddingTop(30, Unit.PX); errorLabel.getElement().getStyle().setColor("orange"); Window.enableScrolling(false); copycollectionTextbox.addKeyPressHandler(new OnkeyPress()); copycollectionTextbox.addBlurHandler(new OnBlurr()); copycollectionTextbox.setMaxLength(50); /*this.getElement().setAttribute("style", "z-index:99999;"); this.getGlassElement().setAttribute("style", "z-index:99999; position:absolute; leftge:0px; top:0px;"); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(99, false));*/ popupcontentCustomize.setVisible(false); loadingImageLabel.setVisible(true); editCollection.getElement().setAttribute("collectionId", dragId); assignDes.getElement().getStyle().setDisplay(Display.NONE); lblpopupTitle.getElement().getStyle().setDisplay(Display.NONE); lbltxtBoxTitle.setText(GL0553); copycollectionTextbox.getElement().getStyle().setWidth(275, Unit.PX); AppClientFactory.getInjector().getClasspageService().getSCollIdClasspageById(dragId, new SimpleAsyncCallback<CollectionDo>() { @Override public void onSuccess(CollectionDo result) { collectionDo = result; copycollectionTextbox.setText(result.getTitle()); loginCustom.setVisible(false); copyCollectionSuccess.setVisible(true); loadingImageLabel.setVisible(false); popupcontentCustomize.setVisible(true); } }); }
From source file:org.ednovo.gooru.client.mvp.play.collection.preview.home.PreviewHomeView.java
License:Open Source License
/** * /*from w w w . j av a 2 s . co 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) { MixpanelUtil.Preview_Click_Assign(); String collectionId = clickEvent.getRelativeElement().getAttribute("collectionId"); if (!isAssignPopup) { isAssignPopup = true; AssignPopupPlayerVc successPopupVc = new AssignPopupPlayerVc(collectionId) { @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); } } }