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.coursedetails.contentvisibility.ContentVisibilityChildView.java
License:Open Source License
@UiHandler("btnPublish") public void updateContentVisibilityData(ClickEvent event) { publishPopup = new PublishConfirmationPopup() { @Override//from ww w. j a va 2 s . c o m public void onClickPositiveButton(ClickEvent event) { getPresenter().updateContentVisibilityData(classId, getContentData()); } @Override public void onClickNegitiveButton(ClickEvent event) { hide(); Window.enableScrolling(true); } }; publishPopup.getElement().getStyle().setZIndex(9999999); publishPopup.setPopupTitle(i18n.GL3589()); publishPopup.setH3Data(i18n.GL3590(), i18n.GL3591()); publishPopup.setPositiveButtonText(i18n.GL1921()); publishPopup.setNegitiveButtonText(i18n.GL0142()); publishPopup.setPleaseWaitText(i18n.GL1924()); publishPopup.show(); publishPopup.center(); }
From source file:org.ednovo.gooru.client.mvp.gshelf.coursedetails.contentvisibility.ContentVisibilityChildView.java
License:Open Source License
@Override public void closePublishPopup(ArrayList<PlanProgressDo> data) { Window.enableScrolling(true); if (publishPopup != null) { updateContentData(data);//from w ww. j a v a 2 s .c o m publishPopup.hide(); } }
From source file:org.ednovo.gooru.client.mvp.gshelf.lessondetails.LessonInfoPresenter.java
License:Open Source License
@Override public void showStandardsPopup(String standardVal, String standardsDesc, List<LiPanelWithClose> collectionLiPanelWithCloseArray) { Window.enableScrolling(false); standardsPopupPresenter.callStandardsBasedonTypeService(standardVal, standardsDesc); standardsPopupPresenter.setLessonInfoPresenter(this); standardsPopupPresenter.setAlreadySelectedItems(collectionLiPanelWithCloseArray); addToPopupSlot(standardsPopupPresenter); }
From source file:org.ednovo.gooru.client.mvp.gshelf.lessondetails.LessonInfoView.java
License:Open Source License
@UiHandler("btnSaveAndCreateAssessment") public void clickOnSaveAndCreateAssessment(ClickEvent saveCourseEvent) { final TreeItem currentShelfTreeWidget = getUiHandlers().getSelectedWidget(); Window.enableScrolling(false); final String courseId = AppClientFactory.getPlaceManager().getRequestParameter(O1_LEVEL, null); final String unitId = AppClientFactory.getPlaceManager().getRequestParameter(O2_LEVEL, null); if (validateInputs()) { final CreateDo createOrUpDate = new CreateDo(); createOrUpDate.setTitle(lessonTitle.getText()); createOrUpDate.setStandardIds(getSelectedStandards()); createOrUpDate.setTaxonomyCourseIds(getSelectedCourseIds()); createOrUpDate.setSubdomainIds(getSelectedSubDomainIds()); assessmentPopup = new AssessmentPopupWidget() { @Override// ww w. j a v a 2s.co m public void clickOnNoramlAssessmentClick() { spinnerImageVisibility(true); assessmentPopup.hide(); Window.enableScrolling(true); //This will display the normal assessment info getUiHandlers().checkProfanity(lessonTitle.getText().trim(), true, ASSESSMENT, createOrUpDate, courseId, unitId, currentShelfTreeWidget); } @Override public void clickOnExternalAssessmentClick() { spinnerImageVisibility(true); assessmentPopup.hide(); Window.enableScrolling(true); //This will display the external assessment info getUiHandlers().checkProfanity(lessonTitle.getText().trim(), true, ASSESSMENT_URL, createOrUpDate, courseId, unitId, currentShelfTreeWidget); } }; assessmentPopup.setGlassEnabled(true); assessmentPopup.show(); assessmentPopup.center(); } else { Window.scrollTo(lessonTitle.getAbsoluteLeft(), lessonTitle.getAbsoluteTop() - (lessonTitle.getOffsetHeight() * 3)); lessonTitle.setStyleName("textAreaErrorMessage"); lessonTitle.addStyleName("form-control"); lblErrorMessage.setVisible(true); resetBtns(); } }
From source file:org.ednovo.gooru.client.mvp.gshelf.righttabs.MyCollectionsRightClusterPresenter.java
License:Open Source License
/** * To add new course/unit/lesson//from ww w .ja v a2s.co m * @param type */ public void addNewContent(String type) { if (type != null) { if (type.contains(COURSE)) { setTabItems(1, COURSE, null); setUnitTemplate(COURSE, null); //courseInfoPresenter.createAndSaveCourseDetails(courseInfoPresenter.getView().getCourseTitle(), false); } else if (type.contains(UNIT)) { setTabItems(1, UNIT, null); setUnitTemplate(UNIT, null); //courseInfoPresenter.createAndSaveCourseDetails(courseInfoPresenter.getView().getCourseTitle(), false); } else if (type.contains(LESSON)) { setTabItems(1, LESSON, null); setUnitTemplate(LESSON, null); } else if (type.toLowerCase().contains(FOLDER.toLowerCase())) { setTabItems(1, FOLDER, null); setUnitTemplate(FOLDER, null); } else if (type.toLowerCase().contains(COLLECTION.toLowerCase())) { setTabItems(1, COLLECTION, null); setUnitTemplate(COLLECTION, null); } else if (type.toLowerCase().contains(ASSESSMENT.toLowerCase())) { Window.enableScrolling(false); assessmentPopup = new AssessmentPopupWidget() { @Override public void clickOnNoramlAssessmentClick() { Window.enableScrolling(true); setTabItems(1, ASSESSMENT, null); setUnitTemplate(ASSESSMENT, null); assessmentPopup.hide(); } @Override public void clickOnExternalAssessmentClick() { assessmentPopup.hide(); Window.enableScrolling(true); //This will display the external assessment info setTabItems(1, ASSESSMENT_URL, null); setUnitTemplate(ASSESSMENT_URL, null); } }; assessmentPopup.setGlassEnabled(true); assessmentPopup.show(); assessmentPopup.center(); } } }
From source file:org.ednovo.gooru.client.mvp.gshelf.righttabs.MyCollectionsRightClusterView.java
License:Open Source License
/** * Invokes the delete course popup.//from www . j av a 2s .co m * * @param currentTypeView {@link String} * @param o1CourseId {@link String} * @param o2UnitId {@link String} * @param o3LessonId {@link String} * @param assessmentCollectionId * @param deletePopup {@link DeletePopupViewVc} */ public void invokeDeletePopup(final String currentTypeView, final String o1CourseId, final String o2UnitId, final String o3LessonId, final String assessmentCollectionId) { deleteContentPopup = new DeleteContentPopup() { @Override public void onClickPositiveButton(ClickEvent event) { if (!StringUtil.isEmpty(o2UnitId) && UNIT.equalsIgnoreCase(currentTypeView)) { getUiHandlers().deleteUnitContent(o1CourseId, o2UnitId); } else if (!StringUtil.isEmpty(o1CourseId) && COURSE.equalsIgnoreCase(currentTypeView)) { getUiHandlers().deleteCourseContent(o1CourseId); } else if (!StringUtil.isEmpty(o3LessonId) && LESSON.equalsIgnoreCase(currentTypeView)) { getUiHandlers().deleteLessonContent(o1CourseId, o2UnitId, o3LessonId); } else if ("Folder" .equalsIgnoreCase(AppClientFactory.getPlaceManager().getRequestParameter("view", null))) { if ((AppClientFactory.getPlaceManager().getRequestParameter("id", null) != null)) { getUiHandlers().deleteMyCollectionContent( (AppClientFactory.getPlaceManager().getRequestParameter("id", null)), "folderCollection"); } else { if (AppClientFactory.getPlaceManager().getRequestParameter(O3_LEVEL) != null) { String parentId = AppClientFactory.getPlaceManager().getRequestParameter(O3_LEVEL); getUiHandlers().deleteMyCollectionContent(parentId, LESSON); } else if (AppClientFactory.getPlaceManager().getRequestParameter(O2_LEVEL) != null) { String parentId = AppClientFactory.getPlaceManager().getRequestParameter(O2_LEVEL); getUiHandlers().deleteMyCollectionContent(parentId, UNIT); } else { String parentId = AppClientFactory.getPlaceManager().getRequestParameter(O1_LEVEL); getUiHandlers().deleteMyCollectionContent(parentId, COURSE); } } } else { getUiHandlers().deleteCollectionContent(o1CourseId, o2UnitId, o3LessonId, assessmentCollectionId); } } @Override public void onClickNegitiveButton(ClickEvent event) { hide(); Window.enableScrolling(true); } }; deleteContentPopup.getElement().getStyle().setZIndex(9999999); deleteContentPopup.setPopupTitle(i18n.GL0748()); String title = folderObj.getTitle().trim(); if (title.length() > 50) { title = title.substring(0, 50) + "..."; } deleteContentPopup.setNotes(StringUtil.generateMessage(i18n.GL3456(), title)); deleteContentPopup.setDeleteValidate("delete"); deleteContentPopup.setPositiveButtonText("Delete Forever"); deleteContentPopup.setNegitiveButtonText(i18n.GL0142()); deleteContentPopup.setPleaseWaitText(i18n.GL0339()); deleteContentPopup.show(); deleteContentPopup.center(); }
From source file:org.ednovo.gooru.client.mvp.gshelf.righttabs.MyCollectionsRightClusterView.java
License:Open Source License
private void hideDeletePopup() { if (deleteContentPopup != null) { deleteContentPopup.hide();/*from w w w. ja v a 2 s. co m*/ } if (deletePopup != null && deletePopup.isShowing()) { deletePopup.hide(); } Window.enableScrolling(true); }
From source file:org.ednovo.gooru.client.mvp.gshelf.righttabs.MyCollectionsRightClusterView.java
License:Open Source License
/** * This method invokes for Collection/assessment delete at my collections/ my content. * @param currentTypeView/* w w w .j ava2 s.c om*/ * @param o1CourseId * @param o2UnitId * @param o3LessonId * @param assessmentCollectionId * @param isTiedWithClasses */ private void invokeMyCollDeletePopUp(String currentTypeView, final String o1CourseId, final String o2UnitId, final String o3LessonId, final String assessmentCollectionId, boolean isTiedWithClasses) { deletePopup = new DeletePopupViewVc() { @Override public void onClickPositiveButton(ClickEvent event) { if ("Folder" .equalsIgnoreCase(AppClientFactory.getPlaceManager().getRequestParameter("view", null))) { getUiHandlers().deleteMyCollectionColl( (AppClientFactory.getPlaceManager().getRequestParameter("id", null))); } else { getUiHandlers().deleteCollectionContent(o1CourseId, o2UnitId, o3LessonId, assessmentCollectionId); } } @Override public void onClickNegitiveButton(ClickEvent event) { hide(); Window.enableScrolling(true); } }; deletePopup.setPopupTitle(i18n.GL0748()); if (isTiedWithClasses && (currentTypeView.equalsIgnoreCase(COLLECTION) || currentTypeView.equalsIgnoreCase(ASSESSMENT))) { StringBuffer sb = new StringBuffer(); String anchString = "<a href=\"{0}\" target=\"_blank\">{1}</a>"; String classpageUrl = "#newteach&c-id={0}&report-type=course-view&classpageId={1}&subpage-view=reports&page-view=teach-dashboard"; int count = classesList.size(); for (int i = 0; i < count; i++) { String url = StringUtil.generateMessage(classpageUrl, o1CourseId, classesList.get(i).getClassUid()); if (count == 1) { sb.append(StringUtil.generateMessage(anchString, url, classesList.get(i).getName())); } else { if (i == (count - 1)) { sb.append(i18n.GL_GRR_AND() + " " + StringUtil.generateMessage(anchString, url, classesList.get(i).getName())); } else { sb.append(StringUtil.generateMessage(anchString, url, classesList.get(i).getName()) + ", "); } } } String remaining = count == 1 ? (" " + i18n.GL1155()) : (" " + i18n.GL1154() + i18n.GL_SPL_EXCLAMATION()); if (currentTypeView.contains(ASSESSMENT)) { deletePopup.setNotes( "This assessment is currently being used in your" + " " + sb.toString() + " " + remaining); deletePopup.setDescText(i18n.GL3039()); } else { deletePopup.setNotes(i18n.GL1156() + " " + sb.toString() + " " + remaining); deletePopup.setDescText(i18n.GL1238()); } } else { if (currentTypeView.contains(ASSESSMENT)) { deletePopup.setNotes(StringUtil.generateMessage(i18n.GL3038(), folderObj.getTitle().trim())); deletePopup.setDescText(i18n.GL3039()); } else { deletePopup.setNotes(StringUtil.generateMessage(i18n.GL1020(), folderObj.getTitle().trim())); deletePopup.setDescText(i18n.GL1238()); } } deletePopup.setDeleteValidate("delete"); deletePopup.setPositiveButtonText(i18n.GL0190()); deletePopup.setNegitiveButtonText(i18n.GL0142()); deletePopup.setPleaseWaitText(i18n.GL0339()); deletePopup.show(); deletePopup.center(); }
From source file:org.ednovo.gooru.client.mvp.gshelf.ShelfMainPresenter.java
License:Open Source License
private void callBackMethods() { 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;/*from www .j a v a2 s . c o m*/ 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.gshelf.ShelfMainPresenter.java
License:Open Source License
@Override public void onBind() { super.onBind(); Window.enableScrolling(true); setCollectionAsyncCallback(new SimpleAsyncCallback<CollectionDo>() { @Override// w ww .j a v a 2s. co m public void onSuccess(CollectionDo collection) { isApiCalled = false; if (collection.getStatusCode() == 200) { FolderDo folderDo = getFolderDo(collection); if (collection.getPermissions() != null) { if (!collection.getPermissions().toString().contains("edit")) { errorPopup = null; invokeErrorPopup(); } else { setCollectionContent(folderDo); } } } else { errorPopup = null; invokeErrorPopup(); } } @Override public void onFailure(Throwable caught) { super.onFailure(caught); AppClientFactory.fireEvent(new RefreshCollectionInShelfListEvent(null, RefreshType.OPEN)); } }); }