List of usage examples for com.google.gwt.user.client Window open
public static void open(String url, String name, String features)
From source file:org.ednovo.gooru.client.mvp.home.library.assign.SocialShareSmallView.java
License:Open Source License
/** * Share the data by using Twister.//from ww w .jav a 2 s. com */ private void onTwisterShareEvent() { MixpanelUtil.Click_On_Twitter(); if (AppClientFactory.getCurrentPlaceToken().equals(PlaceTokens.PROFILE_PAGE)) { if (socialDo.getIsSearchShare()) { Window.open( "http://twitter.com/intent/tweet?text=" + "Gooru - " + socialDo.getTitle().replaceAll("\\+", "%2B") + ": " + socialDo.getBitlylink(), "_blank", "width=600,height=300"); } else { Window.open("http://twitter.com/intent/tweet?text=" + "Check out " + socialDo.getTitle().replaceAll("\\+", "%2B") + "'s Gooru Profile Page - " + socialDo.getBitlylink(), "_blank", "width=600,height=300"); } } else { Window.open( "http://twitter.com/intent/tweet?text=" + "Gooru - " + socialDo.getTitle().replaceAll("\\+", "%2B") + ": " + socialDo.getBitlylink(), "_blank", "width=600,height=300"); } }
From source file:org.ednovo.gooru.client.mvp.play.collection.end.CollectionEndView.java
License:Open Source License
@Override public void showShareWidget(final CollectionDo collectionDo, Map<String, String> collectionShare) { shareBitlyUrl = collectionShare.get("shortenUrl"); originalUrl = collectionShare.get("decodeRawUrl"); encodeUrl = collectionShare.get("rawUrl"); SocialShareWidget swidget = new SocialShareWidget(collectionDo.getGoals(), collectionDo.getThumbnails().getUrl(), "collection") { @Override//from w w w . j av a2 s.c o m public void onTwitter() { Window.open("http://twitter.com/intent/tweet?text=" + GL0733 + " " + GL_GRR_Hyphen + " " + collectionDo.getTitle().replaceAll("\\+", "%2B") + ": " + URL.encodeComponent(originalUrl, true), "_blank", "width=600,height=300"); } @Override public void onFacebook() { SocialShareView.postOnFacebook(collectionDo.getTitle(), encodeUrl, getResourceDescription(), getThumbnailUrl()); } @Override public void onEmail() { String emailSubject = "Gooru - " + collectionDo.getTitle(); String emailDescription = collectionDo.getTitle() + "<div><br/></div><div>" + originalUrl + "</div><div><br/></div><div>" + GL1429 + "</div>"; emailShareView = new CollectionEmailShareView(emailSubject, emailDescription) { @Override public void sendEmail(String fromEmail, String toEmail, String copyEmail, String subject, String message) { getUiHandlers().sendEmail(fromEmail, toEmail, copyEmail, subject, message); } }; emailShareView.show(); } }; collectionPlayerSummaryShareTextBox.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { collectionPlayerSummaryShareTextBox.setFocus(true); collectionPlayerSummaryShareTextBox.selectAll(); } }); collectionPlayerSummaryShareTextBox.setReadOnly(true); collectionPlayerSummaryShareTextBox.getElement().setAttribute("readOnly", ""); collectionPlayerSummaryShareTextBox.setText(originalUrl); ftmSummaryPageContainer.add(swidget); }
From source file:org.ednovo.gooru.client.mvp.play.collection.preview.home.share.SocialShareSmallView.java
License:Open Source License
/** * Share the data by using Twister.//w w w . ja va 2 s . com */ private void onTwisterShareEvent() { MixpanelUtil.Click_On_Twitter(); if (AppClientFactory.getCurrentPlaceToken().equals(PlaceTokens.PROFILE_PAGE)) { if (socialDo.getIsSearchShare()) { Window.open( "http://twitter.com/intent/tweet?text=" + GL0733 + " " + GL_GRR_Hyphen + " " + socialDo.getTitle().replaceAll("\\+", "%2B") + ": " + socialDo.getBitlylink(), "_blank", "width=600,height=300"); } else { Window.open("http://twitter.com/intent/tweet?text=" + GL1085 + socialDo.getTitle().replaceAll("\\+", "%2B") + GL1086 + " " + GL_GRR_Hyphen + " " + socialDo.getBitlylink(), "_blank", "width=600,height=300"); } } else { Window.open( "http://twitter.com/intent/tweet?text=" + GL0733 + " " + GL_GRR_Hyphen + " " + socialDo.getTitle().replaceAll("\\+", "%2B") + ": " + socialDo.getBitlylink(), "_blank", "width=600,height=300"); } }
From source file:org.ednovo.gooru.client.mvp.play.collection.share.CollectionShareView.java
License:Open Source License
@Override public void setData(final CollectionDo collectionDo) { sharePanel.clear();/* w ww .j a va 2 s .c o m*/ SocialShareWidget swidget = new SocialShareWidget(collectionDo.getGoals(), collectionDo.getThumbnails().getUrl(), "collection") { @Override public void onTwitter() { Window.open( "http://twitter.com/intent/tweet?text=" + GL1439 + collectionDo.getTitle().replaceAll("\\+", "%2B") + ": " + shareBitlyUrl, "_blank", "width=600,height=300"); } @Override public void onFacebook() { SocialShareView.postOnFacebook(collectionDo.getTitle(), SocialShareView.getEncodedUrl(shareUrl), getResourceDescription(), getThumbnailUrl()); } @Override public void onEmail() { String emailSubject = GL1439 + collectionDo.getTitle(); String emailDescription = collectionDo.getTitle() + "<div><br/></div><div>" + shareUrl + "</div><div><br/></div><div>" + GL1440 + " " + AppClientFactory.getLoggedInUser().getSettings().getHomeEndPoint() + " " + GL1441 + "</div>"; emailShareView = new CollectionEmailShareView(emailSubject, emailDescription) { @Override public void sendEmail(String fromEmail, String toEmail, String copyEmail, String subject, String message) { getUiHandlers().sendEmail(fromEmail, toEmail, copyEmail, subject, message); } }; emailShareView.show(); } }; sharePanel.add(swidget); }
From source file:org.ednovo.gooru.client.mvp.play.collection.share.CollectionShareView.java
License:Open Source License
@Override public void showResourceData(final CollectionItemDo collectionItemDo) { sharePanel.clear();// ww w. ja v a2 s . c o m SocialShareWidget swidget = new SocialShareWidget(collectionItemDo.getResource().getDescription(), collectionItemDo.getResource().getThumbnails().getUrl(), collectionItemDo.getCategory(), collectionItemDo) { @Override public void onTwitter() { Window.open( "http://twitter.com/intent/tweet?text=" + GL1439 + removeHtmlTags(collectionItemDo.getResource().getTitle()).replaceAll("\\+", "%2B") + ": " + SocialShareView.getEncodedUrl(resourceShareUrl), "_blank", "width=600,height=300"); } @Override public void onFacebook() { SocialShareView.postOnFacebook(removeHtmlTags(collectionItemDo.getResource().getTitle()), SocialShareView.getEncodedUrl(resourceShareUrl), getResourceDescription(), getThumbnailUrl()); } @Override public void onEmail() { String emailSubject = GL1439 + removeHtmlTags(collectionItemDo.getResource().getTitle()); String emailDescription = collectionItemDo.getResource().getTitle() + "<div><br/></div><div>" + resourceShareUrl + "</div><div><br/></div><div>" + GL1440 + " " + AppClientFactory.getLoggedInUser().getSettings().getHomeEndPoint() + " " + GL1441 + "</div>"; emailShareView = new CollectionEmailShareView(emailSubject, emailDescription) { @Override public void sendEmail(String fromEmail, String toEmail, String copyEmail, String subject, String message) { getUiHandlers().sendEmail(fromEmail, toEmail, copyEmail, subject, message); } }; emailShareView.show(); } }; sharePanel.add(swidget); }
From source file:org.ednovo.gooru.client.mvp.play.resource.framebreaker.ResourceFrameBreakerView.java
License:Open Source License
/** * /* w ww . ja va 2 s.co m*/ * @function openResurceLink * * @created_date : Jan 2, 2014 * * @description * To open original resource link in new tab. * * @parm(s) : @param ClickEvent * * @return : void * * @throws : <Mentioned if any exceptions> * * * * */ @UiHandler("btnResourceLink") public void openResurceLink(ClickEvent event) { MixpanelUtil.mixpanelEvent("Player_Click_Linked_Out_Resource"); Window.open(collectionItemDo.getResource().getUrl(), "_blank", ""); }
From source file:org.ednovo.gooru.client.mvp.play.resource.share.ResourceShareView.java
License:Open Source License
@Override public void setData(final CollectionItemDo collectionItemDo) { sharePanel.clear();/*from ww w . j a va2 s . co m*/ SocialShareWidget swidget = new SocialShareWidget(collectionItemDo.getResource().getDescription(), collectionItemDo.getResource().getThumbnails().getUrl(), collectionItemDo.getCategory(), collectionItemDo) { @Override public void onTwitter() { Window.open("http://twitter.com/intent/tweet?text=" + GL1439 + removeHtmlTags(collectionItemDo.getResource().getTitle()).replaceAll("\\+", "%2B") + ": " + shareBitlyUrl, "_blank", "width=600,height=300"); } @Override public void onFacebook() { SocialShareView.postOnFacebook(removeHtmlTags(collectionItemDo.getResource().getTitle()), originalUrl, getResourceDescription(), getThumbnailUrl()); } @Override public void onEmail() { String emailSubject = GL1439 + collectionItemDo.getResource().getTitle(); String emailDescription = removeHtmlTags(collectionItemDo.getResource().getTitle()) + "<div><br/></div><div>" + shareBitlyUrl + "</div><div><br/></div><div>" + GL1440 + " " + AppClientFactory.getLoggedInUser().getSettings().getHomeEndPoint() + " " + GL1441 + "</div>"; emailShareView = new CollectionEmailShareView(emailSubject, emailDescription) { @Override public void sendEmail(String fromEmail, String toEmail, String copyEmail, String subject, String message) { getUiHandlers().sendEmail(fromEmail, toEmail, copyEmail, subject, message); } }; emailShareView.show(); } }; sharePanel.add(swidget); }
From source file:org.ednovo.gooru.client.mvp.shelf.collection.tab.resource.add.AddQuestionResourceView.java
License:Open Source License
@UiHandler("commuGuideLinesAnr") public void onClickCommunityGuide(ClickEvent event) { Window.open("http://support.goorulearning.org/hc/en-us/articles/200688506", "_blank", ""); }
From source file:org.ednovo.gooru.client.mvp.shelf.collection.tab.resource.add.AddUserOwnResourceView.java
License:Open Source License
/** * Class constructor// w w w . j a v a 2s. c o m * * @param collectionDo instance of {@link CollectionDo} */ public AddUserOwnResourceView(CollectionDo collectionDo) { this.collectionDo = collectionDo; initWidget(uiBinder.createAndBindUi(this)); fileSizeLimit.getElement().setInnerHTML(" " + GL0901); browseResourceBtn.setText(GL0902); titleText.getElement().setInnerHTML(GL0318); descriptionText.getElement().setInnerHTML(GL0904); categoryPanelText.getElement().setInnerHTML(GL0906); textsPanelLabel.getElement().setInnerHTML(GL1044); imageText.getElement().setInnerHTML(GL1046); thumbnailImageText.getElement().setInnerHTML(GL0911); uploadImageLbl.setText(GL0912); rightsLbl.setText(GL0869); agreeText.setText(GL0870); commuGuideLinesAnr.setText(GL0871); termsAndPolicyAnr.setText(" " + GL0872 + GL_GRR_COMMA); privacyAnr.setText(" " + GL0873); andText.setText(" " + GL_GRR_AND + " "); copyRightAnr.setText(" " + GL0875); additionalText.setText(GL0874); cancelResourcePopupBtnLbl.setText(GL0142); addResourceBtnLbl.setText(GL0590); lblAdding.setText(GL0591.toLowerCase()); CollectionEditResourceCBundle.INSTANCE.css().ensureInjected(); cancelResourcePopupBtnLbl.addClickHandler(new CloseClickHandler()); addResourceBtnLbl.addClickHandler(new AddClickHandler()); uploadImageLbl.addClickHandler(new OnEditImageClick()); browseResourceBtn.addClickHandler(new OnBrowseBtnClick()); rightsChkBox.addClickHandler(new OnRightsChecked()); cancelResourcePopupBtnLbl.getElement().setId("btnCancel"); rightsChkBox.getElement().setId("chkRights"); uploadImageLbl.getElement().setId("btnUploadImage"); addResourceBtnLbl.getElement().setId("btnAdd"); resourcePathTextBox.getElement().setId("tbUrl"); titleTextBox.getElement().setId("tbTitle"); descriptionTxtAera.getElement().setId("taDescription"); descriptionTxtAera.getElement().setAttribute("placeholder", GL0359); resourcePathTextBox.addKeyUpHandler(new ResourcePathKeyUpHandler()); titleTextBox.addKeyUpHandler(new TitleKeyUpHandler()); descriptionTxtAera.addKeyUpHandler(new DescriptionKeyUpHandler()); titleTextBox.getElement().setAttribute("maxlength", "50"); descriptionTxtAera.getElement().setAttribute("maxlength", "300"); resourceCategoryLabel.setText(GL0360); resourceContentChkLbl.setVisible(false); mandatoryTitleLbl.setVisible(false); descCharcterLimit.setVisible(false); setThumbnailImage.setVisible(false); resourceTypePanel.setVisible(false); loadingPanel.setVisible(false); panelContentRights.setVisible(false); imageContainer.getElement().getStyle().setDisplay(Display.NONE); rightsLbl.getElement().getStyle().setColor("black"); chooseResourceBtn.getElement().setId("fileUpload1"); clearFields(); handelFormEvent(); copyRightAnr.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { Window.enableScrolling(false); copyRightPolicy = new CopyRightPolicyVc() { @Override public void openParentPopup() { Window.enableScrolling(false); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(98, false)); } }; copyRightPolicy.show(); copyRightPolicy.setSize("902px", "300px"); copyRightPolicy.center(); copyRightPolicy.getElement().getStyle().setZIndex(999); } }); termsAndPolicyAnr.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { Window.enableScrolling(false); termsOfUse = new TermsOfUse() { @Override public void openParentPopup() { Window.enableScrolling(false); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(98, false)); } }; termsOfUse.show(); termsOfUse.setSize("902px", "300px"); termsOfUse.center(); termsOfUse.getElement().getStyle().setZIndex(999); } }); privacyAnr.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { Window.enableScrolling(false); termsAndPolicyVc = new TermsAndPolicyVc(false) { @Override public void openParentPopup() { Window.enableScrolling(false); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(98, false)); } }; termsAndPolicyVc.show(); termsAndPolicyVc.setSize("902px", "300px"); termsAndPolicyVc.center(); termsAndPolicyVc.getElement().getStyle().setZIndex(999); } }); commuGuideLinesAnr.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { Window.open("http://support.goorulearning.org/hc/en-us/articles/200688506", "_blank", ""); } }); resourceCategoryLabel.setText(GL1044); categorypanel.setStyleName(texts.getStyleName()); resourceTypePanel.setVisible(false); resoureDropDownLblOpen = false; lblAdding.getElement().getStyle().setDisplay(Display.NONE); panelAction.getElement().getStyle().setDisplay(Display.BLOCK); titleTextBox.addBlurHandler(new CheckProfanityInOnBlur(titleTextBox, null, mandatoryTitleLblForSwareWords)); descriptionTxtAera.addBlurHandler( new CheckProfanityInOnBlur(null, descriptionTxtAera, mandatoryDescLblForSwareWords)); }
From source file:org.ednovo.gooru.client.mvp.shelf.collection.tab.resource.add.AddWebResourceView.java
License:Open Source License
public AddWebResourceView(CollectionDo collectionDo) { this.collectionDo = collectionDo; initWidget(uiBinder.createAndBindUi(this)); urlTitle.getElement().setInnerHTML(GL0915); titleText.getElement().setInnerHTML(GL0318 + GL_SPL_STAR); descriptionLabel.getElement().setInnerHTML(GL0904); categoryTitle.getElement().setInnerHTML(GL0906); videoLabel.getElement().setInnerHTML(GL0918); interactiveText.getElement().setInnerHTML(GL0919); websiteText.getElement().setInnerHTML(GL1396); /*slideText.getElement().setInnerHTML(GL0908); handoutText.getElement().setInnerHTML(GL0907); textbookLabel.getElement().setInnerHTML(GL0909); lessonText.getElement().setInnerHTML(GL0910); examText.getElement().setInnerHTML(GL0921);*/ textsText.getElement().setInnerHTML(GL1044); audioText.getElement().setInnerHTML(GL1045); imagesText.getElement().setInnerHTML(GL1046); // otherText.getElement().setInnerHTML(GL1047); thumbnailText.getElement().setInnerHTML(GL0911); generateImageLbl.setText(GL0922);//from w w w .j av a2 s.c o m orText.getElement().setInnerHTML(GL_GRR_Hyphen + GL0209 + GL_GRR_Hyphen); uploadImageLbl.setText(GL0912); refreshText.getElement().setInnerHTML(GL0923); rightsLbl.setText(GL0869); addResourceBtnLbl.setText(GL0590); cancelResourcePopupBtnLbl.setText(GL0142); loadingTextLbl.setText(GL0591.toLowerCase()); cancelResourcePopupBtnLbl.addClickHandler(new CloseClickHandler()); addResourceBtnLbl.addClickHandler(new AddClickHandler()); uploadImageLbl.addClickHandler(new OnEditImageClick()); uploadImageLbl.getElement().setId("lblUploadImage"); addResourceBtnLbl.getElement().setId("btnAdd"); urlTextBox.getElement().setId("tbUrl"); titleTextBox.getElement().setId("tbTitle"); cancelResourcePopupBtnLbl.getElement().setId("lblCancel"); descriptionTxtAera.getElement().setId("taDescription"); descriptionTxtAera.getElement().setAttribute("placeholder", GL0359); urlTextBox.addKeyUpHandler(new UrlKeyUpHandler()); urlTextBox.addBlurHandler(new UrlBlurHandler()); titleTextBox.addKeyUpHandler(new TitleKeyUpHandler()); descriptionTxtAera.addKeyUpHandler(new DescriptionKeyUpHandler()); titleTextBox.getElement().setAttribute("maxlength", "50"); descriptionTxtAera.getElement().setAttribute("maxlength", "300"); resourceCategoryLabel.setText(GL0360); mandatoryUrlLbl.setVisible(false); mandatoryTitleLbl.setVisible(false); mandatoryTitleLblForSwareWords.setVisible(false); mandatoryDescLblForSwareWords.setVisible(false); mandatoryCategoryLbl.setVisible(false); descCharcterLimit.getElement().setInnerText(GL0143); descCharcterLimit.setVisible(false); agreeText.setText(GL0870); commuGuideLinesAnr.setText(GL0871); termsAndPolicyAnr.setText(" " + GL0872 + GL_GRR_COMMA); privacyAnr.setText(" " + GL0873); andText.setText(" " + GL_GRR_AND + " "); copyRightAnr.setText(" " + GL0875); additionalText.setText(GL0874); leftArrowLbl.setVisible(false); rightArrowLbl.setVisible(false); setThumbnailImage.setVisible(false); loadingTextLbl.getElement().getStyle().setFontStyle(FontStyle.ITALIC); resourceTypePanel.setVisible(false); loadingPanel.setVisible(false); panelContentRights.setVisible(false); rightsChkBox.addClickHandler(new rightsChecked()); rightsChkBox.getElement().setId("chkRights"); clearFields(); copyRightAnr.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { Window.enableScrolling(false); copyRightPolicy = new CopyRightPolicyVc() { @Override public void openParentPopup() { Window.enableScrolling(false); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(98, false)); } }; copyRightPolicy.show(); copyRightPolicy.setSize("902px", "300px"); copyRightPolicy.center(); copyRightPolicy.getElement().getStyle().setZIndex(999); } }); termsAndPolicyAnr.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { Window.enableScrolling(false); termsOfUse = new TermsOfUse() { @Override public void openParentPopup() { Window.enableScrolling(false); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(98, false)); } }; termsOfUse.show(); termsOfUse.setSize("902px", "300px"); termsOfUse.center(); termsOfUse.getElement().getStyle().setZIndex(999); } }); privacyAnr.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { Window.enableScrolling(false); termsAndPolicyVc = new TermsAndPolicyVc(false) { @Override public void openParentPopup() { Window.enableScrolling(false); AppClientFactory.fireEvent(new SetHeaderZIndexEvent(98, false)); } }; termsAndPolicyVc.show(); termsAndPolicyVc.setSize("902px", "300px"); termsAndPolicyVc.center(); termsAndPolicyVc.getElement().getStyle().setZIndex(999); } }); commuGuideLinesAnr.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { Window.open("http://support.goorulearning.org/hc/en-us/articles/200688506", "_blank", ""); } }); titleTextBox.addBlurHandler(new CheckProfanityInOnBlur(titleTextBox, null, mandatoryTitleLblForSwareWords)); descriptionTxtAera.addBlurHandler( new CheckProfanityInOnBlur(null, descriptionTxtAera, mandatoryDescLblForSwareWords)); }