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.assessments.play.collection.preview.end.AssessmentsPreviewEndView.java
License:Open Source License
/** * * @function oncustomizeCollectionBtnClicked * * @created_date : 11-Dec-2013//from w w w .ja v a2s . co m * * @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 = AppClientFactory.isAnonymous(); 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.center(); successPopupVc.show(); } Map<String, String> params = StringUtil.splitQuery(Window.Location.getHref()); params.put("customize", "yes"); PlaceRequest placeRequest = AppClientFactory.getPlaceManager().preparePlaceRequest(PlaceTokens.PREVIEW_PLAY, params); AppClientFactory.getPlaceManager().revealPlace(false, placeRequest, true); }
From source file:org.ednovo.gooru.client.mvp.assessments.play.collection.preview.end.AssessmentsPreviewEndView.java
License:Open Source License
/** * * @function oncustomizeCollectionBtnClicked * * @created_date : 11-Dec-2013/*from ww w . j a v a 2 s . c om*/ * * @description * * * @parm(s) : @param clickEvent * * @return : void * * @throws : <Mentioned if any exceptions> * */ @UiHandler("shareCollectionBtn") public void onshareCollectionBtnClicked(ClickEvent clickEvent) { 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.assessments.play.collection.preview.end.AssessmentsPreviewEndView.java
License:Open Source License
/** * * Showing Customize or Assign popup after login with gmail account. * *///from w w w .j ava 2 s. co m private void showPopupAfterGmailSignin() { 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; if (customize != null && YES.equals(customize)) { Boolean loginFlag = AppClientFactory.isAnonymous(); 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.show(); successPopupVc.center(); } if (assign != null && YES.equals(assign)) { 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.assessments.play.collection.preview.home.AssessmentsPreviewHomeView.java
License:Open Source License
/** * * @function onassignCollectionBtnClicked * * @created_date : 11-Dec-2013// ww w.j av a 2s .c o m * * @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("635px"); successPopupVc.show(); successPopupVc.center(); if (AppClientFactory.isAnonymous()) { successPopupVc.setPopupPosition(successPopupVc.getAbsoluteLeft(), 30); } else { successPopupVc.setPopupPosition(successPopupVc.getAbsoluteLeft(), 30); } Map<String, String> params = StringUtil.splitQuery(Window.Location.getHref()); params.put("assign", "yes"); PlaceRequest placeRequest = AppClientFactory.getPlaceManager() .preparePlaceRequest(PlaceTokens.PREVIEW_PLAY, params); AppClientFactory.getPlaceManager().revealPlace(false, placeRequest, true); } }
From source file:org.ednovo.gooru.client.mvp.assessments.play.collection.preview.home.AssessmentsPreviewHomeView.java
License:Open Source License
/** * * @function oncustomizeCollectionBtnClicked * * @created_date : 11-Dec-2013//from ww w . j ava 2 s . c o m * * @description * * * @parm(s) : @param clickEvent * * @return : void * * @throws : <Mentioned if any exceptions> * */ @UiHandler("customizeCollectionBtn") public void oncustomizeCollectionBtnClicked(ClickEvent clickEvent) { MixpanelUtil.Preview_Click_Customize(); String collectionId = clickEvent.getRelativeElement().getAttribute("collectionId"); if (!isCustomizePopup) { isCustomizePopup = true; Boolean loginFlag = AppClientFactory.isAnonymous(); 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.show(); successPopupVc.center(); Map<String, String> params = StringUtil.splitQuery(Window.Location.getHref()); params.put("customize", "yes"); PlaceRequest placeRequest = AppClientFactory.getPlaceManager() .preparePlaceRequest(PlaceTokens.PREVIEW_PLAY, params); AppClientFactory.getPlaceManager().revealPlace(false, placeRequest, true); } }
From source file:org.ednovo.gooru.client.mvp.assessments.play.collection.preview.home.AssessmentsPreviewHomeView.java
License:Open Source License
/** * * @function oncustomizeCollectionBtnClicked * * @created_date : 11-Dec-2013/*from www. j av a2s . co m*/ * * @description * * * @parm(s) : @param clickEvent * * @return : void * * @throws : <Mentioned if any exceptions> * */ @UiHandler("shareCollectionBtn") public void onshareCollectionBtnClicked(ClickEvent clickEvent) { MixpanelUtil.Preview_Click_Share(); 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.assessments.play.collection.preview.home.AssessmentsPreviewHomeView.java
License:Open Source License
/** * * Showing Customize or Assign popup after login with gmail account. * *///from ww w . ja va2 s .c om private void showPopupAfterGmailSignin() { 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; if (customize != null && YES.equals(customize)) { Boolean loginFlag = AppClientFactory.isAnonymous(); 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.show(); successPopupVc.center(); } if (assign != null && YES.equals(assign)) { 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.assessments.play.collection.preview.home.assign.AssignPopupPlayerVc.java
License:Open Source License
/** * *///from w w w.j a v a 2s .com public AssignPopupPlayerVc(String collectionIdVal) { super(false); res = AssignPopUpCBundle.INSTANCE; AssignPopUpCBundle.INSTANCE.css().ensureInjected(); add(uiBinder.createAndBindUi(this)); this.setGlassEnabled(true); donothaveAccountText.getElement().setInnerHTML(i18n.GL0634()); donothaveAccountText.getElement().setAttribute("style", "float: left;margin-left: 22%;"); ancSignUp.setText(i18n.GL0207() + i18n.GL_SPL_EXCLAMATION()); swithUrlLbl.setText(i18n.GL0639()); swithToEmbedLbl.setText(i18n.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 SimpleAsyncCallback<CollectionDo>() { @Override public void onSuccess(CollectionDo result) { MixpanelUtil.Preview_Click_Assign_successful(); String collectionId = ""; if (result.getGooruOid() != null) { collectionId = result.getGooruOid(); } toAssignStr = collectionId; if (collectionId != null) { collectionDoGlobal = result; if (AppClientFactory.isAnonymous()) { hideContainers(); } else { loadListContainers(); } generateShareLink(toAssignStr); } loadingImageLabel.setVisible(false); popupContentAssign.setVisible(true); } }); } catch (Exception ex) { AppClientFactory.printSevereLogger("AssignPopupPlayerVc : Constructor : " + ex.getMessage()); } setShareUrlGenerationAsyncCallback(new SimpleAsyncCallback<Map<String, String>>() { @Override public void onSuccess(Map<String, String> result) { if (result.containsKey("decodeRawUrl")) { 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(); ScrollPopupUtil.ScrollPopupUtilWidget(assignPopupContent, false); }
From source file:org.ednovo.gooru.client.mvp.assessments.play.collection.preview.home.assign.AssignPopupPlayerVc.java
License:Open Source License
@UiHandler("ancprivacy") public void onClickPrivacyAnchor(ClickEvent clickEvent) { Window.enableScrolling(false); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(98, false)); termsOfUse = new TermsOfUse() { @Override/*from w ww . j a v a 2 s. co m*/ public void openParentPopup() { AppClientFactory.fireEvent(new SetHeaderZIndexEvent(98, false)); Window.enableScrolling(false); } }; termsOfUse.show(); termsOfUse.center(); termsOfUse.getElement().getStyle().setZIndex(999999);//To display the view in collection player. }
From source file:org.ednovo.gooru.client.mvp.assessments.play.collection.preview.home.customize.RenameCustomizePopUp.java
License:Open Source License
/** * *//*from w ww.j a v a 2 s .co m*/ public RenameCustomizePopUp(String collectionId, final Boolean loginFlag, final String collectionTitle) { super(false); this.res = AssignPopUpCBundle.INSTANCE; res.css().ensureInjected(); add(binder.createAndBindUi(this)); errorLabel.setVisible(false); // this.setStyleName(res.css().popupStyle()); this.setGlassEnabled(true); customizeText.getElement().setInnerHTML(i18n.GL0743()); customizeText.getElement().setAttribute("alt", i18n.GL0743()); customizeText.getElement().setAttribute("title", i18n.GL0743()); this.setHeight("550px"); backtoLibrary.setText(i18n.GL0142()); backtoLibrary.getElement().setAttribute("alt", i18n.GL0142()); backtoLibrary.getElement().setAttribute("title", i18n.GL0142()); editCollection.setText(i18n.GL0636()); editCollection.getElement().setAttribute("alt", i18n.GL0636()); editCollection.getElement().setAttribute("title", i18n.GL0636()); panelAssign.getElement().getStyle().setMarginBottom(3, 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;"); //this.getElement().setAttribute("style", "min-height:420px"); // this.getElement().setAttribute("style", "top:26px"); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(99, false)); popupcontentCustomize.setVisible(false); loadingImageLabel.setVisible(true); editCollection.getElement().setAttribute("collectionId", collectionId); assignDes.setText(i18n.GL0744()); assignDes.getElement().setAttribute("alt", i18n.GL0744()); assignDes.getElement().setAttribute("title", i18n.GL0744()); lblpopupTitle.setText(i18n.GL0743()); lblpopupTitle.getElement().setAttribute("alt", i18n.GL0743()); lblpopupTitle.getElement().setAttribute("title", i18n.GL0743()); lbltxtBoxTitle.setText(i18n.GL0553()); lbltxtBoxTitle.getElement().setAttribute("alt", i18n.GL0553()); lbltxtBoxTitle.getElement().setAttribute("title", i18n.GL0553()); copycollectionTextbox.setMaxLength(50); copycollectionTextbox.addKeyPressHandler(new OnkeyPress()); copycollectionTextbox.addBlurHandler(new OnBlurr()); copycollectionTextbox.addKeyUpHandler(new OnkeyUp()); AppClientFactory.getInjector().getClasspageService().getSCollIdClasspageById(collectionId, new SimpleAsyncCallback<CollectionDo>() { @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, collectionTitle) { @Override public void closePoupfromChild() { closePoup(); } @Override public void showSuccessMsgfromChild(String collectionId, String collectionTitle) { showSuccessMsg(collectionId); } }; loginCustom.add(assignWidget); panelAssign.getElement().getStyle().setHeight(494, Unit.PX); } else { loginCustom.setVisible(false); copyCollectionSuccess.setVisible(true); } popupcontentCustomize.setVisible(true); loadingImageLabel.setVisible(false); } }); MixpanelUtil.mixpanelEvent("CoursePage_customize_collection"); setId(); this.center(); }